/* Candyland — candy cake shop. Theme variables so night mode can swap everything at once. */
:root {
  --ink: #5a3a2e; --ink2: #8a5a44; --muted: #a07c70; --faint: #c2a197;
  --pink: #ff8fb8; --pink2: #ff5f9b; --pinkbg: #ffe3ee; --mint: #8fe3c8; --mint2: #4fc7a0; --lemon: #ffe27a;
  --paper: #fffdfa; --card: #ffffff; --line: #f6e3dc; --field: #ffffff; --soft: #fff5f9; --soft2: #fff8f3;
  --hud1: #ffd0e2; --hud2: #ffb3cf; --hudshadow: #f08fb6;
  --wall1: #fff4f8; --wall2: #ffe3ee; --awning: #ff8fb8; --awning2: #ffffff;
  --floor1: #fff5ec; --floor2: #ffe3ee; --counter1: #ffffff; --counter2: #ffe9d6; --countershade: #f0cdb4; --front1: #ffd0e2; --front2: #ffffff;
  --board: #2f3b36; --wood: #a86b44; --wood2: #7a4a35; --shelf: #e8b99a;
  --page: linear-gradient(180deg, #ffeef5, #fff6e9);
  --shadow: 0 6px 18px rgba(122, 74, 53, .16); --shadow-lg: 0 16px 44px rgba(122, 74, 53, .28);
}
body.night {
  --ink: #f7e9f1; --ink2: #e6c7d8; --muted: #c9a9bb; --faint: #9f86a0;
  --pinkbg: #4a2c47; --paper: #2a2138; --card: #342944; --line: #4a3c5c; --field: #2d2440; --soft: #3b2d4c; --soft2: #33293f;
  --hud1: #4a2f5c; --hud2: #3a2550; --hudshadow: #1f1530;
  --wall1: #2e2645; --wall2: #372c52; --awning: #b54d86; --awning2: #3a2f55;
  --floor1: #2b2340; --floor2: #3a2c50; --counter1: #5a4470; --counter2: #4a3860; --countershade: #2d2240; --front1: #4d3868; --front2: #3d2e58;
  --board: #1f2825; --wood: #6e4a36; --wood2: #4a3024; --shelf: #6e5070;
  --page: linear-gradient(180deg, #1d1729, #251c35);
  --shadow: 0 6px 18px rgba(0, 0, 0, .35); --shadow-lg: 0 16px 44px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: Nunito, system-ui, sans-serif; color: var(--ink); font-size: 17px; overflow: hidden; background: var(--page); transition: background .4s; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; color: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--ink); border: 2px solid var(--line); border-radius: 14px; padding: 10px 13px; background: var(--field); width: 100%; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 143, 184, .22); }
