/* Tahian ni Nena styles.
   One phone-width column (max 480px): ube HUD with money jars on top, then the
   season strip, shop floor, quest board, cost calendar and feed, and a sticky
   action bar. Bottom sheet for decisions. Light look only, same as BayadEra. */

:root {
  --ube-deep: #4a3378;
  --ube: #6b4fa0;
  --ube-soft: #ece5f6;
  --cream: #fbf6ee;
  --paper: #ffffff;
  --ink: #1d2b3a;
  --ink-soft: #55606e;
  --line: #e1d8c8;
  --gold: #f2b33d;
  --gold-deep: #b97c0c;
  --coral: #e5484d;
  --leaf: #2c8f53;
  --sea: #2f7f9e;

  --font-display: 'Baloo 2', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 18px;
  --shadow: 0 3px 0 rgba(29, 43, 58, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; }
.screen { min-height: 100vh; min-height: 100dvh; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-soft); font-size: 0.85rem; }
a { color: var(--ube); }

/* ---------- buttons ---------- */
.btn {
  font: 800 1rem/1.2 var(--font-body);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn:focus-visible, .chip:focus-visible, .choice:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--gold); }
.btn-big { font-size: 1.1rem; padding: 15px 22px; width: 100%; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.12);
  color: #fff; font: 800 1.05rem var(--font-body); cursor: pointer;
}

/* ---------- title ---------- */
.title-screen { display: flex; flex-direction: column; }
.title-sky {
  background:
    radial-gradient(circle at 14% 22%, rgba(255,255,255,.18) 0 3px, transparent 4px),
    radial-gradient(circle at 84% 30%, rgba(255,255,255,.18) 0 2px, transparent 3px),
    linear-gradient(180deg, var(--ube-deep) 0%, var(--ube) 75%, #9a7cc9 100%);
  color: #fff;
  padding: 40px max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  text-align: center;
  position: relative;
  overflow: hidden;
}
.title-sky::after {
  /* stitched hem */
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: var(--cream);
  border-top: 3px dashed var(--gold);
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 800; opacity: 0.9; margin: 0 0 6px; }
.logo { font-size: clamp(2.6rem, 13vw, 3.8rem); font-weight: 800; letter-spacing: -0.01em; }
.logo span { color: var(--gold); display: block; font: 800 0.3em/1.4 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; }
.title-sky .eyebrow { font-size: 0.95rem; letter-spacing: 0.08em; color: var(--gold); }
.tagline { margin: 8px auto 0; max-width: 30ch; font-weight: 700; opacity: 0.95; }
.title-hero { width: 170px; margin: 12px auto 0; position: relative; z-index: 1; }
.title-actions { padding: 24px 20px 32px; display: grid; gap: 12px; }
.fineprint { font-size: 0.78rem; color: var(--ink-soft); text-align: center; margin: 4px 0 0; }
.art { width: 100%; height: auto; display: block; }

/* ---------- intro ---------- */
.intro-screen { display: grid; place-items: center; padding: 20px; }
.intro-card {
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 24px;
  padding: 22px; box-shadow: var(--shadow); width: 100%;
}
.intro-art { width: 120px; margin: 0 auto 8px; }
.intro-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.intro-card p { margin: 0 0 10px; }
.intro-card ul { margin: 0 0 10px; padding-left: 20px; }
.intro-card li { margin-bottom: 6px; }
.intro-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ube); }
.pot-name { font-weight: 800; }
.pot-kaha { color: var(--ube); } .pot-baon { color: var(--sea); } .pot-pitaka { color: var(--leaf); }

