/* Dusk Duel — the interface. The colours are variables; change them here. */
:root { --ink: #170f24; --paper: #fff6ea; --hot: #ff6a3d; --hot2: #ffb061; --font: ui-rounded, 'SF Pro Rounded', 'Avenir Next', 'Segoe UI', system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #150d22; font-family: var(--font); color: var(--paper); touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
canvas#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
button { font-family: var(--font); border: 0; cursor: pointer; color: inherit; }
section { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; pointer-events: none; }
section > *, section button { pointer-events: auto; }
#title { justify-content: flex-end; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
.logo { position: absolute; top: calc(9vh + env(safe-area-inset-top)); left: 50%; width: max-content; margin: 0; transform: translateX(-50%) rotate(-3deg); text-align: center; line-height: 0.84; font-weight: 900; pointer-events: none; }
.logo span { display: block; font-size: clamp(34px, 11vmin, 76px); letter-spacing: 6px; color: var(--paper); text-shadow: 0 4px 0 var(--ink); }
.logo b { display: block; font-size: clamp(64px, 22vmin, 150px); letter-spacing: -2px; background: linear-gradient(180deg, #ffe7b0, var(--hot2) 50%, var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 var(--ink)); }
.col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
button.big { min-width: min(70vw, 280px); padding: 15px 26px; border-radius: 20px; font-weight: 900; font-size: 26px; letter-spacing: 1px; text-transform: uppercase; color: #fff; background: linear-gradient(180deg, var(--hot2), var(--hot)); box-shadow: 0 7px 0 #a8351a, 0 14px 26px rgba(10, 4, 20, 0.45); text-shadow: 0 2px 0 rgba(120, 30, 10, 0.6); }
button.big:active { transform: translateY(5px); box-shadow: 0 2px 0 #a8351a; }
button.big.small { min-width: 180px; font-size: 20px; padding: 12px 22px; border-radius: 16px; }
button.pill-btn { padding: 11px 20px; border-radius: 999px; font-weight: 800; font-size: 16px; background: rgba(23, 15, 36, 0.72); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
button.pill-btn:active { transform: translateY(2px); box-shadow: none; }
#pick { background: rgba(23, 15, 36, 0.55); pointer-events: auto; }
#pick h2 { margin: 0; font-size: 26px; font-weight: 900; }
#pick p { margin: 0; font-weight: 700; opacity: 0.9; min-height: 1.3em; text-align: center; }
.roster { display: grid; grid-template-columns: repeat(4, minmax(64px, 96px)); gap: 10px; }
.roster button { aspect-ratio: 3 / 4; border-radius: 16px; background: rgba(23, 15, 36, 0.8); border: 3px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 6px; font-weight: 800; font-size: 14px; }
.roster button i { display: block; width: 56%; aspect-ratio: 1; border-radius: 50%; margin-bottom: 2px; }
.roster button.on { border-color: var(--paper); transform: translateY(-3px); }
#wait, #result { background: rgba(23, 15, 36, 0.55); pointer-events: auto; }
.panel { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 26px 24px; border-radius: 24px; background: var(--paper); color: var(--ink); min-width: min(84vw, 320px); max-width: 92vw; box-shadow: 0 10px 0 rgba(10, 4, 20, 0.4); text-align: center; }
.panel h2 { margin: 0; font-size: 28px; font-weight: 900; }
.panel p { margin: 0; font-weight: 700; }
.panel .pill-btn { color: var(--paper); }
#how { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 16px; border-radius: 14px; background: rgba(23, 15, 36, 0.78); font-weight: 800; font-size: 14px; line-height: 1.5; text-align: center; pointer-events: none; max-width: 92vw; }
@media (orientation: landscape) and (max-height: 520px) {
  .logo { top: calc(4vh + env(safe-area-inset-top)); } .logo span { font-size: clamp(22px, 9vh, 40px); } .logo b { font-size: clamp(44px, 24vh, 96px); }
  #title .col { flex-direction: row; flex-wrap: wrap; justify-content: center; } button.big { min-width: 200px; font-size: 22px; padding: 11px 22px; }
  #pick { gap: 8px; } .roster { grid-template-columns: repeat(4, minmax(56px, 78px)); }
}
/* upright, the fight is in the top half: the line that says how it is played sits under it, clear of the thumbs */
@media (orientation: portrait) { #how { bottom: auto; top: 56%; transform: translate(-50%, -50%); } }