textarea { resize: vertical; line-height: 1.6; }
label { display: block; font-weight: 700; font-size: 15px; color: var(--ink2); margin: 12px 0 0; }
label > input, label > textarea, label > select { margin-top: 6px; }
label small { font-weight: 600; color: var(--faint); }
label.check { display: flex; gap: 10px; font-weight: 600; } label.check input { width: 19px; height: 19px; margin-top: 3px; accent-color: var(--pink2); flex: none; }
a { color: var(--pink2); }
code { background: var(--soft); padding: 1px 7px; border-radius: 7px; font-size: 14px; }
h2 { font-family: Fredoka; font-weight: 700; font-size: 28px; margin: 0 0 6px; color: var(--ink); }
h3 { font-family: Fredoka; font-size: 20px; margin: 20px 0 6px; }
.hint { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin: 4px 0 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.spacer { flex: 1; }
.empty { color: var(--faint); font-size: 15.5px; padding: 12px; text-align: center; }

/* candy buttons */
.candy { position: relative; border: none; border-radius: 18px; padding: 11px 22px; font-family: Fredoka; font-weight: 600; font-size: 18px; color: #fff;
  background: linear-gradient(180deg, #ffb3cf, var(--pink2)); box-shadow: 0 4px 0 #d9477f, 0 6px 14px rgba(217, 71, 127, .25); text-shadow: 0 1px 0 rgba(0, 0, 0, .12); transition: transform .08s, filter .15s; }
.candy::after { content: ""; position: absolute; left: 12%; right: 12%; top: 3px; height: 35%; border-radius: 12px; background: linear-gradient(rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); pointer-events: none; }
.candy:hover { filter: brightness(1.05); transform: translateY(-1px); } .candy:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9477f; }
.candy:disabled { filter: grayscale(.8) opacity(.55); cursor: not-allowed; transform: none; }
.candy.mint { background: linear-gradient(180deg, #b6f5df, var(--mint2)); box-shadow: 0 4px 0 #36a585, 0 6px 14px rgba(54, 165, 133, .25); }
.candy.soft { background: var(--card); color: var(--ink2); box-shadow: 0 3px 0 var(--line); border: 2px solid var(--line); text-shadow: none; }
.candy.soft::after { display: none; }
.candy.big { font-size: 20px; padding: 13px 26px; } .candy.mini { font-size: 15px; padding: 5px 13px; border-radius: 13px; box-shadow: 0 3px 0 #d9477f; }
.candy.mini.mint { box-shadow: 0 3px 0 #36a585; }
.pill { border: 2px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 14px; font-size: 15px; font-weight: 700; color: var(--ink2); text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.pill:hover { background: var(--soft); }

/* logo */
.logo { font-family: Fredoka; font-weight: 700; font-size: 32px; line-height: 1; white-space: nowrap; color: #fff; letter-spacing: .5px;
  text-shadow: 0 3px 0 #d9477f, 2px 2px 0 #d9477f, -2px 2px 0 #d9477f, 2px -1px 0 #d9477f, -2px -1px 0 #d9477f, 0 6px 12px rgba(217, 71, 127, .3); }
.logo .l2 { color: var(--lemon); }

/* HUD */
.hud { position: relative; z-index: 6; display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 16px;
  background: linear-gradient(180deg, var(--hud1), var(--hud2)); box-shadow: 0 4px 0 var(--hudshadow), var(--shadow); }
.goal { width: 250px; background: var(--card); border-radius: 18px; padding: 5px 14px 8px; }
.goal-top { display: flex; justify-content: space-between; font-size: 16px; font-family: Fredoka; }
.meter { height: 12px; border-radius: 10px; background: var(--pinkbg); overflow: hidden; margin-top: 4px; }
.meter i { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, #ffb3cf, #ff5f9b); transition: width .8s cubic-bezier(.3, 1.4, .5, 1); }
.coins { display: flex; gap: 7px; }
.coin { display: flex; align-items: center; gap: 6px; background: var(--card); border-radius: 99px; padding: 4px 13px 4px 6px; font-family: Fredoka; font-weight: 600; font-size: 17px; }
.coin span { font-size: 18px; }
.lvl { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #fff1a8, #ffc93c); font-size: 14px !important; color: #5a3a2e; }
.scenes { display: flex; gap: 4px; background: rgba(255, 255, 255, .45); padding: 4px; border-radius: 18px; }
body.night .scenes { background: rgba(0, 0, 0, .2); }
.scene-btn { white-space: nowrap; border: none; background: transparent; padding: 8px 16px; border-radius: 14px; font-family: Fredoka; font-weight: 600; font-size: 17px; color: var(--ink2); }
.scene-btn.on { background: var(--card); color: var(--pink2); box-shadow: 0 3px 0 var(--hudshadow); }
.icons { display: flex; gap: 6px; }
.icon-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--card); font-size: 21px; display: grid; place-items: center; box-shadow: 0 3px 0 var(--hudshadow); color: var(--ink2); font-weight: 800; font-family: Fredoka; }
.icon-btn:hover { transform: translateY(-1px); }
.badge { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; border-radius: 99px; background: var(--pink2); color: #fff; font-size: 12.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }
.scene { position: absolute; top: 76px; left: 0; right: 0; bottom: 0; }

/* ---------- shop: toolbar floats over the wall ---------- */
.toolbar { position: absolute; z-index: 7; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 8px; flex-wrap: nowrap; white-space: nowrap;
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow); max-width: calc(100% - 24px); }
.toolbar label { display: flex; align-items: center; gap: 8px; margin: 0; font-family: Fredoka; font-weight: 600; font-size: 16px; }
.toolbar select { width: auto; max-width: 250px; margin: 0; padding: 6px 10px; border-radius: 12px; font-weight: 700; font-size: 16px; }
.seg { display: flex; background: var(--soft); border-radius: 14px; padding: 3px; }
.seg button { border: none; background: transparent; padding: 6px 13px; border-radius: 11px; font-family: Fredoka; font-weight: 600; font-size: 16px; color: var(--ink2); }
.seg button.on { background: var(--card); color: var(--pink2); box-shadow: 0 2px 0 var(--line); }
.waiting { font-family: Fredoka; color: var(--ink2); font-size: 16px; padding-right: 6px; }

/* the shop fills the whole screen: the 1600×860 stage is scaled to fit and its wall/counter/floor reach far past its edges */
.stage-wrap { position: absolute; inset: 0; overflow: hidden; background: repeating-linear-gradient(90deg, var(--wall1) 0 40px, var(--wall2) 40px 80px); }
.bg-awning { position: absolute; left: 0; right: 0; top: 0; height: 60px; z-index: 3;
  background: repeating-linear-gradient(90deg, var(--awning) 0 56px, var(--awning2) 56px 112px);
  -webkit-mask: radial-gradient(circle 28px at 28px 30px, #000 98%, transparent) 0 0/56px 100% repeat-x, linear-gradient(#000, #000) 0 0/100% 30px no-repeat;
  mask: radial-gradient(circle 28px at 28px 30px, #000 98%, transparent) 0 0/56px 100% repeat-x, linear-gradient(#000, #000) 0 0/100% 30px no-repeat;
  filter: drop-shadow(0 4px 0 rgba(217, 71, 127, .25)); }
.lights { position: absolute; left: 0; right: 0; top: 56px; height: 26px; z-index: 3; opacity: 0; transition: opacity .6s; pointer-events: none;
  background: radial-gradient(circle 5px at 50% 50%, #fff3a8 0 55%, rgba(255, 243, 168, .35) 60%, transparent 100%) 0 0/56px 26px repeat-x; }
body.night .lights { opacity: 1; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { filter: brightness(1.5); } }
.stage { position: absolute; left: 50%; top: 0; width: 1600px; height: 860px; transform-origin: top center; z-index: 2; }
.stage img { user-select: none; -webkit-user-drag: none; }
.stage > .wide { position: absolute; left: -4000px; right: -4000px; }
.wall { top: -400px; height: 948px; background: repeating-linear-gradient(90deg, var(--wall1) 0 40px, var(--wall2) 40px 80px); z-index: 0; }
.floor { top: 708px; height: 3000px; background: repeating-conic-gradient(var(--floor1) 0 25%, var(--floor2) 0 50%) 0 0/70px 70px; z-index: 0; }
.counter { top: 520px; height: 190px; z-index: 3; pointer-events: none;
  background: linear-gradient(var(--counter1), var(--counter2)) 0 0/100% 28px no-repeat, repeating-linear-gradient(90deg, var(--front1) 0 46px, var(--front2) 46px 92px) 0 28px/100% 162px no-repeat;
  box-shadow: inset 0 33px 0 -28px var(--countershade), 0 6px 0 rgba(0, 0, 0, .06); }
.moon { position: absolute; left: 1100px; top: 60px; font-size: 64px; opacity: 0; transition: opacity .6s; filter: drop-shadow(0 0 16px #fff6b0); z-index: 1; }
body.night .moon { opacity: 1; }
.shelf { position: absolute; display: flex; align-items: flex-end; gap: 12px; padding: 0 16px; height: 96px; border-bottom: 14px solid var(--shelf); border-radius: 4px; }
.shelf img { height: 78px; }
.shelf.s1 { left: 1200px; top: 88px; } .shelf.s2 { left: 1210px; top: 214px; } .shelf.s2 img { height: 66px; }

.board { position: absolute; left: 36px; top: 92px; width: 340px; min-height: 280px; padding: 16px 18px 18px; background: var(--board);
  border: 12px solid var(--wood); border-radius: 12px; box-shadow: 0 8px 0 var(--wood2), var(--shadow); color: #f7f3e8; font-family: "Gochi Hand", cursive; }
.board-title { font-size: 30px; text-align: center; color: #ffe6f0; margin-bottom: 6px; }
.q { display: flex; gap: 10px; align-items: flex-start; font-size: 24px; line-height: 1.15; margin: 10px 0; cursor: pointer; }
.q:hover { color: #fff; } .q.done { color: #9fb8ad; text-decoration: line-through; }
.q-box { width: 23px; height: 23px; border: 2.5px solid currentColor; border-radius: 5px; flex: none; margin-top: 2px; display: grid; place-items: center; font-size: 17px; }
.q small { display: block; font-size: 19px; color: #c9d8d1; text-decoration: none; }
.lvlbar { margin-top: 12px; font-size: 21px; color: #ffe6f0; }
.lvlbar .meter { background: #44534c; height: 10px; } .lvlbar .meter i { background: linear-gradient(90deg, #fff1a8, #ffc93c); }

.kitchen { position: absolute; left: 410px; top: 96px; width: 340px; height: 340px; cursor: pointer; }
.kitchen-door { position: absolute; left: 10px; top: 40px; width: 240px; height: 300px; border-radius: 120px 120px 0 0; background: linear-gradient(#ffe9c9, #ffd9a8); border: 10px solid var(--shelf); box-shadow: inset 0 0 30px rgba(168, 107, 68, .25); }
body.night .kitchen-door { background: linear-gradient(#ffcf8a, #f5a95c); box-shadow: inset 0 0 40px rgba(255, 190, 90, .6), 0 0 50px rgba(255, 190, 90, .3); }
.kitchen-door span { position: absolute; top: -38px; left: 50%; transform: translateX(-50%); font-family: Fredoka; font-weight: 700; color: #fff; background: #ff8fb8; padding: 2px 14px; border-radius: 10px; font-size: 17px; letter-spacing: 1px; }
.baker { position: absolute; bottom: 0; } .baker.b1 { left: 14px; height: 270px; } .baker.b2 { left: 150px; height: 150px; }
.kitchen.busy .baker { animation: bake 1.2s ease-in-out infinite; } .kitchen.busy .baker.b2 { animation-delay: .3s; }
@keyframes bake { 50% { transform: translateY(-6px) rotate(-2deg); } }
.bubble { position: absolute; background: var(--card); color: var(--ink); border-radius: 18px; padding: 10px 14px; font-weight: 700; font-size: 18px; box-shadow: var(--shadow); line-height: 1.3; }
.kbubble { left: 262px; top: -6px; width: 215px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; z-index: 3; }
.kbubble::after { content: ""; position: absolute; left: -9px; top: 30px; border: 9px solid transparent; border-right-color: var(--card); border-left: 0; }

/* the OPEN / CLOSED sign (drawn, no picture) */
.shop-sign { position: absolute; left: 910px; top: 56px; width: 200px; border: none; background: none; padding: 0; transform-origin: 50% 0; animation: swing 3.4s ease-in-out infinite; z-index: 1; text-align: center; }
.shop-sign .rope { display: block; width: 110px; height: 36px; margin: 0 auto -4px; border: 5px solid var(--wood2); border-bottom: none; border-radius: 60px 60px 0 0; }
.shop-sign .plate { display: block; border-radius: 22px; padding: 10px 12px 12px; background: #fff; border: 6px solid #6fd9b5; box-shadow: 0 6px 0 #3fb58f, var(--shadow); }
.shop-sign b { display: block; font-family: Fredoka; font-weight: 700; font-size: 44px; letter-spacing: 3px; color: #2fae83; line-height: 1; }
.shop-sign small { display: block; font-weight: 800; font-size: 15.5px; color: #6b8f82; margin-top: 5px; }
.shop-sign.closed .plate { border-color: #ffb3b3; box-shadow: 0 6px 0 #e58a8a, var(--shadow); }
.shop-sign.closed b { color: #e2575f; } .shop-sign.closed small { color: #b98181; }
body.night .shop-sign .plate { background: #3b2d4c; }
@keyframes swing { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

.chef { position: absolute; left: 800px; top: 262px; height: 300px; z-index: 2; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .1)); transition: transform .3s; }
.chef.serve { transform: translateX(40px) rotate(4deg); }
.display { position: absolute; left: 1160px; top: 300px; width: 400px; z-index: 3; }
.display img { width: 100%; }
.display-tag { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); background: var(--card); border-radius: 99px; padding: 5px 16px; font-family: Fredoka; font-weight: 600; font-size: 20px; white-space: nowrap; box-shadow: var(--shadow); }
.counter-items { position: absolute; left: 0; right: 0; top: 520px; z-index: 4; }
.till { position: absolute; left: 1010px; top: -128px; height: 140px; }
.counter-cake { position: absolute; left: 640px; top: -122px; height: 132px; }

/* guests */
.guests { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.guest { position: absolute; bottom: 26px; width: 270px; display: flex; flex-direction: column; align-items: center; pointer-events: auto; cursor: pointer; transition: left .7s cubic-bezier(.3, 1.2, .5, 1), opacity .5s, transform .5s; }
.guest img.who { height: 250px; max-width: 290px; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .16)); transition: transform .2s; }
.guest:hover img.who { transform: translateY(-6px) scale(1.03); }
.guest.sel img.who { filter: drop-shadow(0 0 12px rgba(255, 111, 162, .95)); }
.guest.enter { animation: walkin .8s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes walkin { from { transform: translateX(360px); opacity: 0; } }
.guest.leave { transform: translate(700px, -30px) rotate(8deg); opacity: 0; pointer-events: none; }
.guest .gcake { position: absolute; bottom: 90px; right: 0; height: 76px; opacity: 0; transition: opacity .3s; }
.guest.leave .gcake { opacity: 1; }
.order { position: relative; background: var(--card); color: var(--ink); border-radius: 18px; padding: 10px 14px 11px; margin-bottom: 11px; width: 262px; text-align: center; box-shadow: var(--shadow); border: 3px solid var(--card); }
.order::after { content: ""; position: absolute; bottom: -12px; left: 50%; margin-left: -11px; border: 11px solid transparent; border-top-color: var(--card); border-bottom: 0; }
.order b { display: block; font-family: Fredoka; font-weight: 600; font-size: 21px; line-height: 1.15; max-height: 50px; overflow: hidden; }
.order small { display: block; color: var(--muted); font-size: 16px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order .want { position: absolute; top: -24px; right: -14px; width: 54px; height: 54px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow); font-size: 26px; }
.order .want img { height: 40px; }
.guest.need .order { border-color: #ffd98a; } .guest.vip .order { border-color: #ff9ec4; }
.guest.vip::before { content: "VIP 💖"; position: absolute; top: -32px; font-family: Fredoka; font-weight: 700; color: #fff; background: var(--pink2); padding: 2px 12px; border-radius: 99px; font-size: 17px; }
.coinpop { position: absolute; z-index: 9; font-family: Fredoka; font-weight: 700; font-size: 36px; color: #f5a300; text-shadow: 0 2px 0 #fff; animation: pop 1.2s ease-out forwards; pointer-events: none; }
@keyframes pop { to { transform: translateY(-110px); opacity: 0; } }
.delivery { position: absolute; left: 6px; top: 596px; z-index: 6; cursor: pointer; }
.delivery img { height: 150px; } .dbubble { left: 112px; top: -38px; width: 240px; }
.empty-shop { position: absolute; left: 360px; right: 360px; top: 720px; z-index: 6; text-align: center; background: var(--card); border-radius: 20px; padding: 14px 20px; box-shadow: var(--shadow); font-family: Fredoka; font-size: 20px; }

/* ---------- map scene ---------- */
#mapScene { display: grid; grid-template-columns: 350px 1fr; gap: 14px; padding: 14px; }
#mapScene.hidden { display: none !important; }
.map-side { background: var(--paper); border-radius: 24px; padding: 16px; overflow-y: auto; box-shadow: var(--shadow); }
.side-title { font-family: Fredoka; font-weight: 700; font-size: 24px; display: flex; justify-content: space-between; align-items: center; margin: 4px 2px; }
.side-title.small { font-size: 20px; margin-top: 20px; }
.layer { border-radius: 18px; padding: 10px 12px; margin-top: 8px; background: var(--card); border: 2px solid var(--line); cursor: pointer; }
.layer.on { border-color: #ffb3cf; background: var(--soft); }
.layer-top { display: flex; align-items: center; gap: 10px; }
.layer img { height: 46px; width: 46px; object-fit: contain; flex: none; }
.layer b { font-family: Fredoka; font-weight: 600; font-size: 19px; } .layer small { display: block; color: var(--muted); font-size: 14.5px; }
.layer .eye { margin-left: auto; font-size: 19px; opacity: .5; } .layer.on .eye { opacity: 1; }
.bar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: var(--line); margin: 8px 0 6px; } .bar i { display: block; height: 100%; }
.layer-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.layer-tools .pill { font-size: 14px; padding: 3px 11px; } .pill.yes { background: #eafff6; border-color: #9fe6cd; color: #1f7a5c; }
.map-box { position: relative; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: radial-gradient(ellipse at 50% 40%, #fef6ff, #f1e8ff 55%, #e3f4ff); }
body.night .map-box { background: radial-gradient(ellipse at 50% 40%, #2d2548, #221b38 60%, #1a1530); }
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.map-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 10px; align-items: flex-start; z-index: 3; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.search { position: relative; width: 330px; flex: none; }
.search input { border-radius: 99px; border-color: var(--card); box-shadow: var(--shadow); }
.search-res { position: absolute; top: 52px; left: 0; right: 0; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); max-height: 360px; overflow-y: auto; padding: 5px; }
.sr { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 11px; cursor: pointer; font-size: 16px; }
.sr:hover { background: var(--soft); } .sr small { margin-left: auto; color: var(--faint); }
.sr i, .cdot { width: 11px; height: 11px; border-radius: 50%; flex: none; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; background: var(--card); padding: 5px; border-radius: 16px; box-shadow: var(--shadow); }
.fbtn { border: none; background: transparent; padding: 6px 12px; border-radius: 11px; font-weight: 700; font-size: 15.5px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.fbtn.on { background: var(--pinkbg); color: var(--pink2); }
.zoom { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 7px; z-index: 3; }
.zoom button { width: 48px; height: 48px; border-radius: 15px; border: none; background: var(--card); box-shadow: var(--shadow); font-size: 22px; font-weight: 800; color: var(--pink2); }
.ob-card { position: absolute; left: 14px; bottom: 14px; z-index: 4; width: 360px; background: var(--card); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); }
.ob-card h3 { margin: 0 0 4px; } .ob-stats { display: flex; gap: 14px; font-size: 15.5px; margin: 8px 0 12px; } .ob-stats span { display: flex; align-items: center; gap: 5px; }
.tooltip { position: fixed; z-index: 30; pointer-events: none; background: var(--card); color: var(--ink); border-radius: 14px; padding: 9px 13px; font-size: 15.5px; max-width: 330px; box-shadow: var(--shadow); line-height: 1.4; }
.tooltip small { color: var(--muted); } .tip-stats { display: flex; gap: 12px; margin: 5px 0; font-size: 14.5px; } .tip-stats span { display: flex; align-items: center; gap: 5px; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; font-family: Fredoka; font-size: 24px; color: var(--pink2); z-index: 5; background: var(--paper); }

/* ---------- order ticket ---------- */
.ticket { position: fixed; top: 84px; right: 12px; bottom: 12px; width: 520px; z-index: 12; transform: translateX(580px); transition: transform .3s cubic-bezier(.3, 1.1, .5, 1);
  background: var(--paper); border-radius: 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.ticket.open { transform: none; }
#ticketBody { flex: 1; overflow-y: auto; padding: 0 22px; display: flex; flex-direction: column; }
.t-head { display: flex; gap: 14px; align-items: flex-end; margin: 0 -22px; padding: 18px 22px 14px; background: linear-gradient(180deg, var(--pinkbg), var(--soft)); border-bottom: 3px dashed #ffc2d9; position: relative; }
.t-head img { height: 116px; width: 116px; object-fit: contain; flex: none; }
.t-head h2 { font-size: 24px; line-height: 1.2; padding-right: 36px; }
.t-sub { font-size: 15.5px; color: var(--muted); line-height: 1.45; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: var(--card); margin: 6px 5px 0 0; }
.chip.soft { background: #fff1e0; color: #b45309; }
.t-close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--card); font-weight: 800; color: var(--pink2); box-shadow: var(--shadow); font-size: 17px; }
.card { background: var(--card); border-radius: 20px; padding: 12px 16px 14px; margin-top: 14px; border: 2px solid var(--line); }
.card-h { display: flex; justify-content: space-between; align-items: center; font-family: Fredoka; font-weight: 600; font-size: 20px; margin-bottom: 4px; }
.card-h small { font-family: Nunito; font-weight: 600; color: var(--faint); font-size: 14.5px; }
.field { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; margin-top: 8px; font-size: 15.5px; font-weight: 700; color: var(--ink2); }
.field input { padding: 9px 12px; font-size: 16.5px; }
.verify { font-size: 15px; color: var(--muted); margin-top: 8px; }
.links { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.letter input { font-weight: 700; margin-top: 8px; font-size: 17px; }
.letter textarea { margin-top: 8px; font-size: 17px; line-height: 29px; background: repeating-linear-gradient(180deg, var(--field) 0 28px, var(--soft) 28px 29px); }
.warn { background: #fff6e0; border: 2px solid #ffe0a3; color: #8a5a00; border-radius: 14px; padding: 9px 13px; margin-top: 10px; font-size: 15.5px; line-height: 1.5; }
body.night .warn { background: #4a3a1f; border-color: #7a5e2a; color: #ffe2a8; }
.plan { font-size: 15px; color: var(--muted); margin-top: 8px; }
.thread { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.msg { border-radius: 16px; padding: 10px 14px; background: var(--soft2); font-size: 16px; }
.msg.in { background: var(--soft); border: 2px solid #ffc2d9; }
.msg-h { font-size: 14px; color: var(--faint); font-weight: 700; } .msg pre, .preview pre { white-space: pre-wrap; font-family: inherit; margin: 4px 0 0; }
.t-foot { margin: 16px 0 14px; } .t-foot textarea { font-size: 16px; }
.t-actions { display: flex; gap: 10px; align-items: center; padding: 14px 22px; background: var(--card); border-top: 3px dashed #ffc2d9; }
.t-actions .skip { margin-left: auto; }

/* ---------- modal sheets ---------- */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(60, 30, 40, .35); padding: 18px; }
.sheet { position: relative; width: min(720px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; background: var(--paper); border-radius: 28px; padding: 26px 28px; box-shadow: var(--shadow-lg); animation: popin .25s cubic-bezier(.3, 1.5, .5, 1); }
.sheet.wide { width: min(980px, 100%); }
@keyframes popin { from { transform: scale(.9); opacity: 0; } }
.x { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--pinkbg); color: var(--pink2); font-weight: 800; z-index: 2; font-size: 17px; }
.sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; padding-right: 50px; }
.sheet-head .ic { width: 60px; height: 60px; border-radius: 18px; background: var(--pinkbg); display: grid; place-items: center; font-size: 32px; flex: none; }
.sheet-head h2 { margin: 0; } .sheet-head .hint { margin: 2px 0 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0; background: var(--soft); padding: 5px; border-radius: 16px; width: fit-content; max-width: 100%; }
.tab { border: none; background: transparent; padding: 8px 15px; border-radius: 12px; font-family: Fredoka; font-weight: 600; font-size: 17px; color: var(--ink2); }
.tab.on { background: var(--card); color: var(--pink2); box-shadow: 0 2px 0 var(--line); } .tab b { opacity: .6; margin-left: 4px; }
.reply-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.reply { display: flex; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); cursor: pointer; align-items: flex-start; }
.reply:hover { border-color: #ffb3cf; } .reply.unread { border-color: var(--pink); background: var(--soft); }
.reply img { height: 60px; width: 60px; object-fit: contain; flex: none; }
.reply-top { display: flex; justify-content: space-between; gap: 6px; font-size: 16.5px; } .reply-top small { color: var(--faint); white-space: nowrap; }
.reply-text { color: var(--muted); font-size: 15.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.variant { margin-top: 12px; } .vh { font-weight: 800; font-size: 15.5px; } .vh small { font-weight: 600; color: var(--faint); }
.variant input, .variant textarea { margin-top: 6px; }
.check-res, .preview { margin-top: 12px; background: var(--soft2); border-radius: 14px; padding: 12px 14px; font-size: 16px; line-height: 1.55; }
.inbox { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 11px 14px; margin-top: 10px; }
.inbox .grow { flex: 1; min-width: 0; } .inbox small { color: var(--muted); font-size: 15px; } .inbox input { width: 74px; padding: 6px 9px; }
.steps { font-size: 15.5px; background: var(--soft2); border-radius: 14px; padding: 10px 14px; margin-top: 10px; line-height: 1.55; } .steps:empty { display: none; } .steps ol { margin: 4px 0 0; padding-left: 20px; }
.health { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-top: 12px; }
.health h3 { margin: 0 0 6px; display: flex; justify-content: space-between; }
.grade { font-size: 14px; padding: 2px 10px; border-radius: 99px; } .gA { background: #dcfce7; color: #15803d; } .gB { background: #fef9c3; color: #854d0e; } .gC, .gD { background: #fee2e2; color: #b91c1c; }
.hc { font-size: 16px; margin: 6px 0; } .fix { font-size: 14.5px; color: var(--muted); margin-left: 24px; }
.trails { margin-top: 14px; font-size: 15.5px; color: var(--muted); background: var(--soft2); border-radius: 14px; padding: 12px 14px; line-height: 1.6; }
details summary { cursor: pointer; font-weight: 700; font-size: 16px; margin-top: 14px; color: var(--ink2); }
.chefs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.chef-pick { border: 3px solid transparent; background: var(--card); border-radius: 18px; padding: 8px; width: 116px; text-align: center; font-size: 15px; font-weight: 700; }
.chef-pick img { height: 88px; } .chef-pick.on { border-color: var(--pink); background: var(--soft); }
.help-cast { display: flex; justify-content: center; gap: 6px; margin-bottom: 6px; } .help-cast img { height: 104px; }
.help ol { padding-left: 22px; line-height: 1.6; font-size: 17.5px; } .help li { margin-bottom: 8px; }

/* ---------- level road ---------- */
#levelsScene { display: grid; grid-template-columns: 1fr 430px; gap: 14px; padding: 14px; }
#levelsScene.hidden { display: none !important; }
.road-wrap { position: relative; overflow-y: auto; border-radius: 26px; box-shadow: var(--shadow);
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .8) 0 3px, transparent 4px) 0 0/46px 46px, linear-gradient(180deg, #d9f5ff 0%, #ffe9f3 45%, #fff3d9 100%); }
body.night .road-wrap { background: radial-gradient(circle at 15% 20%, rgba(255, 246, 176, .85) 0 1.5px, transparent 2.5px) 0 0/46px 46px, linear-gradient(180deg, #151233 0%, #2a1f46 50%, #3a2750 100%); }
.road { position: relative; margin: 0 auto; width: 780px; }
.road svg.path { position: absolute; left: 0; top: 0; pointer-events: none; }
.deco { position: absolute; height: 68px; opacity: .9; pointer-events: none; }
.node { position: absolute; width: 380px; display: flex; align-items: center; gap: 14px; }
.node.right { flex-direction: row-reverse; text-align: right; }
.stop { width: 104px; height: 104px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative; border: 5px solid #fff; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff, #ffd2e3 55%, #ff9cc2); box-shadow: 0 6px 0 #e67aa6, 0 10px 20px rgba(217, 71, 127, .25); }
.stop img { width: 80px; height: 80px; object-fit: contain; }
.stop .num { position: absolute; top: -8px; left: -8px; width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: Fredoka; font-weight: 700; color: var(--pink2); box-shadow: 0 2px 0 #f5a9c7; font-size: 18px; }
.node.done .stop { background: radial-gradient(circle at 35% 30%, #fff, #c9f7e6 55%, #6fd9b5); box-shadow: 0 6px 0 #3fb58f, 0 10px 20px rgba(63, 181, 143, .25); }
.node.done .stop::after { content: "✓"; position: absolute; bottom: -6px; right: -6px; width: 36px; height: 36px; border-radius: 50%; background: #22c55e; color: #fff; display: grid; place-items: center; font-weight: 800; border: 3px solid #fff; font-size: 18px; }
.node.locked .stop { background: radial-gradient(circle at 35% 30%, #fff, #e9e4ea 55%, #c9c1cc); box-shadow: 0 6px 0 #b3a9b6; }
.node.locked .stop img { opacity: .5; filter: grayscale(1); }
.node.locked .stop::after { content: "🔒"; position: absolute; bottom: -6px; right: -6px; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 17px; }
.node.current .stop { animation: glow 1.8s ease-in-out infinite; width: 122px; height: 122px; }
@keyframes glow { 50% { box-shadow: 0 6px 0 #e67aa6, 0 0 0 12px rgba(255, 143, 184, .25); } }
.node .chef-here { position: absolute; height: 136px; top: -70px; }
.node:not(.right) .chef-here { left: -108px; } .node.right .chef-here { right: -108px; }
.info { background: var(--card); border-radius: 20px; padding: 11px 16px; box-shadow: var(--shadow); min-width: 0; flex: 1; }
.info b { font-family: Fredoka; font-weight: 600; font-size: 20px; display: block; }
.info small { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; }
.info .bar { margin: 7px 0 3px; }
.info .tools { display: flex; gap: 5px; margin-top: 6px; } .node.right .info .tools { justify-content: flex-end; }
.info .tools button { border: none; background: var(--soft); border-radius: 9px; padding: 3px 10px; font-size: 14.5px; color: var(--ink2); }
.bakers-here { display: inline-flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 800; color: #1f7a5c; background: #eafff6; padding: 2px 11px; border-radius: 99px; margin-top: 5px; }
.plan-card { background: var(--paper); border-radius: 24px; padding: 18px 20px; overflow-y: auto; box-shadow: var(--shadow); }
.calm { background: linear-gradient(135deg, #eafff6, #fff5f9); border-radius: 18px; padding: 14px 16px; margin: 12px 0; font-size: 16.5px; line-height: 1.55; color: #5a3a2e; }
body.night .calm { background: linear-gradient(135deg, #22403a, #3b2d4c); color: var(--ink); }
.pstat { margin-top: 14px; } .pstat .top { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }
.pstat .meter { height: 11px; margin-top: 5px; } .pstat .meter i { background: linear-gradient(90deg, #8fe3c8, #4fc7a0); }
.plan-list { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.plan-row { display: flex; align-items: center; gap: 8px; font-size: 16px; background: var(--card); border-radius: 14px; padding: 8px 12px; }
.plan-row .st { margin-left: auto; font-weight: 700; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.plan-row.now { border: 2px solid #9fe6cd; } .plan-row.now .st { color: #2fae83; }
.unlock-pop { text-align: center; } .unlock-pop .cast { display: flex; justify-content: center; gap: 6px; margin: 10px 0; } .unlock-pop .cast img { height: 124px; }
.big-level { font-family: Fredoka; font-size: 46px; color: var(--pink2); margin: 4px 0; }

/* login, toast, confetti */
.login { position: fixed; inset: 0; display: grid; place-items: center; z-index: 40; }
.login-card { width: min(430px, 92vw); background: var(--card); border-radius: 30px; padding: 30px 32px; text-align: center; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; }
.login-chef { height: 170px; margin: -100px auto 0; }
.login-card .logo { font-size: 46px; } .login-card p { margin: 0 0 6px; color: var(--muted); font-size: 18px; }
.err { color: #e2575f; font-weight: 700; min-height: 20px; font-size: 15.5px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; background: var(--card); color: var(--ink); border-radius: 99px; padding: 12px 24px; font-family: Fredoka; font-weight: 600; font-size: 19px; box-shadow: var(--shadow-lg); display: flex; gap: 14px; align-items: center; animation: popin .25s; max-width: 92vw; }
.toast.bad { background: #ffe8e8; color: #7a2a2a; }
.toast-undo { border: none; background: var(--pinkbg); color: var(--pink2); font-weight: 700; padding: 4px 14px; border-radius: 99px; }
.confetti { position: fixed; top: -12px; width: 11px; height: 15px; z-index: 60; border-radius: 3px; animation: fall 2.3s linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

@media (max-width: 1300px) { .coins .coin:nth-child(n+3) { display: none; } .goal { width: 190px; } .logo { font-size: 27px; } .scene-btn { padding: 8px 11px; font-size: 16px; } }
@media (max-width: 900px) {
  body { overflow: auto; } .hud { flex-wrap: wrap; height: auto; padding: 8px; } .goal { order: 9; width: 100%; } .scene { top: 180px; }
  #mapScene, #levelsScene { grid-template-columns: 1fr; } .map-side { max-height: 260px; } .ticket { left: 6px; right: 6px; width: auto; top: 80px; }
  .toolbar { top: 6px; }
}

/* v5: smaller sign text, hover explanations, guided tour, stat tiles, dictionary */
.shop-sign b { font-size: 28px; letter-spacing: 2px; } .shop-sign small { font-size: 13.5px; }
.shop-sign { width: 180px; }
#display, #till, .chef, .delivery, .board-title { cursor: pointer; }
.gtip { position: fixed; z-index: 70; max-width: 360px; pointer-events: auto !important; padding-right: 40px !important; background: var(--card); color: var(--ink); border-radius: 16px; padding: 11px 14px; box-shadow: var(--shadow-lg); font-size: 15.5px; line-height: 1.45; pointer-events: none; border: 2px solid var(--pinkbg); }
.gtip .gt { display: block; font-family: Fredoka; font-weight: 600; font-size: 17px; color: var(--pink2); margin-bottom: 3px; }
.tour { position: fixed; inset: 0; z-index: 80; }
.tour-hole { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(40, 20, 35, .62); transition: all .35s cubic-bezier(.3, 1.1, .5, 1); pointer-events: none; outline: 3px solid #ffb3cf; }
.tour-card { position: fixed; width: 390px; background: var(--card); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow-lg); transition: left .35s, top .35s; }
.tour-card h3 { margin: 4px 0 6px; } .tour-card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.tour-step { font-size: 13px; font-weight: 800; color: var(--pink2); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 12px; text-align: center; }
.stat span { font-size: 26px; display: block; } .stat b { font-family: Fredoka; font-size: 28px; display: block; } .stat small { color: var(--muted); font-size: 14px; }
.dict { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 15.5px; }
.dict td { background: var(--card); padding: 9px 12px; vertical-align: top; line-height: 1.45; }
.dict td:first-child { border-radius: 12px 0 0 12px; font-family: Fredoka; font-weight: 600; white-space: nowrap; width: 1%; }
.dict td:last-child { border-radius: 0 12px 12px 0; color: var(--ink2); }
.muted { color: var(--muted); font-weight: 600; }

.ip-x { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--pinkbg); color: var(--pink2); font-weight: 800; font-size: 13px; }
.gtip .row { margin-top: 10px; }
[data-pop] { cursor: pointer; }

/* ================= PHONE LAYOUT ================= */
.m-shop, .m-groups, .m-done { display: none; }
@media (max-width: 760px) {
  body { overflow: auto; font-size: 17px; }
  .hud { position: sticky; top: 0; flex-wrap: wrap; height: auto; gap: 8px; padding: 10px 12px 12px; border-radius: 0 0 22px 22px; }
  .hud .logo { font-size: 24px; } .hud { flex-wrap: wrap; }
  .goal { order: 9; width: 100%; padding: 6px 14px 9px; }
  .coins { order: 8; width: 100%; justify-content: space-between; } .coins .coin { display: flex !important; flex: 1; justify-content: center; }
  .icons { margin-left: auto; gap: 5px; flex-wrap: nowrap; } .icon-btn { width: 42px; height: 42px; font-size: 19px; flex: none; } #fsBtn { display: none; }
  .hud > .spacer { display: none; }
  /* scene tabs become a thumb-friendly bottom bar */
  .scenes { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; border-radius: 22px 22px 0 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); justify-content: space-around; }
  body.night .scenes { background: var(--card); }
  .scene-btn { flex: 1; font-size: 16px; padding: 10px 6px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .scene-btn.on { background: var(--pinkbg); box-shadow: none; }
  .scene { position: static; padding-bottom: 96px; }
  #shopScene { display: block; padding: 0; } #shopScene.hidden { display: none !important; }
  .stage-wrap { display: none; }
  .m-shop { display: block; padding: 12px 12px 104px; } .m-shop.hidden { display: none !important; }
  #shopScene > .toolbar { display: none; }
  .m-controls .toolbar { position: static; transform: none; display: flex; flex-wrap: wrap; white-space: normal; max-width: none; padding: 10px; gap: 8px; }
  .m-controls .toolbar select { max-width: none; flex: 1 1 100%; font-size: 17px; padding: 11px 12px; }
  .m-controls .seg { flex: 1 1 100%; } .m-controls .seg button { flex: 1; font-size: 17px; padding: 10px; }
  .m-controls .waiting { flex: 1 1 100%; text-align: center; font-size: 16px; }
  .m-hero { display: flex; align-items: center; gap: 12px; background: repeating-linear-gradient(90deg, var(--wall1) 0 30px, var(--wall2) 30px 60px); border-radius: 24px; padding: 12px 14px; box-shadow: var(--shadow); }
  .m-chef { height: 92px; flex: none; }
  .m-hero-txt { flex: 1; min-width: 0; } .m-hero-txt b { font-family: Fredoka; font-size: 21px; display: block; } .m-hero-txt small { color: var(--muted); font-size: 15px; }
  .m-sign { border: 5px solid #6fd9b5; background: #fff; border-radius: 18px; padding: 8px 12px; box-shadow: 0 4px 0 #3fb58f; flex: none; }
  .m-sign b { display: block; font-family: Fredoka; font-size: 20px; color: #2fae83; } .m-sign small { color: #6b8f82; font-weight: 800; font-size: 13px; }
  .m-sign.closed { border-color: #ffb3b3; box-shadow: 0 4px 0 #e58a8a; } .m-sign.closed b { color: #e2575f; } .m-sign.closed small { color: #b98181; }
  body.night .m-sign { background: #3b2d4c; }
  .m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
  .m-tile { border: none; background: var(--card); border-radius: 20px; padding: 12px 10px; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; color: var(--ink); }
  .m-tile span { grid-row: span 2; font-size: 32px; } .m-tile b { font-family: Fredoka; font-size: 26px; line-height: 1; } .m-tile small { color: var(--muted); font-size: 15px; font-weight: 700; }
  .m-controls { margin-top: 12px; }
  .m-guest { margin-top: 14px; background: var(--card); border-radius: 26px; padding: 16px; box-shadow: var(--shadow); text-align: center; position: relative; }
  .m-guest .m-order { background: var(--soft); border-radius: 18px; padding: 10px 12px; margin-bottom: 6px; }
  .m-guest .m-order b { display: block; font-family: Fredoka; font-size: 23px; line-height: 1.2; }
  .m-guest .m-order small { display: block; color: var(--muted); font-size: 16px; margin-top: 3px; }
  .m-guest img.m-who { height: 190px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .14)); }
  .m-guest .m-tag { display: inline-block; font-family: Fredoka; font-weight: 700; color: #fff; background: var(--pink2); padding: 3px 14px; border-radius: 99px; font-size: 16px; margin-bottom: 8px; }
  .m-guest .m-btns { display: flex; gap: 10px; margin-top: 10px; } .m-guest .m-btns .candy { flex: 1; font-size: 18px; padding: 14px 10px; white-space: nowrap; } .m-guest .m-btns .candy:first-child { flex: 2; }
  .m-guest.leave { animation: mleave .45s ease-in forwards; }
  @keyframes mleave { to { transform: translateX(110%) rotate(6deg); opacity: 0; } }
  .m-queue { display: flex; gap: 10px; overflow-x: auto; padding: 12px 2px 4px; }
  .m-q { flex: none; width: 96px; border: none; background: var(--card); border-radius: 18px; padding: 8px 6px; box-shadow: var(--shadow); color: var(--ink); }
  .m-q img { height: 62px; } .m-q small { font-size: 13px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .m-card { margin-top: 14px; background: var(--board); border-radius: 22px; padding: 14px 16px; color: #f7f3e8; font-family: "Gochi Hand", cursive; box-shadow: var(--shadow); }
  .m-card-h { font-size: 26px; color: #ffe6f0; margin-bottom: 4px; }
  .m-card .q { font-size: 23px; }
  /* levels: a simple vertical list */
  #levelsScene { display: block; padding: 12px; } #levelsScene.hidden { display: none !important; }
  .road-wrap { overflow: visible; padding: 10px; } .road { width: auto !important; height: auto !important; }
  .road svg.path, .road .deco, .node .chef-here { display: none; }
  .road .node { position: relative !important; left: auto !important; top: auto !important; width: 100%; margin: 12px 0; flex-direction: row !important; text-align: left !important; }
  .road .node .info .tools { justify-content: flex-start !important; }
  .stop { width: 84px !important; height: 84px !important; } .stop img { width: 62px; height: 62px; }
  .plan-card { margin-top: 14px; }
  /* map: full screen, groups slide up */
  #mapScene { display: block; padding: 0; } #mapScene.hidden { display: none !important; }
  .map-box { height: calc(100vh - 230px); border-radius: 0; }
  .map-side { position: fixed; z-index: 16; left: 0; right: 0; bottom: 0; max-height: 70vh; border-radius: 24px 24px 0 0; transform: translateY(105%); transition: transform .3s; padding-bottom: 100px; }
  .map-side.open { transform: none; }
  .m-done { display: block; float: right; font-size: 17px; padding: 8px 16px; position: sticky; top: 0; z-index: 2; }
  .m-groups { display: inline-block; flex: none; }
  .map-top { flex-wrap: wrap; } .search { width: auto; flex: 1; } .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .fbtn { white-space: nowrap; font-size: 15px; padding: 8px 12px; }
  .zoom button { width: 52px; height: 52px; } .ob-card { left: 8px; right: 8px; width: auto; bottom: 96px; }
  /* ticket, sheets and popups: full screen / bottom sheets with big buttons */
  .ticket { top: 0; left: 0; right: 0; bottom: 0; width: auto; border-radius: 0; z-index: 30; transform: translateY(105%); }
  .ticket.open { transform: none; }
  .t-head img { height: 90px; width: 90px; } .t-head h2 { font-size: 21px; }
  .field { grid-template-columns: 1fr; gap: 4px; } .field input { font-size: 17px; padding: 12px; }
  .t-actions { flex-wrap: wrap; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); } .t-actions .candy { flex: 1; font-size: 18px; padding: 14px 12px; }
  .t-actions .skip { margin-left: 0; flex-basis: 100%; }
  .modal { padding: 0; align-items: end; } .sheet, .sheet.wide { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; padding: 22px 18px calc(28px + env(safe-area-inset-bottom)); }
  .grid2 { grid-template-columns: 1fr; } .tabs { width: 100%; } .tab { flex: 1; font-size: 16px; padding: 10px 8px; }
  .reply-list { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; }
  .gtip { left: 10px !important; right: 10px !important; top: auto !important; bottom: 100px !important; max-width: none; font-size: 17px; padding: 16px 44px 16px 16px !important; }
  .gtip .row .candy, .gtip .row .pill { font-size: 17px; padding: 11px 16px; }
  .tour-card { left: 10px !important; right: 10px !important; width: auto; top: auto !important; bottom: 100px !important; }
  .toast { bottom: 100px; font-size: 17px; }
  .dict td:first-child { white-space: normal; }
}

/* ---------- Gmail-style email editor ---------- */
.sheet.gmail { width: min(640px, 100%); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.sheet.gmail > .x { top: 8px; right: 10px; width: 36px; height: 36px; font-size: 16px; }
.gm { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.gm-top { background: var(--pinkbg); padding: 14px 56px 14px 20px; font-family: Fredoka; font-size: 19px; }
.gm-steps { display: flex; gap: 6px; padding: 10px 14px 6px; overflow-x: auto; }
.gm-step { flex: 1; min-width: 118px; border: 2px solid transparent; background: var(--soft); border-radius: 14px; padding: 7px 10px; text-align: left; color: var(--ink); cursor: pointer; font: inherit; }
.gm-step b { display: block; font-size: 16px; } .gm-step small { display: block; font-size: 13px; color: var(--muted); }
.gm-step.on { border-color: var(--pink2); background: var(--card); }
.gm-line { display: flex; align-items: center; gap: 10px; margin: 0 20px; border-bottom: 1px solid var(--line, rgba(0,0,0,.09)); min-height: 46px; }
.gm-line > span { color: var(--muted); font-size: 16px; min-width: 58px; }
.gm-line input { border: none !important; box-shadow: none !important; background: transparent !important; padding: 10px 0 !important; font-size: 17px; flex: 1; outline: none; margin: 0; }
.gm-to { font-size: 16px; } .gm-to small { color: var(--muted); margin-left: 6px; font-size: 13px; }
.gm-body { border: none !important; box-shadow: none !important; background: transparent !important; resize: none; outline: none; font-size: 17px; line-height: 1.55;
  padding: 14px 20px !important; margin: 0; min-height: 300px; height: 42vh; font-family: Nunito, sans-serif; }
.gm-blanks { margin: 0 16px 8px; background: #fff4d6; color: #7a5400; border-radius: 12px; padding: 9px 12px; font-size: 15px; }
body.night .gm-blanks { background: #4a3a17; color: #ffe2a0; }
.gm-link { border: none; background: none; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 0 0 0 4px; }
.gm-out:empty { display: none; } .gm-out { margin: 0 16px 8px; max-height: 30vh; overflow-y: auto; }
.gm-note, .gm-prev { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.gm-prev small { display: block; color: var(--muted); } .gm-prev pre { white-space: pre-wrap; font-family: Nunito, sans-serif; margin: 6px 0 0; font-size: 15px; }
.gm-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px 14px; border-top: 1px solid var(--line, rgba(0,0,0,.09)); flex-wrap: wrap; }
.gm-save { background: #0b57d0; color: #fff; border: none; border-radius: 99px; padding: 11px 26px; font: 700 17px Nunito, sans-serif; cursor: pointer; }
.gm-save:hover { background: #0842a0; }
.gm-ic { border: none; background: transparent; color: var(--ink); border-radius: 99px; padding: 9px 12px; font: 700 15px Nunito, sans-serif; cursor: pointer; }
.gm-ic:hover, .gm-ic.on { background: var(--soft); }
.gm-menu { position: relative; }
.gm-drop { position: absolute; bottom: 110%; left: 0; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; z-index: 5; }
.gm-drop button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 9px 12px; border-radius: 10px; font: 600 15px Nunito, sans-serif; color: var(--ink); cursor: pointer; }
.gm-drop button:hover { background: var(--soft); }
.gm-bar .grow { flex: 1; }
@media (max-width: 760px) {
  .sheet.gmail { max-height: 94vh; height: 94vh; }
  .gm-body { height: auto; flex: 1; min-height: 160px; }
  .gm-step { min-width: 104px; }
  .gm-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .gm-save { flex: 1 1 100%; order: 9; padding: 13px; }
}
.gm { overflow-y: auto; } .gm > * { flex: none; }
.gm-body { height: 38vh; min-height: 160px; }
.gm-bar { position: sticky; bottom: 0; background: var(--paper); }
@media (max-width: 760px) { .gm-body { height: 46vh; flex: none; } }
.gm-card { padding: 0 !important; overflow: hidden; flex: none; }
.gm-card .gm-top { font-size: 17px; padding: 12px 16px; } .gm-card .gm-top small { font-family: Nunito; font-size: 13px; color: var(--muted); margin-left: 6px; font-weight: 600; }
.gm-card .gm-line { margin: 0 16px; } .gm-card .gm-body { height: auto; min-height: 280px; padding: 12px 16px !important; }
.gm-card > .plan, .gm-card > .warn { margin: 0 12px 12px; }
@media (max-width: 760px) { .gm-to small { display: none; } }

/* ---------- 📋 My day ---------- */
#plannerScene { overflow-y: auto; }
.planner { max-width: 880px; margin: 0 auto; padding: 18px 16px 60px; display: flex; flex-direction: column; gap: 16px; }
.scene-btn { position: relative; } .scene-btn .badge { position: absolute; top: -4px; right: -4px; }
.pl-hero { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 28px; padding: 16px 20px; box-shadow: var(--shadow); border: 3px solid var(--pink2); }
.pl-hero.calm { border-color: #7fd3a8; }
.pl-hero img { width: 92px; height: 92px; object-fit: contain; flex: none; }
.pl-hero h2 { margin: 0 0 4px; font-family: Fredoka; font-size: 27px; } .pl-hero p { margin: 0; font-size: 18px; color: var(--muted); } .pl-hero p b { color: var(--ink); }
.grow { flex: 1; min-width: 0; }
.pl-shop { flex: none; border: none; background: var(--soft); border-radius: 20px; padding: 10px 14px; display: grid; justify-items: center; gap: 3px; cursor: pointer; color: var(--ink); font: inherit; }
.pl-shop b { font-family: Fredoka; font-size: 16px; } .pl-shop small { font-size: 13px; color: var(--muted); }
.sw { width: 50px; height: 28px; border-radius: 99px; background: #d9cfd3; position: relative; flex: none; transition: background .2s; display: inline-block; }
.sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.on > .sw { background: #3fbf7f; } .on > .sw i { left: 25px; }
.pl-card { background: var(--card); border-radius: 26px; padding: 18px 20px; box-shadow: var(--shadow); }
.pl-card h3 { margin: 0 0 10px; font-family: Fredoka; font-size: 22px; } .pl-card h3 small { font-family: Nunito; font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.pl-card .hint { font-size: 15px; }
.pl-need { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--soft); margin-bottom: 8px; }
.pl-need b { display: block; font-size: 17px; } .pl-need small { color: var(--muted); font-size: 15px; }
.pl-ic { font-size: 28px; flex: none; width: 40px; text-align: center; }
.pl-need .candy { flex: none; font-size: 16px; padding: 10px 16px; }
.pl-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pl-people .chip { border: none; background: var(--card); border-radius: 99px; padding: 5px 12px; font: 700 14px Nunito; color: var(--ink); cursor: pointer; }
.pl-allclear, .pl-empty { background: #e9f8ef; color: #1f6b43; border-radius: 18px; padding: 16px; font-size: 17px; text-align: center; }
body.night .pl-allclear, body.night .pl-empty { background: #1e3a2b; color: #aee8c6; }
.pl-day { margin-top: 12px; } .pl-day-h { font-family: Fredoka; font-size: 18px; margin-bottom: 6px; } .pl-day-h small { font-family: Nunito; color: var(--muted); font-size: 14px; }
.pl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; }
.pl-row:nth-child(even) { background: var(--soft); }
.pl-row img { width: 44px; height: 44px; object-fit: contain; cursor: pointer; flex: none; } .pl-row .grow { cursor: pointer; }
.pl-row b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pl-row small { color: var(--muted); font-size: 14px; }
.pl-btn { flex: none; border: 2px solid var(--line, rgba(0,0,0,.08)); background: var(--card); border-radius: 99px; padding: 7px 12px; font: 700 14px Nunito; color: var(--ink); cursor: pointer; }
.pl-btn:hover { background: var(--pinkbg); }
.pl-more { border: none; background: none; font: 800 15px Nunito; color: var(--pink2); cursor: pointer; padding: 8px 10px; }
.pl-auto { border-radius: 18px; background: var(--soft); padding: 12px; margin-bottom: 10px; }
.pl-auto-h { font-family: Fredoka; font-size: 18px; margin-bottom: 6px; }
.pl-sw { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none; background: var(--card); border-radius: 14px; padding: 10px 12px; margin-top: 6px; cursor: pointer; color: var(--ink); font: inherit; }
.pl-sw b { display: block; font-size: 16px; } .pl-sw small { color: var(--muted); font-size: 14px; }
.pl-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pl-stats > div { background: var(--soft); border-radius: 18px; padding: 12px 14px; } .pl-stats b { display: block; font-family: Fredoka; font-size: 28px; } .pl-stats small { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .planner { padding: 12px 12px 110px; }
  .pl-hero { flex-wrap: wrap; padding: 14px; } .pl-hero img { width: 64px; height: 64px; } .pl-hero h2 { font-size: 23px; }
  .pl-shop { width: 100%; grid-template-columns: auto 1fr; justify-items: start; align-items: center; column-gap: 12px; } .pl-shop .sw { grid-row: span 2; }
  .pl-need { flex-wrap: wrap; } .pl-need .candy { width: 100%; }
  .pl-btn span { display: none; } .pl-btn { padding: 9px 11px; font-size: 17px; }
  .pl-stats { grid-template-columns: 1fr; }
  .scene-btn { font-size: 13px; padding: 8px 2px; }
}
@media (max-width: 760px) {
  .pl-row { flex-wrap: wrap; row-gap: 6px; }
  .pl-row .grow { flex: 1 1 calc(100% - 60px); } .pl-row b { white-space: normal; }
  .pl-row .pl-btn:first-of-type { margin-left: 54px; }
  .pl-btn span { display: inline; font-size: 14px; } .pl-btn { padding: 8px 12px; font-size: 14px; }
}

/* ---------- phone: big-thumb pass (every label ≥15px, every tap target ≥44px, inputs ≥17px so iOS never zooms) ---------- */
@media (max-width: 760px) {
  body { -webkit-text-size-adjust: 100%; }
  small, .hint, .t-sub, .verify { font-size: 15px !important; line-height: 1.4; }
  .hint { font-size: 16px !important; }
  input, select, textarea { font-size: 17px !important; min-height: 48px; }
  textarea { min-height: 96px; }
  input[type=checkbox], input[type=radio] { width: 26px !important; height: 26px !important; min-height: 0 !important; flex: none; margin: 0; }
  label.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; padding: 6px 0; }
  .pill, .candy, .tab, .fbtn, .pl-btn, .gm-ic, .chip, .pl-people .chip { min-height: 46px; font-size: 16px !important; }
  .candy.mini { min-height: 44px; padding: 10px 16px; font-size: 16px !important; }
  .pill { padding: 10px 16px; display: inline-flex; align-items: center; }
  .x, #sx { width: 46px !important; height: 46px !important; font-size: 20px !important; }
  .tabs { gap: 6px; } .tab { flex: 1 1 30%; padding: 8px 6px; }
  .m-done { font-size: 17px !important; padding: 10px 20px !important; }
  .fbtn { padding: 8px 14px; }
  .q { min-height: 44px; padding: 8px 4px; font-size: 18px; } .q small { font-size: 15px !important; }
  .road button, .level-node button, .node button { min-height: 44px; padding: 8px 14px; font-size: 16px; }
  .bakers-here, .st { font-size: 15px !important; }
  .t-foot .row, .links { gap: 8px; flex-wrap: wrap; }
  #oEditLetters { display: inline-block; padding: 8px 2px; font-size: 16px; }
  a { text-underline-offset: 3px; }
  /* bottom tab bar: bigger and easier to hit */
  .scenes { padding-top: 6px; }
  .scene-btn { min-height: 60px; font-size: 14px !important; line-height: 1.15; gap: 3px; }
  .scene-btn::first-letter { font-size: 22px; }
  .scene { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .m-shop { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  .planner { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  /* notch / home-bar safe areas (matters inside the iPhone app) */
  .hud { padding-top: calc(10px + env(safe-area-inset-top)); }
  .ticket { padding-top: env(safe-area-inset-top); }
  .toast, .gtip { font-size: 17px; }
}
/* inside the iPhone app: no fullscreen button (the app is already full screen) */
body.in-app #fsBtn { display: none !important; }
.scene-btn i { font-style: normal; margin-right: 5px; }
@media (max-width: 760px) {
  .scene-btn::first-letter { font-size: inherit; }
  .scene-btn { flex-direction: column; justify-content: center; font-size: 14px !important; font-weight: 800; }
  .scene-btn i { display: block; font-size: 25px; line-height: 1; margin: 0 0 3px; }
  .scene-btn .long { display: none; }
  .scene-btn .badge { top: 2px; right: 14%; }
}

/* ======================================================================
   Phone polish (v18): one spacing system everywhere.
   page gutter 14px · gap between cards 12px · card padding 16px · card radius 22px
   ====================================================================== */
.short { display: none; }
.pl-acts { display: flex; gap: 8px; flex: none; }
@media (max-width: 760px) {
  :root { --gut: 14px; --gap: 12px; --pad: 16px; --rad: 22px; }
  .short { display: inline; } .t-actions .long, .skip .long { display: none; }

  /* header: compact, one tidy block */
  .hud { padding: calc(8px + env(safe-area-inset-top)) var(--gut) 12px; gap: 10px; border-radius: 0 0 26px 26px; box-shadow: 0 6px 18px rgba(214, 90, 140, .12); }
  .hud .logo { font-size: 25px; line-height: 1; }
  .icons { gap: 6px; } .icon-btn { width: 40px; height: 40px; font-size: 18px; }
  .goal { padding: 9px 14px 10px; border-radius: 16px; box-shadow: none; }
  .goal-top { font-size: 15px; } .goal .meter { height: 8px; margin-top: 6px; }

  /* every scene: same gutter and rhythm */
  .m-shop { display: flex !important; flex-direction: column; gap: var(--gap); padding: var(--gap) var(--gut) calc(112px + env(safe-area-inset-bottom)); }
  .m-shop.hidden { display: none !important; }
  .m-shop > * { margin: 0 !important; }

  /* shop hero: name + level on the left, a small open/closed switch on the right */
  .m-hero { padding: 12px 14px; gap: 12px; border-radius: var(--rad); }
  .m-chef { height: 64px; width: 64px; object-fit: contain; flex: none; }
  .m-hero-txt b { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-hero-txt small { display: block; margin-top: 2px; }
  .m-sign { border-width: 3px; border-radius: 99px; padding: 8px 14px; box-shadow: 0 3px 0 #3fb58f; display: flex; flex-direction: column; align-items: center; min-width: 92px; }
  .m-sign.closed { box-shadow: 0 3px 0 #e58a8a; }
  .m-sign b { font-size: 17px; line-height: 1.1; } .m-sign small { font-size: 12px !important; line-height: 1.1; }

  .m-tiles { gap: 10px; }
  .m-tile { padding: 12px 14px; border-radius: 20px; column-gap: 12px; row-gap: 2px; min-height: 76px; align-content: center; }
  .m-tile b { align-self: end; } .m-tile small { align-self: start; line-height: 1.2; }

  .m-controls .toolbar { padding: 12px; gap: 10px; border-radius: var(--rad); }
  .m-controls .toolbar select { min-height: 50px; border-radius: 14px; }
  .m-controls .seg { border-radius: 14px; } .m-controls .seg button { min-height: 46px; border-radius: 12px; }
  .m-controls .waiting { flex-basis: 100%; text-align: center; margin: 0; }

  .m-guest { padding: var(--pad); border-radius: var(--rad); }
  .m-guest .m-tag { margin-bottom: 10px; }
  .m-guest .m-order { padding: 10px 14px; margin-bottom: 4px; border-radius: 16px; }
  .m-guest img.m-who { height: 170px; margin: 4px 0; }
  .m-guest .m-btns { margin-top: 8px; }

  /* guest queue: fills the row when there are few, scrolls when there are many */
  .m-queue { display: flex; gap: 10px; padding: 2px 0 4px; scrollbar-width: none; }
  .m-queue::-webkit-scrollbar { display: none; }
  .m-q { flex: 1 0 96px; width: auto; border-radius: 18px; padding: 10px 6px 8px; }

  .m-card { padding: 14px var(--pad) 16px; border-radius: var(--rad); }
  .m-card-h { font-size: 24px; margin-bottom: 2px; }

  /* My day: flat items, no card-in-card padding pile-up */
  .planner { gap: var(--gap); padding: var(--gap) var(--gut) calc(112px + env(safe-area-inset-bottom)); }
  .pl-hero { padding: 14px; gap: 12px; border-radius: var(--rad); border-width: 2px; }
  .pl-hero img { width: 56px; height: 56px; }
  .pl-hero h2 { font-size: 22px; } .pl-hero p { font-size: 16px; }
  .pl-shop { padding: 10px 14px; border-radius: 16px; }
  .pl-card { padding: var(--pad); border-radius: var(--rad); }
  .pl-card h3 { font-size: 20px; margin-bottom: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
  .pl-card h3 small { margin: 0; }
  .pl-need { display: grid; grid-template-columns: 36px 1fr; gap: 2px 12px; align-items: start; padding: 12px; border-radius: 16px; }
  .pl-need .pl-ic { width: 36px; font-size: 26px; grid-row: span 2; }
  .pl-need .candy { grid-column: 2; justify-self: start; width: auto !important; margin-top: 8px; min-height: 42px; padding: 9px 18px; font-size: 15px !important; }
  .pl-need b { font-size: 16px; }
  .pl-day { margin-top: 14px; } .pl-day-h { font-size: 17px; margin-bottom: 4px; }
  .pl-row { display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; align-items: center; padding: 10px; border-radius: 16px; }
  .pl-row img { width: 44px; height: 44px; }
  .pl-row .grow { min-width: 0; }
  .pl-acts { grid-column: 2; flex-wrap: wrap; gap: 6px; }
  .pl-row .pl-btn:first-of-type { margin-left: 0; }
  .pl-btn { min-height: 38px !important; padding: 6px 12px !important; font-size: 14px !important; }
  .pl-auto { padding: 12px; border-radius: 16px; } .pl-sw { padding: 10px 12px; }
  .pl-stats { gap: 10px; } .pl-stats > div { padding: 12px 14px; border-radius: 16px; }

  /* Levels: smaller circles, centred with their card */
  .road-wrap { padding: var(--gap) var(--gut) 0; border-radius: 0; }
  .road .node { margin: 0 0 var(--gap); gap: 12px; align-items: center; }
  .road .stop, .node.current .stop { width: 72px !important; height: 72px !important; border-width: 4px; }
  .road .stop img { max-width: 52px; max-height: 52px; }
  .road .stop .num { width: 26px; height: 26px; font-size: 14px; top: -4px; left: -4px; }
  .node.done .stop::after, .node.locked .stop::after { width: 26px; height: 26px; font-size: 13px; bottom: -4px; right: -4px; border-width: 2px; }
  .road .info { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 18px; }
  .road .info h3, .road .info b:first-child { font-size: 18px; }
  #levelsScene { padding: 0 0 calc(112px + env(safe-area-inset-bottom)) !important; }
  .plan-card { margin: var(--gap) var(--gut) 0; padding: var(--pad); border-radius: var(--rad); }
  .plan-card h2 { font-size: 23px; line-height: 1.15; }

  /* Map: fills the space down to the tab bar */
  #mapScene { padding: 0 !important; }
  .map-box { height: calc(100dvh - var(--hudH, 150px) - 84px - env(safe-area-inset-bottom)); border-radius: 0; box-shadow: none; }
  .map-top { top: 12px; left: var(--gut); right: var(--gut); gap: 8px; }
  .m-groups { min-height: 48px; border-radius: 16px; padding: 0 14px; background: var(--card) !important; color: var(--pink2) !important; box-shadow: var(--shadow) !important; border: none; font-size: 15px !important; }
  .search input { min-height: 48px; border-radius: 16px; }
  .filters { padding: 4px; border-radius: 14px; scrollbar-width: none; -ms-overflow-style: none; }
  .filters::-webkit-scrollbar { display: none; }
  .fbtn { flex: none; min-height: 40px !important; padding: 6px 12px !important; font-size: 15px !important; border-radius: 11px; }
  .zoom { right: var(--gut); bottom: 16px; gap: 8px; } .zoom button { width: 46px; height: 46px; border-radius: 14px; font-size: 20px; }
  .map-side { padding: 8px var(--pad) calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; max-height: 78vh; }
  .map-side::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.14); margin: 0 auto 10px; }

  /* Order ticket: the email comes first, details after */
  #ticketBody { padding: 0 var(--gut) var(--gap); gap: var(--gap); }
  #ticketBody > * { order: 3; margin-top: 0 !important; margin-bottom: 0 !important; }
  #ticketBody > .t-head { order: 0; margin: 0 calc(-1 * var(--gut)) !important; padding: calc(14px + env(safe-area-inset-top)) var(--gut) 12px; align-items: center; gap: 12px; }
  #ticketBody > .letter { order: 1; }
  .ticket { padding-top: 0 !important; }
  .t-head img { height: 72px !important; width: 72px !important; }
  .t-head h2 { font-size: 20px !important; padding-right: 48px; }
  #ticketBody .card { padding: var(--pad); border-radius: var(--rad); }
  #ticketBody .card.gm-card { padding: 0 !important; }
  .gm-card .gm-body { min-height: 240px; }
  .links { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .links .pill { justify-content: center; padding: 8px 6px !important; font-size: 15px !important; }
  .t-actions { flex-wrap: nowrap !important; gap: 8px; padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom)); }
  .t-actions .candy { flex: 1 1 0; min-width: 0; padding: 13px 8px !important; font-size: 16px !important; white-space: nowrap; }
  .t-actions #oSend, .t-actions #oSave2 { flex: 1.7 1 0; }
  .t-actions .skip { flex-basis: 0 !important; }

  /* Bottom sheets: grabber, compact header, tabs in one swipeable row */
  .sheet { padding: 10px var(--pad) calc(24px + env(safe-area-inset-bottom)) !important; border-radius: 26px 26px 0 0 !important; }
  .sheet::before { content: ""; display: block; width: 42px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.14); margin: 0 auto 12px; }
  .sheet.gmail::before { position: absolute; left: 50%; top: 6px; margin: 0 0 0 -21px; z-index: 3; }
  .sheet > .x, #sx { top: 18px !important; right: var(--pad) !important; width: 38px !important; height: 38px !important; font-size: 16px !important; }
  .sheet-head { gap: 10px; padding-right: 48px; margin-bottom: 10px; }
  .sheet-head .ic { display: none; }
  .sheet-head h2 { font-size: 23px; } .sheet-head .hint { font-size: 15px !important; }
  .sheet h2 { font-size: 23px; padding-right: 48px; }
  .tabs { flex-wrap: nowrap !important; overflow-x: auto; gap: 6px; margin: 0 calc(-1 * var(--pad)) 12px; padding: 4px var(--pad); scrollbar-width: none; background: none !important; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none !important; min-height: 42px !important; padding: 8px 14px !important; border-radius: 99px !important; font-size: 15px !important; background: var(--soft); white-space: nowrap; }
  .tab.on { background: var(--pink2) !important; color: #fff !important; }
  .sheet label { margin-bottom: 12px; display: block; }
  .sheet .grid2 { grid-template-columns: 1fr !important; gap: 0; }
  .sheet .row { gap: 8px; flex-wrap: wrap; margin-top: 12px; }
  .sheet .row .candy { flex: 1 1 auto; }

  /* popups & toast above the tab bar, same gutters */
  .gtip { left: var(--gut) !important; right: var(--gut) !important; width: auto !important; border-radius: 20px; padding: 16px; }
  .toast { left: var(--gut); right: var(--gut); bottom: calc(96px + env(safe-area-inset-bottom)); transform: none; border-radius: 16px; text-align: center; }
  .ob-card { left: var(--gut); right: var(--gut); border-radius: 20px; }

  /* bottom tab bar: lighter, even */
  .scenes { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px; border-radius: 24px 24px 0 0; }
  .scene-btn { min-height: 58px; border-radius: 16px; }
}
@media (max-width: 760px) { #oBody { overflow: hidden; resize: none; } }
@media (max-width: 760px) {
  .sheet label.check { display: flex !important; gap: 12px; align-items: flex-start; line-height: 1.4; }
  .sheet label.check input { margin-top: 1px; }
}
@media (max-width: 760px) {
  .dict, .dict tbody, .dict tr, .dict td { display: block; width: auto !important; }
  .dict tr { background: var(--card); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
  .dict td { background: none; padding: 0; border-radius: 0 !important; white-space: normal !important; }
  .dict td:first-child { font-size: 17px; margin-bottom: 3px; }
  .dict td:last-child { font-size: 16px; }
}

/* loading screen until the shop (or the login) is ready — no blank pink page on slow phones */
.splash { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(180deg, #fde3ec, #fff4e6); font-family: Fredoka, sans-serif; color: #7a4a3a; }
.splash img { width: 150px; animation: splashBob 1.2s ease-in-out infinite; }
.splash b { font-size: 21px; }
.splash i { width: 120px; height: 8px; border-radius: 99px; background: rgba(255, 95, 152, .18); overflow: hidden; position: relative; }
.splash i::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 99px; background: #ff5f98; animation: splashBar 1.1s ease-in-out infinite; }
@keyframes splashBob { 50% { transform: translateY(-8px); } }
@keyframes splashBar { 0% { left: -40%; } 100% { left: 100%; } }
body:has(#app:not(.hidden)) .splash, body:has(#login:not(.hidden)) .splash { display: none; }
body.night .splash { background: linear-gradient(180deg, #2a2140, #1c1630); color: #f3dcef; }

/* ======================= 📥 Inbox (Gmail-style, all accounts) ======================= */
#inboxScene { overflow: hidden; }
.mail { display: grid; grid-template-columns: 270px 1fr; gap: 16px; height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 4px; }
.mail-nav { overflow-y: auto; padding: 4px 4px 20px; }
.mail-folders { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.mf { display: flex; align-items: center; gap: 12px; border: none; background: none; text-align: left; padding: 9px 16px; border-radius: 0 99px 99px 0;
  font: 700 15.5px Nunito, sans-serif; color: var(--ink); cursor: pointer; }
.mf span { width: 22px; text-align: center; } .mf .n { margin-left: auto; font-size: 13.5px; }
.mf:hover { background: var(--soft); } .mf.on { background: var(--pinkbg); color: var(--pink2); }
.mail-acc-h { display: flex; align-items: center; justify-content: space-between; font: 700 13px Nunito; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 12px 6px; }
.mini-link { border: none; background: none; color: var(--pink2); font: 800 13px Nunito; cursor: pointer; text-transform: none; letter-spacing: 0; }
.acc { display: flex; gap: 10px; align-items: flex-start; width: 100%; border: none; background: none; text-align: left; padding: 9px 12px; border-radius: 14px; cursor: pointer; color: var(--ink); font: inherit; }
.acc:hover { background: var(--soft); } .acc.on { background: var(--card); box-shadow: var(--shadow); }
.acc b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .acc small { color: var(--muted); font-size: 12.5px; }
.acc .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: #bbb; }
.acc .dot.ok { background: #3fbf7f; } .acc .dot.off { background: #e2575f; } .acc .dot.all { background: var(--pink2); }
.acc .bar { display: block; height: 4px; border-radius: 9px; background: var(--soft); margin-top: 5px; overflow: hidden; } .acc .bar em { display: block; height: 100%; background: #3fbf7f; }
.mail-main { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.mail-top { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line, rgba(0,0,0,.07)); }
.mail-search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 99px; padding: 0 16px; }
.mail-search input { border: none !important; background: transparent !important; box-shadow: none !important; flex: 1; font-size: 16px; padding: 11px 0 !important; outline: none; min-height: 0 !important; margin: 0; }
#mailAcct { display: none; border-radius: 99px; max-width: 220px; }
.mail-chips { display: none; }
.mail-list { flex: 1; overflow-y: auto; }
.mail-count { padding: 10px 18px 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.mrow { display: flex; gap: 12px; align-items: center; width: 100%; border: none; border-bottom: 1px solid var(--line, rgba(0,0,0,.06)); background: var(--card);
  text-align: left; padding: 10px 18px; cursor: pointer; color: var(--ink); font: inherit; }
.mrow:hover { background: var(--soft); box-shadow: inset 3px 0 0 var(--pink2); } .mrow.on { background: var(--pinkbg); }
.mrow img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.mrow-main { flex: 1; min-width: 0; }
.mrow-top { display: flex; align-items: baseline; gap: 6px; } .mrow .who { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .cnt { font-size: 12.5px; color: var(--muted); } .mrow .when { margin-left: auto; font-size: 13px; color: var(--muted); flex: none; }
.mrow-sub { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); } .mrow .snip { color: var(--muted); }
.mrow.unread { background: #fff; } body.night .mrow.unread { background: #342a44; }
.mrow.unread .who, .mrow.unread .subj, .mrow.unread .when { font-weight: 800; color: var(--ink); }
.mrow-lbls { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; } .mrow-lbls:empty { display: none; }
.lbl { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: var(--soft); color: var(--ink2, #7a5a4a); white-space: nowrap; }
.lbl.pink { background: #ffe0ec; color: #d63a78; } .lbl.blue { background: #e1efff; color: #2b6cc4; } .lbl.mint { background: #dcf6ea; color: #1f8a5b; }
.lbl.red { background: #ffe1e1; color: #c23b3b; } .lbl.sand { background: #fff1d6; color: #9a6a10; } .lbl.gold { background: #fff3c4; color: #8a6400; } .lbl.acct { background: none; border: 1px solid var(--line, rgba(0,0,0,.12)); font-weight: 700; }
body.night .lbl.pink, body.night .lbl.blue, body.night .lbl.mint, body.night .lbl.red, body.night .lbl.sand, body.night .lbl.gold { filter: brightness(.85) saturate(.9); }
.mail-more { margin: 14px auto; display: block; }
.mail-empty { text-align: center; padding: 60px 24px; color: var(--muted); } .mail-empty img { width: 110px; } .mail-empty b { display: block; font-family: Fredoka; font-size: 21px; color: var(--ink); margin: 8px 0; } .mail-empty p { max-width: 420px; margin: 0 auto; }
/* reading a conversation replaces the list, like Gmail */
.mail-read { position: absolute; inset: 0; background: var(--card); overflow-y: auto; padding: 0 22px 30px; z-index: 2; }
.mr-bar { position: sticky; top: 0; display: flex; gap: 6px; align-items: center; padding: 10px 0; background: var(--card); z-index: 2; border-bottom: 1px solid var(--line, rgba(0,0,0,.07)); margin: 0 -22px 0; padding-left: 12px; padding-right: 12px; }
.mr-back, .mr-ic { border: none; background: none; border-radius: 99px; padding: 9px 14px; font: 700 15px Nunito; color: var(--ink); cursor: pointer; }
.mr-back:hover, .mr-ic:hover { background: var(--soft); }
.mr-subj { font-family: Nunito, sans-serif; font-weight: 700; font-size: 23px; margin: 18px 0 8px; line-height: 1.3; }
.mr-lbls { display: flex; gap: 6px; flex-wrap: wrap; } .mr-lbls:empty { display: none; }
.mr-move { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 16px; padding: 10px 12px; background: var(--soft); border-radius: 16px; }
.mr-move > span { font-size: 13px; font-weight: 800; color: var(--muted); margin-right: 4px; }
.mr-move .chip { border: none; background: var(--card); border-radius: 99px; padding: 7px 12px; font: 700 13.5px Nunito; color: var(--ink); cursor: pointer; }
.mr-move .chip.on { background: var(--pink2); color: #fff; }
.mr-move select { width: auto; border-radius: 99px; padding: 6px 12px; font-size: 13.5px; min-height: 0; margin: 0; }
.mm { border-bottom: 1px solid var(--line, rgba(0,0,0,.07)); padding: 14px 0; }
.mm-head { display: flex; gap: 12px; align-items: flex-start; }
.mm .av { width: 40px; height: 40px; object-fit: contain; flex: none; background: var(--soft); border-radius: 50%; }
.mm-head b { font-size: 15.5px; } .mm-head small { color: var(--muted); font-size: 13px; }
.mm-to { font-size: 13px; color: var(--muted); } .mm-to i { font-style: normal; font-weight: 700; color: var(--ink2, #7a5a4a); }
.mm .when { font-size: 13px; color: var(--muted); flex: none; }
.mm-body { white-space: pre-wrap; word-wrap: break-word; font: 15.5px/1.6 Nunito, sans-serif; margin: 10px 0 0 52px; color: var(--ink); }
.mm-snip { display: none; margin: 4px 0 0 52px; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm.folded { cursor: pointer; } .mm.folded .mm-body { display: none; } .mm.folded .mm-snip { display: block; }
.mm.in .mm-body { background: #fff7fa; border-radius: 14px; padding: 12px 14px; } body.night .mm.in .mm-body { background: #3a2d46; }
.mr-note { margin: 14px 0; font-size: 14px; color: var(--muted); }
.mr-reply { margin-top: 18px; }
.mr-replybtn { border: 1px solid var(--line, rgba(0,0,0,.15)); background: var(--card); border-radius: 99px; padding: 10px 22px; font: 700 15px Nunito; color: var(--ink); cursor: pointer; }
.mr-replybtn:hover { background: var(--soft); }
.mr-compose { border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,.12); overflow: hidden; background: var(--card); }
.mr-compose .gm-line { margin: 0 16px; } .mr-compose .gm-body { min-height: 160px; height: auto; padding: 12px 16px !important; }
.mr-compose .gm-bar { position: static; }

@media (max-width: 760px) {
  #inboxScene { overflow: visible; padding: 0 !important; }
  .mail { display: block; padding: 0; }
  .mail-nav { display: none; }
  .mail-main { border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
  .mail-top { position: sticky; top: var(--hudH, 150px); z-index: 5; background: var(--paper, #fff8fb); border: none; padding: 10px var(--gut) 6px; flex-wrap: wrap; gap: 8px; }
  .mail-search { min-height: 48px; background: var(--card); box-shadow: var(--shadow); }
  #mailAcct { display: block; width: 100%; max-width: none; min-height: 46px !important; }
  .mail-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px var(--gut) 10px; scrollbar-width: none; }
  .mail-chips::-webkit-scrollbar { display: none; }
  .mail-chips .chip { flex: none; border: none; background: var(--card); box-shadow: var(--shadow); border-radius: 99px; padding: 8px 14px; font: 700 15px Nunito; color: var(--ink); min-height: 40px !important; }
  .mail-chips .chip.on { background: var(--pink2); color: #fff; }
  .mail-list { overflow: visible; background: var(--card); margin: 0 var(--gut); border-radius: var(--rad); box-shadow: var(--shadow); padding-bottom: 4px; margin-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .mail-list:has(.mail-empty) { background: transparent; box-shadow: none; }
  .mrow { padding: 12px 14px; gap: 12px; border-radius: 0; }
  .mrow:first-of-type { border-radius: var(--rad) var(--rad) 0 0; }
  .mrow img { width: 44px; height: 44px; }
  .mrow .who { font-size: 16px; } .mrow-sub { font-size: 15px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .mrow .subj { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mrow .snip { font-size: 14.5px; }
  .lbl { font-size: 12.5px; padding: 3px 10px; }
  /* open conversation: full screen, above the tab bar */
  #inboxScene.reading .mail-top, #inboxScene.reading .mail-chips, #inboxScene.reading .mail-list { display: none; }
  .mail-read { position: fixed; inset: 0; z-index: 30; padding: 0 var(--gut) calc(40px + env(safe-area-inset-bottom)); }
  .mr-bar { margin: 0 calc(-1 * var(--gut)); padding: calc(8px + env(safe-area-inset-top)) 8px 8px; }
  .mr-ic span { display: none; } .mr-ic { font-size: 20px; padding: 8px 12px; }
  .mr-subj { font-size: 21px; margin-top: 14px; }
  .mr-move { gap: 6px; padding: 10px; } .mr-move .chip { min-height: 38px !important; font-size: 14px !important; }
  .mr-move select { flex: 1 1 100%; min-height: 42px !important; }
  .mm-body { margin-left: 0; margin-top: 12px; font-size: 16px; } .mm-snip { margin-left: 0; }
  .mr-replybtn { width: 100%; min-height: 50px; font-size: 16px; }
}
#inboxScene { padding: 14px; } #inboxScene.hidden { display: none !important; }
.mrow .dash { font-style: normal; }
@media (max-width: 760px) { .mrow { align-items: flex-start; } .mrow .dash { display: none; } .mrow img { margin-top: 2px; } }

/* 🛡️ bounce shield */
.sh-hero { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 20px; margin: 4px 0 14px; background: var(--soft); }
.sh-hero.good { background: #e6f8ee; } .sh-hero.warn { background: #fff4d6; } .sh-hero.bad { background: #ffe3e3; }
body.night .sh-hero.good { background: #1e3a2b; } body.night .sh-hero.warn { background: #4a3a17; } body.night .sh-hero.bad { background: #4a1f25; }
.sh-big { font-family: Fredoka; font-size: 40px; min-width: 90px; text-align: center; }
.sh-hero small, .sh-grid small, .sh-acc small { display: block; color: var(--muted); }
.sh-alert { background: #ffe3e3; color: #8a2330; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.sh-alert .pill { margin-left: 8px; }
.sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.sh-grid > div { background: var(--soft); border-radius: 16px; padding: 12px; } .sh-grid b { font-family: Fredoka; font-size: 24px; }
.sh-acc { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.07)); }
.sh-acc .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: #3fbf7f; flex: none; } .sh-acc .dot.off { background: #e2575f; }
.sh-warn { color: #b3261e; font-size: 14px; margin-top: 3px; } .sh-ok { color: #1f8a5b; font-size: 14px; margin-top: 3px; }
.sh-how { margin-top: 14px; } .sh-how summary { cursor: pointer; font-weight: 800; } .sh-how li { margin: 6px 0; }
input[type=range] { width: 100%; }
@media (max-width: 760px) { .sh-grid { grid-template-columns: 1fr 1fr; } .sh-big { font-size: 34px; min-width: 76px; } }

/* 🚨 alerts */
.alert-bar { position: fixed; z-index: 18; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(560px, calc(100% - 28px));
  display: flex; gap: 12px; align-items: center; text-align: left; border: none; cursor: pointer; color: #fff; font: inherit;
  background: linear-gradient(135deg, #e5484d, #d6336c); border-radius: 20px; padding: 12px 16px; box-shadow: 0 10px 28px rgba(214, 51, 108, .35);
  animation: alertPulse 2.4s ease-in-out infinite; }
.alert-bar.hidden { display: none; }
.alert-bar b { display: block; font-size: 16px; } .alert-bar small { opacity: .9; font-size: 13.5px; }
.ab-ic { font-size: 26px; } .ab-go { font-weight: 800; background: rgba(255,255,255,.2); border-radius: 99px; padding: 6px 12px; white-space: nowrap; }
@keyframes alertPulse { 50% { box-shadow: 0 10px 34px rgba(229, 72, 77, .6); } }
.al { border-radius: 20px; padding: 14px 16px; margin-bottom: 12px; background: var(--soft); border-left: 6px solid #f0b429; }
.al.red { border-left-color: #e5484d; background: #fff1f2; } body.night .al.red { background: #3d1f27; }
.al-head { display: flex; gap: 10px; align-items: center; } .al-ic { font-size: 26px; }
.al-head b { display: block; font-size: 17px; }
.al-tag { display: inline-block; font-size: 11.5px; font-weight: 900; letter-spacing: .08em; padding: 2px 8px; border-radius: 99px; background: #f0b429; color: #fff; margin-bottom: 3px; }
.al.red .al-tag { background: #e5484d; }
.al p { margin: 8px 0; } .al-do ol { margin: 6px 0 4px 20px; padding: 0; } .al-do li { margin: 4px 0; }
.al-tech { margin-top: 10px; background: var(--card); border-radius: 12px; padding: 10px 12px; }
.al-tech small { display: block; color: var(--muted); } .al-tech code { display: block; font-size: 12.5px; margin: 4px 0 8px; word-break: break-word; }
@media (max-width: 760px) { .alert-bar { bottom: calc(86px + env(safe-area-inset-bottom)); border-radius: 18px; } }

/* 📮 accounts hub + wizard */
.sheet.accounts { width: min(1180px, 100%); }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.acc-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.acc-tiles > div { background: var(--soft); border-radius: 16px; padding: 10px 12px; } .acc-tiles b { font-family: Fredoka; font-size: 24px; display: block; }
.acc-tiles small { color: var(--muted); font-size: 13px; } .acc-tiles .warn { background: #fff1d6; }
.acc-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.acc-filters { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.acc-filters .chip { border: none; background: var(--soft); border-radius: 99px; padding: 7px 13px; font: 700 14px Nunito; color: var(--ink); cursor: pointer; }
.acc-filters .chip.on { background: var(--pink2); color: #fff; }
#accQ { width: 220px; border-radius: 99px; margin: 0; }
.acc-bulk { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: var(--pinkbg); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; }
.acc-bulk b { margin-right: 6px; } .pill.danger { color: #c23b3b; }
.acc-table { border-radius: 16px; overflow: hidden; border: 1px solid var(--line, rgba(0,0,0,.08)); }
.acc-row { display: grid; grid-template-columns: 34px 2.2fr 1fr .8fr 1fr 1fr 1.6fr 96px; gap: 10px; align-items: center; padding: 10px 12px;
  border-bottom: 1px solid var(--line, rgba(0,0,0,.07)); background: var(--card); font-size: 14px; }
.acc-row.head { background: var(--soft); font-weight: 800; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.acc-row.off { opacity: .75; }
.acc-row .cb input { width: 18px; height: 18px; }
.a-main { display: flex; gap: 8px; align-items: flex-start; min-width: 0; } .a-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-main small { color: var(--muted); } .a-why { color: #c23b3b; font-size: 13px; }
.a-main .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: #3fbf7f; }
.a-main .dot.warn { background: #f0b429; } .a-main .dot.off { background: #e2575f; }
.a-today .bar { display: block; height: 5px; border-radius: 9px; background: var(--soft); margin-top: 4px; overflow: hidden; } .a-today .bar em { display: block; height: 100%; background: #3fbf7f; }
.a-cap input { width: 64px; padding: 6px 8px; margin: 0; }
.dd { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; margin: 0 3px 3px 0; background: #eee; color: #888; }
.dd.ok { background: #dcf6ea; color: #1f8a5b; } .dd.bad { background: #ffe1e1; color: #c23b3b; }
.a-stats .bad { color: #c23b3b; font-weight: 800; } .a-act { display: flex; gap: 4px; justify-content: flex-end; } .a-act .pill { padding: 5px 10px; }
.lbl-m { display: none; }
.acc-empty { padding: 30px; text-align: center; color: var(--muted); }
.sheet.wizard { width: min(620px, 100%); }
.wiz-steps { display: flex; gap: 6px; margin-bottom: 10px; } .wiz-steps span { flex: 1; text-align: center; font-size: 13px; font-weight: 800; padding: 6px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.wiz-steps .on { background: var(--pink2); color: #fff; } .wiz-steps .done { background: #dcf6ea; color: #1f8a5b; }
.wiz-prov { background: var(--soft); border-radius: 14px; padding: 10px 14px; margin: 8px 0; } .wiz-prov small { display: block; color: var(--muted); }
.wiz-howto { margin: 8px 0 14px 20px; padding: 0; } .wiz-howto li { margin: 6px 0; line-height: 1.5; }
.wiz-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.wiz-choice label { display: flex; gap: 8px; align-items: flex-start; background: var(--soft); border-radius: 14px; padding: 10px 12px; cursor: pointer; margin: 0; }
.wiz-choice small { display: block; color: var(--muted); font-size: 13px; }
.wiz-res { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; margin: 6px 0; background: #e9f8ef; }
.wiz-res.bad { background: #fff1f2; } .wiz-res > span { font-size: 20px; font-weight: 900; } .wiz-res.ok > span { color: #1f8a5b; } .wiz-res.bad > span { color: #c23b3b; }
.wiz-res small { display: block; color: var(--muted); }
body.night .wiz-res { background: #1e3a2b; } body.night .wiz-res.bad { background: #3d1f27; }
.mail-compose { display: block; margin: 0 0 14px 4px; border: none; background: var(--pinkbg); color: var(--ink); border-radius: 18px; padding: 16px 22px;
  font: 800 16px Nunito; cursor: pointer; box-shadow: var(--shadow); }
.mail-compose:hover { background: #ffd6e7; }
.mini-link.plain { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.mail-fab { display: none; }
.gm-line select { border: none !important; background: transparent !important; box-shadow: none !important; flex: 1; font-size: 16px; padding: 10px 0 !important; margin: 0; min-height: 0 !important; }
@media (max-width: 760px) {
  .acc-tiles { grid-template-columns: repeat(3, 1fr); } .acc-tiles b { font-size: 21px; }
  #accQ { width: 100%; }
  .acc-table { border: none; }
  .acc-row.head { display: none; }
  .acc-row { grid-template-columns: 30px 1fr 1fr; border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 16px; margin-bottom: 10px; gap: 8px 10px; }
  .acc-row .a-main { grid-column: 2 / 4; }
  .acc-row .a-today, .acc-row .a-cap, .acc-row .a-warm, .acc-row .a-dns, .acc-row .a-stats { grid-column: span 1; }
  .acc-row .a-stats { grid-column: 2 / 4; } .acc-row .a-act { grid-column: 1 / 4; justify-content: flex-start; }
  .acc-row > :nth-child(3) { grid-column: 2; }
  .lbl-m { display: block; font-size: 12px; color: var(--muted); font-weight: 800; }
  .wiz-choice { grid-template-columns: 1fr; }
  .mail-fab { display: grid; place-items: center; position: fixed; right: var(--gut); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 6;
    width: 58px; height: 58px; border-radius: 18px; border: none; background: var(--pink2); color: #fff; font-size: 24px; box-shadow: 0 8px 20px rgba(214,51,108,.35); }
  #inboxScene.reading .mail-fab, #inboxScene.hidden .mail-fab { display: none; }
  body:has(.alert-bar:not(.hidden)) .mail-fab { bottom: calc(170px + env(safe-area-inset-bottom)); }
}
.a-main .dot { width: 10px !important; height: 10px !important; padding: 0 !important; border: 0 !important; display: block; }
body:has(#modal:not(.hidden)) .alert-bar { display: none; }
@media (max-width: 760px) { .wiz-steps { padding-right: 48px; } .wiz-steps span { font-size: 12px; padding: 6px 4px; } }
@media (max-width: 760px) {
  .acc-row { grid-template-columns: 30px 1fr 1fr !important; align-items: start; }
  .acc-row .cb { grid-column: 1; grid-row: 1; }
  .acc-row .a-main { grid-column: 2 / 4 !important; grid-row: 1; }
  .acc-row .a-today { grid-column: 2 !important; grid-row: 2; }
  .acc-row .a-cap { grid-column: 3 !important; grid-row: 2; }
  .acc-row .a-warm { grid-column: 2 !important; grid-row: 3; }
  .acc-row .a-dns { grid-column: 3 !important; grid-row: 3; }
  .acc-row .a-stats { grid-column: 2 / 4 !important; grid-row: 4; }
  .acc-row .a-act { grid-column: 2 / 4 !important; grid-row: 5; }
  .acc-filters .chip { font-size: 14px !important; min-height: 38px !important; padding: 6px 12px; }
}
@media (max-width: 760px) {
  .alert-bar { padding: 10px 12px; gap: 10px; border-radius: 16px; }
  .alert-bar .grow { min-width: 0; }
  .alert-bar b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .alert-bar small { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .ab-ic { font-size: 22px; } .ab-go { font-size: 14px; padding: 6px 10px; }
  .mail-fab { z-index: 17; }
  body:has(.alert-bar:not(.hidden)) .mail-list, body:has(.alert-bar:not(.hidden)) .m-shop, body:has(.alert-bar:not(.hidden)) .planner { padding-bottom: 80px; }
}
