:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fbff;
  background: #040712;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 12%, rgba(0, 218, 255, .16), transparent 28rem),
    radial-gradient(circle at 84% 8%, rgba(170, 59, 255, .2), transparent 30rem),
    linear-gradient(155deg, #050916 0%, #090d1c 56%, #040611 100%);
}

button { font: inherit; }
.game-shell { width: min(1180px, 100%); max-width: 100vw; margin: 0 auto; padding: clamp(14px, 2.6vw, 30px); overflow: hidden; }
.game-header, .score-strip, footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-lockup img { width: 54px; height: 54px; object-fit: contain; }
.brand-lockup h1 { margin: -2px 0 0; font-size: clamp(1.35rem, 4vw, 2.15rem); letter-spacing: .14em; font-style: italic; }
.eyebrow, .panel-tag { color: #75edff; font-size: .67rem; font-weight: 900; letter-spacing: .2em; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.trial-label { padding: 8px 10px; border: 1px solid rgba(125, 236, 255, .2); border-radius: 999px; color: #a9f7ff; font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.icon-button, .primary-button, .touch-controls button {
  border: 1px solid rgba(112, 224, 255, .4);
  border-radius: 10px;
  color: #f8fbff;
  background: rgba(13, 19, 39, .9);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.icon-button { padding: 10px 13px; }
.icon-button[aria-pressed="false"] { color: #8791a6; border-color: rgba(137, 146, 167, .25); }
.arcade-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 12px 15px;
  border: 1px solid rgba(130, 235, 255, .17);
  border-radius: 14px;
  background: rgba(7, 12, 28, .78);
}
.arcade-player { display: flex; align-items: center; gap: 11px; min-width: 0; }
.arcade-player > div { display: grid; gap: 2px; min-width: 0; }
.arcade-player strong, .arcade-player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arcade-player span { color: #8f9ab1; font-size: .74rem; }
.player-avatar, .leaderboard-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #05101a;
  background: linear-gradient(135deg, #7ef5e6, #7ac7ff);
  font-weight: 950;
}
.player-avatar { flex: 0 0 38px; width: 38px; height: 38px; }
.player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-button {
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid rgba(107, 232, 255, .34);
  border-radius: 9px;
  color: #a9f7ff;
  background: rgba(41, 67, 120, .34);
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-decoration: none;
}
.score-strip {
  margin: 20px 0 12px;
  padding: 12px clamp(10px, 3vw, 28px);
  border: 1px solid rgba(130, 235, 255, .17);
  border-radius: 14px;
  background: rgba(7, 12, 28, .8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.score-strip div { display: grid; flex: 1 1 0; min-width: 68px; text-align: center; }
.score-strip span { color: #8791a8; font-size: .61rem; font-weight: 800; letter-spacing: .14em; }
.score-strip strong { margin-top: 2px; font-size: clamp(1.15rem, 4vw, 1.8rem); font-variant-numeric: tabular-nums; }
.arena-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(84, 218, 255, .3);
  border-radius: 20px;
  background: #050817;
  box-shadow: 0 24px 80px rgba(0,0,0,.48), 0 0 44px rgba(0,205,255,.06), inset 0 0 0 1px rgba(255,255,255,.025);
}
canvas { display: block; width: 100%; max-width: 100%; height: auto; touch-action: none; user-select: none; }
.upgrade-status {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  max-width: calc(100% - 28px);
  padding: 8px 11px;
  border: 1px solid rgba(117, 237, 255, .26);
  border-radius: 999px;
  color: #a7f6ff;
  background: rgba(4, 9, 24, .84);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.05);
  font-size: .62rem;
  font-weight: 1000;
  letter-spacing: .12em;
  pointer-events: none;
  transition: color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.upgrade-status.active { color: var(--upgrade-colour, #fff); border-color: var(--upgrade-colour, #75edff); box-shadow: 0 0 24px color-mix(in srgb, var(--upgrade-colour, #75edff) 32%, transparent); }
.game-panel {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  width: min(590px, calc(100% - 30px));
  transform: translate(-50%, -50%);
  padding: clamp(22px, 5vw, 40px);
  text-align: center;
  border: 1px solid rgba(115, 227, 255, .28);
  border-radius: 18px;
  background: rgba(5, 9, 22, .94);
  box-shadow: 0 22px 70px rgba(0,0,0,.66), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(12px);
}
.game-panel h2 { margin: 9px 0; font-size: clamp(1.55rem, 4.5vw, 2.45rem); }
.game-panel > p { margin: 0 auto 14px; max-width: 480px; color: #bac4d9; line-height: 1.5; }
.split-guide { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; margin-bottom: 10px; color: #6beaff; }
.split-guide b { color: #65718b; }
.split-guide .w { display: inline-grid; place-items: center; border: 0; border-radius: 50%; color: transparent; background: url("../../branding/watchme-arcade-w-mark.png") center / contain no-repeat; font-size: 0; box-shadow: 0 0 16px rgba(87, 225, 255, .28); }
.split-guide .large { width: 50px; height: 50px; font-size: 1.55rem; }
.split-guide .medium { width: 37px; height: 37px; font-size: 1.05rem; }
.split-guide .small { width: 25px; height: 25px; font-size: .7rem; }
.key-guide { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 20px; color: #8f9cb4; font-size: .63rem; font-weight: 800; letter-spacing: .07em; }
.key-guide span { display: flex; align-items: center; gap: 4px; }
kbd { min-width: 25px; padding: 4px 6px; border: 1px solid rgba(124, 235, 255, .26); border-bottom-width: 3px; border-radius: 6px; color: #c3faff; background: rgba(93, 151, 214, .12); font-family: inherit; font-size: .61rem; }
.primary-button { padding: 14px 20px; border: 0; color: #030711; background: linear-gradient(110deg, #82f45b 0%, #55edcf 42%, #55d6ff 100%); box-shadow: 0 10px 30px rgba(75, 226, 211, .22); }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:focus-visible, .icon-button:focus-visible, .touch-controls button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hidden { display: none; }
.result-stats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.result-stats span { padding: 8px 10px; border: 1px solid rgba(113, 234, 255, .17); border-radius: 8px; color: #8996ad; background: rgba(255,255,255,.03); font-size: .67rem; }
.result-stats strong { display: block; color: #8ff7e5; font-size: 1rem; }
.earned-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.earned-badges span { padding: 5px 8px; border-radius: 999px; color: #04120f; background: #73efd5; font-size: .62rem; font-weight: 900; }
.submit-status { min-height: 1.2em; margin: 0 0 10px; color: #9ff7e7; font-size: .68rem; }
.callout { position: absolute; left: 50%; top: 15%; z-index: 2; transform: translate(-50%, -10px) scale(.95); opacity: 0; pointer-events: none; color: #fff; font-size: clamp(1.05rem, 4vw, 1.9rem); font-weight: 1000; font-style: italic; letter-spacing: .09em; text-shadow: 0 0 18px #16e5ff, 0 4px 0 rgba(0,0,0,.35); transition: opacity .16s ease, transform .2s ease; }
.callout.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.danger-flash { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px 18px rgba(255, 41, 119, 0); transition: box-shadow .12s ease; }
.danger-flash.show { box-shadow: inset 0 0 70px 18px rgba(255, 41, 119, .42); }
.touch-controls { display: none; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; margin-top: 10px; touch-action: none; }
.touch-controls button { min-height: 54px; padding: 10px; }
.touch-controls .fire-button { border-color: rgba(139, 252, 214, .55); color: #07111b; background: linear-gradient(115deg, #7ef3d1, #62ddff); box-shadow: 0 8px 26px rgba(77, 225, 215, .18); }
.touch-controls button.active { transform: translateY(2px); filter: brightness(1.2); }
.leaderboard-card {
  margin-top: 14px;
  padding: 20px 17px;
  border: 1px solid rgba(79, 212, 255, .22);
  border-radius: 20px;
  background: rgba(6, 10, 25, .86);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}
.leaderboard-card h2 { margin: 7px 0 17px; font-size: 1.15rem; }
.leaderboard-card ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.leaderboard-card li { display: grid; grid-template-columns: 28px 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px; border-radius: 10px; background: rgba(255,255,255,.035); }
.leaderboard-card li > img, .leaderboard-avatar { width: 32px; height: 32px; object-fit: cover; }
.leaderboard-rank { color: #778299; font-weight: 900; }
.leaderboard-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; }
.leaderboard-score { color: #83f4d3; font-size: 1rem; }
.leaderboard-card .leaderboard-empty { display: block; color: #8994aa; font-size: .78rem; }
.leaderboard-card > p { margin: 18px 0 0; color: #7e899f; font-size: .7rem; line-height: 1.45; }
footer { padding: 13px 3px 0; color: #7f8aa2; font-size: .75rem; }
footer p { margin: 0; }
footer strong { color: #cbd5e8; }

@media (pointer: coarse), (max-width: 760px) { .touch-controls { display: grid; } }
@media (max-width: 620px) {
  .game-shell { padding: 11px; }
  .brand-lockup img { width: 43px; height: 43px; }
  .game-header { gap: 6px; }
  .brand-lockup { min-width: 0; gap: 8px; }
  .brand-lockup h1 { font-size: 1.05rem; letter-spacing: .08em; }
  .brand-lockup .eyebrow { font-size: .54rem; letter-spacing: .13em; }
  .trial-label { display: none; }
  .icon-button { flex: 0 1 auto; padding: 8px 6px; font-size: .53rem; white-space: nowrap; }
  .arcade-account { align-items: stretch; flex-direction: column; gap: 9px; }
  .account-button { text-align: center; }
  .score-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; margin-top: 14px; padding-inline: 5px; }
  .score-strip div { min-width: 0; }
  .score-strip span { font-size: .46rem; letter-spacing: .05em; }
  .score-strip strong { font-size: 1.06rem; }
  .game-panel { padding: 14px 13px; }
  .game-panel h2 { margin: 6px 0; font-size: 1.3rem; }
  .game-panel > p { margin-bottom: 8px; overflow-wrap: anywhere; font-size: .73rem; line-height: 1.32; }
  .panel-tag { font-size: .52rem; }
  .key-guide { display: none; }
  .split-guide { min-height: 42px; margin-bottom: 8px; transform: scale(.82); }
  .upgrade-status { top: 8px; right: 8px; padding: 6px 8px; font-size: .48rem; letter-spacing: .07em; }
  .primary-button { padding: 10px 13px; font-size: .67rem; }
  .result-stats { margin-bottom: 10px; }
  .result-stats span { padding: 5px 7px; }
  .touch-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); }
  .touch-controls button { min-width: 0; padding-inline: 4px; font-size: .65rem; }
  .leaderboard-card ol { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
