:root{--ink:#232438;--bg:#1b2031;--paper:#fff4d8;--yellow:#ffca43;--coral:#ff755c;--mint:#86ddc1;--line:#44495b;font-family:"Trebuchet MS","PingFang HK","Microsoft JhengHei",sans-serif;color:var(--paper);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-height:100vh;background:radial-gradient(circle at 1px 1px,#ffffff0e 1px,transparent 1.3px) 0 0/8px 8px,var(--bg)}button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #50ccef;outline-offset:4px}button:active{translate:0 2px}#shell{max-width:1230px;margin:auto;padding:0 clamp(18px,5vw,72px) 30px}.nav{display:flex;align-items:center;justify-content:space-between;min-height:78px;border-bottom:1px solid var(--line);gap:12px}.brand{display:flex;align-items:center;gap:11px;font-family:ui-monospace,monospace;font-weight:1000;font-size:clamp(14px,1.7vw,20px);letter-spacing:.5px}.brandmark{color:var(--ink);display:grid;place-items:center;background:var(--yellow);border-radius:3px;width:32px;height:32px;font-size:25px;line-height:1}.tools{display:flex;align-items:center;gap:14px}.tools button,#pause{background:transparent;color:#edeadf;border:1px solid #677082;font-size:13px;font-weight:700;border-radius:4px;min-height:38px;padding:0 10px}.tools .textbtn{border:0;color:#c0c6cf}.snd-symbol{font:900 14px monospace;color:var(--yellow);margin-right:6px}
main{margin-top:clamp(20px,4vh,44px)}.ticket{overflow:hidden;position:relative;background:var(--paper);color:var(--ink);border:3px solid var(--ink);box-shadow:6px 7px 0 #0e101a;border-radius:4px}.ticket-stripe{height:10px;background:repeating-linear-gradient(-50deg,var(--ink) 0 11px,var(--yellow) 11px 23px);border-bottom:2px solid var(--ink)}.ticket-body{position:relative;isolation:isolate;display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:440px;overflow:hidden;background:radial-gradient(ellipse at 77% 52%,#ffe8a7 0%,#fff2d3 48%,var(--paper) 72%)}.headingcol{position:relative;z-index:1;padding:clamp(28px,4.6vw,60px) 0 clamp(30px,4vw,54px) clamp(22px,4.6vw,62px)}.genre{display:flex;align-items:center;gap:9px;margin:0 0 22px;font-size:14px;font-weight:900;letter-spacing:1.8px}.genre i{background:var(--coral);display:inline-block;width:11px;height:11px;border:2px solid var(--ink);box-shadow:2px 2px 0 var(--ink)}h1{margin:0;line-height:0}canvas{image-rendering:pixelated}#wordmark{width:100%;height:auto;max-width:535px}.pitch{font-size:clamp(16px,1.5vw,20px);line-height:1.57;letter-spacing:.3px;margin:17px 0 21px}.pitch strong{font-weight:850}.big-btn,.actionMain{font-weight:900;border:3px solid var(--ink);background:var(--coral);color:var(--ink);box-shadow:4px 4px 0 var(--ink);border-radius:2px;font-size:18px;min-height:52px;padding:9px 28px;display:inline-flex;align-items:center;justify-content:center;gap:12px}.big-btn:hover,.actionMain:hover{background:#ff9676}.big-btn:active,.actionMain:active{box-shadow:2px 2px 0 var(--ink)}.playmark{width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:12px solid var(--ink)}.artcol{position:relative;display:grid;place-items:center;margin-left:-5%;padding:12px 2% 8px 0;align-self:stretch}#cover{width:100%;height:auto;max-height:510px;object-fit:contain}.stub{border-top:2px dashed #827866;display:flex;justify-content:space-between;align-items:center;padding:11px clamp(18px,4.5vw,60px);background:#f3e7c8}.stubtext,.stamp{display:flex;align-items:center;gap:12px;font:800 12px ui-monospace,monospace;letter-spacing:1.6px}.barcode{width:60px;height:19px;background:repeating-linear-gradient(90deg,var(--ink) 0 2px,transparent 2px 4px,var(--ink) 4px 5px,transparent 5px 9px,var(--ink) 9px 13px,transparent 13px 15px)}.stamp{color:#6f6557}.below{display:flex;align-items:center;gap:38px;margin-top:26px;padding:0 2px}.instruction{display:flex;align-items:center;gap:12px}.instruction b,.best b{display:block;font-size:16px}.instruction small,.best small{display:block;color:#b5bdc9;font-size:13px;margin-top:3px}.key{display:grid;place-items:center;width:39px;height:39px;border:1px solid #727b86;box-shadow:0 3px 0 #101421;border-radius:6px;color:var(--mint);font-size:25px}.punchkey{color:var(--coral)}.best{margin-left:auto;text-align:right}.best b{color:var(--yellow);margin-top:3px;font:800 16px ui-monospace,monospace}.touchHelp{display:none!important}
#arena{width:100%;margin:auto;user-select:none;-webkit-user-select:none}.hud{display:flex;align-items:center;gap:clamp(18px,5vw,55px);padding:10px 16px;background:var(--paper);color:var(--ink);border:3px solid #101322;border-bottom:0}.floor{font:900 24px ui-monospace,monospace;background:var(--yellow);border:2px solid var(--ink);padding:4px 9px;box-shadow:2px 2px var(--ink);white-space:nowrap}.hud-stat{display:flex;flex-direction:column;gap:2px}.hud-stat small{font-size:12px;font-weight:800}.hud-stat b{font:900 22px ui-monospace,monospace;font-variant-numeric:tabular-nums}.hud-stat b.urgent{color:#b33129}#pause{margin-left:auto;color:var(--ink);border:2px solid var(--ink);font-size:19px;min-width:38px}.field{position:relative;border:3px solid #101322;height:min(65vh,620px);min-height:290px;background:#302638;overflow:hidden;touch-action:none}#game{display:block;width:100%;height:100%;touch-action:none}.playfoot{display:flex;justify-content:space-between;gap:12px;font-size:14px;letter-spacing:.2px;color:#c6ccd3;padding-top:12px}#stickArea{position:absolute;inset:0;touch-action:none}#attack{display:none;position:absolute;z-index:1;bottom:20px;right:20px;border:3px solid var(--ink);box-shadow:3px 4px var(--ink);background:#ff805eeb;color:var(--ink);border-radius:50%;width:74px;height:74px;font-size:16px;font-weight:900;touch-action:none;line-height:1}#attack span{display:block;font:900 26px monospace}#attack.down{transform:translate(2px,2px);background:#ffb852;box-shadow:1px 1px var(--ink)}#notice{position:absolute;left:50%;top:12px;transform:translateX(-50%);pointer-events:none;padding:7px 14px;white-space:nowrap;background:var(--ink);color:var(--yellow);font-weight:850;border:2px solid var(--yellow);font-size:14px;display:none}
dialog{width:min(400px,90vw);padding:0;background:var(--paper);color:var(--ink);border:3px solid var(--ink);box-shadow:7px 8px 0 #111421;border-radius:3px}dialog::backdrop{background:#111728b8;backdrop-filter:blur(3px)}.dialogInner{padding:28px;border-top:9px solid var(--yellow)}#modalTag{font:900 12px ui-monospace,monospace;letter-spacing:2px;color:#725633}h2{font-size:29px;margin:8px 0 14px}#modalBody{font-size:16px;line-height:1.65}#modalBody p{margin:5px 0}#modalBody a{color:#325778;text-decoration-thickness:2px}.actions{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0 4px}.actionMain{font-size:16px;min-height:42px;padding:7px 16px}.actionAlt{background:transparent;border:0;color:var(--ink);font-size:15px;text-decoration:underline}
@media(pointer:coarse){.deskHelp{display:none!important}.touchHelp{display:block!important}#attack{display:block}}
@media(max-width:690px){#shell{padding:0 14px 22px}.nav{min-height:55px}.brandmark{width:25px;height:25px;font-size:21px}.brand{gap:7px}.tools{gap:2px}.tools button{font-size:12px;padding:0 6px;min-height:32px}.ticket-stripe{height:8px}main{margin-top:16px}.ticket-body{display:flex;flex-direction:column;min-height:0}.headingcol{align-self:stretch;padding:23px 23px 0}.genre{font-size:12px;letter-spacing:1px;margin-bottom:10px}#wordmark{width:min(100%,390px)}.pitch{font-size:15px;line-height:1.45;margin:10px 0 0}.pitch br{display:none}.pitch strong{margin-left:4px}.artcol{margin:0;align-self:center;width:85%;height:clamp(138px,22vh,228px);padding:0;order:1}.artcol #cover{display:block;width:100%;height:100%;object-fit:contain}.headingcol{display:contents}.genre,h1,.pitch{align-self:stretch;margin-left:20px;margin-right:16px}.genre{margin-top:18px}h1{align-self:flex-start;width:80%}.big-btn{order:0;align-self:stretch;margin:15px 20px 4px;min-height:52px;padding:8px 12px}.stub{padding:8px 20px}.barcode{height:14px}.stubtext,.stamp{font-size:10px}.below{gap:13px;margin-top:16px}.instruction{gap:7px}.instruction b,.best b{font-size:14px}.instruction small,.best small{font-size:11px}.key{width:30px;height:30px;font-size:19px}.hud{gap:16px;padding:7px 9px}.hud-stat b{font-size:18px}.floor{font-size:19px}.field{height:calc(100dvh - 190px);min-height:280px}.playfoot{font-size:11px;gap:5px}.playing main{margin-top:10px}}
@media(max-height:530px) and (orientation:landscape){.playing .nav,.playing .playfoot{display:none}.playing main{margin-top:0}.field{height:calc(100dvh - 59px);min-height:160px}.hud{padding:3px 10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

#start{position:relative;z-index:2;touch-action:manipulation}
#start [lang=en]{line-height:1.1}
.start-label{font-size:14px;border-inline-start:1px solid currentColor;padding-inline-start:12px}
.artcol{pointer-events:none}
@media(max-height:525px) and (orientation:landscape){
  body:not(.playing) .nav{min-height:42px}
  body:not(.playing) main{margin-top:8px}
  .ticket-body{display:grid;grid-template-columns:1fr 1fr;min-height:0}
  .headingcol{display:block;padding:12px 0 16px 18px}
  .genre,h1,.pitch{margin-left:0;margin-right:0}
  .genre{margin-top:0;margin-bottom:6px}
  h1{width:100%;max-width:245px}
  .pitch{font-size:14px;margin:7px 0 9px}.pitch br{display:none}
  .big-btn{margin:0;min-height:44px;padding:7px 13px;font-size:16px;gap:8px}
  .artcol{max-height:210px;align-self:center}
  #cover{max-height:210px}
}

.hud-gate{margin-left:auto;display:grid;gap:2px;white-space:nowrap;color:#31584c}
.hud-gate span{font-size:12px;font-weight:800}
.hud-gate strong{font-size:16px;font-variant-numeric:tabular-nums}
#pause{margin-left:0}
@media(max-width:540px){
  .hud{gap:clamp(6px,2.3vw,14px);padding:7px}
  .hud-stat b{font-size:clamp(15px,4.2vw,18px)}
  .hud-gate span,.hud-stat small{font-size:11px}
  .hud-gate strong{font-size:14px}
  .floor{font-size:16px;padding:4px 6px}
  #pause{min-width:32px;padding:0 5px}
}

#tool-badge {
  position:absolute;bottom:10px;left:10px;pointer-events:none;
  background:#242738ed;color:#ffe5a0;border:2px solid #f4c972;
  padding:4px 9px;font:800 14px/1.3 "Trebuchet MS","PingFang HK",sans-serif;
  box-shadow:2px 2px #151525;
}
#notice { max-width:calc(100% - 12px);white-space:normal;text-align:center;overflow-wrap:anywhere; }
#attack-label { font:inherit; }
#modal.result-photo {
  width: min(92vw, 442px);width: min(92vw, 442px, max(240px, calc(80dvh - 80px)));
  max-height: calc(100dvh - 18px);border:0;box-shadow:none;overflow:auto;
  color:#fff4d8;background:transparent;
}
.result-photo::backdrop {background:#141725e8;backdrop-filter:blur(4px)}
.result-photo .dialogInner {border:0;padding:4px 5px 7px}
.result-photo #modalTag {display:none}
.result-photo #modalTitle {position:absolute;width:1px;height:1px;padding:0;margin:-1px;clip-path:inset(50%);overflow:hidden}
#souvenir-image {
  display:block;width:100%;height:auto;box-shadow:3px 4px 0 #0d101b;
  -webkit-touch-callout:default;user-select:auto;
}
.result-photo .actions {justify-content:center;align-items:center;gap:8px 12px;margin:14px 0 0}
.result-photo .actionMain,.result-photo #save-photo {
  display:inline-flex;align-items:center;justify-content:center;min-height:42px;
  border:2px solid #252638;border-radius:3px;padding:6px 12px;box-shadow:2px 2px 0 #0c111b;
  font-size:15px;font-weight:850;white-space:nowrap;line-height:1.35;
}
.result-photo #save-photo {background:var(--paper);color:var(--ink);text-decoration:none}
.result-photo #save-photo:hover {background:#ffe6a6}
.result-photo #save-photo:focus-visible {outline:3px solid #50ccef;outline-offset:2px}
.result-photo .actionAlt {color:var(--paper);padding:6px 0;font-size:14px;min-height:36px}
@media (max-height:490px) and (orientation:landscape) {
  #modal.result-photo {width:min(88vw,600px)}
  .result-photo .dialogInner {display:flex;align-items:center;justify-content:center;gap:18px}
  .result-photo #modalBody {width:min(45vw,calc(80dvh - 24px))}
  .result-photo .actions {flex-direction:column;margin:0}
}
.photo-hint{width:100%;margin:0;color:#e7e2d9;font-size:13px;text-align:center}
.photo-hint:empty{display:none}

#boss-board-near {
  position: absolute; z-index: 1; bottom: 12px; left: 50%; transform: translateX(-50%);
  min-height: 42px; padding: 5px 13px; border: 2px solid var(--ink); border-radius: 2px;
  color: var(--ink); background: var(--yellow); box-shadow: 2px 3px var(--ink);
  font: inherit; font-size: 14px; font-weight: 850; touch-action: manipulation; white-space: nowrap;
}
#boss-board-near kbd { margin-right: 6px; font: bold 12px monospace; }
@media (pointer:coarse) { #boss-board-near kbd { display: none; } }
