:root{color-scheme:light}
body{margin:0;background:#fffdf6;color:#272219}
.g-sky-hop{--ink:#272219;--paper:#fffdf6;--cream:#fff9ed;--yellow:#f8d84a;--red:#d54830;--muted:#857456;box-sizing:border-box;max-width:520px;margin:0 auto;padding:20px 16px 18px;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Noto Sans SC",sans-serif;font-size:14px;line-height:1.5}
.g-sky-hop *,.g-sky-hop *::before,.g-sky-hop *::after{box-sizing:border-box}
.g-sky-hop button{font:inherit;cursor:pointer}
.g-sky-hop button:focus-visible,.g-sky-hop canvas:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.hop-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.hop-eyebrow{color:#89785f;font:9px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:1.5px}
.g-sky-hop h1{font-size:26px;letter-spacing:-.5px;margin:4px 0 0;font-weight:800;line-height:1.2}
.g-sky-hop h1 span{margin-left:10px;font:9px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:2px;color:#89785f;font-weight:400}
.hop-tag{font-size:11px;font-weight:700;background:#f3a6bf;border:2px solid var(--ink);box-shadow:2px 2px var(--ink);padding:5px 9px;transform:rotate(3deg);white-space:nowrap}
.hop-stage{position:relative;max-width:480px;margin:0 auto;border:2px solid var(--ink);box-shadow:4px 4px var(--ink);background:var(--cream);overflow:hidden;container-type:inline-size}
.hop-stage canvas{display:block;width:100%;height:auto;aspect-ratio:3/4;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;cursor:pointer}
.hop-hud{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:flex-start;padding:14px 16px;pointer-events:none}
.hop-hud small{display:block;font-size:10px;letter-spacing:1px;color:var(--muted);font-weight:600}
.hop-score strong{display:block;font:800 46px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:-2px;margin-top:2px}
.hop-score em{display:inline-block;margin-top:6px;font-style:normal;font-size:11px;font-weight:700;background:var(--yellow);border:1.5px solid var(--ink);box-shadow:2px 2px var(--ink);padding:2px 7px}
.hop-score em[hidden]{display:none}
.hop-best{text-align:right;background:var(--paper);border:2px solid var(--ink);box-shadow:2px 2px var(--ink);padding:5px 10px}
.hop-best strong{font:700 18px/1.1 ui-monospace,SFMono-Regular,Menlo,monospace}
.hop-overlay{position:absolute;inset:0;display:grid;place-items:center;padding:20px;background:#fff9ed99}
.hop-overlay[hidden]{display:none}
.hop-card{width:100%;max-width:320px;padding:22px 18px;text-align:center;background:var(--paper);border:2px solid var(--ink);box-shadow:5px 5px var(--ink)}
.hop-card .hop-eyebrow{color:#a14027}
.hop-card h2{font-size:28px;font-weight:800;letter-spacing:-.5px;line-height:1.3;margin:12px 0}
.hop-card p{font-size:12px;color:var(--muted);line-height:1.8;margin:0 0 18px}
.hop-card>small{display:block;font-size:10px;color:var(--muted);margin-top:14px}
.hop-primary{min-height:46px;width:220px;max-width:100%;border:2px solid var(--ink);border-radius:0;box-shadow:3px 3px var(--ink);background:var(--yellow);color:var(--ink);padding:10px 16px;text-align:left;font-weight:700;font-size:15px}
.hop-primary span{float:right}
.hop-primary:hover{background:#fbe882}
.hop-primary:active{transform:translate(2px,2px);box-shadow:1px 1px var(--ink)}
.hop-final{display:flex;flex-direction:column;align-items:center;gap:2px;margin:4px 0 6px}
.hop-final span{font-size:11px;color:var(--muted)}
.hop-final strong{font:800 56px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:-2px}
.hop-badge{margin-top:6px;font-size:12px;background:var(--red);color:#fff;border:2px solid var(--ink);box-shadow:2px 2px var(--ink);padding:2px 9px;transform:rotate(-4deg)}
.hop-badge[hidden]{display:none}
.hop-hint{text-align:center;font-size:11px;color:var(--muted);margin:16px 0 0}
.hop-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@container (max-width:360px){
  .hop-score strong{font-size:38px}
  .hop-card{padding:16px 12px}
  .hop-card h2{font-size:23px;margin:8px 0}
  .hop-card p{font-size:11px;margin-bottom:14px}
  .hop-final strong{font-size:46px}
}
@media (max-width:420px){
  .g-sky-hop{padding:14px 10px}
  .g-sky-hop h1{font-size:22px}
  .g-sky-hop h1 span{display:block;margin:3px 0 0;font-size:8px}
  .hop-tag{font-size:10px;padding:4px 7px}
}
@media (prefers-reduced-motion:reduce){
  .hop-primary:active{transform:none}
  .hop-tag,.hop-badge{transform:none}
}

/* Desktop: host >= 900px (set by game.mjs). Stage on the left sized to the viewport height,
   title and hint in a 300px side column. Phones never get data-wide, so they are unchanged. */
.g-sky-hop[data-wide="true"]{max-width:none;display:grid;grid-template-columns:var(--stage-w,480px) 300px;grid-template-rows:auto 1fr;column-gap:40px;justify-content:center;align-items:start;padding:24px 28px 22px}
.g-sky-hop[data-wide="true"] .hop-stage{grid-column:1;grid-row:1/3;width:var(--stage-w,480px);max-width:none;margin:0}
.g-sky-hop[data-wide="true"] .hop-heading{grid-column:2;grid-row:1;flex-direction:column;align-items:flex-start;gap:14px;margin:8px 0 0}
.g-sky-hop[data-wide="true"] h1{font-size:34px}
.g-sky-hop[data-wide="true"] h1 span{display:block;margin:6px 0 0;font-size:10px}
.g-sky-hop[data-wide="true"] .hop-tag{font-size:13px;padding:7px 12px}
.g-sky-hop[data-wide="true"] .hop-hint{grid-column:2;grid-row:2;text-align:left;font-size:13px;line-height:1.9;margin:22px 0 0;padding-top:16px;border-top:1.5px dashed #cdbd9e}
.g-sky-hop[data-wide="true"] .hop-hud{padding:max(14px,3cqw) max(16px,3.4cqw)}
.g-sky-hop[data-wide="true"] .hop-hud small{font-size:max(10px,2.1cqw)}
.g-sky-hop[data-wide="true"] .hop-score strong{font-size:max(46px,9.6cqw)}
.g-sky-hop[data-wide="true"] .hop-score em{font-size:max(11px,2.3cqw)}
.g-sky-hop[data-wide="true"] .hop-best strong{font-size:max(18px,3.75cqw)}
.g-sky-hop[data-wide="true"] .hop-card{max-width:max(320px,62cqw);padding:max(22px,4.6cqw) max(18px,3.8cqw)}
.g-sky-hop[data-wide="true"] .hop-card h2{font-size:max(28px,5.8cqw)}
.g-sky-hop[data-wide="true"] .hop-card p{font-size:max(12px,2.5cqw)}
.g-sky-hop[data-wide="true"] .hop-card>small{font-size:max(10px,2.1cqw)}
.g-sky-hop[data-wide="true"] .hop-final strong{font-size:max(56px,11.6cqw)}
.g-sky-hop[data-wide="true"] .hop-primary{width:max(220px,44cqw);min-height:max(46px,9.6cqw);font-size:max(15px,3.1cqw)}
