/* Seeds of Debt — the Meanwhile look: flat colour, thick ink, hard shadows, a little pop art. */
@font-face { font-family: Poppins; src: url(fonts/Poppins-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url(fonts/Poppins-Bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Rozha; src: url(fonts/RozhaOne-Regular.ttf); font-display: swap; }
:root {
  --ink: #1D1A16; --paper: #F6EFE0; --card: #FFF8E8; --sindoor: #C2361F; --turmeric: #E0A526; --sun: #FFD84D; --peacock: #1F7A72; --leaf: #3E9B48; --sky: #9FC7E8; --pink: #F4A6A0;
  --b: 2.5px solid var(--ink); --sh: 4px 4px 0 var(--ink); --sh2: 2px 2px 0 var(--ink);
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font: 14px/1.35 Poppins, system-ui, sans-serif; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; border: var(--b); background: var(--card); border-radius: 10px; box-shadow: var(--sh2); cursor: pointer; touch-action: manipulation; }
button:active { transform: translate(2px, 2px); box-shadow: none; }
button:disabled { opacity: .45; }
#app { height: 100%; }
.game { height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding-top: var(--st); padding-bottom: var(--sb);
  background: radial-gradient(circle at 1px 1px, rgba(29,26,22,.12) 1px, transparent 1.4px) 0 0 / 9px 9px, var(--paper); }

/* ---------- HUD ---------- */
.hud { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; align-items: center; padding: 6px 8px; }
.hud-day { background: var(--sun); border: var(--b); border-radius: 10px; box-shadow: var(--sh2); padding: 2px 8px 4px; min-width: 96px; }
.hud-day b { font-size: 15px; display: block; line-height: 1.15; } .hud-day b small { font-size: 11px; opacity: .7; }
.clockrow { display: flex; align-items: center; gap: 5px; } .clockrow span { font-size: 11px; font-weight: 700; min-width: 30px; }
.sun { display: block; flex: 1; height: 5px; background: rgba(29,26,22,.18); border-radius: 3px; overflow: hidden; } .sun i { display: block; height: 100%; background: var(--sindoor); }
.hud-coins { justify-self: start; } .coin { background: var(--card); border: var(--b); border-radius: 999px; box-shadow: var(--sh2); padding: 3px 10px; font-size: 15px; white-space: nowrap; }
.hud-debt { padding: 2px 8px; text-align: left; font-size: 13px; font-weight: 700; line-height: 1.1; background: var(--sky); }
.hud-debt small { display: block; font-size: 10px; font-weight: 400; } .hud-debt em { font-style: normal; font-size: 10px; background: var(--card); border-radius: 4px; padding: 0 3px; margin-left: 2px; }
.hud-debt.urgent { background: var(--pink); animation: pulse 1s infinite; }
.hud-menu { width: 34px; height: 34px; padding: 0; font-size: 17px; }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* ---------- stage ---------- */
.stage { position: relative; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; min-height: 0; }
#farm { border: var(--b); border-radius: 12px; box-shadow: var(--sh); touch-action: none; background: #8CC152; }
.barks { position: absolute; left: 10px; right: 10px; bottom: 34px; justify-content: flex-end; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.bark { pointer-events: auto; cursor: pointer; }
.bark { align-self: flex-start; max-width: 86%; opacity: .96; background: var(--card); border: var(--b); border-radius: 14px 14px 14px 4px; box-shadow: var(--sh2); padding: 5px 9px; font-size: 12.5px; line-height: 1.3; animation: pop .25s ease-out; }
.bark b { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--sindoor); }
.bark.naga { align-self: flex-end; background: #DDF3EA; font-style: italic; border-radius: 14px 14px 4px 14px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.haat { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; pointer-events: none; }
.haat span { background: var(--sindoor); color: #fff; font-weight: 700; font-size: 12px; padding: 3px 10px; border: var(--b); border-radius: 999px; box-shadow: var(--sh2); letter-spacing: .04em; }

/* ---------- tool bar ---------- */
.bar { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr; gap: 6px; padding: 6px 8px 8px; }
.bar button { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 2px; min-height: 54px; font-size: 20px; line-height: 1; }
.bar button small { font-size: 11px; font-weight: 700; margin-top: 3px; }
.b-seed { flex-direction: row !important; gap: 4px; background: #E3F4D7 !important; text-align: left; }
.b-seed img { width: 36px; height: 36px; } .b-seed b { font-size: 13px; display: block; } .b-seed small { font-weight: 400 !important; margin: 0 !important; }
.b-sleep.ready { background: #3C3A8E; color: #fff; }

/* ---------- bottom sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(29,26,22,.35); display: none; align-items: flex-end; z-index: 5; }
.sheet-wrap.on { display: flex; }
.sheet { position: relative; width: 100%; max-height: 78%; overflow-y: auto; background: var(--paper); border-top: var(--b); border-radius: 18px 18px 0 0; padding: 14px 12px calc(16px + var(--sb)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30%); } }
.sheet h2 { font: 26px/1 Rozha, serif; margin: 0 40px 10px 2px; } .sheet h2 small { font: 12px Poppins, sans-serif; opacity: .7; margin-left: 4px; }
.close { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; padding: 0; font-size: 16px; }
.hint { font-size: 12px; opacity: .75; margin: 10px 2px 0; } .empty { padding: 14px; text-align: center; opacity: .8; }
.seeds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seed { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto auto; column-gap: 6px; text-align: left; padding: 6px; }
.seed img { grid-row: 1 / 4; width: 44px; height: 44px; } .seed b { font-size: 14px; } .seed small { font-size: 11px; opacity: .8; }
.seed.on { background: var(--sun); }
.chilli { display: inline-flex; gap: 0; vertical-align: -2px; } .chilli svg { width: 13px; height: 13px; } .chilli svg.on { fill: #D8341F; } .chilli svg.off { fill: none; opacity: .3; }
.stall { display: flex; flex-direction: column; gap: 8px; }
.srow { display: grid; grid-template-columns: 62px 1fr; gap: 8px; background: var(--card); border: var(--b); border-radius: 12px; padding: 6px; opacity: .78; }
.srow.on { opacity: 1; box-shadow: var(--sh2); }
.show { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; font-size: 11px; font-weight: 700; }
.show img { width: 40px; height: 40px; } .srow.on .show { background: var(--leaf); color: #fff; }
.smid b em { font-style: normal; font-weight: 400; } .smid > span { display: block; font-size: 12px; margin: 1px 0 5px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mode { display: flex; flex-direction: column; align-items: center; padding: 3px 2px; line-height: 1.15; }
.mode b { font-size: 15px; } .mode small { font-size: 10px; } .mode i { font-size: 10px; font-style: normal; opacity: .7; }
.mode.on { background: var(--turmeric); }
.who { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; margin: 2px 40px 12px 0; }
.who b { display: block; font: 22px/1 Rozha, serif; } .who p { margin: 0; font-size: 13px; }
.por { width: 76px; height: 76px; } .por.big { width: 150px; height: 150px; }
.shop { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: var(--card); border: var(--b); border-radius: 12px; padding: 8px 10px; }
.item b { display: block; } .item small { font-size: 12px; opacity: .8; }
.buy { background: var(--sun); font-weight: 700; padding: 8px 12px; font-size: 15px; }
.debtbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .debtbox div { background: var(--card); border: var(--b); border-radius: 12px; padding: 6px; text-align: center; } .debtbox small { display: block; font-size: 11px; margin-bottom: 3px; } .debtbox .coin { border: 0; box-shadow: none; padding: 0; }
.pay { display: flex; gap: 8px; justify-content: center; margin: 12px 0 2px; flex-wrap: wrap; } .pay button { background: var(--sun); font-weight: 700; padding: 10px 14px; }
.menu { display: flex; flex-direction: column; gap: 10px; } .menu button { padding: 12px; font-weight: 700; }

/* ---------- modals ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(29,26,22,.45); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 6; }
.modal-wrap.on { display: flex; }
.modal { width: 100%; max-width: 380px; max-height: 92%; overflow-y: auto; background: var(--paper); border: var(--b); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); padding: 16px; animation: pop .22s ease-out; }
.modal h2 { font: 30px/1 Rozha, serif; margin: 0 0 12px; } .modal h3 { margin: 14px 0 6px; font-size: 15px; }
.talk { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.talk .por { width: 96px; height: 96px; } .talk > div > b { display: block; font: 20px/1.1 Rozha, serif; } .talk p { margin: 4px 0 0; font-size: 15px; }
.go { display: block; width: 100%; margin-top: 14px; padding: 12px; font-size: 17px; font-weight: 700; background: var(--sindoor); color: #fff; }
.alt { display: block; width: 100%; margin-top: 10px; padding: 11px; font-size: 16px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .stats div { background: var(--card); border: var(--b); border-radius: 12px; padding: 6px; text-align: center; } .stats small { display: block; font-size: 11px; } .stats b { font-size: 19px; }
.notes { margin: 10px 0 0; padding-left: 18px; } .notes li { margin: 3px 0; }
.tomorrow { margin: 12px 0 0; padding: 8px 10px; background: var(--sky); border: var(--b); border-radius: 12px; font-weight: 700; }
.grade { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: center; } .grade span { font: 64px/80px Rozha, serif; text-align: center; background: var(--sun); border: var(--b); border-radius: 50%; box-shadow: var(--sh); } .grade p { font-weight: 700; margin: 0; }
.awards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .awards li { border: 2px dashed rgba(29,26,22,.4); border-radius: 10px; padding: 5px 7px; opacity: .55; font-size: 12px; } .awards li.got { border: var(--b); background: var(--sun); opacity: 1; } .awards b { display: block; font-size: 12px; } .awards small { font-size: 10px; }

/* ---------- title ---------- */
.title { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; padding-top: calc(24px + var(--st));
  background: repeating-conic-gradient(from 0deg at 50% 38%, #FFD84D 0 10deg, #F6C53A 10deg 20deg); }
.logo { text-align: center; background: var(--card); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); padding: 14px 22px 12px; transform: rotate(-2deg); }
.logo h1 { margin: 0; font: 54px/0.9 Rozha, serif; color: var(--sindoor); text-shadow: 3px 3px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); }
.logo p { margin: 8px 0 0; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.tbtns { width: 100%; max-width: 300px; } .credit { font-size: 11px; font-weight: 700; background: var(--card); padding: 2px 8px; border-radius: 6px; border: 2px solid var(--ink); }

/* build 2 */
.b-stall { position: relative; }
.badge { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--sindoor); color: #fff; font: 700 12px/18px Poppins, sans-serif; font-style: normal; border: 2px solid var(--ink); }
.badge:empty { display: none; }
.badge b { font-size: 16px; line-height: 14px; }
.haat span.moon { background: #2B3A67; }
.oh { margin: 0 0 6px; font: 18px/1.1 Rozha, serif; }
.orders { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.order { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; background: #FFF6E2; border: var(--b); border-radius: 12px; padding: 6px 8px; }
.order.big { background: #FFE9A8; }
.order img { width: 34px; height: 34px; }
.order b { display: block; font-size: 13.5px; line-height: 1.2; } .order small { font-size: 11.5px; opacity: .8; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.choice { text-align: left; background: var(--card); border: var(--b); border-radius: 12px; padding: 10px 12px; box-shadow: var(--sh2); }
.choice b { display: block; font-size: 16px; } .choice small { display: block; font-size: 12.5px; opacity: .8; margin-top: 2px; }
.choice:first-child { background: var(--sun); }
.choice:disabled { opacity: .45; box-shadow: none; }
.bark.cust { align-self: flex-end; background: #FFF; font-size: 12px; border-radius: 14px 14px 4px 14px; }
.b-stall.ready { background: var(--sun); }
.b-stall.glow { box-shadow: 0 0 0 4px #FFD84D, var(--sh2); }
.b-seed.moon { background: #2B3A67; color: #fff; }
.buy.deliver { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 78px; }
.buy.deliver small { font-size: 10.5px; font-weight: 700; opacity: .85; }
.srow.out .modes { opacity: .4; pointer-events: none; }
.srow.out .show { background: #DDD3C0; }
.hud-debt .prog { display: block; height: 4px; margin-top: 2px; background: rgba(29,26,22,.2); border-radius: 2px; overflow: hidden; }
.hud-debt .prog i { display: block; height: 100%; background: #2E8B57; }
.modal .tomorrow + h3 { margin-top: 10px; }
.awards { grid-template-columns: 1fr 1fr 1fr !important; gap: 5px !important; }
.awards li { padding: 5px 6px !important; } .awards li b { font-size: 11.5px !important; } .awards li small { font-size: 9.5px !important; }
