/* Nunito (SIL Open Font License, assets/fonts/OFL.txt), bundled so the game never waits on a font server */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('../assets/fonts/nunito-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('../assets/fonts/nunito-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 900; font-display: swap; src: url('../assets/fonts/nunito-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #5b3f36; --ink2: #8a6a5c; --cream: #fff8ea; --paper: #fffdf6; --sand: #f5e2b3;
  --pink: #f08ca0; --pink2: #d96d83; --coral: #f28f7c; --mint: #9fd8c8; --green: #6fbf73; --green2: #4f9f57;
  --gold: #f2c14e; --gold2: #d9a032; --sky: #a9dcee; --red: #e8584e; --blue: #7f9fd8;
  --shadow: 0 6px 0 rgba(91,63,54,.18), 0 14px 30px rgba(91,63,54,.18);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --font: Nunito, ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2d2622; color: var(--ink); font-family: var(--font);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; touch-action: manipulation; }
input { -webkit-user-select: text; user-select: text; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
input, select { touch-action: manipulation; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; margin: 0 auto; max-width: 520px; overflow: hidden; background: #5ec2cf; }
@media (min-width: 521px) { #app { box-shadow: 0 0 0 1px #0004, 0 0 60px #0006; } }
/* a tablet or a computer: the island fills the screen; menus and the counter screens
   stay a comfortable phone-like column in the middle */
@media (min-width: 700px) {
  #app { max-width: none; box-shadow: none; }
  .sheet { width: 540px; max-width: 100%; margin: 0 auto; }
  .svc, .prep { left: 0; right: 0; width: 540px; margin: 0 auto; box-shadow: 0 0 0 3px var(--ink), 0 0 80px #0007; }   /* (centred with margins: a transform would fight their own animations) */
  .summary > * { max-width: 540px; width: 100%; }
  .hud-top, #questPill { max-width: 760px; }
}
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.screen { position: absolute; inset: 0; }

/* ---------------------------------------------------------------- joystick */
#touch { position: absolute; inset: 0; z-index: 5; touch-action: none; outline: none; }
#joyBase { position: absolute; left: 70px; bottom: calc(70px + var(--sab)); width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.28), rgba(255,255,255,.12)); border: 3px solid rgba(255,255,255,.55);
  box-shadow: 0 4px 14px rgba(60,40,30,.18); opacity: 0; transform: scale(.85); transition: opacity .18s, transform .18s; pointer-events: none; top: auto; }
#joyBase.on { opacity: 1; transform: scale(1); bottom: auto; }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fffdf6, #f3e5cf);
  border: 3px solid var(--ink); box-shadow: 0 4px 0 rgba(91,63,54,.3); transform: translate(-50%,-50%); }
body.show-joy-hint #joyBase:not(.on) { opacity: .55; transform: scale(.9); }

/* ---------------------------------------------------------------- HUD */
#hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.hud-top { position: absolute; top: calc(8px + var(--sat)); left: calc(8px + var(--sal)); right: calc(8px + var(--sar)); display: flex; gap: 6px; align-items: center; }
.chip { pointer-events: auto; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 8px; border-radius: 20px; background: rgba(255,250,238,.95);
  border: 2.5px solid var(--ink); box-shadow: 0 3px 0 rgba(91,63,54,.25); font-weight: 900; white-space: nowrap; }
.chip b { font-size: 14px; line-height: 1; }
.chip small { display: block; font-size: 11px; font-weight: 800; opacity: .7; line-height: 1.1; }
.chip-clock span:last-child { display: flex; flex-direction: column; }
.sun { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #ffe79a, #f2b33a); border: 2px solid var(--ink); flex: none; transition: background .6s; }
.sun.night { background: radial-gradient(circle at 60% 40%, #fffbe6 0 45%, transparent 46%), radial-gradient(circle at 40% 45%, #cfd8ff, #8e9cd8); }
.sun:not(.night) { width: 16px; height: 16px; margin: 3px; position: relative; isolation: isolate; }   /* rays, so it reads as the sun and not as a coin */
.sun:not(.night)::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; z-index: -1; background: repeating-conic-gradient(#f2b33a 0 14deg, transparent 14deg 45deg); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.svc-clock .sun:not(.night) { width: 12px; height: 12px; }
.chip-money { margin-left: auto; padding-right: 14px; position: relative; }
/* saving up: a thin bar under the money toward the pinned goal */
.goal-bar { position: absolute; left: 12px; right: 12px; bottom: 4px; height: 4px; border-radius: 3px; background: rgba(91,63,54,.15); overflow: hidden; }
.goal-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #9fd67a, #ffd35a); border-radius: 3px; transition: width .4s; }
.goal-bar.full i { background: #ffd35a; }
.chip-money b { font-size: 16px; font-variant-numeric: tabular-nums; }
.coin { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 38% 35%, #fff2b0, #f2c14e 55%, #d99a25); border: 2px solid var(--ink); flex: none; }
.chip-money.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
.chip-money.drop b { color: var(--red); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }
.stars { display: flex; gap: 1px; }
.stars i { width: 13px; height: 13px; display: block; background: #e7d9c3; clip-path: polygon(50% 0,63% 35%,100% 38%,72% 60%,80% 100%,50% 78%,20% 100%,28% 60%,0 38%,37% 35%); }
.stars i.on { background: var(--gold); }
.stars i.half { background: linear-gradient(90deg, var(--gold) 50%, #e7d9c3 50%); }
.round-btn { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,250,238,.95); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 rgba(91,63,54,.25); display: grid; place-items: center; flex: none; }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 3px; border-radius: 2px; background: var(--ink); position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; } .burger::before { top: -5px; } .burger::after { top: 5px; }
button:active, .chip:active { transform: translateY(2px) scale(.97); }
.quest { pointer-events: auto; position: absolute; top: calc(56px + var(--sat)); left: calc(8px + var(--sal)); max-width: calc(100% - 16px); display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px;
  background: rgba(91,63,54,.9); color: #fff8ea; border-radius: 16px; font-size: 13px; font-weight: 800; text-align: left; line-height: 1.25; transition: transform .35s cubic-bezier(.3,1.4,.5,1), opacity .3s; }   /* (no backdrop blur: over a canvas that redraws every frame it costs the phone a lot) */
.quest.empty { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.quest.pulse { animation: questPulse 1s ease; }
@keyframes questPulse { 0%,100% { transform: scale(1); } 30% { transform: scale(1.06); background: rgba(240,140,160,.95); } }
.quest-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(242,193,78,.35); flex: none; }
/* the glow: a ring that grows and fades (transform + opacity only, so it costs nothing to paint), three times when the goal changes */
.quest-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid rgba(242,193,78,.6); opacity: 0; }
.quest.pulse .quest-dot::after { animation: dot 1.6s 3; }
@keyframes dot { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.area { position: absolute; top: calc(104px + var(--sat)); left: 50%; transform: translate(-50%, -10px); opacity: 0; text-align: center; transition: opacity .5s, transform .5s; pointer-events: none;
  color: #fff; text-shadow: 0 2px 0 var(--ink), 0 0 12px rgba(91,63,54,.5); }
.area.on { opacity: 1; transform: translate(-50%, 0); }
.area b { display: block; font-size: 22px; font-weight: 900; letter-spacing: .5px; }
.area small { font-size: 12px; font-weight: 800; opacity: .95; }
#pointer { position: absolute; z-index: 18; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none; transition: opacity .3s; }
.pointer-arrow { width: 100%; height: 100%; background: var(--gold); border: 3px solid var(--ink); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 3px 0 rgba(91,63,54,.3); }
.pointer-arrow::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #fff8ea; }

/* ---------------------------------------------------------------- action buttons */
#actions { position: absolute; inset: 0; z-index: 21; pointer-events: none; }
.act-btn { pointer-events: auto; position: absolute; right: calc(18px + var(--sar)); bottom: calc(28px + var(--sab)); width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #ffb3c1, var(--pink) 60%, var(--pink2)); border: 3.5px solid var(--ink); box-shadow: 0 6px 0 rgba(91,63,54,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; touch-action: none; transition: transform .2s cubic-bezier(.3,1.5,.5,1), opacity .2s, filter .2s; }
.act-btn.idle { filter: saturate(.25) brightness(1.05); opacity: .75; }
.act-btn.ready { animation: ready 1.4s 3; }   /* (three bounces, then still: a forever animation keeps the screen redrawing) */
@keyframes ready { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.act-btn:active { transform: translateY(4px) scale(.94) !important; box-shadow: 0 2px 0 rgba(91,63,54,.35); animation: none; }
.act-label { font-size: 13px; font-weight: 900; text-shadow: 0 1.5px 0 var(--ink); line-height: 1.05; max-width: 72px; text-align: center; }
.act-icon { width: 30px; height: 30px; background-size: contain; background-repeat: no-repeat; background-position: center; margin-bottom: 2px; }
.pill-btn { pointer-events: auto; padding: 12px 20px; border-radius: 999px; font-weight: 900; font-size: 15px; background: var(--green); color: #fff; border: 3px solid var(--ink); box-shadow: 0 5px 0 rgba(91,63,54,.35); text-shadow: 0 1.5px 0 rgba(0,0,0,.2); }
.pill-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(91,63,54,.35); }
.open-btn { position: absolute; right: calc(112px + var(--sar)); bottom: calc(44px + var(--sab)); animation: popIn .35s cubic-bezier(.3,1.6,.5,1); }
.open-btn.closing { background: var(--coral); }
.side-btn { pointer-events: auto; position: absolute; right: calc(26px + var(--sar)); bottom: calc(128px + var(--sab)); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,250,238,.96); border: 3px solid var(--ink); box-shadow: 0 4px 0 rgba(91,63,54,.3); display: grid; place-items: center; }
.bag-ico { width: 26px; height: 24px; border-radius: 6px 6px 9px 9px; background: #e9b36a; border: 2.5px solid var(--ink); position: relative; }
.bag-ico::before { content: ""; position: absolute; left: 5px; top: -8px; width: 10px; height: 8px; border: 2.5px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; }
.bag-ico::after { content: ""; position: absolute; left: 3px; right: 3px; top: 7px; height: 3px; background: #c98f45; border-radius: 2px; }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------------------------------------------------------------- dialogue */
#dialog { position: absolute; z-index: 40; left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); bottom: calc(12px + var(--sab)); animation: dlgIn .28s cubic-bezier(.2,1.2,.4,1); }
#dialog.out { animation: dlgOut .2s ease forwards; }
@keyframes dlgIn { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dlgOut { to { transform: translateY(24px); opacity: 0; } }
.dlg-box { position: relative; min-height: 132px; padding: 22px 18px 18px; background: var(--paper); border: 3.5px solid var(--ink); border-radius: 22px;
  box-shadow: inset 0 0 0 4px #f3e6cf, 0 6px 0 rgba(91,63,54,.25), 0 16px 30px rgba(60,40,30,.25); }
.dlg-portrait { position: absolute; left: 10px; top: -86px; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #fff6e2, #f8dcc4); border: 3.5px solid var(--ink); overflow: hidden; box-shadow: 0 4px 0 rgba(91,63,54,.25); }
.dlg-portrait canvas { width: 100%; height: 100%; display: block; }
#dialog.no-portrait .dlg-portrait { display: none; }
.dlg-name { position: absolute; left: 120px; top: -18px; padding: 5px 16px; background: var(--pink); color: #fff; border: 3px solid var(--ink); border-radius: 14px; font-weight: 900; font-size: 15px; text-shadow: 0 1.5px 0 rgba(0,0,0,.18); box-shadow: 0 3px 0 rgba(91,63,54,.25); }
#dialog.no-portrait .dlg-name { left: 18px; }
.dlg-name.cat { background: #8ea3c8; }
.dlg-text { font-size: 17px; font-weight: 800; line-height: 1.45; min-height: 50px; white-space: pre-wrap; }
.dlg-text em { font-style: normal; color: var(--pink2); }
.dlg-text strong { color: #3f8f5f; }
.dlg-next { position: absolute; right: 18px; bottom: 10px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 11px solid var(--pink2); opacity: 0; }
.dlg-next.on { opacity: 1; animation: nextBob .7s ease-in-out infinite; }
@keyframes nextBob { 50% { transform: translateY(4px); } }
.dlg-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dlg-choices button { padding: 11px 14px; border-radius: 14px; background: #fff; border: 3px solid var(--ink); font-weight: 900; font-size: 15px; text-align: left; box-shadow: 0 3px 0 rgba(91,63,54,.25); animation: popIn .25s cubic-bezier(.3,1.5,.5,1) both; }
.dlg-choices button:nth-child(2) { animation-delay: .05s; } .dlg-choices button:nth-child(3) { animation-delay: .1s; }
.dlg-choices button::before { content: "▸ "; color: var(--pink2); }

/* ---------------------------------------------------------------- cinema */
#cinema { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
#cinema .bar { position: absolute; left: 0; right: 0; height: 0; background: #1f1916; transition: height .6s cubic-bezier(.3,.8,.3,1); }
#cinema .bar.top { top: 0; } #cinema .bar.bottom { bottom: 0; }
#cinema.on .bar { height: calc(9vh + var(--sat)); } #cinema.on .bar.bottom { height: calc(9vh + var(--sab)); }
.skip-btn { pointer-events: auto; position: absolute; right: calc(14px + var(--sar)); top: calc(14px + var(--sat)); padding: 8px 14px; border-radius: 999px; background: rgba(255,248,234,.2); color: #fff8ea; font-weight: 900; font-size: 13px; border: 2px solid rgba(255,248,234,.5); z-index: 2; }
.caption { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); text-align: center; color: #fff; font-weight: 900; font-size: 22px; text-shadow: 0 2px 0 rgba(60,40,30,.6); background: rgba(45,32,28,.45); border-radius: 20px; padding: 10px 20px; opacity: 0; transition: opacity 1s; line-height: 1.35; }   /* a soft dark card keeps it readable on a pale sky */
.caption small { display: block; font-size: 14px; opacity: .9; margin-top: 6px; }
.caption.on { opacity: 1; }

/* ---------------------------------------------------------------- fade */
#fade { position: absolute; inset: 0; z-index: 90; background: #140f0d; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
#fade.on { opacity: 1; pointer-events: auto; }
#fade.slow { transition-duration: .9s; }
#fade.iris { background: transparent; }

/* ---------------------------------------------------------------- sheets (bottom panels) */
#sheets { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; background: rgba(40,28,24,.38); animation: fadeIn .2s ease; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-wrap.out { animation: fadeOut .22s ease forwards; }
.sheet-wrap.clear { background: transparent; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.sheet { position: relative; max-height: calc(88% - var(--sat)); display: flex; flex-direction: column; background: var(--cream); border: 3.5px solid var(--ink); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 18px 16px calc(16px + var(--sab)); box-shadow: 0 -8px 30px rgba(40,28,24,.25); animation: sheetUp .34s cubic-bezier(.2,1.1,.35,1); }
.sheet-wrap.out .sheet { animation: sheetDown .22s ease forwards; }
@keyframes sheetUp { from { transform: translateY(100%); } } @keyframes sheetDown { to { transform: translateY(105%); } }
.sheet.full { height: calc(100% - var(--sat) - 8px); max-height: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-head .who { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 50% 60%, #fff6e2, #f8dcc4); flex: none; overflow: hidden; }
.sheet-head .who canvas { width: 100%; height: 100%; display: block; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.1; }
.sheet-head h2 small { display: block; font-size: 12px; font-weight: 800; opacity: .65; margin-top: 2px; }
.sheet-head .x { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); font-weight: 900; font-size: 18px; box-shadow: 0 3px 0 rgba(91,63,54,.25); flex: none; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; flex: none; }           /* every tab visible: long lists wrap onto a second row */
.tabs button { flex: 1 1 auto; padding: 8px 12px; border-radius: 999px; background: #f3e6cf; font-weight: 900; font-size: 13px; border: 2.5px solid transparent; white-space: nowrap; }
.tabs button.on { background: #fff; border-color: var(--ink); box-shadow: 0 2px 0 rgba(91,63,54,.25); }
.tabs.icons { flex-wrap: nowrap; gap: 4px; }        /* one row: icon over a short label */
.tabs.icons button { flex: 1 1 0; min-width: 0; padding: 6px 2px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; transition: flex-grow .2s; }
.tabs.icons button img { width: 24px; height: 24px; flex: none; }
.tabs.icons button span { display: none; white-space: nowrap; }       /* icons only… */
.tabs.icons button.on { flex: 0 0 auto; padding: 6px 10px; }              /* …and the open tab says its name in full */
.tabs.icons button.on span { display: inline; }
.list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px; background: #fff; border: 2.5px solid #e9d8bf; border-radius: 18px; transition: transform .15s; }
.row.dim { opacity: .55; }
.row .ico { width: 48px; height: 48px; border-radius: 14px; background: #fbf1df; display: grid; place-items: center; flex: none; }
.row .ico img { width: 40px; height: 40px; }
.row .info { flex: 1; min-width: 0; }
.row .info b { display: block; font-size: 15px; font-weight: 900; }
.row .info small { display: block; font-size: 12px; font-weight: 700; opacity: .7; line-height: 1.3; }
.row .have { font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 8px; background: #f3e6cf; display: inline-block; margin-top: 3px; }
.buy { min-width: 76px; padding: 10px 12px; border-radius: 14px; background: var(--green); color: #fff; font-weight: 900; font-size: 14px; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 rgba(91,63,54,.3); text-shadow: 0 1px 0 rgba(0,0,0,.2); white-space: nowrap; }
.buy:disabled { background: #cbbfae; box-shadow: none; opacity: .8; }
.buy.alt { background: var(--gold); color: var(--ink); text-shadow: none; }
.buy.pink { background: var(--pink); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 34px; height: 34px; border-radius: 10px; background: #f3e6cf; font-weight: 900; font-size: 18px; border: 2px solid #e1ccad; }
.qty span { min-width: 22px; text-align: center; font-weight: 900; }
.need { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.need span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px 4px 4px; border-radius: 12px; background: #fff; border: 2px solid #e9d8bf; font-weight: 900; font-size: 13px; }
.need span img { width: 22px; height: 22px; }
.need span.ok { border-color: var(--green); background: #effae9; }
.need span.no { border-color: #f2b1a8; background: #fff0ec; }
.sheet .foot { display: flex; gap: 8px; margin-top: 12px; }
.sheet .foot .btn { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 16px; background: var(--green); color: #fff; font-weight: 900; font-size: 16px; border: 3px solid var(--ink); box-shadow: 0 4px 0 rgba(91,63,54,.3); text-shadow: 0 1.5px 0 rgba(0,0,0,.18); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(91,63,54,.3); }
.btn.big { width: 100%; padding: 15px; font-size: 17px; }
.btn.ghost { background: #fff; color: var(--ink); text-shadow: none; }
.btn.pink { background: var(--pink); } .btn.gold { background: var(--gold); color: var(--ink); text-shadow: none; } .btn.coral { background: var(--coral); }
.btn:disabled { background: #cbbfae; box-shadow: none; }
.empty-note { text-align: center; padding: 22px 12px; font-weight: 800; opacity: .6; }
.empty-note a, .auth-legal a { color: inherit; font-weight: 900; text-decoration: underline; text-underline-offset: 2px; }
.section-title { font-size: 12px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; opacity: .55; margin: 12px 4px 6px; }
.gift-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 4px 10px; }
.gift-pick { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 2px solid #e1ccad; background: #fff; font: inherit; font-weight: 900; font-size: 12px; cursor: pointer; }
.gift-pick img { width: 22px; height: 22px; }
.gift-row .link-btn { margin: 0 0 0 auto; font-size: 12px; }
.friend-code { font-family: ui-monospace, monospace; letter-spacing: 2px; background: #fff3c8; padding: 1px 6px; border-radius: 6px; }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin: 8px 0 12px; }
.coll { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 3px; border-radius: 12px; background: var(--paper); border: 2px solid #ead9bd; text-align: center; }
.coll img { width: 34px; height: 34px; }
.coll small { font-size: 9.5px; font-weight: 800; line-height: 1.1; }
.coll.locked { opacity: .45; }
.coll.locked b { font-size: 22px; line-height: 34px; color: var(--ink2); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 2px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; border-radius: 16px; border: 3px solid var(--ink); background: var(--paper); font: inherit; text-align: center; cursor: pointer; }
.badge .glyph { font-size: 26px; line-height: 1.1; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 3px solid; }
.badge b { font-size: 11.5px; line-height: 1.15; }
.badge small { font-size: 9.5px; font-weight: 800; opacity: .65; line-height: 1.15; }
.badge.locked { opacity: .5; filter: grayscale(1); }
.badge.shown { box-shadow: 0 0 0 3px #f08ca0; }
.t-bronze .glyph { border-color: #c98a55; background: #fbe8d6; } .t-silver .glyph { border-color: #a9b3be; background: #eef2f6; }
.t-gold .glyph { border-color: #e3a52c; background: #fff3c8; } .t-legend .glyph { border-color: #9b6bd6; background: linear-gradient(135deg, #ffe3f1, #e3f0ff 50%, #e9ffe3); }
.badge-mini { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 4px; border-radius: 50%; border: 2px solid; font-size: 12px; vertical-align: -4px; }
.badge-mini.t-bronze { border-color: #c98a55; background: #fbe8d6; } .badge-mini.t-silver { border-color: #a9b3be; background: #eef2f6; } .badge-mini.t-gold { border-color: #e3a52c; background: #fff3c8; } .badge-mini.t-legend { border-color: #9b6bd6; background: #f3e8ff; }
.mini-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mini-chip { display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px 1px 2px; border-radius: 9px; background: rgba(255,255,255,.75); font-size: 11px; font-weight: 900; }
.mini-chip img { width: 18px; height: 18px; }
.mini-chip.more { padding: 1px 7px; opacity: .75; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 900; background: #f3e6cf; }
.pill.new { background: var(--pink); color: #fff; }
.pill.lv { background: var(--mint); }

/* ---------------------------------------------------------------- service (order) screen */
.svc { position: absolute; inset: 0; pointer-events: auto; background: #f6e9d2; display: flex; flex-direction: column; animation: fadeIn .2s; }
.svc.out { animation: fadeOut .2s forwards; }
.svc-awning { height: calc(34px + var(--sat)); padding-top: var(--sat); background: repeating-linear-gradient(90deg, #f08ca0 0 34px, #fff5df 34px 68px); border-bottom: 3px solid var(--ink); position: relative; flex: none; }
.svc-awning::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; background: radial-gradient(circle at 17px 0, #f08ca0 16px, transparent 17px) 0 0/68px 12px, radial-gradient(circle at 51px 0, #fff5df 16px, transparent 17px) 0 0/68px 12px; }
.svc-top { display: flex; align-items: center; gap: 8px; padding: 18px 12px 4px; }
.svc-queue { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; min-height: 44px; }
.qface { flex: 0 1 44px; min-width: 28px; width: 44px; height: auto; aspect-ratio: 1; align-self: center; border-radius: 50%; background: #fff6e2; border: 3px solid var(--ink); position: relative; overflow: visible; animation: popIn .3s cubic-bezier(.3,1.5,.5,1); }
.qface canvas { width: 100%; height: 100%; border-radius: 50%; display: block; }
.qface svg { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); transform: rotate(-90deg); }
.qface.cur { border-color: var(--pink2); }
.svc-money { flex: none; font-weight: 900; font-size: 15px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; }
.svc-close { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); font-weight: 900; font-size: 18px; box-shadow: 0 3px 0 rgba(91,63,54,.25); }
.svc-customer { display: flex; align-items: flex-end; gap: 6px; padding: 4px 12px 8px; min-height: 128px; position: relative; }
.svc-portrait { width: 108px; height: 124px; flex: none; position: relative; }
.svc-portrait canvas { width: 100%; height: 100%; display: block; }
.svc-portrait.in { animation: custIn .45s cubic-bezier(.2,1.2,.4,1); }
.svc-portrait.leave { animation: custOut .45s ease forwards; }
@keyframes custIn { from { transform: translateX(-60px); opacity: 0; } }
@keyframes custOut { to { transform: translateX(80px); opacity: 0; } }
.svc-bubble { flex: 1; position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 10px 12px 10px; box-shadow: 0 3px 0 rgba(91,63,54,.2); margin-bottom: 6px; animation: popIn .3s cubic-bezier(.3,1.5,.5,1); }
.svc-bubble::before { content: ""; position: absolute; left: -14px; bottom: 22px; border: 8px solid transparent; border-right: 12px solid var(--ink); }
.svc-bubble::after { content: ""; position: absolute; left: -8px; bottom: 24px; border: 6px solid transparent; border-right: 9px solid #fff; }
.svc-order { font-weight: 800; font-size: 15px; line-height: 1.35; }
.svc-order em { font-style: normal; color: var(--pink2); font-weight: 900; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.svc-chips span { font-size: 11px; font-weight: 900; padding: 3px 7px; border-radius: 8px; background: #f3e6cf; transition: background .2s; }
.svc-chips span.done { background: #d7f2cf; color: #2f7f45; }
.svc-chips span.bad { background: #ffe0da; color: #b3453a; }
.patience { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 11px; font-weight: 900; letter-spacing: .5px; }
.patience .bar { flex: 1; height: 12px; border-radius: 8px; border: 2.5px solid var(--ink); background: #fff; overflow: hidden; }
.patience .bar i { display: block; height: 100%; width: 100%; background: #86cf8a; border-radius: 0; transition: background .4s; }   /* the track's rounded border clips it: no gaps at the ends */
.patience .bar i.mid { background: #f2c14e; } .patience .bar i.low { background: #ef7a6a; }
.svc-counter { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #f3dcb8; border-top: 4px solid #c9955e; box-shadow: inset 0 6px 0 rgba(255,255,255,.35); padding: 8px 10px calc(10px + var(--sab)); gap: 8px; }
.svc-label { align-self: flex-start; padding: 4px 12px; background: #e9c796; border: 2.5px solid #9c6e46; border-radius: 8px; font-weight: 900; font-size: 12px; letter-spacing: 1px; color: #6e4a2e; box-shadow: 0 2px 0 rgba(91,63,54,.2); }
.svc-work { display: flex; gap: 10px; align-items: stretch; }
.svc-board { width: 42%; min-width: 132px; background: repeating-linear-gradient(90deg, #e2b57f 0 16px, #d9a870 16px 18px); border: 3px solid #9c6e46; border-radius: 16px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 4px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.08); }
.svc-board canvas { width: 100%; height: min(150px, 16vh); display: block; }
.svc-board.wobble canvas { animation: wobble .35s ease; }
@keyframes wobble { 30% { transform: scale(1.06, .94); } 60% { transform: scale(.97, 1.03); } }
.svc-steps { display: flex; gap: 4px; justify-content: center; margin-top: 2px; }
.svc-steps { flex-wrap: wrap; gap: 3px; }
.svc-steps i { width: 21px; height: 21px; border-radius: 7px; background: rgba(255,255,255,.55); border: 2px dashed rgba(91,63,54,.3); display: grid; place-items: center; transition: background .2s, transform .2s, border-color .2s; }
.svc-steps i img { width: 15px; height: 15px; opacity: .35; filter: grayscale(.7); transition: opacity .2s, filter .2s; }
.svc-steps i.on { background: #e6f6dc; border: 2px solid var(--green); transform: scale(1.08); }
.svc-steps i.on img, .svc-steps i.bad img, .svc-steps i.swap img { opacity: 1; filter: none; }
.svc-steps i.swap { background: #fff3cf; border: 2px solid #f2c14e; }
.svc-steps i.bad { background: #ffe0da; border: 2px solid var(--red); }
.svc-opts { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opt-row { display: flex; flex-direction: column; gap: 3px; }
.opt-row small { font-size: 10.5px; font-weight: 900; letter-spacing: .6px; opacity: .7; text-transform: uppercase; }
.seg { display: flex; background: #f7ead6; border: 2.5px solid #d9bf98; border-radius: 12px; padding: 2px; gap: 2px; }
.seg button { flex: 1; min-width: 44px; min-height: 34px; padding: 7px 8px; border-radius: 9px; font-weight: 900; font-size: 12.5px; transition: background .15s, color .15s; white-space: nowrap; }
.seg button.on { background: #fff; box-shadow: 0 2px 0 rgba(91,63,54,.2); color: var(--pink2); outline: 2.5px solid var(--pink2); }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; flex: 1; min-height: 0; align-content: start; overflow-y: auto; touch-action: pan-y; }
.ing { position: relative; background: #c9ccd0; border: 3px solid #7d8189; border-radius: 14px; padding: 4px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12), 0 3px 0 rgba(91,63,54,.25); transition: transform .12s; }
.ing .tray { width: 100%; aspect-ratio: 1.25; border-radius: 9px; background: #eef0f2; display: grid; place-items: center; box-shadow: inset 0 3px 0 rgba(0,0,0,.08); }
.ing img { width: 78%; max-height: 90%; object-fit: contain; }
.ing b { font-size: 10.5px; font-weight: 900; line-height: 1.1; text-align: center; color: #3d3a42; }
.ing .cnt { position: absolute; top: -7px; right: -5px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #fff; border: 2.5px solid var(--ink); font-size: 11px; font-weight: 900; display: grid; place-items: center; }
.ing.low .cnt { background: #ffe0da; }
.ing.out { opacity: .45; filter: grayscale(.7); }
.ing.hint { outline: 3px solid var(--pink); outline-offset: 1px; }
.ing.act { background: #f3c0cb; border-color: var(--pink2); }
.ing:active { transform: scale(.92); }
.ing.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.svc-bottom { display: flex; gap: 8px; }
.svc-bottom .btn { flex: 1; padding: 13px 10px; }
.svc-bottom .btn.trash { flex: 0 0 66px; background: #ffe7a8; color: var(--ink); text-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 4px; }
.svc-bottom .btn.trash svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.svc-bottom .btn.trash small { font-size: 10.5px; font-weight: 900; letter-spacing: .3px; line-height: 1; }
.svc-waiting { position: absolute; left: 12px; right: 12px; top: 80px; text-align: center; font-weight: 900; font-size: 15px; opacity: .7; }
.flyer { position: absolute; z-index: 60; width: 42px; height: 42px; pointer-events: none; transition: transform .38s cubic-bezier(.4,-0.2,.6,1), opacity .38s; }
.flyer img { width: 100%; height: 100%; }
.verdict { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 62; pointer-events: none; text-align: center; animation: verdict 1.2s ease forwards; }
.verdict b { display: block; font-size: 34px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 var(--ink), 0 0 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink); }
.verdict small { display: block; margin-top: 4px; font-size: 16px; font-weight: 900; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 4px 10px; }
@keyframes verdict { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 18% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 0; } }
.coinfly { position: absolute; z-index: 70; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 38% 35%, #fff2b0, #f2c14e 55%, #d99a25); border: 2px solid var(--ink); pointer-events: none; }

/* ---------------------------------------------------------------- prep screen */
.prep { position: absolute; inset: 0; pointer-events: auto; background: #f6e9d2; display: flex; flex-direction: column; animation: fadeIn .2s; }
.prep.out { animation: fadeOut .2s forwards; }
.prep-head { display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--sat)) 14px 8px; }
.prep-head h2 { margin: 0; font-size: 20px; font-weight: 900; flex: 1; } .prep-head h2 small { display: block; font-size: 12px; opacity: .65; }
.prep-raw { display: flex; gap: 8px; padding: 6px 12px; overflow-x: auto; touch-action: pan-x; flex: none; }
.prep-raw .ing { width: 84px; flex: none; }
.prep-table { flex: 1; position: relative; margin: 8px 12px; border-radius: 22px; background: #d9b58a; border: 3px solid #9c6e46; box-shadow: inset 0 -6px 0 rgba(0,0,0,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 0; }
.prep-station { width: min(78%, 300px); aspect-ratio: 1.5; border-radius: 22px; position: relative; display: grid; place-items: center; transition: transform .15s; }
.prep-station.board { background: repeating-linear-gradient(90deg, #efc893 0 18px, #e6bc85 18px 20px); border: 3px solid #9c6e46; box-shadow: 0 6px 0 #9c6e46; }
.prep-station.grill { background: repeating-linear-gradient(90deg, #4a4550 0 10px, #6b6572 10px 13px); border: 3px solid #2f2b33; box-shadow: 0 6px 0 #2f2b33, inset 0 0 30px rgba(255,120,60,.35); }
.prep-station.pan, .prep-station.pot { background: radial-gradient(circle, #5b5660 0 55%, #3d3a42 56%); border-radius: 50%; aspect-ratio: 1; width: min(52%, 200px); border: 3px solid var(--ink); box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.prep-station.pot { background: radial-gradient(circle, #9fd6e8 0 50%, #b7bec6 51%); }
.prep-station:active { transform: scale(.97); }
.prep-station canvas { width: 100%; height: 100%; }
.prep-station .tip { position: absolute; bottom: -34px; left: 0; right: 0; text-align: center; font-weight: 900; font-size: 14px; color: #6e4a2e; }
.prep-bowls { display: flex; gap: 10px; padding: 6px 12px calc(12px + var(--sab)); overflow-x: auto; touch-action: pan-x; flex: none; }
.bowl { width: 84px; flex: none; text-align: center; position: relative; }
.bowl .dish { width: 76px; height: 50px; margin: 0 auto; border-radius: 0 0 38px 38px; background: #fff; border: 3px solid var(--ink); border-top-width: 4px; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 -6px 0 #e9eef2; }
.bowl .dish img { width: 46px; height: 46px; margin-top: 2px; }
.bowl b { display: block; font-size: 11px; font-weight: 900; margin-top: 3px; }
.bowl .cnt { position: absolute; top: -8px; right: 0; min-width: 24px; height: 24px; border-radius: 12px; background: var(--green); color: #fff; border: 2.5px solid var(--ink); font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.bowl.target .dish { border-color: var(--pink2); box-shadow: 0 0 0 4px rgba(240,140,160,.4), inset 0 -6px 0 #e9eef2; animation: ready 1s infinite; }
.bowl.pop .dish { animation: bump .4s; }

/* ---------------------------------------------------------------- summary */
.summary { touch-action: pan-y; position: absolute; inset: 0; z-index: 95; pointer-events: auto; background: radial-gradient(circle at 50% 20%, #3b3561, #1d1a2e); color: #fff8ea; display: flex; flex-direction: column; align-items: center; padding: calc(28px + var(--sat)) 18px calc(20px + var(--sab)); overflow-y: auto; animation: fadeIn .6s; }
.summary .moon { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 62% 38%, transparent 0 38%, #fff4c8 39%); box-shadow: 0 0 40px rgba(255,240,180,.4); margin-bottom: 6px; animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.summary h1 { margin: 6px 0 2px; font-size: 26px; font-weight: 900; }
.summary .sub { opacity: .7; font-weight: 800; font-size: 13px; margin-bottom: 14px; }
.summary .sum-next { position: sticky; bottom: 0; flex: none; z-index: 2; margin-top: 10px; box-shadow: 0 6px 0 rgba(0,0,0,.2), 0 -14px 26px #1d1a2e; }   /* always in reach: the long summary used to hide it below the fold */
.sum-card { width: 100%; max-width: 420px; background: rgba(255,248,234,.08); border: 2px solid rgba(255,248,234,.18); border-radius: 22px; padding: 14px; margin-bottom: 10px; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sum-stat { background: rgba(255,248,234,.08); border-radius: 16px; padding: 10px 12px; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .4s cubic-bezier(.3,1.4,.5,1); }
.sum-stat.on { opacity: 1; transform: none; }
.sum-stat small { display: block; font-size: 11px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; opacity: .7; }
.sum-stat b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.sum-stat.wide { grid-column: span 2; }
.sum-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sum-list li { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 14px; padding: 8px 10px; background: rgba(255,248,234,.06); border-radius: 12px; }
.sum-list li.ach { background: rgba(242,193,78,.18); color: #ffe7a8; }

/* ---------------------------------------------------------------- toasts */
#soundHint { position: absolute; left: 50%; bottom: calc(150px + var(--sab)); transform: translateX(-50%); z-index: 81; pointer-events: none; padding: 7px 14px; border-radius: 999px; background: rgba(40,28,24,.72); color: #fff8ea; font-weight: 900; font-size: 13px; white-space: nowrap; animation: fadeIn .4s; transition: opacity .35s; }
#soundHint.out { opacity: 0; }
#toasts { position: absolute; left: 0; right: 0; top: var(--toast-top, calc(100px + var(--sat))); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: calc(100% - 28px); padding: 9px 16px 9px 10px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; font-weight: 900; font-size: 14px; box-shadow: 0 4px 0 rgba(91,63,54,.25); animation: toastIn .4s cubic-bezier(.3,1.5,.5,1); }
.toast.out { animation: toastOut .3s ease forwards; }
.toast img { width: 32px; height: 32px; }
.toast small { display: block; font-size: 11.5px; opacity: .7; font-weight: 800; white-space: pre-line; }
.toast.ach { background: #fff3c8; }
.toast.bad { background: #ffe9e4; }
.toast.song { background: rgba(255,253,246,.92); font-size: 12.5px; padding: 6px 14px; border-width: 2px; }
@keyframes toastIn { from { transform: translateY(-16px) scale(.85); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0; } }

/* ---------------------------------------------------------------- reward card (recipe discovery etc.) */
.reward { position: absolute; inset: 0; z-index: 85; pointer-events: auto; display: grid; place-items: center; background: rgba(40,28,24,.55); animation: fadeIn .25s; }
.reward.out { animation: fadeOut .25s forwards; }
.reward-card { width: min(84vw, 340px); perspective: 900px; }
.reward-inner { position: relative; background: var(--paper); border: 4px solid var(--ink); border-radius: 26px; padding: 20px 18px 18px; text-align: center; box-shadow: 0 10px 0 rgba(91,63,54,.25), 0 20px 50px rgba(0,0,0,.35); animation: flipIn .8s cubic-bezier(.2,1.1,.3,1); }
@keyframes flipIn { 0% { transform: rotateY(90deg) scale(.6); } 60% { transform: rotateY(-10deg) scale(1.04); } 100% { transform: none; } }
.reward-inner .rays { position: absolute; inset: -60px; z-index: -1; background: repeating-conic-gradient(from 0deg, rgba(255,225,140,.55) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: spin 10s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
.reward-inner .kicker { font-size: 12px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pink2); }
.reward-inner h2 { margin: 4px 0 2px; font-size: 26px; font-weight: 900; }
.reward-inner h3 { margin: 0 0 8px; font-size: 14px; font-weight: 800; opacity: .65; }
.reward-inner .art { width: 130px; height: 130px; margin: 6px auto; background: radial-gradient(circle, #fff2d0, #fbe3c4 65%, transparent 66%); border-radius: 50%; display: grid; place-items: center; }
.reward-inner .art img { width: 108px; height: 108px; animation: floaty 2.4s ease-in-out infinite; }
.reward-inner p { font-weight: 700; font-size: 14px; line-height: 1.4; margin: 6px 0 14px; }
.reward-inner .steps-mini { display: flex; justify-content: center; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.reward-inner .steps-mini img { width: 30px; height: 30px; background: #fbf1df; border-radius: 9px; padding: 2px; }

/* ---------------------------------------------------------------- auth */
#auth { z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 20px 16px calc(24px + var(--sab)); background: #aee4ed; }
#authBg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-card { position: relative; width: 100%; max-width: 420px; padding: 22px 20px 20px; background: rgba(255,250,240,.97); border: 3.5px solid var(--ink); border-radius: 28px; box-shadow: var(--shadow); animation: sheetUp .6s cubic-bezier(.2,1.1,.35,1); }
.logo { text-align: center; line-height: .9; margin-top: -4px; }
.logo-name { display: block; font-size: 52px; font-weight: 900; letter-spacing: -1px; color: var(--pink); text-shadow: 3px 3px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink); }
.logo-island { display: block; font-size: 30px; font-weight: 900; color: #6fbfa0; margin-top: 2px; text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
.tagline { text-align: center; font-weight: 800; font-size: 13px; opacity: .7; margin: 8px 0 14px; }
#authTabs { margin-bottom: 12px; }
#authTabs button { padding: 9px 4px; font-size: 14px; }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 12px; font-weight: 900; margin: 0 0 4px 4px; opacity: .75; }
.field input { width: 100%; padding: 13px 14px; border-radius: 14px; border: 3px solid #e1ccad; background: #fff; font-size: 16px; font-weight: 800; outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--pink); }
[hidden] { display: none !important; }
.auth-feats { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.auth-feats li { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; line-height: 1.25; }
.auth-feats img { width: 30px; height: 30px; flex: none; }
#authLanding .btn { width: 100%; }
#authLanding .btn + .btn { margin-top: 8px; }
.auth-note { text-align: center; font-size: 12.5px; font-weight: 800; opacity: .7; margin: 10px 4px 0; line-height: 1.35; }
.link-btn { display: block; margin: 10px auto 0; background: none; border: 0; padding: 4px 8px; font: inherit; font-weight: 900; font-size: 13.5px; color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pw-field { position: relative; }
.pw-field input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; font-size: 18px; opacity: .55; cursor: pointer; }
.pw-eye.on { opacity: 1; }
.auth-legal { text-align: center; font-size: 13px; font-weight: 700; margin: 10px 0 0; opacity: .85; }
.auth-msg { min-height: 18px; margin: 2px 4px 10px; font-size: 13px; font-weight: 800; color: #b3453a; }
.auth-msg.ok { color: #2f7f45; }

/* ---------------------------------------------------------------- name / look modal */
.modal { position: absolute; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(40,28,24,.45); pointer-events: auto; animation: fadeIn .2s; }
.modal .card { width: 100%; max-width: 380px; background: var(--paper); border: 3.5px solid var(--ink); border-radius: 26px; padding: 18px; box-shadow: var(--shadow); animation: popIn .35s cubic-bezier(.3,1.4,.5,1); }
.modal h2 { margin: 0 0 4px; font-size: 20px; font-weight: 900; text-align: center; }
.modal p { margin: 0 0 12px; font-size: 13px; font-weight: 800; opacity: .7; text-align: center; }
.look-preview { width: 150px; height: 150px; margin: 0 auto 8px; flex: none; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #fff6e2, #f8dcc4); border: 3px solid var(--ink); overflow: hidden; }
.look-preview canvas { width: 100%; height: 100%; }
.cycler { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.cycler small { width: 72px; font-weight: 900; font-size: 12px; opacity: .7; }
.cycler button { width: 38px; height: 38px; border-radius: 12px; background: #f3e6cf; font-weight: 900; font-size: 18px; border: 2.5px solid #e1ccad; }
.cycler .sw { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }   /* left-aligned, so every row lines up */
.cycler .sw i { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 3px solid rgba(91,63,54,.15); }   /* (20px dots were too small to hit) */
.cycler .sw i.on { border-color: var(--ink); transform: scale(1.15); }
.cycler .val { flex: 1; text-align: center; font-weight: 900; }
.cycler .g-seg { flex: 1; min-width: 0; }
.cycler .g-seg button { width: auto; min-width: 0; height: 36px; flex: 1; font-size: 14px; border: none; background: transparent; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; }
.cycler .g-seg button.on { background: #fff; }

/* ---------------------------------------------------------------- boot + rotate */
#boot { z-index: 120; display: grid; place-items: center; background: #fff4de; transition: opacity .5s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; width: 200px; }
.boot-cat { width: 90px; height: 90px; margin: 0 auto 16px; border-radius: 50%; background: radial-gradient(circle at 35% 45%, #3d3550 0 6px, transparent 7px), radial-gradient(circle at 65% 45%, #3d3550 0 6px, transparent 7px), radial-gradient(circle at 50% 60%, #f7a6b4 0 4px, transparent 5px), #fffaf1; border: 3.5px solid var(--ink); position: relative; animation: floaty 1.6s ease-in-out infinite; }
.boot-cat::before, .boot-cat::after { content: ""; position: absolute; top: -12px; width: 26px; height: 26px; background: #fffaf1; border: 3.5px solid var(--ink); border-radius: 4px 70% 0 70%; z-index: -1; }
.boot-cat::before { left: 6px; transform: rotate(-10deg); background: #a9bcdc; } .boot-cat::after { right: 6px; transform: rotate(100deg); }
.boot-bar { height: 12px; border-radius: 8px; border: 3px solid var(--ink); background: #fff; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--pink); transition: width .3s; }
#boot small { display: block; margin-top: 10px; font-weight: 800; opacity: .6; }
#rotate { display: none; position: absolute; inset: 0; z-index: 200; background: #2d2622; color: #fff8ea; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.rotate-card b { display: block; font-size: 22px; margin: 18px 0 6px; } .rotate-card small { font-size: 14px; opacity: .75; font-weight: 700; }
.rotate-phone { width: 46px; height: 78px; border: 4px solid #fff8ea; border-radius: 10px; margin: 0 auto; animation: rot 2.2s ease-in-out infinite; }
@keyframes rot { 0%, 20% { transform: rotate(-90deg); } 55%, 100% { transform: rotate(0); } }
@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) { #rotate { display: flex; } }

/* ---------------------------------------------------------------- house decorating */
.deco-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 45; pointer-events: auto; background: var(--cream); border-top: 3.5px solid var(--ink); border-radius: 22px 22px 0 0; padding: 8px 12px calc(10px + var(--sab)); animation: sheetUp .3s cubic-bezier(.2,1.1,.35,1); }
.deco-bar .row-scroll { display: flex; gap: 8px; overflow-x: auto; touch-action: pan-x; padding: 6px 2px 4px; }
.deco-bar.folded .row-scroll { display: none; }
.deco-head { display: flex; align-items: center; gap: 8px; }
.deco-item { flex: none; width: 76px; padding: 6px 4px; border-radius: 14px; background: #fff; border: 2.5px solid #e9d8bf; text-align: center; font-size: 10.5px; font-weight: 900; }
.deco-item:active { border-color: var(--pink2); }
.deco-item canvas { width: 56px; height: 44px; display: block; margin: 0 auto 2px; }
.deco-hint { flex: 1; font-size: 12px; font-weight: 800; opacity: .75; line-height: 1.25; margin-left: 2px; }
.deco-actions { display: flex; gap: 6px; flex: none; }
.deco-actions .btn { padding: 8px 14px; font-size: 14px; }
.deco-empty { font-size: 12px; font-weight: 800; opacity: .6; padding: 10px 4px; }
.btn.small.icon { font-size: 21px; line-height: 1; padding: 4px 11px; }
.btn.small { padding: 7px 11px; font-size: 13px; border-width: 2.5px; border-radius: 12px; box-shadow: 0 3px 0 rgba(91,63,54,.3); }
/* the toolbar floating over the piece you're moving */
.deco-tools { position: absolute; z-index: 46; display: flex; gap: 5px; padding: 5px; background: rgba(255,248,234,.95); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 rgba(91,63,54,.25); pointer-events: auto; }
.deco-tools.hidden { display: none; }
.deco-tools::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; }

/* map */
.map-wrap { position: relative; flex: 1; min-height: 0; border-radius: 20px; overflow: hidden; border: 3px solid var(--ink); background: #5ec2cf; }
.map-wrap canvas { width: 100%; height: 100%; display: block; }

@media (max-height: 640px) {
  .svc-customer { min-height: 104px; } .svc-portrait { width: 88px; height: 102px; }
  .svc-board canvas { height: 118px; } .svc-order { font-size: 14px; }
  .dlg-box { min-height: 112px; } .dlg-text { font-size: 16px; }
}
@media (max-width: 350px) {
  .chip { padding: 0 9px 0 6px; } .chip b { font-size: 13px; } .chip-money b { font-size: 14px; }
  .stars i { width: 10px; height: 10px; }
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------- state classes */
body.hide-controls #actions, body.in-dialog #actions, body.decorating #actions { opacity: 0; pointer-events: none; }
body.hide-controls #touch, body.decorating #joyBase { pointer-events: none; }
body.decorating #touch { pointer-events: auto; }
body.cutscene #pointer, body.cutscene .quest, body.in-dialog #pointer { opacity: 0 !important; }
body.cutscene .area { opacity: 0 !important; }
#actions { transition: opacity .25s; }
.seg.shake { animation: shake .3s; }
select { -webkit-appearance: none; appearance: none; }
#joyHint { display: none; position: absolute; left: 22px; bottom: calc(136px + var(--sab)); padding: 7px 12px; border-radius: 14px; background: rgba(91,63,54,.8); color: #fff8ea; font-weight: 900; font-size: 13px; pointer-events: none; animation: floaty 2s ease-in-out infinite; }
#joyHint small { display: block; font-size: 11px; opacity: .8; }
body.show-joy-hint #joyHint { display: block; }
body.show-joy-hint #joyBase:not(.on) { opacity: .6; transform: scale(.92); left: 70px; top: auto; bottom: calc(70px + var(--sab)); }

/* ---------------------------------------------------------------- service layout tuning (short Safari viewports) */
.svc-counter { overflow: hidden; }
.svc-work { flex: none; }
.svc-board canvas { height: clamp(104px, 19vh, 160px); }
.opt-row { flex-direction: row; align-items: center; gap: 6px; }
.opt-row small { width: 44px; flex: none; line-height: 1.05; font-size: 10px; }
.opt-row .seg { flex: 1; }
.opt-row small .hq { display: block; margin-top: 2px; font-style: normal; font-size: 11px; letter-spacing: 0; opacity: 1; color: var(--ink); text-transform: none; }
.opt-row small .hq.low { color: #d9433a; }
.seg button { padding: 8px 2px; }
.opt-row .seg { min-width: 0; } .opt-row .seg button { min-width: 0; flex: 1 1 0; }   /* four sugar buttons fit: the 100% button ran off the screen and tapping it slid the whole counter sideways */
.svc-work, .svc-counter { overflow-x: hidden; }
.svc-grid { flex: 1 1 auto; min-height: 102px; grid-template-columns: repeat(5, 1fr); gap: 6px; padding-top: 6px; }
.ing .tray { aspect-ratio: 1.45; }
.ing b { font-size: 10px; }
.svc-customer { min-height: 116px; padding-bottom: 4px; }
.svc-portrait { width: 100px; height: 114px; }
.svc-bottom .btn { padding: 12px 10px; }
body.sheet-open #toasts { top: auto; bottom: calc(14px + var(--sab)); flex-direction: column-reverse; }   /* never over a sheet's title or close button */
body.svc-open #toasts { top: calc(6px + var(--sat)); bottom: auto; flex-direction: column; }   /* the counter screens keep their buttons at the bottom */
body.svc-open #toasts .toast { zoom: .78; pointer-events: none; opacity: .96; }   /* small and tap-through over the counter: two big toasts covered the title, the guide and the close button */
body.svc-open #toasts .toast:nth-child(n+2) { display: none; }
.prep-station .tip { bottom: -40px; font-size: 13px; }
@media (max-height: 700px) { .svc-top { padding-top: 14px; } .svc-order { font-size: 14px; } .svc-chips span { font-size: 10.5px; } }
.svc.rows2 .svc-board canvas { height: clamp(88px, 14vh, 130px); }
.svc.rows2 .svc-customer { min-height: 100px; }
.svc.rows2 .svc-portrait { width: 86px; height: 98px; }
.svc.rows2 .ing b { font-size: 9px; }
.svc.rows2 .svc-grid { gap: 5px; }
.svc-clock { flex: none; display: flex; align-items: center; gap: 5px; font-weight: 900; font-size: 14px; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 5px 9px; font-variant-numeric: tabular-nums; }
.svc-clock .sun { width: 16px; height: 16px; }
.sheet-head .svc-clock { margin-left: auto; }
.sheet-head .svc-clock + .x { margin-left: 0; }
.lang-pick { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.lang-pick button { padding: 6px 12px; border-radius: 999px; font-weight: 900; font-size: 12.5px; background: #f3e6cf; border: 2px solid transparent; }
.lang-pick button.on { background: #fff; border-color: var(--ink); }

/* supermarket aisles */
.aisles { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; flex: none; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.aisles::-webkit-scrollbar { display: none; }
.aisles.more-r { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.aisles.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
.aisles.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.aisle { flex: none; display: flex; align-items: center; gap: 5px; padding: 6px 10px 6px 7px; border-radius: 14px; background: #fff7ea; border: 2.5px solid #e6cfa9; font-weight: 900; font-size: 12.5px; color: var(--ink); }
.aisle img { width: 22px; height: 22px; }
.aisle i { font-style: normal; font-size: 10.5px; background: rgba(91,63,54,.12); border-radius: 8px; padding: 1px 6px; }
.aisle.on { background: #fff; border-color: var(--pink2); color: var(--pink2); box-shadow: 0 2px 0 rgba(91,63,54,.15); }

/* discreet pause button, under the menu button */
.pause-btn { flex: none; width: 30px; height: 30px; margin-right: 0; margin-left: 2px; border-radius: 50%; background: rgba(255,248,234,.72); border: 2px solid rgba(91,63,54,.35); display: flex; gap: 4px; align-items: center; justify-content: center; pointer-events: auto; opacity: .8; }
.pause-btn i { width: 4px; height: 12px; border-radius: 2px; background: var(--ink); opacity: .75; }
.pause-btn:active { transform: scale(.92); }
body.hide-controls .pause-btn, body.cutscene .pause-btn { display: none; }
.pause-card { position: absolute; inset: 0; z-index: 60; background: rgba(40,30,50,.45); display: grid; place-items: center; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .2s; }
.pause-card .pc-in { background: #fff8ea; border: 3px solid #e6cfa9; border-radius: 24px; padding: 22px 26px 18px; width: min(300px, 82vw); text-align: center; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 0 rgba(0,0,0,.12); }
.pause-card h2 { margin: 0; font-size: 26px; }
.pause-card p { margin: 0 0 6px; font-weight: 800; opacity: .7; font-size: 14px; }
.pc-cat { width: 70px; height: 44px; margin: 0 auto; border-radius: 40px 40px 18px 18px; background: #fffaf2; border: 3px solid var(--ink); position: relative; }
.pc-cat::before, .pc-cat::after { content: ''; position: absolute; top: -12px; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 15px solid var(--ink); }
.pc-cat::before { left: 8px; } .pc-cat::after { right: 8px; }

/* level badge + xp bar on the reputation chip */
.chip-rep { position: relative; gap: 4px; padding-bottom: 7px; }
.chip-rep .lv { font-size: 12px; font-weight: 900; background: var(--pink2, #e56b8b); color: #fff; border-radius: 9px; padding: 1px 6px; white-space: nowrap; }
.chip-rep .stars i { width: 9px; height: 9px; }
.chip-rep .xpbar { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 4px; border-radius: 3px; background: rgba(91,63,54,.15); overflow: hidden; }
.chip-rep .xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd35a, #f28f7c); border-radius: 3px; transition: width .4s; }

/* level-up celebration */
.levelup { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(40,28,50,.5); animation: fadeIn .25s; overflow: hidden; }
.levelup.out { animation: fadeOut .35s forwards; }
.lu-rays { position: absolute; width: 160vmax; height: 160vmax; background: repeating-conic-gradient(rgba(255,230,140,.28) 0 10deg, transparent 10deg 20deg); animation: luspin 9s linear infinite; }
@keyframes luspin { to { transform: rotate(360deg); } }
.lu-confetti i { position: absolute; top: -20px; left: calc(50% + var(--x) * 45%); width: 8px; height: 13px; background: var(--c); border-radius: 2px; transform: rotate(var(--r)); animation: lufall calc(var(--d) * 2.4) ease-in var(--d) infinite; }
@keyframes lufall { to { transform: translateY(110vh) rotate(calc(var(--r) + 540deg)); } }
.lu-card { position: relative; background: #fff8ea; border: 3px solid #e6cfa9; border-radius: 26px; padding: 18px 24px 16px; width: min(320px, 84vw); text-align: center; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 0 rgba(0,0,0,.14); animation: lupop .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes lupop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.lu-card small { font-weight: 900; letter-spacing: 3px; color: var(--pink2, #e56b8b); font-size: 15px; }
.lu-num { position: relative; height: 92px; font-weight: 900; font-size: 84px; line-height: 92px; color: var(--ink); }
.lu-num span { position: absolute; inset: 0; animation: luout .6s .25s forwards; }
.lu-num b { position: absolute; inset: 0; transform: translateY(60px); opacity: 0; animation: luin .6s .45s cubic-bezier(.3,1.6,.5,1) forwards; color: #f0a020; text-shadow: 0 4px 0 #d9822b, 0 0 24px rgba(255,210,80,.8); }
@keyframes luout { to { transform: translateY(-60px); opacity: 0; } }
@keyframes luin { to { transform: none; opacity: 1; } }
.lu-reward { display: inline-flex; align-self: center; align-items: center; gap: 6px; font-weight: 900; font-size: 18px; background: #fff; border-radius: 14px; padding: 4px 12px; border: 2px solid #f2d27a; }
.lu-next { font-weight: 800; font-size: 13px; opacity: .75; margin-top: 2px; }
.lu-card ul { text-align: left; margin: 2px 0 6px; padding-left: 4px; list-style: none; font-weight: 800; font-size: 13.5px; }
.lu-card li { padding: 3px 0; }

/* what's new */
.wn-wrap { position: absolute; inset: 0; z-index: 85; background: rgba(40,28,50,.45); display: grid; place-items: center; animation: fadeIn .25s; }
.wn-wrap.out { animation: fadeOut .25s forwards; }
.wn-card { background: #fff8ea; border: 3px solid #e6cfa9; border-radius: 24px; width: min(360px, 90vw); max-height: 80vh; display: flex; flex-direction: column; padding: 16px 16px 14px; gap: 10px; box-shadow: 0 10px 0 rgba(0,0,0,.14); animation: lupop .45s cubic-bezier(.3,1.5,.5,1); }
.wn-head { text-align: center; }
.wn-head h2 { margin: 4px 0 2px; font-size: 21px; }
.wn-head small { font-weight: 800; opacity: .65; }
.wn-badge { display: inline-block; font-weight: 900; font-size: 11px; letter-spacing: 2px; color: #fff; background: #f28f7c; border-radius: 8px; padding: 2px 8px; }
.wn-body { overflow-y: auto; min-height: 0; flex: 1; -webkit-overflow-scrolling: touch; }
.wn-entry { background: #fff; border: 2px solid #efdcbc; border-radius: 16px; padding: 8px 12px; margin-bottom: 8px; }
.wn-entry summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; }
.wn-entry summary::-webkit-details-marker { display: none; }
.wn-entry summary small { opacity: .6; font-weight: 800; font-size: 12px; }
.wn-entry ul { margin: 6px 0 2px; padding-left: 18px; font-weight: 700; font-size: 13.5px; }
.wn-entry li { margin: 3px 0; }
.wn-list { padding: 2px; }

/* milestones + leaderboard */
.ms-row { background: #fff; border: 2px solid #efdcbc; border-radius: 16px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.ms-row img { width: 36px; height: 36px; flex: none; }
.ms-row .ms-info { flex: 1; min-width: 0; }
.ms-row b { display: block; font-size: 14px; }
.ms-row small { font-weight: 800; opacity: .65; font-size: 12px; }
.ms-bar { height: 8px; background: #f3e6d0; border-radius: 5px; overflow: hidden; margin-top: 5px; }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg, #9fd8a0, #6fbf73); border-radius: 5px; }
.ms-row.ready { border-color: #f2c14e; box-shadow: 0 0 0 3px rgba(242,193,78,.25); }
.lb-seg { display: flex; margin-bottom: 8px; }
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; background: #fff; border: 2px solid #efdcbc; border-radius: 14px; padding: 8px 10px; margin-bottom: 6px; }
.lb-row.me { border-color: var(--pink2, #e56b8b); background: #fff2f4; }
.lb-rank { font-weight: 900; font-size: 16px; text-align: center; }
.lb-rank.g1 { color: #e2a100; } .lb-rank.g2 { color: #8f9aa3; } .lb-rank.g3 { color: #c07a45; }
.lb-name b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { font-weight: 800; opacity: .6; font-size: 11.5px; }
.lb-val { text-align: right; font-weight: 900; font-size: 13px; }
.lb-val small { display: block; opacity: .6; font-weight: 800; font-size: 11px; }

.chip-rep .rep-num { display: none; font-weight: 900; font-size: 13px; color: #e2a100; }
@media (max-width: 440px) { .chip-rep .stars { display: none; } .chip-rep .rep-num { display: inline; } .hud-top { gap: 5px; } }

/* clothes previews */
.cl-row .cl-ico { width: 56px; height: 64px; background: linear-gradient(#fff6f8, #fde3ea); border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.cl-row .cl-ico canvas { width: 50px; height: 58px; }
.cl-row .cl-ico.hair { width: 92px; } .cl-row .cl-ico.hair canvas { width: 88px; height: 58px; }
.cl-mirror { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #fff, #fde3ea 70%); border: 3px solid #e3b86a; border-radius: 60px 60px 18px 18px; width: 128px; height: 148px; margin: 0 auto 8px; flex: none; }
.cl-mirror canvas { width: 110px; height: 128px; }

.side-btn.map-btn { bottom: calc(190px + var(--sab)); width: 44px; height: 44px; right: calc(30px + var(--sar)); }
.side-btn.map-btn img { width: 26px; height: 26px; }

/* dish board keeps its proportions; the checklist sits underneath */
.svc-board canvas, .svc.rows2 .svc-board canvas { width: 100%; height: auto !important; aspect-ratio: 300 / 210; max-height: 20vh; object-fit: contain; }
.map-wrap { touch-action: none; }
.map-ui { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.map-ui button { width: 34px; height: 34px; border-radius: 12px; border: 2px solid var(--ink); background: #fff8ea; font: 900 18px Nunito, sans-serif; color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.sheet-head .x.map-close { width: 48px; height: 48px; position: relative; z-index: 2; }
/* the street outside the service window: sky, a strip of street, and window glass */
.svc-outside { position: relative; flex: none; overflow: hidden; border-bottom: 3px solid var(--ink);
  background: linear-gradient(180deg, #9fdcf6 0%, #cdefff 48%, #f3fbff 60%, #bfe3a4 60.5%, #a6d68b 72%, #e8d3a8 72.5%, #d9bf8e 100%); }
.svc-outside > .svc-top, .svc-outside > .svc-customer { position: relative; z-index: 2; }
.svc-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.svc-sky .cl { position: absolute; background: #fff; border-radius: 40px; opacity: .85; height: 16px; animation: svcCloud 38s linear infinite; }
.svc-sky .cl::before, .svc-sky .cl::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.svc-sky .cl::before { width: 22px; height: 22px; left: 10px; top: -10px; } .svc-sky .cl::after { width: 16px; height: 16px; left: 28px; top: -6px; }
.svc-sky .c1 { width: 58px; top: 22%; left: -70px; } .svc-sky .c2 { width: 44px; top: 38%; left: -70px; animation-delay: -19s; animation-duration: 46s; }
.svc-sky .sunb { position: absolute; right: 18%; top: 14%; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #fff6c8 0 40%, #ffd35a 41% 100%); box-shadow: 0 0 18px rgba(255,220,120,.9); }
@keyframes svcCloud { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 140px)); } }
.svc-glass { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.32) 22%, transparent 28%, transparent 62%, rgba(255,255,255,.22) 65%, transparent 70%);
  box-shadow: inset 0 0 0 5px #c98f5a, inset 0 0 0 7px var(--ink), inset 0 12px 18px rgba(255,255,255,.25); }
.svc-glass::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 5px; margin-left: -2.5px; background: #c98f5a; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); opacity: .9; }
.svc-outside.dusk { background: linear-gradient(180deg, #f7a47e 0%, #ffd0a0 48%, #ffe6c8 60%, #a8c98c 60.5%, #93bd7a 72%, #d8bf92 72.5%, #c9ad7e 100%); }
.svc-outside.dusk .sunb { background: radial-gradient(circle, #ffe3b0 0 40%, #ff9a5a 41% 100%); top: 40%; }
.svc-outside.night { background: linear-gradient(180deg, #2d3160 0%, #4a4a7a 55%, #5a5578 60%, #3f5a48 60.5%, #3a5040 72%, #6e5f4c 72.5%, #5e503f 100%); }
.svc-outside.night .sunb { background: radial-gradient(circle, #fffbe8 0 60%, #f3eccb 61% 100%); box-shadow: 0 0 14px rgba(255,250,220,.6); }
.svc-outside.night .cl { opacity: .25; }
.svc-outside.night .svc-glass { background: linear-gradient(115deg, transparent 18%, rgba(255,230,160,.18) 22%, transparent 28%); }
.svc-glass::after { display: none; }
.sheet.fixedh:not(.full) { height: calc(88% - var(--sat)); }
.office-head { display: flex; gap: 8px; margin-bottom: 10px; }
.office-head > div { flex: 1; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 8px; text-align: center; }
.office-head small { display: block; font-size: 10.5px; font-weight: 800; opacity: .7; } .office-head b { font-size: 15px; font-weight: 900; }
.office-card { background: #fff; border: 2.5px solid #e6d2b2; border-radius: 16px; padding: 10px 12px; }
.oc-title b { font-size: 15px; font-weight: 900; } .oc-title small { display: block; font-size: 12px; font-weight: 800; opacity: .7; }
.oc-line { font-size: 12.5px; font-weight: 700; margin-top: 6px; } .oc-line.dim { opacity: .65; }
.pnl { width: 100%; border-collapse: collapse; font-size: 11.5px; } .pnl th { font-size: 10px; opacity: .6; text-align: right; font-weight: 900; } .pnl td { text-align: right; padding: 2px 3px; border-top: 1px solid #f0e3cc; } .pnl td:first-child, .pnl th:first-child { text-align: left; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .oc-row .btn { flex: 1 1 auto; font-size: 12.5px; padding: 8px 10px; }
.svc-sky::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 11%;
  background: radial-gradient(circle at 50% 100%, #8fcb73 0 15px, transparent 16px) 0 100%/46px 100% repeat-x, radial-gradient(circle at 50% 100%, #7cbc62 0 11px, transparent 12px) 23px 100%/46px 100% repeat-x; }
.svc-outside.night .svc-sky::after { filter: brightness(.45) saturate(.6); }
.svc-outside.dusk .svc-sky::after { filter: brightness(.85) sepia(.2); }

/* decorating: nothing on the HUD may catch a tap meant for the furniture */
body.decorating #mapBtn, body.decorating #bagBtn, body.decorating #menuBtn, body.decorating #pauseBtn, body.decorating .hud-top, body.decorating #questPill, body.decorating #actBtn { visibility: hidden; pointer-events: none; }

/* option buttons with pictures and stock counters (ice, sugar, chili, toppings, size) */
.seg button.icon-opt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 3px 2px 4px; min-height: 46px; }
.icon-opt .oi { position: relative; height: 24px; display: flex; align-items: flex-end; justify-content: center; }
.icon-opt .oi img { width: 22px; height: 22px; }
.icon-opt .oi img.b { margin-left: -9px; margin-bottom: 4px; }
.icon-opt .oi img.no { opacity: .45; }
.icon-opt .oi:has(img.no)::after { content: ''; position: absolute; left: 50%; top: 50%; width: 26px; height: 3px; background: #e8584e; border-radius: 2px; transform: translate(-50%, -50%) rotate(-40deg); box-shadow: 0 0 0 1px #fff; }
.icon-opt .oi img.sz-S { width: 15px; height: 15px; } .icon-opt .oi img.sz-M { width: 19px; height: 19px; } .icon-opt .oi img.sz-L { width: 24px; height: 24px; }
.icon-opt .gauge { position: relative; width: 5px; height: 20px; margin-left: 2px; border: 1.5px solid var(--ink); border-radius: 3px; background: #fff; overflow: hidden; display: block; }
.icon-opt .gauge b { position: absolute; left: 0; right: 0; bottom: 0; background: #f2c14e; display: block; }
.icon-opt .ol { font-size: 10.5px; line-height: 1.1; }
.icon-opt .cnt { position: absolute; top: 1px; right: 2px; font-style: normal; font-size: 9px; font-weight: 900; background: rgba(91,63,54,.12); border-radius: 6px; padding: 0 3px; }
.icon-opt .cnt.low { background: #e8584e; color: #fff; }

.btn.danger { color: #c9433a; border-color: #e8a4a0; }

/* the lighthouse gallery view */
body.lookout #hud, body.lookout .hud-top, body.lookout #questPill, body.lookout #actions, body.lookout #pointer, body.lookout #mapBtn, body.lookout #bagBtn, body.lookout #actBtn, body.lookout .toast { visibility: hidden !important; }
.lookout-ui { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.lookout-ui canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lookout-ui .lk-title { position: absolute; top: calc(14px + var(--sat)); left: 50%; transform: translateX(-50%); text-align: center; background: rgba(255,248,234,.92); border: 3px solid var(--ink); border-radius: 16px; padding: 6px 16px; box-shadow: 0 3px 0 rgba(91,63,54,.25); }
.lookout-ui .lk-title b { display: block; font-size: 16px; } .lookout-ui .lk-title small { font-weight: 800; opacity: .7; font-size: 11.5px; }
.lookout-ui .lk-leave { position: absolute; left: 50%; bottom: calc(18px + var(--sab)); transform: translateX(-50%); pointer-events: auto; width: auto; min-width: 220px; padding-left: 26px; padding-right: 26px; }

.need .chip { font: inherit; font-weight: 900; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.need .chip.ok { background: #e6f5df; } .need .chip.no { background: #fde3dd; }
.need .chip { height: auto; min-height: 30px; }                     /* (not the 40px HUD chip height) */
.need .chip.help { flex: none; align-self: center; width: 30px; height: 30px; min-height: 0; padding: 0; justify-content: center; border-radius: 50%; background: #fff; border-color: var(--ink); font-size: 15px; line-height: 1; }

/* prep table step guide */
.prep-guide { background: #fff8ea; border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 8px; margin: 4px 10px 6px; }
.prep-guide p { margin: 0 0 5px; font-size: 11.5px; font-weight: 800; line-height: 1.3; opacity: .8; }
.prep-guide ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.prep-guide li { flex: 1; display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 900; line-height: 1.15; padding: 4px 5px; border-radius: 10px; background: #f3e6cf; opacity: .55; }
.prep-guide li b { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); display: grid; place-items: center; font-size: 10.5px; }
.prep-guide li.now { opacity: 1; background: #ffe3ec; outline: 2.5px solid var(--pink2); }
.prep-guide li.now b { background: var(--pink2); color: #fff; }
.prep-guide li.done { opacity: .8; } .prep-guide li.done b { background: #86cf8a; color: #fff; }
.prep .point { position: relative; }
.prep .point::after { content: '▼'; position: absolute; left: 50%; top: -18px; transform: translateX(-50%); color: var(--pink2); font-size: 18px; text-shadow: 0 2px 0 #fff; animation: pointBob .7s ease-in-out infinite; pointer-events: none; z-index: 3; }
.prep-station.point::after { top: 6px; font-size: 24px; }
@keyframes pointBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

.ms-row.done { background: linear-gradient(135deg, #fff8e0, #fff); border-color: #e9c46f; }
.ms-row.done .ms-bar i { background: linear-gradient(90deg, #f2c14e, #e9a23b); }
.ms-badge { display: inline-block; font-size: 10px; font-weight: 900; color: #fff; background: #d9a431; border-radius: 8px; padding: 1px 6px; vertical-align: 2px; letter-spacing: .5px; }

/* piano */
.piano { display: flex; gap: 4px; justify-content: center; padding: 10px 0 18px; }
.pkey { width: 11%; max-width: 46px; height: 150px; border-radius: 0 0 10px 10px; border: 2.5px solid #5b3f36; background: #fffaf0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; font: inherit; font-weight: 900; color: #b99; touch-action: manipulation; }
.pkey.on { background: #ffe4a8; transform: translateY(3px); }
/* fishing */
.fishing { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(30,40,50,.35); }
.fs-card { background: #fff8ea; border: 3px solid #5b3f36; border-radius: 22px; padding: 16px; width: min(320px, 86vw); text-align: center; display: flex; flex-direction: column; gap: 12px; }
.fs-water { height: 110px; border-radius: 14px; background: linear-gradient(#8fd6e6, #4fb0c6); position: relative; overflow: hidden; }
.fs-bob { position: absolute; left: 50%; top: 42px; width: 18px; height: 22px; margin-left: -9px; border-radius: 9px 9px 7px 7px; background: linear-gradient(#e8584e 50%, #fff 50%); border: 2px solid #5b3f36; animation: bob 1.2s ease-in-out infinite; }
.fs-bob.dip { animation: dip .25s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
@keyframes dip { 50% { transform: translateY(16px); } }
.lookout-ui .lk-scope { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100px + var(--sab)); pointer-events: auto; width: auto; padding: 10px 18px; }   /* stacked above Leave, centred: it used to sit half under it */
.lookout-ui.scoping { pointer-events: auto; touch-action: none; }
.brand-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.brand-swatches .swatch { background: #fff; border: 2.5px solid #e6d2b2; border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; }
.brand-swatches .swatch i { width: 34px; height: 18px; border-radius: 6px; border: 1.5px solid #5b3f36; display: block; }
.brand-swatches .swatch small { font-size: 11px; font-weight: 800; }
.brand-swatches .swatch.on { border-color: #f2c14e; box-shadow: 0 0 0 3px rgba(242,193,78,.3); }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.album-ph { background: #fff; border: 2.5px solid #e6d2b2; border-radius: 10px; padding: 4px 4px 6px; font: inherit; transform: rotate(-1deg); }
.album-ph:nth-child(2n) { transform: rotate(1.2deg); }
.album-ph img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; display: block; }
.album-ph small { display: block; font-size: 10px; font-weight: 800; line-height: 1.2; margin-top: 4px; }
.album-view { position: fixed; inset: 0; z-index: 90; background: rgba(30,24,20,.8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; color: #fff8ea; }
.album-view img { max-width: min(92vw, 420px); max-height: 70vh; border: 6px solid #fffaf0; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.album-view b { font-size: 16px; } .album-view small { opacity: .75; font-weight: 800; }
/* cutscenes: no joystick or "touch & drag" hint on screen */
body.hide-controls #joyBase, body.hide-controls #joyHint, body.cutscene #joyHint { opacity: 0 !important; transition: opacity .3s; }

/* things not in the shops yet (they arrive later in the story) */
.row.locked { opacity: .55; }
.locked-tag { font-size: 18px; padding: 0 8px; }

/* dev tools (testing builds only — js/dev/flag.js) */
#devRibbon { position: fixed; left: 50%; top: 0; transform: translateX(-50%); z-index: 300; padding: 1px 10px 2px; border-radius: 0 0 8px 8px; background: #d9433a; color: #fff; font: 900 9px/1.4 Nunito, sans-serif; letter-spacing: 1.5px; pointer-events: none; opacity: .85; }
.dev-banner { margin: 4px 0 8px; padding: 8px 10px; border-radius: 12px; background: #fde2df; border: 2px solid #e8a4a0; color: #a8322b; font-weight: 900; font-size: 12px; }
.dev-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.dev-grid .btn { flex: 1 1 auto; }
.dev-select { flex: 1 1 100%; padding: 8px; border-radius: 10px; border: 2.5px solid var(--ink); font-weight: 800; font-size: 13px; background: #fff; }

/* ranks: weekly + all-time boards with faces */
.lb-mode { display: flex; margin-bottom: 8px; }
.lb-head { background: #fff8ea; border: 2px dashed #e9c98f; border-radius: 14px; padding: 8px 12px; margin-bottom: 8px; }
.lb-head b { font-size: 15px; }
.lb-head .pill { margin-left: 6px; font-size: 11px; }
.lb-head small { display: block; font-weight: 800; opacity: .65; font-size: 11.5px; margin-top: 2px; line-height: 1.35; }
.lb-row { grid-template-columns: 34px 40px 1fr auto; }
.lb-face { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #efdcbc; background: #fdeed7; }
.lb-row.me .lb-face { border-color: var(--pink2, #e56b8b); }
.lb-row.prize { box-shadow: inset 4px 0 0 #f2c14e; }
.week-prize { text-align: center; }
.week-prize .wp-cup { font-size: 64px; line-height: 1; animation: wpBounce 1.4s ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(0,0,0,.1)); }
.week-prize p { font-weight: 800; margin: 6px 0; }
.week-prize p small { display: block; opacity: .7; }
.week-prize .note { font-size: 12px; opacity: .75; }
@keyframes wpBounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.lb-name { min-width: 0; }
.lb-rank.g1, .lb-rank.g2, .lb-rank.g3 { font-size: 24px; }

/* the Island Board */
.board-sheet .cork { flex: 1; background: radial-gradient(circle at 20% 30%, rgba(0,0,0,.05) 1px, transparent 2px) 0 0/9px 9px, #d9a86c; border: 4px solid #8a5a3a; border-radius: 16px; padding: 14px 10px; box-shadow: inset 0 3px 8px rgba(0,0,0,.18); }
.note { position: relative; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; background: var(--paper); border-radius: 4px 4px 14px 4px; padding: 14px 10px 10px; margin: 0 2px 14px; transform: rotate(var(--tilt)); box-shadow: 0 4px 0 rgba(91,63,54,.18), 0 8px 14px rgba(0,0,0,.08); animation: notePin .35s ease-out backwards; }
.note:nth-child(2) { animation-delay: .06s; } .note:nth-child(3) { animation-delay: .12s; } .note:nth-child(4) { animation-delay: .18s; }
.note::before { content: ''; position: absolute; top: -5px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--pin); border: 2px solid rgba(0,0,0,.25); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.note-face { width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 2px solid #efdcbc; }
.note-body b { font-size: 14px; }
.note-body p { margin: 2px 0 4px; font-weight: 800; font-size: 13px; line-height: 1.35; }
.note-body small { font-weight: 800; font-size: 11px; opacity: .7; }
.note-pay { display: inline-block; font-weight: 900; font-size: 12px; background: #fff; border-radius: 999px; padding: 2px 8px; margin-top: 2px; }
.note-bar { height: 7px; background: rgba(0,0,0,.08); border-radius: 9px; overflow: hidden; margin: 2px 0; }
.note-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6fbfb0, #8fd8a0); border-radius: 9px; transition: width .4s; }
.note.s-done { opacity: .78; }
.note-stamp { font-weight: 900; color: #e8584e; border: 3px solid #e8584e; border-radius: 8px; padding: 4px 6px; transform: rotate(-12deg); font-size: 13px; animation: stamp .3s cubic-bezier(.3,1.8,.5,1) backwards; }
.note-foot { font-weight: 800; font-size: 11.5px; color: #fff8ea; text-align: center; padding: 4px 8px; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
@keyframes notePin { from { opacity: 0; transform: translateY(-14px) rotate(calc(var(--tilt) * -2)); } }
@keyframes stamp { from { opacity: 0; transform: scale(2.2) rotate(-12deg); } }
.note-pay img { width: 15px; height: 15px; vertical-align: -3px; }

/* friend visits: emote bar and the "who came by" card */
.emote-bar { position: absolute; left: 12px; bottom: calc(22px + var(--sab)); display: grid; grid-template-columns: repeat(4, 40px); gap: 5px; padding: 7px; background: rgba(255,250,240,.95); border: 3px solid #5b3f36; border-radius: 22px; box-shadow: 0 4px 0 rgba(91,63,54,.25); z-index: 40; animation: barIn .35s cubic-bezier(.3,1.6,.5,1); }
.emote-bar button { font-size: 22px; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid #efdcbc; flex: none; transition: transform .12s; }
.emote-bar button:active { transform: scale(1.25) rotate(-8deg); }
@keyframes barIn { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.visitors { text-align: center; }
.visitors .kicker { font-weight: 900; color: var(--pink2, #e56b8b); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.vis-list { display: grid; gap: 6px; margin: 10px 0 14px; }
.vis { display: grid; grid-template-columns: 40px 1fr; align-items: center; text-align: left; background: #fff8ea; border-radius: 14px; padding: 6px 10px; animation: notePin .35s ease-out backwards; }
.vis:nth-child(2) { animation-delay: .08s; } .vis:nth-child(3) { animation-delay: .16s; }
.vis-e { grid-row: span 2; font-size: 26px; }
.vis small { font-weight: 800; opacity: .65; }

/* settings: volume sliders */
.vol-row .info { display: flex; flex-direction: column; gap: 4px; }
.vol-row input[type=range] { width: 100%; accent-color: var(--pink2, #e56b8b); height: 36px; margin: 0; touch-action: pan-y; }
.ph-zoom { height: 36px; margin: 0; touch-action: none; }   /* (a full finger-sized strip to drag) */

/* photo mode */
body.photo-mode #hud, body.photo-mode #toasts, body.photo-mode #actions, body.photo-mode #touch, body.photo-mode #pointer, body.photo-mode .emote-bar, body.photo-mode .toast { visibility: hidden !important; }
.side-btn.cam-btn { bottom: calc(244px + var(--sab)); width: 40px; height: 40px; right: calc(32px + var(--sar)); font-size: 18px; }
body.decorating #camBtn, body.lookout #camBtn { visibility: hidden; }
.photo-ui { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.photo-ui .ph-drag { position: absolute; inset: 0; pointer-events: auto; touch-action: none; cursor: grab; }
.ph-top { position: absolute; top: calc(12px + var(--sat)); left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.ph-top span { background: rgba(40,28,24,.55); color: #fff; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 6px 12px; }
.ph-x { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; background: #fffaf0; border: 3px solid #5b3f36; font-size: 18px; font-weight: 900; }
.ph-panel { position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--sab)); pointer-events: auto; background: rgba(255,250,240,.94); border: 3px solid #5b3f36; border-radius: 22px; padding: 10px; display: grid; gap: 8px; }
.ph-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ph-row input { flex: 1; accent-color: var(--pink2, #e56b8b); }
.ph-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ph-chips button { flex: none; padding: 6px 11px; border-radius: 999px; border: 2px solid #e9d8bf; background: #fff; font-weight: 900; font-size: 12.5px; }
.ph-poses button { font-size: 20px; padding: 3px 8px; }
.ph-chips button.on { border-color: var(--pink2, #e56b8b); color: var(--pink2, #e56b8b); background: #fff2f4; }
.ph-shoot { padding: 12px; border-radius: 999px; border: 3px solid #5b3f36; background: #f08ca0; color: #fff; font-weight: 900; font-size: 17px; box-shadow: 0 4px 0 rgba(91,63,54,.3); }
.ph-shoot:active { transform: translateY(2px); box-shadow: none; }
.ph-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.ph-flash.go { animation: phFlash .45s ease-out; }
@keyframes phFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
/* weekly rank badge on the level chip */
.chip-rep { position: relative; }
.chip-rep .week-rank { position: absolute; right: -6px; bottom: -8px; font-style: normal; font-size: 10px; font-weight: 900; color: #5b3f36; background: #fffaf0; border: 2px solid #5b3f36; border-radius: 999px; padding: 0 5px; line-height: 15px; }
.chip-rep .week-rank.top { background: #ffd35a; }
.note-drop { display: block; margin-top: 4px; font-size: 11px; font-weight: 800; color: #a07a62; text-decoration: underline; background: none; border: 0; padding: 0; }

/* left-handed controls: the action button and the side buttons move to the left */
body.lefty .act-btn { right: auto; left: calc(18px + var(--sal)); }
body.lefty .open-btn { right: auto; left: calc(112px + var(--sal)); }
body.lefty .side-btn { right: auto; left: calc(26px + var(--sal)); }
body.lefty .side-btn.map-btn { left: calc(30px + var(--sal)); }
body.lefty .side-btn.cam-btn { left: calc(32px + var(--sal)); }
body.lefty .emote-bar { left: auto; right: 12px; }
/* bigger text (Settings → Text size) */
body.text-l :is(.sheet, .toast, #dialog, .reward-card, .modal .card, .summary, .svc-order, .quest) { zoom: 1.12; }
body.text-xl :is(.sheet, .toast, #dialog, .reward-card, .modal .card, .summary, .svc-order, .quest) { zoom: 1.25; }
/* high contrast: solid backgrounds, darker text, bolder outlines */
body.hc { --ink: #1f1512; }
body.hc :is(.toast, #dialog .dlg-box, .quest, .sheet, .modal .card) { background: #fffdf8 !important; color: #1f1512; }
body.hc :is(.empty-note, small, .muted) { opacity: 1 !important; color: #3a2a24; }
body.hc .quest { color: #1f1512; text-shadow: none; }
body.hc :is(.chip, .tag, .pill, .opt-tag) { border-width: 3px; }
/* the album's celebration photo: HUD out of the way, a white flash after */
.snap-flash { position: absolute; inset: 0; background: #fff; pointer-events: none; z-index: 70; animation: phFlash .5s ease-out forwards; }
.svc-streak { align-self: center; font-weight: 900; font-size: 14px; color: #fff; background: linear-gradient(135deg, #ff8a3a, #e8584e); border: 2.5px solid var(--ink); border-radius: 999px; padding: 2px 9px; line-height: 1.1; text-align: center; }
.svc-streak small { display: block; font-size: 9px; opacity: .9; }
.svc-streak.pop { animation: popIn .35s cubic-bezier(.3,1.6,.5,1); }
/* the recipe lab */
.lab-pot { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.lab-slot { width: 74px; height: 74px; border-radius: 50%; border: 3px dashed #d9bf98; display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #d9bf98; background: #fff8ea; }
.lab-slot.on { border-style: solid; border-color: var(--pink2, #e56b8b); color: inherit; background: #fff; }
.lab-slot.on img { width: 34px; height: 34px; } .lab-slot small { font-size: 9px; font-weight: 800; display: block; }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; max-height: 38vh; padding: 2px; }
.lab-ing { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; background: #fff; border: 2px solid #efdcbc; }
.lab-ing img { width: 30px; height: 30px; } .lab-ing small { font-size: 10px; font-weight: 800; line-height: 1.1; text-align: center; }
.lab-ing i { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 9px; font-weight: 900; opacity: .6; }
.lab-ing.dim { opacity: .4; }
.lab-cook { margin-top: 8px; }
/* album viewer */
.album-view.viewer { display: grid; grid-template-columns: 44px 1fr 44px; grid-template-rows: auto auto auto auto; align-items: center; justify-items: center; gap: 8px; padding: 50px 10px 20px; }
.album-view.viewer img { grid-column: 2; max-width: 100%; max-height: 62vh; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.album-view.viewer b, .album-view.viewer small, .album-view.viewer .av-row { grid-column: 1 / -1; }
.av-nav { font-size: 34px; font-weight: 900; color: #fff; background: rgba(255,255,255,.15); border-radius: 50%; width: 40px; height: 40px; border: 0; }
.av-nav.l { grid-column: 1; grid-row: 1; } .av-nav.r { grid-column: 3; grid-row: 1; }
.av-nav:disabled { opacity: .2; }
.av-x { position: absolute; top: calc(12px + var(--sat)); right: 12px; width: 40px; height: 40px; border-radius: 50%; background: #fffaf0; border: 3px solid #5b3f36; font-weight: 900; }
.av-row { display: flex; gap: 8px; }
.btn-col { display: flex; flex-direction: column; gap: 4px; flex: 0 1 46%; max-width: 46%; }   /* (never wider than the text beside it: long Vietnamese labels squeezed the description to one word a line) */
.btn-col .btn, .btn-col .buy { white-space: normal; line-height: 1.15; font-size: 13px; padding: 7px 8px; min-width: 0; width: 100%; overflow-wrap: anywhere; }   /* (long labels wrap inside the button: "7.5M down · rest later" ran out of it) */
.set-list { display: grid; gap: 6px; margin-bottom: 10px; }
.set-chip { background: #fff; border: 2px solid #efdcbc; border-radius: 12px; padding: 6px 10px; }
.set-chip b { font-size: 13px; } .set-chip small { display: block; font-weight: 700; opacity: .65; font-size: 11px; }
.set-chip.done { border-color: #8fd8a0; background: #f1fbf3; }
/* lend a hand, postcards */
.help-game .card { text-align: center; }
.hg-top { display: flex; justify-content: space-between; align-items: center; } .hg-time { font-weight: 900; font-size: 20px; background: #ffd35a; border: 2.5px solid var(--ink); border-radius: 999px; padding: 0 10px; }
.hg-order { margin: 10px 0; display: grid; justify-items: center; } .hg-order img { width: 64px; height: 64px; } .hg-order small { font-weight: 900; }
.hg-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .hg-pick button { background: #fff; border: 2.5px solid #efdcbc; border-radius: 14px; padding: 6px; } .hg-pick button:active { transform: scale(.94); } .hg-pick img { width: 44px; height: 44px; }
.hg-score { margin-top: 8px; font-weight: 800; opacity: .7; }
.postcard { position: relative; text-align: left; margin: 8px 0; padding: 14px 44px 12px 14px; border-radius: 12px; border: 3px solid #fffaf0; box-shadow: 0 0 0 2.5px var(--ink), 0 6px 0 rgba(91,63,54,.2); background: linear-gradient(135deg, var(--a), var(--b)); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.postcard b { display: block; font-size: 16px; } .postcard small { font-weight: 800; }
.pc-stamp { position: absolute; right: 8px; top: 8px; font-size: 22px; background: #fffaf0; border: 2px dashed #e8584e; border-radius: 6px; width: 32px; height: 32px; display: grid; place-items: center; text-shadow: none; }
.pc-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; } .pc-pick button { padding: 6px 10px; border-radius: 999px; border: 2px solid #efdcbc; background: #fff; font-weight: 800; } .pc-pick button.on { border-color: var(--pink2, #e56b8b); background: #fff2f4; }
.emote-bar .eb-wide { grid-column: span 2; width: auto; border-radius: 999px; font-size: 13px; font-weight: 900; height: 36px; } .emote-bar .eb-wide:disabled { opacity: .45; }
.contest { text-align: center; } .contest .kicker { font-weight: 900; color: var(--pink2, #e56b8b); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.stars-big { font-size: 34px; color: #f2c14e; letter-spacing: 2px; text-shadow: 0 2px 0 rgba(91,63,54,.25); }
.judge { text-align: left; background: #fff8ea; border-radius: 12px; padding: 6px 10px; margin: 4px 0; font-weight: 700; font-size: 13px; }
.front-ui .fr-info { pointer-events: none; } .front-ui .fr-sel { min-height: 28px; display: flex; align-items: center; } .front-ui .fr-sel small { font-weight: 800; opacity: .7; }
.fr-tray button small { opacity: .6; font-weight: 800; }
/* karaoke */
.karaoke .card { text-align: center; } .karaoke .kicker { font-weight: 900; color: var(--pink2, #e56b8b); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; }
.kk-track { position: relative; height: 96px; background: linear-gradient(#2f2a4a, #4a3a6e); border-radius: 14px; margin: 10px 0; overflow: hidden; }
.kk-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: #ffd35a; box-shadow: 0 0 10px #ffd35a; }
.kk-note { position: absolute; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 2px solid #fff; transition: opacity .15s; }
.kk-note.l0 { top: 10px; background: #f36d86; } .kk-note.l1 { top: 38px; background: #6fbfb0; } .kk-note.l2 { top: 66px; background: #f2c14e; }
.kk-pads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .kk-pads button { height: 56px; border-radius: 16px; border: 3px solid var(--ink); font-size: 24px; font-weight: 900; color: #fff; }
.kk-pads button[data-l="0"] { background: #f36d86; } .kk-pads button[data-l="1"] { background: #6fbfb0; } .kk-pads button[data-l="2"] { background: #f2c14e; }
.kk-pads button:active { transform: scale(.94); } .kk-score { margin-top: 8px; font-weight: 800; opacity: .75; }
/* Turtle Cove */
.trip { position: absolute; inset: 0; z-index: 85; overflow: hidden; }
.tr-sky { position: absolute; inset: 0 0 60% 0; background: linear-gradient(#9fe0f2, #d9f4f7); }
.tr-sea { position: absolute; left: 0; right: 0; top: 40%; height: 14%; background: linear-gradient(#4fb8cf, #7fd6e8); }
.tr-wave { position: absolute; left: -10%; right: -10%; top: 50%; height: 7%; background: rgba(255,255,255,.7); border-radius: 50%; animation: trWave 3s ease-in-out infinite; }
.tr-sand { position: absolute; left: 0; right: 0; top: 53%; bottom: 0; background: radial-gradient(circle at 30% 40%, rgba(255,255,255,.25) 1px, transparent 2px) 0 0/14px 14px, #f2dca8; }
@keyframes trWave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(14px); } }
.tr-hud { position: absolute; top: calc(14px + var(--sat)); left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 900; color: #3a2f2a; }
.tr-hud b { background: #fffaf0; border: 3px solid var(--ink); border-radius: 999px; padding: 4px 12px; } .tr-time { background: #ffd35a; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 18px; }
.tr-it { position: absolute; font-size: 34px; background: none; border: 0; transform: translate(-50%, -50%); animation: trIn .35s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 3px 0 rgba(91,63,54,.25)); }
.tr-it.got { animation: trGot .35s ease-out forwards; } .tr-it.wash { animation: trWash .5s ease-in forwards; }
@keyframes trIn { from { transform: translate(-50%, -20%) scale(.3); opacity: 0; } }
@keyframes trGot { to { transform: translate(-50%, -160%) scale(1.4); opacity: 0; } }
@keyframes trWash { to { transform: translate(-50%, -120%); opacity: 0; } }
.tr-bag { position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--sab)); background: rgba(255,250,240,.92); border: 3px solid var(--ink); border-radius: 18px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 20px; font-weight: 900; min-height: 30px; }
.tr-bag small { font-size: 13px; opacity: .7; }

/* colour-blind palette (Settings): red/green signals become vermillion/blue */
body.cb .patience .bar i { background: #0072b2; } body.cb .patience .bar i.mid { background: #f0e442; } body.cb .patience .bar i.low { background: #d55e00; }
body.cb .svc-chips span.bad, body.cb .svc-steps i.bad { background: #fde3d0; color: #a14400; border-color: #d55e00; }
body.cb .toast.bad { background: #fde3d0; }
body.cb .ms-bar i { background: linear-gradient(90deg, #8ec5ea, #0072b2); }
body.cb .icon-opt .cnt.low { background: #d55e00; }

.alert-row { flex-wrap: wrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 6px; }
.chip-row .chip { border: 2px solid #e6d3b8; background: #fffaf0; color: #9a8070; border-radius: 999px; padding: 7px 12px; font: 900 13px Nunito, sans-serif; min-height: 36px; }
.chip-row .chip.on { background: #fff1d0; border-color: var(--gold2); color: var(--ink); }
.alert-row .chip-row .chip:not(.on) { text-decoration: line-through; }   /* (muted pop-up kinds only) */

.link-btn { background: none; border: 0; color: #9a8070; font: 800 12px Nunito, sans-serif; text-decoration: underline; padding: 6px 2px; margin-top: 2px; min-height: 32px; cursor: pointer; }

/* pop-up cards never run off a small screen: they scroll instead */
.modal .card { max-height: calc(100% - 8px); overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
.modal .card canvas { touch-action: none; }

.deco-nudge { display: flex; gap: 4px; padding-left: 6px; margin-left: 2px; border-left: 2px solid rgba(91,63,54,.15); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 2.5px solid rgba(91,63,54,.35); box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); padding: 0; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold); }
.swatch.pick { background: conic-gradient(#f36d86, #f2c14e, #9fd67a, #6fbfb0, #8fb7e0, #c9b6e8, #f36d86); cursor: pointer; }
.swatch.pick::-webkit-color-swatch-wrapper { padding: 0; } .swatch.pick::-webkit-color-swatch { border: 0; border-radius: 9px; opacity: 0; }
/* decorating: the bar wraps (hint on top, buttons below) and the floating tools stay on screen in two rows */
.deco-head { flex-wrap: wrap; }
.deco-hint { flex: 1 1 100%; }
.deco-actions { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; }
.deco-actions .btn { padding: 8px 12px; font-size: 13px; }
.deco-tools { flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 16px); width: max-content; }
.deco-tools .btn { min-width: 40px; min-height: 40px; }
.deco-nudge { border-left: 0; padding-left: 0; margin-left: 0; flex-basis: 100%; justify-content: center; }
@media (min-width: 700px) { .deco-hint { flex: 1; } .deco-nudge { flex-basis: auto; border-left: 2px solid rgba(91,63,54,.15); padding-left: 6px; } }
.deco-tools { max-width: calc(100vw - 16px); flex-wrap: nowrap; overflow-x: auto; gap: 3px; padding: 4px; }   /* one slim row (it wrapped to three on a phone and covered the top of the room) */
.deco-tools .btn { min-width: 34px; min-height: 34px; padding: 5px 7px; flex: none; }
.deco-nudge { flex-basis: auto; flex: none; }

.stamp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.stamp { border: 2.5px dashed #d9c3a2; border-radius: 16px; padding: 10px 6px; text-align: center; background: #fffaf0; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.stamp i { font-style: normal; font-size: 26px; filter: grayscale(1); opacity: .45; }
.stamp b { font-size: 12px; line-height: 1.2; } .stamp small { font-weight: 900; opacity: .6; }
.stamp.done { border: 2.5px solid var(--pink2); background: #fff0f3; transform: rotate(-2deg); }
.stamp.done i { filter: none; opacity: 1; }
.card.letter { background: #fffdf5; background-image: repeating-linear-gradient(transparent 0 23px, rgba(160,190,220,.35) 23px 24px); }
.card.letter p { font-size: 14px; }
.yr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.yr-stat { background: #fff5e1; border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; }
.yr-stat b { font-size: 20px; } .yr-stat small { font-size: 11px; font-weight: 800; opacity: .7; text-align: center; }
.yr-photos { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; } .yr-photos img { width: 30%; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.15); transform: rotate(-2deg); }
.uni-preview { width: 120px; height: 120px; margin: 0 auto 4px; display: block; background: radial-gradient(circle at 50% 60%, #fff6e2, #f8dcc4); border-radius: 50%; border: 3px solid var(--ink); }

.modal.chess .card canvas { width: 100%; max-width: 360px; display: block; margin: 6px auto 8px; border-radius: 12px; border: 3px solid #8a4a2a; touch-action: none; }
.ch-msg { min-height: 2.6em; }
.gift-items { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; margin: -4px 4px 12px; padding: 4px; border-radius: 12px; background: rgba(233,179,106,.14); }
.gift-item { min-height: 36px; padding: 6px 12px; border-radius: 18px; border: 1.5px solid var(--ink, #2f2a30); background: #fff8ea; font: 800 13px Nunito, sans-serif; color: inherit; }
.gift-item:disabled { opacity: .5; }
.pc-box { max-height: min(56vh, 460px); padding: 2px 6px; }
.fc-bar { height: 8px; margin-top: 6px; border-radius: 4px; background: rgba(91,63,54,.15); overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f2c14e, #4fae5a); }
.fc-done { font-weight: 900; color: #3f8f4a; white-space: nowrap; }
/* a button you've just unlocked: three soft pulses so you see where it appeared */
.btn.fresh { animation: freshPulse .9s ease 3; }
@keyframes freshPulse { 0%, 100% { transform: scale(1); box-shadow: 0 3px 0 rgba(91,63,54,.25); } 45% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255,211,90,.55); } }
.prep-station .tip.news { color: #c2477a; }
/* photo mode: a live preview of the chosen frame */
.ph-frame { position: absolute; inset: calc(64px + var(--sat)) 14px calc(250px + var(--sab)); pointer-events: none; border-radius: 4px; }
.ph-frame.polaroid { border: 10px solid #fffdf8; border-bottom-width: 38px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.ph-frame.postcard { border: 9px solid #f6ecd8; outline: 2px dashed rgba(140,100,70,.6); outline-offset: -14px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.ph-frame.postcard::after { content: '✉'; position: absolute; top: 6px; right: 8px; width: 34px; height: 40px; display: grid; place-items: center; background: #fffaf0; border: 2px dashed #c9674a; color: #c9674a; font-size: 18px; }
.ph-top span.saved { background: #3f8f5f; }
.sheet.short { max-height: 46%; }
#menuBtn.dot::after { content: ''; position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: #e8584e; border: 2px solid #fffaf0; }
#menuBtn { position: relative; }
.steps-mini figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.steps-mini figcaption { font-size: 10px; font-weight: 800; opacity: .75; max-width: 64px; text-align: center; line-height: 1.1; }   /* (names under the icons: you couldn't tell what to buy) */
/* the goal bar: two lines at most (three covered a sixth of the screen); tap it for the whole goal */
#questText { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: left; }
/* short screens (a Safari tab with its bars): everything still fits and Serve is always on screen */
.svc-bottom { flex: none; }
@media (max-height: 760px) {
  .svc-label { display: none; }
  .svc-board canvas { height: min(110px, 14vh); }
  .svc-customer { min-height: 96px; }
  .svc-portrait { width: 82px; height: 96px; }
  .svc-grid { min-height: 84px; }
  .svc-chips span { font-size: 10.5px; padding: 3px 7px; }
  .svc-order { font-size: 13.5px; line-height: 1.3; }
}
@media (max-height: 640px) {
  .svc-awning { height: 10px; }
  .svc-top { padding-top: 6px; }
  .svc-customer { min-height: 80px; }
  .svc-portrait { width: 68px; height: 80px; }
  .svc-board canvas { height: 76px; }
  .seg button.icon-opt { min-height: 38px; padding: 2px; }
  .icon-opt .oi { height: 18px; } .icon-opt .oi img { width: 17px; height: 17px; }
  .svc-grid { min-height: 70px; }
  .svc-grid .ing .tray img { width: 34px; height: 34px; }
  .svc-counter { gap: 5px; padding-top: 5px; }
  .svc-bottom .btn { padding: 10px; }
}
.buy.quiet { background: transparent; color: var(--ink); text-shadow: none; box-shadow: none; border-style: dashed; }
/* the restaurant's pass: a warm dining room behind the guest, not the beach sky */
.svc.indoor .svc-awning { background: repeating-linear-gradient(90deg, #8a5f3e 0 34px, #9c6e46 34px 68px); }
.svc.indoor .svc-awning::after { display: none; }
.svc.indoor .svc-outside, .svc.indoor .svc-outside.dusk, .svc.indoor .svc-outside.night { background: linear-gradient(180deg, #f6e6d6 0%, #efd9c3 58%, #c98f5a 58.5%, #b9824f 100%); }
.svc.indoor .svc-sky { display: none; }
.tabs.icons.reveal { flex-wrap: wrap; }
.tabs.icons.reveal button { flex: 1 1 22%; flex-direction: column; gap: 1px; padding: 5px 2px; }
.tabs.icons.reveal button span { display: block; font-size: 10px; }
/* narrow phones (iPhone SE / mini, many Androids): the top bar fits — the menu button ran off the right edge */
.hud-top .chip { flex: 0 1 auto; min-width: 0; }
@media (max-width: 389px) {
  .hud-top { gap: 4px; }
  .hud-top .chip { padding: 0 8px 0 6px; gap: 4px; }
  .chip-rep .stars { display: none; }
  .pause-btn { width: 28px; height: 28px; margin-left: 0; }
}
@media (max-width: 345px) {
  .hud-top .chip { font-size: 13px; padding: 0 6px 0 4px; }
  .hud-top .chip .coin, .hud-top .chip .sun { transform: scale(.85); }
  .chip-rep .rep-num { display: none; }
}
.buy.off { background: #efe4d2; color: var(--ink); text-shadow: none; }   /* a setting that's off: neutral, not a warning-yellow */