/* ---------- HUD ---------- */
.hud {
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, var(--ube-deep), var(--ube));
  color: #fff;
  padding: max(10px, env(safe-area-inset-top, 0px)) 14px 12px;
  border-bottom: 3px dashed var(--gold);
}
.hud-top { display: flex; align-items: center; gap: 8px; }
.hud-date { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; flex: 1; }
.season { background: rgba(255,255,255,.16); border-radius: 999px; padding: 3px 10px; font-size: 0.8rem; font-weight: 800; white-space: nowrap; }
.hud-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 0.8rem; font-weight: 700; align-items: center; }
.hud-meta .debt { display: inline-flex; align-items: center; gap: 4px; }
.mini-monster { width: 20px; height: 18px; }
.stars { color: var(--gold); letter-spacing: 1px; }
.hearts { color: #ff9aa2; letter-spacing: 1px; }

/* ---------- stage ---------- */
.stage { padding: 12px 12px 110px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.strip {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 10px 12px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.strip .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--leaf); line-height: 1; }
.strip.warn .big { color: var(--coral); }
.panel { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.panel-head h2 { font-size: 1.2rem; }
.empty { color: var(--ink-soft); font-size: 0.9rem; text-align: center; padding: 10px 4px; }

.actionbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 6;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(251,246,238,0), var(--cream) 30%);
}
.actionbar .btn { padding: 13px 10px; font-size: 0.95rem; }

