/* 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: 'Baloo 2'; font-weight: 700; font-size: 28px; margin: 0 0 6px; color: var(--ink); }
h3 { font-family: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; }
.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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; }
.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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: Mali, 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: 'Baloo 2'; 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: 44px; height: 250px; } .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: 'Baloo 2'; 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%; bottom: 22px; transform: translateX(-50%); background: var(--card); border-radius: 99px; padding: 5px 16px; font-family: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: Mali, 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2', 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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: 'Baloo 2'; 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; }
}

/* 💰 budget card (Kam gre denar) */
.card.budget .card-h small { color: var(--muted); font-weight: 600; font-size: 13px; margin-left: 6px; }
.bud-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 10px; }
.bud-tiles > div { background: var(--soft); border-radius: 14px; padding: 8px 10px; } .bud-tiles b { display: block; font-family: 'Baloo 2'; font-size: 18px; }
.bud-tiles small { color: var(--muted); font-size: 12.5px; line-height: 1.25; display: block; }
.bud-areas { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; } .bud-areas .chip { font-size: 12.5px; }
.bud-p { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.06)); }
.bud-p b { display: block; font-size: 14.5px; font-weight: 700; } .bud-p small { color: var(--muted); font-size: 12.5px; }
.bud-p > span { font-weight: 800; white-space: nowrap; font-size: 14px; } .bud-p a { text-decoration: none; font-size: 17px; }
.bud-line { margin-top: 10px; background: #fff7e0; border-radius: 12px; padding: 10px 12px; font-size: 14.5px; } .bud-line small { display: block; color: #8a6400; margin-bottom: 3px; }
body.night .bud-line { background: #3d331a; } body.night .bud-line small { color: #f0d48a; }
.bud-more { display: inline-block; margin-top: 10px; font-weight: 800; color: var(--pink2); } .bud-src { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.bud-mini { background: var(--soft); border-radius: 12px; padding: 8px 10px; margin: 8px 0; font-size: 14px; } .bud-mini small { color: var(--muted); }
@media (max-width: 760px) { .bud-tiles { grid-template-columns: 1fr 1fr; } #ticketBody > .budget { order: 2; } }

/* ---------- 📬 Gmail desk (2026-10-08) ---------- */
.icon-btn.gm-off { opacity: .55; }
.gmd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--card); border-radius: 18px; padding: 12px 14px; margin: 4px 0 12px; }
.gmd-who { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.gmd-who small, .gmd-goal small { color: var(--ink2); font-size: 14px; }
.gmd-goal { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.gmd-goal b { min-width: 30px; text-align: center; font-size: 20px; }
.gmd-goal .pill { min-width: 40px; }
.gmd-why { margin: 6px 2px 10px; }
.gmd-list .reply { align-items: center; }
.gmd-open { flex: none; white-space: nowrap; }
.gmd-status { display: flex; flex-direction: column; gap: 6px; border-left: 6px solid #9fd8c4; }
.gmd-status.due { border-left-color: #f4a261; }
.gmd-status .pill { align-self: flex-start; }
.gmd-steps { padding-left: 22px; display: grid; gap: 16px; font-size: 16px; }
.gmd-steps small { display: block; color: var(--ink2); margin-top: 6px; }
.gmd-steps .pill { margin-top: 8px; display: inline-block; }
.gmd-drafts summary { cursor: pointer; font-weight: 800; }
.gmd-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px dashed rgba(0,0,0,.1); }
.gmd-draft .grow { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.gmd-draft small { color: var(--ink2); }
.gmd-draft select { width: auto; }
.gmd-foot { justify-content: flex-end; margin-top: 12px; }
#oGmSent.pulse { animation: gmPulse 1.2s ease-in-out infinite; }
@keyframes gmPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(159,216,196,.5); } }
@media (max-width: 760px) { #ticketBody > .gmd-status { order: 1; } }
.gmd-h { display: flex; align-items: center; gap: 8px; margin: 14px 2px 8px; font: 700 20px 'Baloo 2', sans-serif; }
.gmd-h b { background: var(--pinkbg, #fde); border-radius: 99px; padding: 0 10px; font-size: 16px; }
.gmd-calm { margin: 16px 2px 6px; color: var(--muted); font-size: 16px; }
.gmd-small { margin-top: 18px; color: var(--muted); }
.gmd-small summary { cursor: pointer; font-size: 14px; }
.gmd-small .pill { margin-top: 10px; }
.gmd-more > summary { cursor: pointer; font-weight: 800; color: var(--muted); }
.gmd-more[open] > summary { margin-bottom: 10px; }
.gmd-more > .card { box-shadow: none; margin: 8px 0 0; }
@media (max-width: 760px) { #ticketBody > .gmd-more { order: 4; } }

/* ---------- 🍽️ Restaurant, side view, scrolls sideways (2026-10-10 v2, sprites from her sheet → sprites/rest/) ---------- */
#tablesScene { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#tablesScene.hidden { display: none; }
.rest-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 18px; font-size: 17px; }
.rest-bar .rb b { font: 700 24px 'Baloo 2', sans-serif; margin-right: 4px; }
.rest-bar .rb.warm b { color: #e8590c; } .rest-bar .rb.due b { color: #d6336c; }
.rest-bar small { color: var(--muted); font-size: 15px; }
.rest-wrap { flex: 1; overflow-x: auto; overflow-y: hidden; margin: 0 12px 12px; border-radius: 26px; -webkit-overflow-scrolling: touch;
  scrollbar-color: #f3a6c0 transparent; cursor: grab; box-shadow: 0 6px 0 rgba(120,40,70,.12); }
.rest-wrap.drag { cursor: grabbing; user-select: none; }
.rest-sizer { position: relative; }
.rest-room { position: absolute; left: 0; top: 0; height: 560px; transform-origin: 0 0; }
.rr-wall { position: absolute; left: 0; right: 0; top: 0; height: 392px;
  background: repeating-linear-gradient(90deg, #fde4ec 0 34px, #fff3f7 34px 68px); }
.rr-wall::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 74px;
  background: repeating-linear-gradient(90deg, #f7b9cd 0 6px, #f9c9d8 6px 46px); box-shadow: inset 0 8px 0 #fff, inset 0 11px 0 #e99ab4; }
.rr-floor { position: absolute; left: 0; right: 0; top: 392px; bottom: 0;
  background: repeating-conic-gradient(#f3d2b5 0 25%, #fbe9d8 0 50%) 0 0 / 56px 56px; box-shadow: inset 0 10px 14px rgba(120,60,40,.15); }
body.night .rr-wall { background: repeating-linear-gradient(90deg, #4a3150 0 34px, #533858 34px 68px); }
body.night .rr-wall::after { background: repeating-linear-gradient(90deg, #6b3f5e 0 6px, #7a4a6b 6px 46px); box-shadow: inset 0 8px 0 #8d5b7d, inset 0 11px 0 #3a2440; }
body.night .rr-floor { background: repeating-conic-gradient(#5a4048 0 25%, #4b3540 0 50%) 0 0 / 56px 56px; }
.rr { position: absolute; pointer-events: none; image-rendering: auto; }
.rr-lamp { top: 0; height: 150px; }
.rr-shelf { top: 118px; width: 220px; }
.rr-plant { bottom: 44px; height: 92px; }
.rr-table { bottom: 66px; width: 186px; z-index: 3; }
.rr-cake { bottom: 182px; height: 70px; z-index: 4; }
.rr-chair { bottom: 70px; height: 156px; z-index: 1; }
.rr-chair.flip { transform: scaleX(-1); }
.rr-sign { position: absolute; left: 34px; top: 70px; width: 210px; padding: 16px 12px; text-align: center; border-radius: 20px; background: #fff; box-shadow: 0 6px 0 #f0a8c0;
  font: 700 26px 'Baloo 2', sans-serif; color: #d6336c; line-height: 1.15; }
.rr-sign small { display: block; font: 700 14px Nunito, sans-serif; color: #8a6070; margin-top: 6px; }
.rr-counter { position: absolute; left: 24px; bottom: 66px; width: 230px; height: 96px; border-radius: 16px 16px 6px 6px; background: linear-gradient(#c88f62, #a8714a); box-shadow: inset 0 10px 0 #e3b48a; z-index: 2; }
.rr-guest { position: absolute; bottom: 132px; width: 110px; display: flex; flex-direction: column; align-items: center; border: none; background: none; padding: 0; cursor: pointer; z-index: 2; }
.rr-guest img { height: 112px; width: 110px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 4px 3px rgba(0,0,0,.18)); transition: transform .2s; }
.rr-guest:hover img { transform: translateY(-4px) scale(1.05); }
.rr-guest .bub { position: absolute; top: -40px; background: #fff; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; font-size: 21px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.rr-guest.warm img { animation: restHop 1.4s ease-in-out infinite; filter: drop-shadow(0 0 12px #ffb347); }
.rr-guest.due img { animation: restWave 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
.rr-tag { position: absolute; bottom: 8px; width: 136px; transform: translateX(-50%); text-align: center; background: var(--card); color: var(--ink); border-radius: 14px; padding: 4px 8px; font-weight: 800; font-size: 15px; line-height: 1.15;
  box-shadow: 0 3px 0 rgba(0,0,0,.08); border: none; cursor: pointer; z-index: 5; font-family: Nunito, sans-serif; }
.rr-tag small { display: block; font-weight: 700; font-size: 13px; color: var(--muted); }
.rr-tag.warm small { color: #e8590c; } .rr-tag.due small { color: #d6336c; }
.rr-door { position: absolute; bottom: 66px; width: 150px; height: 270px; border-radius: 75px 75px 6px 6px; background: linear-gradient(#b07a52, #8f5d3a); box-shadow: inset 0 0 0 10px #c99467, 0 6px 0 rgba(0,0,0,.15); }
.rr-door::after { content: ''; position: absolute; right: 26px; top: 140px; width: 14px; height: 14px; border-radius: 50%; background: #f6d36b; }
.rr-exit { position: absolute; bottom: 352px; width: 110px; padding: 6px 0; text-align: center; border-radius: 10px; background: #6cc3a0; color: #fff; font: 700 18px 'Baloo 2', sans-serif; }
.rr-leaver { position: absolute; bottom: 70px; border: none; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; opacity: .8; z-index: 2; padding: 0; }
.rr-leaver img { height: 88px; transform: scaleX(-1); animation: restWalk 1.6s ease-in-out infinite; }
.rr-leaver small { background: var(--card); color: var(--ink); border-radius: 10px; padding: 2px 6px; font: 700 12px Nunito, sans-serif; }
@keyframes restHop { 50% { transform: translateY(-8px); } }
@keyframes restWave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-8deg); } 85% { transform: rotate(8deg); } }
@keyframes restWalk { 50% { transform: scaleX(-1) translateY(-4px) rotate(4deg); } }
@media (max-width: 760px) {
  .rest-wrap { margin: 0 8px 96px; flex: none; }
  .rest-bar { padding: 10px 14px; font-size: 15px; }
}
@media (max-width: 760px) { .rest-bar small { display: none; } .rest-bar { gap: 4px 14px; } .rest-wrap { margin-bottom: 0; } }
/* 🌳 park outside the restaurant + doors between scenes (2026-10-10 v3) */
.rr-park { position: absolute; top: 0; bottom: 0; right: 0; background: linear-gradient(#bfe6f7 0, #e3f5fb 330px, #a8dc8f 392px, #8ccf74 100%); }
.rr-park::before { content: ''; position: absolute; left: 0; right: 0; top: 380px; height: 30px; background: radial-gradient(circle at 20px 30px, #9ad882 22px, transparent 23px) 0 0 / 46px 30px repeat-x; }
.rr-park::after { content: '☁️'; position: absolute; left: 120px; top: 40px; font-size: 60px; opacity: .9; text-shadow: 380px 30px 0 rgba(255,255,255,.9), 760px -10px 0 rgba(255,255,255,.9); }
body.night .rr-park { background: linear-gradient(#2b3560 0, #46507a 330px, #3f6b44 392px, #34583a 100%); }
.rr-door.open { background: linear-gradient(#cfeefa, #a8dc8f); box-shadow: inset 0 0 0 10px #c99467, 0 6px 0 rgba(0,0,0,.15); }
.rr-door.open::after { display: none; }
.rr-exit { width: 140px; font-size: 16px; }
.rr-grow { position: absolute; top: 236px; padding: 8px 14px; background: #fff7d6; border: 3px dashed #e3b74a; border-radius: 14px; font: 700 15px 'Baloo 2', sans-serif; color: #8a6420; text-align: center; transform: rotate(-3deg); }
.rr-grow small { font: 600 12px Nunito, sans-serif; }
.rr-back { position: absolute; left: 270px; top: 214px; z-index: 6; border: none; border-radius: 99px; padding: 10px 18px; background: #fff; color: #d6336c; font: 700 18px 'Baloo 2', sans-serif; box-shadow: 0 4px 0 #f0a8c0; cursor: pointer; }
.rr-parksign { position: absolute; top: 60px; width: 300px; padding: 14px; text-align: center; background: #fff; border-radius: 18px; box-shadow: 0 6px 0 #7fbf69; font: 700 26px 'Baloo 2', sans-serif; color: #3f8a3a; z-index: 2; }
.rr-parksign small { display: block; font: 700 14px Nunito, sans-serif; color: #5b7a55; margin-top: 4px; }
.rr-tree { position: absolute; bottom: 150px; width: 26px; height: 120px; background: #9b6b45; border-radius: 8px; }
.rr-tree::before { content: ''; position: absolute; left: 50%; bottom: 80px; width: 150px; height: 150px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #b6e59c, #7cc767 60%, #62b052); box-shadow: -40px 30px 0 -20px #7cc767, 40px 34px 0 -22px #6dbd5c; }
.rr-tree.t1::before { background: radial-gradient(circle at 35% 35%, #ffd6e4, #f7a8c4 60%, #ee8fb1); box-shadow: -40px 30px 0 -20px #f7a8c4, 40px 34px 0 -22px #f39dbd; }
.rr-tree.t2 { height: 100px; } .rr-tree.t2::before { width: 120px; height: 120px; }
.rr-bench { position: absolute; bottom: 120px; width: 150px; height: 18px; background: #c88f62; border-radius: 6px; box-shadow: 0 -26px 0 -4px #b47c50, 0 -52px 0 -4px #b47c50; }
.rr-bench::before, .rr-bench::after { content: ''; position: absolute; top: 14px; width: 10px; height: 36px; background: #8f5d3a; border-radius: 3px; } .rr-bench::before { left: 14px; } .rr-bench::after { right: 14px; }
.rr-pguest { position: absolute; border: none; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.rr-pguest.back { bottom: 158px; z-index: 2; } .rr-pguest.front { bottom: 44px; z-index: 4; }
.rr-pguest img { height: 104px; filter: drop-shadow(0 4px 3px rgba(0,0,0,.15)); }
.rr-pguest:not(.ripe) img { filter: saturate(.75) drop-shadow(0 4px 3px rgba(0,0,0,.12)); }
.rr-pguest.ripe img { animation: restHop 1.6s ease-in-out infinite; }
.rr-pguest .bub { position: absolute; top: -34px; background: #fff; border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.ptag { background: var(--card); color: var(--ink); border-radius: 12px; padding: 3px 8px; font: 800 13px Nunito, sans-serif; line-height: 1.15; text-align: center; max-width: 130px; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.ptag small { display: block; font-weight: 700; font-size: 12px; color: var(--muted); }
.rr-pguest.ripe .ptag small { color: #d6336c; }
.rr-parkempty { position: absolute; bottom: 120px; width: 300px; padding: 12px; background: rgba(255,255,255,.85); border-radius: 14px; font: 700 15px Nunito, sans-serif; color: #5b7a55; }
.rest-bar .rb.park b { color: #3f8a3a; }
/* shop → tables door */
.to-tables { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 8; border: none; border-radius: 22px; padding: 14px 16px; background: #fff; color: #d6336c;
  font: 700 18px 'Baloo 2', sans-serif; box-shadow: 0 6px 0 #f0a8c0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; animation: toTablesNudge 2.4s ease-in-out infinite; }
.to-tables span { font-size: 32px; } .to-tables b { font-size: 26px; line-height: 1; }
@keyframes toTablesNudge { 0%, 70%, 100% { transform: translateY(-50%); } 85% { transform: translate(6px, -50%); } }
.m-to-tables { display: flex; align-items: center; gap: 12px; width: 100%; border: none; border-radius: 22px; padding: 14px 18px; margin: 12px 0; background: #fff; color: #d6336c; font: 700 20px 'Baloo 2', sans-serif; box-shadow: 0 5px 0 #f0a8c0; cursor: pointer; }
.m-to-tables span { font-size: 30px; } .m-to-tables b { margin-left: auto; font-size: 26px; }
#tablesScene.walk-in { animation: walkIn .45s ease-out; } #shopScene.walk-in, #mShop.walk-in { animation: walkBack .45s ease-out; }
@keyframes walkIn { from { transform: translateX(60px); opacity: 0; } } @keyframes walkBack { from { transform: translateX(-60px); opacity: 0; } }
/* ---------- 2026-10-10 v5: her clipart in the shop + kitchen window + street ---------- */
.candy-shelf { position: absolute; left: 1196px; top: 40px; height: 290px; z-index: 1; filter: drop-shadow(0 6px 4px rgba(0,0,0,.08)); }
.display { left: 1210px; top: 268px; width: 300px; }
.display-tag { bottom: auto; top: -26px; }
.till { left: 1000px; top: -150px; height: 160px; }
.counter-cake { left: 600px; top: -118px; height: 128px; }
/* the baker peeks through the kitchen window, cut off at the sill */
.kitchen-door { top: 70px; height: 210px; overflow: hidden; border-radius: 120px 120px 14px 14px; }
.kitchen-door span { display: none; }
.kitchen-door .baker.b1 { position: absolute; left: 50%; bottom: -88px; height: 290px; transform: translateX(-50%); }
.kitchen-door .sill { position: absolute; left: -10px; right: -10px; bottom: 0; height: 26px; background: var(--shelf); box-shadow: 0 -4px 0 rgba(0,0,0,.06) inset; z-index: 2; }
.kitchen::before { content: 'KITCHEN'; position: absolute; left: 140px; top: 30px; transform: translateX(-50%); font-family: 'Baloo 2'; font-weight: 700; color: #fff; background: #ff8fb8; padding: 2px 14px; border-radius: 10px; font-size: 17px; letter-spacing: 1px; z-index: 3; }
.kitchen.busy .kitchen-door .baker { animation: peek 1.4s ease-in-out infinite; }
@keyframes peek { 50% { transform: translateX(-50%) translateY(-10px) rotate(-3deg); } }
.to-street { right: auto; left: 18px; }
.to-street small { font: 700 13px Nunito, sans-serif; color: var(--muted); }
@keyframes toStreetNudge { 0%, 70%, 100% { transform: translateY(-50%); } 85% { transform: translate(-6px, -50%); } }
.to-street { animation-name: toStreetNudge; }
#streetScene { display: flex; flex-direction: column; min-height: 0; flex: 1; } #streetScene.hidden { display: none; }
#streetScene.walk-in { animation: walkBack .45s ease-out; }
.st-sky { position: absolute; left: 0; right: 0; top: 0; height: 400px; background: linear-gradient(#bfe6f7, #eaf7fc); }
body.night .st-sky { background: linear-gradient(#25305a, #4a527c); }
.st-walk { position: absolute; left: 0; right: 0; top: 400px; bottom: 0; background: repeating-linear-gradient(90deg, #e9e2dc 0 118px, #d8cfc8 118px 122px); box-shadow: inset 0 14px 0 #cfc5bd; }
.st-road { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: #b9b1ab; }
.st-shop { position: absolute; top: 40px; bottom: 160px; width: 560px; background: repeating-linear-gradient(90deg, #fde4ec 0 34px, #fff3f7 34px 68px); border-radius: 18px 18px 0 0; box-shadow: 0 0 0 8px #f3b6cb inset; }
.st-awning { position: absolute; left: -20px; right: -20px; top: 0; height: 70px; background: repeating-linear-gradient(90deg, #ff8fb8 0 46px, #fff 46px 92px); border-radius: 16px; box-shadow: 0 8px 0 rgba(0,0,0,.08); }
.st-shopname { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); background: #fff; color: #d6336c; border-radius: 16px; padding: 4px 22px; font: 700 34px 'Baloo 2', sans-serif; box-shadow: 0 5px 0 #f0a8c0; white-space: nowrap; }
.st-door { position: absolute; bottom: 0; width: 140px; height: 210px; border-radius: 70px 70px 0 0; background: linear-gradient(#ffe9c9, #ffd9a8); box-shadow: inset 0 0 0 10px #c99467; border: none; cursor: pointer; font: 700 16px 'Baloo 2', sans-serif; color: #8a5a3a; padding-top: 70px; }
.st-guest { position: absolute; bottom: 70px; border: none; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.st-guest img { height: 120px; filter: drop-shadow(0 4px 3px rgba(0,0,0,.15)); }
.st-guest:hover img { transform: translateY(-4px); }
.st-guest.first img { animation: restHop 1.6s ease-in-out infinite; }
.st-more { position: absolute; bottom: 110px; width: 190px; padding: 10px 12px; background: #fff; border-radius: 16px; text-align: center; font: 700 16px 'Baloo 2', sans-serif; color: #8a6070; box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.rr-wallart { z-index: 0; filter: drop-shadow(0 6px 4px rgba(0,0,0,.08)); }
.rr-rug { z-index: 0; object-fit: fill; opacity: .95; }
.pk-tree { z-index: 1; } .pk-prop { z-index: 2; } .pk-front { z-index: 5; }
.rr-pguest.back { z-index: 3; } .rr-pguest.front { z-index: 6; }
/* ---------- v6: chevrons, ⓘ info, separate park, door art ---------- */
.chev { position: absolute; top: 50%; transform: translateY(-50%); z-index: 9; width: 46px; height: 60px; border: none; background: none; padding: 0; cursor: pointer; filter: drop-shadow(0 4px 6px rgba(120,40,70,.25)); transition: transform .15s; }
.chev img { width: 100%; height: 100%; object-fit: contain; }
.chev.right { right: 10px; } .chev.left { left: 10px; }
.chev.right { animation: chevR 2.4s ease-in-out infinite; } .chev.left { animation: chevL 2.4s ease-in-out infinite; }
@keyframes chevR { 0%, 70%, 100% { transform: translateY(-50%); } 85% { transform: translate(6px, -50%); } }
@keyframes chevL { 0%, 70%, 100% { transform: translateY(-50%); } 85% { transform: translate(-6px, -50%); } }
.strip-box { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.strip-scene { display: flex; flex-direction: column; min-height: 0; flex: 1; } .strip-scene.hidden { display: none; }
#parkScene.walk-in { animation: walkIn .45s ease-out; }
.m-chevs { display: flex; justify-content: space-between; margin: 10px 4px; }
.chev-m { width: 42px; height: 56px; border: none; background: none; padding: 0; cursor: pointer; filter: drop-shadow(0 4px 6px rgba(120,40,70,.25)); }
.chev-m img { width: 100%; height: 100%; object-fit: contain; }
.room-info { width: 30px; height: 30px; border-radius: 50%; border: none; background: #fff; color: #d6336c; font: 800 17px 'Baloo 2', sans-serif; font-style: italic; cursor: pointer; box-shadow: 0 3px 0 #f0a8c0; flex: none; }
.room-info-pop { position: fixed; z-index: 200; max-width: 290px; background: #fff; color: #5a3a48; border-radius: 16px; padding: 12px 14px; font: 600 15px Nunito, sans-serif; line-height: 1.4; box-shadow: 0 10px 30px rgba(120,40,70,.25); }
.rr-doorbtn { position: absolute; bottom: 64px; height: 300px; border: none; background: none; padding: 0; cursor: pointer; z-index: 3; }
.rr-doorbtn img { height: 100%; filter: drop-shadow(0 6px 4px rgba(0,0,0,.12)); }
.rr-doorbtn:hover img { transform: translateY(-3px); }
.st-door { width: 200px; height: 236px; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.st-door img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
@media (max-width: 760px) { .chev { width: 36px; height: 48px; } .chev.right { right: 4px; } .chev.left { left: 4px; } }
/* v7: no OPEN/CLOSED sign (first letters are always manual), no kitchen label / bubble */
#openSign, #mSign, .kbubble, .kitchen::before, #diaryBtn { display: none !important; }
/* 🧁 Kitchen tab */
.kt-bakers { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.kt-bake { display: flex; align-items: flex-end; } .kt-bake img { height: 120px; } .kt-bake img + img { height: 96px; margin-left: -18px; }
.kt-bakers.busy .kt-bake img { animation: bake 1.2s ease-in-out infinite; } .kt-bakers.busy .kt-bake img + img { animation-delay: .3s; }
.kt-live { font: 700 13px Nunito, sans-serif; color: #2fae83; margin-left: 6px; animation: restHop 1.4s infinite; display: inline-block; }
.kt-doing { margin: 4px 0 10px; color: var(--muted); font-size: 15px; }
.kt-nums { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; } .kt-nums b { display: block; font: 700 26px 'Baloo 2', sans-serif; } .kt-nums small { color: var(--muted); }
.kt-letter { border-top: 1px dashed rgba(0,0,0,.1); padding: 12px 0; } .kt-letter:first-of-type { border-top: none; }
.kt-lh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .kt-lh b { flex: 1; font-size: 17px; }
.kt-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kt-step { border-radius: 14px; padding: 8px 10px; background: var(--soft, #fff4f8); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kt-step span { font-weight: 800; font-size: 13px; } .kt-step.ok span { color: #2fae83; } .kt-step.todo span { color: #d6336c; }
.kt-step small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card h3 { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .kt-steps { grid-template-columns: 1fr; } }
/* 🍭 Levels: visual, little text */
.node .lv-badge { position: absolute; left: 62px; top: -8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.1); z-index: 3; }
.node.right .lv-badge { left: auto; right: 62px; }
.node .lv-badge.done { background: #22c55e; color: #fff; font-weight: 800; } .node .lv-badge.current { background: #ffd43b; }
.node .lv-badge.bake { top: 60px; animation: restHop 1.4s ease-in-out infinite; }
.node .info small.lv-num { font-weight: 800; color: var(--muted); }
.node .tools button { min-width: 36px; font-size: 16px; }
.lv-head { display: flex; align-items: center; gap: 10px; } .lv-head h2 { margin: 0; flex: 1; }
.lv-ring { --p: 0; width: 150px; height: 150px; margin: 16px auto 8px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#ff8fb8 calc(var(--p) * 1%), #fde4ec 0); }
.lv-ring > div { width: 112px; height: 112px; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.lv-ring b { font: 700 32px 'Baloo 2', sans-serif; line-height: 1; } .lv-ring small { color: var(--muted); font-weight: 700; }
.lv-found { text-align: center; font-size: 17px; margin-bottom: 14px; } .lv-found b { font: 700 24px 'Baloo 2', sans-serif; }
.lv-order { display: grid; gap: 8px; }
.lv-o { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--soft, #fff4f8); }
.lv-o.now { box-shadow: 0 0 0 2px #ff8fb8 inset; } .lv-o > span { font-size: 22px; } .lv-o b { font-size: 14px; } .lv-o em { font-style: normal; font-weight: 800; color: #22c55e; }
.lv-o .bar { height: 6px; margin-top: 4px; } .lv-o .bar i { background: #ff8fb8; }
.kt-connect { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; box-shadow: 0 0 0 3px #ff8fb8 inset; } .kt-connect > span { font-size: 40px; } .kt-connect h3 { margin: 0 0 4px; } .kt-connect small { color: var(--muted); }
.gmc { display: grid; gap: 14px; max-width: 560px; } .gmc h2 { margin: 6px 0 0; }
.gmc-f { display: grid; gap: 6px; font-weight: 800; font-size: 16px; }
.gmc-f input { font-size: 18px; padding: 14px 16px; border-radius: 16px; }
.gmc-f.big input { font-family: ui-monospace, Menlo, monospace; letter-spacing: 2px; border: 3px solid #ff8fb8; }
.gmc-go { font-size: 20px; padding: 14px; }
.gmc-help { display: grid; gap: 8px; background: var(--soft, #fff4f8); border-radius: 16px; padding: 12px 14px; } .gmc-help .pill { justify-self: start; } .gmc-help small { color: var(--muted); }
.cloud-drift { animation: cloudDrift 24s ease-in-out infinite alternate; opacity: .95; }
@keyframes cloudDrift { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
/* v8: rooms are full screen, no frame; the counts float over the scene (.scene is already positioned) */
.strip-scene .rest-bar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 8; width: max-content; max-width: calc(100% - 140px);
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 99px; padding: 6px 10px 6px 16px; gap: 6px 14px;
  font-size: 15px; box-shadow: 0 4px 14px rgba(120,40,70,.15); }
.strip-scene .rest-bar:empty { display: none; }
.strip-scene .rest-bar .rb b { font-size: 19px; }
body.night .strip-scene .rest-bar { background: rgba(59,45,76,.82); }
.strip-scene .rest-wrap { margin: 0 !important; border-radius: 0; box-shadow: none; }
@media (max-width: 760px) { .strip-scene .rest-bar { top: 8px; font-size: 13px; padding: 4px 8px 4px 12px; max-width: calc(100% - 100px); } .strip-scene .rest-bar .rb b { font-size: 16px; } }
@media (max-width: 760px) { .strip-scene { position: relative; top: auto !important; } }
@media (max-width: 760px) { .strip-scene .rest-bar { flex-wrap: nowrap; white-space: nowrap; gap: 8px; } .strip-scene .rest-bar .rb { overflow: hidden; text-overflow: ellipsis; } }
#restWrap { background: repeating-conic-gradient(#f3d2b5 0 25%, #fbe9d8 0 50%) 0 0 / 56px 56px; }
#parkWrap { background: #8ccf74; } #streetWrap { background: #b9b1ab; }
body.night #restWrap { background: repeating-conic-gradient(#5a4048 0 25%, #4b3540 0 50%) 0 0 / 56px 56px; } body.night #parkWrap { background: #34583a; }
/* 🧁 Lead finders card (bottom of Kitchen) */
.kt-lab { display: flex; gap: 22px; align-items: stretch; flex-wrap: wrap; background: linear-gradient(135deg, #fff7ec, #ffeef4); }
body.night .kt-lab { background: linear-gradient(135deg, #3b2d4c, #45304a); }
.kt-scene { position: relative; width: 250px; height: 210px; flex: none; margin: 0 auto; }
.kt-scene img { position: absolute; }
.kt-rack { right: 0; bottom: 18px; height: 150px; opacity: .9; }
.kt-b1 { left: 20px; bottom: 58px; height: 120px; z-index: 1; } .kt-b2 { left: 112px; bottom: 58px; height: 104px; z-index: 1; }
.kt-rack { right: -30px; z-index: 0; }
.kt-table { left: 0; bottom: 0; height: 120px; z-index: 2; }
.kt-lab.busy .kt-b1, .kt-lab.busy .kt-b2 { animation: bake 1.2s ease-in-out infinite; } .kt-lab.busy .kt-b2 { animation-delay: .3s; }
.kt-body { flex: 1; min-width: 240px; display: grid; gap: 12px; align-content: start; }
.kt-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .kt-top h3 { margin: 0; }
.kt-pill { font: 800 13px Nunito, sans-serif; padding: 4px 12px; border-radius: 99px; background: rgba(0,0,0,.06); color: var(--muted); }
.kt-pill.on { background: #d6f5e8; color: #1f9d6f; }
.kt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kt-tiles > div { background: var(--card); border-radius: 18px; padding: 10px 8px; text-align: center; box-shadow: 0 3px 0 rgba(120,40,70,.08); display: grid; gap: 2px; }
.kt-tiles span { font-size: 20px; } .kt-tiles b { font: 700 26px 'Baloo 2', sans-serif; line-height: 1; } .kt-tiles small { color: var(--muted); font-weight: 700; font-size: 12px; }
#ktBake { justify-self: start; }
.kt-where summary { cursor: pointer; font-weight: 800; color: var(--muted); font-size: 14px; } .kt-where[open] summary { margin-bottom: 8px; }
.kt-ok { font: 800 13px Nunito, sans-serif; padding: 3px 10px; border-radius: 99px; background: #ffe3ec; color: #d6336c; } .kt-ok.yes { background: #d6f5e8; color: #1f9d6f; }
.kt-letter.needs { background: #fff4f8; border-radius: 16px; padding: 12px; box-shadow: 0 0 0 2px #ff8fb8 inset; }
/* v9 shop: window + lamps on the wall, guests show only a short name */
.shop-window { position: absolute; left: 925px; top: 56px; height: 200px; z-index: 0; filter: drop-shadow(0 6px 4px rgba(0,0,0,.06)); }
.shop-lamp { position: absolute; top: -4px; height: 150px; z-index: 1; } .shop-lamp.l1 { left: 770px; } .shop-lamp.l2 { left: 1300px; }
.nav-hide { display: none !important; }
.order { width: auto; min-width: 120px; max-width: 220px; padding: 6px 14px; margin-left: auto; margin-right: auto; border-radius: 99px; }
.order b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: none; }
.logo { cursor: pointer; }
/* ✨ Candy Factory */
#factoryScene.walk-in { animation: walkIn .45s ease-out; }
#factoryWrap { background: #f6e7ff; }
.fx-sky { position: absolute; inset: 0 0 160px 0; background: radial-gradient(ellipse at 30% 10%, #fff6fd 0, transparent 50%), linear-gradient(#e9dcff 0, #fde3f2 60%, #ffeef6 100%); }
.fx-sky::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(#fff 1.6px, transparent 2px), radial-gradient(#ffe38a 1.4px, transparent 2px); background-size: 90px 90px, 140px 140px; background-position: 10px 20px, 60px 70px; opacity: .8; }
.fx-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: repeating-linear-gradient(90deg, #ffd8ec 0 60px, #e8dcff 60px 120px); box-shadow: inset 0 10px 0 #f5c46a, inset 0 14px 0 #fff3c4; }
body.night .fx-sky { background: linear-gradient(#3a2d5c, #5a3a6c); } body.night .fx-floor { background: repeating-linear-gradient(90deg, #6a4a7c 0 60px, #4f3f72 60px 120px); }
.fx-cloud { opacity: .9; }
.fx-guest { position: absolute; bottom: 70px; border: none; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; z-index: 5; touch-action: pan-x; }
.fx-guest.back { bottom: 120px; z-index: 3; }
.fx-guest img { height: 112px; filter: drop-shadow(0 0 10px rgba(255,214,120,.7)) drop-shadow(0 4px 3px rgba(0,0,0,.12)); }
.fx-guest.warm img { animation: restHop 1.4s ease-in-out infinite; }
.fx-guest .bub { position: absolute; top: -36px; background: #fff; border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; font-size: 19px; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.fx-guest.warm .ptag small { color: #e8590c; } .fx-guest.client .ptag small { color: #b8860b; }
/* ✋ move dock */
.move-dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 300; display: flex; gap: 12px; align-items: stretch; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); padding: 12px; border-radius: 26px; box-shadow: 0 14px 40px rgba(120,40,70,.3); flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); }
.move-dock.hidden { display: none; }
.md-title { width: 100%; text-align: center; font: 700 16px 'Baloo 2', sans-serif; color: var(--ink); }
.md-t { width: 130px; padding: 12px 8px; border-radius: 20px; background: #fff4f8; border: 3px dashed #f3a6c0; display: grid; justify-items: center; gap: 2px; font: 700 17px 'Baloo 2', sans-serif; transition: transform .12s; }
.md-t span { font-size: 30px; } .md-t small { font: 700 11px Nunito, sans-serif; color: var(--muted); }
.md-t.over { transform: scale(1.1); background: #ffe3ef; border-style: solid; border-color: #ff8fb8; }
.drag-ghost { position: fixed; z-index: 310; height: 140px; pointer-events: none; filter: drop-shadow(0 12px 14px rgba(0,0,0,.3)); transform: rotate(-6deg); }
.rr-guest, .rr-pguest, .st-guest, .guest { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.t-move { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .t-move span { font-weight: 800; color: var(--muted); font-size: 13px; } .t-move .pill { padding: 4px 10px; font-size: 13px; }
/* 🍭 Levels: whole character inside the circle, never cut */
.node .stop img:not(.chef-here) { object-fit: contain !important; object-position: center bottom; padding: 6px 4px 0; box-sizing: border-box; }
/* 🗺️ map: greyed locked levels, foldable side panel */
.layer.locked-sum { opacity: .5; filter: grayscale(.9); cursor: pointer; }
.layer.locked-sum img { width: 40px; height: 40px; object-fit: contain; }
.map-side-toggle { width: 40px; height: 40px; border-radius: 50%; border: none; background: #fff; color: #d6336c; font: 800 18px 'Baloo 2', sans-serif; box-shadow: 0 3px 0 #f0a8c0; cursor: pointer; flex: none; }
#mapScene.side-off .map-side { display: none; }
#mapScene.side-off .map-box { left: 0 !important; width: 100% !important; margin-left: 0 !important; }
@media (max-width: 760px) { .map-side-toggle { display: none; } }
#mapScene.side-off { grid-template-columns: 1fr; }
/* 🍭 Levels: nothing bounces */
#levelsScene .lv-badge, #levelsScene .deco, #levelsScene .chef-here, #levelsScene .bakers-here, #levelsScene .lv-o em { animation: none !important; }
/* v10 navigation: desktop top nav = Kitchen · Levels · Kingdom; phone bottom bar = the walk, ☰ for the rest */
.phone-only { display: none !important; }
.stage-sizer { height: 1px; }
@media (max-width: 760px) {
  .phone-only { display: flex !important; } .icon-btn.phone-only { display: grid !important; }
  .desk-only { display: none !important; }
  .scene-btn.nav-hide { display: flex !important; }
  .scenes .scene-btn { flex: 1; min-width: 0; font-size: 11px; padding: 4px 2px; }
  /* 📱 shop = the real game scene, full height, swipe sideways */
  #mShop, .m-shop { display: none !important; }
  #shopScene { display: block !important; position: relative; top: auto !important; height: calc(100svh - var(--hudH, 130px) - 74px - env(safe-area-inset-bottom)); }
  #shopScene.hidden { display: none !important; }
  #shopScene > .toolbar { display: flex !important; justify-content: flex-start !important; position: absolute; top: 6px; left: 8px; right: 8px; z-index: 20; overflow-x: auto; flex-wrap: nowrap; gap: 6px; padding: 4px; border-radius: 16px; background: rgba(255,255,255,.85); backdrop-filter: blur(6px); }
  #shopScene > .toolbar select { max-width: 150px; font-size: 13px; } #shopScene > .toolbar .waiting { display: none; }
  .stage-wrap { display: block !important; position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .stage > .wide { left: 0 !important; right: 0 !important; }
  #stageWrap .chev { position: fixed; top: 55%; }
}
.menu-pop { display: grid; gap: 10px; }
.menu-it { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left; gap: 0 12px; border: none; background: var(--soft, #fff4f8); border-radius: 18px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); }
.menu-it span { grid-row: span 2; font-size: 30px; } .menu-it b { font: 700 19px 'Baloo 2', sans-serif; } .menu-it small { color: var(--muted); }
/* her logo */
.hud .logo-img { height: 56px; width: auto; display: block; cursor: pointer; filter: none; }
.logo-img.big { width: min(320px, 80vw); height: auto; }
@media (max-width: 760px) { .hud .logo-img { height: 42px; } }
/* ✨ factory v2: an indoor magic wall (no sky, no floating clouds) */
.fx-sky { background: radial-gradient(ellipse at 20% 0%, #fff4fb 0, transparent 45%), repeating-linear-gradient(90deg, #efe2ff 0 70px, #f6e9ff 70px 140px) !important; }
.fx-sky::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: repeating-linear-gradient(90deg, #f3c4dc 0 8px, #f8d6e8 8px 52px); box-shadow: inset 0 8px 0 #f5c46a, inset 0 11px 0 #fff3c4; }
body.night .fx-sky { background: repeating-linear-gradient(90deg, #3e2f5e 0 70px, #46356a 70px 140px) !important; }
.fx-win { filter: drop-shadow(0 6px 6px rgba(120,60,160,.12)); }
/* 🏠 rooms overview (corner house) */
.room-house { position: fixed; right: 14px; top: calc(var(--hudH, 76px) + 12px); z-index: 40; width: 216px; filter: drop-shadow(0 8px 14px rgba(120,40,70,.25)); }
.rh-roof { position: relative; height: 44px; background: repeating-conic-gradient(#f7a9c2 0 25%, #fdd3e1 0 50%) 0 0 / 18px 18px; clip-path: polygon(10% 100%, 50% 0, 90% 100%); display: grid; place-items: end center; padding-bottom: 4px; }
.rh-roof b { font: 700 14px 'Baloo 2', sans-serif; color: #fff; text-shadow: 0 1px 0 #d6336c, 0 0 4px #d6336c; }
.rh-bow { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); font-size: 16px; }
.rh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; background: #fff6e4; border: 3px solid #f0c27b; border-radius: 6px 6px 14px 14px; box-shadow: inset 0 -4px 0 #f7dfb0; }
.rh-tile { position: relative; border: 3px solid #f3d9a8; background: #fffdf6; border-radius: 10px; padding: 4px 2px 3px; display: grid; justify-items: center; gap: 1px; cursor: pointer; font: inherit; color: var(--ink); }
.rh-tile img { height: 34px; width: 48px; object-fit: contain; }
.rh-tile small { font: 800 11px Nunito, sans-serif; color: #8a6040; }
.rh-tile:hover { transform: translateY(-2px); }
.rh-tile.on { border-color: #ff8a3d; background: #fff1e0; box-shadow: 0 0 0 2px #ffd0a8; }
.rh-badge { position: absolute; top: -8px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: #ff5c8a; color: #fff; font: 800 12px Nunito, sans-serif; display: grid; place-items: center; box-shadow: 0 2px 0 #c2255c; }
body.night .rh-grid { background: #3b2d4c; border-color: #7a5a8c; } body.night .rh-tile { background: #4a3a5c; border-color: #6a5080; } body.night .rh-tile small { color: #f3d9ec; }
@media (max-width: 760px) { .room-house { display: none; } }
#mapScene:not(.hidden) ~ .room-house, body:has(#mapScene:not(.hidden)) .room-house, body:has(#levelsScene:not(.hidden)) .room-house { display: none; }
/* full names on guests: a little more room, two lines max */
.order { max-width: 270px; } .order b { font-size: 17px; }
.rr-tag { width: 170px; } .ptag { max-width: 165px; }
.rr-tag, .ptag { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
/* 🏠 rooms house v2: bottom-left, small, numbers only */
.room-house { top: auto !important; right: auto !important; left: 12px; bottom: 12px; width: 150px; filter: drop-shadow(0 6px 10px rgba(120,40,70,.2)); }
.rh-roof { height: 30px; } .rh-roof b { display: none; } .rh-bow { font-size: 13px; top: 6px; }
.rh-grid { gap: 5px; padding: 6px; }
.rh-tile { padding: 0; height: 34px; font: 800 17px 'Baloo 2', sans-serif; color: #8a6040; display: grid; place-items: center; }
.rh-badge { top: -7px; right: -6px; min-width: 17px; height: 17px; font-size: 11px; }
.rest-room > .zone { position: absolute; top: 0; bottom: 0; }
#streetWrap { background: #b9b1ab; }
/* 🏠 Happy Pets style house: attic with K, rooms 1–4 below */
.room-house { width: 176px !important; filter: drop-shadow(0 6px 10px rgba(120,40,70,.22)); }
.rh-attic { position: relative; height: 62px; margin: 0 6px -3px; background: #fff3d6;
  clip-path: polygon(0 100%, 50% 0, 100% 100%); display: grid; place-items: end center; padding-bottom: 6px; }
.rh-attic::before { content: ''; position: absolute; inset: 0; background: #e2563f; clip-path: polygon(0 100%, 50% 0, 100% 100%, 92% 100%, 50% 12%, 8% 100%); }
.rh-attic .rh-tile { width: 38px; height: 30px; font-size: 16px; z-index: 1; }
.rh-attic .rh-bow { position: absolute; right: 30px; top: 16px; font-size: 18px; z-index: 2; transform: rotate(18deg); }
.rh-grid { grid-template-columns: repeat(4, 1fr) !important; background: #fff3d6 !important; border: 3px solid #e2563f !important; border-top-width: 4px !important; border-radius: 4px 4px 10px 10px !important; }
.rh-tile { border: 2px solid #e8c48a !important; background: #fffdf4 !important; border-radius: 4px !important; height: 30px !important; color: #4a3020 !important; }
.rh-tile.on { border-color: #ff8a3d !important; box-shadow: 0 0 0 2px #ffcf9e !important; background: #fff !important; }
.rh-roof { display: none; }
body.night .rh-attic, body.night .rh-grid { background: #4a3a5c !important; } body.night .rh-tile { background: #5a4870 !important; color: #fff !important; }
/* attic with K · L · C */
.rh-attic { height: 58px !important; clip-path: polygon(0 100%, 26% 0, 74% 0, 100% 100%) !important; display: flex !important; justify-content: center; align-items: flex-end; gap: 5px; padding-bottom: 6px; }
.rh-attic::before { clip-path: polygon(0 100%, 26% 0, 74% 0, 100% 100%, 94% 100%, 71% 9%, 29% 9%, 6% 100%) !important; }
.rh-attic .rh-tile { width: 34px !important; height: 28px !important; }
.rh-attic .rh-bow { right: 8px !important; top: 6px !important; }
body:has(#mapScene:not(.hidden)) .room-house, body:has(#levelsScene:not(.hidden)) .room-house { display: block; }
/* 🏠 house v4: the real Happy Pets silhouette (svg) + absolutely placed tiles */
.room-house { width: 184px !important; height: 126px; filter: drop-shadow(0 6px 10px rgba(120,40,70,.22)); }
.room-house .rh-shape { position: absolute; inset: 0; width: 184px; height: 126px; }
.room-house .rh-tile { position: absolute; width: 34px !important; height: 30px !important; padding: 0; display: grid; place-items: center; font: 800 16px 'Baloo 2', sans-serif;
  border: 2px solid #e8c48a !important; background: #fffdf6 !important; border-radius: 4px !important; color: #4a3020 !important; z-index: 1; }
.room-house .rh-tile.on { border-color: #ff8a3d !important; box-shadow: 0 0 0 2px #ffcf9e !important; }
.room-house .rh-bow { position: absolute; left: 62px; top: -2px; font-size: 20px; z-index: 2; }
body.night .room-house .rh-tile { background: #5a4870 !important; color: #fff !important; }
.room-house { height: 164px !important; } .room-house .rh-shape { height: 164px !important; }
/* 🏠 house v5: house + green yard, like the Happy Pets room picker */
.room-house { width: 236px !important; height: 116px !important; }
.room-house .rh-shape { width: 236px !important; height: 116px !important; }
.room-house .rh-tile { width: 36px !important; height: 30px !important; }
.room-house .rh-tile.yard { border: 2px solid #4f9a38 !important; background: #c9f0b0 !important; color: #e2463b !important; font: 900 11px Nunito, sans-serif !important; letter-spacing: .3px; }
.room-house .rh-tile.yard.on { border-color: #ff8a3d !important; background: #fff !important; }
.room-house .rh-tile.deco { opacity: .55; cursor: default; font-size: 15px !important; }
.room-house .rh-bow { left: 62px !important; top: -3px !important; }
.room-house { width: 244px !important; } .room-house .rh-shape { width: 244px !important; }
.room-house .rh-tile.yard { width: 42px !important; }
.room-house .rh-tile.yard { font: 800 16px 'Baloo 2', sans-serif !important; color: #2f6b1f !important; width: 36px !important; }
/* 🏠 house v7: one triangle roof on one rectangle */
.room-house { width: 252px !important; height: 136px !important; } .room-house .rh-shape { width: 252px !important; height: 136px !important; }
.room-house .rh-attic-t, .room-house .rh-tile { width: 32px !important; height: 28px !important; }
.room-house .rh-tile:not(.yard) { width: 36px !important; height: 30px !important; }
.room-house [data-room=planner], .room-house [data-room=levels], .room-house [data-room=map] { width: 32px !important; height: 26px !important; font-size: 15px !important; }
.room-house .rh-bow { left: 86px !important; top: -10px !important; font-size: 20px !important; }
.room-house [data-room=planner], .room-house [data-room=levels], .room-house [data-room=map] { width: 30px !important; height: 24px !important; font-size: 14px !important; }
.room-house .rh-bow { left: 97px !important; top: 4px !important; transform: translate(-50%, -58%) !important; font-size: 34px !important; line-height: 1; z-index: 3; }
.room-house .rh-tile.yard { border-color: #b7dca3 !important; background: #f3fbee !important; color: #6d9a5c !important; }
/* 🏠 the house is a small closed house; it opens when you hover it */
.room-house { transform: scale(.42); transform-origin: 0 100%; transition: transform .22s ease, opacity .22s; opacity: .9; cursor: pointer; }
.room-house .rh-tile { opacity: 0; transition: opacity .15s; pointer-events: none; }
.room-house:hover, .room-house:focus-within { transform: scale(1); opacity: 1; }
.room-house:hover .rh-tile, .room-house:focus-within .rh-tile { opacity: 1; pointer-events: auto; transition-delay: .08s; }
/* attic: emojis in little circles */
.room-house [data-room=planner], .room-house [data-room=levels], .room-house [data-room=map] { width: 28px !important; height: 28px !important; border-radius: 50% !important; font-size: 15px !important; line-height: 1; padding: 0 !important; }
/* attic emojis in TRUE circles (beats the 36×30 room-tile rule) */
.room-house .rh-tile.attic:not(.yard) { width: 28px !important; height: 28px !important; min-width: 28px; aspect-ratio: 1 / 1; border-radius: 50% !important; padding: 0 !important; font-size: 15px !important; }
/* 🌙 weekend chalkboard */
.weekend-board { position: relative; min-height: 190px; display: grid; place-content: center; text-align: center; gap: 4px; font-family: Mali, 'Baloo 2', sans-serif; color: #fff6fb; }
.weekend-board b { font-size: 34px; font-weight: 700; } .weekend-board span { font-size: 24px; opacity: .9; }
.chalk-heart { position: absolute; fill: none; stroke: #ffc4dc; stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 3 1.2; opacity: .85; }
