/* 3.0 prototype — a life on a game table. Widescreen by default: HUD / stage / dock fill one viewport.
   Short landscape phones compress; portrait phones stack and scroll with the dock pinned. */
:root{--night:#121c17;--panel:#1c2a22;--panel2:#243529;--brass:#b08a3e;--brass2:#e0c690;--paper:#efe3c6;--muted:#b3aa90;--seal:#923b2c;--moss:#4f7a5a;--serif:Georgia,'Batang',serif;color:var(--paper);background:var(--night);font-family:Arial,'Malgun Gothic',sans-serif}
*{box-sizing:border-box}html,body{height:100%;margin:0}button{font:inherit;color:inherit;cursor:pointer}
body{overflow:hidden;background:#0d1511 url('./assets/web/city.webp') center/cover no-repeat}
body::before{content:"";position:fixed;inset:0;background:linear-gradient(180deg,#0d1511e6 0%,#121c17cc 40%,#0d1511f2 100%);pointer-events:none}
body[data-phase="crisis"],body[data-phase="crisisDone"]{background-image:url('./assets/ui/battle-stage-v4.webp')}
img.ic{flex:none;width:1.15em;height:1.15em;vertical-align:-.2em}
#day{position:relative;height:100vh;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto}

/* HUD */
.hud{display:flex;align-items:center;gap:10px 16px;padding:7px 16px;border-bottom:1px solid #b08a3e55;background:#0b130fcc;backdrop-filter:blur(4px);min-width:0;overflow-x:auto;scrollbar-width:none}.hud::-webkit-scrollbar{display:none}
.d-title{font:700 16px var(--serif);color:var(--brass2);white-space:nowrap}.d-title small{font:11px Arial,sans-serif;color:var(--muted);margin-left:6px}
.d-pressure{display:flex;gap:6px}.d-pressure span{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:3px 9px;border-radius:999px;background:#923b2c66;color:#f6d0c3;white-space:nowrap}.d-pressure .d-next{background:#3b2f17;color:var(--brass2)}
.d-tools{margin-left:auto;display:flex;gap:6px}.d-tools button{display:inline-flex;align-items:center;gap:4px;padding:6px 10px;background:#243529dd;border:1px solid #b08a3e88;border-radius:6px;font-size:11px;white-space:nowrap}.d-tools small{color:var(--muted)}.d-tools .fs{background:var(--brass);color:#1b140a;font-weight:700}

/* Stage = me + today */
.stage{min-height:0;overflow:auto;padding:12px 16px}
.day-stage{display:grid;grid-template-columns:minmax(170px,210px) minmax(0,1fr);gap:14px}

/* Me: the person living this day */
.me{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:14px;background:linear-gradient(#1f2e25ee,#141f19ee);border:1px solid #b08a3e77;scrollbar-width:none}
.me-portrait{position:relative;height:clamp(110px,30vh,230px);border-radius:10px;background:radial-gradient(ellipse at 50% 70%,#3d4f3a,#16211b);overflow:hidden;flex:none}
.me-portrait img{position:absolute;left:50%;bottom:-4%;height:108%;transform:translateX(-50%);filter:drop-shadow(0 6px 10px #000c)}
.me-age{position:absolute;left:8px;top:8px;padding:4px 9px;border-radius:8px;background:#0b130fcc;border:1px solid #b08a3e88;font-size:12px}.me-age b{font:700 22px/1 var(--serif);color:var(--brass2)}.me-age small{display:block;font-size:10px;color:var(--muted)}
.me-day{font-size:12px;color:var(--muted)}.me-day b{font:700 22px var(--serif);color:var(--paper);margin-right:3px}
.me-meter{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:3px 6px;font-size:12px}.me-meter b{font:700 16px var(--serif)}.me-meter i{grid-column:1/-1;height:5px;background:#0008;border-radius:3px;overflow:hidden}.me-meter em{display:block;height:100%;background:var(--moss)}.me-meter.warn em{background:var(--seal)}.me-meter.warn b{color:#f3a28c}
.me-cash{display:flex;align-items:center;gap:6px;font-size:12px}.me-cash b{font:700 18px var(--serif);color:#e8d27a}
.me-people{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:2px}
.person{margin:0;text-align:center}.person img{width:100%;aspect-ratio:1;object-fit:cover;object-position:50% 15%;border-radius:50%;background:#0b130f;border:2px solid #b08a3e55}
.person figcaption{font-size:10px;line-height:1.3}.person figcaption b{display:block;font-size:10px;color:#d07c74;letter-spacing:-1px}
.person.love img{border-color:#d07c74;box-shadow:0 0 8px #d07c7488}.person.hate img{border-color:#555;filter:grayscale(.8)}

/* Today: timeline + tasks */
.today{min-width:0;min-height:0;display:flex;flex-direction:column;gap:10px}
.timeline{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;flex:none}
.tl{display:flex;align-items:center;gap:6px;padding:5px 8px;border-radius:8px;background:#0b130fcc;border-bottom:3px solid var(--sc);min-width:0}
.tl>span{font-size:11px;font-weight:700;color:var(--sc);white-space:nowrap}.tl.none{opacity:.35}.tl.spent{background:linear-gradient(90deg,#0b130fcc,#2c3a2fcc)}
.tl-tokens{display:flex;gap:3px;flex-wrap:wrap}.tok{width:11px;height:11px;border-radius:50%;background:var(--kc);box-shadow:0 0 0 1px #000a}.tok.free{background:transparent;border:2px solid var(--sc)}.tok.free.dead{border-color:#666;border-style:dotted}
.tasks{flex:1;min-height:0;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(170px,1fr);gap:12px}

/* Task = an illustrated card the city deals */
.task{position:relative;min-height:0;display:flex;flex-direction:column;border-radius:12px;background:linear-gradient(#efe3c6,#d9ccaa);color:#26302a;border:3px solid #b08a3e;box-shadow:0 8px 20px #000a;cursor:pointer;overflow:hidden;transition:transform .15s,box-shadow .15s,opacity .15s,filter .15s}
.task:hover{transform:translateY(-3px)}.task.focused{transform:translateY(-6px) rotate(-.6deg);box-shadow:0 0 0 3px var(--brass2),0 14px 28px #000c}.task.dim{filter:brightness(.6) saturate(.7)}
.task.optional{cursor:default;border-style:dashed}
.task-art{position:relative;flex:0 0 auto;height:clamp(70px,22%,170px);overflow:hidden;border-bottom:3px solid var(--kc)}.task-art img{width:100%;height:100%;object-fit:cover;display:block}
.stamp{position:absolute;right:8px;bottom:6px;padding:3px 10px;border:3px solid #a3301f;border-radius:6px;color:#a3301f;font:900 20px var(--serif);background:#f3e7cfcc;transform:rotate(-10deg);opacity:0;pointer-events:none}
.stamp.on{opacity:.95}.stamp.slam{animation:slam .45s cubic-bezier(.2,1.6,.4,1) .35s both}
@keyframes slam{from{opacity:0;transform:rotate(-10deg) scale(2.4)}to{opacity:.95;transform:rotate(-10deg) scale(1)}}
.task-body{flex:1;min-height:0;overflow:auto;padding:8px 10px;display:flex;flex-direction:column;gap:5px;scrollbar-width:thin}
.task-head{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.task-head strong{font:700 16px/1.2 var(--serif);flex:1;word-break:keep-all;min-width:0}
.d-tag{font-size:10px;padding:2px 7px;border-radius:999px;background:#26302a22;color:#4b5249;white-space:nowrap}.d-tag.today{background:#a3301f22;color:#8e2a1c}
.task-score{display:flex;align-items:baseline;gap:4px}.task-score b{font:700 30px/1 var(--serif);color:#2c3a30}.task-score span{color:#6b6b5c}
.d-bar{height:7px;background:#26302a22;border-radius:4px;overflow:hidden;flex:none}.d-bar i{display:block;height:100%;background:var(--kc);transition:width .3s}
.d-note{font-size:11px;color:#6b6b5c}
.d-ev-combos{display:flex;flex-wrap:wrap;gap:4px;align-items:center;min-height:18px}.d-ev-combos small{font-size:11px;color:#6b6b5c}
.d-combo{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--brass);color:#1b140a;white-space:nowrap}.d-combo.unknown{background:transparent;border:1px dashed var(--brass);color:var(--brass)}.d-combo.fresh{animation:glow 1s infinite alternate}.d-combo.big{font-size:14px;padding:5px 12px}
@keyframes glow{to{box-shadow:0 0 10px var(--brass2)}}
.d-placed{display:flex;flex-direction:column;gap:3px}
.placed{display:grid;grid-template-columns:26px 1fr auto;align-items:center;gap:6px;text-align:left;font-size:12px;padding:3px 6px 3px 3px;border-radius:6px;background:#ffffff88;border:1px solid #26302a33;border-left:4px solid var(--sc);color:#26302a}
.placed img{width:26px;height:26px;border-radius:5px;object-fit:cover}.placed b{font:700 13px var(--serif)}.placed.assist{background:#ffffff44;font-style:italic}.placed:hover{border-color:var(--seal)}
.task-cta{margin-top:auto;align-self:flex-end;font-size:12px;font-weight:700;color:#8e6a24}
.d-opt{font-size:12px;color:#4b5249;margin:0;line-height:1.5}.d-opt-buttons{display:flex;gap:8px;margin-top:auto}.d-opt-buttons button{flex:1;padding:8px;border-radius:6px;background:#26302a;color:var(--paper);border:1px solid #b08a3e}.d-opt-buttons button[aria-pressed="true"]{background:var(--brass);color:#1b140a}
.d-kind{display:inline-grid;place-items:center;min-width:24px;height:20px;padding:0 5px;border-radius:5px;font-size:11px;font-weight:700;color:#14100a;background:var(--kc);flex:none}
.k-work{--kc:#d39a4f}.k-money{--kc:#c9b45a}.k-body{--kc:#7fb070}.k-people{--kc:#d07c74}.k-mind{--kc:#8f9ad0}.k-any{--kc:#bbb}
.slot-morning{--sc:#e8c46a}.slot-gap{--sc:#a3a38f}.slot-day{--sc:#d39a4f}.slot-evening{--sc:#c46f52}.slot-night{--sc:#7f8fd0}.slot-weekend{--sc:#6fae8a}.slot-help{--sc:#d07c74}

/* Dock: time in hand */
.dock{position:relative;display:flex;align-items:stretch;gap:12px;padding:9px 16px;border-top:2px solid #b08a3e99;background:linear-gradient(#18241ef5,#0d1511fa);box-shadow:0 -10px 30px #000a;min-width:0}
.dock-strip{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}.dock-hint{margin:0;font-size:12px;color:var(--brass2);display:flex;align-items:center;gap:6px}
.chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin}
.chip{flex:none;display:inline-flex;align-items:center;gap:6px;padding:3px 9px 3px 3px;border-radius:8px;background:#efe3c6;color:#26302a;border:2px solid var(--sc);font-size:12px;white-space:nowrap;box-shadow:0 3px 8px #0008}
.chip img{width:30px;height:30px;border-radius:5px;object-fit:cover}.chip i{font-style:normal;font-size:10px;color:#6b5a32;font-weight:700}.chip b{font:700 15px var(--serif);color:#6e2f28}.chip.dead{filter:grayscale(1);opacity:.6}
.dock-end{flex:none;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:6px;font-size:11px;color:var(--muted);text-align:right;min-width:150px}
.dock-end button{padding:8px 12px;border-radius:6px;background:#243529;border:1px solid #b08a3e88;font-size:12px}.dock-end button:disabled{opacity:.4;cursor:not-allowed}
.primary,.dock-end .primary{padding:11px 18px;border-radius:7px;background:linear-gradient(#b14a33,#6d2a1f);border:1px solid #e0c690;color:#fff0d6;font:700 15px var(--serif);box-shadow:0 4px 12px #0009}
.dock.open{height:min(54vh,450px)}
.dock-sheet{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px;min-height:0}
.sheet-head{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}.sheet-art{width:34px;height:34px;border-radius:6px;object-fit:cover;border:2px solid var(--brass)}.sheet-head strong{font:700 18px var(--serif)}.sheet-head small{font-size:11px;color:var(--muted)}
.sheet-score{display:inline-flex;align-items:center;gap:4px;font-size:13px}.sheet-score b{font:700 22px var(--serif);color:var(--brass2)}
.sheet-threat{display:inline-flex;align-items:center;gap:4px;font-size:12px;padding:3px 9px;border-radius:999px}.sheet-threat.hurt{background:#923b2c66;color:#f6d0c3}.sheet-threat.safe{background:#4f7a5a66;color:#c9e8bd}
.sheet-head .close{margin-left:auto;padding:5px 10px;border-radius:6px;background:transparent;border:1px solid #ffffff33;font-size:12px}
.tcards{flex:1;min-height:0;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(200px,1fr);gap:10px;overflow-x:auto;overflow-y:hidden;padding:2px 2px 4px}

/* Time card: an illustrated playing card */
.tcard{min-height:0;display:flex;flex-direction:column;gap:6px;padding:0 0 8px;border-radius:12px;background:linear-gradient(#efe3c6,#d9ccaa);color:#26302a;border:3px solid var(--sc);box-shadow:0 8px 18px #000a;overflow:hidden;animation:deal .22s ease-out both}
.tcard:nth-child(2){animation-delay:.03s}.tcard:nth-child(3){animation-delay:.06s}.tcard:nth-child(4){animation-delay:.09s}.tcard:nth-child(5){animation-delay:.12s}.tcard:nth-child(6){animation-delay:.15s}.tcard:nth-child(7){animation-delay:.18s}
@keyframes deal{from{transform:translateY(30px) rotate(3deg);opacity:0}to{transform:none;opacity:1}}
.tcard-art{position:relative;flex:0 0 auto;height:clamp(52px,22%,110px)}.tcard-art img{width:100%;height:100%;object-fit:cover;display:block}
.d-slot{position:absolute;left:6px;top:6px;font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;background:#0b130fcc;color:var(--sc)}
.d-base{position:absolute;right:6px;top:6px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#c58a55,#6e2f28);font:700 15px var(--serif);color:#fff0d0;box-shadow:0 0 0 2px #e7cc91}
.tcard>strong{font:700 16px var(--serif);padding:0 10px}.tcard.dead{filter:grayscale(.9);opacity:.7}.d-dead{font-size:12px;color:#6b6b5c;margin:0 10px}
.acts{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:5px;padding:0 8px;scrollbar-width:thin}
.act{display:grid;grid-template-columns:34px auto 1fr auto;align-items:center;gap:3px 6px;padding:4px 7px 4px 4px;border-radius:8px;background:#ffffffaa;border:1px solid #26302a33;font-size:13px;text-align:left;color:#26302a;transition:transform .1s,background .1s}
.act img{width:34px;height:34px;border-radius:6px;object-fit:cover;grid-row:span 2}.act-name{font-weight:700;line-height:1.2}
.act b{font:700 18px var(--serif);color:#2f6b3b}.act small{grid-column:2/-1;font-size:10px;color:#6b6b5c}.act .d-combo{grid-column:2/-1;justify-self:start}
.act:hover:not(:disabled){background:#fff;border-color:var(--brass);transform:translateX(2px)}.act.assist{background:#ffffff55}.act.assist b{color:#8e6a24}.act:disabled{opacity:.45;cursor:not-allowed}
.act.guard{grid-template-columns:34px auto 1fr auto;background:#dbe8d6}
.d-empty{color:var(--muted);font-size:13px}

/* Motion */
.fly{position:fixed;z-index:50;border-radius:8px;object-fit:cover;pointer-events:none;box-shadow:0 8px 20px #000c}
.burst{position:absolute;left:50%;top:26%;z-index:5;transform:translate(-50%,0);padding:6px 14px;border-radius:999px;background:linear-gradient(#f2d48a,#b08a3e);color:#2a1d0a;font:900 17px var(--serif);white-space:nowrap;box-shadow:0 6px 16px #000a;pointer-events:none;opacity:0;animation:burst 1.3s ease-out both}
@keyframes burst{0%{opacity:0;transform:translate(-50%,20px) scale(.6)}20%{opacity:1;transform:translate(-50%,0) scale(1.15)}70%{opacity:1;transform:translate(-50%,-10px) scale(1)}100%{opacity:0;transform:translate(-50%,-30px) scale(.95)}}
.dusk{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:linear-gradient(#f0a35a00,#2a1d3add 40%,#0b0f1aff);animation:dusk .9s ease-in both}.dusk span{font:700 28px var(--serif);color:#f6e2b8;text-shadow:0 2px 12px #000;animation:rise .9s ease-out both}.dusk.out{animation:fade .5s ease-out both}
@keyframes dusk{from{opacity:0}to{opacity:1}}@keyframes fade{to{opacity:0}}@keyframes rise{from{transform:translateY(20px);opacity:0}to{transform:none;opacity:1}}

/* Crisis: me vs the crisis */
.crisis-stage{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,1fr);gap:14px}
.arena{min-height:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:10px;padding:10px;border-radius:14px;background:radial-gradient(ellipse at 50% 85%,#3b4a36aa,#0b130f55 70%)}
.fighter{margin:0;min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px}
.fighter .hero,.fighter .portrait{flex:1;min-height:0;max-height:min(260px,34vh);width:auto;max-width:100%;object-fit:contain;filter:drop-shadow(0 10px 14px #000c)}
.fighter.me-side .hero{transform:scaleX(1)}
.fighter figcaption{width:100%;display:grid;gap:5px;padding:8px;border-radius:10px;background:#0b130fdd;border:1px solid #b08a3e66}
.versus{display:flex;flex-direction:column;align-items:center;gap:8px;align-self:center}.versus .turn{font-size:11px;color:var(--muted)}
.c-intent{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:8px;background:#15251fee;border:1px solid var(--brass);font-size:13px}.c-intent b{font:700 24px/1 var(--serif);color:#e7b087}.c-intent.attack{border-color:var(--seal)}
.c-enemy-info{display:flex;align-items:center;gap:6px}.c-enemy-info strong{font:700 16px var(--serif)}
.c-rule{display:flex;align-items:flex-start;gap:5px;margin:0;font-size:11px;line-height:1.4;color:#e9dcc0}
.c-hp{width:100%;display:grid;grid-template-columns:1fr auto;gap:3px 8px;font-size:12px}.c-hp b{font:700 17px var(--serif)}.c-hp i{grid-column:1/-1;height:7px;background:#0008;border-radius:4px;overflow:hidden}.c-hp i em{display:block;height:100%;background:var(--seal);transition:width .4s}.c-hp.me i em{background:var(--moss)}.c-hp>em{font-style:normal;display:inline-flex;align-items:center;gap:4px;font-size:11px}
.c-stats{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:11px}.c-stats span{display:inline-flex;align-items:center;gap:3px}.c-stats b{font:700 15px var(--serif)}
.c-incoming{margin:0;font-size:12px;padding:8px 10px;border-radius:10px;text-align:center;line-height:1.3}.c-incoming b{font:700 24px var(--serif)}.c-incoming.hurt{background:#923b2c88;color:#ffd9cc}.c-incoming.safe{background:#4f7a5a88;color:#d8f0cf}
.c-center{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin}
.c-row{position:relative;flex:1;min-height:100px;padding:10px;border-radius:12px;background:linear-gradient(#efe3c6,#d9ccaa);color:#26302a;border:3px solid #b08a3e;display:flex;flex-direction:column;gap:5px;cursor:pointer;box-shadow:0 8px 18px #000a;transition:transform .15s,box-shadow .15s,filter .15s}
.c-row header{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px}.c-row header strong{font:700 17px var(--serif)}.c-row header span{font-size:11px;color:#6b6b5c;display:inline-flex;align-items:center;gap:4px}
.c-row.attack{border-color:#a3301f}.c-row.guard{border-color:#4f7a5a}.c-row:hover{transform:translateY(-2px)}.c-row.focused{box-shadow:0 0 0 3px var(--brass2),0 12px 24px #000c}.c-row.dim{filter:brightness(.6)}
.c-sum{margin:0;display:flex;align-items:baseline;gap:8px}.c-sum b{font:700 28px/1 var(--serif);color:#2c3a30}.c-sum small{font-size:11px;color:#6b6b5c}
.c-last{margin:0;padding:8px 12px;border-radius:8px;background:#0b130fdd;border-left:4px solid var(--brass);font-size:12px;line-height:1.5}.c-last b{font:700 15px var(--serif)}
.c-carry{padding:8px 10px;border-radius:8px;background:#0b130fdd}.c-carry summary{cursor:pointer;font-size:12px;color:var(--brass2)}.c-carry ul{list-style:none;padding:0;margin:6px 0 0;display:grid;gap:4px;font-size:12px}.c-carry li{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.c-carry b{font:700 14px var(--serif)}
.c-result{align-self:center;margin-top:8px}.c-arrive{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 12px;border-radius:8px;background:#923b2c44;font-size:14px}

/* Dialogs */
dialog{max-width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);width:100%;padding:18px;border:2px solid var(--brass);border-radius:14px;background:#17241d;color:var(--paper);box-shadow:0 20px 50px #000}dialog::backdrop{background:#000b}
.d-dialog-head{display:flex;justify-content:space-between;align-items:center}.d-dialog-head h2{font:700 22px var(--serif);margin:0;color:var(--brass2)}.d-dialog-head button{background:none;border:0;font-size:24px}
.d-results{display:flex;flex-direction:column;gap:6px;margin:12px 0}.d-result{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:5px 10px 5px 5px;border-radius:8px;background:#00000033;font-size:13px}.d-result img{width:36px;height:36px;border-radius:6px;object-fit:cover}.d-result>span:nth-of-type(2){flex:1;font-weight:700}.d-result small{color:var(--muted)}.d-result b{display:inline-flex;align-items:center;gap:4px;font-size:12px}
.r-done{border-left:4px solid #7fb070}.r-failed{border-left:4px solid var(--seal)}.r-deferred,.r-merged{border-left:4px solid #e3c27a}
.d-daycombos{display:flex;gap:8px;margin:8px 0}.d-deltas{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.d-delta{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:999px;font-size:13px;font-weight:700;background:#ffffff14}.d-delta.good{background:#4f7a5a66;color:#c9e8bd}.d-delta.bad{background:#923b2c66;color:#f6d0c3}
.d-learned{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin:12px 0}.d-learn{padding:12px;border-radius:10px;background:linear-gradient(#3b2f17,#251d0e);border:1px solid var(--brass2);animation:reveal .5s ease-out}.d-learn small{color:var(--brass2);font-size:11px}.d-learn strong{display:block;font:700 20px var(--serif);margin:4px 0}.d-learn p{margin:0 0 4px;font-size:12px}.d-learn b{font-size:12px;color:#a8d39a}
@keyframes reveal{from{transform:scale(.9);opacity:0}to{transform:none;opacity:1}}
.d-decknote,.d-intro{font-size:12px;color:var(--muted)}.d-book{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}.d-book article{padding:10px;border-radius:8px;background:#00000033}.d-book strong{font:700 16px var(--serif)}.d-book small{font-size:10px;color:var(--brass2)}.d-book p{margin:4px 0;font-size:12px}.d-book b{font-size:12px;color:#a8d39a}
.d-deck{display:flex;flex-wrap:wrap;gap:6px}.d-deck span{display:inline-flex;align-items:center;gap:6px;padding:3px 10px 3px 3px;border-radius:6px;background:#00000033;border-left:4px solid var(--sc);font-size:13px}.d-deck img{width:28px;height:28px;border-radius:5px;object-fit:cover}.d-deck .dead{opacity:.6}
.d-rules{padding-left:18px;line-height:1.6;font-size:13px}
.rotate-hint{display:none}

/* Short landscape screens (phones turned sideways) */
@media (max-height:520px){
  .hud{padding:3px 10px;gap:8px}.d-title small{display:none}.d-tools button{padding:3px 8px}
  .stage{padding:6px 10px}.day-stage{grid-template-columns:150px minmax(0,1fr);gap:8px}
  .me{padding:6px;gap:4px}.me-portrait{height:96px}.me-age b{font-size:16px}.me-day b{font-size:16px}.me-meter{font-size:11px}.me-meter b{font-size:13px}.me-people{gap:4px}.person figcaption{font-size:9px}
  .today{gap:5px}.tl{padding:2px 5px}.tl>span{font-size:10px}.tok{width:8px;height:8px}.tasks{gap:8px;grid-auto-columns:minmax(140px,1fr)}
  .task-art{height:34%}.task-body{padding:5px 7px;gap:3px}.task-head strong{font-size:13px}.task-score b{font-size:20px}.d-tag{font-size:9px;padding:1px 5px}
  body[data-dock="open"] .task :is(.d-ev-combos,.d-bar,.d-placed,.task-cta,.d-note){display:none}body[data-dock="open"] .task-art{height:45%}
  body[data-dock="open"] .me :is(.me-people,.me-cash){display:none}
  .dock{padding:5px 10px}.dock.open{height:64vh}.tcards{grid-auto-columns:minmax(170px,1fr)}.tcard-art{height:40px}.tcard>strong{font-size:13px}
  .act{grid-template-columns:24px auto 1fr auto;padding:2px 6px 2px 2px;font-size:12px}.act img{width:24px;height:24px}.act b{font-size:15px}.act small{display:none}
  .dock-end{min-width:118px}.primary{padding:7px 10px;font-size:13px}.sheet-head small{display:none}.sheet-art{width:24px;height:24px}.sheet-head strong{font-size:15px}
  .crisis-stage{grid-template-columns:minmax(0,1.2fr) minmax(220px,1fr);gap:8px}.fighter .hero,.fighter .portrait{max-height:24vh}.fighter figcaption{padding:5px}.c-rule{display:none}
  .c-row{min-height:70px;padding:7px}.c-sum b{font-size:20px}body[data-dock="open"] .crisis-stage .fighter img{max-height:12vh}
}
/* Portrait phones: stack and scroll, keep the dock pinned to the bottom */
@media (orientation:portrait) and (max-width:760px){
  body{overflow:auto}#day{height:auto;min-height:100dvh;display:flex;flex-direction:column}
  .hud{flex-wrap:wrap}.d-tools{margin-left:0}
  .stage{overflow:visible;flex:1;padding-bottom:12px}
  .day-stage{grid-template-columns:1fr}.me{display:grid;grid-template-columns:96px 1fr;gap:6px 10px;overflow:visible}.me-portrait{grid-row:span 4;height:150px}.me-people{grid-column:1/-1}
  .timeline{grid-template-columns:repeat(3,1fr)}
  .tasks{grid-auto-flow:row;grid-template-columns:1fr 1fr;grid-auto-columns:auto}.task{min-height:260px}.task-art{height:90px}
  .crisis-stage{grid-template-columns:1fr}.arena{min-height:280px}.c-row{min-height:110px}
  .dock{position:sticky;bottom:0;flex-direction:column;gap:8px}.dock-end{flex-direction:row;align-items:center;min-width:0;text-align:left}.dock-end>span{flex:1}.dock-end .primary{flex:1}
  .dock.open{height:auto;max-height:70dvh}.tcards{grid-auto-columns:minmax(74vw,1fr);min-height:300px}
  .rotate-hint{display:block;order:-1;margin:0;padding:4px;text-align:center;font-size:11px;color:var(--brass2);background:#3b2f17}
}
@media (orientation:portrait) and (max-width:420px){.tasks{grid-template-columns:1fr}.task{min-height:220px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media (max-height:520px){.tasks{grid-auto-columns:minmax(112px,1fr)}.day-stage{grid-template-columns:132px minmax(0,1fr)}}
@media (orientation:portrait) and (max-width:760px){.me-portrait img{height:100%;bottom:0}}
.task-art{height:clamp(80px,44%,280px)}@media (max-height:520px){.task-art{height:34%}body[data-dock="open"] .task-art{height:45%}}
/* Fixes (2026-10-16 phone landscape report): keep art whole, keep tags off names, give open time cards room */
.me-portrait img{width:auto;max-width:none}
.task-art .d-tag{position:absolute;left:6px;top:6px;background:#0b130fcc;color:#efe3c6;border:1px solid #ffffff33}.task-art .d-tag.today{background:#7a2416dd;color:#ffe2d6}
.task-head strong{flex:1;min-width:0}.mini-score{display:none;font:700 12px var(--serif);color:#6b5a32;white-space:nowrap}
@media (max-height:520px){
  /* closed dock: tasks keep a real picture */
  .task-art{height:42%}
  /* open dock: the stage becomes one row of small picture tiles, the dock gets the height */
  body[data-dock="open"] .stage{padding:4px 10px}
  body[data-dock="open"] .day-stage{grid-template-columns:1fr}
  body[data-dock="open"] .day-stage .me,body[data-dock="open"] .timeline{display:none}
  body[data-dock="open"] .tasks{grid-auto-columns:minmax(118px,1fr);gap:6px}
  body[data-dock="open"] .task{flex-direction:row;align-items:center;height:48px;border-width:2px;border-radius:9px}
  body[data-dock="open"] .task-art{height:100%;width:44px;flex:0 0 44px;border-bottom:0;border-right:3px solid var(--kc)}
  body[data-dock="open"] .task-art .d-tag{display:none}body[data-dock="open"] .stamp{font-size:11px;padding:1px 5px;border-width:2px;right:2px;bottom:2px}
  body[data-dock="open"] .task-body{padding:2px 6px;overflow:hidden}
  body[data-dock="open"] .task-head .d-kind{display:none}
  body[data-dock="open"] .task-head strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body[data-dock="open"] .task-score{display:none}body[data-dock="open"] .mini-score{display:inline}
  body[data-dock="open"] .task.done{box-shadow:inset 0 0 0 2px #7fb070}
  body[data-dock="open"] .task.focused{transform:none}
  body[data-dock="open"] .task-head{flex-wrap:nowrap}
  .dock.open{height:auto;flex:1}
  body[data-dock="open"] #day{grid-template-rows:auto auto minmax(0,1fr)}
  .tcards{grid-auto-columns:minmax(178px,1fr)}
  .tcard{gap:3px}
  .tcard-art{height:44px}
  .acts{overflow:visible;gap:3px}
  .act{min-height:30px}
  .dock-end{min-width:104px}.dock-end span{font-size:10px}
}
@media (max-height:520px){body[data-dock="open"] .task.optional .d-opt{display:none}body[data-dock="open"] .task.optional .d-opt-buttons button{padding:2px 6px;font-size:11px}body[data-dock="open"] .task.optional .task-head{display:none}}
/* Readability floor (2026-10-16 "텍스트가 안보이는게 문제"): nothing under 12px, no faded labels, sans for small Korean text on phones */
:root{--sans:'Noto Sans KR','Apple SD Gothic Neo','Malgun Gothic',Arial,sans-serif}
.hud-day{font:700 14px var(--sans);color:var(--paper);white-space:nowrap}
.d-title small,.d-pressure span,.d-tools button,.d-tools small,.me-age small,.me-meter,.person figcaption,.person figcaption b,.tl>span,.d-tag,.d-kind,.d-combo,.chip i,.d-slot,.dock-end,.dock-end span,.dock-hint,.d-note,.d-ev-combos small,.sheet-head small,.c-stats,.c-hp>em,.c-rule,.c-row header span,.c-sum small,.versus .turn,.act small,.mini-score,.d-opt,.d-opt-buttons button,.c-carry ul,.c-last,.task-cta{font-size:max(12px,1em)}
.d-pressure span,.d-tools button,.me-age small,.tl>span,.d-tag,.d-kind,.d-combo,.chip i,.d-slot,.dock-end span,.dock-hint,.act small,.mini-score,.c-stats,.c-row header span,.c-sum small{font-size:12px}
.person figcaption{font-size:12px}.person figcaption b{font-size:11px;letter-spacing:0}
.tl.none{opacity:1}.tl.none>span{color:#8f8a78}.tl.none{border-bottom-style:dashed}
.chip{font-size:13px}.act{font-size:13px}.act-name{font-size:13px}
@media (max-height:520px),(orientation:portrait) and (max-width:760px){
  .task-head strong,.tcard>strong,.act-name,.chip>span,.placed span,.sheet-head strong,.c-row header strong,.c-enemy-info strong,.me-age{font-family:var(--sans);letter-spacing:-.2px}
  .task-head strong{font-size:14px;font-weight:700}.tcard>strong{font-size:14px;font-weight:700}.act-name{font-size:13px;font-weight:700}
  .d-title{font-size:14px}.d-title small{display:none}
  .me-day{display:none}
  .me-portrait{height:72px}
  .me-meter{font-size:12px}.me-meter b{font-size:14px}
  .me-people{gap:4px}.person img{width:38px;height:38px;margin:0 auto;display:block}
  .tl{padding:3px 6px}.tl>span{font-size:12px}
  .dock-end{min-width:112px}.dock-end span{font-size:12px;line-height:1.3}
  .sheet-head small{display:none}
  .placed{font-size:12px}.placed b{font-size:13px}
}
.task .d-combo.unknown,.c-row .d-combo.unknown,.tcard .d-combo.unknown{color:#7a5a1c;border-color:#7a5a1c}
.person figcaption b{font-size:12px}.d-opt-buttons button{font-size:12px!important}
@media (max-height:520px){.task.optional .task-art{height:26%}.task.optional .d-opt{font-size:12px;line-height:1.3}.task.optional .task-body{gap:3px;padding:4px 6px}.task.optional .d-opt-buttons button{padding:4px 6px}}
dialog small,.d-result small,.d-learn small,.d-book small,.d-learn p,.d-book p,.d-learn b,.d-book b,.d-decknote,.d-intro,.d-result b{font-size:12px}.d-result{font-size:13px}
@media (max-height:520px){
  body[data-dock="open"] .crisis-stage{grid-template-columns:1fr;padding:4px 10px}
  body[data-dock="open"] .crisis-stage .c-center{display:none}
  body[data-dock="open"] .arena{padding:2px;gap:6px;align-items:center}
  body[data-dock="open"] .fighter{flex-direction:row;height:auto;gap:6px}
  body[data-dock="open"] .fighter :is(.hero,.portrait),body[data-dock="open"] .fighter .c-rule,body[data-dock="open"] .fighter .c-stats,body[data-dock="open"] .versus .turn{display:none}
  body[data-dock="open"] .fighter figcaption{padding:4px 8px}
  body[data-dock="open"] .c-intent{padding:2px 8px}body[data-dock="open"] .c-intent b{font-size:18px}
  body[data-dock="open"] .c-incoming{padding:3px 8px}body[data-dock="open"] .c-incoming br{display:none}body[data-dock="open"] .c-incoming b{font-size:18px}
}
.rotate-hint{font-size:12px!important}
/* 3.1: slots instead of points, money buttons, big jobs, rewards */
.boxes{display:inline-flex;gap:3px;flex-wrap:wrap}.boxes i{width:16px;height:16px;border:2px solid #26302a;border-radius:4px;background:#ffffff66}.boxes i.full{background:var(--kc);border-color:#26302a}.boxes i.half{background:linear-gradient(90deg,var(--kc) 50%,#ffffff66 50%)}
.task-slots{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.task-slots b{font:700 22px/1 var(--serif);color:#2c3a30}.task-slots span{font-size:12px;color:#6b6b5c}
.task-price{display:flex;align-items:center;gap:6px;font-size:13px}.task-price b{font:700 26px/1 var(--serif);color:#6e2f28}
.pay{padding:9px 10px;border-radius:7px;background:linear-gradient(#e8d27a,#c9a94a);border:1px solid #6b5a32;color:#2a1d0a;font:700 14px var(--sans);width:100%}.pay:disabled{background:#ffffff55;color:#6b6b5c;border-color:#26302a33;cursor:not-allowed}.pay.small{font-size:12px;padding:6px 8px}
.big-row{display:flex;gap:6px}.big-row .pay{flex:1;font-size:12px;padding:7px 6px}
.habit{font-size:11px;padding:2px 7px;border-radius:999px;background:#315e49;color:#e8f3e4;white-space:nowrap}
.task.money{cursor:default}.task.bigjob{border-color:#a3301f;border-width:3px}.task.bigjob .task-art.big img{object-fit:contain;background:radial-gradient(ellipse at 50% 60%,#2b3a30,#141e18)}
.task .c-rule{background:#26302a14;color:#3a3a2e;font-size:12px}
.placed.tired{background:#e9dccf99}.placed.sharp b{color:#8e6a24}.placed.earned{border-left-color:#c9a94a}
.chip.sharp{border-color:#e8c46a}.chip.tired{opacity:.8}
.d-quality{position:absolute;right:6px;top:6px;font-size:11px;font-weight:700;padding:2px 7px;border-radius:999px;background:#0b130fcc;color:#efe3c6}.tcard.sharp .d-quality{color:#f2d48a}.tcard.tired .d-quality{color:#b8b19a}
.act.earn{background:#f3e7c7}.act.earn b{color:#8e6a24}.act.sharp{background:#fff6dc}.act.tired{background:#ffffff66}.act.tired b{color:#6b6b5c}
.me-cash{position:relative}
.offers{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:12px 0}
.offer{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:12px;background:linear-gradient(#efe3c6,#d9ccaa);color:#26302a;border:3px solid var(--brass);text-align:center;box-shadow:0 8px 18px #000a;animation:deal .25s ease-out both}
.offer img{width:100%;height:110px;object-fit:contain;border-radius:8px;background:#0b130f22}.offer small{font-size:12px;color:#8e6a24;font-weight:700}.offer strong{font:700 18px var(--serif)}.offer p{margin:0;font-size:12px;line-height:1.45}.offer:hover{transform:translateY(-3px);border-color:var(--brass2)}
.offer.person img{object-position:50% 10%;object-fit:cover}
dialog.wide{max-width:min(900px,calc(100vw - 24px))}
.d-combo.bad{background:#923b2c;color:#ffe2d6}
.c-arrive.win{background:#4f7a5a66}
.d-result small{font-size:12px}
@media (max-height:520px){.boxes i{width:12px;height:12px}.task-slots b{font-size:18px}.task-price b{font-size:20px}.offers{grid-template-columns:repeat(3,1fr);gap:6px}.offer{padding:6px}.offer img{height:60px}.offer strong{font-size:14px}.offer p{font-size:11px}
  body[data-dock="open"] .task :is(.task-slots,.task-price,.pay,.big-row,.c-rule,.habit){display:none}body[data-dock="open"] .mini-score{display:none}}
.d-quality{font-size:12px}.act:disabled{opacity:.72;background:#ffffff55}.act:disabled .act-name,.act:disabled small{color:#4b5249}

/* Explanations: tappable pressure chips, big-job intro */
.d-pressure button{display:inline-flex;align-items:center;gap:4px;font-size:12px;padding:3px 9px;border-radius:999px;background:#923b2c66;color:#f6d0c3;border:1px solid #ffffff22;white-space:nowrap;font-family:var(--sans)}.d-pressure button.d-next{background:#3b2f17;color:var(--brass2)}
.d-pressure button i{font-style:normal;display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#ffffff22;font-size:11px;font-weight:700}
.linkish{background:none;border:0;padding:0;color:inherit;text-decoration:underline dotted;font:inherit}
.task .c-rule span{display:block;line-height:1.4}.task .c-rule b{display:block;margin-bottom:2px}
.intro-row{display:grid;grid-template-columns:120px 1fr;gap:14px;align-items:start;margin:10px 0}.intro-row img{width:120px;height:120px;object-fit:contain;background:radial-gradient(ellipse at 50% 60%,#2b3a30,#141e18);border-radius:10px}
.intro-row p{margin:0 0 8px;font-size:13px;line-height:1.5}.intro-ask{font-size:15px}.intro-row .c-rule{background:#00000040;color:var(--paper);font-size:13px;padding:8px 10px;border-radius:8px;display:flex;gap:6px;align-items:flex-start}.intro-row .c-rule span{display:block;line-height:1.45}.intro-row .c-rule b{display:block;color:var(--brass2);margin-bottom:2px}
.intro-row .d-rules{margin:6px 0}
@media (max-width:640px){.intro-row{grid-template-columns:1fr}.intro-row img{width:90px;height:90px}}
@media (max-height:520px){.intro-row{grid-template-columns:80px 1fr;gap:8px}.intro-row img{width:80px;height:80px}.intro-row p,.intro-row .d-rules{font-size:12px}.intro-ask{font-size:13px}
  body[data-dock="open"] .task.bigjob .c-rule{display:none}}
dialog{overflow:auto}

/* 3.2 life: me panel family/conditions, roads, ending */
.hud-day{font-size:12px;color:var(--paper);white-space:nowrap}.hud-day b{font:700 18px var(--serif);color:var(--brass2)}.hud-day small{color:var(--muted);font-size:11px}
.me-age small+small{color:#c9bfa0}
.me-life{display:flex;flex-direction:column;gap:3px;font-size:12px;color:#d9d0b8}.me-life span{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.me-cond button{font-size:11px;padding:2px 8px;border-radius:999px;background:#923b2c66;color:#f6d0c3;border:1px solid #d07c7466}
.person figcaption small{display:block;font-size:10px;color:var(--brass2)}.person.partner img{border-color:#d07c74}.person.candidate img{border-style:dashed}.person.child img{border-color:#7fb070}
.habit.lethal{background:#7a2416;color:#ffe2d6}
.chip.legacy{border-color:#8f9ad0;background:#e4e2f3}.tcard.legacy{border-color:#8f9ad0}
.task.bigjob.happy{border-color:#6fae8a}.task.bigjob.happy .task-art{border-bottom-color:#6fae8a}
.offers.roads .offer{text-align:left}.offer.locked{opacity:.55;filter:grayscale(.8);cursor:not-allowed}.offer.locked small{color:#f3a28c}.offer.legacy{border-color:#8f9ad0}
.d-people-note{margin:4px 0;font-size:13px;display:flex;align-items:center;gap:6px;color:#e9dcc0}.d-people-note.bad{color:#f6d0c3}
.d-ending-row{display:grid;grid-template-columns:110px 1fr;gap:8px;font-size:13px;padding:3px 0;border-bottom:1px solid #ffffff14}.d-ending-row small{color:var(--brass2)}
body[data-phase="ending"]::before{background:linear-gradient(180deg,#0d1511f2,#1a1420f2)}
.c-arrive.win{background:#4f7a5a66}
@media (max-height:520px){.me-life{display:none}.hud-day small{display:none}}

/* 3.2 readability: nothing under 12px */
.person figcaption small{font-size:12px}.habit{font-size:12px}.offer p{font-size:12px}.me-age small{font-size:12px}
.d-pressure button i,.d-pressure .d-next i{font-size:12px;font-style:normal}

/* 3.2 verbs and overfill */
.act-when{display:block;font-size:12px;font-weight:400;color:#6b6b5c}.placed span small{font-size:12px;color:#6b6b5c}
.task-slots .over{margin-left:6px;font-size:12px;font-weight:700;padding:1px 7px;border-radius:999px;background:#e8c46a;color:#3b2f17}

/* 3.3 stage 1: colors, bundles, debt */
.task-colors{display:flex;flex-direction:column;gap:3px}.task-colors .task-slots{flex-wrap:wrap;gap:4px;padding:2px 4px;border-radius:6px;background:#26302a0f;border-left:4px solid var(--kc)}
.task-colors .task-slots b{font-size:14px}.task-colors .pay.small{padding:3px 8px;font-size:12px}
.d-bundle{font-size:12px;padding:1px 7px;border-radius:999px;background:#26302a18;color:#4b5249;white-space:nowrap}
.pay.borrow{background:#7a2416;color:#ffe2d6;border-color:#d07c74}
.me-debt{margin-left:auto;font-size:12px;padding:2px 8px;border-radius:999px;background:#923b2c66;color:#f6d0c3;border:1px solid #d07c7466}.me-debt b{font-size:14px;color:#ffd9cc}
.k-play{--kc:#6fb7c9}.k-learn{--kc:#b58a5a}

/* 3.3 tutorial: parameter icons, quota row, coach marks */
.pv{display:inline-flex;align-items:center;gap:2px;font-style:normal;font-weight:700;white-space:nowrap;padding:0 4px;border-radius:5px;background:#ffffff14}.task .pv,.act .pv,.d-opt .pv{background:#26302a14}.pv.slot{font-weight:700}.pv.sun{color:#b8860b}.pv.big{font-size:18px}
.quota-row{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:12px;color:#4b5249;padding:4px 6px;border-radius:8px;background:#26302a0f}.quota-row .pay.small{margin-left:auto;display:inline-flex;align-items:center;gap:3px;padding:4px 9px;font-size:12px}
.task.bigjob .task-art{height:clamp(60px,26%,160px)}
.legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:6px;margin:8px 0}.legend span{display:flex;align-items:center;gap:6px;font-size:13px;padding:6px 8px;border-radius:8px;background:#ffffff10}.legend b{color:var(--brass2)}
body.coaching::after{content:"";position:fixed;inset:0;background:#000a;z-index:70;pointer-events:none}
.coach-on{position:relative;z-index:71!important;box-shadow:0 0 0 3px var(--brass2),0 0 0 9px #e8c46a44!important;border-radius:12px}
.coach-box{position:fixed;z-index:72;padding:12px 14px;border-radius:12px;background:#17241d;border:2px solid var(--brass);color:var(--paper);box-shadow:0 16px 40px #000c;font-size:13px;line-height:1.5}.coach-box small{color:var(--brass2);font-size:12px}.coach-box strong{display:block;font:700 18px var(--serif);margin:2px 0 4px}.coach-box p{margin:0 0 8px}.coach-box .ic{vertical-align:-3px}
.coach-buttons{display:flex;gap:8px;justify-content:flex-end}.coach-buttons button{padding:6px 12px;border-radius:6px;background:#243529;border:1px solid #b08a3e88;font-size:12px}.coach-buttons .primary{font-size:13px;padding:7px 14px}
.coach-box::before{content:"";position:absolute;left:50%;top:-8px;width:14px;height:14px;background:#17241d;border-left:2px solid var(--brass);border-top:2px solid var(--brass);transform:translateX(-50%) rotate(45deg)}.coach-box.above::before{top:auto;bottom:-8px;transform:translateX(-50%) rotate(225deg)}
@media (max-height:520px){.coach-box{font-size:12px;padding:8px 10px}.coach-box strong{font-size:15px}.coach-box p{margin-bottom:6px}}
.intro-row .legend .ic,.legend .ic,.coach-box .ic,.pv .ic{width:18px;height:18px;flex:none;position:static;transform:none;filter:none}.pv .ic{width:13px;height:13px}.coach-box .ic{width:16px;height:16px}
.coach-box.side::before{left:-8px;top:24px;transform:rotate(-45deg)}

/* 3.3 cards: rarity frames, trait line, reveal, collection */
.r-uncommon{--rc:#6fae8a}.r-rare{--rc:#5b8fd6}.r-legendary{--rc:#e0b347}.r-burden{--rc:#666}
.tcard.r-uncommon,.tcard.r-rare,.tcard.r-legendary{border-color:var(--rc);box-shadow:0 8px 18px #000a,0 0 0 1px var(--rc) inset}.tcard.r-legendary{background:linear-gradient(#f3e8c8,#e3d2a0)}
.chip.r-uncommon{border-color:var(--rc)}.chip.r-rare,.chip.r-legendary{border-color:var(--rc);box-shadow:0 0 10px var(--rc)}.chip.glow{animation:glow 1s infinite alternate}
.r-tag{position:absolute;right:6px;top:6px;font-size:12px;font-weight:700;padding:2px 7px;border-radius:999px;background:var(--rc);color:#14100a}
.tcard .trait{display:block;padding:0 10px;font-size:12px;color:#4b5249;line-height:1.35}
.offer.r-rare,.offer.r-legendary{border-color:var(--rc);box-shadow:0 0 0 2px var(--rc) inset}.offer.r-legendary small,.offer.r-rare small{color:var(--rc);font-weight:700}
.reveal{position:fixed;inset:0;z-index:65;display:grid;place-items:center;background:#000a;animation:fade .3s ease-out both reverse}.reveal.out{animation:fade .5s ease-out both}
.reveal-card{width:min(320px,86vw);padding:14px;border-radius:14px;background:linear-gradient(#efe3c6,#d9ccaa);color:#26302a;border:4px solid var(--rc);box-shadow:0 0 40px var(--rc),0 20px 50px #000;text-align:center;animation:flip .7s cubic-bezier(.3,.7,.3,1) both}
.reveal-card img{width:100%;height:120px;object-fit:cover;border-radius:8px}.reveal-card small{display:block;margin-top:8px;color:var(--rc);font-weight:700}.reveal-card strong{display:block;font:700 24px var(--serif);margin:4px 0}.reveal-card p{margin:0;font-size:13px}
@keyframes flip{from{transform:rotateY(90deg) scale(.8);opacity:0}to{transform:none;opacity:1}}
.collection span.unseen{opacity:.5;filter:grayscale(1)}.collection span.unseen img{filter:brightness(0)}.collection i{font-style:normal;font-size:12px;color:var(--rc,#aaa)}.d-deck.collection span{border-left-color:var(--rc,var(--sc))}
#d-dialog h3{font:700 15px var(--serif);margin:12px 0 4px;color:var(--brass2)}#d-dialog h3 small{color:var(--muted);font-size:12px;margin-left:6px}
.d-run{font-size:13px;color:#e9dcc0;padding:6px 10px;border-radius:8px;background:#ffffff10;margin:6px 0}.stars{color:#e0b347;letter-spacing:2px;font-size:14px}
@media (max-height:520px){.reveal-card img{height:70px}.reveal-card strong{font-size:18px}}
.coach-box{max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box}.coach-buttons{position:sticky;bottom:0;background:#17241d;padding-top:4px}
@media (max-height:520px){.coach-box{max-height:calc(100dvh - 12px)}}

/* stage 2: market, belongings, inherit, my people, death line */
.offers.market .offer,.offers.merits .offer{cursor:default;text-align:left}.offer.item.got{border-color:#6fae8a;box-shadow:0 0 0 2px #6fae8a inset}.offer-buy{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.offers.merits .offer{cursor:pointer}.offer.merit.on{border-color:#e0b347;box-shadow:0 0 0 2px #e0b347 inset}.offer.merit.locked{opacity:.55;filter:grayscale(.7)}
.belong{display:grid;grid-template-columns:48px 1fr auto;gap:10px;align-items:center;padding:8px;border-radius:10px;background:#ffffff10;margin:6px 0}.belong img{width:48px;height:48px;border-radius:8px;object-fit:cover}.belong p{margin:2px 0;font-size:13px}.belong small{font-size:12px;color:var(--muted)}
.person.mine img{border-color:#e0b347;box-shadow:0 0 8px #e0b34788}.habit.mine{background:#e0b347;color:#2a1d0a}
.me-line{font-size:12px;color:#f3a28c;margin:-4px 0 2px}.d-run.clear{background:#4f7a5a66;color:#d8f0cf}

.offers.diffs{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:6px 0 10px}
.offers.diffs .offer{cursor:pointer;text-align:left}.offers.diffs .offer p{font-size:12px;margin:4px 0 0}
.offer.diff.on{border-color:#e0b347;box-shadow:0 0 0 2px #e0b347 inset}.offer.diff.locked{opacity:.5;filter:grayscale(.8);cursor:not-allowed}
.offers.diffs.trials .offer.diff:not(.locked){border-color:#b3564a}
.pick-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}.pick-chips b{font-size:12px;margin-right:4px}
.pick-chip{border:1px solid var(--line,#c9b99a);background:transparent;border-radius:999px;padding:4px 10px;font-size:12px;cursor:pointer;color:inherit}
.pick-chip.on{background:#e0b347;color:#1d1a14;border-color:#e0b347}
button.chip.use-chip{cursor:pointer;font:inherit}button.chip.use-chip b{background:#2f4a3a;color:#fff;border-radius:6px;padding:0 6px}

.d-tag.desperate{background:#a8473b;color:#fff}

.act.use{justify-content:center;background:#2f4a3a;color:#fff}.tcard.r-skill{border-color:#5c9a73}.tcard.r-power{border-color:#b98be0}

/* review fixes: phone nav wraps, larger tap targets, collapsed ladder on the first life */
@media (max-width:520px){.d-tools{flex-wrap:wrap}.hud{flex-wrap:wrap}}
.d-tools button,.d-dialog-head button,.task-colors .pay.small,.sheet-head button{min-height:40px}
.d-dialog-head button{min-width:40px;font-size:22px}
.d-more{margin:8px 0}.d-more summary{cursor:pointer;color:var(--brass2);font-size:13px;padding:6px 0}
.c-arrive span{flex:1 1 200px}

/* review fixes 2: tap tooltips, full pressure, tap targets */
#tip-toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);max-width:min(92vw,420px);padding:10px 14px;border-radius:10px;background:#1d2a21f2;border:1px solid #b08a3e;color:#f3e6c4;font-size:14px;line-height:1.45;z-index:90;opacity:0;pointer-events:none;transition:opacity .2s}
#tip-toast.on{opacity:1}
.d-pressure button.full{border-color:#c0563e;background:#5a2a20cc}
.quota-row .linkish,.quota-row .pay.small{min-height:36px}

@media (max-width:520px){.hud-day small{font-size:12px}}

/* Compact life ledger: the task remains the primary decision surface. */
.me-details{min-width:0}.me-details summary{min-height:36px;cursor:pointer;font-size:12px;padding:8px 0;color:var(--brass2)}
.me-details summary span{float:right;color:var(--muted)}
.me-details .me-life{margin-bottom:8px}
.task-art:has(img[src^="data:image/svg+xml"]){background:#e8dcc7}
.task-art img[src^="data:image/svg+xml"]{object-fit:contain;padding:16px}
.me-portrait img[src^="data:image/svg+xml"]{height:90%;width:90%;bottom:5%;filter:none}
@media (orientation:portrait) and (max-width:760px){
  .hud{padding:8px 12px;gap:6px;overflow:visible}.hud-day{margin-left:auto}
  .d-tools{width:100%;gap:4px;flex-wrap:nowrap;overflow:auto}.d-tools button{font-size:12px;padding:4px 8px;min-height:36px}
  .stage{padding:8px 12px 16px}.day-stage{gap:10px}
  .me{grid-template-columns:60px minmax(0,1fr);gap:4px 10px;padding:8px 10px;border-radius:12px}
  .me-portrait{grid-column:1;grid-row:1 / span 4;height:90px}
  .me-age{left:2px;top:auto;bottom:2px;padding:2px 4px;border:0;background:#142019d9}.me-age b{font-size:16px}.me-age small{display:none}
  .me-meter,.me-cash,.me-line{grid-column:2;font-size:12px;margin:0}.me-meter b,.me-cash b{font-size:15px}.me-meter i{height:3px}
  .me-details{grid-column:1/-1}.me-details summary{padding:8px 0}.me-people{grid-template-columns:repeat(4,minmax(0,1fr))}
  .person img{width:36px;height:36px}.person figcaption,.person figcaption b{font-size:12px}
  .timeline{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}.tl{padding:4px;flex-direction:column;gap:3px}.tl>span{font-size:12px}
  .tasks{grid-template-columns:1fr;grid-auto-flow:row;gap:8px}
  .task{flex-direction:row;min-height:100px;border-width:2px;transform:none!important}
  .task-art,.task.bigjob .task-art{width:76px;flex:0 0 76px;height:auto;min-height:100px;border-bottom:0;border-right:2px solid var(--kc)}
  .task-art img{position:absolute;inset:0;height:100%;object-fit:cover}
  .task-art img[src^="data:image/svg+xml"]{padding:7px}
  .task-art .d-tag{left:3px;top:3px;max-width:70px;font-size:12px;padding:2px 4px;white-space:normal}
  .task-body{padding:8px;overflow:visible}.task-head strong{font-size:16px}.task-cta{font-size:12px;margin-top:2px}.stamp{font-size:14px;padding:2px 4px;right:3px;bottom:3px}
  .task.bigjob .task-body{gap:6px}.task .c-rule{font-size:12px}.d-tag,.d-note{font-size:12px}
  .dock{padding:8px 12px;gap:6px}.dock.open{height:auto;max-height:52dvh}
  .tcards{grid-auto-flow:row;grid-template-columns:1fr;grid-auto-columns:auto;min-height:0;overflow:auto;gap:8px;max-height:30dvh}
  .tcard{display:grid;grid-template-columns:52px minmax(0,1fr);gap:4px;padding:6px;min-height:96px;flex:none;overflow:visible}
  .tcard-art{grid-column:1;grid-row:1 / span 3;height:64px}.tcard-art img{border-radius:6px}.tcard .d-slot{left:0;top:0;font-size:12px}.tcard .d-base{width:20px;height:20px;top:auto;bottom:0;right:0;font-size:12px}.tcard .r-tag{display:none}
  .tcard>strong,.tcard>.trait,.tcard>.acts,.tcard>.d-dead{grid-column:2;padding:0;margin:0}.tcard>.acts{overflow:visible}
  .act{min-height:40px;font-size:12px;grid-template-columns:24px auto minmax(0,1fr) auto}.act img{width:24px;height:24px}.act small,.act-when{font-size:12px}
  .sheet-head{gap:4px;font-size:12px}.sheet-head small{font-size:12px;line-height:1.4}.sheet-head strong{font-size:16px}.sheet-score b{font-size:16px}
  .rotate-hint{display:none}.dock-end{font-size:12px}.dock-end .primary{min-height:40px}
}
