/* KWONMO — 잿불 주조소 아케이드 화면 */
:root { color-scheme:dark; font-family:"Malgun Gothic",system-ui,sans-serif; color:#f8ead2; background:#140f13 }
* { box-sizing:border-box }
body { margin:0; min-height:100dvh; background:radial-gradient(ellipse at top,#332329,#140f13 72%) }
.cabinet { max-width:80rem; margin:auto; padding:clamp(.35rem,1.5vw,1.2rem) }
.mast,.readout,footer,.identity,.switches {display:flex; align-items:center; justify-content:space-between; gap:.6rem}
.mast {padding:.45rem 0 .8rem}
.identity {justify-content:flex-start}.identity b, .overline, footer span,.gauge label,#stock {font-family:Consolas,"Malgun Gothic",monospace}
.identity b {letter-spacing:.12em; font-size:clamp(.8rem,2.4vw,1.28rem)}
.identity span {font-weight:bold; color:#d0b6a2; border-left:.08rem solid #745950; padding-left:.6rem; font-size:.82rem}
.kiln {display:inline-block;width:1.5rem;height:1.35rem;background:repeating-linear-gradient(90deg,#ffa660 0 19%,#593432 20% 33%);clip-path:polygon(15% 25%,31% 25%,31% 0,69% 0,69% 25%,85% 25%,100% 100%,0 100%)}
button {font:inherit;cursor:pointer;touch-action:manipulation;color:inherit;font-weight:bold}
button:focus-visible, canvas:focus-visible {outline:.16rem solid #8ee8dc;outline-offset:-.18rem}
.switches button,.touch button {border:.08rem solid #694b44;background:#302527;padding:.42rem .7rem;font-size:.78rem;border-radius:.15rem}
button:disabled {opacity:.55;cursor:default}
.switches button[aria-pressed=true],.touch button:active {color:#ffbc70;border-color:#ffae58}
.viewport {position:relative; overflow:hidden; border:.1rem solid #715040; box-shadow:0 .45rem 1.8rem #0a0708; background:#271e27}
canvas {width:100%;height:auto;display:block;image-rendering:pixelated}
.hud {position:absolute;pointer-events:none;inset:3% 2.3% auto;display:flex;justify-content:space-between;align-items:start}
.gauge {display:grid;min-width:14%;gap:.2rem;text-shadow:0 .12rem .18rem #000}
.gauge.enemy {width:34%;text-align:right}
.gauge label {font-weight:900;font-size:clamp(.62rem,1.3vw,.9rem);color:#fff4cb;letter-spacing:.1em}
.enemy label span {margin-left:.4em;color:#e5d4be;font-size:.85em}
meter {width:100%;height:clamp(.42rem,1.3vw,.75rem);appearance:none;border:.13rem solid #70493e;background:#23191d;box-shadow:0 0 0 .1rem #20181b}
meter::-webkit-meter-bar{background:#251c22;border:0;border-radius:0;height:100%}
meter::-webkit-meter-optimum-value{background:#6de3cf}
.enemy meter::-webkit-meter-optimum-value{background:linear-gradient(90deg,#a43632,#ff9155)}
.panel {position:absolute;left:4%;top:24%;width:44%;color:#fff3d5;isolation:isolate;text-shadow:0 .1rem .35rem #1a0f14}
.panel::before {content:"";position:absolute;z-index:-1;inset:-22% -16% -20% -20%;background:radial-gradient(ellipse at 30% 55%,#1c1119f5 9%,#1c1119d9 46%,transparent 75%);pointer-events:none}
.stripe {width:2.8rem;height:.25rem;background:repeating-linear-gradient(110deg,#ffb258 0 .38rem,transparent .4rem .56rem)}
.overline {font-size:clamp(.60rem,1.35vw,.95rem);letter-spacing:.13em;margin:.55em 0;color:#ffc180;font-weight:bold}
h1 {font-size:clamp(1.35rem,5.8vw,4.6rem);font-weight:950;letter-spacing:-.08em;line-height:1.05;margin:.08em 0}
#message {margin:.7em 0 .9em;max-width:24em;line-height:1.55;font-size:clamp(.67rem,1.55vw,1.05rem);word-break:keep-all}
#start {background:#ffc47a;border:0;border-bottom:.22rem solid #9f583c;color:#301c21;padding:.58em 1.3em;font-size:clamp(.78rem,1.7vw,1.12rem)}
.readout {padding:.65rem .75rem;border-bottom:.08rem solid #563c39;background:#241b20;font-size:.82rem}
#objective::before {content:"";display:inline-block;width:.42rem;height:.42rem;margin-right:.55rem;background:#ffab5b;transform:rotate(45deg)}
#stock {color:#ffcb89;white-space:nowrap}
footer {font-size:.76rem;color:#baa99e;padding:.8rem .1rem}
footer span {font-weight:bold;color:#b49a83;letter-spacing:.08em}
kbd {font:inherit;color:#f4dbc5;border:.08rem solid #624d49;padding:.02rem .24rem;border-radius:.15rem;margin-right:.14rem}
.touch {display:none}
[hidden] {display:none!important}
@media(pointer:coarse),(max-width:650px){
.touch {display:grid;grid-template-columns:1fr 1fr 1.3fr 1.4fr 1.4fr;gap:.3rem;margin-top:.55rem;user-select:none}
.touch button {touch-action:none;min-height:2.8rem}.touch button:last-child {background:#754331;color:#fff0d5}
footer>div,.identity span {display:none}footer{justify-content:flex-end;font-size:.65rem}
.mast {padding:.3rem 0 .5rem}.switches{gap:.24rem}.switches button{padding:.35rem .42rem;font-size:.66rem}
.readout {font-size:.69rem;padding:.48rem .3rem}.panel {top:20%;width:49%}
}
@media(max-width:480px){.stripe{display:none}.panel{top:20%}.overline{margin:.1em 0}#message{margin:.25em 0 .5em;font-size:.64rem}#start{padding:.34em 1em}.readout{align-items:flex-start}.hud{inset:2% 2% auto}}
