/* 기본 화면 스타일(index.html 인라인 <style>에서 옮김). redesign.css 등이 뒤에서 덮어쓴다. */
    :root {
      --bg: #0B0F17;
      --panel: #161C28;
      --panel-raised: #1B2230;
      --line: #242B39;
      --text: #E8EAF0;
      --muted: #8B93A7;
      --blue: #2F81F7;
      --blue-soft: rgba(47, 129, 247, 0.16);
      --red: #E1364B;
      --red-soft: rgba(225, 54, 75, 0.16);
      --green: #34D399;
      --green-soft: rgba(52, 211, 153, 0.14);
      --amber: #F59E0B;
      --amber-soft: rgba(245, 158, 11, 0.14);
      --gold: #C9A227;
      --danger: #DC2626;
      --shadow: none;
      --radius: 2px;
      font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      color: var(--text);
      background: var(--bg);
      overflow-x: hidden;
    }

    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: var(--bg); }
    ::-webkit-scrollbar-thumb { background: #232A38; border-radius: 6px; }

    button, input, select, textarea {
      font: inherit;
    }

    button {
      cursor: pointer;
      border: 1px solid var(--line);
      background: var(--panel-raised);
      color: var(--text);
      border-radius: var(--radius);
      padding: 8px 11px;
      transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease,
        filter 140ms ease;
    }

    button:hover:not(:disabled) {
      border-color: #3a4356;
      filter: brightness(1.15);
    }

    button:active:not(:disabled) {
      transform: scale(0.985);
    }

    button:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }

    input, select, textarea {
      background: var(--panel-raised);
      color: var(--text);
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-rows: auto auto 1fr;
    }

    body.landing-active {
      overflow: auto;
    }

    body.landing-active .app {
      display: none;
    }

    body:not(.landing-active) .landing {
      display: none;
    }

    .landing {
      min-height: 100vh;
      padding: 72px 24px 96px;
      overflow-x: hidden;
      background:
        radial-gradient(circle at 18% 18%, rgba(47, 129, 247, 0.18), transparent 34%),
        radial-gradient(circle at 82% 24%, rgba(201, 162, 39, 0.16), transparent 30%),
        linear-gradient(145deg, #070a10 0%, #0b0f17 48%, #111827 100%);
    }

    .landing-shell {
      width: min(1160px, 100%);
      margin: 0 auto;
      display: grid;
      gap: 76px;
    }

    .landing-copy {
      display: grid;
      gap: 26px;
    }

    .landing-kicker {
      display: inline-flex;
      width: max-content;
      gap: 7px;
      align-items: center;
      padding: 8px 12px;
      border: 1px solid rgba(201, 162, 39, 0.38);
      border-radius: 999px;
      background: rgba(201, 162, 39, 0.10);
      color: #f8d46a;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

    .landing h1 {
      margin: 0;
      max-width: 900px;
      color: #f8fafc;
      font-size: clamp(34px, 5vw, 58px);
      line-height: 1.1;
      letter-spacing: 0;
    }

    .landing-lead {
      max-width: 820px;
      margin: 0;
      color: #cbd5e1;
      font-size: 16px;
      line-height: 1.78;
    }

    .landing-actions {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }

    .landing-primary,
    .landing-secondary {
      min-height: 44px;
      padding: 13px 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius);
      font-size: 13px;
      font-weight: 800;
      line-height: 1;
      text-decoration: none;
    }

    .landing-primary {
      color: #07111f;
      border-color: rgba(248, 212, 106, 0.9);
      background: linear-gradient(135deg, #f8d46a, #c9a227);
    }

    .landing-secondary {
      color: #ffffff;
      border-color: rgba(88, 101, 242, 0.74);
      background: linear-gradient(135deg, #5865f2, #4752c4);
      box-shadow: 0 10px 24px rgba(88, 101, 242, 0.18);
    }

    .landing-reasons {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      margin-top: 8px;
    }

    .landing-card {
      min-width: 0;
      padding: 18px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: var(--radius);
      background: rgba(15, 23, 42, 0.70);
    }

    .landing-card b {
      display: block;
      margin-bottom: 5px;
      color: #f8fafc;
      font-size: 13px;
    }

    .landing-card span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.48;
    }

    .landing-showcase {
      display: grid;
      gap: 18px;
    }

    .showcase-grid {
      display: grid;
      gap: 30px;
    }

    .showcase-card {
      --reveal-x: -56px;
      width: min(1040px, 100%);
      justify-self: start;
      display: grid;
      grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.4fr);
      gap: 22px;
      align-items: center;
      padding: 18px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 10px;
      background:
        linear-gradient(135deg, rgba(248, 212, 106, 0.05), transparent 34%),
        rgba(15, 23, 42, 0.72);
      opacity: 0;
      transform: translateX(var(--reveal-x));
      transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease;
      will-change: opacity, transform;
    }

    .showcase-card:nth-child(even) {
      --reveal-x: 56px;
      justify-self: end;
      grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.85fr);
    }

    .showcase-card:nth-child(even) .showcase-copy {
      grid-column: 2;
      grid-row: 1;
    }

    .showcase-card:nth-child(even) .showcase-shot {
      grid-column: 1;
      grid-row: 1;
    }

    .showcase-card.is-visible {
      opacity: 1;
      transform: translateX(0);
    }

    .showcase-copy {
      display: grid;
      gap: 9px;
    }

    .showcase-label {
      width: max-content;
      padding: 5px 8px;
      border: 1px solid rgba(201, 162, 39, 0.40);
      border-radius: 999px;
      color: #f8d46a;
      background: rgba(201, 162, 39, 0.08);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.04em;
    }

    .showcase-card h3 {
      margin: 0;
      color: #f8fafc;
      font-size: 20px;
      line-height: 1.28;
      letter-spacing: 0;
    }

    .showcase-card p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.7;
      word-break: keep-all;
    }

    .showcase-shot {
      --shot-ratio: 16 / 9;
      min-width: 0;
      aspect-ratio: var(--shot-ratio);
      display: grid;
      place-items: center;
      padding: 12px;
      overflow: hidden;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 8px;
      background:
        radial-gradient(circle at 22% 18%, rgba(47, 129, 247, 0.10), transparent 38%),
        #080c13;
      box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    }

    .showcase-shot.board-shot,
    .showcase-shot.reason-shot {
      --shot-ratio: 4 / 3;
    }

    .showcase-shot.pool-shot {
      --shot-ratio: 21 / 8;
    }

    .showcase-shot.edit-shot {
      --shot-ratio: 6 / 5;
    }

    .showcase-shot.patch-shot {
      --shot-ratio: 7 / 2;
      min-height: 132px;
    }

    .showcase-shot img {
      width: 100%;
      height: auto;
      max-height: 100%;
      display: block;
      object-fit: contain;
      object-position: center;
    }

    .showcase-shot.reason-shot img {
      width: min(100%, 430px);
    }

    .showcase-shot.patch-shot img {
      width: min(100%, 390px);
    }

    .landing-final-cta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      flex-wrap: wrap;
      margin-top: 6px;
      padding: 22px;
      border: 1px solid rgba(201, 162, 39, 0.24);
      border-radius: 10px;
      background: rgba(201, 162, 39, 0.08);
    }

    .landing-final-cta b {
      display: block;
      margin-bottom: 4px;
      color: #f8fafc;
      font-size: 18px;
    }

    .landing-final-cta span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .landing-basis {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      max-width: 860px;
      padding: 18px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 14px;
      background: rgba(15, 23, 42, 0.52);
    }

    .landing-basis-title {
      width: 100%;
      color: #f8fafc;
      font-weight: 800;
      font-size: 14px;
      margin-bottom: 4px;
    }

    .landing-basis-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border: 1px solid rgba(148, 163, 184, 0.15);
      border-radius: 999px;
      background: rgba(2, 6, 23, 0.32);
      color: #cbd5e1;
      font-size: 12px;
    }

    .landing-basis-row span:last-child {
      color: #f8d46a;
      font-weight: 700;
      white-space: nowrap;
    }

    .landing-source-note {
      max-width: 860px;
      margin-top: -10px;
      color: #94a3b8;
      font-size: 12px;
      line-height: 1.65;
      word-break: keep-all;
    }

    .timer-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 8px 14px 10px;
      border-bottom: 1px solid var(--line);
    }

    .timer-toggle {
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      line-height: 1;
    }

    .timer-toggle input {
      width: auto;
      margin: 0;
      flex: 0 0 auto;
      accent-color: var(--gold);
    }

    .timer-display {
      display: inline-grid;
      place-items: center;
      font-variant-numeric: tabular-nums;
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      min-width: 58px;
      height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      background: var(--panel-raised);
      border: 1px solid var(--line);
      line-height: 1;
    }

    .timer-display[hidden] {
      display: none !important;
    }

    .timer-display.timer-warn {
      color: var(--amber);
      background: var(--amber-soft);
    }

    .timer-display.timer-critical {
      color: #fff;
      background: var(--danger);
      animation: blink-danger 1s infinite;
    }

    .timer-settings {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin: 0 14px 12px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel-raised);
    }

    .timer-settings[hidden] {
      display: none !important;
    }

    .timer-settings label {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      color: var(--muted);
      margin: 0;
    }

    .timer-settings input {
      width: 46px;
      padding: 3px 6px;
      font-size: 12px;
    }

    .timer-top-bar {
      position: relative;
      height: 18px;
      margin: 8px 0 12px;
      background: var(--panel-raised);
      border: 1px solid var(--line);
      border-radius: 999px;
      overflow: hidden;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
    }

    .timer-top-bar[hidden] {
      display: none !important;
    }

    .timer-top-bar-fill {
      position: absolute;
      inset: 0 auto 0 0;
      height: 100%;
      width: 100%;
      background: var(--blue);
      border-radius: inherit;
      transition: width 110ms linear, background-color 0.2s ease;
      will-change: width;
    }

    .timer-top-bar-fill.timer-warn { background: var(--amber); }
    .timer-top-bar-fill.timer-critical { background: var(--danger); animation: blink-danger 0.9s ease-in-out infinite; }

    @keyframes blink-danger { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

    .timer-top-bar-label {
      position: absolute;
      inset: 0;
      z-index: 1;
      display: grid;
      place-items: center;
      font-size: 11px;
      font-weight: 700;
      color: var(--text);
      background: transparent;
      padding: 0;
      font-variant-numeric: tabular-nums;
      letter-spacing: 0.3px;
      line-height: 1;
      pointer-events: none;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    }

    header {
      padding: 18px 22px 14px;
      border-bottom: 1px solid var(--line);
      background: rgba(11, 15, 23, 0.92);
      backdrop-filter: blur(12px);
      position: sticky;
      top: 0;
      z-index: 10;
    }

    .topbar {
      display: flex;
      gap: 14px;
      align-items: center;
      justify-content: space-between;
      max-width: 1560px;
      margin: 0 auto;
    }

    h1 {
      margin: 0;
      font-size: 22px;
      letter-spacing: 0;
    }

    .subtitle {
      margin-top: 4px;
      color: var(--muted);
      font-size: 14px;
    }

    .data-patch-note {
      margin-top: 6px;
      color: #9CA3AF;
      font-size: 11px;
      line-height: 1.35;
      letter-spacing: 0;
    }

    .data-patch-note b {
      color: #D8B858;
      font-weight: 700;
    }

    .actions, .tabs, .segment, .row, .chips {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }

    .data-controls {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .save-status {
      display: inline-flex;
      align-items: center;
      min-height: 32px;
      padding: 6px 9px;
      border: 1px solid var(--line);
      color: var(--muted);
      background: var(--panel);
      font-size: 12px;
      font-weight: 600;
    }

    .save-status.dirty {
      border-color: rgba(245, 158, 11, 0.45);
      color: #f8d46a;
      background: rgba(245, 158, 11, 0.08);
    }

    .save-status.saved {
      border-color: rgba(52, 211, 153, 0.34);
      color: #7ee7bf;
      background: rgba(52, 211, 153, 0.07);
    }

    .data-menu {
      position: relative;
    }

    .data-menu > summary {
      min-height: 36px;
      padding: 8px 11px;
      border: 1px solid var(--line);
      color: var(--text);
      background: var(--panel-raised);
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      list-style: none;
      user-select: none;
    }

    .data-menu > summary::-webkit-details-marker { display: none; }
    .data-menu > summary::after { content: "▾"; margin-left: 8px; color: var(--muted); }
    .data-menu[open] > summary::after { content: "▴"; }

    .data-menu-popover {
      position: absolute;
      z-index: 40;
      top: calc(100% + 6px);
      right: 0;
      display: grid;
      gap: 6px;
      width: 180px;
      padding: 8px;
      border: 1px solid var(--line-strong);
      background: var(--panel);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    }

    .data-menu-popover button { width: 100%; }

    .dev-only[hidden],
    .local-only[hidden] {
      display: none !important;
    }

    .primary {
      background: var(--gold);
      color: #0B0F17;
      border-color: var(--gold);
      font-weight: 600;
    }

    .danger {
      background: var(--red-soft);
      color: #ff8496;
      border-color: rgba(225, 54, 75, 0.4);
    }

    .tabs {
      max-width: 1560px;
      margin: 0 auto;
      padding: 10px 22px;
      border-bottom: 1px solid var(--line);
      background: transparent;
    }

    .tab {
      border: 0;
      border-bottom: 2px solid transparent;
      background: transparent;
      color: var(--muted);
      padding: 10px 12px;
      border-radius: 0;
      font-size: 15px;
      font-weight: 600;
    }

    .tab.active {
      background: transparent;
      color: var(--text);
      border-bottom-color: var(--gold);
    }

    main {
      width: 100%;
      max-width: 1560px;
      margin: 0 auto;
      padding: 18px 22px 28px;
    }

    .view { display: none; }
    .view.active { display: block; }

    .grid {
      display: grid;
      gap: 14px;
    }

    .setup-grid {
      grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    }

    .setup-team-pair {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
      gap: 14px;
      align-items: start;
    }

    .pro-team-setup-panel {
      grid-column: 1 / -1;
    }

    .pro-draft-mode .pro-team-setup-panel {
      grid-column: 1 / -1;
    }

    .game-setup-panel {
      grid-column: 1 / -1;
    }

    .pro-draft-mode .pro-team-select-grid select {
      min-height: 48px;
      font-size: 15px;
      font-weight: 700;
    }

    .pro-team-select-grid,
    .pro-team-profile-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .pro-team-profile-grid {
      margin-top: 12px;
    }

    .pro-team-profile {
      min-height: 96px;
      padding: 12px;
      border: 1px solid var(--line);
      border-left: 3px solid var(--blue);
      background: var(--panel-raised);
    }

    .pro-team-profile.enemy {
      border-left-color: var(--red);
    }

    .pro-team-profile-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
    }

    .pro-team-identity,
    .team-owner,
    .series-team-name {
      display: inline-flex;
      align-items: center;
      min-width: 0;
      gap: 9px;
    }

    .pro-team-identity-copy {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .pro-team-identity-copy small {
      color: var(--muted);
      font-size: 12px;
    }

    .team-logo {
      display: block;
      width: 54px;
      height: 54px;
      flex: 0 0 auto;
      box-sizing: border-box;
      object-fit: contain;
      padding: 5px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #ffffff;
    }

    .team-logo-fallback {
      display: inline-grid;
      place-items: center;
      color: var(--text);
      background: var(--panel);
      font-size: 13px;
      font-weight: 800;
    }

    .team-owner .team-logo {
      width: 28px;
      height: 28px;
      padding: 3px;
      border: 0;
      border-radius: 5px;
      background: rgba(255, 255, 255, 0.94);
    }

    .series-team-name .team-logo {
      width: 28px;
      height: 28px;
      padding: 3px;
      border: 0;
      border-radius: 5px;
      background: rgba(255, 255, 255, 0.94);
    }

    .pro-team-profile-head strong {
      font-size: 18px;
    }

    .pro-team-style-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .pro-team-style-chips .chip {
      color: var(--text);
      background: rgba(201, 162, 39, 0.08);
      border-color: rgba(201, 162, 39, 0.32);
    }

    .pro-team-data-status {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .pro-team-data-status b {
      color: #cbd5e1;
      font-weight: 750;
    }

    .pro-team-target-bans {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 9px;
      padding-top: 9px;
      border-top: 1px solid var(--line);
      color: var(--muted);
      font-size: 12px;
    }

    .pro-team-target-bans b {
      flex: 0 0 auto;
      color: var(--text);
      font-size: 12px;
    }

    .pro-team-target-bans span {
      color: #d9e3f3;
      white-space: nowrap;
    }

    .draft-layout {
      grid-template-columns: minmax(680px, 1fr) minmax(380px, 500px);
      align-items: start;
    }

    .draft-board-panel {
      min-width: 0;
    }

    .series-bar {
      display: grid;
      grid-template-columns: minmax(140px, 1fr) minmax(360px, auto) minmax(140px, 1fr);
      align-items: center;
      gap: 14px;
      padding: 11px 14px;
      border-bottom: 1px solid var(--line);
      background: #101620;
    }

    .series-meta,
    .series-status {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
    }

    .series-status {
      justify-content: flex-end;
      text-align: right;
    }

    .series-score {
      display: grid;
      grid-template-columns: minmax(105px, 1fr) 34px 12px 34px minmax(105px, 1fr);
      align-items: center;
      gap: 7px;
      width: 100%;
      min-width: 360px;
      max-width: 440px;
      text-align: center;
    }

    .series-team-name:first-child {
      justify-content: flex-start;
      flex-direction: row-reverse;
      text-align: right;
    }

    .series-team-name:last-child {
      justify-content: flex-start;
      text-align: left;
    }

    .series-team-name > span {
      overflow: hidden;
      min-width: 0;
      text-overflow: ellipsis;
    }

    .series-score span {
      overflow: hidden;
      color: var(--text);
      font-size: 14px;
      font-weight: 700;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .series-score strong {
      display: grid;
      place-items: center;
      width: 34px;
      height: 32px;
      border: 1px solid var(--line);
      background: var(--panel-raised);
      font-size: 18px;
      font-variant-numeric: tabular-nums;
    }

    .series-score strong.our { border-color: rgba(47, 129, 247, 0.58); color: #8fbdff; }
    .series-score strong.enemy { border-color: rgba(225, 54, 75, 0.58); color: #ff8d9c; }
    .series-score i { color: var(--muted); font-style: normal; }

    .series-result-panel {
      display: grid;
      gap: 12px;
      padding: 14px;
      border-bottom: 1px solid rgba(201, 162, 39, 0.35);
      background: rgba(201, 162, 39, 0.07);
    }

    .series-result-panel[hidden],
    .series-result-actions[hidden],
    .series-next-controls[hidden] {
      display: none !important;
    }

    .series-result-copy {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .series-result-copy b { font-size: 16px; }
    .series-result-copy span { color: var(--muted); font-size: 13px; }

    .series-result-actions,
    .series-next-controls {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .series-result-actions button { min-width: 150px; }
    .series-next-controls {
      align-items: end;
    }

    .series-next-settings {
      display: grid;
      grid-template-columns: repeat(2, minmax(190px, 1fr));
      gap: 10px;
      flex: 1 1 420px;
      max-width: 560px;
    }

    .series-next-option {
      display: grid;
      gap: 6px;
    }

    .series-next-option > span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .series-next-option .switch {
      min-width: 0;
    }

    .side-choice button[data-side="BLUE"].active {
      border-color: var(--blue);
      background: var(--blue-soft);
      color: #a9cdff;
    }

    .side-choice button[data-side="RED"].active {
      border-color: var(--red);
      background: var(--red-soft);
      color: #ff9eaa;
    }

    .order-choice button.active {
      border-color: var(--gold);
      background: rgba(201, 162, 39, 0.14);
      color: #f8d46a;
    }

    .series-history-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .series-history-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 8px;
      border: 1px solid var(--line);
      background: var(--panel-raised);
      color: var(--muted);
      font-size: 12px;
    }

    .series-history-item b { color: var(--text); }

    .draft-readiness[hidden],
    .fearless-history[hidden] {
      display: none !important;
    }

    .readiness-step:disabled {
      cursor: not-allowed;
      opacity: 0.48;
    }

    .tab:disabled {
      cursor: not-allowed;
      opacity: 0.4;
    }

    .readiness-step.locked {
      border-color: var(--line);
      background: rgba(15, 23, 42, 0.42);
    }

    .workflow-step-bar {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 14px 16px;
      border: 1px solid rgba(47, 129, 247, 0.38);
      background: rgba(47, 129, 247, 0.08);
    }

    .workflow-step-bar[hidden] {
      display: none !important;
    }

    .workflow-step-copy {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .workflow-step-copy b {
      color: var(--text);
      font-size: 16px;
    }

    .workflow-step-copy span {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
    }

    .workflow-step-bar button {
      flex: 0 0 auto;
      min-width: 190px;
    }

    .draft-readiness {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      padding: 10px;
      border: 1px solid var(--line);
      background: var(--panel-raised);
    }

    .readiness-step {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-height: 42px;
      padding: 8px 10px;
      text-align: left;
      background: var(--panel);
      border-color: var(--line);
    }

    .readiness-step strong {
      display: block;
      color: var(--text);
      font-size: 12px;
    }

    .readiness-step span {
      color: var(--muted);
      font-size: 11px;
    }

    .readiness-step.complete { border-color: rgba(52, 211, 153, 0.34); }
    .readiness-step.current {
      border-color: rgba(201, 162, 39, 0.62);
      background: rgba(201, 162, 39, 0.08);
    }

    .board-head-controls {
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .current-turn-info {
      display: grid;
      gap: 6px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel-raised);
    }

    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: none;
      overflow: hidden;
    }

    .panel-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      padding: 13px 14px;
      border-bottom: 1px solid var(--line);
      background: var(--panel);
    }

    .panel-title {
      font-weight: 700;
      font-size: 17px;
    }

    .panel-body {
      padding: 14px;
    }

    .muted { color: var(--muted); }
    .small { font-size: 14px; line-height: 1.45; }
    .strong { font-weight: 600; }

    label {
      display: block;
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 5px;
    }

    input, select, textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 8px 9px;
      background: var(--panel-raised);
      color: var(--text);
      min-width: 0;
      transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
    }

    input:focus, select:focus, textarea:focus {
      outline: 0;
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.25);
    }

    textarea {
      resize: vertical;
      min-height: 180px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 12px;
      line-height: 1.45;
    }

    .field-grid {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 8px;
      align-items: end;
    }

    .setup-options-grid {
      grid-template-columns: repeat(4, minmax(140px, 1fr));
      align-items: start;
    }

    .player-row {
      display: grid;
      grid-template-columns: 66px minmax(150px, 1fr) 168px;
      gap: 8px;
      margin-bottom: 9px;
      align-items: end;
    }

    .side-pill, .role-pill, .chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 4px 8px;
      background: var(--panel-raised);
      white-space: nowrap;
      font-size: 12px;
      font-weight: 500;
    }

    .blue { color: var(--blue); }
    .red { color: var(--red); }
    .blue-bg { background: var(--blue-soft); border-color: rgba(47, 129, 247, 0.4); }
    .red-bg { background: var(--red-soft); border-color: rgba(225, 54, 75, 0.4); }
    .green-bg { background: var(--green-soft); border-color: rgba(52, 211, 153, 0.4); color: var(--green); }

    .switch {
      display: inline-flex;
      align-items: center;
      background: var(--panel-raised);
      border-radius: 999px;
      padding: 3px;
      border: 1px solid var(--line);
    }

    .switch button {
      border: 0;
      background: transparent;
      border-radius: 999px;
      padding: 7px 11px;
      color: var(--muted);
    }

    .switch button.active {
      background: var(--panel);
      color: var(--text);
      box-shadow: none;
    }

    .board {
      display: grid;
      gap: 13px;
    }

    .phase-strip {
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--bg);
    }

    .phase-strip-legend {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--muted);
      font-size: 12px;
    }

    .phase-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .phase-legend-swatch {
      width: 10px;
      height: 10px;
      border-radius: 2px;
    }

    .phase-legend-swatch.blue { background: var(--blue); }
    .phase-legend-swatch.red { background: var(--red); }

    .phase-track {
      display: grid;
      grid-template-columns: repeat(20, minmax(30px, 1fr));
      gap: 4px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .draft-step {
      min-width: 0;
      height: 46px;
      border: 1px solid var(--line);
      border-radius: 4px;
      display: grid;
      place-items: center;
      align-content: center;
      gap: 2px;
      position: relative;
      color: var(--text);
      background: var(--panel-raised);
      transition: border-color 140ms ease, background 140ms ease, box-shadow 180ms ease;
    }

    .draft-step::after {
      content: "";
      position: absolute;
      top: 50%;
      left: calc(100% + 2px);
      width: 4px;
      height: 1px;
      background: #465066;
    }

    .draft-step:last-child::after { display: none; }

    .draft-step-side {
      font-size: 12px;
      line-height: 1;
      font-weight: 800;
      letter-spacing: 0.04em;
    }

    .draft-step-action {
      font-size: 12px;
      line-height: 1;
      font-weight: 700;
    }

    .draft-step.side-blue {
      color: #cfe5ff;
      border-color: rgba(47, 129, 247, 0.68);
      background: rgba(47, 129, 247, 0.18);
      box-shadow: inset 0 3px 0 rgba(47, 129, 247, 0.78);
    }

    .draft-step.side-red {
      color: #ffd5da;
      border-color: rgba(225, 54, 75, 0.66);
      background: rgba(225, 54, 75, 0.17);
      box-shadow: inset 0 3px 0 rgba(225, 54, 75, 0.76);
    }

    .draft-step.type-ban .draft-step-action { opacity: 0.72; }
    .draft-step.type-pick .draft-step-action { color: #fff; }

    .draft-step.done {
      opacity: 0.62;
      filter: saturate(0.72);
    }

    .draft-step.done::before {
      content: "✓";
      position: absolute;
      top: 2px;
      right: 3px;
      font-size: 9px;
      color: currentColor;
    }

    .draft-step.current {
      opacity: 1;
      outline: 2px solid var(--gold);
      outline-offset: 1px;
      color: #fff4c7;
      border-color: var(--gold);
      box-shadow: inset 0 3px 0 var(--gold), 0 0 0 3px rgba(201, 162, 39, 0.13);
      animation: currentTurnPulse 1600ms ease-in-out infinite;
    }

    .mobile-draft-flow {
      display: none;
    }

    .mobile-flow-now {
      display: grid;
      gap: 8px;
      padding: 12px;
      border: 1px solid rgba(201, 162, 39, 0.34);
      border-radius: 8px;
      background: rgba(201, 162, 39, 0.08);
    }

    .mobile-flow-now-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }

    .mobile-flow-title {
      font-size: 16px;
      font-weight: 800;
      color: var(--text);
    }

    .mobile-flow-sub {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .mobile-flow-phases {
      display: grid;
      gap: 10px;
    }

    .mobile-phase-card {
      display: grid;
      gap: 9px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
    }

    .mobile-phase-card.current {
      border-color: rgba(201, 162, 39, 0.62);
      box-shadow: inset 2px 0 0 var(--gold);
    }

    .mobile-phase-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
    }

    .mobile-phase-head b {
      font-size: 13px;
      color: var(--text);
    }

    .mobile-phase-steps {
      display: grid;
      gap: 7px;
    }

    .mobile-step-row {
      min-height: 44px;
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      padding: 7px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel-raised);
    }

    .mobile-step-row.current {
      border-color: var(--gold);
      background: rgba(201, 162, 39, 0.10);
    }

    .mobile-step-row.done {
      opacity: 0.86;
    }

    .mobile-step-code {
      display: grid;
      place-items: center;
      min-height: 30px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 800;
      color: var(--text);
      background: rgba(255, 255, 255, 0.05);
    }

    .mobile-step-code.blue {
      color: #dbeafe;
      background: rgba(47, 129, 247, 0.18);
    }

    .mobile-step-code.red {
      color: #ffe4e6;
      background: rgba(225, 54, 75, 0.18);
    }

    .mobile-step-main {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .mobile-step-text {
      min-width: 0;
      display: grid;
      gap: 1px;
    }

    .mobile-step-text strong {
      font-size: 13px;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .mobile-step-text span {
      color: var(--muted);
      font-size: 11px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .mobile-step-state {
      color: var(--muted);
      font-size: 11px;
      white-space: nowrap;
    }

    .mobile-step-row.current .mobile-step-state {
      color: var(--gold);
      font-weight: 800;
    }

    .team-board {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    .team-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden;
      background: var(--panel);
    }

    .blue-team-card {
      border-color: var(--line);
      box-shadow: inset 2px 0 0 var(--blue);
    }

    .red-team-card {
      border-color: var(--line);
      box-shadow: inset 2px 0 0 var(--red);
    }

    .team-card h2 {
      margin: 0;
      min-height: 55px;
      padding: 9px 12px;
      font-size: 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--line);
      background: var(--panel);
    }

    .team-card h2 .team-owner {
      display: grid;
      grid-template-columns: 28px minmax(0, auto);
      max-width: 72%;
      gap: 7px;
      padding: 4px 8px 4px 4px;
      color: var(--text);
      font-size: 14px;
      font-weight: 700;
      border-radius: 6px;
      overflow: hidden;
    }

    .team-card h2 .team-owner > span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .blue-team-card h2 .team-owner {
      border-color: rgba(47, 129, 247, 0.35);
      background: rgba(47, 129, 247, 0.08);
    }

    .red-team-card h2 .team-owner {
      border-color: rgba(225, 54, 75, 0.35);
      background: rgba(225, 54, 75, 0.08);
    }

    .slots {
      padding: 12px;
      display: grid;
      gap: 12px;
    }

    .slot-group-title {
      display: flex;
      justify-content: space-between;
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 7px;
    }

    .ban-row {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 7px;
    }

    .pick-list {
      display: grid;
      gap: 7px;
    }

    .slot {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      min-height: 52px;
      background: var(--panel-raised);
      padding: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease,
        box-shadow 180ms ease;
    }

    .slot.active {
      border-color: var(--gold);
      background: rgba(201, 162, 39, 0.10);
      box-shadow: inset 0 0 0 1px var(--gold);
      animation: activeSlotGlow 1700ms ease-in-out infinite;
    }

    .slot.empty {
      color: var(--muted);
      justify-content: center;
      text-align: center;
      font-size: 12px;
      background: transparent;
      border-style: dashed;
    }

    .slot-ban-only {
      justify-content: center;
      padding: 6px;
      display: grid;
      place-items: center;
    }

    .ban-icon-large {
      width: 40px;
      height: 40px;
      filter: grayscale(0.85) brightness(0.55);
    }

    .ban-icon-wrap {
      display: grid;
      place-items: center;
      width: 40px;
      height: 40px;
    }

    .champ-icon {
      width: 36px;
      height: 36px;
      border-radius: var(--radius);
      display: inline-grid;
      place-items: center;
      background: #2A3140;
      color: var(--text);
      font-weight: 600;
      flex: 0 0 auto;
      object-fit: cover;
      object-position: center;
      overflow: hidden;
      line-height: 1;
      vertical-align: middle;
    }

    .champ-icon.ban-icon-large {
      width: 40px;
      height: 40px;
    }

    .champ-info {
      display: grid;
      align-content: center;
      gap: 2px;
      min-width: 0;
      line-height: 1.2;
    }

    .champ-name {
      font-weight: 500;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      vertical-align: middle;
      min-width: 0;
      max-width: 100%;
      line-height: 1.2;
    }

    .slot-meta {
      min-width: 0;
      flex: 1;
      display: grid;
      align-content: center;
      gap: 2px;
    }

    .slot-sub {
      color: var(--muted);
      font-size: 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      display: block;
      min-width: 0;
      line-height: 1.25;
    }

    .pick-reassign {
      width: 100%;
      padding: 2px 4px;
      font-size: 11px;
      line-height: 1.2;
      color: var(--muted);
      border: 1px solid transparent;
      background: transparent;
    }

    .pick-reassign:hover, .pick-reassign:focus {
      border-color: var(--line);
      background: var(--panel-raised);
      color: var(--text);
    }

    .current-box {
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel);
    }

    .current-turn {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
    }

    .champ-search {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 102px;
      gap: 8px;
    }

    .champ-grid {
      max-height: 480px;
      overflow: auto;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 7px;
      padding-right: 2px;
    }

    .champ-button {
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      text-align: left;
      padding: 7px;
      min-width: 0;
      background: var(--panel-raised);
      transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease;
    }

    .champ-button.disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    .champ-button:not(.disabled):hover {
      background: #232A3A;
      border-color: var(--blue);
    }

    .tier {
      font-weight: 700;
      font-size: 12px;
      color: var(--gold);
    }

    .role-icons {
      display: inline-flex;
      gap: 3px;
      align-items: center;
      justify-content: center;
      flex-wrap: nowrap;
      vertical-align: middle;
      line-height: 1;
      height: 18px;
    }

    .role-icon {
      width: 18px;
      height: 18px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      overflow: visible;
      line-height: 0;
      flex: 0 0 auto;
    }

    .role-icon img {
      width: 16px;
      height: 16px;
      object-fit: contain;
      object-position: center;
      display: block;
      transform: translateY(0);
    }

    .role-icon-extra {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 18px;
      padding: 0 4px;
      border-radius: 999px;
      background: var(--panel-raised);
      color: var(--muted);
      font-size: 10px;
      font-weight: 600;
      line-height: 1;
      flex: 0 0 auto;
    }

    .reco-list {
      display: grid;
      gap: 5px;
    }

    .reco-card {
      border: 1px solid var(--line);
      border-left: 3px solid #3a4356;
      border-radius: var(--radius);
      padding: 6px;
      background: var(--panel-raised);
      display: grid;
      gap: 4px;
      box-shadow: none;
      animation: recoCardIn 170ms ease-out backwards;
      transition:
        border-color 160ms ease,
        background 160ms ease;
    }

    .reco-card:hover {
      border-color: var(--blue);
    }

    .reco-top {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr) 42px 46px;
      align-items: center;
      gap: 6px;
    }

    .reco-top .champ-icon {
      width: 34px;
      height: 34px;
    }

    .reco-top > div:nth-child(2) {
      min-width: 0;
      display: grid;
      align-content: center;
      gap: 2px;
    }

    .score {
      display: grid;
      place-items: center;
      gap: 2px;
      min-width: 42px;
      min-height: 34px;
      padding: 3px 5px;
      color: var(--text);
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      text-align: center;
      line-height: 1;
      align-self: center;
      font-variant-numeric: tabular-nums;
    }

    .score span {
      color: var(--muted);
      font-size: 9px;
      font-weight: 600;
    }

    .score b {
      font-size: 16px;
      font-weight: 700;
    }

    .bar {
      height: 3px;
      overflow: hidden;
      border-radius: 999px;
      background: var(--panel);
    }

    .bar > span {
      height: 100%;
      display: block;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--blue), var(--green));
      transition: width 260ms ease;
    }

    .reason {
      color: var(--muted);
      max-height: 21px;
      font-size: 11px;
      line-height: 1.2;
      display: flex;
      flex-wrap: nowrap;
      gap: 3px;
      overflow: hidden;
    }

    .reason-chip {
      display: inline-flex;
      align-items: center;
      max-width: 100%;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: var(--panel);
      flex: 0 0 auto;
      padding: 2px 5px;
      color: var(--muted);
      white-space: nowrap;
      transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
    }

    .reason-chip.good {
      color: var(--green);
      border-color: rgba(52, 211, 153, 0.4);
      background: var(--green-soft);
    }

    .reason-chip.warn {
      color: #ff8496;
      border-color: rgba(225, 54, 75, 0.4);
      background: var(--red-soft);
    }

    .reason-chip.strongest {
      font-weight: 600;
      border-width: 1.5px;
      box-shadow: 0 0 0 1px rgba(47, 129, 247, 0.3);
    }

    .reason-chip.strongest:not(.good):not(.warn) {
      color: var(--blue);
      border-color: var(--blue);
      background: var(--blue-soft);
    }

    .score-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 3px;
    }

    .mini-score {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 3px 4px;
      font-size: 10px;
      line-height: 1.15;
      color: var(--muted);
      background: var(--panel);
      min-width: 0;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
    }

    .mini-score b {
      display: inline;
      color: var(--text);
      font-size: 11px;
    }

    .reco-card > .bar {
      display: none;
    }

    .reco-apply {
      min-height: 32px;
      padding: 4px 5px;
      font-size: 11px;
      line-height: 1;
    }

    .mini-score:nth-child(8) {
      border-color: rgba(52, 211, 153, 0.4);
      background: var(--green-soft);
    }

    .recommend-dock {
      position: sticky;
      top: 104px;
      align-self: start;
      max-height: calc(100vh - 122px);
      overflow: hidden;
      container-type: inline-size;
    }

    @container (min-width: 440px) {
      .reco-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .reco-top {
        grid-template-columns: 32px minmax(0, 1fr) 38px 40px;
        gap: 4px;
      }

      .reco-top .champ-icon {
        width: 32px;
        height: 32px;
      }

      .reco-apply {
        min-width: 0;
        padding-inline: 3px;
      }
    }

    .recommend-dock > .panel {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      max-height: calc(100vh - 122px);
      overflow: hidden;
    }

    .turn-command-panel {
      border-color: rgba(201, 162, 39, 0.34);
    }

    .turn-command-collapse {
      display: none;
    }

    .turn-command-panel.enemy-turn {
      border-color: rgba(225, 54, 75, 0.38);
    }

    .turn-command-kicker {
      color: var(--gold);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-bottom: 3px;
    }

    .turn-command-panel.enemy-turn .turn-command-kicker {
      color: var(--red);
    }

    .turn-command-title {
      font-size: 17px;
      line-height: 1.25;
    }

    .turn-command-body {
      min-height: 0;
      overflow: auto;
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 11px;
    }

    .turn-command-guide {
      order: 0;
      padding: 9px 10px;
      border: 1px solid rgba(201, 162, 39, 0.28);
      border-radius: var(--radius);
      color: var(--text);
      background: rgba(201, 162, 39, 0.08);
      font-size: 14px;
      line-height: 1.45;
    }

    .turn-command-panel.enemy-turn .turn-command-guide {
      border-color: rgba(225, 54, 75, 0.30);
      background: rgba(225, 54, 75, 0.08);
    }

    .turn-search-section {
      display: grid;
      gap: 8px;
    }

    .turn-detail-panel { order: 1; }
    .turn-search-disclosure { order: 3; }

    .turn-command-panel.enemy-turn .turn-search-disclosure { order: 1; }
    .turn-command-panel.enemy-turn .turn-detail-panel { order: 2; }

    .turn-search-disclosure {
      border-top: 1px solid var(--line);
      padding-top: 9px;
    }

    .turn-search-disclosure > summary {
      cursor: pointer;
      color: var(--text);
      font-size: 14px;
      font-weight: 600;
      list-style: none;
      user-select: none;
    }

    .turn-search-disclosure > summary::-webkit-details-marker { display: none; }
    .turn-search-disclosure > summary::before {
      content: "+";
      margin-right: 6px;
      color: var(--gold);
      font-weight: 800;
    }

    .turn-search-disclosure[open] > summary::before { content: "−"; }
    .turn-search-disclosure .turn-search-section { margin-top: 9px; }

    .turn-section-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
    }

    .turn-section-head b {
      color: var(--text);
      font-size: 15px;
    }

    .turn-command-search {
      grid-template-columns: minmax(0, 1fr) 88px;
    }

    .turn-search-status {
      min-height: 16px;
    }

    .turn-command-results {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      max-height: 268px;
      padding-right: 3px;
    }

    .turn-command-results .champ-button {
      grid-template-columns: 32px minmax(0, 1fr);
      padding: 6px;
    }

    .turn-detail-panel,
    .turn-utility-panel {
      border-top: 1px solid var(--line);
      padding-top: 9px;
    }

    .turn-utility-panel { order: 4; }

    .turn-detail-panel > summary,
    .turn-utility-panel > summary {
      cursor: pointer;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .turn-detail-panel[open] > summary,
    .turn-utility-panel[open] > summary {
      color: var(--gold);
      margin-bottom: 8px;
    }

    .turn-detail-body {
      padding-top: 4px;
    }

    .turn-detail-panel-open {
      display: grid;
      gap: 8px;
      border-top: 0;
      padding-top: 0;
    }

    .turn-detail-panel-open .turn-section-head {
      align-items: flex-start;
      flex-direction: column;
      gap: 3px;
    }

    .turn-detail-panel-open .turn-section-head b {
      font-size: 17px;
    }

    .turn-utility-actions {
      display: grid;
      gap: 6px;
      padding-top: 8px;
    }

    .dock-head {
      align-items: start;
    }

    .dock-tabs {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      padding: 10px 10px 0;
      background: var(--panel);
    }

    .dock-tabs button {
      border-radius: var(--radius) var(--radius) 0 0;
      padding: 8px 6px;
      font-size: 12px;
      color: var(--muted);
      background: var(--panel-raised);
    }

    .dock-tabs button.active {
      color: var(--text);
      background: var(--blue-soft);
      border-color: var(--blue);
      font-weight: 600;
      box-shadow: 0 5px 12px rgba(37, 99, 235, 0.10);
    }

    .dock-tabs span {
      display: inline-grid;
      place-items: center;
      min-width: 18px;
      height: 18px;
      margin-left: 3px;
      border-radius: 999px;
      background: var(--panel-raised);
      color: var(--text);
      font-size: 11px;
    }

    .dock-body {
      min-height: 0;
      overflow: auto;
      padding: 10px;
    }

    .dock-pane {
      display: none;
    }

    .dock-pane.active {
      display: block;
    }

    .advanced-settings-panel {
      grid-column: 1 / -1;
    }

    .advanced-settings-panel > summary {
      list-style: none;
      cursor: pointer;
    }

    .advanced-settings-panel > summary::-webkit-details-marker { display: none; }

    .advanced-settings-panel > summary .panel-title::before {
      content: "+";
      margin-right: 7px;
      color: var(--gold);
      font-weight: 800;
    }

    .advanced-settings-panel[open] > summary .panel-title::before { content: "−"; }

    .toast {
      position: fixed;
      bottom: 18px;
      left: 50%;
      transform: translate(-50%, 8px);
      background: var(--panel-raised);
      color: var(--text);
      border: 1px solid var(--line);
      padding: 9px 13px;
      border-radius: 999px;
      box-shadow: none;
      opacity: 0;
      pointer-events: none;
      transition: opacity 170ms ease, transform 170ms ease;
      z-index: 20;
      font-size: 13px;
    }

    .toast.show {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .empty-note {
      color: var(--muted);
      border: 1px dashed var(--line);
      border-radius: var(--radius);
      padding: 12px;
      background: var(--panel);
      font-size: 13px;
    }

    .guide-note {
      color: #f8fafc;
      border: 1px solid rgba(201, 162, 39, 0.38);
      border-radius: var(--radius);
      padding: 12px 13px;
      background:
        linear-gradient(135deg, rgba(201, 162, 39, 0.18), rgba(47, 107, 255, 0.12)),
        rgba(15, 23, 42, 0.82);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
      font-size: 13px;
      line-height: 1.55;
    }

    .guide-note b,
    .guide-note strong {
      color: #f8d46a;
    }

    .score-meaning-note {
      margin: 8px 0 10px;
      padding-left: 9px;
      border-left: 2px solid rgba(201, 162, 39, 0.6);
      color: #b9c5d8;
      font-size: 12px;
      line-height: 1.45;
    }

    @media (max-width: 1180px) {
      .draft-layout {
        grid-template-columns: 1fr;
      }

      .draft-board-panel {
        order: 1;
      }

      .recommend-dock {
        order: 2;
        position: static;
        max-height: none;
      }

      .recommend-dock > .panel {
        max-height: none;
      }

      .reco-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .reco-card .score-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .turn-command-body {
        overflow: visible;
      }

      .dock-body {
        max-height: 520px;
      }
    }

    @keyframes recoCardIn {
      from {
        opacity: 0;
        transform: translateY(5px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes currentTurnPulse {
      0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.25);
      }
      50% {
        box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.10);
      }
    }

    @keyframes activeSlotGlow {
      0%, 100% {
        box-shadow: inset 0 0 0 1px var(--gold), 0 0 0 2px rgba(201, 162, 39, 0.18);
      }
      50% {
        box-shadow: inset 0 0 0 1px var(--gold), 0 0 0 4px rgba(201, 162, 39, 0.08);
      }
    }

    @media (max-width: 980px) {
      .series-bar {
        grid-template-columns: 1fr auto;
      }

      .series-score {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
      }

      header {
        position: static;
        padding: 14px 16px 10px;
      }

      .topbar {
        align-items: flex-start;
        flex-direction: column;
      }

      .actions {
        width: 100%;
        justify-content: flex-start;
      }

      .tabs {
        padding: 8px 16px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }

      .tab {
        flex: 0 0 auto;
        padding: 9px 10px;
        white-space: nowrap;
      }

      main {
        padding: 14px 14px 22px;
      }

      .landing {
        padding: 18px;
      }

      .landing-shell,
      .setup-grid,
      .setup-team-pair,
      .pro-team-select-grid,
      .pro-team-profile-grid {
        grid-template-columns: 1fr;
      }

      .setup-team-pair {
        grid-column: auto;
      }

      .setup-options-grid,
      .field-grid {
        grid-template-columns: 1fr;
      }

      .player-row {
        grid-template-columns: 1fr;
        align-items: stretch;
      }

      .board-head-controls {
        justify-content: flex-start;
      }

      .panel-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .board {
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
      }

      .mobile-draft-flow {
        display: grid;
        gap: 12px;
      }

      .board > .phase-strip,
      .board > .team-board {
        display: none;
      }

      .phase-strip {
        grid-template-columns: repeat(20, minmax(38px, 1fr));
        min-width: 820px;
        overflow: visible;
      }

      .board .phase-strip {
        width: max-content;
      }

      .team-board {
        grid-template-columns: 1fr;
      }

      .champ-search {
        grid-template-columns: 1fr;
      }

      .champ-grid {
        max-height: 360px;
        grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
      }

      .dock-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .dock-body {
        max-height: 62vh;
      }

      .score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .landing-reasons {
        grid-template-columns: 1fr;
      }

      .showcase-card {
        grid-template-columns: 1fr;
        width: 100%;
        justify-self: stretch;
        transform: translateY(18px);
      }

      .showcase-card:nth-child(even) {
        grid-template-columns: 1fr;
        justify-self: stretch;
        transform: translateY(18px);
      }

      .showcase-card:nth-child(even) .showcase-copy,
      .showcase-card:nth-child(even) .showcase-shot {
        grid-column: auto;
        grid-row: auto;
      }

      .showcase-card.is-visible {
        transform: translateY(0);
      }

      .showcase-shot.board-shot,
      .showcase-shot.reason-shot {
        aspect-ratio: 4 / 3;
      }

      .showcase-shot.pool-shot {
        aspect-ratio: 16 / 9;
      }

      .showcase-shot.edit-shot {
        aspect-ratio: 5 / 4;
      }

      .showcase-shot.patch-shot {
        aspect-ratio: 7 / 2;
        min-height: 112px;
      }

      .landing-final-cta {
        align-items: stretch;
      }
    }

    @media (max-width: 640px) {
      .reco-list {
        grid-template-columns: 1fr;
      }

      .series-bar {
        gap: 9px;
        padding: 10px;
      }

      .series-score {
        grid-template-columns: minmax(56px, 1fr) 30px 8px 30px minmax(56px, 1fr);
        gap: 4px;
      }

      .series-score span { font-size: 12px; }
      .series-score strong { width: 30px; height: 30px; font-size: 16px; }

      .series-result-copy,
      .series-result-actions,
      .series-next-controls {
        align-items: stretch;
        flex-direction: column;
      }

      .series-result-actions button,
      .series-next-settings,
      .series-next-controls .switch,
      .series-next-controls button {
        width: 100%;
      }

      .series-next-settings {
        grid-template-columns: 1fr;
        max-width: none;
      }

      .draft-layout {
        padding-bottom: 68px;
      }

      .recommend-dock {
        position: fixed;
        z-index: 80;
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        max-height: none;
      }

      .recommend-dock > .turn-command-panel {
        max-height: min(62dvh, 560px);
        overflow: hidden;
        box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.34);
      }

      .turn-command-collapse {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 54px;
        min-height: 34px;
        padding: 6px 10px;
      }

      .turn-command-panel > .panel-head {
        align-items: center;
        flex-direction: row;
      }

      .turn-command-panel.mobile-collapsed .turn-command-body {
        display: none;
      }

      .turn-command-body {
        padding: 10px;
        overflow: auto;
      }

      .turn-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
      }

      .turn-section-head .small {
        display: none;
      }

      .turn-command-search,
      .turn-command-results {
        grid-template-columns: 1fr;
      }

      .turn-command-results {
        max-height: 320px;
      }

      .landing {
        padding: 16px 14px 28px;
      }

      .landing-shell {
        gap: 44px;
      }

      .landing h1 {
        font-size: 34px;
        line-height: 1.15;
      }

      .landing-lead {
        font-size: 14px;
        line-height: 1.72;
      }

      .landing-actions,
      .landing-primary,
      .landing-secondary {
        width: 100%;
      }

      .landing-primary,
      .landing-secondary {
        min-height: 46px;
      }

      .landing-basis {
        padding: 14px;
      }

      .landing-basis-row {
        width: 100%;
        justify-content: space-between;
      }

      .showcase-card {
        padding: 14px;
        gap: 14px;
      }

      .showcase-card h3 {
        font-size: 18px;
      }

      .showcase-card p {
        font-size: 12px;
      }

      .showcase-shot {
        padding: 8px;
      }

      .showcase-shot.patch-shot {
        min-height: 92px;
      }

      header {
        padding-inline: 12px;
      }

      h1 {
        font-size: 20px;
      }

      .subtitle {
        font-size: 12px;
        line-height: 1.45;
      }

      .actions button,
      .actions .chip,
      .side-pill,
      .role-pill,
      .chip {
        font-size: 11px;
      }

      header .actions {
        display: none;
      }

      .board-head-controls .chip,
      .board-head-controls .side-pill:not(.timer-toggle),
      .board-head-controls #undoStep {
        display: none;
      }

      .timer-settings {
        display: none !important;
      }

      main {
        padding: 10px 10px 18px;
      }

      .panel-body {
        padding: 10px;
      }

      .phase-strip-wrap {
        overflow-x: auto;
      }

      .board {
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
      }

      .team-board {
        min-width: 0;
      }

      .ban-row {
        grid-template-columns: repeat(5, minmax(44px, 1fr));
        gap: 5px;
      }

      .slot {
        min-height: 48px;
        padding: 7px;
      }

      .slot.empty {
        font-size: 11px;
      }

      .champ-icon,
      .ban-icon-wrap,
      .ban-icon-large,
      .champ-icon.ban-icon-large {
        width: 34px;
        height: 34px;
      }

      .slot-sub {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }

      .mobile-flow-now {
        padding: 10px;
      }

      .mobile-flow-now-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .mobile-phase-card {
        padding: 9px;
      }

      .mobile-phase-card:not(.current) {
        gap: 0;
        padding-block: 8px;
      }

      .mobile-phase-card:not(.current) .mobile-phase-steps {
        display: none;
      }

      .mobile-phase-card:not(.current) .mobile-phase-head b {
        color: var(--muted);
      }

      .mobile-step-row {
        grid-template-columns: 38px minmax(0, 1fr);
      }

      .mobile-step-state {
        grid-column: 2;
        justify-self: start;
      }

      .current-turn {
        align-items: flex-start;
        flex-direction: column;
      }

      .reco-top {
        grid-template-columns: 34px minmax(0, 1fr) auto;
      }

      .reco-card {
        padding: 10px;
        gap: 8px;
      }

      .reco-card button.primary,
      .reco-card button:not(.secondary) {
        min-height: 42px;
      }

      .reco-card .bar,
      .reco-card .score-grid,
      .reco-card .reason {
        display: none;
      }

      .reco-card .slot-sub {
        -webkit-line-clamp: 1;
      }

      .draft-action-panel .panel-head .small,
      .current-turn-info #currentHint {
        display: none;
      }

      .dock-tabs button {
        font-size: 11px;
        min-height: 38px;
      }

      .dock-body {
        max-height: 68vh;
      }

      .draft-action-panel .row,
      .current-turn-info .row {
        display: grid;
        grid-template-columns: 1fr;
      }

      textarea {
        min-height: 120px;
      }
    }

    @media (min-width: 1181px) {
      .app {
        font-size: 16px;
      }

      .app button,
      .app input,
      .app select {
        font-size: 15px;
        line-height: 1.3;
      }

      .app button {
        min-height: 38px;
      }

      .app .data-patch-note {
        font-size: 13px;
      }

      .app .save-status,
      .app .timer-settings label,
      .app .timer-settings input,
      .app .timer-top-bar-label {
        font-size: 13px;
      }

      .app .data-menu > summary,
      .app label,
      .app textarea,
      .app .side-pill,
      .app .role-pill,
      .app .chip {
        font-size: 14px;
      }

      .app .phase-strip-legend,
      .app .draft-step-side,
      .app .draft-step-action {
        font-size: 13px;
      }

      .app textarea {
        line-height: 1.55;
      }

      .app .tab {
        min-height: 46px;
        font-size: 16px;
      }

      .app .panel-title {
        font-size: 18px;
      }

      .app .small {
        font-size: 14px;
      }

      .app .readiness-step {
        min-height: 58px;
        padding: 10px 12px;
      }

      .app .readiness-step strong {
        font-size: 14px;
      }

      .app .readiness-step span {
        font-size: 13px;
        line-height: 1.35;
      }

      .app .team-card h2 {
        font-size: 18px;
        padding: 14px 15px;
      }

      .app .slot-group-title {
        font-size: 14px;
      }

      .app .slot {
        min-height: 60px;
        padding: 9px;
      }

      .app .slot.empty {
        font-size: 14px;
      }

      .app .champ-name {
        font-size: 15px;
        font-weight: 600;
      }

      .app .slot-sub {
        font-size: 14px;
        line-height: 1.35;
      }

      .app .pick-reassign {
        min-height: 30px;
        font-size: 13px;
      }

      .app .tier {
        font-size: 13px;
      }

      .app .role-icon-extra {
        font-size: 13px;
      }

      .app .reco-card {
        gap: 3px;
        padding: 4px;
      }

      .app .reco-top {
        grid-template-columns: 32px minmax(0, 1fr) 40px 44px;
        gap: 5px;
      }

      .app .reco-top .champ-icon {
        width: 32px;
        height: 32px;
      }

      .app .score {
        min-width: 40px;
        min-height: 32px;
        padding: 2px 4px;
      }

      .app .reason {
        max-height: 21px;
        font-size: 11px;
        line-height: 1.2;
      }

      .app .reason-chip {
        padding: 2px 5px;
      }

      .app .mini-score {
        min-height: 0;
        padding: 3px 4px;
        font-size: 10px;
      }

      .app .mini-score b {
        font-size: 11px;
      }

      .app .reco-card .champ-name {
        font-size: 13px;
      }

      .app .reco-card .slot-sub {
        overflow: hidden;
        font-size: 11.5px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .app .reco-apply {
        min-height: 30px;
        padding: 3px 4px;
        font-size: 11px;
      }

      .app .turn-command-body {
        gap: 6px;
        padding: 7px;
      }

      .app .turn-command-guide,
      .app .turn-detail-panel-open > .turn-section-head,
      .app .score-meaning-note {
        display: none;
      }

      .app .turn-detail-panel-open {
        gap: 4px;
      }

      .app .turn-detail-body {
        padding-top: 0;
      }

      .app .turn-detail-panel .dock-tabs button {
        min-height: 32px;
        font-size: 12px;
      }

      .app .turn-command-kicker {
        font-size: 13px;
      }

      .app .turn-command-title {
        font-size: 19px;
      }

      .app .turn-utility-panel > summary {
        font-size: 14px;
      }

      .app .dock-tabs button {
        min-height: 42px;
        font-size: 14px;
      }

      .app .dock-tabs span {
        font-size: 13px;
      }

      .app .toast,
      .app .empty-note,
      .app .guide-note {
        font-size: 14px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
      }
    }
