/* Tulip Kitchen: sunny poster look.
   One fixed palette on purpose (the game has a single look, no dark mode).
   Layout: header, three order cards, a tip line, the board filling the middle, an info bar. */
:root {
  --sun-bg: #f9dcb5;
  --panel: #fdebd0;
  --board: #f0c48c;
  --card: #fffaf0;
  --ink: #3a2a2a;
  --muted: #7a5f52;
  --eggplant: #5b2c6f;
  --teal: #2f8a8f;
  --tomato: #e2412f;
  --leaf: #3f9b3c;
  --gold: #f6b62e;
  --edge: #e7b77c;
  --display: "Righteous", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--sun-bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.35;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
button:focus-visible, summary:focus-visible, .file-btn:focus-within { outline: 3px solid var(--eggplant); outline-offset: 2px; }

#app {
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: max(8px, env(safe-area-inset-top, 0px));
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
}

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 6px; min-height: 44px; }
/* City chip: where she is cooking, and how close the next restaurant upgrade is. */
.brand {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 0; border-radius: 999px; padding: 4px 12px 4px 4px; min-height: 44px;
  box-shadow: 0 2px 0 var(--edge); cursor: pointer; text-align: left;
}
.brand-pin { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #f7c873; display: grid; place-items: center; color: var(--eggplant); }
.brand-pin svg { width: 20px; height: 20px; }
.brand-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.05; }
.brand-city { font-family: var(--display); font-size: 1rem; color: var(--eggplant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-next { font-size: .66rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-bar { height: 5px; border-radius: 3px; background: var(--panel); overflow: hidden; }
.brand-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--leaf); transition: width .4s ease; }
.brand .dot { top: 4px; right: 6px; }
.dot { position: absolute; top: -2px; right: -12px; width: 11px; height: 11px; border-radius: 50%; background: var(--tomato); box-shadow: 0 0 0 2px var(--sun-bg); }
.city { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pills { display: flex; gap: 6px; }
.pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--card); border: 0; border-radius: 999px;
  padding: 4px 10px 4px 4px; min-height: 44px;
  box-shadow: 0 2px 0 var(--edge);
  font-family: var(--display); font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.pill .icon { width: 28px; height: 28px; flex: none; }
.pill .icon svg { width: 100%; height: 100%; display: block; }
.charges { cursor: pointer; }
.charges-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.charges-text small { font-family: var(--body); font-size: .68rem; font-weight: 700; color: var(--muted); margin-top: 2px; }

/* ---------- orders ---------- */
.orders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.order {
  background: var(--card); border-radius: 16px; padding: 6px;
  box-shadow: 0 2px 0 var(--edge);
  display: grid; grid-template-columns: 38px 1fr; grid-template-rows: 38px auto 30px; gap: 4px;
  align-items: center;
  transition: box-shadow .2s ease;
}
.order.ready { box-shadow: 0 0 0 3px var(--leaf), 0 2px 0 var(--edge); }
.cust { width: 38px; height: 38px; background: #f7c873; border-radius: 50%; overflow: hidden; }
.cust svg { width: 100%; height: 100%; display: block; transform: translateY(3px) scale(1.05); }
.reward {
  justify-self: end; display: flex; align-items: center; gap: 3px;
  font-family: var(--display); font-size: 1rem; font-variant-numeric: tabular-nums;
}
.reward svg { width: 18px; height: 18px; }
.need { grid-column: 1 / -1; display: flex; justify-content: center; gap: 4px; }
.need-item { position: relative; width: 50px; height: 50px; background: #fffdf8; border: 0; border-radius: 10px; padding: 2px; cursor: pointer; }
.need-item.fam-bakery { background: #fffdf8; box-shadow: inset 0 0 0 2px #f5b26b; }
.need-item.fam-dairy { background: #fffdf8; box-shadow: inset 0 0 0 2px #86c6dc; }
.need-item.picked { box-shadow: inset 0 0 0 3px var(--eggplant); }
.need-item svg { width: 100%; height: 100%; display: block; }
.need-item .tick { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; }
.cust-name { grid-column: 1 / -1; align-self: center; text-align: center; font-size: .74rem; font-weight: 700; line-height: 1.1; color: var(--eggplant); }
.serve {
  grid-column: 1 / -1; height: 30px; border: 0; border-radius: 10px;
  background: var(--leaf); color: #fff; font-family: var(--display); font-size: 1rem; letter-spacing: .02em;
  box-shadow: 0 2px 0 #2a6e2a; cursor: pointer;
}
.serve:active { transform: translateY(2px); box-shadow: none; }

/* ---------- tip line ---------- */
.tip {
  background: var(--eggplant); color: #fff; border-radius: 12px;
  padding: 8px 12px; font-weight: 700; font-size: .92rem; text-align: center;
}

/* ---------- board ---------- */
.board-wrap { position: relative; flex: 1; min-height: 0; container-type: size; display: grid; place-items: start center; }
/* The board sits at the top and leaves room underneath for the info bar, so the bar never hides the bottom row. */
.board {
  --cols: 6;
  --rows: 8;
  --info-room: 70px;
  width: min(100cqw, calc((100cqh - var(--info-room)) * var(--cols) / var(--rows)));
  aspect-ratio: var(--cols) / var(--rows);
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  gap: 3px;
  padding: 4px;
  background: var(--board);
  border-radius: 18px;
  touch-action: none;
}
.cell { position: relative; background: var(--panel); border-radius: 10px; display: grid; place-items: center; min-width: 0; min-height: 0; }
.cell.drop-merge { background: #c9eaa8 !important; box-shadow: inset 0 0 0 3px var(--leaf) !important; }
.cell.drop-move { box-shadow: inset 0 0 0 2px var(--edge); }
.cell.drop-no { box-shadow: inset 0 0 0 3px #d9b9a8 !important; }

/* Each food family gets its own square colour, so bakery, dairy and dishes are easy to tell apart. */
/* Food sits on a white tile; a coloured edge shows the family. */
.cell.fam-bakery, .cell.fam-dairy, .cell.fam-dish, .cell.fam-producer { background: #fffdf8; }
.cell.fam-bakery { box-shadow: inset 0 0 0 3px #f5b26b; }
.cell.fam-dairy { box-shadow: inset 0 0 0 3px #86c6dc; }
.cell.fam-dish { box-shadow: inset 0 0 0 3px #ef9ab8; }
.cell.fam-producer { box-shadow: inset 0 0 0 3px #d9b48a; }
.cell.sel { box-shadow: inset 0 0 0 3px var(--eggplant) !important; }
.fam-bakery { background: #ffdcb4; }
.fam-dairy { background: #d8eef4; }
.fam-dish { background: #f9d6e2; }
.item svg, .need-item svg, .info-icon svg, .step-art svg {
  filter: drop-shadow(1px 0 0 rgba(58, 42, 42, .5)) drop-shadow(-1px 0 0 rgba(58, 42, 42, .5))
          drop-shadow(0 1px 0 rgba(58, 42, 42, .5)) drop-shadow(0 -1px 0 rgba(58, 42, 42, .5));
}
.new-tag {
  position: absolute; right: 2px; top: 2px; pointer-events: none; z-index: 2;
  font-family: var(--display); font-size: .62rem; color: #fff; background: var(--leaf);
  border-radius: 6px; padding: 2px 4px; animation: tagpop .35s ease-out;
}
@keyframes tagpop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lv {
  position: absolute; left: 3px; top: 2px; pointer-events: none;
  font-family: var(--display); font-size: .7rem; line-height: 1; color: #fff;
  background: rgba(58, 42, 42, .45); border-radius: 6px; padding: 2px 4px;
}
.item { width: 100%; height: 100%; padding: 1px; pointer-events: none; }
.item svg { width: 100%; height: 100%; display: block; }
.item.lifted { opacity: .25; }
.item.producer { width: 100%; height: 100%; }
.item.producer.empty { filter: saturate(.4) opacity(.75); }
.cell .tick { position: absolute; right: 1px; bottom: 1px; width: 15px; height: 15px; pointer-events: none; }
.cell .tick svg, .need-item .tick svg { width: 100%; height: 100%; display: block; }

.drag-ghost {
  position: fixed; z-index: 50; pointer-events: none;
  transform: translate(-50%, -70%) scale(1.2);
  filter: drop-shadow(0 6px 6px rgba(122, 59, 31, .3));
}

/* the gentle "look here" ring and wiggle */
.guide::after {
  content: ""; position: absolute; inset: -3px; border-radius: 12px; pointer-events: none;
  border: 3px solid var(--eggplant); animation: ring 1.4s ease-out infinite;
}
.serve.guide { position: relative; }
@keyframes ring { 0% { opacity: 1; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.18); } }
.wiggle { animation: wiggle .5s ease-in-out 3; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg) scale(1.06); } 75% { transform: rotate(7deg) scale(1.06); } }

/* ---------- bottom: preview strip, info bar, buttons ---------- */
.foot { position: relative; display: flex; flex-direction: column; gap: 8px; }
.float-stack { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.float-stack > * { pointer-events: auto; }
.chainpop {
  background: var(--card); border-radius: 16px; padding: 8px 8px 10px;
  box-shadow: 0 6px 20px rgba(122, 59, 31, .22);
}
body.dragging .float-stack { display: none; }
.pop-title { margin: 0 0 6px; font-weight: 700; font-size: .8rem; color: var(--muted); text-align: center; }
.pop-row { display: flex; align-items: flex-start; justify-content: center; gap: 2px; }
.step { flex: 0 1 50px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; }
.step-art { width: 100%; max-width: 50px; aspect-ratio: 1; border-radius: 10px; padding: 2px; background: var(--panel); }
.step.fam-bakery .step-art { background: #ffdcb4; }
.step.fam-dairy .step-art { background: #d8eef4; }
.step.fam-dish .step-art { background: #f9d6e2; }
.step-art svg { width: 100%; height: 100%; display: block; }
.step span { font-size: .58rem; font-weight: 700; text-align: center; line-height: 1.1; color: var(--muted); letter-spacing: -.01em; }
.step.current .step-art { box-shadow: 0 0 0 3px var(--eggplant); }
.step.current span { color: var(--eggplant); }
.join { flex: none; width: 12px; height: 50px; display: grid; place-items: center; color: var(--muted); }
.join svg { width: 12px; height: 12px; }
.join.or { width: auto; padding: 0 8px; font-weight: 700; font-size: .8rem; }

.nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.nav-btn.hint { background: #ffe7a8; }
.nav-btn {
  position: relative; border: 0; border-radius: 14px; min-height: 52px; padding: 4px 2px;
  background: var(--card); box-shadow: 0 2px 0 var(--edge); color: var(--eggplant);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: .72rem; font-weight: 700; cursor: pointer;
}
.nav-icon { width: 24px; height: 24px; }
.nav-icon svg { width: 100%; height: 100%; display: block; }
.nav-btn .dot { top: 6px; right: calc(50% - 20px); }

.bar { display: flex; align-items: center; gap: 8px; min-height: 60px; background: var(--card); border-radius: 16px; padding: 6px 6px 6px 10px; box-shadow: 0 2px 0 var(--edge); }
.info {
  display: flex; align-items: center; gap: 8px; min-height: 56px;
  background: var(--card); border-radius: 16px; padding: 6px 6px 6px 8px;
  box-shadow: 0 6px 20px rgba(122, 59, 31, .22);
}
.info[hidden] { display: none !important; }
.info-idle { margin: 0; color: var(--muted); font-size: .9rem; }
.info-icon { width: 44px; height: 44px; flex: none; background: var(--panel); border-radius: 10px; padding: 3px; }
.info-icon svg { width: 100%; height: 100%; display: block; }
.info-icon.fam-bakery { background: #ffdcb4; }
.info-icon.fam-dairy { background: #d8eef4; }
.info-icon.fam-dish { background: #f9d6e2; }
.info-text { display: flex; flex-direction: column; min-width: 0; }
.info-text b { font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.info-text span { font-size: .8rem; color: var(--muted); }
.sell {
  flex: none; border: 0; border-radius: 12px; padding: 0 12px; min-height: 44px;
  background: var(--gold); font-family: var(--display); font-size: .95rem; box-shadow: 0 2px 0 #b97a12; cursor: pointer;
}
.round-btn {
  flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--panel); color: var(--eggplant); display: grid; place-items: center; cursor: pointer;
}
.round-btn svg { width: 26px; height: 26px; }

/* ---------- toast and floating numbers ---------- */
.toast {
  /* A small pill at the top edge of the board. Taps pass straight through it. */
  position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
  z-index: 30; width: max-content; max-width: 94%;
  display: flex; align-items: center; gap: 8px;
  background: rgba(58, 42, 42, .9); color: #fff; border-radius: 999px; padding: 5px 12px 5px 6px;
  font-weight: 700; font-size: .82rem; line-height: 1.2; box-shadow: 0 4px 12px rgba(58, 42, 42, .2);
  pointer-events: none;
}
.toast.has-action { pointer-events: auto; padding-right: 5px; }
.toast:not(:has(.toast-icon)) { padding-left: 12px; }
.toast.celebrate { background: rgba(58, 42, 42, .9); }
.toast-icon { width: 26px; height: 26px; flex: none; background: var(--panel); border-radius: 50%; padding: 1px; }
.toast-icon svg { width: 100%; height: 100%; display: block; }
.toast-text { flex: 1; }
.toast button { border: 0; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-weight: 700; min-height: 32px; }
.float { position: fixed; z-index: 55; pointer-events: none; font-family: var(--display); font-size: 1.3rem; color: var(--leaf); text-shadow: 0 2px 0 #fff; }

/* ---------- sheets ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 70; background: rgba(58, 42, 42, .35);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 12px max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}
.sheet-card {
  width: min(100%, 520px); max-height: 88%; overflow-y: auto;
  background: var(--card); border-radius: 22px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  -webkit-user-select: text; user-select: text;
}
.sheet h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.5rem; color: var(--eggplant); }
.sheet h3 { margin: 8px 0 0; font-family: var(--display); font-weight: 400; font-size: 1.1rem; }
.sheet p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.big-count { font-family: var(--display); font-size: 2rem; font-variant-numeric: tabular-nums; }
.btn {
  border: 0; border-radius: 14px; min-height: 48px; padding: 0 16px;
  background: var(--panel); font-weight: 700; font-size: 1rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
}
.btn.primary { background: var(--leaf); color: #fff; }
.btn.danger { background: #fde0dc; color: #9c2318; }
.btn.armed { background: var(--tomato); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.toggle { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 700; }
.toggle input { width: 26px; height: 26px; accent-color: var(--eggplant); }
details { display: flex; flex-direction: column; gap: 8px; }
summary { cursor: pointer; font-weight: 700; color: var(--eggplant); min-height: 40px; display: flex; align-items: center; }
textarea { width: 100%; border: 2px solid var(--edge); border-radius: 12px; padding: 8px; font: inherit; font-size: .85rem; background: #fff; margin-bottom: 8px; }
.version { text-align: center; margin-top: 6px; }

/* lists inside the restaurant, recipe book and badge panels */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 14px; padding: 10px 12px; }
.list b { font-family: var(--display); font-weight: 400; font-size: 1.05rem; display: block; }
.list span { font-size: .85rem; color: var(--muted); display: block; }
.list em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--tomato); display: block; margin-top: 2px; }
.rest-photo {
  position: sticky; top: -20px; z-index: 2; margin: -20px -20px 0; padding: 20px 20px 8px;
  background: var(--card); display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 6px 10px -8px rgba(122, 59, 31, .4);
}
.rest-art { border-radius: 16px; overflow: hidden; background: #fbe7c6; }
.upg { cursor: pointer; }
.upg.focused { box-shadow: inset 0 0 0 3px var(--eggplant) !important; }
.swatches { display: flex; gap: 8px; margin-top: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(58, 42, 42, .25); cursor: pointer; padding: 0; }
.swatch.on { border: 3px solid var(--eggplant); box-shadow: 0 0 0 2px #fff inset; }
.rest-art svg { display: block; width: 100%; height: auto; }
.upg-text { flex: 1; min-width: 0; }
.upg.later { opacity: .6; }
.upg.next { background: #fff3dc; box-shadow: inset 0 0 0 2px var(--leaf); }
.upg-done { width: 30px; height: 30px; flex: none; }
.upg-done svg { width: 100%; height: 100%; }
.upg-cost { font-family: var(--display); font-size: 1rem; color: var(--muted); }
.upg-cost:has(br) { font-size: .82rem; text-align: center; line-height: 1.25; flex: none; }
.upg-what { display: block; color: var(--teal, #2f8a8f); font-weight: 700; font-size: .74rem; letter-spacing: .02em; text-transform: uppercase; margin: 1px 0 2px; }
.upg-buy { min-height: 44px; padding: 0 14px; font-family: var(--display); font-weight: 400; }
.recipe-art { width: 56px; height: 56px; flex: none; border-radius: 12px; padding: 3px; }
.recipe-art svg { width: 100%; height: 100%; display: block; }
.recipe.unknown .recipe-art svg { filter: brightness(0) opacity(.18); }
.recipe-text { min-width: 0; }
.list .hers { color: var(--tulip, #e8475f); font-size: .72rem; font-weight: 700; }
.plate { width: 68px; height: 68px; flex: none; }
.plate svg { width: 100%; height: 100%; display: block; overflow: visible; }
.badge-text { flex: 1; min-width: 0; }
/* Badges: a food friend under a silver lid. The lid normally sits lifted to the upper left;
   on the "badge earned" card it starts closed and lifts off, then the golden spoons pop in. */
.bdg-lid { transform-box: view-box; transform-origin: 14px 78px; transform: translate(-6px, -30px) rotate(-22deg) scale(.6); }
.cele-art.reveal .bdg-lid { animation: lidlift 1s .35s cubic-bezier(.3, .7, .4, 1) both; }
.cele-art.reveal .bdg-spoon { transform-box: fill-box; transform-origin: center; animation: spoonpop .45s calc(1.25s + var(--i) * .2s) both; }
@keyframes lidlift { from { transform: none; } }
@keyframes spoonpop { 0% { transform: scale(0); } 70% { transform: scale(1.4); } 100% { transform: scale(1); } }
.badge.is-soon { opacity: .6; }
.bar-track { height: 8px; border-radius: 4px; background: #fff; margin-top: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--leaf); }

/* big moment card: new recipe, badge, upgrade */
.celebrate {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
  background: rgba(58, 42, 42, .45); cursor: pointer;
}
.cele-card {
  width: min(100%, 340px); background: var(--card); border-radius: 26px; padding: 20px 20px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  box-shadow: 0 0 0 6px #f7c873, 0 18px 40px rgba(58, 42, 42, .3);
}
.cele-card p { margin: 0; }
.cele-title { font-family: var(--display); font-size: 1.6rem; color: var(--eggplant); }
.cele-art { width: 150px; height: 150px; background: radial-gradient(circle, #ffe7a8 0 55%, transparent 56%); }
.cele-art.wide { width: 100%; height: auto; background: #fbe7c6; border-radius: 14px; overflow: hidden; }
.cele-art svg { width: 100%; height: 100%; display: block; }
.cele-art.wide svg { height: auto; }
.cele-name { font-family: var(--display); font-size: 1.25rem; }
.cele-line { color: var(--muted); font-size: .9rem; }
.cele-reward { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 1.4rem; color: var(--leaf); }
.cele-reward svg { width: 26px; height: 26px; }
.cele-tap { font-size: .75rem; color: var(--muted); margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .guide::after, .wiggle, .cele-art.reveal .bdg-lid, .cele-art.reveal .bdg-spoon { animation: none; }
  .guide::after { opacity: 1; }
}


/* ---------- phase 3: gems, Today, trivia, prizes, mini games ---------- */
.pill.gems { cursor: pointer; padding-right: 9px; }
.pill.gems .icon { width: 24px; height: 24px; }
.nav { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.nav-btn { font-size: .64rem; }
.nav-btn.today { background: #f9d6e2; }
.cell.fam-wild { background: #fffdf8; box-shadow: inset 0 0 0 3px #f6b62e; }
.info-icon.fam-wild { background: #fff3c8; }
.gem-skip { background: #e6d6f3; box-shadow: 0 2px 0 #9b5cc0; line-height: 1.1; font-size: .8rem; display: flex; flex-direction: column; align-items: center; }
.gem-skip svg { width: 14px; height: 14px; vertical-align: -2px; }
.gem-skip:disabled { opacity: .5; }
#rf-gems svg { width: 18px; height: 18px; vertical-align: -3px; }
.today-card { flex-wrap: wrap; }
.today-card.glow { background: #fff3dc; box-shadow: inset 0 0 0 2px #f7c873; }
.today-card.done { opacity: .75; }
.today-text { flex: 1; min-width: 0; }
.today-card .btn { min-height: 44px; padding: 0 14px; flex: none; }
.modes { display: flex; gap: 6px; margin-top: 6px; }
.mode { border: 0; border-radius: 999px; padding: 5px 12px; font-size: .78rem; font-weight: 700; background: #fff; color: var(--muted); cursor: pointer; }
.mode.on { background: var(--eggplant); color: #fff; }
.cele-emoji { width: 100%; height: 100%; display: grid; place-items: center; }
.cele-emoji svg { width: 70%; height: 70%; }
.trivia-q { font-family: var(--display); font-size: 1.2rem; line-height: 1.25; }
.trivia-opts { display: grid; gap: 8px; }
.trivia-opt { justify-content: flex-start; text-align: left; min-height: 52px; background: #fff; box-shadow: inset 0 0 0 2px var(--edge); }
.trivia-opt.right { background: #d6f0c8; box-shadow: inset 0 0 0 3px var(--leaf); }
.trivia-opt.wrong { background: #fde0dc; box-shadow: inset 0 0 0 3px var(--tomato); }
.trivia-opt:disabled { color: var(--ink); opacity: 1; }
.trivia-result { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border-radius: 14px; padding: 12px; }
.trivia-result b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--eggplant); }
.trivia-win { font-weight: 700; color: var(--leaf) !important; }

.game {
  position: fixed; inset: 0; z-index: 75; background: var(--sun-bg); display: flex; flex-direction: column;
  padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
}
.game-top { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.game-top b { font-family: var(--display); font-weight: 400; font-size: 1.2rem; color: var(--eggplant); }
.game-top span { margin-left: auto; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.game-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; }
.skee { display: block; touch-action: none; border-radius: 18px; }
.game-hint { margin: 6px 0 0; height: 24px; font-weight: 700; color: var(--muted); }
.game-result { width: min(100%, 340px); background: var(--card); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; box-shadow: 0 0 0 6px #f7c873; }
.game-result p { margin: 0; }
.game-result .btn-row { width: 100%; }
.cele-reward svg { width: 26px; height: 26px; }
.match-timer { width: min(100%, 420px); height: 10px; background: var(--panel); border-radius: 5px; overflow: hidden; margin-bottom: 10px; }
.match-timer i { display: block; height: 100%; width: 100%; background: var(--leaf); border-radius: 5px; transition: width .2s linear; }
.match-grid { width: min(100%, 420px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.card { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; }
.card span { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; transition: transform .3s ease; display: grid; place-items: center; }
.card-back { background: var(--eggplant); box-shadow: inset 0 0 0 4px #7a4a90; }
.card-back svg { width: 55%; height: 55%; }
.card-front { background: #fffdf8; transform: rotateY(180deg); box-shadow: inset 0 0 0 3px var(--edge); padding: 6px; }
.card-front svg { width: 100%; height: 100%; }
.card.up .card-back { transform: rotateY(180deg); }
.card.up .card-front { transform: rotateY(360deg); }
.card.matched .card-front { box-shadow: inset 0 0 0 3px var(--leaf); }
@media (prefers-reduced-motion: reduce) { .card span { transition: none; } }


/* ---------- harder customers, speed tips, stars ---------- */
.reward { flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1; }
.reward .pay { display: flex; align-items: center; gap: 3px; }
.reward .stars { font-size: .78rem; color: #c48a12; }
.order { grid-template-rows: 38px auto 30px 8px; }
/* The wait bar: drops as the customer waits; green, then gold, then orange. */
.tipbar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #eadfcf; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(58,42,42,.08); }
.tipbar i { display: block; height: 100%; border-radius: 4px; transition: width 1s linear, background-color .4s; background: var(--leaf); }
.tipbar.waiting i { background: #f6b62e; }
.tipbar.late i { background: #e8742f; }
.pay-n { font-weight: 400; display: inline-block; }
.need.many { gap: 3px; }
.need.many .need-item { width: 38px; height: 38px; }
.brand-stars { color: #f6b62e; font-size: .9rem; letter-spacing: 1px; }
.cele-stars { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3.4rem; color: #f6b62e; letter-spacing: 4px; text-shadow: 0 3px 0 #c48a12; }

.abilities {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--card); border-radius: 16px; padding: 6px 8px;
  box-shadow: 0 6px 20px rgba(122, 59, 31, .22);
}
.abilities[hidden] { display: none !important; }
.abilities-title { font-size: .72rem; font-weight: 700; color: var(--muted); margin-right: auto; }
.abilities .gem-skip, .info .gem-skip { min-height: 44px; padding: 0 10px; }

/* ---------- the world map ---------- */
.map-art { border-radius: 16px; overflow: hidden; }
.map-art svg { display: block; width: 100%; height: auto; }
.map-here { font-family: var(--display); color: #e8475f; font-size: .95rem; }
.recipe-city { background: transparent !important; padding: 8px 4px 0 !important; justify-content: space-between; }
.recipe-city b { color: var(--eggplant); }

/* ---------- mini golf ---------- */
.golf-sign { display: flex; align-items: baseline; justify-content: center; gap: 8px; height: 28px; margin-bottom: 6px; }
.golf-sign b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--eggplant); }
.golf-sign span { font-weight: 700; color: var(--muted); font-size: .9rem; }
.golf-course { width: 100%; max-width: 520px; height: 100%; overflow-y: auto; touch-action: pan-y; padding: 2px 2px 12px; }
.golf-note { margin: 0 0 8px; text-align: center; font-weight: 700; color: var(--muted); font-size: .9rem; }
.golf-msg { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: #fde0dc; color: var(--ink); font-weight: 700; text-align: center; font-size: .9rem; }
.golf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.golf-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; border-radius: 16px; padding: 6px 6px 8px; background: var(--card); color: var(--ink);
  font: inherit; cursor: pointer; box-shadow: 0 3px 0 var(--edge);
}
.golf-tile canvas { width: 100%; aspect-ratio: 100 / 130; border-radius: 10px; display: block; }
.golf-tile b { font-family: var(--display); font-weight: 400; font-size: .9rem; color: var(--eggplant); line-height: 1.1; text-align: center; }
.golf-tile small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.golf-num {
  position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--eggplant); color: #fff; font-family: var(--display); font-size: .9rem;
}
.golf-stars { color: #f6b62e; letter-spacing: 1px; font-size: 1rem; line-height: 1; text-shadow: 0 1px 0 #c48a12; }
.golf-lock { color: var(--muted); font-size: .7rem; font-weight: 700; text-align: center; line-height: 1.15; }
.golf-tile.locked canvas { filter: grayscale(.85) brightness(.85); opacity: .7; }
.golf-tile.locked::after {
  content: ""; position: absolute; top: 28%; left: 50%; width: 34px; height: 30px; transform: translateX(-50%);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='10' width='16' height='12' rx='3' fill='%235b2c6f'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='%235b2c6f' stroke-width='2.6'/%3E%3Ccircle cx='12' cy='16' r='2' fill='%23f6b62e'/%3E%3C/svg%3E");
}
.golf-big-stars { font-size: 2.6rem; color: #f6b62e; letter-spacing: 4px; text-shadow: 0 3px 0 #c48a12; line-height: 1; }

/* ---------- complaints ---------- */
.hearts { color: #e2412f; letter-spacing: 1px; font-size: .78rem; margin-left: 4px; }
.tipbar.urgent i { background: #e2412f; animation: urgent .8s ease-in-out infinite; }
@keyframes urgent { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .tipbar.urgent i { animation: none; } }

/* ---------- VIPs: special guests with a gold card ---------- */
.order.vip { background: #fff3cf; box-shadow: 0 0 0 2px var(--gold), 0 2px 0 var(--edge); }
.order.vip.ready { box-shadow: 0 0 0 3px var(--leaf), 0 2px 0 var(--edge); }
.cust.vip-face { position: relative; overflow: visible; border: 0; padding: 0; cursor: pointer; background: #ffe08a; box-shadow: 0 0 0 2px var(--gold); }
.cust.vip-face svg { clip-path: circle(46% at 50% 47%); }
.vip-tag {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  background: var(--eggplant); color: #ffd34d; border-radius: 6px; padding: 0 4px;
  font-family: var(--display); font-size: .58rem; line-height: 1.35; letter-spacing: .04em;
}
.order.vip .cust-name { font-size: .7rem; }
.order.vip-rush .cust-name { color: var(--tomato); font-family: var(--display); font-weight: 400; font-size: .85rem; font-variant-numeric: tabular-nums; }
.need-item.like::before {
  content: "♥"; position: absolute; left: -3px; top: -5px; font-size: .8rem; line-height: 1; color: var(--tulip, #e8475f);
}
.tipbar.rush i { background: var(--tomato); }
.tipbar.rush.fresh i { background: #e8742f; }
.tipbar.rush.late { animation: rushpulse .8s ease-in-out infinite; }
.tipbar.review:not(.urgent) i { background: var(--gold); }
@keyframes rushpulse { 50% { box-shadow: 0 0 0 2px var(--tomato); } }
@media (prefers-reduced-motion: reduce) { .tipbar.rush.late { animation: none; } }

/* ---------- the neighbourhood ---------- */
.hood-name { display: flex; align-items: center; gap: 6px; }
.hood-name input {
  flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--display); font-size: 1.5rem;
  color: var(--eggplant); padding: 2px 0; border-bottom: 2px dashed transparent;
}
.hood-name input:focus { outline: none; border-bottom-color: var(--eggplant); }
.hood-name .pencil { color: var(--muted); font-size: 1.1rem; }
.buzz-card { background: var(--panel); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.buzz-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.buzz-top b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--eggplant); }
.buzz-top span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.event-on { font-weight: 700; color: #e8475f; font-size: .85rem; }
/* event animations over the street */
.fx-burst { transform-box: fill-box; transform-origin: center; animation: burst 1.6s ease-out infinite; }
@keyframes burst { 0% { transform: scale(.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.fx-parade { animation: parade 7s linear infinite; }
@keyframes parade { from { transform: translateX(0); } to { transform: translateX(640px); } }
.fx-bob { transform-box: fill-box; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }
.fx-fall { animation: fall 2.4s linear infinite; }
@keyframes fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(260px) rotate(200deg); } }
.fx-pop { transform-box: fill-box; transform-origin: bottom center; animation: pop 1.4s ease-out infinite alternate; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .fx-burst, .fx-parade, .fx-bob, .fx-fall, .fx-pop { animation: none; } .fx-parade { transform: translateX(300px); } }
.upg .pips { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: 1px; font-size: 0; }
.upg .pips i { display: block; flex: none; width: 11px; height: 11px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--eggplant); }
.upg .pips i.on { background: var(--eggplant); }
.upg-buy { line-height: 1.15; }
/* Header pills: the number with a small label under it (tips are this restaurant's, gems are shared). */
.pill { position: relative; }
.pill-num { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.pill-num small { font-family: var(--body, inherit); font-size: .62rem; color: var(--muted); letter-spacing: .02em; margin-top: 1px; }
.pill.gems .dot { top: 2px; right: 2px; }
/* The neighbourhood fund (BIA dollars) */
.fund-card { flex-direction: row; align-items: center; gap: 12px; }
.fund-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fund-text b { font-family: var(--display); font-size: 1.5rem; font-weight: 400; color: var(--eggplant); }
.fund-text span { font-size: .85rem; }
.fund-card .btn { line-height: 1.15; flex: none; }

/* ---------- the gem shop: picture tiles on shelves, and a missions tab ---------- */
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shop-top h2 { margin: 0; }
.shop-gems { display: inline-flex; align-items: center; gap: 4px; background: #efe3fb; color: var(--eggplant); border-radius: 999px; padding: 4px 12px 4px 6px; font-family: var(--display); font-size: 1.25rem; }
.shop-gems svg, .shop-buy svg, .shop-chip svg { width: 1.2em; height: 1.2em; display: block; }
.shop-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--panel); border-radius: 14px; padding: 4px; margin-top: 4px; }
.shop-tab { position: relative; border: 0; border-radius: 10px; background: transparent; min-height: 44px; font-family: var(--display); font-size: 1.02rem; color: var(--muted); cursor: pointer; }
.shop-tab.on { background: var(--card); color: var(--eggplant); box-shadow: 0 2px 4px rgba(122, 59, 31, .15); }
.shop-tab .dot { position: static; display: inline-block; vertical-align: 2px; margin-left: 4px; box-shadow: none; }
.shop-pane { display: flex; flex-direction: column; gap: 10px; }
.shop-pane h3 { margin-top: 10px; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; background: var(--panel); border-radius: 16px; padding: 10px 8px; }
.shop-tile[data-try] { cursor: pointer; }
.shop-tile.picked { box-shadow: inset 0 0 0 3px var(--eggplant); }
.shop-tile.deal { box-shadow: inset 0 0 0 2px var(--gold); }
.shop-tile.owned { opacity: .8; }
.shop-tile b { font-family: var(--display); font-weight: 400; font-size: .98rem; line-height: 1.15; }
.shop-tile small { font-size: .78rem; color: var(--muted); line-height: 1.25; flex: 1; }
.shop-art { width: 64px; height: 64px; display: grid; place-items: center; background: var(--card); border-radius: 14px; overflow: hidden; flex: none; }
.shop-art svg { width: 100%; height: 100%; display: block; }
.shop-art.decor { width: 100%; height: 64px; background: #fbe7c6; }
.shop-stack { position: relative; width: 100%; height: 100%; }
.shop-stack svg { position: absolute; width: 62%; height: 62%; }
.shop-stack svg:nth-child(1) { left: 2%; top: 30%; }
.shop-stack svg:nth-child(2) { left: 36%; top: 30%; }
.shop-stack svg:nth-child(3) { left: 19%; top: 4%; }
.shop-buy { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; min-width: 76px; margin-top: 4px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--leaf); color: #fff; font-family: var(--display); font-size: 1.05rem; cursor: pointer; }
.shop-buy b { font-weight: 400; }
.shop-buy s { opacity: .75; font-size: .85rem; margin-right: 2px; }
.shop-buy:disabled { background: #cbbfae; cursor: default; }
.shop-owned { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin-top: 4px; font-family: var(--display); font-size: .9rem; color: var(--muted); }
.shop-owned svg { width: 20px; height: 20px; }
.shop-owned.on { color: var(--leaf); }
.shop-special { position: relative; display: flex; align-items: center; gap: 12px; background: #fff3dc; box-shadow: inset 0 0 0 2px var(--gold); border-radius: 16px; padding: 18px 12px 12px; margin-top: 8px; }
.shop-special .shop-art { width: 72px; height: 72px; }
.shop-special .shop-art.decor { width: 96px; }
.shop-special-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-special-text b { font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.shop-special-text small { font-size: .8rem; color: var(--muted); }
.shop-special .shop-buy { flex: none; margin: 0; }
.shop-ribbon { position: absolute; top: -9px; left: 12px; background: var(--tomato); color: #fff; font-family: var(--display); font-size: .8rem; border-radius: 999px; padding: 2px 10px; }
.shop-preview { border-radius: 16px; }
.shop-preview svg { display: block; width: 100%; height: auto; }
.shop-abilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shop-chip { position: relative; background: var(--panel); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.shop-chip b { font-family: var(--display); font-weight: 400; font-size: .95rem; padding-right: 44px; }
.shop-chip span { font-size: .76rem; color: var(--muted); }
.shop-chip i { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-family: var(--display); color: var(--eggplant); }
.shop-chip i b { padding: 0; font-size: .95rem; }
.tip.boost { background: #efe3fb; color: var(--eggplant); }
.mission-bar { margin-top: 6px; height: 8px; }

/* ---------- Tulip Island ---------- */
.island-card { max-height: 94%; padding: 14px; gap: 8px; }
.isl-top { display: flex; align-items: center; gap: 8px; }
.isl-top .hood-name { flex: 1; min-width: 0; }
.isl-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--panel); color: var(--eggplant); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.isl-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.isl-fund { display: flex; flex-direction: column; line-height: 1.1; }
.isl-fund b { font-family: var(--display); font-weight: 400; font-size: 1.4rem; color: var(--leaf); }
.isl-fund span, .isl-level span { font-size: .75rem; color: var(--muted); }
.isl-level { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 3px; }
.isl-level b { font-family: var(--display); font-weight: 400; color: var(--eggplant); font-size: 1rem; }
.isl-stats .btn { min-height: 40px; padding: 0 12px; }
.isl-stats .event-on { flex-basis: 100%; }
.isl-mapwrap { position: relative; flex: none; height: min(52vh, 460px); border-radius: 16px; overflow: hidden; background: #6ab9d6; box-shadow: inset 0 0 0 2px var(--edge); }
.isl-map { width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: grab; }
.isl-map::-webkit-scrollbar { display: none; }
.isl-map svg { display: block; }
.isl-night { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 250, 240, .92); color: var(--eggplant); font-size: 1.25rem; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.isl-banner { position: absolute; left: 8px; right: 8px; bottom: 8px; background: var(--card); border-radius: 14px; padding: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; box-shadow: 0 6px 18px rgba(36, 27, 74, .25); }
.isl-b-text { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; }
.isl-b-text b { font-family: var(--display); font-weight: 400; color: var(--eggplant); }
.isl-b-text span { font-size: .8rem; color: var(--muted); }
.isl-banner .btn { min-height: 40px; padding: 0 12px; }
.isl-banner .pips { margin-left: 0; margin-right: 4px; vertical-align: 0; }
.isl-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: var(--panel); border-radius: 14px; padding: 4px; }
.isl-tab { border: 0; border-radius: 10px; background: transparent; min-height: 42px; font-family: var(--display); font-size: .92rem; color: var(--muted); cursor: pointer; }
.isl-tab.on { background: var(--card); color: var(--eggplant); box-shadow: 0 2px 4px rgba(122, 59, 31, .15); }
.isl-panel { display: flex; flex-direction: column; gap: 8px; }
.isl-panel h3 { margin: 6px 0 0; }
.isl-decor { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.isl-deco { border: 0; background: var(--panel); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); font-family: var(--body); }
.isl-deco.on { box-shadow: inset 0 0 0 3px var(--eggplant); }
.isl-deco:disabled { opacity: .5; }
.isl-deco b { font-family: var(--display); font-weight: 400; font-size: .85rem; color: var(--eggplant); }
.isl-deco .money { color: var(--leaf); font-weight: 700; font-size: .85rem; }
.isl-deco-art { width: 56px; height: 56px; background: #a6dcea; border-radius: 12px; overflow: hidden; }
.isl-deco-art svg { width: 100%; height: 100%; display: block; }
.isl-wave { animation: isl-wave 3.4s ease-in-out infinite; }
@keyframes isl-wave { 50% { opacity: .1; transform: translateX(6px); } }
.isl-beam { animation: isl-beam 5s ease-in-out infinite alternate; }
@keyframes isl-beam { from { transform: rotate(-25deg); } to { transform: rotate(205deg); } }
@media (prefers-reduced-motion: reduce) { .isl-wave, .isl-beam { animation: none; } .isl-move { display: none; } }

/* ---------- today's mood (Settings) ---------- */
.moods { display: flex; flex-direction: column; gap: 6px; }
.mood { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 14px; background: var(--panel); padding: 8px 10px; cursor: pointer; color: var(--ink); font-family: var(--body); }
.mood.on { background: #efe3fb; box-shadow: inset 0 0 0 3px var(--eggplant); }
.mood-text { display: flex; flex-direction: column; min-width: 0; }
.mood-text b { font-family: var(--display); font-weight: 400; color: var(--eggplant); font-size: 1.02rem; }
.mood-text span { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.mood-meter { flex: none; display: flex; gap: 2px; align-items: flex-end; height: 18px; }
.mood-meter span { display: block; width: 7px; border-radius: 2px; }

/* The green bin button in the info bar */
.sell.bin { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: #dff2d6; color: #2f7a2d; box-shadow: 0 2px 0 #9fcf8c; font-size: .8rem; padding: 2px 12px; }
.sell.bin svg { width: 22px; height: 22px; display: block; }

/* The player's name: on the welcome card and in Settings */
.name-field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.name-field input { font-family: var(--display); font-size: 1.25rem; color: var(--eggplant); border: 2px solid var(--edge); border-radius: 12px; padding: 8px 12px; background: #fff; min-height: 48px; }
.name-field input:focus { outline: none; border-color: var(--eggplant); }
.welcome-form { display: flex; flex-direction: column; gap: 10px; }

/* The new food families (Hana Sushi, Sunny Side, Sugar Tulip) get their own tinted squares, so pale foods stand out. */
.cell.fam-rice { background: #e2eef7; box-shadow: inset 0 0 0 3px #8fb6d9; }
.need-item.fam-rice { background: #e2eef7; box-shadow: inset 0 0 0 2px #8fb6d9; }
.step.fam-rice .step-art, .info-icon.fam-rice { background: #e2eef7; }
.cell.fam-tea { background: #e6f2d8; box-shadow: inset 0 0 0 3px #9cc56e; }
.need-item.fam-tea { background: #e6f2d8; box-shadow: inset 0 0 0 2px #9cc56e; }
.step.fam-tea .step-art, .info-icon.fam-tea { background: #e6f2d8; }
.cell.fam-coffee { background: #f3e3d3; box-shadow: inset 0 0 0 3px #c9955a; }
.need-item.fam-coffee { background: #f3e3d3; box-shadow: inset 0 0 0 2px #c9955a; }
.step.fam-coffee .step-art, .info-icon.fam-coffee { background: #f3e3d3; }
.cell.fam-fruit { background: #fde3e6; box-shadow: inset 0 0 0 3px #ef8f9b; }
.need-item.fam-fruit { background: #fde3e6; box-shadow: inset 0 0 0 2px #ef8f9b; }
.step.fam-fruit .step-art, .info-icon.fam-fruit { background: #fde3e6; }
.cell.fam-cocoa { background: #f3e0d6; box-shadow: inset 0 0 0 3px #b9806a; }
.need-item.fam-cocoa { background: #f3e0d6; box-shadow: inset 0 0 0 2px #b9806a; }
.step.fam-cocoa .step-art, .info-icon.fam-cocoa { background: #f3e0d6; }
.cell.fam-icecream { background: #eee6fb; box-shadow: inset 0 0 0 3px #b9a2e6; }
.need-item.fam-icecream { background: #eee6fb; box-shadow: inset 0 0 0 2px #b9a2e6; }
.step.fam-icecream .step-art, .info-icon.fam-icecream { background: #eee6fb; }

/* ---------- the splash: the icon and the name while the game starts ---------- */
.splash { position: fixed; inset: 0; z-index: 200; background: #5b2c6f; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity .5s ease; }
.splash img { width: 136px; height: 136px; border-radius: 32px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.splash b { font-family: var(--display); font-weight: 400; font-size: 2.1rem; color: #fff3dc; letter-spacing: .02em; }
.splash span { color: #f6c33e; font-weight: 700; }
.splash.gone { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .splash { transition: none; } }
/* help with putting the game on the home screen */
.install-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.install-link { color: var(--eggplant); font-weight: 700; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }

/* ---------- rounds: progress and the replay picker (restaurant sheet) ---------- */
.rounds { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border-radius: 14px; padding: 10px 12px; }
.rounds-note { margin: 0; font-size: .92rem; }
.rounds-note b { font-family: var(--display); font-weight: 400; color: var(--eggplant); }
.round-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.round-pick { min-height: 44px; border: 0; border-radius: 12px; background: var(--card); font-family: var(--display); font-size: 1.1rem; color: var(--eggplant); cursor: pointer; box-shadow: 0 2px 0 var(--edge); }
.round-pick.on { background: var(--eggplant); color: #fff; }
.round-pick.crazy { grid-column: 1 / -1; background: #e8475f; color: #fff; }
.round-pick.crazy.on { box-shadow: inset 0 0 0 3px #fff3dc, 0 2px 0 var(--edge); }
.cele-stars small { font-size: .5em; opacity: .7; }

/* ---------- Cooking shifts (js/kitchen.js) ---------- */
.kitchen {
  position: fixed; inset: 0; z-index: 75; background: #fdebd0; display: flex; flex-direction: column;
  padding: max(6px, env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  -webkit-user-select: none; user-select: none;
}
.kitchen .game-top { padding: 0 4px; }
.kitchen .game-top b { font-family: var(--display); font-weight: 400; font-size: 1.2rem; color: var(--eggplant); }
.kitchen .game-top span { margin-left: auto; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; text-align: right; }
.k-stage { position: relative; flex: 1; min-height: 0; touch-action: manipulation; }
.k-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.k-svg { width: 100%; height: 100%; display: block; }
.k-say { font-family: var(--body); font-weight: 700; font-size: 13px; line-height: 1.25; color: var(--ink); height: 56px; display: flex; align-items: center; }
.kglow { animation: kglow 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes kglow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.kitchen .bob { animation: kbob 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
.kitchen .bob.b { animation-delay: .7s; }
@keyframes kbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.kitchen .steam { animation: ksteam 2.4s ease-in-out infinite; }
.kitchen .steam.b { animation-delay: .8s; }
@keyframes ksteam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .8; } 100% { opacity: 0; transform: translateY(-8px); } }
.kitchen .flame { animation: kflick 1.2s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center bottom; }
@keyframes kflick { from { transform: scaleY(.85); } to { transform: scaleY(1.1); } }
.k-float {
  position: absolute; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap;
  font-family: var(--display); font-size: 1.2rem; color: var(--leaf); text-shadow: 0 2px 0 #fff, 0 -1px 0 #fff;
  animation: kfloat 1.2s ease-out forwards;
}
@keyframes kfloat { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -40px; } }
.k-card {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 460px); max-height: 74%; overflow-y: auto;
  background: var(--card); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 -4px 24px rgba(58, 42, 42, .18);
}
.k-card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.45rem; color: var(--eggplant); }
.k-card h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 1.1rem; }
.k-card p { margin: 0; }
.k-shifts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.k-shift { border: 0; border-radius: 12px; background: var(--panel); padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; color: var(--ink); }
.k-shift b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; }
.k-shift span { font-size: .7rem; color: var(--gold); letter-spacing: .5px; }
.k-shift:disabled span { color: var(--muted); }
.k-shift:disabled { opacity: .5; cursor: default; }
.k-shift.on { background: var(--eggplant); color: #fff; }
.k-menu { font-size: .95rem; }
.k-appls { gap: 8px; }
.k-appl { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 14px; padding: 10px 12px; }
.k-appl > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.k-appl > div > span { font-size: .85rem; color: var(--muted); }
.k-appl .pips { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; font-size: 0; }
.k-appl .pips i { display: block; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--eggplant); }
.k-appl .pips i.on { background: var(--eggplant); }
.k-buy { flex: none; min-height: 44px; font-size: .85rem; line-height: 1.15; padding: 0 12px; }
.k-done { flex: none; font-weight: 700; color: var(--leaf); font-size: .85rem; }
.k-intro, .k-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.k-intro svg { width: 96px; height: 96px; }
.k-stars { font-size: 2.2rem; color: var(--gold); letter-spacing: 4px; line-height: 1; }
.k-earned { font-family: var(--display); font-size: 1.15rem; color: var(--leaf); }
.k-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.k-btns .btn { flex: 1 1 120px; }
.k-open {
  width: 100%; border: 0; border-radius: 16px; background: var(--eggplant); color: #fff; padding: 12px 14px; margin: 4px 0;
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
}
.k-open b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.2rem; }
.k-open small { display: block; opacity: .85; font-size: .85rem; }
.k-open-art { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--eggplant); display: grid; place-items: center; }
.k-open-art svg { width: 24px; height: 24px; }
.k-soon { text-align: center; }
@media (prefers-reduced-motion: reduce) { .kglow, .kitchen .bob, .kitchen .steam, .kitchen .flame, .k-float { animation: none; } }
.k-appl > div > span b { display: inline; font: inherit; font-weight: 700; color: var(--ink); }
.k-appl > div > b { display: block; font-family: var(--display); font-weight: 400; font-size: 1rem; }
.k-appl .k-helper { flex: none; width: 40px; height: 50px; }
.k-done.k-later { color: var(--muted); text-align: center; }
.k-shift.rush { box-shadow: inset 0 0 0 2px var(--tomato); }
.k-scene { touch-action: none; }
