:root {
  --cream: #fff8ec; --paper: #fdf1dc; --ink: #3b2a1e; --muted: #8a7462;
  --red: #a3232b; --red-hi: #c62f35; --green: #1f5c3a; --green-hi: #2a7a4e; --gold: #e0a526; --gold-hi: #f3c63a;
  --line: #e6d3b3; --shadow: 0 6px 0 rgba(59, 42, 30, 0.18);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Mountains of Christmas', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #e9f0fa; color: var(--ink); font-family: var(--font); font-weight: 600; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; touch-action: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: default; }
kbd { font: 800 11px var(--font); background: rgba(255, 255, 255, 0.28); border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
#hud > * { pointer-events: auto; }
#topbar { display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; padding-right: 60px; }
.pill { display: flex; align-items: center; gap: 7px; background: var(--cream); border: 2px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 9px; font-weight: 800; font-size: 15px; box-shadow: 0 3px 0 rgba(59, 42, 30, 0.14); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill img { display: block; }
#lvlPill { padding-left: 5px; }
#lvlPill .lvl { background: var(--red); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 14px; }
.xp { width: 96px; height: 10px; background: #ead9bd; border-radius: 99px; overflow: hidden; }
.xp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); border-radius: 99px; transition: width 0.5s; }
#xpText { font-size: 12px; color: var(--muted); }
#carryPill.full { border-color: var(--red-hi); background: #ffe6e2; }
.coin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b8, var(--gold-hi) 45%, #c58a10); box-shadow: inset 0 0 0 2px #c58a10; vertical-align: -3px; flex: none; }
.coin.big { width: 44px; height: 44px; box-shadow: inset 0 0 0 4px #c58a10; }
.ico.pole { width: 20px; height: 16px; background: linear-gradient(#8a5a2e, #8a5a2e) center 2px / 20px 3px no-repeat, radial-gradient(circle at 5px 11px, #4d2643 3.5px, transparent 4px), radial-gradient(circle at 15px 11px, #f59a23 3.5px, transparent 4px); }

#objective { margin-top: 8px; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; max-width: min(560px, calc(100vw - 90px)); background: rgba(31, 92, 58, 0.92); color: #fff; border-radius: 14px; padding: 6px 13px; font-size: 14.5px; font-weight: 800; box-shadow: 0 3px 0 rgba(20, 50, 30, 0.35); pointer-events: none; }
#objective:empty { display: none; }
#objective .need { display: inline-flex; align-items: center; background: rgba(255, 255, 255, 0.92); color: var(--ink); border-radius: 99px; padding: 0 9px 0 3px; }
#objective .hint { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 13px; border: 2px solid #fff7ea; }
.hint.g { background: #1f7a4a; } .hint.r { background: #b3373a; }

#sideBtns { position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); display: flex; flex-direction: column; gap: 8px; }
#sideBtns button, #abilityBtns button { position: relative; width: 48px; height: 48px; border-radius: 50%; background: var(--cream); border: 2px solid var(--line); font-size: 21px; font-weight: 800; box-shadow: 0 3px 0 rgba(59, 42, 30, 0.18); display: grid; place-items: center; padding: 0; }
#sideBtns button:active, #abilityBtns button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(59, 42, 30, 0.18); }
#btnWardrobe img { border-radius: 50%; }
#btnPet .hbar { position: absolute; left: 7px; right: 7px; bottom: 3px; height: 5px; border-radius: 3px; background: rgba(59, 42, 30, 0.18); overflow: hidden; }
#btnPet .hbar i { display: block; height: 100%; background: var(--green-hi); } #btnPet .hbar i.low { background: var(--red-hi); }
.badge { position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; border-radius: 99px; background: var(--red-hi); color: #fff; font-size: 12px; display: grid; place-items: center; border: 2px solid #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.22); } }
#minimap { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); width: 160px; height: 120px; border-radius: 12px; border: 3px solid var(--cream); box-shadow: 0 3px 0 rgba(59, 42, 30, 0.2), 0 0 0 1px var(--line); pointer-events: none !important; opacity: 0.94; }
#abilityBtns { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: calc(max(10px, env(safe-area-inset-bottom)) + 134px); display: flex; gap: 8px; }
#abilityBtns button { width: 56px; height: 56px; font-size: 25px; border-color: var(--gold); }
#abilityBtns button.cool { opacity: 0.4; filter: grayscale(1); }
#actionBtn { position: absolute; left: 50%; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 12px); transform: translateX(-50%); padding: 13px 24px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 18px; background: var(--red-hi); box-shadow: 0 5px 0 #7d1a20; white-space: nowrap; animation: bob 1.1s ease-in-out infinite; }
#actionBtn.shop { background: var(--green-hi); box-shadow: 0 5px 0 #174a2e; }
#actionBtn.locked { background: #7c8798; box-shadow: 0 5px 0 #56606e; animation: none; }
#actionBtn small { font-weight: 600; opacity: 0.9; }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-5px); } }

#toasts { position: fixed; left: 50%; top: 104px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 30; width: max-content; max-width: 92vw; }
.toast { background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 12px; font-size: 15px; font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); animation: tin 0.25s; text-align: center; }
.toast.out { opacity: 0; transition: opacity 0.4s; }
@keyframes tin { from { transform: translateY(-10px); opacity: 0; } }

/* --------------------------------------------------------------- panels */
#overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 14px; background: rgba(28, 44, 78, 0.5); backdrop-filter: blur(3px); touch-action: pan-y; }
#panel { position: relative; width: min(680px, 100%); max-height: calc(100dvh - 28px); overflow-y: auto; overscroll-behavior: contain; background: var(--cream); border: 4px solid var(--red); border-radius: 22px; padding: 20px 22px 22px; box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--green), 0 18px 50px rgba(0, 0, 0, 0.35); animation: pop 0.22s cubic-bezier(0.2, 1.4, 0.4, 1); touch-action: pan-y; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }
#panel h1, #panel h2 { font-family: var(--display); color: var(--red); margin: 0; text-align: center; line-height: 1.05; text-wrap: balance; }
#panel h1 { font-size: clamp(44px, 9vw, 68px); }
#panel h2 { font-size: 38px; margin-bottom: 8px; }
#panel h3 { font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--green); margin: 16px 0 7px; }
#panel p { margin: 6px 0; line-height: 1.45; }
.note { text-align: center; color: #5c4838; font-size: 15px; }
.muted { color: var(--muted); font-size: 15px; } .pad { padding: 18px; text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; } .row.center { justify-content: center; }
.x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); font-size: 24px; line-height: 1; font-weight: 800; color: var(--red); }
#panel button.big { background: var(--green-hi); color: #fff; font-weight: 800; font-size: 19px; padding: 12px 28px; border-radius: 999px; box-shadow: 0 5px 0 #174a2e; display: inline-flex; align-items: center; gap: 8px; }
#panel button.big:active { transform: translateY(3px); box-shadow: 0 2px 0 #174a2e; }
#panel button.ghost { background: transparent; border: 2px solid var(--line); border-radius: 999px; padding: 10px 20px; font-weight: 800; color: var(--muted); }
#panel button.link { background: none; color: var(--red); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.price { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; } .stars i { color: #e2d2b6; font-style: normal; }
.emo { font-size: 28px; width: 40px; text-align: center; flex: none; }

/* title + help */
.titlecard { text-align: center; }
.garland { height: 16px; margin: -4px -6px 10px; background: radial-gradient(circle at 12px 8px, #ff4d4d 5px, transparent 6px) 0 0 / 96px 16px, radial-gradient(circle at 36px 11px, #ffd24a 5px, transparent 6px) 0 0 / 96px 16px, radial-gradient(circle at 60px 8px, #4dd27a 5px, transparent 6px) 0 0 / 96px 16px, radial-gradient(circle at 84px 11px, #4da6ff 5px, transparent 6px) 0 0 / 96px 16px; }
.tag { font-size: 18px; color: var(--green); font-weight: 800; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 10px; }
.step { background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.step .pic { height: 58px; display: flex; align-items: center; justify-content: center; }
.step b { color: var(--red); font-size: 16px; } .step span { font-size: 13px; line-height: 1.35; color: #5c4838; }
.controls { font-size: 14px; color: #5c4838; text-align: center; } .controls b { color: var(--ink); } .controls i { color: var(--line); font-style: normal; margin: 0 3px; }
@media (hover: hover) and (pointer: fine) { .touch { display: none; } }

/* kitchen */
.rail { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0 8px 8px; border-top: 7px solid #8a5a2e; border-radius: 4px; background: linear-gradient(#f3e3c6, var(--paper)); border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.hook { width: 68px; display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: sway 2.6s ease-in-out infinite; font-size: 15px; }
.hook .string { width: 2px; height: 14px; background: #c9a36a; }
.hook small { font-size: 11px; color: var(--muted); } .hook.empty { opacity: 0.35; animation: none; } .hook.empty img { filter: grayscale(1); }
@keyframes sway { 0%, 100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
.recipes, .skills, .selllist { display: flex; flex-direction: column; gap: 8px; }
.recipe, .skill, .sellrow { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 8px 12px; }
.recipe.can { border-color: var(--green-hi); background: #f0f8e8; } .recipe.locked, .skill.locked { opacity: 0.55; }
.recipe small, .skill small, .sellrow small { display: block; color: var(--muted); font-size: 13px; }
.needs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; }
.need { display: inline-flex; align-items: center; gap: 1px; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.need.no { color: var(--red-hi); } .need.ok { color: var(--green); }
.recipe button, .skill button, .sellrow button { background: var(--red-hi); color: #fff; font-weight: 800; border-radius: 999px; padding: 9px 20px; box-shadow: 0 4px 0 #7d1a20; flex: none; }
.recipe button:disabled, .skill button:disabled { background: #d9c9ae; box-shadow: none; color: #fff; }
.shelf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-height: 44px; }
.pud { display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 2px solid var(--line); border-radius: 99px; padding: 2px 12px 2px 4px; }
.potwrap { display: grid; place-items: center; margin: 84px 0 4px; }
.pot { position: relative; width: 200px; height: 104px; background: linear-gradient(#5c6675, #3c4552); border-radius: 12px 12px 70px 70px; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.18), 0 6px 0 rgba(59, 42, 30, 0.15); }
.pot::before, .pot::after { content: ''; position: absolute; top: 18px; width: 22px; height: 14px; border: 6px solid #3c4552; border-radius: 10px; } .pot::before { left: -24px; } .pot::after { right: -24px; }
.mix { position: absolute; left: 10px; right: 10px; top: -10px; height: 30px; background: radial-gradient(circle at 30% 40%, #7a4a2a 0 6px, transparent 7px), radial-gradient(circle at 68% 55%, #2c1509 0 4px, transparent 5px), #5a3218; border-radius: 50%; border: 5px solid #6f7a8a; }
.spoon { position: absolute; left: calc(50% - 5px); top: -74px; width: 10px; height: 84px; background: #c9a36a; border-radius: 5px; transform-origin: 50% 100%; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.spoon::after { content: ''; position: absolute; left: -7px; top: -12px; width: 24px; height: 24px; background: #c9a36a; border-radius: 50%; }
.meter { position: relative; height: 34px; margin: 18px 8px 10px; background: #ead9bd; border-radius: 99px; border: 3px solid var(--line); }
.zone { position: absolute; top: 0; bottom: 0; } .zone.good { left: 26%; width: 48%; background: #bfe3b4; } .zone.perfect { background: var(--gold-hi); }
.marker { position: absolute; top: -9px; left: 50%; width: 10px; height: 46px; margin-left: -5px; background: var(--red-hi); border-radius: 6px; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.dots { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 26px; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); } .dot.good { background: var(--gold-hi); border-color: var(--gold); } .dot.ok { background: #8fce7e; border-color: #5aa64a; } .dot.bad { background: #e9a39c; border-color: var(--red-hi); }
.stirmsg { font-weight: 800; color: var(--green); margin-left: 8px; }
.result { text-align: center; } .result img { animation: pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); } .bigstars { font-size: 40px; line-height: 1; }

/* shop */
.keeper { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.face { width: 58px; height: 58px; border-radius: 50%; flex: none; border: 3px solid var(--line); background: radial-gradient(circle at 38% 42%, #2b1d14 3px, transparent 4px), radial-gradient(circle at 62% 42%, #2b1d14 3px, transparent 4px), radial-gradient(circle at 50% 64%, #c96a5a 6px, transparent 7px), radial-gradient(circle at 50% 4%, #d9dee8 20px, transparent 21px), #f2c9a0; }
.face.market { background: radial-gradient(circle at 38% 42%, #2b1d14 3px, transparent 4px), radial-gradient(circle at 62% 42%, #2b1d14 3px, transparent 4px), radial-gradient(ellipse at 50% 76%, #f1f1f1 15px, transparent 16px), radial-gradient(circle at 50% 2%, #a3232b 20px, transparent 21px), #d9a273; }
.face.emporium { background: radial-gradient(circle at 38% 42%, #2b1d14 3px, transparent 4px), radial-gradient(circle at 62% 42%, #2b1d14 3px, transparent 4px), radial-gradient(ellipse at 50% 60%, #3a2412 9px 3px, transparent 10px), radial-gradient(circle at 50% -6%, #1e1b22 24px, transparent 25px), #a8703f; }
.bubble { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 8px 14px; flex: 1; font-size: 15px; }
.bubble b { display: block; color: var(--green); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.bubble::before { content: ''; position: absolute; left: -9px; top: 20px; width: 14px; height: 14px; background: #fff; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
.sellrow.crave { border-color: var(--gold); background: #fff6d8; } .sellrow em { color: #a86d00; font-style: normal; font-weight: 800; }
.sellrow button { background: var(--green-hi); box-shadow: 0 4px 0 #174a2e; }

/* level up */
.p-levelup { text-align: center; overflow: hidden; }
.burst { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(243, 198, 58, 0.22) 0 10deg, transparent 10deg 20deg); animation: spin 26s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.p-levelup > :not(.burst) { position: relative; }
.p-levelup h2 { font-size: 60px !important; } .rank { font-size: 20px; font-weight: 800; color: var(--green); }
.unlocks { list-style: none; padding: 0; margin: 12px auto; display: inline-flex; flex-direction: column; gap: 8px; text-align: left; }
.unlocks li { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 6px 16px 6px 10px; }
.unlocks .coin.big { width: 34px; height: 34px; }

/* skills */
.pips { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: 1px; } .pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gold); } .pips i.on { background: var(--gold-hi); }
.skill.maxed { border-color: var(--gold); }

/* dress-up */
.dress { display: flex; gap: 18px; align-items: center; }
.me { text-align: center; background: radial-gradient(circle at 50% 40%, #fff, var(--paper)); border: 2px solid var(--line); border-radius: 20px; padding: 6px 10px 10px; flex: none; }
.purse { display: inline-flex; background: #fff; border: 2px solid var(--line); border-radius: 99px; padding: 2px 12px; font-size: 17px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); } .swatch.on { box-shadow: 0 0 0 3px var(--ink); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.item { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 6px 6px 9px; font-size: 13px; }
.item b { font-size: 13px; line-height: 1.15; text-align: center; } .item.on { border-color: var(--green-hi); background: #eaf6e2; } .item.poor { opacity: 0.6; }
.item .tag { font-size: 12px; font-weight: 800; color: var(--muted); } .item .tag.on { color: var(--green); }
.item.locked { opacity: 0.55; filter: grayscale(0.6); }
.petlist { display: flex; flex-direction: column; gap: 8px; }
.petrow { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 6px 10px; }
.petrow.on { border-color: var(--green-hi); background: #eaf6e2; } .petrow.locked { opacity: 0.6; } .petrow.locked img { filter: grayscale(0.7); }
.petrow .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .petrow small { color: var(--muted); } .petrow .hungry { color: var(--red); }
.petbtns { display: flex; flex-direction: column; gap: 4px; align-items: stretch; flex: none; }
.petbtns button.on { background: var(--green-hi); color: #fff; } .petbtns button.poor { opacity: 0.6; }
.meter { display: block; width: 100%; height: 8px; margin: 2px 0; border-radius: 4px; background: rgba(59, 42, 30, 0.14); overflow: hidden; max-width: 220px; }
.meter i { display: block; height: 100%; background: var(--gold-hi); } .meter.food i { background: var(--green-hi); } .meter.low i { background: var(--red-hi); }
.note.center { text-align: center; }
.wtabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 12px; }
.wtab { background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: 15px; color: var(--muted); }
.wtab.on { border-color: var(--green-hi); background: #eaf6e2; color: var(--green); }
.pets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pet { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 2px; } .pet.on { border-color: var(--green-hi); background: #eaf6e2; }

@media (max-width: 620px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  #panel { padding: 16px 14px 18px; } #panel h2 { font-size: 32px; }
  .pill { font-size: 13.5px; padding: 4px 10px 4px 7px; } .xp { width: 56px; } #xpText { display: none; }
  #minimap { width: 112px; height: 84px; } #abilityBtns { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 96px); }
  #objective { font-size: 13px; } .dress { flex-direction: column; align-items: stretch; } .me { align-self: center; }
  .recipe, .sellrow, .skill { gap: 8px; padding: 8px; } #actionBtn { font-size: 16px; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 100px); }
}
@media (prefers-reduced-motion: reduce) { .hook, .burst, #actionBtn, .badge { animation: none; } }

/* ------------------------------------------------------------- security */
#objective.alarm { background: #c62f35; box-shadow: 0 3px 0 #7d1a20; animation: alarmpulse 0.55s ease-in-out infinite alternate; }
@keyframes alarmpulse { to { background: #e2363d; transform: scale(1.04); } }
#btnLock { border-color: #8d97a8; }
#btnLock.on { background: #c62f35; border-color: #7d1a20; }
.seclist { display: flex; flex-direction: column; gap: 8px; }
.secrow { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 8px 12px; }
.secrow.owned { border-color: var(--green-hi); background: #f0f8e8; }
.secrow small { display: block; color: var(--muted); font-size: 13px; }
.secrow .emo { font-size: 30px; width: 44px; text-align: center; flex: none; }
.secrow button { background: var(--green-hi); color: #fff; font-weight: 800; border-radius: 999px; padding: 9px 16px; box-shadow: 0 4px 0 #174a2e; flex: none; display: inline-flex; gap: 6px; align-items: center; }
.secrow button:disabled { background: #d9c9ae; box-shadow: none; }
.squad { display: flex; flex: none; } .squad img { margin-right: -14px; } .squad img.empty { opacity: 0.22; filter: grayscale(1); }
.squad + .grow { margin-left: 14px; }
.thiefpic { flex: none; }
.row.tight { margin-top: 4px; }
#panel button.big.danger { background: var(--red-hi); box-shadow: 0 5px 0 #7d1a20; }
@media (max-width: 560px) { .squad img { width: 40px; height: 40px; } .secrow { gap: 8px; padding: 8px; } }
@media (prefers-reduced-motion: reduce) { #objective.alarm { animation: none; } }

/* -------------------------------------------------------- upgrade prompt (update.js) */
.upgrade { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; width: min(380px, calc(100vw - 32px));
  background: var(--cream); color: var(--ink); border: 3px solid var(--gold); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); animation: tin 0.25s; user-select: text; }
.upgrade b { display: block; font-size: 17px; font-weight: 800; }
.upgrade ul { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.upgrade small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.upgrade .row { display: flex; gap: 8px; margin-top: 12px; }
.upgrade button { border-radius: 999px; padding: 10px 18px; font-weight: 800; min-height: 44px; }
.upgrade .go { background: var(--green-hi); color: #fff; box-shadow: 0 4px 0 #174a2e; flex: 1; }
.upgrade .go:active { transform: translateY(2px); box-shadow: 0 2px 0 #174a2e; }
.upgrade .later { background: transparent; border: 2px solid var(--line); color: var(--muted); }

.secrow.warn { border-color: #c62f35; background: #fff0ee; }
.secrow .bad { color: #a3232b; }

/* ------------------------------------------------- moving to puddingroundup.com (move.js) */
.moving { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px;
  background: var(--cream); color: var(--ink); text-align: center; }
.moving b { font: 700 34px var(--display); color: var(--red); }
.moving span { font-size: 17px; color: var(--muted); }