/* ---------- sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 20; background: rgba(29, 43, 58, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--paper); width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto;
  border: 2.5px solid var(--ink); border-bottom: 0; border-radius: 24px 24px 0 0;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom, 0px));
  animation: up 0.18s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet .kicker { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ube); margin: 0 0 4px; }
.sheet h2 { font-size: 1.45rem; margin-bottom: 6px; }
.sheet p { margin: 0 0 10px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.9rem; margin: 8px 0 12px; padding: 10px 12px; background: var(--cream); border-radius: 14px; }
.facts dt { color: var(--ink-soft); font-weight: 700; }
.facts dd { margin: 0; font-weight: 800; text-align: right; }
.callout { border-radius: 14px; padding: 9px 12px; font-size: 0.88rem; font-weight: 700; margin: 0 0 12px; border: 2px solid; }
.callout.ok { border-color: var(--leaf); color: #1f6b3d; background: #eaf6ee; }
.callout.risk { border-color: var(--coral); color: #a8262b; background: #fdecec; }
.callout.tip { border-color: var(--gold); color: #7a5208; background: #fff6df; }
.choices { display: grid; gap: 8px; }
.choice {
  text-align: left; font: inherit; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--paper);
  padding: 11px 14px; cursor: pointer; box-shadow: var(--shadow); color: var(--ink);
}
.choice:first-child { background: #fff3d6; }
.choice b { display: block; font-size: 1rem; }
.choice small { color: var(--ink-soft); font-weight: 700; }
.choice:disabled { opacity: 0.45; cursor: not-allowed; }
.choice:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }

.pay-section { margin: 12px 0; }
.pay-section h3 { font-size: 1rem; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 800 0.9rem var(--font-body); border: 2px solid var(--ink); border-radius: 999px; padding: 7px 12px;
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ube); color: #fff; }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.check { display: flex; gap: 8px; align-items: center; font-size: 0.88rem; font-weight: 700; margin-top: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--ube); }
/* ---------- end ---------- */
.end-screen { padding: 20px 16px 40px; display: grid; gap: 14px; align-content: start; }
.end-hero { text-align: center; }
.end-hero .art-nena { width: 120px; margin: 0 auto; }
.end-stars { font-size: 2.2rem; color: var(--gold); letter-spacing: 4px; }
.end-hero h1 { font-size: 2rem; }
.goal-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.goal-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.goal-list .mark { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-size: 0.9rem; }
.goal-list .done .mark { background: var(--leaf); color: #fff; }
.lessons { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ======================= v2 ======================= */
.tag {
  display: inline-block; font: 800 0.62rem/1.3 var(--font-body); text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--ube-soft); color: var(--ube-deep); border-radius: 6px; padding: 1px 5px; margin-left: 4px; vertical-align: 2px;
  white-space: nowrap;
}
.hud .tag { background: rgba(255,255,255,.2); color: #fff; }
.good { color: var(--leaf); }
.bad { color: var(--coral); }
.warn { color: var(--gold-deep); }

/* intro extras */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0 12px; font-size: 0.82rem; font-weight: 800; }
.flow span { background: var(--cream); border: 2px solid var(--ink); border-radius: 12px; padding: 5px 8px; line-height: 1.2; }
.flow small { font-weight: 700; color: var(--ink-soft); font-size: 0.72rem; }
.flow i { font-style: normal; color: var(--ube); font-weight: 800; }
.paycompare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.paycompare > div { background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 8px 10px; }
.paycompare p { font-size: 0.85rem; margin: 4px 0 0; }
.goals-intro { list-style: none; padding-left: 0 !important; }

/* HUD jars */
.jars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.jar-box {
  position: relative; display: flex; align-items: center; gap: 4px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; padding: 5px 6px; min-width: 0;
}
.jar-box .jar { width: 26px; height: 33px; flex: none; }
.jar-box > div { min-width: 0; }
.jar-box b { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; }
.jar-box .amt { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; line-height: 1.05; }
.jar-box small { display: block; font-size: 0.6rem; color: var(--ink-soft); line-height: 1.15; }
.jar-box.kaha b { color: var(--ube); } .jar-box.baon b { color: var(--sea); } .jar-box.pitaka b { color: var(--leaf); }
.bubble {
  position: absolute; right: 4px; top: -9px; font: 800 0.68rem var(--font-body); border-radius: 999px; padding: 1px 6px;
  border: 1.5px solid var(--ink); background: #eaf6ee; color: #1f6b3d; animation: pop 1.6s ease-out forwards;
}
.bubble.down { background: #fdecec; color: #a8262b; }
@keyframes pop { 0% { transform: translateY(6px); opacity: 0; } 15% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }
.hud-meta .debt.bad { color: #ffd0d2; }

/* season strip */
.season-strip {
  position: relative; display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; padding-bottom: 18px;
}
.season-strip .sm { text-align: center; padding: 5px 0 2px; font-size: 0.95rem; }
.season-strip .sm small { display: block; font-size: 0.66rem; font-weight: 800; color: var(--ink-soft); }
.season-strip .sm.sun { background: #fff6df; }
.season-strip .sm.rain { background: #e3eef4; }
.season-strip .walker { position: absolute; bottom: 0; width: 24px; height: 24px; transition: left 0.3s ease; overflow: hidden; }
.season-strip .walker svg { width: 24px; height: 24px; display: block; }
.season-strip { padding-bottom: 24px; }

/* shop floor */
.crew-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.crew {
  flex: none; width: 96px; scroll-snap-align: start; text-align: center; font: inherit; color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 6px 4px 7px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.crew .face { width: 44px; height: 47px; }
.crew b { font-size: 0.9rem; line-height: 1.1; }
.crew small { font-size: 0.66rem; color: var(--ink-soft); line-height: 1.15; }
.crew .mode { font-size: 0.62rem; font-weight: 800; border-radius: 999px; padding: 1px 6px; margin-top: 2px; border: 1.5px solid currentColor; white-space: nowrap; }
.crew .mode.arawan { color: var(--ube); } .crew .mode.pakyaw { color: var(--sea); }
.crew .today { font-size: 0.68rem; font-weight: 800; margin-top: 2px; }
.crew.add { border-style: dashed; background: var(--paper); justify-content: center; }
.crew.add .plus { font: 800 1.8rem/1 var(--font-display); color: var(--ube); }
.sundown { margin: 6px 0 0; font-size: 0.86rem; }
.grow {
  width: 100%; margin-top: 8px; font: inherit; color: var(--ink); cursor: pointer; text-align: left;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px;
  background: var(--paper); border: 2px dashed var(--ink); border-radius: 14px; padding: 8px 10px; font-size: 0.86rem;
}
.grow.ready { border-style: solid; background: #fff3d6; box-shadow: var(--shadow); }
.gate { display: flex; gap: 4px; flex-wrap: wrap; }
.gate i { font-style: normal; font-size: 0.72rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; background: var(--cream); border: 1.5px solid var(--line); color: var(--ink-soft); }
.gate i.ok { border-color: var(--leaf); color: var(--leaf); background: #eaf6ee; }

/* quest board: scrolls sideways inside its panel */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.col { background: var(--cream); border-radius: 12px; padding: 6px; min-width: 0; }
.col h3 { font: 800 0.74rem var(--font-body); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin: 0 0 6px; display: flex; justify-content: space-between; gap: 4px; }
.col h3 span { background: var(--paper); border-radius: 999px; padding: 0 6px; border: 1.5px solid var(--line); }
.col-tahi h3 { color: var(--ube); } .col-ready h3 { color: var(--leaf); } .col-bayad h3 { color: var(--gold-deep); }
.col .empty { padding: 4px; }
.chip-order { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 7px; margin-bottom: 6px; font-size: 0.8rem; }
.chip-order.late { border-color: var(--coral); }
.co-top { display: flex; gap: 4px; align-items: flex-start; line-height: 1.15; }
.co-top b { flex: 1; font-size: 0.8rem; }
.co-icon { flex: none; }
.chip-order small { color: var(--ink-soft); display: block; margin: 1px 0 3px; }
.co-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 6px; font-size: 0.7rem; font-weight: 800; margin-top: 3px; }
.bar { height: 7px; border-radius: 99px; background: var(--ube-soft); border: 1.5px solid var(--ink); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ube); }

/* cost calendar and runway */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day { background: var(--cream); border-radius: 9px; text-align: center; padding: 3px 0 2px; min-height: 52px; border: 1.5px solid transparent; }
.cal-day small { display: block; font-size: 0.6rem; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; }
.cal-day b { display: block; font-size: 0.85rem; line-height: 1.1; }
.cal-day span { display: block; font-size: 0.66rem; line-height: 1.2; word-break: break-all; }
.cal-day.payday { border-color: var(--leaf); background: #eaf6ee; }
.cal-day.sun { opacity: 0.6; }
.runway { margin-top: 10px; }
.runway p { font-size: 0.85rem; margin: 6px 0 0; }
.runway-bar { height: 12px; border-radius: 99px; background: var(--cream); border: 1.5px solid var(--ink); overflow: hidden; }
.runway-bar span { display: block; height: 100%; background: var(--leaf); }
.runway-bar span.warn { background: var(--gold); } .runway-bar span.bad { background: var(--coral); }
.legend { color: var(--ink-soft); font-size: 0.72rem !important; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 0.86rem; }
.feed li { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: start; }
.feed .fi { text-align: center; }
.feed .fa { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed .fa.plus { color: var(--leaf); } .feed .fa.minus { color: var(--coral); }
.feed li.bad .ft { color: #a8262b; } .feed li.good .ft { font-weight: 700; }
.feed li.flavor .ft { color: var(--ink-soft); font-style: italic; }
.feed li.old { opacity: 0.6; }

/* offer card */
.order-line { font-size: 0.95rem; }
.quirk { background: var(--cream); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: 6px 10px; font-size: 0.86rem; font-style: italic; }
.split { margin: 10px 0; }
.split-bar { position: relative; display: flex; height: 22px; border: 2px solid var(--ink); border-radius: 8px; overflow: visible; background: var(--cream); }
.split-bar > span { display: block; height: 100%; }
.split-bar > span:first-child { border-radius: 6px 0 0 6px; }
.split-bar > span:last-of-type { border-radius: 0 6px 6px 0; }
.s-cloth { background: #c98a3c; } .s-crew { background: var(--sea); } .s-left { background: var(--leaf); }
.dp-mark { position: absolute; top: -7px; bottom: -7px; width: 0; border-left: 3px solid var(--ink); }
.dp-mark::after { content: '▲'; position: absolute; bottom: -14px; left: -7px; font-size: 0.7rem; font-style: normal; }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.74rem; font-weight: 800; margin-top: 8px; }
.split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.dp-note { font-size: 0.82rem; margin: 6px 0 0 !important; }
.fit { margin: 0 0 12px; }
.fit-row { display: flex; gap: 2px; }
.fit-row span { flex: 1; height: 14px; border-radius: 3px; background: var(--cream); border: 1.5px solid var(--line); }
.fit-row span.busy { background: var(--ube-soft); border-color: var(--ube); }
.fit-row span.due { border: 2px solid var(--ink); background: #fff3d6; }
.fit.risk .fit-row span.busy { background: #fdecec; border-color: var(--coral); }
.fit p { font-size: 0.82rem; margin: 5px 0 0 !important; }
.fit.ok p { color: #1f6b3d; } .fit.risk p { color: #a8262b; }

/* blocked and sahod cards */
.need-have { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.need-have > div { background: var(--cream); border-radius: 12px; padding: 8px 10px; text-align: center; }
.need-have small { display: block; font-size: 0.72rem; font-weight: 800; color: var(--ink-soft); }
.need-have b { font-family: var(--font-display); font-size: 1.4rem; }
.payroll { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0; }
.payroll > div { flex: none; width: 70px; text-align: center; font-size: 0.78rem; display: flex; flex-direction: column; align-items: center; }
.payroll .face { width: 38px; height: 40px; }

/* kinsenas chart */
.chart { width: 100%; height: auto; display: block; margin: 4px 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.chart-legend i.dash { height: 0; border-top: 3px dashed var(--gold); border-radius: 0; vertical-align: 3px; }
.flowsum { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--cream); border-radius: 14px; padding: 8px 12px; margin: 0 0 12px; }
.flowsum > div { text-align: center; }
.flowsum small { display: block; font-size: 0.7rem; font-weight: 800; color: var(--ink-soft); }
.flowsum b { font-family: var(--font-display); font-size: 1.1rem; }
.flowsum i { font-style: normal; color: var(--ink-soft); font-weight: 800; }

/* crew, hire, grow sheets */
.crew-detail { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.crew-detail .face { width: 60px; height: 64px; flex: none; }
.crew-detail p { font-size: 0.9rem; }
.hire-list { display: grid; gap: 8px; margin: 8px 0 12px; }
.hire { display: grid; grid-template-columns: 44px 1fr; gap: 4px 10px; align-items: center; background: var(--cream); border-radius: 14px; padding: 8px; }
.hire .face { width: 44px; height: 47px; }
.hire-info b { display: block; }
.hire-info small { display: block; font-size: 0.78rem; color: var(--ink-soft); }
.hire-info small.bad { color: var(--coral); font-weight: 800; }
.hire-btns { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.hire.off { opacity: 0.6; }
.gate-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; font-weight: 700; font-size: 0.9rem; }
.gate-list li::before { content: '○ '; color: var(--ink-soft); }
.gate-list li.ok { color: var(--leaf); }
.gate-list li.ok::before { content: '✓ '; }
.gloss dd { text-align: left; font-weight: 700; }
.sheet h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.linkbtn { text-align: center; text-decoration: none; display: block; }

@media (max-width: 360px) {
  .jar-box .jar { display: none; }
  .jar-box .amt { font-size: 0.95rem; }
}

/* ======================= shop scene ======================= */
.scene-wrap { padding: 12px 12px 0; }
.scene {
  position: relative; height: 206px; overflow: hidden;
  border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  background: linear-gradient(180deg, #f6e7d2 0%, #f3dfc4 70%, #d9b98f 70%, #caa77a 100%);
}
.scene.stage-1 { background: linear-gradient(180deg, #e9f0e4 0%, #dfe9d8 70%, #b9a58a 70%, #a8937a 100%); }
.scene.stage-2 { background:
  repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 38px),
  linear-gradient(180deg, #e6d2b5 0%, #d8c09d 70%, #8f6845 70%, #7d5a3b 100%); }
.sc-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 1px, transparent 1px 34px); }
.sc-sign {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 2;
  font: 800 0.66rem var(--font-body); text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 8px; white-space: nowrap;
}
.stage-2 .sc-sign { background: #6b4fa0; color: #fff; border-color: #3a2a5c; }
.sc-window { position: absolute; top: 28px; left: 52%; width: 66px; height: 44px; border: 2.5px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.sc-sky { position: absolute; inset: 0; background: radial-gradient(circle at 72% 34%, #ffd35a 0 7px, transparent 8px), linear-gradient(180deg, #8fd0e0, #c8ecf0); }
.sc-window::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 48%, var(--ink) 48% 52%, transparent 52%); }
.scene.rain .sc-sky { background: repeating-linear-gradient(105deg, transparent 0 6px, rgba(255,255,255,.7) 6px 7px), linear-gradient(180deg, #7d8c9c, #a9b6c2); background-size: 14px 14px, auto; animation: rain 0.5s linear infinite; }
@keyframes rain { to { background-position: -4px 14px, 0 0; } }

.sc-board {
  position: absolute; top: 26px; left: 8px; width: 98px; height: 66px; padding: 14px 4px 4px; cursor: pointer;
  background: #c99a62; border: 2.5px solid var(--ink); border-radius: 8px; box-shadow: inset 0 0 0 3px #a0693f;
  font: inherit; color: var(--ink); text-align: left; z-index: 2;
}
.sc-board-title { position: absolute; top: 1px; left: 0; right: 0; text-align: center; font-size: 0.56rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; }
.sc-flyers { display: flex; flex-wrap: wrap; gap: 3px; }
.sc-flyers i { font-style: normal; font-size: 0.85rem; width: 20px; height: 20px; display: grid; place-items: center; background: #fffaf0; border: 1px solid var(--ink); border-radius: 3px; transform: rotate(-4deg); }
.sc-flyers i:nth-child(even) { transform: rotate(5deg); }
.sc-badge { position: absolute; right: -8px; bottom: -8px; background: var(--coral); color: #fff; font-size: 0.7rem; border: 2px solid var(--ink); border-radius: 999px; padding: 0 6px; }
.sc-board.has-new .sc-badge { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }

.sc-door { position: absolute; right: 0; bottom: 30%; width: 28px; height: 82px; background: #7a4e2d; border: 2.5px solid var(--ink); border-right: 0; border-radius: 10px 0 0 0; }
.stage-0 .sc-door { background: repeating-linear-gradient(90deg, #e5484d 0 6px, #f2b33d 6px 12px); }
.sc-basket { position: absolute; right: 36px; top: 40px; text-align: center; z-index: 1; }
.sc-bask { font-size: 1.7rem; line-height: 1; display: block; }
.sc-pile { display: block; font-size: 0.8rem; line-height: 1; min-height: 14px; letter-spacing: -4px; }
.sc-pile small { display: block; letter-spacing: 0; font-weight: 800; font-size: 0.62rem; }

.sc-decor { position: absolute; inset: 0; pointer-events: none; }
.d-photo { position: absolute; top: 30px; left: 120px; font-size: 1.1rem; }
.d-sofa { position: absolute; bottom: 22%; left: 6px; font-size: 1.6rem; opacity: .8; }
.d-awning { position: absolute; top: 0; left: 0; right: 0; height: 18px; background: repeating-linear-gradient(90deg, #e5484d 0 18px, #fff 18px 36px); border-bottom: 2px solid var(--ink); border-radius: 0 0 6px 6px; }
.stage-1 .sc-sign { top: 22px; }
.stage-1 .sc-board, .stage-1 .sc-window, .stage-1 .sc-basket { margin-top: 10px; }
.d-plant { position: absolute; bottom: 24%; left: 4px; font-size: 1.3rem; }
.d-banner { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 34px; height: 40px; background: #6b4fa0; border: 2px solid var(--ink); border-top: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); display: grid; place-items: center; font-size: 0.9rem; z-index: 0; }
.stage-2 .sc-sign { top: 44px; }
.d-shelf { position: absolute; top: 34px; right: 76px; width: 54px; display: flex; gap: 2px; padding-bottom: 2px; border-bottom: 3px solid #5a3b22; }
.d-shelf i { flex: 1; height: 26px; border-radius: 4px; border: 1.5px solid var(--ink); background: #2f7f9e; }
.d-shelf i:nth-child(2) { background: #e5484d; height: 22px; } .d-shelf i:nth-child(3) { background: #f2b33d; } .d-shelf i:nth-child(4) { background: #2c8f53; height: 20px; } .d-shelf i:nth-child(5) { background: #6b4fa0; }
.d-lamp { position: absolute; top: 2px; font-size: 0.9rem; } .d-lamp.l1 { left: 30%; } .d-lamp.l2 { right: 30%; }

.sc-stations { position: absolute; left: 4px; right: 32px; bottom: 4px; display: flex; justify-content: space-evenly; align-items: flex-end; z-index: 3; }
.station { position: relative; width: 62px; display: flex; flex-direction: column; align-items: center; }
.sc-stations.n5 .station, .sc-stations.n6 .station { width: 52px; }
.st-face { width: 34px; height: 36px; margin-bottom: -12px; position: relative; z-index: 0; }
.st-face .face { width: 34px; height: 36px; }
.st-free { display: grid; place-items: center; font-size: 0.55rem; font-weight: 800; color: var(--ink-soft); height: 30px; }
.station .machine { width: 100%; height: auto; position: relative; z-index: 1; }
.station small { font-size: 0.6rem; font-weight: 800; line-height: 1.1; background: rgba(255,255,255,.75); border-radius: 4px; padding: 0 3px; }
.station.empty .machine { opacity: 0.45; filter: grayscale(.6); }
.station.absent .st-face { opacity: 0.15; }
.st-fx { position: absolute; top: -18px; left: 0; right: 0; height: 18px; text-align: center; z-index: 4; pointer-events: none; }
.st-fx .plus { display: inline-block; font: 800 0.72rem var(--font-body); color: #1f6b3d; background: #eaf6ee; border: 1.5px solid var(--leaf); border-radius: 999px; padding: 0 5px; animation: floatup 1.2s ease-out forwards; }
.st-fx .fly { position: absolute; left: 50%; top: 10px; font-size: 0.9rem; animation: fly 1s ease-in forwards; }
.st-fx .zz { font-size: 0.62rem; font-weight: 800; color: var(--ink-soft); font-style: italic; animation: drift-z 2s ease-in-out infinite; display: inline-block; }
@keyframes floatup { from { transform: translateY(8px); opacity: 0; } 25% { opacity: 1; transform: none; } to { transform: translateY(-8px); opacity: 0; } }
@keyframes fly { from { transform: translate(-50%, 10px) scale(.6); opacity: 0; } 30% { opacity: 1; } to { transform: translate(40px, -40px) scale(1); opacity: 0; } }
@keyframes drift-z { 50% { transform: translate(4px, -4px); opacity: .5; } }

.station.busy .needle { animation: needle 0.16s linear infinite alternate; }
.station.busy .wheel { animation: spin 0.6s linear infinite; transform-origin: 11px 20px; transform-box: view-box; }
.station.busy .cloth { animation: feed 0.9s linear infinite; }
.station.busy .st-face { animation: bob 0.5s ease-in-out infinite alternate; }
.station.cut.busy .scissors { animation: snip 0.4s ease-in-out infinite alternate; transform-origin: 52px 14px; transform-box: view-box; }
@keyframes needle { to { transform: translateY(3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes feed { 50% { transform: translateX(-3px); } }
@keyframes bob { to { transform: translateY(-3px); } }
@keyframes snip { to { transform: rotate(-12deg); } }

.sc-nena { position: absolute; bottom: 2px; left: 30%; width: 48px; z-index: 5; transition: left 0.6s ease; }
.sc-nena .art { width: 48px; }
.sc-nena.pace { animation: pace 9s ease-in-out infinite alternate; }
.sc-nena.pace .art { animation: walk 0.45s ease-in-out infinite alternate; }
.sc-nena.post { left: 112px; bottom: 34%; }
.sc-nena.post .art { animation: bob 0.8s ease-in-out infinite alternate; }
.sc-nena.rest { left: 40%; }
@keyframes pace { from { left: 8%; } to { left: 70%; } }
@keyframes walk { from { transform: rotate(-3deg); } to { transform: translateY(-3px) rotate(3deg); } }
.sc-say {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-30%); white-space: nowrap;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 1px 7px; font-size: 0.66rem; font-weight: 800;
}
.sc-fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.sc-client { position: absolute; bottom: 8px; right: -30px; font-size: 1.7rem; animation: pickup 3.2s ease-in-out forwards; }
@keyframes pickup { 0% { right: -30px; } 35%, 55% { right: 34px; transform: translateY(-4px); } 100% { right: -30px; } }

.scene.sunday::after, .scene.closed::after {
  content: ''; position: absolute; inset: 0; background: rgba(29, 43, 58, 0.18); z-index: 4; pointer-events: none;
}
.scene.paused *, .scene.paused { animation-play-state: paused !important; }
.sc-caption { margin: 6px 4px 0; font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); min-height: 1.2em; }
.scene-wrap + .stage { padding-top: 10px; }

/* inbox */
.inbox-btn {
  width: 100%; display: flex; align-items: center; gap: 6px; margin: 0 0 8px; cursor: pointer;
  font: inherit; font-size: 0.86rem; color: var(--ink); text-align: left;
  background: #fff3d6; border: 2px solid var(--ink); border-radius: 12px; padding: 7px 10px;
}
.inbox-btn span { margin-left: auto; font-weight: 800; color: var(--ube); }
.inbox-list { display: grid; gap: 8px; margin: 8px 0 12px; }
.inq {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 8px 10px;
}
.inq-icon { font-size: 1.5rem; }
.inq-main b { display: block; }
.inq-main small { display: block; font-size: 0.78rem; color: var(--ink-soft); }
.inq-main small.good { color: #1f6b3d; font-weight: 800; } .inq-main small.bad { color: #a8262b; font-weight: 800; }
.inq-new { font-style: normal; font-size: 0.66rem; font-weight: 800; background: var(--coral); color: #fff; border-radius: 999px; padding: 1px 7px; }
.later { margin-top: 8px; width: 100%; box-shadow: none; border-width: 2px; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  .scene *, .scene { animation: none !important; }
}

/* phase 2 */
.sc-kiko { position: absolute; right: 30px; bottom: 30%; width: 34px; z-index: 2; text-align: center; }
.sc-kiko .face { width: 34px; height: 36px; display: block; }
.sc-kiko span { position: absolute; right: -8px; bottom: 0; font-size: 0.9rem; }
.scene.busy .sc-kiko .face { animation: bob 0.9s ease-in-out infinite alternate; }
.crew.kiko { cursor: default; background: #eaf6ee; }
.grow.katiwala { margin-top: 8px; }
.grow.katiwala.ready { background: #eaf6ee; }
.kiko-list { margin: 0 0 8px; padding-left: 18px; font-size: 0.88rem; }

/* milestone celebration */
.milestone {
  position: relative; height: 170px; margin: 6px 0 10px; overflow: hidden;
  border: 2.5px solid var(--ink); border-radius: 16px;
  background: linear-gradient(180deg, #8fd0e0 0%, #c8ecf0 55%, #9ccf7a 55%, #7fb85e 100%);
}
.m-banner {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  color: #fff; font: 800 0.85rem var(--font-body); padding: 3px 12px; border: 2px solid var(--ink); border-radius: 8px;
  text-shadow: 0 1px 0 rgba(0,0,0,.3); max-width: 92%; overflow: hidden; text-overflow: ellipsis;
}
.m-crowd { position: absolute; left: 8px; right: 70px; bottom: 6px; display: flex; justify-content: center; }
.m-fan { width: 15%; max-width: 46px; margin: 0 -2px; animation: cheer 0.6s ease-in-out infinite alternate; }
.m-fan .face { width: 100%; height: auto; display: block; }
.m-fan:nth-child(even) { margin-bottom: 8px; }
@keyframes cheer { to { transform: translateY(-8px) rotate(3deg); } }
.m-nena { position: absolute; right: 6px; bottom: 4px; width: 58px; }
.m-nena .art { width: 58px; }
.m-heart { position: absolute; top: -4px; left: -6px; font-size: 1.1rem; animation: bob 0.8s ease-in-out infinite alternate; }
.m-confetti { position: absolute; inset: 0; pointer-events: none; }
.m-confetti i { position: absolute; top: -10px; width: 6px; height: 10px; border-radius: 2px; animation: confetti 2.4s linear infinite; }
@keyframes confetti { to { transform: translateY(190px) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .milestone * { animation: none !important; } }

/* TahiTrack mini ad on the result screen */
.promo { background: #fff6df; border-style: dashed; }
.promo-eyebrow { margin: 0 0 2px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-deep); }
.promo h2 { font-size: 1.25rem; margin-bottom: 4px; }
.promo p { margin: 0 0 10px; font-size: 0.9rem; }

/* v4: one lesson at a time, paninda stall */
.jar-box.locked { opacity: 0.55; }
.jar-box.locked .amt { font-size: 0.9rem; }
.grow.paninda { margin-top: 8px; background: #fdf1e4; }
.chip-order.own { border-style: dashed; background: #fdf1e4; }
.sc-stall {
  position: absolute; right: 32px; bottom: calc(30% + 4px); z-index: 2;
  display: flex; align-items: center; gap: 2px; padding: 2px 6px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 8px;
  font: inherit; font-size: 0.72rem; cursor: pointer; box-shadow: 1px 2px 0 rgba(0,0,0,0.15);
}
.sc-stall b { font-family: var(--font-display); font-size: 0.82rem; }
.sc-stall.empty { opacity: 0.6; }
.sc-stall:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
