:root{color-scheme:light;--paper:#f2eddf;--white:#fffaf0;--ink:#2d352e;--muted:#72776b;--accent:#d76840;--green:#628574;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{background-image:radial-gradient(#575b4625 .7px,transparent .7px);background-size:7px 7px;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none}button{font:inherit;color:inherit;cursor:pointer;min-height:44px;border:1.5px solid #67705d;border-radius:7px;background:var(--white);touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:active{transform:translateY(2px)}button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}button:disabled{opacity:.4;cursor:default}h1,h2,p{margin:0}[hidden]{display:none!important}
.shell{width:min(100%,480px);height:100vh;height:100dvh;margin:auto;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:9px}
header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;border-bottom:2px solid var(--ink);padding-bottom:9px}h1{font-size:27px;letter-spacing:-1.2px;font-weight:900;line-height:1.15}h1 span{color:var(--accent)}header p{font-size:10px;letter-spacing:1.5px;margin-top:5px;color:var(--muted)}.stamp{border:1.5px solid var(--accent);transform:rotate(5deg);font-size:10px;line-height:1.5;text-align:center;padding:3px 9px;color:#a64e33}.stamp b{letter-spacing:1px;font-size:9px}
.hud{flex-shrink:0;font-size:11px;font-weight:600}.hud-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 1px 5px}.hud-line b{font-variant-numeric:tabular-nums}.track{height:8px;border:1px solid #6c7261;border-radius:3px;overflow:hidden;background:#dedecd}.track i{display:block;height:100%;width:100%;transition:width .12s linear}.boss-track i{background:#678776}.pressure-label{margin-top:8px}.pressure-track i{background:#dd784f;width:0}.pressure-track.critical i{background:#b64031}.pressure-label #money{margin-left:auto;font-size:14px;color:#9c6c2c}.pressure-label time{font-size:11px;min-width:40px;text-align:right;color:var(--muted)}
.arena{position:relative;flex:1;min-height:0;border:2px solid #414b37;border-radius:9px;overflow:hidden;box-shadow:3px 4px 0 #60664d;background:#e8eadc}canvas{display:block;width:100%;height:100%;touch-action:none}#notice{position:absolute;inset:0;text-align:left;font-size:9px;line-height:13px;pointer-events:none;color:#505b47;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.result-meter{position:absolute;bottom:8px;left:12px;right:12px;display:flex;align-items:center;gap:7px;font-size:9px;pointer-events:none;color:#56664d}.result-meter>div{height:5px;border-radius:2px;background:#cbd1bd;flex:1;overflow:hidden}.result-meter i{display:block;height:100%;width:0;background:#a17732}.result-meter b{font-weight:500;width:44px;text-align:right}
.controls{height:88px;flex-shrink:0;display:flex;align-items:center;gap:18px;padding:3px 6px 0}#joystick{position:absolute;transform:translate(-50%,-50%);width:106px;height:106px;z-index:2;pointer-events:none;opacity:.65;border:1.5px solid #8d947d;border-radius:50%;background:#e1e3d333;box-shadow:inset 0 2px 8px #51583816;touch-action:none}#joystick::after{content:'';position:absolute;inset:9px;border:1px dashed #aeb49e;border-radius:50%;pointer-events:none}.axis{position:absolute;background:#b3bba5}.horizontal{left:9px;right:9px;top:50%;height:1px}.vertical{top:9px;bottom:9px;left:50%;width:1px}#knob{position:absolute;left:calc(50% - 22px);top:calc(50% - 22px);width:44px;height:44px;border-radius:50%;background:#71866a;border:2px solid #405638;box-shadow:0 4px 0 #40563850,inset 0 2px 2px #b8c7a2;pointer-events:none;will-change:transform}.control-copy{min-width:0;flex:1;display:flex;flex-direction:column;gap:6px}.control-copy>b{font-size:12px}.control-copy>span{font-size:10px;color:var(--muted);white-space:nowrap}.control-buttons{display:flex;gap:7px}.control-buttons button{font-size:11px;padding:0 12px;flex:1;white-space:nowrap}
.overlay{position:fixed;inset:0;background:#2d352e86;display:flex;align-items:center;justify-content:center;padding:max(14px,env(safe-area-inset-top)) 18px max(14px,env(safe-area-inset-bottom));z-index:10;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.panel{width:min(100%,380px);max-height:100%;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;background:var(--white);border:2px solid var(--ink);border-radius:10px;box-shadow:5px 7px 0 #2d352e66;padding:24px 22px}.eyebrow{font-size:10px;letter-spacing:2px;color:#8a7656;font-weight:700;margin-bottom:10px}.panel h2{font-size:29px;font-weight:900;letter-spacing:-1px}.panel .intro{font-size:12px;line-height:1.8;color:#68715e;margin-top:9px}.hero-art{display:flex;align-items:center;justify-content:center;gap:19px;margin:18px 0}.hero-art svg{width:58px;height:62px}.hero-art span{font-size:20px;color:#a17c3c}.mini-icon{width:29px;height:30px;flex-shrink:0}.guide{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0}.guide>div{display:flex;align-items:center;gap:8px;padding:8px 5px;border-bottom:1px solid #dcdcc9;font-size:11px;line-height:1.65}.guide small{display:block;color:var(--muted);font-size:9px}.primary{display:block;width:100%;background:var(--accent);border:2px solid #813e29;color:#fff8e8;font-size:15px;font-weight:800;box-shadow:0 3px 0 #813e29;min-height:48px;margin-top:17px}.fine{font-size:10px;color:#7b806e;line-height:1.65;margin-top:13px;text-align:center}.choices{display:grid;gap:10px;margin-top:20px}.choice{display:flex;align-items:center;text-align:left;padding:13px 12px;gap:13px;min-height:76px}.choice:hover{background:#e8edda}.choice b{display:block;font-size:15px}.choice small{display:block;margin-top:6px;font-size:11px;color:var(--muted)}.choice svg{width:37px;height:40px}.income{margin:20px 0 15px;padding:16px;border-top:1px dashed #9a9e88;border-bottom:1px dashed #9a9e88;text-align:center}.income small{display:block;font-size:11px;color:var(--muted)}.income strong{font-size:38px;line-height:1.5;color:#98652e;font-variant-numeric:tabular-nums}.stats{display:grid;grid-template-columns:1fr 1fr;gap:11px 20px}.stats div{display:flex;justify-content:space-between;font-size:11px;color:#6c735e}.stats b{color:var(--ink)}
@media(max-height:680px){.shell{gap:6px;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(5px,env(safe-area-inset-bottom))}header{padding-bottom:6px}h1{font-size:23px}header p{font-size:9px;margin-top:3px}.hud-line{font-size:10px;margin-bottom:3px}.pressure-label{margin-top:5px}.track{height:7px}.controls{height:82px;gap:12px;padding-top:2px}#joystick{width:90px;height:90px}.control-copy>b{font-size:11px}.control-copy>span{font-size:9px}.control-buttons button{padding:0 8px}.panel{padding:16px}.panel h2{font-size:25px}.hero-art{margin:10px 0}.hero-art svg{height:45px}.guide{margin:10px 0;gap:4px}.guide>div{padding:5px}.panel .intro{font-size:11px}.fine{font-size:9px;margin-top:10px}.primary{margin-top:12px}.eyebrow{margin-bottom:6px}}
@media(prefers-reduced-motion:reduce){.track i{transition:none}}
/* V0.2: same Canvas artwork in the introductory legend. */
.hero-art img{width:64px;height:73px;object-fit:contain}.guide .mini-icon{width:38px;height:40px}.guide>div{gap:5px}.control-copy>span{font-size:9px}
@media(max-height:680px){.hero-art img{width:51px;height:58px}.hero-art{gap:12px}.guide .mini-icon{width:32px;height:34px}.guide small{font-size:8.5px}.guide>div{font-size:10px}}

/* Head-anchored speech; ordinary notices have a separate, fixed control hint slot. */
#boss-speech{position:absolute;top:auto;left:50%;transform:translateX(-50%);width:max-content;max-width:92%;padding:4px 8px;border:1px solid #a29b80;border-radius:7px;background:#fff8e8f5;color:#565640;font-size:11px;line-height:1.3;text-align:center;pointer-events:none;box-sizing:border-box}
#boss-speech:empty{display:none}.hero-art{flex-wrap:wrap;max-width:280px;margin-inline:auto;gap:0}.hero-art img{width:44px;height:54px;object-fit:contain}

.control-buttons{gap:5px}.control-buttons button{min-width:44px;padding:0 5px;font-size:10px}#bgm{display:none}

/* V0.4: fixed-height delivery row never shifts the arena on tier changes. */
.combo-row{display:flex;justify-content:space-between;align-items:center;gap:6px;height:23px;padding:4px 1px 0;font-size:10px}.combo-row b{transform-origin:left center;color:#8b6528;white-space:nowrap}.combo-row span{font-size:9px;color:#6c795b;white-space:nowrap}.combo-row .broken{color:#a14f3c}
@media(max-width:350px){.combo-row{font-size:9px}.combo-row span{font-size:8px}}

#boss-speech::after{content:'';position:absolute;left:calc(50% - 4px);bottom:-5px;width:7px;height:7px;background:#fff8e8;border-right:1px solid #a29b80;border-bottom:1px solid #a29b80;transform:rotate(45deg);pointer-events:none}
.action-hint{position:relative;height:13px;flex-shrink:0;min-width:0;font-size:9px;line-height:13px;color:var(--muted)}
.action-hint>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
