/* Skein — chrome. Same family as /strand/, /orb/ and /onecoast/: one canvas
   as large as the screen allows; a thin HUD above; the trace and its
   buttons below. */
:root {
  --bg: #06080d; --surface: #121826; --border: #233049; --text: #e8eef6; --dim: #8a98b0;
  --accent: #e8b65a; --blue: #7ebaff;
  --mono: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overscroll-behavior: none; }
#app { height: 100vh; height: 100dvh; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: max(10px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom)); }
#hud { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--mono); }
.left, .right { display: flex; gap: 6px; align-items: center; }
.tab, .tog, select {
  font-family: var(--mono); font-size: 12px; padding: 7px 9px; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--dim); border: 1px solid var(--border);
}
select { background: var(--surface); color: var(--text); padding: 7px 4px; }
.tab.on, .tog.on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
#clue { width: 100%; font-family: var(--mono); font-size: 14px; color: var(--dim); text-align: center; margin-top: 4px; }
#clue .k { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; margin-right: 6px; }
#clue b { color: var(--text); font-size: 17px; }
#stat { width: 100%; display: flex; justify-content: center; gap: 16px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
#stat b { color: var(--text); font-size: 15px; }
#span-state.got { color: var(--accent); }
#orb { flex: 1; width: 100%; min-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; display: block; }
#word { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: 0.12em; min-height: 1.3em; color: var(--accent); }
#note { font-family: var(--mono); font-size: 12px; color: var(--dim); min-height: 1.4em; text-align: center; }
#note.good { color: var(--blue); } #note.gold { color: var(--accent); } #note.warn { color: #ff9a7a; }
.tray { width: 100%; display: flex; gap: 8px; align-items: stretch; justify-content: center; }
button.primary, button.ghost, button.hint {
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-align: center;
  padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; white-space: nowrap;
}
button.primary { background: var(--accent); color: #1a1206; border-color: var(--accent); min-width: 96px; }
button.ghost { background: transparent; color: var(--dim); }
button.ghost:hover { color: var(--text); border-color: var(--accent); }
button.hint { background: var(--surface); color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 110px; }
button.hint.ready { border-color: var(--blue); color: var(--blue); }
#hint-meter { display: flex; gap: 4px; }
#hint-meter u { width: 18px; height: 3px; border-radius: 2px; background: var(--border); text-decoration: none; }
#hint-meter u.on { background: var(--blue); }
button:disabled { opacity: 0.35; cursor: default; }
.foot { font-family: var(--mono); font-size: 11px; color: var(--dim); text-align: center; line-height: 1.6; margin: 0; }
.overlay { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px 16px; text-align: center; background: rgba(6,8,13,0.9); backdrop-filter: blur(3px); overflow-y: auto; }
.overlay[hidden] { display: none; }
.overlay h1 { font-family: var(--mono); font-size: clamp(26px, 8vw, 40px); margin: 0; color: var(--accent); }
.overlay h2 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); margin: 0; }
.overlay p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.65; max-width: 32em; }
.overlay p b { color: var(--text); }
.overlay .accent { color: var(--blue); }
.row { display: flex; gap: 10px; }
.row button { min-width: 120px; }
