:root {
  --bg: #0e1726;
  --bg2: #16233a;
  --panel: rgba(255,255,255,.94);
  --panel-dark: rgba(15, 23, 42, .86);
  --ink: #1f2937;
  --ink-light: #f8fafc;
  --muted: #6b7280;
  --line: #dbe2ef;
  --accent: #2563eb;
  --accent2: #06b6d4;
  --accent-dark: #1d4ed8;
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d97706;
  --rain: #0284c7;
  --shadow: 0 18px 50px rgba(2, 6, 23, .22);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(6,182,212,.36), transparent 28rem),
    radial-gradient(circle at 85% 5%, rgba(37,99,235,.38), transparent 34rem),
    linear-gradient(135deg, #0b1020, #14213d 48%, #101827);
}
button, input, select { font: inherit; }
button { touch-action: manipulation; }
.game-app { max-width: 1440px; margin: 0 auto; padding: 16px 18px 164px; }
.top-command {
  display: grid;
  grid-template-columns: minmax(220px,1fr) auto auto;
  align-items: center;
  gap: 14px;
  color: var(--ink-light);
  padding: 12px 6px 18px;
}
.eyebrow, .dock-kicker { margin: 0 0 4px; font-size: 12px; letter-spacing: .12em; font-weight: 900; color: #7dd3fc; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 48px); line-height: 1; letter-spacing: .02em; }
h2 { margin: 0; font-size: 20px; }
h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); letter-spacing: .08em; font-weight: 900; }
h3 span { font-size: 11px; letter-spacing: 0; font-weight: 700; }
.race-hud { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hud-pill, .status-pill, .condition-pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 900;
  background: rgba(255,255,255,.12); color: #e0f2fe; border: 1px solid rgba(255,255,255,.18);
}
.status-pill { background: #eef2ff; color: var(--accent-dark); border-color: #dbeafe; }
.condition-pill { margin: 2px 4px 2px 0; padding: 4px 8px; background: #eef2ff; color: #1e40af; border: 0; }
.condition-pill.ok { background: #dcfce7; color: #166534; }
.condition-pill.warn { background: #fef3c7; color: #92400e; }
.condition-pill.danger { background: #fee2e2; color: #991b1b; }
.condition-pill.rain { background: #e0f2fe; color: #075985; }
.condition-pill.normal { background: #f1f5f9; color: #475569; }
.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(12px);
}
.game-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas:
    "setup setup"
    "board side";
  gap: 16px;
  align-items: start;
}
.setup-panel { grid-area: setup; }
.race-board { grid-area: board; min-width: 0; }
.side-dash { grid-area: side; position: sticky; top: 12px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.section-heading.compact { margin-bottom: 10px; }
.form-grid { display: grid; gap: 12px; }
.setup-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 900; }
input, select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
  font-size: 15px; background: #fff; color: var(--ink);
}
.name-list { display: grid; grid-template-columns: repeat(2, minmax(240px,1fr)); gap: 10px; margin: 14px 0; }
.setup-plan-hint {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 16px;
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  font-size: 13px;
  font-weight: 900;
}
.setup-plan-hint.paid {
  color: #92400e;
  background: #fef3c7;
  border-color: #facc15;
}
.player-setup-row { display: grid; grid-template-columns: 1fr 120px 140px; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; }
.player-setup-row.plan-adjusted {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .16);
}
.car-picker {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.car-color-sample {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 2px solid var(--driver-color, #2563eb);
  background: color-mix(in srgb, var(--driver-color, #2563eb) 18%, #ffffff);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.72), 0 8px 16px rgba(15,23,42,.12);
}
.car-color-sample img {
  width: 38px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(15,23,42,.28));
}
.primary-button, .ghost-button {
  border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 900; cursor: pointer;
  box-shadow: 0 8px 18px rgba(37,99,235,.18);
}
.primary-button { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: white; }
.primary-button:hover { filter: brightness(.98); transform: translateY(-1px); }
.primary-button:disabled { background: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }
.ghost-button { background: rgba(255,255,255,.14); color: #e0f2fe; border: 1px solid rgba(255,255,255,.18); box-shadow: none; }
.panel .ghost-button { background: #eef2ff; color: var(--accent-dark); border-color: #dbeafe; }
.ghost-button.small { padding: 7px 10px; font-size: 12px; }
.empty-state { color: var(--muted); border: 1px dashed #cbd5e1; border-radius: 18px; padding: 14px; background: #f8fafc; }
.current-player-card {
  display: grid; grid-template-columns: 86px 1fr; gap: 12px; align-items: center;
  padding: 12px; border-radius: 20px; background: linear-gradient(135deg,#f8fafc,#e0f2fe); border: 1px solid #bae6fd;
}
.current-player-card.has-status { background: linear-gradient(135deg, #fff7ed, #fee2e2); border-color: #fed7aa; }
.current-car-img { width: 78px; height: 78px; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(15,23,42,.22)); }
.condition-row { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 5px; }
.condition-label { font-size: 11px; color: var(--muted); font-weight: 900; margin-right: 4px; }
.alert-bar { margin: 12px 0; padding: 12px 14px; border-radius: 18px; font-weight: 900; background: #ecfeff; border: 1px solid #a5f3fc; color: #155e75; }
.alert-bar.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.alert-bar.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.course-focus {
  display: grid; grid-template-columns: repeat(5, minmax(130px,1fr)); gap: 10px;
  overflow: auto; padding-bottom: 4px;
}
.focus-card {
  position: relative; min-height: 172px; border-radius: 22px; padding: 12px;
  background: linear-gradient(180deg,#ffffff,#f1f5f9); border: 1px solid #dbeafe;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
.focus-card.now { outline: 3px solid #38bdf8; background: linear-gradient(180deg,#eff6ff,#dbeafe); }
.focus-card.danger-zone { border-color: #fecaca; background: linear-gradient(180deg,#fff,#fef2f2); }
.focus-label { display: inline-flex; border-radius: 999px; background: #1e3a8a; color: white; padding: 4px 8px; font-size: 11px; font-weight: 900; }
.focus-name { margin-top: 8px; font-size: 17px; font-weight: 900; }
.focus-safe { margin-top: 4px; color: var(--muted); font-weight: 800; font-size: 13px; }
.focus-cars { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.car-token { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px 3px 3px; border-radius: 999px; background: rgba(255,255,255,.92); border: 1px solid #dbeafe; font-size: 11px; font-weight: 900; }
.car-token.abnormal { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,.22); }
.car-img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(15,23,42,.22)); }
.car-label { white-space: nowrap; }
.mini-map { display: flex; align-items: stretch; gap: 6px; margin-top: 12px; overflow-x: auto; padding: 8px; border-radius: 18px; background: #0f172a; }
.map-dot { min-width: 48px; min-height: 48px; border-radius: 16px; background: #334155; color: #cbd5e1; display: grid; place-items: center; position: relative; font-size: 12px; font-weight: 900; }
.map-dot.current { background: #2563eb; color: #fff; box-shadow: 0 0 0 3px #93c5fd; }
.map-dot.has-car { background: #475569; }
.map-cars { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); display: flex; }
.map-car { width: 24px; height: 24px; object-fit: contain; margin-left: -5px; filter: drop-shadow(0 2px 2px #000); }
.course-details { margin-top: 10px; }
.course-details summary, .log-details summary, .rules-panel summary { cursor: pointer; font-weight: 900; color: var(--accent-dark); }
.course-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; margin-top: 10px; }
.course-card { border: 1px solid var(--line); border-radius: 18px; padding: 10px; background: #fff; }
.course-card.active { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,.18); }
.course-number { font-size: 11px; font-weight: 900; color: var(--muted); }
.course-name { font-weight: 900; }
.safe-speed { font-size: 12px; color: var(--muted); }
.car-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.standings-list { display: grid; gap: 10px; }
.standing-card { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 18px; background: #f8fafc; border: 1px solid var(--line); }
.standing-card.active { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); background: #eff6ff; }
.standing-card.has-status { background: #fff7ed; border-color: #fed7aa; }
.standing-car { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(15,23,42,.18)); }
.standing-name { font-weight: 900; }
.standing-meta { margin-top: 3px; font-size: 12px; color: var(--muted); font-weight: 700; }
.latest-log-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.latest-log { border-radius: 16px; padding: 12px; background: #f8fafc; font-weight: 800; line-height: 1.45; }
.latest-log.ok { background:#ecfdf5; color:#166534; }
.latest-log.warn { background:#fff7ed; color:#9a3412; }
.latest-log.danger { background:#fef2f2; color:#991b1b; }
.race-log { max-height: 240px; overflow: auto; display: grid; gap: 8px; margin-top: 10px; }
.log-entry { border-left: 4px solid #cbd5e1; background: #f8fafc; border-radius: 12px; padding: 9px 10px; font-size: 13px; }
.log-entry.ok { border-left-color: var(--ok); }
.log-entry.warn { border-left-color: var(--warn); }
.log-entry.danger { border-left-color: var(--danger); }
.command-dock {
  position: fixed; left: max(18px, calc((100vw - 1440px) / 2 + 18px)); right: max(18px, calc((100vw - 1440px) / 2 + 18px)); bottom: 14px;
  z-index: 30; padding: 14px; border-radius: 28px; box-shadow: 0 24px 70px rgba(2,6,23,.42);
}
.dock-topline { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 8px; }
.dock-kicker { color: var(--accent-dark); }
.move-preview { border-radius: 18px; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--line); font-weight: 800; min-height: 52px; }
.move-preview.safe { background: #ecfdf5; border-color: #bbf7d0; color: #14532d; }
.move-preview.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.preview-route { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.route-chip { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.78); font-size: 12px; font-weight: 900; }
.hands-grid { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 12px; align-items: stretch; margin-top: 10px; }
.hand { display: grid; gap: 8px; }
.speed-hand { grid-template-columns: repeat(4, minmax(78px,1fr)); }
.skill-hand { grid-template-columns: repeat(2, minmax(120px,1fr)); }
.hands-grid.online-thinking { position: relative; }
.hands-grid.online-thinking::before {
  content: ""; position: absolute; inset: -5px; z-index: 4; pointer-events: none;
  border: 2px solid rgba(59,130,246,.34); border-radius: 20px; background: rgba(255,255,255,.08);
}
.hands-grid.online-thinking::after {
  content: attr(data-thinking); position: absolute; top: -18px; right: 10px; z-index: 5; pointer-events: none;
  border-radius: 999px; padding: 7px 12px; background: rgba(15,23,42,.88); color: #fff;
  font-size: 13px; font-weight: 1000; box-shadow: 0 12px 24px rgba(15,23,42,.22);
}
.hand.online-locked .play-card { pointer-events: none; filter: saturate(.9); }
.hidden-card {
  display: grid; place-items: center; gap: 4px; background: repeating-linear-gradient(135deg, #e2e8f0 0 10px, #f8fafc 10px 20px);
  color: #475569; font-weight: 1000;
}
.hidden-card strong { font-size: 34px; line-height: 1; }
.hidden-card span { font-size: 12px; }
.play-card {
  border: 2px solid #e2e8f0; border-radius: 18px; background: #fff; padding: 10px; cursor: pointer; min-height: 84px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.play-card:hover { transform: translateY(-2px); box-shadow: 0 12px 20px rgba(15,23,42,.12); }
.play-card.selected { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.17); background: #eff6ff; }
.card-kind { color: var(--muted); font-weight: 900; letter-spacing: .1em; font-size: 10px; }
.card-speed { float: right; margin-top: -4px; font-size: 34px; line-height: 1; font-weight: 1000; color: #1d4ed8; }
.card-title { font-size: 16px; font-weight: 900; margin-top: 4px; }
.card-text { clear: both; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.35; }
.run-button { align-self: end; min-width: 140px; height: 64px; font-size: 16px; }
.target-area { min-width: 220px; }
.hidden { display: none !important; }
.rules-panel { margin-top: 16px; }
.rules-panel ul { margin: 12px 0 0; padding-left: 1.3em; color: var(--muted); line-height: 1.8; }
@media (max-width: 1040px) {
  .game-app { padding-bottom: 260px; }
  .game-stage { grid-template-columns: 1fr; grid-template-areas: "setup" "board" "side"; }
  .side-dash { position: static; }
  .course-focus { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
  .hands-grid { grid-template-columns: 1fr; }
  .run-button { width: 100%; }
}
@media (max-width: 720px) {
  .game-app { padding: 10px 10px 294px; }
  .top-command { grid-template-columns: 1fr; gap: 10px; padding-bottom: 12px; }
  .race-hud { justify-content: flex-start; }
  .panel { border-radius: 18px; padding: 12px; }
  .setup-grid, .name-list { grid-template-columns: 1fr; }
  .player-setup-row { grid-template-columns: 1fr; }
  .course-focus { grid-template-columns: repeat(5, minmax(128px, 1fr)); scroll-snap-type: x mandatory; }
  .focus-card { min-height: 154px; scroll-snap-align: start; }
  .current-player-card { grid-template-columns: 64px 1fr; }
  .current-car-img { width: 58px; height: 58px; }
  .command-dock { left: 8px; right: 8px; bottom: 8px; border-radius: 22px; padding: 10px; max-height: 54vh; overflow: auto; }
  .dock-topline { align-items: center; }
  .dock-topline h2 { font-size: 16px; }
  .move-preview { padding: 10px; font-size: 13px; }
  .speed-hand { grid-template-columns: repeat(4, minmax(62px,1fr)); }
  .skill-hand { grid-template-columns: repeat(2, minmax(110px,1fr)); }
  .play-card { min-height: 76px; padding: 8px; border-radius: 16px; }
  .card-speed { font-size: 28px; }
  .card-title { font-size: 13px; }
  .card-text { display: none; }
  h1 { font-size: 30px; }
}
.play-card.unusable { opacity: .45; filter: grayscale(.55); }
.play-card.unusable::after { content: "制限中"; display: inline-flex; margin-top: 5px; padding: 3px 7px; border-radius: 999px; background:#fee2e2; color:#991b1b; font-size: 11px; font-weight: 900; }

/* === Phase 1 Racing HUD upgrade === */
:root {
  --bg: #05070d;
  --bg2: #0d1626;
  --panel: rgba(12, 18, 32, .92);
  --panel-dark: rgba(5, 10, 20, .96);
  --ink: #e5f3ff;
  --ink-light: #ffffff;
  --muted: #8aa3bd;
  --line: rgba(125, 211, 252, .18);
  --accent: #00d5ff;
  --accent2: #ffd166;
  --accent-dark: #38bdf8;
  --danger: #ff3b3b;
  --ok: #22c55e;
  --warn: #f59e0b;
  --rain: #38bdf8;
  --shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
body {
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(circle at 20% 8%, rgba(0,213,255,.22), transparent 24rem),
    radial-gradient(circle at 86% 5%, rgba(255,209,102,.16), transparent 25rem),
    linear-gradient(135deg, #03050a, #07101d 46%, #111827);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}
.game-app { max-width: 1480px; }
.top-command {
  position: relative;
  border: 1px solid rgba(125,211,252,.18);
  border-radius: 26px;
  margin: 4px 0 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(14,24,42,.92), rgba(5,10,20,.92));
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset, 0 22px 60px rgba(0,0,0,.42);
  overflow: hidden;
}
.top-command:before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0,213,255,.12), transparent);
  transform: translateX(-55%);
  pointer-events: none;
}
.eyebrow, .dock-kicker { color: #67e8f9; text-shadow: 0 0 14px rgba(34,211,238,.35); }
h1 {
  color: #fff;
  text-shadow: 0 0 20px rgba(0,213,255,.36), 0 3px 0 rgba(0,0,0,.32);
}
h2, h3 { color: #e0f2fe; }
.hud-pill, .status-pill {
  background: rgba(15,23,42,.88);
  color: #e0f2fe;
  border: 1px solid rgba(125,211,252,.28);
  box-shadow: 0 0 20px rgba(14,165,233,.10) inset;
}
.panel {
  background: linear-gradient(180deg, rgba(12,18,32,.94), rgba(5,10,20,.92));
  border: 1px solid rgba(125,211,252,.18);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.035) inset;
  color: var(--ink);
}
input, select {
  background: rgba(2,6,23,.92);
  border-color: rgba(125,211,252,.24);
  color: #e0f2fe;
}
label, .safe-speed, .focus-safe, .standing-meta, .card-text, .empty-state { color: var(--muted); }
.setup-panel {
  border-color: rgba(255,209,102,.18);
}
.primary-button {
  background: linear-gradient(135deg, #0891b2, #2563eb 56%, #7c3aed);
  box-shadow: 0 0 28px rgba(0,213,255,.24), 0 8px 24px rgba(37,99,235,.34);
  letter-spacing: .04em;
}
.primary-button:hover { filter: brightness(1.1); box-shadow: 0 0 34px rgba(0,213,255,.36), 0 10px 28px rgba(37,99,235,.42); }
.ghost-button, .panel .ghost-button {
  background: rgba(15,23,42,.88);
  color: #e0f2fe;
  border: 1px solid rgba(125,211,252,.22);
}
.current-player-card {
  background: linear-gradient(135deg, rgba(8,47,73,.86), rgba(15,23,42,.92));
  border-color: rgba(56,189,248,.35);
  box-shadow: 0 0 30px rgba(14,165,233,.12) inset;
}
.current-player-card.has-status {
  background: linear-gradient(135deg, rgba(69,26,3,.85), rgba(69,10,10,.86));
  border-color: rgba(251,146,60,.45);
}
.current-car-img, .standing-car, .car-img { filter: drop-shadow(0 12px 10px rgba(0,0,0,.55)) drop-shadow(0 0 10px rgba(56,189,248,.18)); }
.alert-bar {
  background: rgba(8,47,73,.74);
  border-color: rgba(34,211,238,.32);
  color: #cffafe;
}
.alert-bar.warn { background: rgba(69,26,3,.82); border-color: rgba(251,191,36,.35); color: #fde68a; }
.alert-bar.danger { background: rgba(69,10,10,.82); border-color: rgba(248,113,113,.38); color: #fecaca; }
.focus-card {
  background: linear-gradient(180deg, rgba(15,23,42,.98), rgba(2,6,23,.96));
  border-color: rgba(125,211,252,.18);
  box-shadow: 0 14px 28px rgba(0,0,0,.36), 0 0 0 1px rgba(255,255,255,.035) inset;
  color: #e0f2fe;
}
.focus-card.now {
  outline: 3px solid rgba(0,213,255,.75);
  background: linear-gradient(180deg, rgba(8,47,73,.96), rgba(2,6,23,.96));
  box-shadow: 0 0 30px rgba(0,213,255,.22), 0 14px 30px rgba(0,0,0,.38);
}
.focus-card.danger-zone {
  border-color: rgba(248,113,113,.48);
  background: linear-gradient(180deg, rgba(69,10,10,.92), rgba(15,23,42,.96));
}
.focus-label {
  background: linear-gradient(135deg, #0284c7, #0f172a);
  border: 1px solid rgba(125,211,252,.35);
}
.focus-name { color: #fff; text-shadow: 0 0 14px rgba(0,213,255,.18); }
.car-token {
  background: rgba(2,6,23,.78);
  border-color: rgba(125,211,252,.24);
  color: #e0f2fe;
}
.car-token.abnormal { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,.22), 0 0 18px rgba(249,115,22,.28); }
.mini-map { background: rgba(0,0,0,.42); border: 1px solid rgba(125,211,252,.14); }
.map-dot { background: #111827; border: 1px solid rgba(125,211,252,.12); }
.map-dot.current { background: linear-gradient(135deg, #0891b2, #2563eb); box-shadow: 0 0 0 3px rgba(147,197,253,.42), 0 0 22px rgba(0,213,255,.25); }
.course-card, .standing-card, .latest-log, .log-entry, .empty-state {
  background: rgba(15,23,42,.72);
  border-color: rgba(125,211,252,.14);
  color: #dbeafe;
}
.standing-card.active { background: rgba(8,47,73,.72); border-color: rgba(56,189,248,.45); box-shadow: 0 0 0 3px rgba(56,189,248,.13); }
.standing-card.has-status { background: rgba(69,26,3,.62); border-color: rgba(251,146,60,.32); }
.latest-log.ok { background: rgba(20,83,45,.45); color:#bbf7d0; }
.latest-log.warn { background: rgba(69,26,3,.55); color:#fde68a; }
.latest-log.danger { background: rgba(69,10,10,.55); color:#fecaca; }
.command-dock {
  background: linear-gradient(180deg, rgba(6,12,24,.97), rgba(2,6,23,.98));
  border: 1px solid rgba(56,189,248,.28);
  box-shadow: 0 0 0 1px rgba(255,255,255,.045) inset, 0 -8px 60px rgba(0,213,255,.12), 0 24px 80px rgba(0,0,0,.68);
}
.command-dock:before {
  content: "";
  position: absolute; left: 22px; right: 22px; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, #facc15, transparent);
  opacity: .8;
}
.move-preview {
  background: rgba(15,23,42,.82);
  border-color: rgba(125,211,252,.18);
  color: #e0f2fe;
  box-shadow: 0 0 22px rgba(0,213,255,.08) inset;
}
.move-preview.safe {
  background: linear-gradient(135deg, rgba(20,83,45,.9), rgba(6,78,59,.78));
  border-color: rgba(74,222,128,.45);
  color: #dcfce7;
}
.move-preview.danger {
  background: linear-gradient(135deg, rgba(127,29,29,.92), rgba(69,10,10,.82));
  border-color: rgba(248,113,113,.48);
  color: #fee2e2;
  animation: hudPulse 1.25s ease-in-out infinite alternate;
}
@keyframes hudPulse { from { box-shadow: 0 0 14px rgba(248,113,113,.12) inset; } to { box-shadow: 0 0 28px rgba(248,113,113,.34) inset; } }
.play-card {
  background: linear-gradient(180deg, rgba(30,41,59,.98), rgba(2,6,23,.96));
  border-color: rgba(125,211,252,.16);
  color: #e0f2fe;
  box-shadow: 0 10px 22px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.025) inset;
}
.play-card:hover { box-shadow: 0 0 24px rgba(34,211,238,.18), 0 12px 26px rgba(0,0,0,.34); }
.play-card.selected {
  border-color: #22d3ee;
  background: linear-gradient(180deg, rgba(8,47,73,.95), rgba(2,6,23,.96));
  box-shadow: 0 0 0 3px rgba(34,211,238,.18), 0 0 28px rgba(34,211,238,.24);
}
.card-kind { color: #67e8f9; }
.card-speed { color: #facc15; text-shadow: 0 0 18px rgba(250,204,21,.28); }
.card-title { color: #fff; }
.card-text { color: #a8c4db; }
.run-button {
  background: linear-gradient(135deg, #f97316, #ef4444 52%, #7c2d12);
  box-shadow: 0 0 28px rgba(249,115,22,.32), 0 12px 28px rgba(0,0,0,.34);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.rules-panel { opacity: .92; }
@media (max-width: 720px) {
  .top-command { border-radius: 18px; }
  .command-dock { max-height: 58vh; }
  .card-title { font-size: 13px; }
}


/* === Phase 2 motion and battle effects === */
.effect-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.effect-layer.show { opacity: 1; }
.effect-layer.show.fading {
  opacity: 0;
  transition: opacity .68s ease;
}
.effect-card {
  position: relative;
  overflow: hidden;
  min-width: min(520px, 82vw);
  text-align: center;
  padding: 22px 28px;
  border-radius: 26px;
  font-size: clamp(26px, 6vw, 64px);
  font-weight: 1000;
  letter-spacing: .08em;
  color: #fff;
  background: linear-gradient(135deg, rgba(8,47,73,.92), rgba(2,6,23,.94));
  border: 1px solid rgba(125,211,252,.5);
  box-shadow: 0 0 38px rgba(34,211,238,.28), 0 30px 100px rgba(0,0,0,.55);
  text-shadow: 0 0 24px rgba(34,211,238,.45), 0 4px 0 rgba(0,0,0,.35);
  transition: transform .68s ease, filter .68s ease;
  animation: effectPop .52s ease both;
}
.effect-layer.show.fading .effect-card {
  transform: translateY(-8px) scale(.985);
  filter: blur(1px);
}
.effect-card.driver-effect,
.effect-card.crash-effect,
.effect-card.attack-effect {
  display: grid;
  gap: 12px;
  align-items: center;
  justify-items: center;
  letter-spacing: 0;
}
.effect-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  font-size: clamp(12px, 2.4vw, 17px);
  font-weight: 1000;
  letter-spacing: .14em;
}
.effect-title {
  font-size: clamp(28px, 6vw, 68px);
  font-weight: 1000;
  line-height: 1.02;
}
.effect-detail {
  margin-top: 6px;
  color: rgba(255,255,255,.86);
  font-size: clamp(13px, 2.8vw, 20px);
  font-weight: 900;
  letter-spacing: .02em;
}
.effect-driver-row {
  display: grid;
  grid-template-columns: clamp(78px, 18vw, 132px) minmax(0, 1fr);
  gap: clamp(12px, 3vw, 22px);
  align-items: center;
  width: min(640px, 82vw);
  text-align: left;
}
.effect-car-img {
  width: 100%;
  max-height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 16px 12px rgba(0,0,0,.35));
}
.effect-layer.crash .effect-card {
  background: linear-gradient(135deg, rgba(127,29,29,.96), rgba(2,6,23,.92));
  border-color: rgba(248,113,113,.78);
  box-shadow: 0 0 44px rgba(248,113,113,.38), 0 0 0 999px rgba(127,29,29,.12);
}
.effect-layer.crash .crash-effect {
  min-width: min(620px, 88vw);
  overflow: hidden;
  background:
    repeating-linear-gradient(-10deg, rgba(255,255,255,.08) 0 16px, transparent 16px 32px),
    radial-gradient(circle at 50% 16%, rgba(248,113,113,.34), transparent 34%),
    linear-gradient(135deg, rgba(153,27,27,.98), rgba(69,10,10,.96));
  border-color: rgba(254,202,202,.86);
  animation: crashImpact 1.08s cubic-bezier(.18, 1.3, .3, 1) both;
}
.crash-symbol {
  display: grid;
  place-items: center;
  width: clamp(76px, 15vw, 118px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #7f1d1d;
  background: #fee2e2;
  border: 7px solid #ffffff;
  box-shadow: 0 0 0 10px rgba(254,226,226,.18), 0 18px 30px rgba(0,0,0,.25);
  font-size: clamp(54px, 11vw, 88px);
  line-height: 1;
  text-shadow: none;
}
.effect-layer.fcy .effect-card {
  color: #1f2937;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border-color: rgba(255,255,255,.7);
  text-shadow: none;
  box-shadow: 0 0 42px rgba(250,204,21,.45), 0 0 0 999px rgba(250,204,21,.10);
}
.effect-layer.rain .effect-card {
  background: linear-gradient(135deg, rgba(7,89,133,.95), rgba(12,74,110,.9));
  border-color: rgba(125,211,252,.8);
  box-shadow: 0 0 44px rgba(56,189,248,.35), 0 0 0 999px rgba(14,165,233,.09);
}
.effect-layer.finish .effect-card {
  background: linear-gradient(135deg, rgba(20,83,45,.96), rgba(8,47,73,.92));
  border-color: rgba(74,222,128,.72);
  box-shadow: 0 0 52px rgba(74,222,128,.38), 0 0 0 999px rgba(34,197,94,.08);
}
.effect-layer.cpu .effect-card, .effect-layer.turn .effect-card {
  font-size: clamp(20px, 4vw, 42px);
  min-width: min(600px, 84vw);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--effect-color, #2563eb) 76%, #020617),
      color-mix(in srgb, var(--effect-color, #2563eb) 48%, #0f172a));
  border-color: color-mix(in srgb, var(--effect-color, #2563eb) 70%, #ffffff);
  box-shadow:
    0 0 48px color-mix(in srgb, var(--effect-color, #2563eb) 42%, transparent),
    0 0 0 999px color-mix(in srgb, var(--effect-color, #2563eb) 14%, transparent),
    0 30px 100px rgba(0,0,0,.42);
  text-shadow: 0 3px 0 rgba(0,0,0,.26), 0 0 22px rgba(255,255,255,.22);
}
.effect-layer.turn .effect-card::before,
.effect-layer.cpu .effect-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  animation: effectSweep 1.4s ease both;
}
@keyframes effectPop {
  0% { transform: translateY(18px) scale(.84); opacity: 0; filter: blur(8px); }
  18% { transform: translateY(0) scale(1.04); opacity: 1; filter: blur(0); }
  72% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
@keyframes effectSweep {
  from { transform: translateX(-80%); opacity: 0; }
  35% { opacity: 1; }
  to { transform: translateX(80%); opacity: 0; }
}
@keyframes crashImpact {
  0% { transform: translateX(-18px) rotate(-3deg) scale(.82); opacity: 0; filter: blur(6px); }
  18% { transform: translateX(14px) rotate(2deg) scale(1.06); opacity: 1; filter: blur(0); }
  32% { transform: translateX(-8px) rotate(-1deg) scale(1); }
  48% { transform: translateX(4px) rotate(.5deg); }
  100% { transform: translateX(0) rotate(0); opacity: 1; }
}
body.is-fcy::before {
  content: "";
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(250,204,21,.10) 0 22px, rgba(0,0,0,0) 22px 44px);
  animation: fcySlide 3.2s linear infinite;
}
body.is-rain::after {
  content: "";
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background-image: linear-gradient(110deg, transparent 0 42%, rgba(125,211,252,.22) 44%, transparent 46%);
  background-size: 28px 90px;
  opacity: .22;
  animation: rainFall .8s linear infinite;
}
.game-app { position: relative; z-index: 5; }
@keyframes fcySlide { from { background-position: 0 0; } to { background-position: 120px 0; } }
@keyframes rainFall { from { background-position: 0 -90px; } to { background-position: 0 90px; } }
.car-token.last-actor .car-img, .standing-card.active .standing-car, .current-car-img {
  animation: carIdle 1.8s ease-in-out infinite;
}
.car-token.last-actor {
  box-shadow: 0 0 0 3px rgba(34,211,238,.26), 0 0 22px rgba(34,211,238,.28);
}
body.movement-in-progress .car-token.last-actor .car-img,
body.movement-in-progress .trackbar-driver.active img {
  animation: carStepPop .28s ease-out both;
}
body.movement-in-progress .car-token.last-actor {
  box-shadow: 0 0 0 4px rgba(250,204,21,.34), 0 0 26px rgba(250,204,21,.32);
}
@keyframes carStepPop {
  0% { transform: translateY(0) scale(.96) rotate(-3deg); }
  45% { transform: translateY(-9px) scale(1.1) rotate(3deg); }
  100% { transform: translateY(0) scale(1) rotate(0); }
}
@keyframes carIdle {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3px) rotate(1deg); }
}
.focus-card.now::after {
  content: "";
  position: absolute;
  left: -40%; top: 0; bottom: 0; width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  transform: skewX(-18deg);
  animation: scanLine 2.4s ease-in-out infinite;
  pointer-events: none;
}
.focus-card { position: relative; overflow: hidden; }
@keyframes scanLine {
  0%, 35% { left: -42%; }
  70%, 100% { left: 110%; }
}
.move-preview.safe strong::before,
.move-preview.danger strong::before { content: none; }
.log-entry.ok { animation: logIn .35s ease both; }
.log-entry.warn, .log-entry.danger { animation: logIn .35s ease both; }
@keyframes logIn { from { transform: translateX(10px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* === Phase 3 artwork and card material upgrade === */
.course-art {
  display: block;
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 15px;
  margin: 8px 0 7px;
  border: 1px solid rgba(125,211,252,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 8px 18px rgba(0,0,0,.22);
}
.focus-card.now .course-art { box-shadow: 0 0 24px rgba(34,211,238,.22), 0 8px 18px rgba(0,0,0,.24); }
.course-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin: 7px 0;
  border: 1px solid rgba(125,211,252,.13);
}
.course-card { overflow: hidden; }

.play-card.speed-card,
.play-card.skill-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.play-card.speed-card::before,
.play-card.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .58;
  background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.18), transparent 34%), linear-gradient(135deg, rgba(56,189,248,.22), transparent 58%);
}
.speed-card-face {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 7px;
}
.speed-orb {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 1000;
  color: #fff;
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.2), 0 8px 18px rgba(0,0,0,.34);
}
.speed-lines {
  flex: 1;
  height: 42px;
  border-radius: 999px;
  opacity: .85;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.75) 0 16px, transparent 16px 28px);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 80%, transparent);
}
.speed-1 .speed-orb { background: linear-gradient(135deg, #0ea5e9, #1e40af); }
.speed-2 .speed-orb { background: linear-gradient(135deg, #22c55e, #047857); }
.speed-3 .speed-orb { background: linear-gradient(135deg, #f97316, #b91c1c); }
.speed-4 .speed-orb { background: linear-gradient(135deg, #a855f7, #7c2d12 55%, #facc15); }
.speed-1::before { background: radial-gradient(circle at 80% 20%, rgba(14,165,233,.42), transparent 38%), linear-gradient(135deg, rgba(14,165,233,.20), transparent 55%) !important; }
.speed-2::before { background: radial-gradient(circle at 80% 20%, rgba(34,197,94,.35), transparent 38%), linear-gradient(135deg, rgba(34,197,94,.18), transparent 55%) !important; }
.speed-3::before { background: radial-gradient(circle at 80% 20%, rgba(249,115,22,.42), transparent 38%), linear-gradient(135deg, rgba(239,68,68,.18), transparent 55%) !important; }
.speed-4::before { background: radial-gradient(circle at 80% 20%, rgba(250,204,21,.38), transparent 38%), linear-gradient(135deg, rgba(168,85,247,.24), transparent 55%) !important; }
.speed-card .card-speed { display: none; }

.skill-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  float: right;
  margin: -4px -2px 4px 8px;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.28));
}
.skill-card .card-title { min-height: 1.4em; }
.skill-target::before { background: radial-gradient(circle at 80% 20%, rgba(249,115,22,.35), transparent 38%), linear-gradient(135deg, rgba(127,29,29,.22), transparent 55%) !important; }
.skill-global::before { background: radial-gradient(circle at 80% 20%, rgba(250,204,21,.36), transparent 38%), linear-gradient(135deg, rgba(2,132,199,.22), transparent 55%) !important; }
.skill-defense::before { background: radial-gradient(circle at 80% 20%, rgba(34,197,94,.32), transparent 38%), linear-gradient(135deg, rgba(20,184,166,.20), transparent 55%) !important; }
.skill-assist::before { background: radial-gradient(circle at 80% 20%, rgba(56,189,248,.34), transparent 38%), linear-gradient(135deg, rgba(37,99,235,.22), transparent 55%) !important; }
.play-card.skill-card {
  min-height: 168px;
  padding: 0;
  display: block;
  background: #fff;
  aspect-ratio: 2 / 3;
}
.skill-card-art {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  border-radius: 16px;
  background: #f8fafc;
  padding: 0;
  display: block;
}
.selected-skill-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.selected-skill-head span {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
}
.selected-skill-help .selected-skill-head span { background: #ffedd5; color: #9a3412; }
.skill-card-badge,
.skill-card-summary {
  position: absolute;
  z-index: 3;
  left: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15,23,42,.78);
  color: #fff;
  font-weight: 1000;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0,0,0,.34);
}
.skill-card-badge {
  top: 8px;
  right: auto;
  max-width: calc(100% - 16px);
  min-height: 22px;
  padding: 4px 8px;
  font-size: 10px;
}
.skill-card-summary {
  bottom: 8px;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(15,23,42,.84);
  font-size: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.play-card.skill-card.selected .skill-card-badge,
.play-card.skill-card.selected .skill-card-summary {
  background: rgba(29,78,216,.88);
}
.play-card.skill-card.unusable::after {
  display: none;
}
.selected-skill-help {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(125,211,252,.22);
}
.selected-skill-help strong {
  color: #f8fafc;
  font-size: 14px;
}
.selected-skill-help p,
.selected-skill-help em {
  margin: 0;
  color: #dbeafe;
  font-style: normal;
  line-height: 1.35;
}
.selected-skill-help em {
  color: #bfdbfe;
  font-weight: 1000;
}
.selected-skill-help.blocked {
  border-color: rgba(248,113,113,.45);
  background: rgba(127,29,29,.22);
}
.move-preview.skill-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}
.move-preview > p {
  margin: 7px 0 0;
  line-height: 1.45;
}
.preview-destination {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  border: 1px solid currentColor;
}
.preview-destination span {
  font-size: 11px;
  font-weight: 1000;
}
.preview-destination b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-change {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #93c5fd;
}
.preview-change strong {
  color: #1d4ed8;
  font-size: 11px;
  white-space: nowrap;
}
.preview-change.unchanged {
  color: #64748b;
  background: #f8fafc;
  border-color: #cbd5e1;
}
.preview-route .route-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 2px 6px;
  align-items: center;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 10px;
}
.preview-route .route-chip b { font-size: 10px; }
.preview-route .route-chip small {
  grid-column: 1 / -1;
  font-size: 10px;
  line-height: 1.2;
}
.preview-route .route-chip.out { color: #991b1b; background: #fee2e2; border-color: #fca5a5; }
.preview-route .route-chip.chance { color: #713f12; background: #fef9c3; border-color: #fde047; }
.preview-route .route-chip.arrival { box-shadow: inset 0 -3px 0 #2563eb; }
.target-hint {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
}

.skill-detail-layer {
  place-items: end center;
  padding: 18px;
}
.skill-detail-card {
  width: min(780px, 96vw);
  max-height: min(88vh, 760px);
  border-radius: 28px;
  padding: 18px;
  overflow: auto;
}
.skill-detail-head {
  margin-bottom: 12px;
}
.skill-detail-body {
  display: grid;
  gap: 14px;
}
.skill-detail-layout {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.skill-detail-art-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.skill-detail-art {
  width: min(220px, 100%);
  aspect-ratio: 2 / 3;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, .24);
  background: #f8fafc;
}
.skill-detail-state {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 1000;
}
.skill-detail-state.selected {
  background: #dbeafe;
  color: #1d4ed8;
}
.skill-detail-state.blocked {
  background: #fee2e2;
  color: #991b1b;
}
.skill-detail-copy {
  display: grid;
  gap: 10px;
}
.skill-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-detail-tags span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
  font-weight: 1000;
}
.skill-detail-copy h3 {
  margin: 0;
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.08;
}
.skill-detail-copy p {
  margin: 0;
  color: #334155;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.55;
}
.skill-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}
.skill-detail-list div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.skill-detail-list dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 1000;
}
.skill-detail-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  line-height: 1.35;
}
.skill-detail-target {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.skill-detail-target span {
  color: #9a3412;
  font-size: 12px;
  font-weight: 1000;
}
.skill-detail-target select {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid #fdba74;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  padding: 0 12px;
}
.skill-detail-target small {
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}
.skill-detail-impact {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  color: #7c2d12;
  background: #fffbeb;
}
.skill-detail-impact strong { font-size: 15px; }
.skill-detail-impact span { font-weight: 900; line-height: 1.4; }
.skill-detail-impact small { color: #92400e; font-weight: 800; }
.skill-detail-impact.blocked {
  color: #991b1b;
  background: #fef2f2;
  border-left-color: #ef4444;
}
.skill-detail-actions {
  display: grid;
  grid-template-columns: minmax(120px, .42fr) 1fr;
  gap: 10px;
  margin-top: 14px;
}
.skill-detail-actions button {
  min-height: 52px;
}

.play-card.selected .skill-icon,
.play-card.selected .speed-orb {
  animation: selectedGlow 1.4s ease-in-out infinite alternate;
}
@keyframes selectedGlow {
  from { filter: drop-shadow(0 8px 10px rgba(0,0,0,.28)); transform: translateY(0); }
  to { filter: drop-shadow(0 0 16px rgba(34,211,238,.42)); transform: translateY(-1px); }
}

@media (max-width: 720px) {
  .course-art { height: 62px; }
  .speed-orb { width: 40px; height: 40px; font-size: 24px; border-radius: 13px; }
  .speed-lines { height: 34px; }
  .skill-icon { width: 36px; height: 36px; }
}

/* App-game shell additions */
.title-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 8px, transparent 8px 18px);
  backdrop-filter: blur(10px);
}
.title-screen.hidden { display: none; }
.title-card {
  width: min(760px, 96vw);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 58px);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.92));
  color: #0f172a;
  box-shadow: 0 30px 100px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.8);
  text-align: center;
  overflow: hidden;
  position: relative;
}
.title-card::before {
  content: '';
  position: absolute;
  inset: -50% -20% auto auto;
  width: 60%;
  height: 180%;
  background: repeating-linear-gradient(45deg, rgba(14,165,233,.14) 0 12px, transparent 12px 24px);
  transform: rotate(-12deg);
}
.title-card > * { position: relative; }
.title-card h1 {
  margin: 6px 0 8px;
  font-size: clamp(40px, 8vw, 82px);
  letter-spacing: .03em;
  line-height: .9;
  color: #0f172a;
  text-shadow: 0 4px 0 rgba(14,165,233,.14);
}
.title-copy { font-size: clamp(18px, 3vw, 26px); font-weight: 800; margin: 10px 0 28px; }
.title-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0; }
.title-start { font-size: 18px; padding: 16px 30px; }
.title-hint { color: #475569; font-weight: 700; }
.plan-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 16px auto 0;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, .06);
  border: 1px solid rgba(15, 23, 42, .10);
  color: #334155;
  font-weight: 900;
  text-align: left;
}
.plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .08em;
}
body.plan-paid .plan-badge {
  background: #fef3c7;
  color: #92400e;
  border-color: #facc15;
}
body.plan-free .host-pass-only { display: none !important; }
.ad-slot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  align-items: center;
  margin: 14px auto 0;
  padding: 12px 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(248, 250, 252, .96), rgba(219, 234, 254, .88));
  border: 1px dashed rgba(37, 99, 235, .34);
  color: #1e3a8a;
  text-align: left;
  font-weight: 900;
}
.ad-slot span {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #1d4ed8;
  color: #fff;
  font-size: 12px;
  letter-spacing: .12em;
}
.ad-slot strong { font-size: 14px; }
.ad-slot em {
  color: #475569;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}
body.plan-paid .ad-slot { display: none !important; }
.top-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.obs-button {
  min-height: 44px;
  padding: 0 14px;
  border-color: rgba(250, 204, 21, .42);
  background: linear-gradient(135deg, rgba(120, 53, 15, .92), rgba(15, 23, 42, .92));
  color: #fef3c7;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .08em;
}
.obs-button:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 22px rgba(250, 204, 21, .2);
}
.icon-button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: inherit;
  font-weight: 900;
  font-size: 20px;
  cursor: pointer;
}
.icon-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .68);
  backdrop-filter: blur(8px);
}
.modal-layer.hidden { display: none; }
.modal-card {
  width: min(860px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, .12);
  box-shadow: 0 28px 90px rgba(0,0,0,.38);
  padding: 22px;
}
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 28px; }
.settings-card .setup-panel { display: block; box-shadow: none; border: 0; background: transparent; padding: 0; }
.settings-card .setup-panel.hidden { display: block; }
.broadcast-title-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7fd, #eef7ff);
}
.broadcast-title-setting label { min-width: 0; }
.broadcast-title-setting input { width: 100%; }
.broadcast-title-setting p {
  grid-column: 1 / -1;
  margin: 0;
  color: #5b527b;
  font-size: 13px;
  font-weight: 700;
}
@media (max-width: 520px) {
  .broadcast-title-setting { grid-template-columns: 1fr; align-items: stretch; }
  .broadcast-title-setting p { grid-column: 1; }
  .preview-change { grid-template-columns: 1fr; }
}
.tutorial-list { display: grid; gap: 12px; font-size: 16px; line-height: 1.7; padding-left: 24px; }
.modal-actions { display: flex; justify-content: center; margin-top: 18px; }
.product-card,
.rulebook-card,
.support-card {
  width: min(980px, 96vw);
}
.product-info-grid,
.rulebook-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.product-info-grid section,
.rulebook-grid section,
.support-grid section {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
}
.plan-card.host-pass-plan {
  background: linear-gradient(135deg, #fff7ed, #eff6ff);
  border-color: #facc15;
}
.plan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.restore-pass-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(15, 23, 42, 0.18);
}
.restore-pass-panel h4 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 14px;
}
.restore-pass-panel label {
  display: block;
  margin: 10px 0 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}
.restore-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.restore-inline input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 800;
}
.restore-inline input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: none;
}
.billing-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}
.billing-status.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.billing-status.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.billing-status.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.product-info-grid h3,
.rulebook-grid h3,
.support-grid h3 { color: #334155; }
.product-info-grid ul,
.rulebook-grid ul,
.rulebook-grid ol,
.support-grid ul { margin: 8px 0 0; padding-left: 20px; line-height: 1.7; font-weight: 800; color: #334155; }
.support-grid textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font: 800 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.product-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-weight: 900;
  line-height: 1.6;
}
.online-connection-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0 0 12px;
  padding: 9px 14px;
  border-radius: 16px;
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  font-weight: 900;
  text-align: center;
}
.online-connection-bar.hidden { display: none; }
.online-connection-bar.connected {
  color: #166534;
  background: #ecfdf5;
  border-color: #86efac;
}
.online-connection-bar.reconnecting,
.online-connection-bar.connecting {
  color: #92400e;
  background: #fff7ed;
  border-color: #fbbf24;
}
.online-connection-bar.offline,
.online-connection-bar.error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}
.room-card { width: min(1040px, 96vw); }
.room-plan-summary {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 18px;
  color: #0f172a;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid #bfdbfe;
  font-weight: 900;
  line-height: 1.55;
}
.room-plan-summary.paid {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-color: #facc15;
  color: #7c2d12;
}
.room-grid {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: start;
}
.room-form,
.room-live {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
}
.room-form-actions,
.room-ready-row,
.room-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.room-form-actions > *,
.room-ready-row > * { flex: 1; }
.room-code-box {
  padding: 16px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border: 1px solid #38bdf8;
}
.room-code-box span {
  display: block;
  color: #bae6fd;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .18em;
}
.room-code-box strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(34px, 8vw, 72px);
  line-height: .95;
  letter-spacing: .08em;
}
.room-status {
  padding: 10px 12px;
  border-radius: 16px;
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  font-weight: 900;
  line-height: 1.5;
}
.room-status.ok { color: #166534; background: #ecfdf5; border-color: #86efac; }
.room-status.warn { color: #92400e; background: #fff7ed; border-color: #fed7aa; }
.room-status.danger { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.room-seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.room-seat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border-radius: 18px;
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}
.room-seat span {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: #2563eb;
  font-weight: 1000;
}
.room-seat strong { font-size: 16px; font-weight: 1000; }
.room-seat em { color: #64748b; font-style: normal; font-weight: 900; }
.room-seat.occupied {
  border-style: solid;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.room-seat.you {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}
.room-seat.offline {
  opacity: .72;
  background: #f1f5f9;
}
.room-seat.cpu-seat,
.room-seat:disabled {
  cursor: not-allowed;
}
.room-seat.cpu-seat {
  background: repeating-linear-gradient(135deg, #f8fafc 0 12px, #e2e8f0 12px 24px);
  color: #475569;
}
.room-seat.cpu-seat span {
  background: #64748b;
}
.room-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 900;
}
.lobby-ad { margin-top: 0; }
.room-obs-tools {
  display: grid;
  gap: 10px;
  padding: 13px;
  border-radius: 18px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #facc15;
}
.room-obs-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.room-obs-actions > * { flex: 1; }
.tutorial-coach {
  grid-column: 1 / -1;
  padding: 13px 14px;
  border-radius: 18px;
  color: #172033;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  border: 1px solid #bfdbfe;
  font-weight: 900;
  line-height: 1.55;
}
.tutorial-coach.hidden { display: none; }
.tutorial-coach strong {
  display: block;
  margin-bottom: 2px;
  color: #1d4ed8;
  letter-spacing: .04em;
}
.result-card { text-align: center; }
.result-card h2 { font-size: clamp(34px, 7vw, 64px); margin: 8px 0; }
.winner-title { display: inline-block; margin: 10px auto 18px; padding: 10px 18px; border-radius: 999px; background: #fef3c7; color: #92400e; font-weight: 900; }
.result-summary { color: #475569; font-weight: 800; margin-bottom: 16px; }
.result-decisive {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 12px;
  align-items: center;
  margin: 12px auto;
  padding: 14px 16px;
  color: #f8fafc;
  background: linear-gradient(120deg, #172033, #24375b);
  border-left: 5px solid #facc15;
  border-radius: 8px;
  text-align: left;
  box-shadow: 0 14px 28px rgba(15,23,42,.18);
}
.result-decisive small {
  grid-column: 1 / -1;
  color: #fde68a;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .08em;
}
.result-decisive strong { color: #ffffff; font-size: 18px; }
.result-decisive span { color: #dbeafe; font-weight: 800; line-height: 1.45; }
@media (max-width: 520px) {
  .result-decisive { grid-template-columns: 1fr; }
}
.result-reason,
.result-moments,
.result-next-step {
  display: grid;
  gap: 8px;
  margin: 12px auto;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e3a8a;
  text-align: left;
  font-weight: 850;
  line-height: 1.55;
}
.result-moments {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #334155;
}
.result-moments span {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}
.result-moments span.warn { border-color: #fed7aa; background: #fff7ed; color: #92400e; }
.result-moments span.danger { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.result-next-step {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}
.result-ad { max-width: 720px; }
.result-ranking { display: grid; gap: 8px; margin: 18px auto; text-align: left; }
.result-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: #f8fafc;
  font-weight: 800;
}
.result-row.winner { background: linear-gradient(90deg, #fff7ed, #fef3c7); border-color: #f59e0b; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.player-setup-row { grid-template-columns: 1.2fr .75fr .9fr 1fr; }

/* === Host Pass OBS broadcast overlay === */
body.broadcast-overlay-mode {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}
body.broadcast-overlay-mode .title-screen,
body.broadcast-overlay-mode .game-app,
body.broadcast-overlay-mode .modal-layer,
body.broadcast-overlay-mode .effect-layer {
  display: none !important;
}
.broadcast-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  --obs-ink: #17162f;
  --obs-ink-2: #221f45;
  --obs-panel: rgba(32, 30, 70, .94);
  --obs-panel-2: rgba(22, 21, 50, .96);
  --obs-text: #fff7fd;
  --obs-muted: #d2ceef;
  --obs-pink: #ff7ab8;
  --obs-blue: #77d7ff;
  --obs-lavender: #bda7ff;
  --obs-mint: #7ee6c5;
  --obs-yellow: #ffe88a;
  color: var(--obs-text);
  background: transparent;
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  padding: clamp(14px, 2vw, 34px);
}
.broadcast-overlay.hidden { display: none !important; }
.broadcast-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(8px, 1.2vw, 16px);
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
}
.broadcast-header {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto;
  gap: clamp(14px, 2vw, 28px);
  align-items: center;
  min-height: clamp(70px, 8.5vh, 104px);
  padding: clamp(10px, 1.4vw, 18px) clamp(14px, 2vw, 26px);
  background:
    linear-gradient(115deg, rgba(255,122,184,.17) 0 18%, transparent 18% 72%, rgba(119,215,255,.14) 72%),
    radial-gradient(circle at 78% 0%, rgba(189,167,255,.18), transparent 34%),
    linear-gradient(180deg, rgba(34, 31, 69, .98), rgba(23, 22, 47, .95));
  border: 1px solid rgba(189, 167, 255, .28);
  border-bottom: 4px solid var(--obs-pink);
  box-shadow: 0 18px 46px rgba(14,12,38,.42), inset 0 1px 0 rgba(255,255,255,.14);
}
.broadcast-header::before {
  content: "LIVE";
  position: absolute;
  left: clamp(128px, 13vw, 218px);
  top: 0;
  padding: 5px 18px 5px 28px;
  color: #271736;
  background: linear-gradient(90deg, var(--obs-pink), var(--obs-yellow));
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .18em;
  line-height: 1;
}
.broadcast-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,122,184,.82), rgba(119,215,255,.78), rgba(126,230,197,.76), transparent);
  box-shadow: 0 0 18px rgba(255,122,184,.45), 0 0 24px rgba(119,215,255,.28);
}
.broadcast-mark {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  min-width: 112px;
  padding: 11px 13px 9px;
  color: var(--obs-text);
  background: rgba(24, 23, 54, .82);
  border: 1px solid rgba(189, 167, 255, .34);
  box-shadow: inset 4px 0 0 var(--obs-pink), 0 14px 28px rgba(14,12,38,.28);
  font-weight: 1000;
  letter-spacing: -.04em;
  line-height: .78;
  font-size: clamp(28px, 3.4vw, 52px);
  transform: skewX(-10deg);
}
.broadcast-mark span,
.broadcast-mark small {
  transform: skewX(10deg);
}
.broadcast-mark small {
  color: var(--obs-mint);
  font-size: clamp(8px, .8vw, 12px);
  letter-spacing: .22em;
  text-transform: uppercase;
}
.broadcast-title {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
  text-transform: uppercase;
}
.broadcast-title span {
  color: var(--obs-blue);
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 900;
  letter-spacing: .26em;
}
.broadcast-title strong {
  color: var(--obs-text);
  font-size: clamp(25px, 3.3vw, 56px);
  line-height: .88;
  font-weight: 1000;
  letter-spacing: .035em;
  text-shadow: 0 0 18px rgba(255,122,184,.18), 0 0 24px rgba(119,215,255,.10);
}
.broadcast-meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  font-weight: 900;
  font-size: clamp(14px, 1.2vw, 20px);
}
.broadcast-meta span {
  display: grid;
  min-width: clamp(70px, 7.4vw, 112px);
  padding: 7px 10px 8px;
  border-radius: 7px;
  color: var(--obs-text);
  background: linear-gradient(180deg, rgba(44,40,91,.9), rgba(23,22,47,.92));
  border: 1px solid rgba(189,167,255,.32);
  box-shadow: inset 0 -3px 0 rgba(255,122,184,.42), 0 10px 22px rgba(14,12,38,.24);
}
.broadcast-meta small {
  color: var(--obs-blue);
  font-size: 10px;
  letter-spacing: .18em;
  line-height: 1;
}
.broadcast-meta strong {
  color: var(--obs-yellow);
  font-size: clamp(16px, 1.65vw, 27px);
  line-height: 1.05;
  letter-spacing: .04em;
}
.broadcast-board {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,122,184,.10), transparent 24% 78%, rgba(119,215,255,.10)),
    linear-gradient(180deg, rgba(30,28,66,.96), rgba(22,21,50,.94));
  border: 1px solid rgba(189,167,255,.20);
  box-shadow: 0 22px 60px rgba(14,12,38,.34), inset 0 1px 0 rgba(255,255,255,.10);
}
.broadcast-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), transparent 16%),
    repeating-linear-gradient(90deg, rgba(189,167,255,.055) 0 1px, transparent 1px 72px);
  opacity: .38;
}
.broadcast-table {
  position: relative;
  z-index: 1;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.broadcast-table th {
  height: clamp(38px, 4.8vh, 54px);
  padding: 0 14px;
  color: var(--obs-muted);
  background: rgba(24,23,54,.74);
  border-bottom: 1px solid rgba(189,167,255,.20);
  text-align: left;
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.broadcast-table td {
  height: clamp(37px, 4.15vh, 54px);
  padding: 0 14px;
  border-bottom: 1px solid rgba(189,167,255,.10);
  background: linear-gradient(90deg, rgba(39,35,78,.96), rgba(29,27,61,.94));
  font-size: clamp(18px, 2.2vw, 36px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.broadcast-table tr:nth-child(even) td {
  background: linear-gradient(90deg, rgba(31,29,67,.96), rgba(24,23,54,.94));
}
.broadcast-table tr.is-current td {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--driver-color, var(--obs-pink)) 34%, #221f45), rgba(29,27,61,.98) 58%),
    rgba(29,27,61,.98);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--driver-color, var(--obs-pink)) 48%, transparent);
}
.broadcast-table .pos {
  width: 70px;
  color: var(--obs-blue);
  text-align: center;
  font-weight: 1000;
  text-shadow: 0 0 14px rgba(119,215,255,.36);
}
.broadcast-table .driver-col { width: 24%; }
.broadcast-table .lap,
.broadcast-table .speed { width: 11%; }
.broadcast-table .gap { width: 18%; }
.broadcast-table .status { width: 18%; }
.broadcast-table .driver {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font-weight: 900;
}
.broadcast-table .driver img {
  width: clamp(54px, 7vw, 116px);
  height: clamp(30px, 3.4vw, 54px);
  object-fit: contain;
  filter: drop-shadow(0 8px 9px rgba(0,0,0,.5));
}
.broadcast-table .driver-code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--obs-text);
  letter-spacing: .08em;
  text-shadow: 0 0 12px rgba(255,255,255,.12);
}
.broadcast-table .lap,
.broadcast-table .speed,
.broadcast-table .gap,
.broadcast-table .status {
  text-align: right;
}
.broadcast-table .gap,
.broadcast-table .speed {
  color: var(--obs-mint);
  font-weight: 1000;
  text-shadow: 0 0 12px rgba(126,230,197,.22);
}
.broadcast-table .status {
  font-size: clamp(12px, 1.12vw, 18px);
  color: var(--obs-muted);
  letter-spacing: .04em;
}
.broadcast-track-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(189,167,255,.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119,215,255,.052) 1px, transparent 1px),
    radial-gradient(circle at 32% 18%, rgba(255,122,184,.14), transparent 26%),
    radial-gradient(circle at 70% 62%, rgba(119,215,255,.11), transparent 34%),
    rgba(25, 24, 56, .90);
  background-size: 44px 44px, 44px 44px, auto, auto;
  border: 1px solid rgba(189,167,255,.16);
  box-shadow: 0 22px 60px rgba(14,12,38,.32);
}
.broadcast-track-head {
  position: absolute;
  z-index: 4;
  left: 18px;
  right: 18px;
  top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--obs-text);
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.broadcast-track-map {
  position: absolute;
  inset: clamp(56px, 6.2vh, 82px) clamp(38px, 4.4vw, 78px) clamp(22px, 3vh, 44px);
}
.broadcast-track-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.broadcast-track-shadow,
.broadcast-track-main,
.broadcast-track-highlight {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.broadcast-track-shadow {
  stroke: rgba(13,11,32,.78);
  stroke-width: clamp(28px, 3.4vw, 44px);
}
.broadcast-track-main {
  stroke: var(--obs-blue);
  stroke-width: clamp(18px, 2.2vw, 30px);
  filter: drop-shadow(0 0 9px rgba(119,215,255,.42));
}
.broadcast-track-highlight {
  stroke: var(--obs-pink);
  stroke-width: clamp(5px, .72vw, 9px);
  opacity: .9;
}
.broadcast-sector {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin: -15px 0 0 -15px;
  border-radius: 999px;
  color: #17162f;
  background: var(--obs-mint);
  border: 2px solid rgba(23,22,47,.78);
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 0 8px 16px rgba(14,12,38,.34), 0 0 10px rgba(126,230,197,.30);
}
.broadcast-sector.corner { background: var(--obs-yellow); }
.broadcast-sector.start {
  width: 48px;
  height: 34px;
  margin: -17px 0 0 -24px;
  border-radius: 7px;
  color: var(--obs-ink);
  background: linear-gradient(180deg, #fff7fd, #f4edff);
  box-shadow: 0 8px 16px rgba(14,12,38,.34);
}
.broadcast-driver-token {
  position: absolute;
  z-index: 5;
  display: grid;
  grid-template-columns: 38px auto;
  align-items: center;
  min-width: 84px;
  min-height: 42px;
  margin: -21px 0 0 -19px;
  transform: translate(var(--fan-x, 0), var(--fan-y, 0));
  filter: drop-shadow(0 12px 12px rgba(0,0,0,.55));
}
.broadcast-driver-token img {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 38px;
  object-fit: contain;
}
.broadcast-driver-rank {
  position: absolute;
  left: -3px;
  top: -9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #17162f;
  background: var(--driver-color, var(--obs-mint));
  border: 2px solid rgba(23,22,47,.72);
  font-size: 13px;
  font-weight: 1000;
}
.broadcast-driver-name {
  margin-left: 8px;
  padding: 5px 8px 4px 9px;
  color: #221f45;
  background: linear-gradient(180deg, #fff7fd, #e9e1ff);
  border: 1px solid rgba(23,22,47,.42);
  border-radius: 999px;
  font-size: clamp(12px, 1.3vw, 20px);
  font-weight: 800;
  letter-spacing: -.02em;
}

@media (min-width: 760px) {
  .broadcast-track-panel {
    min-height: clamp(320px, 46vh, 560px);
  }
}

@media (max-width: 700px) {
  .broadcast-overlay {
    padding: 10px 12px;
  }

  .broadcast-shell {
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px;
  }

  .broadcast-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    min-height: 92px;
    padding: 9px 10px;
  }

  .broadcast-header::before {
    left: auto;
    right: 10px;
    top: 8px;
    padding: 4px 14px 4px 22px;
    font-size: 10px;
  }

  .broadcast-mark {
    min-width: 84px;
    padding: 9px 10px 8px;
    font-size: 27px;
  }

  .broadcast-mark small {
    font-size: 7px;
  }

  .broadcast-title {
    text-align: left;
  }

  .broadcast-title span {
    font-size: 10px;
    letter-spacing: .18em;
    padding-right: 74px;
  }

  .broadcast-title strong {
    font-size: clamp(23px, 7vw, 34px);
    line-height: .92;
  }

  .broadcast-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
    font-size: 12px;
  }

  .broadcast-meta span {
    min-width: 68px;
    padding: 6px 8px 7px;
  }

  .broadcast-meta strong {
    font-size: 16px;
  }

  .broadcast-table th {
    height: 40px;
    padding: 0 9px;
    font-size: 10px;
    letter-spacing: .05em;
  }

  .broadcast-table td {
    padding: 0 9px;
  }

  .broadcast-track-panel {
    min-height: 48vh;
  }

  .broadcast-track-head {
    top: 12px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
  }

  .broadcast-track-map {
    inset: 82px 28px 24px;
  }

  .broadcast-track-shadow {
    stroke-width: 28px;
  }

  .broadcast-track-main {
    stroke-width: 18px;
  }

  .broadcast-track-highlight {
    stroke-width: 5px;
  }

  .broadcast-sector {
    width: 27px;
    height: 27px;
    margin: -13px 0 0 -13px;
    font-size: 12px;
  }

  .broadcast-sector.start {
    width: 42px;
    height: 30px;
    margin: -15px 0 0 -21px;
    font-size: 11px;
  }

  .broadcast-driver-token {
    grid-template-columns: 30px auto;
    min-width: 68px;
    min-height: 36px;
    margin: -18px 0 0 -15px;
  }

  .broadcast-driver-token img {
    width: 46px;
    height: 31px;
  }

  .broadcast-driver-rank {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .broadcast-driver-name {
    min-width: 30px;
    padding: 4px 7px;
    font-size: 14px;
  }
}

.broadcast-waiting {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 24% 20%, rgba(255,122,184,.16), transparent 28%),
    radial-gradient(circle at 74% 72%, rgba(119,215,255,.13), transparent 34%),
    linear-gradient(135deg, rgba(34,31,69,.92), rgba(23,22,47,.82));
  border: 1px solid rgba(189,167,255,.24);
}
.broadcast-waiting h1 {
  margin: 0 0 14px;
  color: var(--obs-text);
  font-size: clamp(36px, 7vw, 92px);
  letter-spacing: .04em;
}
.broadcast-waiting p {
  margin: 0;
  color: var(--obs-blue);
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 900;
}
@media (max-width: 720px) {
  .modal-card { padding: 16px; border-radius: 18px; }
  .product-info-grid,
  .rulebook-grid,
  .support-grid { grid-template-columns: 1fr; }
  .plan-strip { grid-template-columns: 1fr; text-align: center; }
  .room-grid { grid-template-columns: 1fr; }
  .room-form-actions,
  .room-ready-row,
  .room-link-row,
  .room-obs-actions { flex-direction: column; align-items: stretch; }
  .room-seats { grid-template-columns: 1fr; }
  .result-row { grid-template-columns: 1fr; }
  .player-setup-row { grid-template-columns: 1fr; }
  .restore-inline { grid-template-columns: 1fr; }
  .title-card { padding: 28px 18px; }
  .top-actions { width: 100%; justify-content: stretch; }
  .top-actions > * { flex: 1; }
}


/* === Phase 7-9: sound feedback, gaze guidance, and stronger GP identity === */
.title-subcopy,
.brand-subtitle {
  margin: 6px 0 0;
  color: #7dd3fc;
  font-weight: 900;
  letter-spacing: .04em;
}
.title-subcopy { color: rgba(229, 243, 255, .82); font-size: 15px; }
.top-command .brand-block h1 { letter-spacing: .08em; }
.turn-guide {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(15,23,42,.96), rgba(30,41,59,.9));
  border: 1px solid rgba(125, 211, 252, .22);
}
.guide-step {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 10px 10px 10px 38px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  color: #b6c8dc;
  border: 1px solid rgba(255,255,255,.08);
}
.guide-step.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(14,165,233,.34), rgba(250,204,21,.15));
  border-color: rgba(125, 211, 252, .62);
  box-shadow: 0 0 22px rgba(14,165,233,.22);
}
.guide-num {
  position: absolute;
  left: 10px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(148,163,184,.25);
  font-size: 12px;
  font-weight: 1000;
}
.guide-step.active .guide-num { background: #facc15; color: #111827; }
.guide-step strong { font-size: 13px; }
.guide-step small { color: inherit; opacity: .76; font-weight: 800; }
.coach-panel {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  padding: 10px 14px;
  margin-bottom: 8px;
  color: #dbeafe;
  background: linear-gradient(90deg, rgba(30,41,59,.96), rgba(15,23,42,.92));
  border: 1px solid rgba(125,211,252,.24);
  font-weight: 850;
}
.coach-panel strong {
  color: #7dd3fc;
  letter-spacing: .05em;
  font-size: 12px;
}
.coach-panel.safe { border-color: rgba(74,222,128,.45); box-shadow: inset 0 0 22px rgba(34,197,94,.08); }
.coach-panel.danger { border-color: rgba(248,113,113,.55); box-shadow: inset 0 0 22px rgba(239,68,68,.10); }
.move-preview.safe strong,
.move-preview.danger strong {
  letter-spacing: .04em;
}
.effect-layer.attack .effect-card {
  border-color: rgba(250,204,21,.8);
  background: linear-gradient(135deg, rgba(126,34,206,.94), rgba(234,88,12,.9));
  box-shadow: 0 0 50px rgba(250,204,21,.32);
}
.effect-layer.recovery .effect-card {
  border-color: rgba(59,130,246,.78);
  background: linear-gradient(135deg, rgba(15,23,42,.94), rgba(37,99,235,.88));
}
.play-card.speed-3.selected,
.play-card.speed-4.selected {
  box-shadow: 0 0 0 4px rgba(248,113,113,.20), 0 0 28px rgba(249,115,22,.34);
}
.play-card.skill-card.selected {
  box-shadow: 0 0 0 4px rgba(14,165,233,.18), 0 0 24px rgba(14,165,233,.26);
}
.tutorial-next {
  display: block;
  margin-top: 6px;
  color: #0f766e;
}
.hands-grid.tutorial-hand-guide {
  position: relative;
}
.play-card.tutorial-muted {
  opacity: .16;
  filter: grayscale(1) brightness(.42) contrast(.82);
  pointer-events: none;
  transform: none;
  box-shadow: none;
}
.play-card.tutorial-target {
  z-index: 6;
  border-color: #facc15;
  box-shadow: 0 0 0 5px rgba(250,204,21,.26), 0 0 34px rgba(250,204,21,.42), 0 16px 36px rgba(15,23,42,.24);
  animation: tutorialPulseCard 1.15s ease-in-out infinite alternate;
}
.play-card.tutorial-target::before {
  border-color: rgba(250,204,21,.8);
}
.play-card.tutorial-target.selected {
  border-color: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.24), 0 0 34px rgba(34,197,94,.36), 0 16px 36px rgba(15,23,42,.24);
}
.tutorial-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #172033;
  background: #facc15;
  border: 1px solid rgba(120, 53, 15, .28);
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(15,23,42,.18);
}
.run-button.tutorial-target {
  border-color: #facc15;
  box-shadow: 0 0 0 5px rgba(250,204,21,.24), 0 0 32px rgba(250,204,21,.36), 0 14px 30px rgba(15,23,42,.24);
  animation: tutorialPulseCard 1.1s ease-in-out infinite alternate;
}
@keyframes tutorialPulseCard {
  from { transform: translateY(-1px); }
  to { transform: translateY(-5px); }
}
@media (max-width: 720px) {
  .turn-guide {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    padding: 8px;
  }
  .guide-step { min-height: 52px; padding: 9px 9px 9px 34px; }
  .guide-step strong { font-size: 12px; }
  .guide-step small { font-size: 11px; }
  .coach-panel {
    grid-template-columns: 1fr;
    gap: 2px;
    font-size: 12px;
    padding: 9px 10px;
  }
}


/* === Racecraft GP stable CPU restore: CSS-only mobile readability === */
.course-focus .focus-card,
.focus-card,
.course-card,
.course-tile,
.track-card {
  position: relative;
  overflow: hidden;
}

.focus-card::after,
.course-card::after,
.course-tile::after,
.track-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.05) 40%, rgba(0,0,0,.60));
  pointer-events: none;
}

.focus-name,
.focus-safe,
.focus-label,
.focus-cars {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,.85);
}

@media (max-width: 720px) {
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

  .game-app {
    max-width: 100%;
    padding: 8px 8px calc(260px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .top-command {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: -8px -8px 8px;
    padding: 8px;
    border-radius: 0 0 18px 18px;
    background: rgba(5, 10, 20, .94);
    backdrop-filter: blur(12px);
  }

  .brand-block .eyebrow,
  .brand-subtitle,
  .turn-guide,
  .coach-panel,
  .course-details,
  .rules-panel,
  .current-player,
  .section-heading,
  .mini-map {
    display: none !important;
  }

  .top-command h1,
  .brand-block h1 {
    font-size: 20px !important;
    line-height: 1.05;
  }

  .race-hud {
    gap: 6px !important;
    flex-wrap: wrap;
  }

  .race-hud .hud-pill:nth-child(n+4) {
    display: none;
  }

  .game-stage {
    display: block !important;
  }

  .side-dash {
    display: none !important;
  }

  .race-board {
    padding: 8px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .alert-bar {
    margin-bottom: 8px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .alert-bar.empty-state {
    display: none !important;
  }

  .course-focus {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  .focus-card.now,
  .course-focus .focus-card:first-child {
    grid-column: 1 / -1 !important;
    min-height: 330px !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 48px rgba(0,0,0,.40) !important;
    border: 2px solid rgba(255,255,255,.18) !important;
  }

  .course-focus .focus-card:not(:first-child) {
    min-height: 76px !important;
    border-radius: 14px !important;
    opacity: .92;
  }

  .focus-card .course-art {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .focus-card.now .focus-name,
  .course-focus .focus-card:first-child .focus-name {
    font-size: 30px !important;
    line-height: 1.05 !important;
    font-weight: 950 !important;
  }

  .focus-card.now .focus-safe,
  .course-focus .focus-card:first-child .focus-safe {
    display: inline-flex !important;
    margin-top: 6px !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #ffd84d, #ff9f1c) !important;
    color: #0b1320 !important;
    text-shadow: none !important;
    font-size: 16px !important;
    font-weight: 950 !important;
  }

  .course-focus .focus-card:not(:first-child) .focus-name {
    font-size: 11px !important;
    line-height: 1.05 !important;
  }

  .course-focus .focus-card:not(:first-child) .focus-safe {
    font-size: 10px !important;
  }

  .course-focus .focus-card:not(:first-child) .focus-label {
    display: none !important;
  }

  .focus-card.now .focus-cars,
  .course-focus .focus-card:first-child .focus-cars {
    position: absolute !important;
    left: 50% !important;
    bottom: 78px !important;
    transform: translateX(-50%) !important;
    z-index: 4 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px !important;
    width: 90% !important;
  }

  .focus-card.now .car-img,
  .course-focus .focus-card:first-child .car-img {
    width: 82px !important;
    height: 82px !important;
  }

  .course-focus .focus-card:not(:first-child) .focus-cars {
    display: none !important;
  }

  .command-dock {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 22px 22px 0 0 !important;
    padding: 9px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    background: rgba(6, 12, 24, .98) !important;
  }

  .dock-topline h2 {
    font-size: 15px !important;
    margin: 0 !important;
  }

  .dock-kicker {
    font-size: 10px !important;
    margin-bottom: 0 !important;
  }

  .target-area {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    margin-top: 4px !important;
  }

  .target-area label {
    font-size: 10px !important;
  }

  .target-hint {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .move-preview {
    min-height: 42px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }

  .move-preview .preview-route {
    display: none !important;
  }

  .hands-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-top: 0 !important;
  }

  .hand-block h3 {
    margin: 0 0 5px !important;
    font-size: 11px !important;
  }

  .speed-hand {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .skill-hand {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .play-card {
    min-height: 62px !important;
    border-radius: 15px !important;
    padding: 7px !important;
  }

  .play-card.skill-card {
    min-height: 152px !important;
    padding: 0 !important;
    aspect-ratio: 2 / 3 !important;
  }

  .skill-card-art {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    border-radius: 13px !important;
  }

  .skill-card-badge {
    top: 6px !important;
    left: 6px !important;
    min-height: 18px !important;
    padding: 3px 6px !important;
    font-size: 9px !important;
  }

  .skill-card-summary {
    left: 6px !important;
    right: 6px !important;
    bottom: 6px !important;
    min-height: 23px !important;
    padding: 4px 6px !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
  }

  .speed-orb {
    width: 36px !important;
    height: 36px !important;
    font-size: 24px !important;
  }

  .card-kind,
  .card-text,
  .skill-icon {
    display: none !important;
  }

  .card-title {
    margin-top: 4px !important;
    font-size: 11px !important;
    text-align: center !important;
  }

  .run-button {
    height: 52px !important;
    min-width: 100% !important;
    border-radius: 15px !important;
    font-size: 17px !important;
    letter-spacing: .08em;
  }
}
