/* PocketCursor / flat pixel arcade. Home styles only; lobby and controller stay independent. */
:root {
  --home-ref-w: 1920px;
  --home-ref-h: 1080px;
  --home-green: #a2fa86;
  --home-ink: #edf5eb;
  --home-muted: #9aaea0;
  --home-line: #2d4437;
  --home-panel: #111e18;
  --home-display: "Cafe24 PRO UP", "Courier New", monospace;
  --home-view-w: var(--home-ref-w);
  --home-view-h: var(--home-ref-h);
}
html:has(.home-page) { overflow: hidden; overscroll-behavior: none; }
.home-page {
  display: flex;
  height: var(--home-vh, 100dvh);
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--home-ink);
  background: #080f0c;
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 50%, #173d222e, transparent 60%),
    linear-gradient(#8cfaa805 1px, transparent 1px),
    linear-gradient(90deg, #8cfaa805 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}
.home-page [hidden] { display: none !important; }
.home-page button { cursor: pointer; }
.home-page button:disabled { cursor: not-allowed; opacity: .5; }
.home :is(.home-play, .mp-cta):disabled { cursor: pointer; opacity: 1; }
.home .mp-join-row input:disabled { cursor: text; opacity: 1; color: #e0f4d4; -webkit-text-fill-color: #e0f4d4; }
.home-page :is(button, a, input, summary):focus-visible { outline: 3px solid var(--home-green); outline-offset: 5px; }
.home-page :is(h1, h2, [role="heading"])[tabindex="-1"]:focus { outline: none; }
.home-page.has-phone-cursor, .home-page.has-phone-cursor * { cursor: none !important; }
.home-page svg { display: block; flex: none; }
.pixel-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.home-fit { position: relative; flex: 1; min-width: 0; min-height: 0; width: 100%; height: var(--home-vh, 100dvh); overflow: hidden; container-type: size; }
.home-frame {
  position: absolute; left: 50%; top: 50%; width: var(--home-ref-w); height: var(--home-ref-h);
  display: grid; place-items: center;
  transform: translate3d(-50%, -50%, 0) scale(var(--home-scale, min(calc(100vw / var(--home-ref-w)), calc(100dvh / var(--home-ref-h)))));
  transform-origin: center center;
}
.home {
  --home-header-h: 72px;
  --home-header-btn-h: 54px;
  --home-header-gutter: calc((var(--home-header-h) - var(--home-header-btn-h)) / 2);
  position: relative; z-index: 5; width: 1760px; height: 988px;
  display: grid; grid-template-rows: var(--home-header-h) minmax(0, 1fr) 48px; gap: 24px;
}
.home > :not(.pixel-symbols) { position: relative; z-index: 5; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cursor-stage { position: fixed; inset: 0; z-index: 300; overflow: hidden; pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--home-muted); font: 600 14px/1.4 "Courier New", monospace; letter-spacing: 1.5px; }
.pixel-dot { display: inline-block; width: 7px; height: 7px; flex: none; background: var(--home-green); box-shadow: 0 0 12px #94f68a36; }
.home-header.auth-bar { display: flex; align-items: center; height: 100%; min-height: 0; border: 0; border-bottom: 1px solid var(--home-line); border-radius: 0; background: none; backdrop-filter: none; padding: 0; gap: 40px; }
.home-brand { display: flex; align-items: center; gap: 12px; color: var(--home-ink); text-decoration: none; font: 400 33px/1 var(--home-display); white-space: nowrap; }
.brand-mark { position: relative; width: 42px; height: 48px; flex: none; }
.brand-cursor-fill, .brand-cursor-outline { position: absolute; inset: 0; }
.brand-cursor-fill { background: var(--home-ink); -webkit-mask: url("/cursor-fill.png") center / contain no-repeat; mask: url("/cursor-fill.png") center / contain no-repeat; }
.brand-cursor-outline { background: var(--home-green); -webkit-mask: url("/cursor-outline.png") center / contain no-repeat; mask: url("/cursor-outline.png") center / contain no-repeat; }
.brand-word { display: flex; align-items: center; line-height: 1; transform: translateY(0.08em); }
.brand-accent { color: var(--home-green); }
.home-nav { display: flex; align-items: center; gap: 24px; margin-right: auto; margin-left: 24px; height: auto; }
.home-nav > a { display: flex; align-items: center; justify-content: center; position: relative; min-width: 148px; height: var(--home-header-btn-h); padding: 0 22px; border: 1px solid transparent; color: #aabdac; background: none; text-decoration: none; font-size: 19px; font-weight: 650; transition: color .16s, border-color .16s, background .16s; }
.home-nav > a[aria-current="page"] { color: var(--home-green); border-color: #3c5a3f; background: #15261b; }
.home-nav > a[aria-current="page"]::before { content: ""; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 3px; background: var(--home-green); }
.home-nav a:focus-visible,
.home-page:not(.phone-cursor-connected) .home-nav a:hover { color: #eaffdf; border-color: #3c5a3f; }
.home-auth-actions { display: flex; align-items: center; gap: var(--home-header-gutter); margin-left: auto; }
.home .home-help-btn { display: grid; place-items: center; width: var(--home-header-btn-h); height: var(--home-header-btn-h); padding: 0; border: 1px solid var(--home-line); background: #15221a; color: #b7cbb5; font: 400 24px/1 var(--home-display); transition: color .16s, border-color .16s, background .16s; }
.home .home-help-btn:is(:hover, :focus-visible) { color: #d9f7cd; border-color: #79b86b; background: #1d3524; }
.home-music-slot,
.room-music-slot { display: flex; align-items: center; justify-content: center; flex: none; }
.home-music-slot:empty,
.room-music-slot:empty { display: none; }
.music-control {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
  z-index: 12;
}
.music-toggle {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--home-header-btn-h);
  height: var(--home-header-btn-h);
  padding: 0;
  border: 1px solid var(--home-line);
  border-radius: 0;
  background: #15221a;
  color: #b7cbb5;
  cursor: pointer;
}
.music-toggle svg {
  width: 21px;
  height: 21px;
  transition: transform .16s;
}
.music-toggle[data-volume-icon="volume"] svg { transform: translateX(4px); }
.music-toggle[data-volume-icon="volume-1"] svg { transform: translateX(2px); }
.music-toggle[data-volume-icon="volume-2"] svg { transform: translateX(.5px); }
.music-volume-panel {
  position: absolute;
  top: 0;
  right: calc(100% - 1px);
  display: flex;
  align-items: center;
  width: 156px;
  height: var(--home-header-btn-h);
  padding: 0 14px;
  border: 1px solid #466143;
  background: #111c16;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(14px) scaleX(.88);
  transform-origin: right center;
  transition: opacity .16s, transform .16s, visibility 0s linear .16s;
}
.music-control.is-expanded .music-volume-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}
.music-volume-panel input {
  --music-level: 43%;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.music-volume-panel input::-webkit-slider-runnable-track {
  height: 5px;
  border: 1px solid #486348;
  background: linear-gradient(to right, var(--home-green) 0 var(--music-level), #263b2c var(--music-level) 100%);
}
.music-volume-panel input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 2px solid #18251b;
  border-radius: 0;
  background: #b8f2a3;
  box-shadow: 0 0 0 1px #79b86b;
}
.music-volume-panel input::-moz-range-track {
  height: 3px;
  border: 1px solid #486348;
  background: #263b2c;
}
.music-volume-panel input::-moz-range-progress {
  height: 3px;
  background: var(--home-green);
}
.music-volume-panel input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #18251b;
  border-radius: 0;
  background: #b8f2a3;
  box-shadow: 0 0 0 1px #79b86b;
}
.music-toggle:focus-visible,
.home-page:not(.phone-cursor-connected) .music-toggle:hover {
  border-color: #96cf80;
  background: #243e29;
  color: #e4f9d9;
}
.music-volume-panel input:focus-visible {
  outline: 2px solid #b8f2a3;
  outline-offset: 4px;
}
.home-auth-slot { display: flex; align-items: stretch; justify-content: flex-end; width: max-content; height: var(--home-header-btn-h); flex: none; }
.home-auth-pending { width: 15.5rem; height: 100%; border: 1px solid #293d30; background: #111a15; }
.home .home-nav-fs { display: flex; align-items: center; justify-content: center; gap: 10px; width: auto; height: var(--home-header-btn-h); padding: 0 18px; border: 1px solid var(--home-line); border-radius: 0; background: #15221a; color: #b7cbb5; font-size: 16px; font-weight: 600; line-height: 1; transition: color .16s, border-color .16s, background .16s; }
.home .home-nav-fs:is(:hover, :focus-visible) { color: #d9f7cd; border-color: #79b86b; background: #1d3524; }
.home .home-nav-fs svg { width: 17px; height: 17px; }
.home .auth-trigger { display: flex; align-items: center; justify-content: center; gap: 8px; height: var(--home-header-btn-h); padding: 0 18px; border: 1px solid #466143; border-radius: 0; background: #16281b; color: var(--home-green); font-size: 16px; font-weight: 650; line-height: 1; white-space: nowrap; transition: color .16s, border-color .16s, background .16s; }
.home .auth-trigger svg { width: 15px; height: 15px; }
.home .auth-trigger:is(:hover, :focus-visible) { background: #243e29; border-color: #96cf80; }
.home .auth-chip { display: flex; align-items: center; gap: 12px; width: max-content; max-width: 100%; height: var(--home-header-btn-h); padding: 0 14px 0 8px; border: 1px solid #466143; background: #15221a; color: var(--home-ink); text-decoration: none; font-size: 18px; font-weight: 650; transition: border-color .16s, background .16s; }
.home .auth-chip[hidden] { display: none; }
.home .auth-chip img { width: 36px; height: 36px; border-radius: 0; image-rendering: pixelated; }
.home .auth-chip > span:not(.level-badge) { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home .auth-chip .level-badge { font-size: 13px; padding: 4px 7px; }
.home .auth-chip:is(:hover, :focus-visible) { border-color: #96cf80; background: #1d3524; }
html[data-home-view="profile"] .home .auth-chip { border-color: var(--home-green); box-shadow: inset 0 -3px var(--home-green); }
.home-intro { display: flex; align-items: center; margin-bottom: -12px; }
.home-intro h1 { margin: 0; font: 400 62px/.99 var(--home-display); letter-spacing: -1.5px; }
.home-intro h1 span { color: var(--home-green); }
.home-view-window { min-width: 0; min-height: 0; overflow: visible; }
.home-view-track { position: relative; width: 100%; height: 100%; }
.home-view {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  will-change: transform;
}
/* Each page has its place in the navigation order (the room left of the Spielhalle). A page
   sits one width left or right of the open one; only the leaving and the coming page slide
   (.is-moving, public/home/view.js), so pages in between never cross the screen. */
html { --active-view: 0; }
html[data-home-view="room"] { --active-view: -1; }
html[data-home-view="challenges"] { --active-view: 1; }
html[data-home-view="leaderboard"] { --active-view: 2; }
html[data-home-view="shop"] { --active-view: 3; }
html[data-home-view="profile"] { --active-view: 4; }
.home-view { --view-index: 0; transform: translate3d(calc(clamp(-1, var(--view-index) - var(--active-view), 1) * var(--home-view-w)), 0, 0); }
html.home-view-changing .home-view.is-moving { transition: transform .62s cubic-bezier(.72, 0, .18, 1); }
.home-view[aria-hidden="true"] { pointer-events: none; }
.home-room-view { --view-index: -1; }
.home-arcade-view { display: grid; grid-template-rows: 96px minmax(0, 1fr); gap: 24px; }
.home-challenges-view { --view-index: 1; }
.home-leaderboard-view { --view-index: 2; display: grid; grid-template-rows: 96px minmax(0, 1fr); gap: 24px; }
.home-shop-view { --view-index: 3; }
.home-profile-view { --view-index: 4; }
.room-app { width: 100%; height: 100%; min-width: 0; min-height: 0; }
#roomApp > .room-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  grid-template-rows: 96px minmax(0, 1fr);
  gap: 24px 20px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  color: var(--home-ink);
  background: none;
}
#roomApp > .room-stage.is-private-room {
  grid-template-columns: minmax(0, 1fr) 420px;
  grid-template-rows: 96px minmax(0, 1fr);
  gap: 24px 20px;
  min-height: 0;
  padding: 0;
  background: none;
}
#roomApp .room-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-width: 0;
  margin-bottom: -12px;
  padding: 0;
  border: 0;
}
#roomApp .room-stage.is-party-countdown .room-topbar {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
#roomApp .party-countdown {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 4px;
  color: var(--home-green);
}
#roomApp .party-countdown span {
  color: var(--home-muted);
  font: 600 12px/1 "Courier New", monospace;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
#roomApp .party-countdown strong {
  font: 400 64px/.86 var(--home-display);
  letter-spacing: -2px;
}
#roomApp .room-stage.is-party-countdown .room-header-actions {
  grid-column: 3;
  grid-row: 1;
}
#roomApp .room-live-copy {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  height: 100%;
}
#roomApp .room-live-copy h1 {
  display: flex;
  align-items: center;
  position: relative;
  width: max-content;
  max-width: 100%;
  height: auto;
  margin: 0;
  color: #f0f7e5;
  font: 400 62px/.99 var(--home-display);
  letter-spacing: -1.5px;
  white-space: nowrap;
}
#roomApp .room-live-copy h1::after {
  content: ".";
  color: var(--home-green);
}
#roomApp .room-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
#roomApp .room-copy-action {
  display: flex;
}
.room-code-source {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.room-session-code {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--home-line);
}
.room-session-code > span {
  color: #829681;
  font: 600 10px/1 "Courier New", monospace;
  letter-spacing: 1.8px;
}
.room-session-code strong {
  color: #c9efb5;
  font: 400 24px/1 var(--home-display);
  letter-spacing: 2px;
}
#roomApp :is(#copyRoom, #lobbyHome, #roomAuthTrigger) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #466143;
  border-radius: 0;
  background: #16281b;
  color: #c9efb5;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
#roomApp :is(#copyRoom, #lobbyHome, #roomAuthTrigger):is(:hover, :focus-visible) {
  border-color: #96cf80;
  background: #243e29;
  color: #e4f9d9;
}
#roomApp :is(#copyRoom, #lobbyHome, #roomAuthTrigger) svg {
  width: 15px;
  height: 15px;
}
#roomApp .room-header-actions :is(#copyRoom, #lobbyHome) {
  min-height: var(--home-header-btn-h);
  padding: 0 20px;
  font-size: 16px;
}
#roomApp .room-header-actions :is(#copyRoom, #lobbyHome) svg {
  width: 19px;
  height: 19px;
}
#roomApp .room-stage-nav {
  display: flex;
  align-items: center;
  margin: 0;
}
#roomApp #lobbyHome svg { width: 18px; height: 18px; transform: scaleX(-1); }
#roomApp .catalog {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 0;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}
#roomApp .catalog-grid {
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px;
  height: 100%;
  min-height: 0;
}
#roomApp .game-tile {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 0;
  background: var(--home-panel);
  pointer-events: auto;
}
#roomApp .game-tile img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
#roomApp .game-tile-copy {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 14px 16px 16px;
  text-align: left;
  color: #d7e5cf;
}
#roomApp .game-tile-copy strong {
  color: #e1ecd6;
  font: 400 22px/1.1 var(--home-display);
}
#roomApp .game-tile-copy span {
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.45;
}
#roomApp .game-tile-votes {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
}
#roomApp .game-tile-votes i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
#roomApp .game-tile.is-empty {
  visibility: visible;
  opacity: .42;
  pointer-events: none;
}
#roomApp .game-tile-empty-preview {
  display: block;
  min-height: 0;
  border-bottom: 1px solid var(--home-line);
  background:
    linear-gradient(#8cfaa805 1px, transparent 1px),
    linear-gradient(90deg, #8cfaa805 1px, transparent 1px),
    #0b1510;
  background-size: 18px 18px;
}
#roomApp .game-tile-empty-copy {
  visibility: hidden;
}
#roomApp .game-tile:disabled {
  opacity: .58;
  filter: saturate(.55);
  cursor: not-allowed;
}
#roomApp .game-tile-availability {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 8px;
  border: 1px solid #668069;
  background: #09120fe8;
  color: #b8c7b2;
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#roomApp .game-tile:is(.is-hot, .is-leading) {
  border-color: #8cda72;
  background: #1b3522;
  box-shadow: inset 0 0 0 1px #9ddd8120, 0 0 20px #63bd7220;
  transform: none;
}
#roomApp .catalog:has(.catalog-nav:not([hidden])) .catalog-grid { grid-column: 2; }
#roomApp .catalog-nav {
  grid-row: 1;
  align-self: stretch;
  width: 72px;
  height: auto;
  pointer-events: auto;
  border: 1px solid #4a734c;
  border-radius: 0;
  background: #1b3420;
  color: #c9efb5;
}
#roomApp .catalog-nav:is(:hover, :focus-visible, .is-hot) {
  border-color: #96cf80;
  background: #294b2e;
}
#roomApp .catalog-nav svg { width: 28px; height: 28px; margin: auto; }
#roomApp #catalogNext { grid-column: 3; }
#roomApp .catalog-nav[data-dir="-1"] svg { transform: rotate(180deg); }
#roomApp .room-lobby-side {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 20px;
  min-width: 0;
  min-height: 0;
}
#roomApp .room-lobby-side:not(:has(.room-auth-card:not([hidden]))),
#roomApp .room-lobby-side:not(:has(.room-qr-card:not([hidden]))) {
  grid-template-rows: minmax(0, 1fr) auto;
}
#roomApp .room-lobby-side:not(:has(.room-auth-card:not([hidden]))):not(:has(.room-qr-card:not([hidden]))) {
  grid-template-rows: minmax(0, 1fr);
}
#roomApp .room-stage.is-private-room .room-lobby-side {
  row-gap: 12px;
}
#roomApp .room-player-card {
  position: relative;
  min-width: 0;
  min-height: 0;
}
#roomApp .room-player-card .players {
  position: relative;
  inset: auto;
  grid-column: auto;
  grid-row: auto;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 21px 23px;
  overflow: auto;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
}
#roomApp .room-player-card .players .eyebrow {
  margin: 0;
  color: var(--home-muted);
  font: 600 12px/1.4 "Courier New", monospace;
  letter-spacing: 1.5px;
}
#roomApp .room-player-card .players h2 {
  margin: 0 0 6px;
  color: #e1ecd6;
  font: 400 28px/1 var(--home-display);
}
#roomApp .room-player-card .private-session {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #293d30;
  color: #839884;
  font: 11px/1 "Courier New", monospace;
  letter-spacing: 1.5px;
}
#roomApp .room-player-card .chip {
  justify-content: flex-start;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--home-line);
  border-radius: 0;
  background: #15221a;
  font-size: 15px;
}
#roomApp .room-player-card > .empty:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid !important;
  padding: 22px;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
}
#roomApp .room-player-card .empty > div { display: grid; justify-items: center; gap: 9px; max-width: 310px; }
#roomApp .room-player-card .empty svg {
  width: 42px;
  height: 42px;
  margin-bottom: 3px;
  color: #93d47b;
}
#roomApp .room-player-card .empty strong {
  color: #e1ecd6;
  font: 400 25px/1 var(--home-display);
  letter-spacing: 0;
}
#roomApp .room-player-card .empty .hint {
  color: #9fb09c;
  font-size: 13px;
  line-height: 1.5;
}
#roomApp .party-qr { display: none; }
#roomApp .room-qr-card:not([hidden]) {
  position: relative;
  inset: auto;
  display: grid !important;
  grid-template-columns: 196px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--home-line);
  border-radius: 0;
  background: var(--home-panel);
  backdrop-filter: none;
}
#roomApp .room-qr-copy {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 0;
}
#roomApp .room-qr-content {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  align-items: center;
  min-width: 0;
}
#roomApp .room-qr-card > .room-session-code {
  grid-column: 2;
  grid-row: 2;
}
#roomApp .room-qr-frame {
  position: relative;
  width: 196px;
  height: 196px;
  padding: 6px;
  border: 1px solid #638155;
  background: #162b1b;
}
#roomApp .room-qr-frame::before,
#roomApp .room-qr-frame::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
#roomApp .room-qr-frame::before {
  top: -3px;
  left: -3px;
  border-top: 3px solid #b1ec8e;
  border-left: 3px solid #b1ec8e;
}
#roomApp .room-qr-frame::after {
  right: -3px;
  bottom: -3px;
  border-right: 3px solid #b1ec8e;
  border-bottom: 3px solid #b1ec8e;
}
#roomApp .room-qr-card img {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: #fff;
  object-fit: contain;
  image-rendering: pixelated;
}
#roomApp .room-qr-card .eyebrow { margin-bottom: 8px; font-size: 10px; }
#roomApp .room-qr-card h2 {
  margin: 0 0 9px;
  color: #e1ecd6;
  font: 400 26px/1 var(--home-display);
}
#roomApp .room-qr-card .hint { margin: 0; color: #9fb09c; font-size: 12px; line-height: 1.45; }
.room-auth-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
}
.room-auth-icon {
  width: 38px;
  height: 38px;
  padding: 4px;
  border: 1px solid #426a43;
  background: #1b3623;
}
.room-auth-card > div { min-width: 0; }
.room-auth-card .eyebrow { margin-bottom: 3px; font-size: 8px; letter-spacing: 1.1px; }
.room-auth-card h2 {
  margin: 0;
  color: #dcead5;
  font: 400 19px/1 var(--home-display);
}
.room-auth-card p:not(.eyebrow) {
  margin: 5px 0 0;
  color: #94a792;
  font-size: 11px;
  line-height: 1.35;
}
#roomApp #roomAuthTrigger { min-height: 40px; padding: 9px 11px; font-size: 13px; }
.home-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; min-height: 0; }
.home-main-column { display: grid; grid-template-rows: 154px minmax(0, 1fr) 96px; gap: 24px; min-width: 0; min-height: 0; }
.home-side-column { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 20px; min-width: 0; min-height: 0; }
.home-panel { border: 1px solid var(--home-line); background: var(--home-panel); }
/* Horizontal elixir XP. The empty rail and all effects share the same flat plane. */
.home-level { position: relative; padding: 17px 24px 15px; overflow: visible; }
.home-level::before, .home-level::after { content: ""; position: absolute; width: 6px; height: 6px; top: -1px; border-top: 2px solid #80ac74; }
.home-level::before { left: -1px; border-left: 2px solid #80ac74; }
.home-level::after { right: -1px; border-right: 2px solid #80ac74; }
.home-level-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; min-height: 39px; }
.home-level-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.level-emblem { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #426a43; background: #1b3623; }
.level-emblem svg { width: 30px; height: 30px; image-rendering: pixelated; }
.home-level-identity .eyebrow { font-size: 11px; letter-spacing: 1.7px; margin-bottom: 2px; }
.home-level h2 { display: flex; align-items: center; gap: 13px; margin: 0; font: 400 25px/1 var(--home-display); }
#homePlayerName { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.level-badge { display: inline-flex; align-items: center; gap: 7px; color: #a9eb91; font: 600 14px/1 "Courier New", monospace; padding: 5px 9px; border: 1px solid #365438; background: #1a3020; white-space: nowrap; }
.level-badge strong { font: inherit; }
.home-level-track-row { display: flex; align-items: center; gap: 19px; }
.home-level-bar { --level: 0%; flex: 1; min-width: 0; height: 36px; padding: 4px; background: #293e2b; border: 1px solid #51724b; clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px); }
.home-level-frame-in { width: 100%; height: 100%; padding: 2px; background: #07120d; }
.home-level-rail { position: relative; height: 100%; width: 100%; overflow: hidden; background: repeating-conic-gradient(#15231b 0% 25%, #18271e 0% 50%) 0 0 / 8px 8px; isolation: isolate; }
.home-level-elixir { position: absolute; left: 0; top: 0; bottom: 0; width: var(--level); overflow: hidden; background: #4ada66; transition: width .66s cubic-bezier(.18,.75,.28,1); box-shadow: inset 0 2px #e5ffd580, inset 0 -3px #074b2890; }
.home-level-liquid { display: block; position: absolute; width: var(--rail-width, 1100px); height: 100%; left: 0; top: 0; image-rendering: pixelated; }
.home-level-elixir::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 3px; background: #caffe0; box-shadow: -3px 0 #a2ffb17a; }
.home-level-elixir::before { content: ""; position: absolute; inset: 0; z-index: 1; border-top: 2px solid #d5ffad65; border-bottom: 2px solid #0b422c9e; }
.home-level-ticks { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), #08170e70 calc(10% - 1px), #08170e70 10%); }
.home-level-gain { position: absolute; left: var(--gain-from, 0%); width: var(--gain-size, 0%); top: 0; bottom: 0; background: #f4fff0; opacity: 0; z-index: 2; }
.home-level-gain.is-on { animation: xp-white .85s ease-out both; }
@keyframes xp-white { 0%, 20% { opacity: 1; } 42% { opacity: .94; background: #d7ffcf; } 100% { opacity: 0; } }
.home-level-impact { position: absolute; top: 0; bottom: 0; left: calc(var(--level) - 3px); width: 3px; background: #fff; opacity: 0; z-index: 3; }
.home-level-bar.is-gaining .home-level-impact { animation: xp-front .85s ease-out both; }
@keyframes xp-front { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
.home-level-bar.is-resetting .home-level-elixir { transition: none; }
.home-level-percent { width: 56px; text-align: right; color: #b5ed9a; font: 400 30px/1 var(--home-display); font-variant-numeric: tabular-nums; }
.home-level-percent span { font-size: 16px; margin-left: 2px; }
.home-level-meta { display: flex; justify-content: space-between; gap: 20px; margin-top: 9px; color: #96ad9c; font: 13px/1.3 "Courier New", monospace; }
#homeLevelCount { color: #c9d9c6; font-weight: 700; }
.home-level-notice { position: absolute; right: 24px; top: 20px; z-index: 4; color: #c3ff9b; background: #143c23; border: 1px solid #8cdf75; padding: 7px 14px; font: 400 25px/1 var(--home-display); opacity: 0; pointer-events: none; }
.home-level-notice.is-visible { opacity: 1; }
.home-level.is-level-up { animation: xp-level .98s ease-out; }
.home-level.is-level-up .level-emblem { background: #347b3b; border-color: #b4ff8d; }
.home-level-burst { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.home-level-burst i { position: absolute; left: var(--x); top: 48%; width: var(--size); height: var(--size); background: #a0ff81; opacity: 0; }
.home-level.is-level-up .home-level-burst i { animation: xp-burst 1s ease-out both; }
@keyframes xp-level { 0% { box-shadow: 0 0 0 2px #b9ff8c, 0 0 36px #6aff6948; background: #21442a; } 100% { box-shadow: 0 0 0 0 transparent; background: var(--home-panel); } }
@keyframes xp-burst { 0% { opacity: 0; transform: translate(0, 0); } 14% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
/* Mode cards use original vector pixels, not perspective/glass artwork. */
.home-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; min-height: 0; }
.home .home-play.mode-card { position: relative; display: flex; flex-direction: column; align-items: stretch; overflow: hidden; border-radius: 0 !important; border: 1px solid #466044 !important; padding: 25px 26px !important; text-align: left; background: #15291b !important; isolation: isolate; transition: border-color .16s, background .16s, box-shadow .16s; }
.home .home-play[data-mode="quick"].mode-card { background: #12281f !important; border-color: #335642 !important; }
.home-play::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 90% 10%, #8ac96322, transparent 70%), linear-gradient(#98dd5d06 1px, transparent 1px), linear-gradient(90deg, #98dd5d06 1px, transparent 1px); background-size: auto, 18px 18px, 18px 18px; }
.home .home-play:is(:focus-visible, .is-hot),
.home-page:not(.phone-cursor-connected) .home .home-play:not([data-unavailable]):hover { border-color: #8cda72 !important; background: #1b3522 !important; }
.home .home-play[data-mode="quick"]:is(:focus-visible, .is-hot),
.home-page:not(.phone-cursor-connected) .home .home-play[data-mode="quick"]:hover { border-color: #79bfa2 !important; background: #193a2e !important; box-shadow: inset 0 0 0 1px #a6e8c221, 0 0 24px #4daf7f20; }
.home .home-play[data-mode="quick"]:is(:focus-visible, .is-hot)::before,
.home-page:not(.phone-cursor-connected) .home .home-play[data-mode="quick"]:hover::before { background: radial-gradient(ellipse at 88% 12%, #6ed6ad2d, transparent 68%), linear-gradient(#81d5b00b 1px, transparent 1px), linear-gradient(90deg, #81d5b00b 1px, transparent 1px); background-size: auto, 18px 18px, 18px 18px; }
.home-play[data-mode="quick"]:focus-visible { outline: 1px solid #82cda0; outline-offset: 3px; }
.home .mode-card-top { display: flex; align-items: center; justify-content: space-between; z-index: 2; }
.home .mode-index { color: #b7d1a8; font: 700 13px/1.2 "Courier New", monospace; letter-spacing: 1px; transition: color .16s; }
.home .mode-tag { font: 600 10px/1 "Courier New", monospace; letter-spacing: 1px; color: #afc19e; border: 1px solid #415c37; background: #122017; padding: 6px 8px; transition: color .16s, border-color .16s, background .16s, box-shadow .16s; }
.home .home-play[data-mode="quick"]:is(:focus-visible, .is-hot) .mode-index,
.home-page:not(.phone-cursor-connected) .home .home-play[data-mode="quick"]:hover .mode-index { color: #c4ecd5; }
.home .home-play[data-mode="quick"]:is(:focus-visible, .is-hot) .mode-tag,
.home-page:not(.phone-cursor-connected) .home .home-play[data-mode="quick"]:hover .mode-tag { color: #d3f5dd; border-color: #73ad84; background: #1d402c; box-shadow: 0 0 12px #70c99a20; }
.home .mode-copy { position: relative; z-index: 2; margin-top: auto; margin-bottom: 26px; pointer-events: none; }
.home .mode-copy :is(strong, h2) { display: block; margin: 0 0 9px; font: 400 57px/1 var(--home-display); color: #f0f7e5; letter-spacing: -1px; }
.home .mode-copy :is(strong, h2) > span { font: inherit; color: var(--home-green); }
.home .mode-copy > :is(span, p) { display: block; margin: 0; color: #b2c6aa; font: 400 18px/1.5 "Segoe UI", system-ui, sans-serif; }
.home .home-play-cta { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex: none; width: 100%; min-height: 56px; padding: 12px 18px; border: 1px solid #caffac; background: var(--home-green); color: #153014; font-size: 19px; font-weight: 750; text-transform: none; border-radius: 0; box-shadow: 0 4px 0 #070e0960; transition: background .16s; }
.home .home-play-cta svg { width: 19px; height: 19px; }
.home .home-play[data-mode="quick"] .home-play-cta { background: #1b3d2c; border-color: #5c9770; color: #bff3c3; }
.home .home-play[data-unavailable] { cursor: not-allowed; opacity: .58; filter: saturate(.45); }
.home .home-play[data-unavailable] .home-play-cta { background: #6e8b64; border-color: #91a888; }
.home .mode-disabled-hint { position: relative; z-index: 2; margin-top: 9px; color: #ffd8a8; font: 600 12px/1.3 "Segoe UI", system-ui, sans-serif; }
.home .home-play[data-mode="solo"]:is(:focus-visible, .is-hot) .home-play-cta,
.home-page:not(.phone-cursor-connected) .home .home-play[data-mode="solo"]:not([data-unavailable]):hover .home-play-cta { background: #bbffa2; }
.home .home-play[data-mode="quick"]:is(:focus-visible, .is-hot) .home-play-cta,
.home-page:not(.phone-cursor-connected) .home .home-play[data-mode="quick"]:hover .home-play-cta { background: #27553b; border-color: #75ab82; color: #d1f5d4; }
.mode-art { position: absolute; pointer-events: none; right: 20px; top: 45px; width: 220px; height: 182px; color: #87d765; }
.art-alien { color: #8ed972; position: absolute; top: 54px; right: 28px; width: 91px; height: 91px; filter: drop-shadow(0 0 20px #86e26220); animation: pixel-float 4s steps(6, end) infinite; }
.art-target { position: absolute; top: 16px; left: 18px; width: 53px; height: 53px; color: #52764a; }
.art-shadow { position: absolute; right: 23px; bottom: 20px; width: 108px; height: 5px; background: #8dfc7630; }
.art-spark { position: absolute; width: 5px; height: 5px; background: #acdc85; }
.spark-a { top: 23px; right: 10px; box-shadow: 0 0 10px #a5e88950; }
.spark-b { top: 98px; left: 19px; width: 3px; height: 3px; background: #799f65; }
.spark-c { top: 37px; right: 111px; width: 3px; height: 3px; }
.mode-art-multi { right: 13px; top: 61px; width: 254px; }
.art-party-alien { position: absolute; width: 59px; height: 59px; filter: drop-shadow(0 0 16px var(--alien-glow)); animation: pixel-float 4.5s steps(6, end) infinite; }
.party-one { --alien-glow: #709fc138; left: 35px; top: 44px; color: #709fc1; animation-delay: -.8s; }
.party-two { --alien-glow: #9bea8a38; left: 102px; top: 18px; color: #9bea8a; width: 72px; height: 72px; }
.party-three { --alien-glow: #d6c98138; left: 181px; top: 48px; color: #d6c981; animation-delay: -1.8s; }
.mode-art-multi .art-shadow { right: 13px; width: 203px; bottom: 41px; background: #89d7a024; }
@keyframes pixel-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* Secondary actions stay distinct from the two primary play buttons. */
.mp-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; min-width: 0; }
.mp-block { --mp-accent: #8bcf78; position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; margin: 0; padding: 15px 17px; border: 1px solid #395642; background: linear-gradient(100deg, #193023, #101c16 72%); transition: border-color .16s, background .16s, box-shadow .16s; }
.mp-block::before { content: ""; position: absolute; left: -1px; top: -1px; width: 8px; height: 8px; border-top: 2px solid var(--mp-accent); border-left: 2px solid var(--mp-accent); pointer-events: none; }
.mp-block[data-mp="create"] { cursor: pointer; }
.mp-block[data-mp="join"] { --mp-accent: #79bfa2; cursor: pointer; border-color: #34564b; background: linear-gradient(100deg, #173029, #101c18 72%); }
.mp-block:is(:focus-within, .is-hot),
.home-page:not(.phone-cursor-connected) .mp-block:hover { border-color: var(--mp-accent); background: #192f21; box-shadow: inset 0 0 0 1px #9ddd8120, 0 0 20px #63bd7220; }
.mp-block[data-mp="join"]:is(:focus-within, .is-hot),
.home-page:not(.phone-cursor-connected) .mp-block[data-mp="join"]:hover { background: #183129; box-shadow: inset 0 0 0 1px #8fd6b420, 0 0 20px #5db4931c; }
.mp-block-icon { width: 42px; height: 42px; padding: 8px; color: var(--mp-accent); border: 1px solid #45694b; background: #14271b; }
.mp-block[data-mp="join"] .mp-block-icon { border-color: #416a59; background: #132821; }
.mp-block-text { min-width: 0; margin-right: auto; }
.mp-block strong, .mp-block label { display: block; color: #d9e9d2; font-size: 17px; font-weight: 650; line-height: 1.15; white-space: nowrap; }
.mp-block[data-mp="create"] .mp-block-text strong { font: 400 21px/1 var(--home-display); }
.mp-block[data-mp="create"] .mp-block-text strong span { color: var(--home-green); font: inherit; }
.mp-block p { margin: 5px 0 0; color: #98ad9c; font-size: 12px; line-height: 1.2; white-space: nowrap; }
.mp-cta { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 14px; border: 1px solid #4a734c; border-radius: 0; color: #c9efb5; background: #1b3420; font-size: 15px; font-weight: 650; white-space: nowrap; transition: color .16s, border-color .16s, background .16s; }
.mp-cta svg { width: 15px; height: 15px; }
.mp-block:is(:focus-within, .is-hot) .mp-cta,
.home-page:not(.phone-cursor-connected) .mp-block:hover .mp-cta { background: #294b2e; border-color: #96cf80; }
.mp-block[data-mp="join"] .mp-cta { color: #c5eee0; border-color: #4c7967; background: #19352b; }
.mp-block[data-mp="join"]:is(:focus-within, .is-hot) .mp-cta,
.home-page:not(.phone-cursor-connected) .mp-block[data-mp="join"]:hover .mp-cta { background: #285043; border-color: #83c8aa; }
.mp-join-row { display: flex; min-width: 0; width: 230px; height: 46px; border: 1px solid #416252; background: #080f0b; transition: border-color .16s, outline-color .16s; }
.mp-join-row:focus-within { border-color: #79bfa2; outline: 2px solid #79bfa2; outline-offset: 2px; }
.mp-join-row input { min-width: 0; width: 100%; padding: 10px 13px; cursor: text; background: #080f0b; border: 0; border-radius: 0; color: #e0f4d4; font: 600 18px/1 "Courier New", monospace; letter-spacing: 2px; outline: 0; }
.mp-join-row input::placeholder { color: #8d9d89; }
.home .mp-join-row input:disabled::placeholder { color: #8d9d89; opacity: 1; -webkit-text-fill-color: #8d9d89; }
.mp-block[data-mp="join"] .mp-cta-join { min-width: 44px; min-height: 0; height: 100%; padding: 10px; border: 0; border-left: 1px solid #4c7967; }
.mp-block[data-mp="join"]:is(:focus-within, .is-hot) .mp-cta-join,
.home-page:not(.phone-cursor-connected) .mp-block[data-mp="join"]:hover .mp-cta-join { border-left-color: #83c8aa; }
.mp-join-row :is(input, .mp-cta-join):focus-visible { outline: 0; }
/* Pairing: sharp, high-contrast QR, never tinted or covered by an effect. */
.home-qr { position: relative; padding: 21px 23px; background: #121f19; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; }
.home-card-head .eyebrow { font-size: 12px; color: #abc59d; }
.home-qr h2 { font: 400 34px/1.05 var(--home-display); margin: 11px 0 18px; letter-spacing: -.2px; }
.home-qr-content { display: flex; gap: 19px; align-items: center; }
.home-qr-frame { position: relative; flex: none; width: 196px; height: 196px; padding: 6px; border: 1px solid #638155; background: #162b1b; }
.home-qr-frame::before, .home-qr-frame::after { content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none; }
.home-qr-frame::before { left: -3px; top: -3px; border-top: 3px solid #b1ec8e; border-left: 3px solid #b1ec8e; }
.home-qr-frame::after { right: -3px; bottom: -3px; border-bottom: 3px solid #b1ec8e; border-right: 3px solid #b1ec8e; }
.home-qr-code { display: grid; place-items: center; position: relative; width: 100%; height: 100%; background: #fff; color: #375840; }
.home-qr img { position: relative; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.qr-placeholder { position: absolute; text-align: center; font: 12px/1.5 "Courier New", monospace; }
.home-steps { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.home-steps li { display: flex; align-items: baseline; gap: 8px; }
.home-steps li > span { color: #a1c589; font: 600 16px/1.2 "Courier New", monospace; }
.home-steps strong { display: block; color: #d7e5cf; font-size: 16px; font-weight: 600; line-height: 1.2; }
.home-steps small { display: block; color: #97ab9c; font-size: 11px; margin-top: 3px; }
.home-qr-status { display: flex; gap: 7px; align-items: center; margin-top: 18px; }
.home-qr-status i { width: 5px; height: 5px; flex: none; background: #779d70; }
.home-qr-status p { margin: 0; min-width: 0; font-size: 13px; color: #b2cba4; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.home-room-code { display: flex; justify-content: space-between; border-top: 1px solid #293d30; padding-top: 9px; margin: 10px 0 0; color: #839884; font: 11px/1 "Courier New", monospace; letter-spacing: 1.5px; }
.home-room-code span { color: #aec5a4; letter-spacing: 3px; }
/* The preview is top three; the dialog contains all entries returned by the API. */
.home-board { display: flex; flex-direction: column; padding: 20px 22px 0; min-height: 0; }
.board-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.board-header h2 { display: flex; align-items: center; gap: 11px; margin: 0; color: #e1ecd6; font: 400 25px/1 var(--home-display); }
.board-header svg { width: 1.28em; height: 1.28em; color: #adc986; }
.board-header .eyebrow { font-size: 10px; white-space: nowrap; }
.board-controls { display: flex; flex: none; align-items: stretch; margin-bottom: 8px; }
.board-game { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 24px; min-width: 0; }
.board-controls .board-game { flex: 1 1 auto; border: 1px solid #2f4634; background: #132318; }
.board-game[hidden] { display: none; }
.board-game button { flex: none; width: 72px; min-height: 56px; border: 0; background: #1b3420; color: #a2d27f; font: 600 26px/1 "Courier New", monospace; }
.board-game button:is(:hover, :focus-visible, .is-hot) { background: #1f3524; color: #ddffd3; }
.board-game-name { flex: 1 1 auto; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d3eec2; font: 600 12px/1.2 "Courier New", monospace; letter-spacing: .8px; text-transform: uppercase; }
.leaderboard-game { min-width: 360px; margin-bottom: 0; border: 1px solid #466143; background: #16281b; }
.leaderboard-game button { min-height: 56px; }
.leaderboard-game .board-game-name { font-size: 14px; }
.board-list { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #4c6744 transparent; }
.board-list-ol { list-style: none; padding: 0; margin: 0; }
.board-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 0; border-bottom: 1px solid #243528; }
.board-row:last-child { border-bottom: 0; }
.board-rank-num { width: 22px; flex: none; color: #90a283; font: 13px "Courier New", monospace; }
.board-row.rank-1 .board-rank-num { color: #d5d483; }
.board-avatar { display: grid; place-items: center; width: 24px; height: 24px; flex: none; background: hsl(var(--hue) 23% 22%); color: hsl(var(--hue) 46% 77%); font: 600 11px "Courier New", monospace; }
.board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dae5d3; font-size: 13px; font-weight: 550; }
.board-score { flex: none; margin-left: auto; text-align: right; color: #c6eaa6; font: 600 14px "Courier New", monospace; font-variant-numeric: tabular-nums; }
.board-score small { margin-left: 3px; color: #8da180; font-size: 9px; }
.home-page .board-row.has-frame { border-radius: 0; padding-inline: 5px; box-shadow: inset 0 0 0 1px #718d54; }
.board-empty { margin: 16px 0; color: #a5b89c; font-size: 13px; line-height: 1.6; }
.board-empty strong { display: block; color: #dae7d0; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.board-retry { display: block; min-height: 56px; padding: 0 22px; margin: 14px 0 0; border: 1px solid #466143; background: #16281b; color: #c4eda7; font-weight: 650; }
/* Full leaderboard reuses the loaded board data; only its presentation is larger. */
.leaderboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.leaderboard-hero > div { display: grid; gap: 8px; }
.leaderboard-hero h1 { margin: 0; color: #f0f7e5; font: 400 62px/.9 var(--home-display); letter-spacing: -1.5px; }
.leaderboard-hero h1 span { color: var(--home-green); }
.leaderboard-hero > p { margin: 0 40px 0 auto; color: #aebfa8; font-size: 17px; line-height: 1.55; text-align: right; }
.leaderboard-page-panel { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 28px 32px 24px; }
.leaderboard-page-panel::before { content: ""; position: absolute; left: -1px; top: -1px; width: 10px; height: 10px; border-top: 2px solid var(--home-green); border-left: 2px solid var(--home-green); }
.leaderboard-page-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 20px; }
.leaderboard-page-head > div:first-child { display: grid; gap: 7px; }
.leaderboard-page-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; color: #e6f1df; font: 400 32px/1 var(--home-display); }
.leaderboard-page-head h2 svg { width: 34px; height: 34px; color: #d0d480; }
.leaderboard-page-actions { display: flex; align-items: end; gap: 24px; }
.leaderboard-refresh { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 10px 14px; border: 1px solid #466143; border-radius: 0; background: #16281b; color: #b9dca8; font-size: 14px; font-weight: 650; }
.leaderboard-refresh span { color: var(--home-green); font-size: 19px; line-height: 1; }
.leaderboard-refresh:is(:hover, :focus-visible) { border-color: #96cf80; background: #243e29; color: #e4f9d9; }
.leaderboard-column-head { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid #344b39; border-bottom: 1px solid #344b39; color: #82927e; font: 11px/1 "Courier New", monospace; letter-spacing: 1.4px; }
.leaderboard-page-list { flex: 1; min-height: 0; overflow: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: #58784f transparent; }
.leaderboard-page-list .board-list-ol { display: grid; grid-template: repeat(10, 50px) / repeat(2, minmax(0, 1fr)); grid-auto-flow: column; column-gap: 28px; }
.leaderboard-page-list .board-row { min-height: 50px; padding: 6px 12px; border-bottom-color: #2a3e2f; }
.leaderboard-page-list .board-row:nth-child(-n + 3) { background: linear-gradient(90deg, #1a2f20, transparent); }
.leaderboard-page-list .board-rank-num { width: 36px; color: #a8b89b; font-size: 16px; }
.leaderboard-page-list .rank-1 .board-rank-num { color: #f0df83; }
.leaderboard-page-list .board-avatar { width: 32px; height: 32px; font-size: 12px; }
.leaderboard-page-list .board-name { font-size: 17px; }
.leaderboard-page-list .board-score { font-size: 18px; }
.leaderboard-page-list .board-score small { font-size: 10px; }
.leaderboard-page-list .board-empty { margin: 40px 14px; font-size: 16px; }
/* Footer, account menu and dialogs do not resize or move the stage. */
.home-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid #28372c; color: #859781; }
.home-foot-signature { font: 11px "Courier New", monospace; letter-spacing: 0.4px; }
.home-foot nav { display: flex; gap: 24px; margin-left: auto; }
.home-foot a { color: #a5b299; font-size: 13px; text-decoration: none; }
.home-foot a:hover { color: #d7f5c3; }
.home-fs .fs-min, .home-fs[aria-pressed="true"] .fs-max { display: none; }
.home-fs[aria-pressed="true"] .fs-min { display: block; }
.room-game-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #07080a;
}
.room-game-layer > .stage {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
}
.room-game-layer :is(.room-lobby-side, .room-player-card) { display: contents; }
.room-game-layer :is(.room-header-actions, .room-auth-card) { display: none !important; }
.room-game-active .home-fit {
  visibility: hidden;
  pointer-events: none;
}
.home-toast { position: fixed; z-index: 100; top: max(24px, env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -10px); width: max-content; max-width: min(560px, calc(100% - 32px)); padding: 15px 22px; border: 1px solid #a9575e; border-left: 4px solid #ff6673; background: #2a1519; color: #ffd9dc; box-shadow: 0 10px 40px #0008, 0 0 24px #ff53641c; opacity: 0; transition: opacity .18s, transform .18s; font-size: 15px; }
.home-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.home-page :is(.home-dialog, .auth-dialog) { max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid #55714a; border-top: 3px solid var(--home-green); border-radius: 0; padding: 28px; background: #101d16; color: #e5efd9; box-shadow: 0 20px 100px #000b; }
.home-dialog { width: min(600px, calc(100% - 32px)); }
.home-dialog::backdrop, .home-page .auth-dialog::backdrop { background: #030a07d9; backdrop-filter: blur(4px); }
.home-dialog > h2, .home-page .auth-dialog h2 { margin: 10px 36px 20px 0; font: 400 34px/1.15 var(--home-display); color: #def9c9; letter-spacing: 0; }
.home-page .auth-dialog .hint { line-height: 1.6; }
.home-page .auth-dialog :is(button, input), .home-dialog button { border-radius: 0; }
.home-dialog-close { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #45613b; background: transparent; color: #daefca; font: 24px/1 sans-serif; }
.home-dialog-close:hover { background: #283d22; }
.home-help-steps { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 22px; }
.home-help-steps strong { color: #bbeb9d; font: 700 15px "Courier New", monospace; }
.home-help-steps p { color: #b3c4aa; line-height: 1.65; margin: 6px 0 0; font-size: 14px; }
.home-dialog-primary { width: 100%; padding: 13px 20px; border: 1px solid #c0ffa4; background: var(--home-green); color: #163416; font-weight: 700; font-size: 15px; }
.home-dialog-primary:hover { background: #bfff9e; }
.home-controller-frame {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  height: 100dvh;
  border: 0;
  background: #07080a;
}
.home-scan-dialog { width: min(520px, calc(100% - 24px)); height: min(680px, calc(100dvh - 32px)); padding: 0; border: 1px solid #84b96b; border-radius: 0; background: #0a160e; overflow: hidden; }
.home-scan-dialog::backdrop { background: #000c; }
.home-scan-dialog video { width: 100%; height: 100%; object-fit: cover; }
.home-scan-reticle { position: absolute; left: 50%; top: 48%; width: 65%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid #acff8b; box-shadow: 0 0 0 999px #0004; pointer-events: none; }
.home-scan-close { position: absolute; right: max(16px, env(safe-area-inset-right)); top: max(16px, env(safe-area-inset-top)); width: 44px; height: 44px; border: 1px solid #85b76d; background: #0c1b12e6; color: #e5ffd5; font-size: 28px; }
.home-scan-hint { position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); left: 16px; right: 16px; padding: 14px; margin: 0; background: #09190de6; color: #e0f4d8; text-align: center; font-size: 15px; line-height: 1.5; }
.home-phone-scan { display: none; }
/* Exactly the shared compact thresholds: no second scaling system. */
@media (max-width: 800px), (max-height: 500px) and (max-width: 1000px) {
  .home-fit { overflow: auto; }
  .home-frame { position: relative; top: auto; left: auto; width: 100%; height: auto; transform: none; grid-template-columns: minmax(0, 1fr); }
}
html[data-home-compact] .home-fit { overflow: auto; overscroll-behavior: contain; }
html[data-home-compact] .home-frame { position: relative; top: auto; left: auto; width: 100%; height: auto; transform: none; grid-template-columns: minmax(0, 1fr); }
html[data-home-compact] .cursor-stage { display: none; }
html[data-home-compact] .home { width: min(100%, 520px); height: auto; min-height: var(--home-vh, 100dvh); display: flex; flex-direction: column; gap: 0; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
html[data-home-compact] .home :is(.home-nav, .home-auth-actions, .home-view-window) { display: none; }
html[data-home-compact] .home-header { flex: none; min-height: 55px; height: 55px; padding: 0; }
html[data-home-compact] .home-brand { font-size: 25px; gap: 8px; }
html[data-home-compact] .brand-mark { width: 30px; height: 34px; }
html[data-home-compact] .home-phone-scan { display: block; padding-top: 32px; }
.home-phone-scan .eyebrow { font-size: 10px; letter-spacing: .9px; }
.home-phone-scan h1 { margin: 13px 0; font: 400 clamp(32px, 8.6vw, 45px)/1.1 var(--home-display); letter-spacing: -.5px; }
.home-phone-scan h1 span { color: var(--home-green); }
.home-phone-scan > p:not(.eyebrow, .phone-note) { font-size: 14px; line-height: 1.65; color: #b0bfa7; margin: 0 0 22px; }
.home-scan-hit { display: flex; flex-direction: column; align-items: center; width: 100%; border: 1px solid #4d7041; border-top: 2px solid #95c87b; border-radius: 0; padding: 25px 22px 17px; color: #b7ee9b; background: radial-gradient(ellipse at 50% 20%, #37552e55, transparent 70%), #122018; }
.home-scan-hit:hover { background-color: #1b2f20; }
.home-scan-art { display: block; position: relative; width: 78px; height: 78px; margin: 0 auto 23px; }
.home-scan-art svg { width: 100%; height: 100%; }
.home-scan-art i { position: absolute; top: 23%; left: 17%; width: 66%; height: 2px; background: #f0ffda; box-shadow: 0 0 10px #c4ff93; animation: scan-line 3s steps(10, end) infinite; }
@keyframes scan-line { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(41px); } }
.home-scan-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 49px; padding: 12px 16px; color: #132b11; background: var(--home-green); font-size: 16px; font-weight: 700; }
.home-scan-cta svg { width: 16px; height: 16px; }
.home-scan-caption { margin-top: 12px; font: 10px "Courier New", monospace; letter-spacing: .5px; color: #acba9d; }
.phone-steps { display: grid; gap: 17px; margin: 25px 0 24px; padding: 0; list-style: none; }
.phone-steps li { display: flex; gap: 13px; align-items: flex-start; }
.phone-steps li > span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; color: #adcf93; border: 1px solid #364e30; background: #16231a; font: 11px "Courier New", monospace; }
.phone-steps strong { font-size: 13px; color: #d2e5c2; font-weight: 650; }
.phone-steps p { font-size: 11px; color: #9dac94; margin: 4px 0 0; line-height: 1.5; }
.phone-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #a1b094; margin: 0 0 26px; }
.phone-note svg { width: 15px; height: 15px; color: #93b578; }
html[data-home-compact] .home-foot { margin-top: auto; padding-top: 14px; flex-wrap: wrap; gap: 15px; }
html[data-home-compact] .home-foot nav { margin: 0; gap: 8px 18px; flex-wrap: wrap; }
html[data-home-compact] .home-foot :is(a, button) { font-size: 11px; }
html[data-home-compact] .home-fs { display: none; }
.home-page.phone-page {
  display: block;
  height: var(--home-vh, 100svh);
  min-height: var(--home-vh, 100svh);
}
.home-page.phone-page .phone {
  width: min(100%, 520px);
  margin: 0 auto;
  gap: 16px;
  height: var(--home-vh, 100svh);
  min-height: var(--home-vh, 100svh);
  display: flex;
  flex-direction: column;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: none;
}
.home-page.phone-page .home-foot {
  margin-top: auto;
  width: 100%;
  padding-top: 14px;
}
.home-page.phone-page .home-header {
  flex: none;
  width: 100%;
  min-height: 55px;
  height: 55px;
  margin: 0 0 8px;
}
.home-page.phone-page .phone > h1 {
  margin: 4px 0 10px;
  font: 400 clamp(32px, 8.6vw, 45px)/1.1 var(--home-display);
  letter-spacing: -.5px;
}
.home-page.phone-page .phone > h1 span { color: var(--home-green); }
.home-page.phone-page .eyebrow { font-size: 10px; letter-spacing: .9px; }
.home-page.phone-page .phone-lead,
.home-page.phone-page .phone > .phone-lead {
  margin: 0;
  color: #b0bfa7;
  font-size: 14px;
  line-height: 1.65;
}
.home-page.phone-page .status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--home-line);
  border-radius: 0;
  background: var(--home-panel);
  color: #c5d6bf;
  font-size: 14px;
  line-height: 1.45;
}
.home-page.phone-page .status.error {
  border-color: #a9575e;
  border-left: 4px solid #ff6673;
  background: #2a1519;
  color: #ffd9dc;
}
.home-page.phone-page .phone button {
  border-radius: 0;
}
.home-page.phone-page .phone .home-scan-cta {
  border: 1px solid #caffac;
  background: var(--home-green);
  color: #132b11;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
}
.home-page.phone-page .phone .mp-cta {
  border: 1px solid #4a734c;
  background: #1b3420;
  color: #c9efb5;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 650;
}
.home-page.phone-page .phone .auth-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #d9e9d2;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}
.home-page.phone-page .phone .auth-menu button.danger { color: #ffb4c0; }
.home-page.phone-page #joinCodeInput {
  font: 600 18px/1 "Courier New", monospace;
  letter-spacing: 2px;
  text-align: left;
  padding: 10px 13px;
}
.home-page.phone-page .phone .home-play-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid #caffac;
  background: var(--home-green);
  color: #153014;
  font-size: 19px;
  font-weight: 750;
  line-height: 1;
  text-transform: none;
  box-shadow: 0 4px 0 #070e0960;
  transition: background .16s, border-color .16s, color .16s;
}
.home-page.phone-page .phone .home-play-cta svg { width: 19px; height: 19px; }
.home-page.phone-page .phone .home-play-cta:is(:hover, :focus-visible) { background: #bbffa2; }
.home-page.phone-page .phone .home-play-cta-quick {
  background: #1b3d2c;
  border-color: #5c9770;
  color: #bff3c3;
}
.home-page.phone-page .phone .home-play-cta-quick:is(:hover, :focus-visible) {
  background: #27553b;
  border-color: #75ab82;
  color: #d1f5d4;
}
.home-page.phone-page .auth-user-summary {
  width: 100%;
  min-height: 49px;
  padding: 8px 14px;
  border: 1px solid var(--home-line);
  border-radius: 0;
  background: #15221a;
  font-size: 16px;
}
.home-page.phone-page .auth-menu {
  border-radius: 0;
  border: 1px solid #527348;
  background: #112017;
}
.home-page.phone-page .join-form {
  gap: 12px;
}
.home-page.phone-page .join-form label {
  color: #d9e9d2;
  font-size: 13px;
  font-weight: 650;
}
.home-page.phone-page .mp-join-row {
  width: 100%;
  height: 49px;
}
.home-page.phone-page .mp-join-row input {
  border: 0;
  border-radius: 0;
  padding: 10px 13px;
  background: #080f0b;
}
.home-page.phone-page .home-scan-cta {
  width: 100%;
}
.home-page.phone-page .join-code h2 {
  margin: 6px 0 10px;
  font: 400 clamp(28px, 7vw, 40px)/1.1 var(--home-display);
  letter-spacing: -.5px;
  color: var(--home-ink);
}
.home-page.phone-page .pad {
  border-radius: 0;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
  color: #c5d6bf;
}
.home-page.phone-page .row .mp-cta,
.home-page.phone-page .row .home-scan-cta {
  flex: 1;
  width: auto;
  justify-content: center;
}
.home-page.phone-page.has-game-panel .phone {
  gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.home-page.phone-page.has-game-panel .home-header {
  min-height: 42px;
  height: 42px;
  margin: 0;
}
.home-page.phone-page.has-game-panel .home-brand {
  transform: scale(.84);
  transform-origin: left center;
}
.home-page.phone-page.has-game-panel .status {
  padding: 7px 10px;
  font-size: 11px;
}
@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after, .home-toast,
  .home-page.phone-page *, .home-page.phone-page *::before, .home-page.phone-page *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------------------------------
   Match course (public/display/flow-screen.js, public/phone-flow.js): the staging card before a
   game, the standings between rounds, the phone's results. Same look for every game. */
#roomApp .room-stage[data-flow="staging"] .room-lobby-side,
#roomApp .room-stage[data-flow="staging"] .catalog,
#roomApp .room-stage[data-flow="round"] .field {
  visibility: hidden;
}

:is(#roomApp, .room-game-layer) .flow-staging,
:is(#roomApp, .room-game-layer) .flow-round {
  position: absolute;
  inset: 17% 8% 6%;
  z-index: 6;
  display: grid;
  align-content: start;
  gap: 2.2vh;
  color: var(--home-ink);
}

:is(#roomApp, .room-game-layer) .flow-staging[hidden],
:is(#roomApp, .room-game-layer) .flow-round[hidden] {
  display: none;
}

:is(#roomApp, .room-game-layer) .flow-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 3vw;
  padding: 3vh 2.4vw;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
}

:is(#roomApp, .room-game-layer) .flow-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--home-line);
}

:is(#roomApp, .room-game-layer) .flow-eyebrow {
  margin: 0 0 1vh;
  color: var(--home-green);
  font-size: clamp(11px, 0.9vw, 16px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

:is(#roomApp, .room-game-layer) .flow-copy h2,
:is(#roomApp, .room-game-layer) .flow-round h2 {
  margin: 0 0 1.4vh;
  font: 400 clamp(28px, 3.4vw, 64px) / 1 var(--home-display);
}

:is(#roomApp, .room-game-layer) .flow-goal {
  margin: 0 0 1.6vh;
  color: #d7e5cf;
  font-size: clamp(15px, 1.35vw, 26px);
  line-height: 1.35;
}

:is(#roomApp, .room-game-layer) .flow-controls {
  display: grid;
  gap: 0.8vh;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--home-muted);
  font-size: clamp(13px, 1.05vw, 20px);
}

:is(#roomApp, .room-game-layer) .flow-controls li::before {
  content: "▸ ";
  color: var(--home-green);
}

:is(#roomApp, .room-game-layer) .flow-timer {
  display: grid;
  justify-items: center;
  min-width: 9vw;
  color: var(--home-green);
}

:is(#roomApp, .room-game-layer) .flow-timer strong {
  font: 400 clamp(56px, 7vw, 140px) / 1 var(--home-display);
}

:is(#roomApp, .room-game-layer) .flow-timer span,
:is(#roomApp, .room-game-layer) .flow-hint {
  color: var(--home-muted);
  font-size: clamp(12px, 0.95vw, 18px);
}

:is(#roomApp, .room-game-layer) .flow-ready,
:is(#roomApp, .room-game-layer) .flow-round ol {
  display: flex;
  flex-wrap: wrap;
  gap: 1vw;
  margin: 0;
  padding: 0;
  list-style: none;
}

:is(#roomApp, .room-game-layer) .flow-ready li {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 1vh 1.1vw;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
  font-size: clamp(13px, 1.1vw, 21px);
}

:is(#roomApp, .room-game-layer) .flow-ready li.is-ready {
  border-color: var(--home-green);
}

:is(#roomApp, .room-game-layer) .flow-ready li i,
:is(#roomApp, .room-game-layer) .flow-round li i {
  width: 0.8em;
  height: 0.8em;
}

:is(#roomApp, .room-game-layer) .flow-ready li b {
  color: var(--home-muted);
  font-weight: 600;
}

:is(#roomApp, .room-game-layer) .flow-ready li.is-ready b {
  color: var(--home-green);
}

:is(#roomApp, .room-game-layer) .flow-hint {
  margin: 0;
}

:is(#roomApp, .room-game-layer) .flow-round {
  inset: 18% 22% auto;
  padding: 3vh 2.6vw;
  border: 1px solid var(--home-line);
  background: var(--home-panel);
}

:is(#roomApp, .room-game-layer) .flow-round ol {
  flex-direction: column;
  gap: 1vh;
  font-size: clamp(14px, 1.3vw, 24px);
}

:is(#roomApp, .room-game-layer) .flow-round li {
  display: grid;
  grid-template-columns: 2.2em auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.7em;
}

:is(#roomApp, .room-game-layer) .flow-round li em {
  color: var(--home-muted);
  font-style: normal;
}

:is(#roomApp, .room-game-layer) .flow-round li small {
  color: var(--home-green);
}

/* Phone */
.phone-flow {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 18px;
  border: 1px solid var(--home-line, #2d4437);
  background: var(--home-panel, #111e18);
  color: var(--home-ink, #edf5eb);
  text-align: center;
}

.phone-flow[hidden] {
  display: none;
}

.phone-flow .eyebrow {
  margin: 0;
  color: var(--home-green, #a2fa86);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.phone-flow h2 {
  margin: 0;
  font: 400 28px/1.1 var(--home-display, monospace);
}

.phone-flow-me {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--home-muted, #9aaea0);
  font-size: 14px;
}

.phone-flow-me i {
  width: 14px;
  height: 14px;
  background: var(--me);
}

.phone-flow-me b {
  color: var(--home-ink, #edf5eb);
}

.phone-flow-goal {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.phone-flow-controls {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--home-muted, #9aaea0);
  font-size: 14px;
  text-align: left;
}

.phone-flow-controls li::before {
  content: "▸ ";
  color: var(--home-green, #a2fa86);
}

.phone-flow-count {
  margin: 0;
  color: var(--home-muted, #9aaea0);
}

.phone-flow-count strong {
  color: var(--home-green, #a2fa86);
  font: 400 44px/1 var(--home-display, monospace);
}

.phone-flow-button {
  min-height: 56px;
  border: 0;
  background: var(--home-green, #a2fa86);
  color: #0c2015;
  font-size: 20px;
  font-weight: 800;
}

.phone-flow-button.is-quiet {
  border: 1px solid var(--home-line, #2d4437);
  background: transparent;
  color: var(--home-ink, #edf5eb);
}

.phone-flow-button.is-chosen {
  outline: 3px solid var(--home-ink, #edf5eb);
  outline-offset: 2px;
}

.phone-flow-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.phone-flow-done,
.phone-flow-note {
  margin: 0;
  color: var(--home-muted, #9aaea0);
}

.phone-flow-done {
  color: var(--home-green, #a2fa86);
  font-weight: 700;
}

.phone-flow-place {
  margin: 0;
  font: 400 34px/1.1 var(--home-display, monospace);
}

.phone-flow-score {
  margin: 0;
  color: var(--home-green, #a2fa86);
  font-size: 26px;
  font-weight: 800;
}

.phone-flow-score small {
  color: var(--home-muted, #9aaea0);
  font-size: 16px;
}

.phone-flow-record,
.phone-flow-xp {
  margin: 0;
  color: #ffd84a;
  font-weight: 700;
}

/* The results replace the finished game's panel; the course panel shows them for every game. */
body[data-flow="results"] #gamePanel,
body[data-flow="round"] #gamePanel,
body[data-flow="staging"] #gamePanel {
  display: none !important;
}

:is(#roomApp, .room-game-layer) .flow-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2vw;
}

:is(#roomApp, .room-game-layer) .flow-cancel {
  min-width: 180px;
  min-height: 72px;
  padding: 1vh 1.4vw;
  border: 1px solid var(--home-line);
  background: transparent;
  color: var(--home-ink);
  font-size: clamp(12px, 0.95vw, 18px);
  pointer-events: auto;
}

/* Results, the same for every game: podium rows, the game's unit, highlights, "Nochmal". */
:is(#roomApp, .room-game-layer) .results {
  border-radius: 0;
  border-color: var(--home-line);
  background: rgb(17 30 24 / 0.96);
  color: var(--home-ink);
}

:is(#roomApp, .room-game-layer) .results .eyebrow {
  color: var(--home-green);
  letter-spacing: 0.14em;
}

:is(#roomApp, .room-game-layer) .results h2 {
  font: 400 clamp(28px, 3vw, 54px) / 1.05 var(--home-display);
  letter-spacing: 0;
}

:is(#roomApp, .room-game-layer) .results li {
  align-items: center;
  border-radius: 0;
  border: 1px solid var(--home-line);
  background: rgb(255 255 255 / 0.03);
}

:is(#roomApp, .room-game-layer) .results li span {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

:is(#roomApp, .room-game-layer) .results li em {
  color: var(--home-muted);
  font-style: normal;
}

:is(#roomApp, .room-game-layer) .results li i {
  width: 0.8em;
  height: 0.8em;
}

:is(#roomApp, .room-game-layer) .results li small {
  color: var(--home-muted);
  font-size: 0.75em;
}

:is(#roomApp, .room-game-layer) .results li.place-1 {
  border-color: var(--home-green);
  font-size: 1.15em;
}

:is(#roomApp, .room-game-layer) .results li.place-1 strong {
  color: var(--home-green);
}

:is(#roomApp, .room-game-layer) .results-highlights {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: #d7e5cf;
}

:is(#roomApp, .room-game-layer) .results-highlights[hidden] {
  display: none;
}

:is(#roomApp, .room-game-layer) .results-highlights li {
  display: block;
  padding: 0;
  border: 0;
  background: none;
}

:is(#roomApp, .room-game-layer) .results-highlights li::before {
  content: "★ ";
  color: #ffd84a;
}

:is(#roomApp, .room-game-layer) .results .start-game {
  min-height: 96px;
  border-radius: 0;
}

:is(#roomApp, .room-game-layer) .results #playAgain {
  background: var(--home-green);
  color: #0c2015;
}

:is(#roomApp, .room-game-layer) .results #otherGame {
  border: 1px solid var(--home-line);
  background: transparent;
  color: var(--home-ink);
}

/* The results' choices wait RESULTS_LOCK_MS (match-flow.js) so the last shot of a match does
   not press them: dimmed while a bar fills, then pressable. The same on the phone. */
:is(#roomApp, .room-game-layer) .results :is(#playAgain, #otherGame).is-locked,
.phone-flow-button.is-locked {
  opacity: .62;
  cursor: default;
  background-image: linear-gradient(#ffffff3d, #ffffff3d);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  animation: results-unlock var(--lock-ms, 3s) linear forwards;
}
@keyframes results-unlock { to { background-size: 100% 100%; } }

:is(#roomApp, .room-game-layer) .result-return {
  color: var(--home-muted);
}

/* What the phone cursor may press (data-cursor-target, public/cursor-targets.js), one look
   everywhere: lit, a target gets the QR frame's green pixel corners and a green fill; pressed,
   it gives a little; a press that needs a second tap turns amber. Header, footer, music,
   fullscreen and account are for the mouse and never light up for the phone. */
:where([data-cursor-target]) { position: relative; }
[data-cursor-target]::after {
  --corner: #b1ec8e;
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(var(--corner) 0 0) left top / 14px 3px no-repeat,
    linear-gradient(var(--corner) 0 0) left top / 3px 14px no-repeat,
    linear-gradient(var(--corner) 0 0) right top / 14px 3px no-repeat,
    linear-gradient(var(--corner) 0 0) right top / 3px 14px no-repeat,
    linear-gradient(var(--corner) 0 0) left bottom / 14px 3px no-repeat,
    linear-gradient(var(--corner) 0 0) left bottom / 3px 14px no-repeat,
    linear-gradient(var(--corner) 0 0) right bottom / 14px 3px no-repeat,
    linear-gradient(var(--corner) 0 0) right bottom / 3px 14px no-repeat;
  transition: opacity 90ms linear, inset 120ms ease-out;
}
:is(.home-header, #homeArcadeView, #homeChallengesView, #homeLeaderboardView, #homeShopView, #homeProfileView, #roomApp, .room-game-layer) [data-cursor-target].is-hot {
  border-color: #96cf80;
  box-shadow: inset 0 0 0 100vmax #9be07a1f, 0 0 0 1px #9be07a, 0 0 22px #63bd7233;
}
[data-cursor-target]:is(.is-hot, .is-confirming)::after { inset: 0; opacity: 1; }
[data-cursor-target].is-pressed { scale: .97; transition: scale 60ms ease-out; }
:is(.home-header, #homeArcadeView, #homeChallengesView, #homeLeaderboardView, #homeShopView, #homeProfileView, #roomApp, .room-game-layer) [data-cursor-target].is-pressed {
  box-shadow: inset 0 0 0 100vmax #9be07a40, 0 0 0 2px #b1ec8e;
}
:is(.home-header, #homeArcadeView, #homeChallengesView, #homeLeaderboardView, #homeShopView, #homeProfileView, #roomApp, .room-game-layer) [data-cursor-target].is-confirming {
  border-color: #e8c85a;
  color: #ffe9a6;
  box-shadow: inset 0 0 0 100vmax #e8c85a26, 0 0 0 1px #e8c85a;
}
[data-cursor-target].is-confirming::after { --corner: #f3d676; }
@media (prefers-reduced-motion: reduce) {
  [data-cursor-target]::after { transition: none; }
  [data-cursor-target].is-pressed { scale: none; }
}

/* The pages beside the Spielhalle (public/home/pages.js): hero on top, panels below, no
   scrolling (the phone cursor cannot scroll), everything big enough for the phone. */
.home-level-link { display: flex; align-items: center; gap: 10px; margin-left: auto; min-height: 44px; padding: 0 16px; border: 1px solid #466143; background: #16281b; color: var(--home-green); text-decoration: none; font-size: 15px; font-weight: 650; white-space: nowrap; }
.home-level-link svg { width: 14px; height: 14px; }
.home-page:not(.phone-cursor-connected) .home-level-link:hover { border-color: #96cf80; background: #243e29; }
.home-page-view { display: grid; grid-template-rows: 96px minmax(0, 1fr); gap: 24px; }
.page-hero { display: flex; align-items: center; justify-content: space-between; gap: 50px; min-width: 0; }
.page-hero h1 { margin: 0; color: #f0f7e5; font: 400 62px/.9 var(--home-display); letter-spacing: -1.5px; }
.page-hero h1 span { color: var(--home-green); }
.page-hero > p { margin: 0 40px 0 auto; color: #aebfa8; font-size: 17px; line-height: 1.55; text-align: right; }
.page-panel { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 24px 28px; }
.page-panel::after { content: ""; position: absolute; left: -1px; top: -1px; width: 10px; height: 10px; border-top: 2px solid var(--home-green); border-left: 2px solid var(--home-green); pointer-events: none; }
.page-panel h2 { margin: 6px 0 14px; color: #e6f1df; font: 400 30px/1.05 var(--home-display); }
.page-note { margin: 0; color: #9fb49a; font-size: 15px; line-height: 1.5; }
.page-bar { --fill: 0%; display: block; height: 22px; padding: 3px; border: 1px solid #51724b; background: #07120d; }
.page-bar > i { display: block; width: var(--fill); height: 100%; background: #4ada66; box-shadow: inset 0 2px #e5ffd580, inset 0 -3px #074b2890; transition: width .5s cubic-bezier(.18, .75, .28, 1); }
.page-bar-caption { margin: 8px 0 0; color: #b5ed9a; font: 600 15px "Courier New", monospace; }
.unlock-art { display: block; flex: none; width: 36px; height: 36px; }
.unlock-art-name-pink { background: #ff7ad0; box-shadow: 0 0 14px #ff7ad066; clip-path: polygon(0 20%, 100% 20%, 100% 80%, 0 80%); }
.unlock-art-trail { background: linear-gradient(90deg, transparent, #7dff92); clip-path: polygon(0 40%, 100% 15%, 100% 85%, 0 60%); }
.unlock-art-frame { border: 5px solid #d0d480; }
.unlock-art-prestige { background: conic-gradient(#fff3a6, #e0a92e, #fff3a6, #e0a92e, #fff3a6); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }

/* Challenges */
.challenges-layout { display: grid; grid-template-columns: 1.15fr .85fr 1.2fr; grid-template-rows: minmax(0, 1fr) 244px; gap: 24px; min-height: 0; }
.level-road { grid-column: 1 / -1; }
.level-card-main { display: flex; align-items: center; gap: 28px; margin: 14px 0 18px; }
.level-card-num { display: grid; place-items: center; width: 150px; height: 150px; flex: none; border: 3px solid var(--home-green); background: #15261b; color: var(--home-green); font: 400 84px/1 var(--home-display); box-shadow: 0 0 0 6px #0c1a12, 0 0 0 7px #3c5a3f; }
.level-card-copy { flex: 1; min-width: 0; }
.level-card-copy h2 { margin: 0 0 14px; }
.next-unlock { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 14px 16px; border: 1px solid #3c5a3f; background: #0f1b15; }
.next-unlock:empty { display: none; }
.next-unlock span { display: grid; gap: 3px; min-width: 0; }
.next-unlock small { color: #8fb584; font: 600 11px "Courier New", monospace; letter-spacing: 1.5px; }
.next-unlock strong { color: #e6f1df; font-size: 17px; }
.next-unlock em { color: var(--home-green); font: 600 14px "Courier New", monospace; font-style: normal; }
.page-note-guest { margin-top: auto; padding: 12px 14px; border: 1px dashed #4a6a48; color: #cfe6c4; }
.page-note-guest[hidden] { display: none; }
.xp-rules-list { list-style: none; margin: 0 0 auto; padding: 0; }
.xp-rules-list li { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px solid #243528; color: #d7e5cf; font-size: 18px; }
.xp-rules-list strong { color: var(--home-green); font: 400 26px/1 var(--home-display); }
.xp-rules .page-note { margin-top: 14px; }
.challenge-ghosts { list-style: none; display: grid; gap: 10px; margin: 14px 0 0; padding: 0; }
.challenge-ghosts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind kind" "title count" "bar bar"; gap: 4px 12px; padding: 10px 14px; border: 1px dashed #3c5a3f; background: #0f1b15; opacity: .8; }
.challenge-kind { grid-area: kind; color: #8fb584; font: 600 11px "Courier New", monospace; letter-spacing: 1.5px; }
.challenge-ghosts strong { grid-area: title; color: #dae7d0; font-size: 17px; }
.challenge-ghosts small { grid-area: count; color: #9fb49a; font: 600 14px "Courier New", monospace; }
.challenge-ghosts .page-bar { grid-area: bar; height: 12px; padding: 2px; }
.level-road-head { display: flex; align-items: baseline; gap: 20px; }
.level-road-head h2 { margin: 0; }
.level-road-range { margin-left: auto; color: #9fb49a; font: 600 15px "Courier New", monospace; }
.level-road-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; gap: 24px; flex: 1; min-height: 0; margin-top: 16px; }
.road-step { display: grid; place-items: center; border: 1px solid #4a734c; background: #1b3420; color: #c9efb5; }
.road-step svg { width: 28px; height: 28px; }
.road-step[data-road-step="-1"] svg { transform: rotate(180deg); }
.road-step:disabled { opacity: .35; }
.home-page:not(.phone-cursor-connected) .road-step:not(:disabled):hover { border-color: #96cf80; background: #294b2e; }
.level-road-list { position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.level-road-list::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 4px; background: #243528; }
.road-level { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; text-align: center; }
.road-level-num { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid #3a5240; background: #101c15; color: #8fa48a; font: 400 28px/1 var(--home-display); }
.road-level.has-unlock .road-level-num { border-color: #b8bc6e; }
.road-level.is-reached .road-level-num { border-color: #5f9a5a; background: #1a3321; color: #cfeec0; }
.road-level.is-current .road-level-num { border-color: var(--home-green); background: var(--home-green); color: #0c2015; box-shadow: 0 0 22px #63bd7255; }
.road-xp { color: #71866f; font: 600 12px "Courier New", monospace; }
.road-unlock { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #e6f1df; font-size: 14px; }

/* Shop */
.shop-layout { display: grid; grid-template-columns: 440px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 24px; min-height: 0; }
.shop-soon { grid-column: 2; grid-row: 1 / span 2; }
.shop-preview-stage { --preview-color: #a2fa86; position: relative; display: grid; place-items: center; flex: 1; min-height: 100px; margin: 10px 0 10px; border: 1px solid #243528; background: repeating-conic-gradient(#101c15 0% 25%, #0d1712 0% 50%) 0 0 / 24px 24px; }
.shop-preview-cursor { position: relative; width: 84px; height: 96px; transform: translate(-30px, -14px); filter: drop-shadow(0 0 16px color-mix(in srgb, var(--preview-color) 45%, transparent)); }
.shop-preview-cursor .brand-cursor-outline { background: var(--preview-color); }
.shop-preview-name { position: absolute; left: calc(50% + 2px); top: calc(50% + 34px); padding: 4px 10px; border: 1px solid var(--preview-color); background: #0c1a12; color: var(--preview-color); font: 600 15px "Courier New", monospace; }
.shop-preview-stage.is-name-pink .shop-preview-name { color: #ff7ad0; }
.shop-unlocks { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.shop-unlock { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 7px 12px; border: 1px solid #243528; background: #0f1b15; opacity: .72; }
.shop-unlock.is-owned { border-color: #3c5a3f; opacity: 1; }
.shop-unlock strong { display: block; color: #e6f1df; font-size: 16px; }
.shop-unlock em { color: #9fb49a; font: 600 12px "Courier New", monospace; font-style: normal; white-space: nowrap; }
.shop-unlock.is-owned em { color: var(--home-green); }
.shop-soon-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.shop-soon-head h2 { margin-bottom: 0; }
.shop-tabs { display: flex; gap: 24px; }
.shop-tabs button { min-width: 150px; min-height: 64px; padding: 0 22px; border: 1px solid #466143; background: #16281b; color: #b9dca8; font-size: 18px; font-weight: 650; }
.shop-tabs button[aria-pressed="true"] { border-color: var(--home-green); background: var(--home-green); color: #0c2015; }
.home-page:not(.phone-cursor-connected) .shop-tabs button[aria-pressed="false"]:hover { border-color: #96cf80; background: #243e29; }
.shop-items { display: grid; flex: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 24px; min-height: 0; margin: 0 0 16px; padding: 0; list-style: none; }
.shop-items > li { display: flex; min-height: 0; }
.shop-item { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; min-height: 0; padding: 16px; border: 1px solid #2f4634; background: #0f1b15; color: #e6f1df; font: inherit; text-align: center; }
button.shop-item.is-selected { border-color: var(--home-green); background: #15261b; }
.home-page:not(.phone-cursor-connected) button.shop-item:hover { border-color: #96cf80; }
.shop-item strong { font-size: 17px; }
.shop-item small { color: #9fb49a; font: 600 12px "Courier New", monospace; letter-spacing: 1.2px; text-transform: uppercase; }
.shop-item-art { display: block; width: 84px; height: 84px; }
.shop-items .shop-item-art { color: var(--design-color, #a2fa86); }
.shop-item-art svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 10px color-mix(in srgb, currentColor 35%, transparent)); }
/* The preview wears the chosen design (public/cursor-designs.js) in the chosen player colour. */
.shop-preview-stage.has-design .shop-preview-cursor { display: none; }
.shop-preview-design { display: none; color: var(--preview-color); transform: translate(-30px, -6px); }
.shop-preview-stage.has-design .shop-preview-design { display: block; }
.shop-preview-design svg { display: block; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--preview-color) 45%, transparent)); }
.shop-equip { min-height: 48px; margin: 0; padding: 0 18px; border: 0; background: var(--home-green); color: #0c2015; font-size: 17px; font-weight: 700; }
.shop-equip.is-quiet { border: 1px solid #466143; background: #16281b; color: #c9efb5; }
.shop-equip[hidden], #shopNote[hidden] { display: none; }
.shop-item.is-owned small { color: #b5ed9a; }
.shop-item.is-equipped { border-color: var(--home-green); }
.shop-item.is-equipped small { color: var(--home-green); }
.shop-colors { display: flex; gap: 12px; margin: 0 0 10px; }
.shop-color { flex: 1; max-width: 52px; height: 46px; padding: 0; border: 3px solid transparent; background: var(--swatch); box-shadow: inset 0 0 0 2px #0f1b15; }
.shop-color.is-selected { border-color: #f0f7e5; }
.shop-art-fire { background: linear-gradient(90deg, transparent, #ff5a1f 45%, #ffd84a); clip-path: polygon(0 46%, 100% 18%, 100% 82%, 0 54%); }
.shop-art-lightning { background: #bfe8ff; clip-path: polygon(58% 0, 18% 56%, 44% 56%, 30% 100%, 82% 40%, 56% 40%, 72% 0); }
.shop-art-ice { background: linear-gradient(135deg, #e6fbff, #7fd6ff); clip-path: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%); }
.shop-art-stardust { background: radial-gradient(circle, #fff 0 3px, transparent 4px) 0 0 / 28px 28px, radial-gradient(circle, #ffd84a 0 2px, transparent 3px) 14px 14px / 28px 28px; }
.shop-art-neon { background: linear-gradient(90deg, transparent, #00f0ff 55%, #ff3df0); clip-path: polygon(0 45%, 100% 36%, 100% 64%, 0 55%); }
.shop-art-matrix { background: linear-gradient(#0f1b15, transparent 70%), repeating-linear-gradient(90deg, #58e07a 0 6px, transparent 6px 16px); }
.shop-art-confetti { background: linear-gradient(#ff4d5e 0 0) 10% 20% / 12px 12px, linear-gradient(#ffd84a 0 0) 62% 8% / 12px 12px, linear-gradient(#4d8dff 0 0) 30% 72% / 12px 12px, linear-gradient(#58e07a 0 0) 84% 60% / 12px 12px, linear-gradient(#a66bff 0 0) 50% 44% / 10px 10px; background-repeat: no-repeat; }
.shop-art-rainbow { background: linear-gradient(#ff4d5e 0 16%, #ff9a3d 0 33%, #ffd84a 0 50%, #58e07a 0 66%, #4d8dff 0 83%, #a66bff 0) center / 100% 60% no-repeat; }
.shop-art-shades { background: linear-gradient(#f0f7e5 0 0) 8% 40% / 38% 30% no-repeat, linear-gradient(#f0f7e5 0 0) 92% 40% / 38% 30% no-repeat, linear-gradient(#f0f7e5 0 0) center 34% / 100% 10% no-repeat; }
.shop-art-visor { background: linear-gradient(90deg, #00f0ff, #ff3df0) center / 100% 30% no-repeat; }
.shop-art-vr { background: linear-gradient(#e6f1df 0 0) center / 90% 46% no-repeat, linear-gradient(#e6f1df 0 0) center / 20% 70% no-repeat; }
.shop-art-patch { background: radial-gradient(circle at 36% 46%, #e6f1df 0 22%, transparent 23%), linear-gradient(20deg, transparent 47%, #e6f1df 47% 53%, transparent 53%); }
.shop-art-laser { background: linear-gradient(#ff2b2b 0 0) 20% 40% / 80% 9% no-repeat, linear-gradient(#ff2b2b 0 0) 20% 62% / 80% 9% no-repeat; }
.shop-art-teeth { background: repeating-linear-gradient(90deg, #fff 0 10px, #36433a 10px 12px) center / 84% 30% no-repeat; }
.shop-art-hat { background: linear-gradient(#e6f1df 0 0) center 82% / 100% 14% no-repeat, linear-gradient(#e6f1df 0 0) center 30% / 60% 56% no-repeat; }
.shop-art-crown { background: #ffd84a; clip-path: polygon(0 82%, 0 24%, 25% 52%, 50% 14%, 75% 52%, 100% 24%, 100% 82%); }

/* Profile */
.profile-guest { display: grid; place-items: center; min-height: 0; }
.profile-guest[hidden], .profile-layout[hidden] { display: none; }
.profile-guest-card { width: min(940px, 100%); padding: 40px 48px; }
.profile-guest-card h2 { margin-bottom: 28px; font-size: 44px; }
.profile-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; margin: 0 0 32px; padding: 0; list-style: none; }
.profile-benefits li { display: flex; align-items: flex-start; gap: 16px; }
.profile-benefits svg { width: 36px; height: 36px; flex: none; color: var(--home-green); }
.profile-benefits span { color: #9fb49a; font-size: 15px; line-height: 1.45; }
.profile-benefits strong { display: block; color: #e6f1df; font-size: 18px; }
.profile-auth-btn { display: flex; align-self: flex-start; align-items: center; gap: 12px; min-height: 64px; margin-bottom: 16px; padding: 0 28px; border: 0; background: var(--home-green); color: #0c2015; font-size: 20px; font-weight: 700; }
.profile-auth-btn svg { width: 18px; height: 18px; }
.profile-auth-btn:is(:hover, :focus-visible) { background: #c6ffb0; }
.profile-layout { display: grid; grid-template-columns: 420px minmax(0, 1fr) 460px; gap: 24px; min-height: 0; }
.profile-identity { display: flex; align-items: center; gap: 20px; margin: 4px 0 22px; }
.profile-identity img { width: 96px; height: 96px; flex: none; border: 2px solid #3c5a3f; image-rendering: pixelated; }
.profile-identity h2 { margin: 0 0 10px; font-size: 32px; overflow-wrap: anywhere; }
.profile-card .page-note { margin-top: 12px; }
.profile-account { display: grid; gap: 10px; margin-top: auto; }
.profile-account .eyebrow { grid-column: 1 / -1; }
.profile-account button { min-height: 44px; padding: 0 12px; border: 1px solid #3c5a3f; border-radius: 0; background: #15221a; color: #cfe6c4; font-size: 15px; font-weight: 600; }
.profile-account button:is(:hover, :focus-visible) { border-color: #96cf80; background: #1d3524; }
.profile-account button.danger { border-color: #6b3a44; color: #ffb4c0; }
.profile-account button[hidden] { display: none; }
.profile-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 12px 0 20px; }
.profile-totals div { min-width: 0; padding: 14px 16px; border: 1px solid #2f4634; background: #0f1b15; }
.profile-totals dt { color: #9fb49a; font: 600 12px "Courier New", monospace; letter-spacing: 1.2px; text-transform: uppercase; }
.profile-totals dd { margin: 8px 0 0; overflow: hidden; color: var(--home-green); font: 400 28px/1.1 var(--home-display); text-overflow: ellipsis; white-space: nowrap; }
.profile-totals dd.is-text { padding-top: 5px; color: #e6f1df; font: 650 18px/1.2 "Segoe UI", system-ui, sans-serif; }
.profile-games { width: 100%; border-collapse: collapse; font-size: 16px; }
.profile-games :is(th, td) { padding: 9px 10px; border-bottom: 1px solid #243528; text-align: right; }
.profile-games thead th { color: #82927e; font: 600 12px "Courier New", monospace; letter-spacing: 1.2px; text-transform: uppercase; }
.profile-games :is(thead th:first-child, tbody th) { text-align: left; }
.profile-games tbody th { color: #dae5d3; font-weight: 600; }
.profile-games td { color: #c6eaa6; font: 600 15px "Courier New", monospace; font-variant-numeric: tabular-nums; }
.profile-games td.profile-empty, .profile-recent-list .profile-empty { color: #9fb49a; font: 15px "Segoe UI", system-ui, sans-serif; text-align: left; }
.profile-recent-list { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.profile-recent-list li:not(.profile-empty) { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "date title result" "date score xp"; gap: 4px 12px; padding: 12px 14px; border: 1px solid #2f4634; background: #0f1b15; }
.profile-recent-list li.is-win { border-color: #5f9a5a; }
.recent-date { grid-area: date; align-self: center; color: #82927e; font: 600 13px "Courier New", monospace; }
.profile-recent-list strong { grid-area: title; overflow: hidden; color: #e6f1df; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.recent-result { grid-area: result; color: #9fb49a; font: 600 13px "Courier New", monospace; text-align: right; }
.is-win .recent-result { color: #d5d483; }
.recent-score { grid-area: score; color: #c6eaa6; font: 600 14px "Courier New", monospace; }
.recent-xp { grid-area: xp; color: var(--home-green); font: 600 14px "Courier New", monospace; text-align: right; }

/* First-visit guide (public/home/tour.js). Outside the scaled stage, so it sizes to the window; it
   sits below the analytics bar (z-index 80) and leaves room for it through --tour-bar. */
.home-tour {
  position: fixed; inset: 0; z-index: 70; width: auto; height: auto; max-width: none; max-height: none;
  margin: 0; border: 0; padding: 24px 16px calc(16px + var(--tour-bar, 0px));
  background: #030a07d9; backdrop-filter: blur(4px); color: var(--home-ink); overflow: auto; overscroll-behavior: contain;
}
.home-tour[open] { display: grid; place-items: center; }
.home-tour-card {
  position: relative; display: grid; gap: 14px; width: min(580px, 100%); padding: 24px 28px 24px;
  border: 1px solid #55714a; border-top: 3px solid var(--home-green); background: #101d16; box-shadow: 0 20px 100px #000b;
}
.home-tour-close { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #45613b; background: transparent; color: #daefca; font: 24px/1 sans-serif; }
.home-tour-close:hover { background: #283d22; }
.home-tour .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; padding-right: 44px; color: #9fcf8a; font: 700 11px/1 "Courier New", monospace; letter-spacing: .14em; }
.home-tour-count { margin-left: auto; color: #6f8f78; letter-spacing: .08em; }
.home-tour-slides { display: grid; min-height: 0; }
.home-tour-slide { display: grid; gap: 12px; }
.home-tour.is-turning .home-tour-slide.is-active { animation: tour-in .32s steps(5) both; }
.home-tour-slide h2 { margin: 4px 0 0; color: #eef7e9; font: 400 34px/1.08 var(--home-display); letter-spacing: 0; }
.home-tour-slide h2 span { color: var(--home-green); }
.home-tour-slide h2:focus { outline: none; }
.home-tour-slide p { min-height: 4.8em; margin: 0; color: #b3c4aa; font-size: 15px; line-height: 1.6; }
.home-tour-nav { display: flex; align-items: center; gap: 10px; }
.home-tour-step, .home-tour-play { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid #45613b; border-radius: 0; background: #15221a; color: #daefca; }
.home-tour-step:hover:not(:disabled), .home-tour-play:hover { border-color: #79b86b; background: #1d3524; }
.home-tour-step svg { width: 18px; height: 18px; }
.home-tour-step[data-tour="prev"] svg { transform: scaleX(-1); }
.home-tour-page-btn:disabled, .home-tour-step:disabled { opacity: .35; }
.home-tour-dots { display: flex; flex: 1; gap: 6px; }
.home-tour-dots button { flex: 1; height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent; }
/* One lit bar: the page on show. While pages turn, the time left fills it; the others stay dark. */
.home-tour-dots i { position: relative; display: block; height: 4px; margin-block: 1px; overflow: hidden; background: #25382c; }
.home-tour-dots i::after { content: ""; position: absolute; inset: 0; background: var(--home-green); transform: scaleX(0); transform-origin: left center; }
.home-tour-dots button:hover i { background: #35503d; }
.home-tour-dots .is-active i { height: 6px; margin-block: 0; background: #4e7c47; box-shadow: 0 0 10px #a2fa8655; }
.home-tour-dots .is-active i::after { transform: none; }
.home-tour:is(.is-playing, .is-held) .home-tour-dots .is-active i::after { animation: tour-fill var(--tour-ms, 7s) linear both; }
.home-tour.is-held .home-tour-dots .is-active i::after { animation-play-state: paused; }
.home-tour-play span { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.home-tour-play.is-stopped span { width: 0; height: 0; border: 7px solid transparent; border-left: 12px solid currentColor; border-right: 0; margin-left: 4px; }
.home-tour-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; }
.home-tour-actions button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 18px; border-radius: 0; font-size: 16px; font-weight: 700; }
.home-tour-ghost { border: 1px solid #2d4437; background: #15221a; color: #b7cbb5; }
.home-tour-ghost:hover { border-color: #79b86b; background: #1d3524; color: #d9f7cd; }
.home-tour-primary { border: 1px solid #c0ffa4; background: var(--home-green); color: #163416; }
.home-tour-primary:hover { background: #bfff9e; }
.home-tour-primary svg { width: 18px; height: 18px; }
.home-tour :is(button, h2):focus-visible { outline: 3px solid var(--home-green); outline-offset: 3px; }
/* The last page points at the test. */
.home-tour[data-page="4"] .home-tour-primary { animation: tour-nudge 1.6s steps(2) infinite; }

/* Scenes: flat pixel shapes, one loop per page. The still frame is a sensible picture on its own
   (reduced motion shows only that). */
.home-tour-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid #2d4437; background: linear-gradient(#8cfaa806 1px, transparent 1px) 0 0 / 16px 16px, linear-gradient(90deg, #8cfaa806 1px, transparent 1px) 0 0 / 16px 16px, #0b1510; }
.home-tour-art * { transform-box: fill-box; }
.home-tour-art .tour-screen { fill: #2d4437; }
.home-tour-art .tour-screen-in { fill: #0a1410; }
.home-tour-art .tour-stand { fill: #25382c; }
.home-tour-art .tour-phone-body { fill: #3d5c45; }
.home-tour-art .tour-phone-screen { fill: #0c1b12; }
.home-tour-art .tour-phone-dot { fill: var(--home-green); }
.home-tour-art .tour-alien-a { color: #7dff92; }
.home-tour-art .tour-alien-b { color: #f0d58c; }
.home-tour-art .tour-chip { fill: #15221a; stroke: #45613b; stroke-width: 2; }
.home-tour-art .tour-chip-text { fill: #daefca; font: 700 11px "Courier New", monospace; letter-spacing: 1px; }
.home-tour-art .tour-chip-sub { fill: #8fb08a; font: 700 10px "Courier New", monospace; }
.home-tour-art .tour-chip-ok { fill: var(--home-green); }
.home-tour-art .tour-chip-ok-text { fill: #163416; font: 700 10px "Courier New", monospace; }
.home-tour-art .tour-panel { fill: #0e1a14; stroke: #25382c; stroke-width: 2; }
.home-tour-art .tour-panel-label { fill: #6f8f78; font: 700 9px "Courier New", monospace; letter-spacing: 1px; }
.home-tour-art .tour-horizon { stroke: #2d4437; stroke-width: 2; stroke-dasharray: 4 4; }
.home-tour-art .tour-phone-tip { fill: var(--home-green); }
.home-tour-art .tour-beam-line { stroke: var(--home-green); stroke-width: 2; stroke-dasharray: 5 4; opacity: .75; }
.home-tour-art .tour-beam-hit { fill: var(--home-green); }
.home-tour-art .tour-arc { fill: none; stroke: #45613b; stroke-width: 2; stroke-dasharray: 4 3; }
.home-tour-art .tour-arc-head { fill: #45613b; }
.home-tour-art .tour-cross rect { fill: var(--home-green); }
/* Turning happens around a fixed point of the picture (the phone's middle), not the group's box. */
.home-tour-art :is(.tour-turn, .tour-hold-pitch) { transform-box: view-box; }
.home-tour-art .tour-intro-turn { transform-origin: 160px 158px; }
.home-tour-art .tour-hold-turn { transform-origin: 219px 152px; }
.home-tour-art .tour-hold-pitch { transform-origin: 62px 72px; }
.home-tour-art .tour-move-yaw { transform-origin: 82px 112px; }
.home-tour-art .tour-move-pitch { transform-origin: 216px 81px; }
.home-tour-art .tour-level { fill: #1f3325; }
.home-tour-art .tour-level-bubble { fill: var(--home-green); }
.home-tour-art .tour-scan-line { fill: var(--home-green); }
.home-tour-art .tour-scan-ok { opacity: 0; }
.home-tour-art .tour-beam rect { fill: var(--home-green); opacity: .5; }
.home-tour-art .tour-tap-button rect { fill: #1f4a2b; stroke: var(--home-green); stroke-width: 2; }
.home-tour-art .tour-tap-button text { fill: #d9ffc9; font: 700 11px "Courier New", monospace; letter-spacing: 2px; }
.home-tour-art .tour-tap-ripple rect { fill: none; stroke: var(--home-green); stroke-width: 3; opacity: 0; transform-origin: center; }
.home-tour-art .tour-finger path { fill: #f0d7b8; stroke: #6b4e32; stroke-width: 1.5; }

.home-tour-slide.is-active .tour-intro-turn { animation: tour-yaw-sway 4s ease-in-out infinite; }
.home-tour-slide.is-active .tour-intro-cursor { animation: tour-follow 4s ease-in-out infinite; }
.home-tour-slide.is-active .tour-alien { animation: tour-bob 1.2s steps(2) infinite; }
.home-tour-slide.is-active .tour-alien-b { animation-delay: -.6s; }

.home-tour-slide.is-active .tour-scan-phone { animation: tour-scan-in 4.5s ease-in-out infinite; }
.home-tour-slide.is-active .tour-scan-line { animation: tour-scan-line 4.5s linear infinite; }
.home-tour-slide.is-active .tour-scan-view { animation: tour-scan-view 4.5s steps(1) infinite; }
.home-tour-slide.is-active .tour-scan-ok { animation: tour-scan-ok 4.5s steps(1) infinite; }
.home-tour-slide.is-active .tour-beam { animation: tour-scan-view 4.5s steps(1) infinite; }

.home-tour-slide.is-active .tour-hold-pitch { animation: tour-settle-pitch 5s ease-out infinite; }
.home-tour-slide.is-active .tour-hold-turn { animation: tour-settle-yaw 5s ease-out infinite; }
.home-tour-slide.is-active .tour-level-bubble { animation: tour-bubble 5s ease-out infinite; }
.home-tour-slide.is-active .tour-cross rect { animation: tour-cross 5s steps(1) infinite; }
.home-tour-slide.is-active .tour-hold-ok { animation: tour-show 5s steps(1) infinite; }
.home-tour-slide.is-active .tour-center-cursor { transform-origin: center; animation: tour-appear 5s steps(3) infinite; }

.home-tour-slide.is-active .tour-move-yaw { animation: tour-move-yaw 8s ease-in-out infinite; }
.home-tour-slide.is-active .tour-move-pitch { animation: tour-move-pitch 8s ease-in-out infinite; }
.home-tour-slide.is-active .tour-tag-turn { animation: tour-tag-first 8s steps(1) infinite; }
.home-tour-slide.is-active .tour-tag-tilt { animation: tour-tag-second 8s steps(1) infinite; }

.home-tour-slide.is-active .tour-tap-cursor { animation: tour-tap-cursor 4s ease-in-out infinite; }
.home-tour-slide.is-active .tour-finger { animation: tour-finger 4s ease-in-out infinite; }
.home-tour-slide.is-active .tour-tap-ripple rect { animation: tour-ripple 4s ease-out infinite; }
.home-tour-slide.is-active .tour-tap-button rect { animation: tour-press 4s steps(1) infinite; }

@keyframes tour-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes tour-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tour-nudge { 0%, 100% { box-shadow: 0 0 0 0 #a2fa8600; } 50% { box-shadow: 0 0 0 4px #a2fa8655; } }
@keyframes tour-bob { 50% { transform: translateY(-3px); } }
@keyframes tour-yaw-sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-24deg); } 75% { transform: rotate(24deg); } }
@keyframes tour-follow { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-37px, 8px); } 75% { transform: translate(37px, 8px); } }
@keyframes tour-scan-in { 0%, 100% { transform: translate(40px, 26px); } 20%, 84% { transform: translate(0, 0); } }
@keyframes tour-scan-line { 0%, 24% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 42% { transform: translateY(26px); } 58% { transform: translateY(0); opacity: 1; } 59%, 100% { opacity: 0; } }
@keyframes tour-scan-view { 0% { opacity: 0; } 24% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes tour-scan-ok { 0% { opacity: 0; } 60% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes tour-settle-pitch { 0%, 6% { transform: rotate(-18deg); } 20% { transform: rotate(5deg); } 30%, 100% { transform: rotate(0); } }
@keyframes tour-settle-yaw { 0%, 6% { transform: rotate(-22deg); } 22% { transform: rotate(6deg); } 32%, 100% { transform: rotate(0); } }
@keyframes tour-bubble { 0%, 6% { transform: translateX(13px); fill: #f2a4ae; } 20% { transform: translateX(-4px); } 30% { transform: translateX(0); fill: #f2a4ae; } 34%, 100% { transform: translateX(0); fill: #a2fa86; } }
@keyframes tour-cross { 0% { fill: #45613b; } 36%, 94% { fill: #a2fa86; } 100% { fill: #45613b; } }
@keyframes tour-show { 0% { opacity: 0; } 36%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tour-appear { 0%, 34% { opacity: 0; transform: scale(.4); } 40%, 94% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
/* First half: turned flat around the middle (left, right); second half: the tip tilted (up, down). */
@keyframes tour-move-yaw {
  0%, 4%, 25%, 29%, 50%, 100% { transform: rotate(0); }
  11%, 18% { transform: rotate(-22deg); }
  36%, 43% { transform: rotate(22deg); }
}
@keyframes tour-move-pitch {
  0%, 50%, 54%, 75%, 79%, 100% { transform: rotate(0); }
  61%, 68% { transform: rotate(-16deg); }
  86%, 93% { transform: rotate(16deg); }
}
@keyframes tour-tag-first { 0% { opacity: 1; } 50%, 100% { opacity: .3; } }
@keyframes tour-tag-second { 0% { opacity: .3; } 50%, 100% { opacity: 1; } }
@keyframes tour-tap-cursor { 0%, 100% { transform: translate(36px, 28px); } 30%, 80% { transform: translate(0, 0); } }
@keyframes tour-finger { 0%, 34% { transform: translateY(-14px); opacity: 0; } 42% { transform: translateY(-4px); opacity: 1; } 48%, 54% { transform: translateY(2px); opacity: 1; } 62% { transform: translateY(-8px); opacity: 1; } 72%, 100% { transform: translateY(-14px); opacity: 0; } }
@keyframes tour-ripple { 0%, 48% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(.5); } 72%, 100% { opacity: 0; transform: scale(2); } }
@keyframes tour-press { 0% { fill: #1f4a2b; } 50% { fill: #a2fa86; } 76%, 100% { fill: #1f4a2b; } }

/* The phone's own way into the guide (the nav is hidden there). */
.phone-tour-link { display: none; }
html[data-home-compact] .phone-tour-link {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 14px; padding: 8px 0;
  border: 0; background: transparent; color: var(--home-green); font: 700 14px/1.3 "Segoe UI", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 4px;
}
html[data-home-compact] .phone-tour-link svg { width: 14px; height: 14px; }
@media (max-width: 480px), (max-height: 560px) {
  .home-tour { padding: 12px 10px calc(10px + var(--tour-bar, 0px)); align-items: start; }
  .home-tour[open] { place-items: start center; }
  .home-tour-card { gap: 10px; padding: 18px 16px 16px; }
  .home-tour-slide h2 { font-size: 26px; }
  .home-tour-slide p { min-height: 6.4em; font-size: 14px; line-height: 1.55; }
  .home-tour-actions button { min-height: 46px; font-size: 15px; }
}
@media (max-height: 560px) and (min-width: 600px) {
  .home-tour-slide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; align-items: center; }
  .home-tour-art { grid-row: span 2; }
  .home-tour-slide p { min-height: 0; }
}

/* "Jetzt testen" (public/home/guided-test.js), inside the scaled stage: stage pixels throughout. */
.home > .home-coach-dim { position: absolute; inset: -80px; z-index: 40; pointer-events: none; background: #030a07c4; }
.home > .home-coach-dim.is-spot { inset: auto; background: transparent; box-shadow: 0 0 0 4px var(--home-green), 0 0 0 3000px #030a07c4, 0 0 60px 10px #a2fa8666; animation: coach-spot 1.4s steps(2) infinite; }
.home > .home-coach-targets { position: absolute; inset: 0; z-index: 41; pointer-events: none; }
.home-coach-target { position: absolute; display: grid; pointer-events: auto; justify-items: center; gap: 10px; width: 150px; margin: -56px 0 0 -75px; color: var(--home-green); }
.home-coach-target[data-coach-target="0"] { left: 300px; top: 494px; }
.home-coach-target[data-coach-target="1"] { left: 1460px; top: 494px; }
.home-coach-target[data-coach-target="2"] { left: 880px; top: 150px; }
.home-coach-target[data-coach-target="3"] { left: 880px; top: 850px; }
.home-coach-target i { position: relative; width: 112px; height: 112px; border: 8px solid currentColor; background: #0c1b12e6; box-shadow: 0 0 0 6px #0c1b12, 0 0 40px #a2fa8655; }
.home-coach-target i::after { content: ""; position: absolute; inset: 30px; background: currentColor; }
.home-coach-target b { padding: 6px 12px; background: #0c1b12; border: 1px solid #45613b; color: #eef7e9; font: 700 18px/1 "Courier New", monospace; letter-spacing: .16em; }
.home-coach-target.is-live i { animation: coach-pulse .9s steps(2) infinite; }
.home-coach-target.is-hit { color: #eef7e9; animation: coach-hit .38s steps(4) both; }
.home-coach-click {
  position: absolute; left: 880px; top: 494px; z-index: 1; display: flex; align-items: center; gap: 22px; margin: -70px 0 0 -230px; width: 460px; height: 140px; padding: 0 36px;
  pointer-events: auto; border: 4px solid var(--home-green); border-radius: 0; background: #1f4a2b; color: #eef7e9; box-shadow: 0 0 0 8px #0c1b12, 0 0 60px #a2fa8666;
  font: 400 40px/1 var(--home-display); animation: coach-pulse 1.2s steps(2) infinite;
}
.home-coach-click svg { width: 64px; height: 64px; color: var(--home-green); }
.home-coach-click.is-hot { background: var(--home-green); color: #163416; }
.home-coach-click.is-hot svg { color: #163416; }
.home-coach-click.is-hit { background: var(--home-green); color: #163416; }
.home > .home-coach {
  position: absolute; right: 0; bottom: 72px; z-index: 42; display: grid; align-content: start; gap: 12px; width: 420px; min-height: 292px; padding: 22px 24px;
  border-color: #55714a; border-top: 3px solid var(--home-green); background: #101d16; box-shadow: 0 20px 80px #000c;
}
.home-coach-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-coach .eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; color: #9fcf8a; font: 700 12px/1 "Courier New", monospace; letter-spacing: .14em; }
.home-coach-end { padding: 8px 14px; border: 1px solid #45613b; border-radius: 0; background: transparent; color: #b7cbb5; font-size: 14px; font-weight: 700; }
.home-coach-end:hover, .home-coach-end.is-hot { border-color: #79b86b; background: #1d3524; color: #d9f7cd; }
.home-coach h2 { margin: 0; color: #eef7e9; font: 400 32px/1.05 var(--home-display); }
.home-coach h2:focus { outline: none; }
.home-coach-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: coach; }
.home-coach-steps li { counter-increment: coach; padding: 8px 4px 7px; border-top: 4px solid #25382c; color: #6f8f78; font: 700 11px/1.2 "Courier New", monospace; text-align: center; }
.home-coach-steps li::before { content: "0" counter(coach) " "; }
.home-coach-steps li.is-done { border-top-color: #4f8a45; color: #9fcf8a; }
.home-coach-steps li.is-current { border-top-color: var(--home-green); color: #eef7e9; }
.home-coach-body { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; align-items: start; }
.home-coach-body > div { display: grid; gap: 10px; }
.home-coach-body p { min-height: 4.6em; margin: 0; color: #b9cdb0; font-size: 16px; line-height: 1.5; }
/* The small picture of the move asked for: one group per kind, the others hidden. */
.home-coach-art { width: 112px; height: 112px; border: 1px solid #2d4437; background: #0b1510; }
.home-coach-art > g { display: none; }
.home-coach-art[data-art="scan"] .coach-art-scan, .home-coach-art[data-art="hold"] .coach-art-hold,
.home-coach-art:is([data-art="left"], [data-art="right"]) .coach-art-turn,
.home-coach-art:is([data-art="up"], [data-art="down"]) .coach-art-tilt,
.home-coach-art[data-art="tap"] .coach-art-tap { display: inline; }
.home-coach-art .tour-screen { fill: #2d4437; }
.home-coach-art .tour-screen-in { fill: #0a1410; }
.home-coach-art .tour-phone-body { fill: #3d5c45; }
.home-coach-art .tour-phone-screen { fill: #0c1b12; }
.home-coach-art .tour-phone-tip { fill: var(--home-green); }
.home-coach-art .tour-beam-line { stroke: var(--home-green); stroke-width: 2; stroke-dasharray: 4 3; opacity: .8; }
.home-coach-art .tour-arc { fill: none; stroke: #45613b; stroke-width: 2; stroke-dasharray: 3 3; }
.home-coach-art .tour-cross rect { fill: var(--home-green); }
.home-coach-art .coach-scan-line { fill: var(--home-green); animation: coach-scan 1.6s linear infinite; }
.home-coach-art :is(.coach-hold-turn, .coach-turn, .coach-tilt) { transform-box: view-box; }
.home-coach-art .coach-hold-turn { transform-origin: 50px 80px; animation: coach-settle 2.4s ease-out infinite; }
.home-coach-art .coach-turn { transform-origin: 50px 71px; }
.home-coach-art .coach-tilt { transform-origin: 39px 50px; }
.home-coach-art[data-art="left"] .coach-turn { --to: -24deg; animation: coach-move 1.8s ease-in-out infinite; }
.home-coach-art[data-art="right"] .coach-turn { --to: 24deg; animation: coach-move 1.8s ease-in-out infinite; }
.home-coach-art[data-art="up"] .coach-tilt { --to: -18deg; animation: coach-move 1.8s ease-in-out infinite; }
.home-coach-art[data-art="down"] .coach-tilt { --to: 18deg; animation: coach-move 1.8s ease-in-out infinite; }
.home-coach-art .coach-tap-ripple { fill: none; stroke: var(--home-green); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: tour-ripple 1.6s ease-out infinite; }
.home-coach-art .coach-finger { fill: #f0d7b8; stroke: #6b4e32; stroke-width: 1; transform-box: fill-box; animation: coach-tap 1.6s ease-in-out infinite; }
@keyframes coach-scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(16px); } }
@keyframes coach-settle { 0%, 10% { transform: rotate(-22deg); } 40% { transform: rotate(5deg); } 55%, 100% { transform: rotate(0); } }
@keyframes coach-move { 0%, 12% { transform: rotate(0); } 50%, 80% { transform: rotate(var(--to)); } 100% { transform: rotate(0); } }
@keyframes coach-tap { 0%, 35% { transform: translateY(-8px); } 48%, 56% { transform: translateY(0); } 70%, 100% { transform: translateY(-8px); } }

/* The end: "Geschafft!" in the middle with a pixel burst, then everything fades out by itself. */
.home-coach-win {
  position: absolute; left: 880px; top: 494px; display: grid; justify-items: center; gap: 12px; width: 640px; margin: -100px 0 0 -320px; padding: 36px 40px;
  border: 4px solid var(--home-green); background: #102a18; box-shadow: 0 0 0 8px #0c1b12, 0 0 90px #a2fa8677; color: #eef7e9; text-align: center;
  animation: coach-win-in .5s steps(5) both;
}
.home-coach-win strong { color: var(--home-green); font: 400 88px/1 var(--home-display); }
.home-coach-win > span:not(.home-coach-burst) { color: #cfe6c4; font-size: 26px; }
.home-coach-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.home-coach-burst i { position: absolute; width: 18px; height: 18px; margin: -9px; background: var(--home-green); animation: coach-burst 1.1s ease-out .15s both; }
.home-coach-burst i:nth-child(3n) { background: #f0d58c; }
.home-coach-burst i:nth-child(4n) { background: #eef7e9; }
@keyframes coach-win-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes coach-burst { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); } }
html.home-coach-leaving .home > :is(.home-coach, .home-coach-dim, .home-coach-targets) { opacity: 0; transition: opacity .6s ease, transform .6s ease; }
html.home-coach-leaving .home > .home-coach { transform: translateY(24px); }
html.home-coach-leaving .home-coach-win { transform: scale(1.08); transition: transform .6s ease; }
@keyframes coach-spot { 50% { box-shadow: 0 0 0 8px var(--home-green), 0 0 0 3000px #030a07c4, 0 0 80px 16px #a2fa8688; } }
@keyframes coach-pulse { 50% { box-shadow: 0 0 0 8px #0c1b12, 0 0 0 16px #a2fa8644, 0 0 60px #a2fa8688; } }
@keyframes coach-hit { 0% { transform: scale(1); opacity: 1; } 60% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .home-tour *, .home-tour *::before, .home-tour *::after,
  .home-coach-dim, .home-coach-targets *, .home-coach-targets *::after { animation: none !important; transition: none !important; }
}

/* A Private Party's admin (server/room-admin.js): the switch in the room's player card and the
   badge next to the admin's name. */
#roomApp .admin-mode { margin: 0 0 12px; }
#roomApp .admin-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 64px; padding: 10px 16px; border: 1px solid #466143; border-radius: 0; background: #16281b; color: #c9efb5; font-size: 16px; font-weight: 650; text-align: left; }
#roomApp .admin-toggle > span { display: grid; gap: 3px; min-width: 0; }
#roomApp .admin-toggle small, #roomApp p.admin-mode { color: #9fb49a; font-size: 13px; font-weight: 400; line-height: 1.35; }
#roomApp .admin-toggle small strong, #roomApp p.admin-mode strong { color: #e6f1df; }
#roomApp .admin-toggle small.is-warning, #roomApp p.admin-mode.is-warning { color: #ffd27a; }
#roomApp .admin-toggle b { flex: none; padding: 5px 12px; background: #2a3a2c; color: #9fb49a; font: 700 13px "Courier New", monospace; letter-spacing: 1px; text-transform: uppercase; }
#roomApp .admin-toggle.is-on b { background: var(--home-green); color: #0c2015; }
.home-page:not(.phone-cursor-connected) #roomApp .admin-toggle:hover { border-color: #96cf80; background: #243e29; }
#roomApp .admin-badge { margin-left: 6px; padding: 2px 6px; border: 1px solid #d0d480; color: #e8e39a; font: 700 10px "Courier New", monospace; letter-spacing: 1px; text-transform: uppercase; vertical-align: middle; }
