
  :root {
    --panel: rgba(12, 20, 30, 0.82);
    --line: rgba(230, 200, 120, 0.35);
    --sand: #e8c97a;
    --player: #3d8bff;
    --enemy: #e85d4c;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    width: 100%; height: 100%; overflow: hidden;
    background: #0d141c;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #f3efe4;
    user-select: none;
  }
  #wrap {
    /* 主画面底部上移约 1/6，留给下方操作条 */
    position: fixed; top: 0; left: 0; right: 0; bottom: 16.67%;
    display: flex; align-items: center; justify-content: center;
    background: #0a1018;
  }
  #gameCanvas {
    display: block;
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    background: #000;
    box-shadow: 0 12px 50px rgba(0,0,0,.55);
    cursor: crosshair;
  }
  #hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
  .bar {
    position: absolute; left: 50%; transform: translateX(-50%);
    top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
    max-width: calc(100% - 280px);
  }
  .chip {
    padding: 8px 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 13px;
    letter-spacing: 1px;
    backdrop-filter: blur(6px);
  }
  .chip b { color: var(--sand); margin-left: 6px; }
  .chip.turn-active { border-color: color-mix(in srgb, var(--turn-color, var(--sand)) 65%, transparent); }
  .chip.turn-active b { color: var(--turn-color, var(--sand)); }
  .chip.wind {
    min-width: 148px; padding: 10px 16px;
    border-color: rgba(120, 200, 255, 0.55);
    background: rgba(20, 40, 60, 0.9); font-size: 14px;
  }
  .chip.wind b { margin-left: 8px; font-size: 20px; color: #7ecbff; }
  .chip.wind .wind-arrow {
    display: inline-block; margin: 0 4px; font-size: 22px; font-weight: 900;
    color: #ffe08a; text-shadow: 0 0 10px rgba(255, 220, 120, 0.55);
  }
  .chip.wind.wind-left .wind-arrow { color: #9ad4ff; }
  .chip.wind.wind-right .wind-arrow { color: #ffe08a; }
  .spectator-controls {
    display: flex; gap: 8px; align-items: center; pointer-events: auto;
  }
  .spectator-controls[hidden] { display: none; }
  .spectator-next, .spectator-auto {
    pointer-events: auto; cursor: pointer; padding: 9px 14px;
    border: 1px solid rgba(232,201,122,.6); border-radius: 6px;
    background: rgba(232,201,122,.14); color: #ffe9a6;
    font: inherit; font-size: 12px; font-weight: 800; letter-spacing: 1px;
  }
  .spectator-next:hover:not(:disabled), .spectator-auto:hover { background: rgba(232,201,122,.24); }
  .spectator-next:disabled { opacity: .42; cursor: not-allowed; }
  .spectator-auto.active {
    border-color: rgba(108, 232, 155, .75); background: rgba(76, 196, 126, .2); color: #b9ffd2;
    box-shadow: inset 0 0 0 1px rgba(108, 232, 155, .16);
  }
  .turn-info-panel {
    position: absolute; left: 50%; top: 58px; transform: translateX(-50%);
    width: min(660px, calc(100vw - 570px)); min-width: 420px; padding: 7px 12px;
    background: rgba(8, 14, 22, .88); border: 1px solid rgba(230, 200, 120, .32);
    border-radius: 7px; text-align: center; backdrop-filter: blur(6px);
    font-size: 11px; line-height: 1.55; letter-spacing: .5px;
  }
  .turn-info-panel[hidden] { display: none; }
  .turn-order-text { color: #d8e2ee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .action-value-text { color: #ffe08a; font-variant-numeric: tabular-nums; }
  .battle-log {
    position: absolute; top: 14px; left: 16px; width: 252px; max-height: 230px;
    overflow-y: auto; padding: 8px 10px; pointer-events: auto;
    background: rgba(8, 14, 22, 0.92); border: 1px solid rgba(232, 201, 122, 0.5);
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
    color: #ffe08a; font-size: 12px; line-height: 1.45; text-align: left;
  }
  .battle-log[hidden] { display: none; }
  .battle-log-title {
    position: sticky; top: -8px; z-index: 1; margin: -8px -10px 3px;
    padding: 7px 10px 6px; color: #cbd6e3; background: rgba(8, 14, 22, 0.98);
    border-bottom: 1px solid rgba(232, 201, 122, 0.28);
    font-size: 11px; font-weight: 700; letter-spacing: 2px; text-align: center;
  }
  .battle-log-empty { padding: 6px 0; color: #718092; text-align: center; }
  .battle-record-line { padding: 4px 0; overflow-wrap: anywhere; }
  .battle-record-line + .battle-record-line { border-top: 1px solid rgba(255,255,255,.08); }
  .battle-record-time { color: #ffe08a; }
  .battle-record-body { color: #d7e0ea; }
  .battle-record-body.team-a { color: #82c7ff; }
  .battle-record-body.team-b { color: #ff9b8f; }
  #minimapWrap {
    position: absolute; top: 14px; right: 16px; width: 252px; padding: 6px;
    background: rgba(8, 14, 22, 0.88); border: 1px solid rgba(230, 200, 120, 0.45);
    border-radius: 8px; pointer-events: auto; cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
  }
  #minimapWrap .mini-label {
    font-size: 10px; letter-spacing: 2px; color: #b9c3cf;
    margin-bottom: 4px; text-align: center;
  }
  #minimap {
    display: block; width: 240px; height: 78px;
    border-radius: 4px; background: #1a3040; cursor: grab;
  }
  #minimapWrap.dragging #minimap { cursor: grabbing; }
  #replayBar {
    position: absolute; top: 110px; right: 16px; width: 252px;
    padding: 8px; background: rgba(8, 14, 22, 0.88);
    border: 1px solid rgba(230, 200, 120, 0.45); border-radius: 8px;
    pointer-events: auto; font-size: 11px; color: #b9c3cf;
  }
  #replayBar .row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; align-items: center; }
  #replayBar button {
    pointer-events: auto; cursor: pointer; border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06); color: #e8d9a8; border-radius: 5px;
    padding: 5px 8px; font: inherit; font-size: 11px;
  }
  #replayBar button:hover { border-color: rgba(232,201,122,.55); background: rgba(232,201,122,.12); }
  #replayBar button.active { border-color: #e8c97a; background: rgba(232,201,122,.2); color: #fff8e7; }
  #replayBar button:disabled { opacity: .4; cursor: not-allowed; }
  #replayBar .title { letter-spacing: 2px; text-align: center; margin-bottom: 2px; }
  #replayBar.hidden { display: none; }
  #replayControls.hidden { display: none; }
  #replayList {
    margin-top: 6px; max-height: 132px; overflow-y: auto;
    border: 1px solid rgba(255,255,255,.08); border-radius: 5px;
  }
  #replayList .replay-item {
    display: block; width: 100%; text-align: left; padding: 5px 8px;
    border: none; border-bottom: 1px solid rgba(255,255,255,.06);
    border-radius: 0; background: transparent; color: #c5cfdb; font-size: 10px;
  }
  #replayList .replay-item:last-child { border-bottom: none; }
  #replayList .replay-item.selected { background: rgba(232,201,122,.18); color: #fff8e7; }
  #replayList .empty { padding: 8px; text-align: center; color: #6a7585; font-size: 10px; }
  .item-btn {
    flex: 1; padding: 6px 4px; border-radius: 6px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04);
    color: #c5cfdb; font: inherit; font-size: 10px; line-height: 1.3; pointer-events: auto;
  }
  .item-btn:hover:not(:disabled) { border-color: rgba(232,201,122,.5); background: rgba(232,201,122,.1); }
  .item-btn.active { border-color: #e8c97a; background: rgba(232,201,122,.18); color: #fff8e7; }
  .item-btn:disabled { opacity: .35; cursor: not-allowed; }
  .item-btn b { display: block; color: var(--sand); font-size: 11px; }
  .cheat-row {
    margin: 0 0 14px; text-align: left; font-size: 13px; color: #c5cfdb;
    display: flex; align-items: center; gap: 8px; justify-content: center;
  }
  .cheat-row input { width: 16px; height: 16px; cursor: pointer; }
  #unitRoster {
    position: absolute; left: 16px; right: 16px; bottom: calc(16.67% + 40px);
    display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  }
  .roster-team {
    width: min(280px, 34vw); padding: 9px 11px;
    background: var(--panel); border: 1px solid color-mix(in srgb, var(--team-color) 55%, transparent);
    border-radius: 8px; backdrop-filter: blur(6px);
    box-shadow: inset 3px 0 0 var(--team-color), 0 6px 18px rgba(0,0,0,.22);
  }
  .roster-team:nth-child(even) { box-shadow: inset -3px 0 0 var(--team-color), 0 6px 18px rgba(0,0,0,.22); }
  .roster-team-title {
    display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
    color: var(--team-color); font-size: 10px; font-weight: 700; letter-spacing: 2px;
  }
  .roster-team:nth-child(even) .roster-team-title { justify-content: flex-end; }
  .roster-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--team-color); box-shadow: 0 0 8px var(--team-color); }
  .roster-unit { padding: 5px 6px; border-radius: 5px; border: 1px solid transparent; }
  .roster-unit + .roster-unit { margin-top: 4px; }
  .roster-unit.current {
    border-color: color-mix(in srgb, var(--team-color) 70%, transparent);
    background: color-mix(in srgb, var(--team-color) 13%, transparent);
  }
  .roster-unit.dead { opacity: .48; filter: grayscale(.7); }
  .roster-unit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
  .roster-unit-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #d7deea; letter-spacing: 1px; }
  .roster-status { flex: none; font-size: 9px; color: var(--team-color); letter-spacing: 1px; }
  .roster-hp-row { display: flex; align-items: center; gap: 6px; }
  .hp-track {
    position: relative; flex: 1 1 auto; min-width: 0; height: 12px; background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12); border-radius: 4px; overflow: hidden;
  }
  .hp-fill { height: 100%; width: 100%; transition: width .2s; background: var(--team-color); }
  .hp-track-name {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    padding: 0 4px; overflow: hidden; color: #fff; font-size: 8px; font-weight: 700;
    line-height: 12px; text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,.9); pointer-events: none;
  }
  .roster-ai-tag {
    flex: none; min-width: 22px; padding: 1px 4px; border: 1px solid rgba(255,224,138,.75);
    border-radius: 4px; background: rgba(255,224,138,.14); color: #ffe08a;
    font-size: 9px; font-weight: 800; line-height: 12px; letter-spacing: 1px; text-align: center;
  }
  .roster-unit-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
  .hp-num { font-size: 10px; color: #aeb9c8; font-variant-numeric: tabular-nums; }
  .roster-action-value { font-size: 9px; color: #e8c97a; font-variant-numeric: tabular-nums; white-space: nowrap; }
  #controls {
    position: absolute; left: 50%; bottom: 1.2%;
    transform: translateX(-50%);
    /* 力度条比旧版约长30%，其余控制块尺寸保持不变。 */
    width: min(1040px, 96vw); padding: 8px 12px 6px;
    background: rgba(10, 16, 24, 0.92); border: 1px solid var(--line); border-radius: 10px;
    pointer-events: auto;
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
  }
  #controls[data-team-id="team-a"] {
    background: linear-gradient(135deg, rgba(13, 28, 48, 0.96), rgba(10, 20, 34, 0.94));
    border-color: rgba(92, 171, 255, 0.52);
    box-shadow: inset 0 0 34px rgba(61, 139, 255, 0.08), 0 8px 28px rgba(0,0,0,.35);
  }
  #controls[data-team-id="team-b"] {
    background: linear-gradient(135deg, rgba(48, 22, 25, 0.96), rgba(31, 16, 22, 0.94));
    border-color: rgba(255, 126, 112, 0.52);
    box-shadow: inset 0 0 34px rgba(232, 93, 76, 0.09), 0 8px 28px rgba(0,0,0,.35);
  }
  .ctrl-spread {
    display: flex; align-items: stretch; justify-content: center;
    gap: 12px; flex-wrap: nowrap;
  }
  .ctrl-block { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
  .ctrl-block.weps { flex: 0 1 220px; }
  .ctrl-block.aim { flex: 0 0 156px; align-items: center; }
  .ctrl-block.power { flex: 1 1 280px; min-width: 200px; justify-content: center; }
  .ctrl-block.move { flex: 0 0 88px; align-items: stretch; }
  #aimGauge { display: block; width: 148px; height: 84px; }
  #aimGauge.moon-solar-jam {
    outline: 1px solid rgba(255, 176, 80, 0.55);
    box-shadow: 0 0 14px rgba(255, 140, 70, 0.28);
    animation: moon-solar-jam-flicker 0.12s steps(2) infinite;
  }
  #angleText.moon-solar-jam {
    color: #ffe08a;
    letter-spacing: 0.4px;
    animation: moon-solar-jam-text 0.16s steps(2) infinite;
  }
  @keyframes moon-solar-jam-flicker {
    0% { filter: contrast(1.15) saturate(1.2); }
    100% { filter: contrast(0.92) hue-rotate(-8deg); }
  }
  @keyframes moon-solar-jam-text {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0.72; transform: translateX(1px); }
  }
  .aim-caption {
    margin-top: 2px; font-size: 10px; color: #b9c3cf; text-align: center;
    letter-spacing: 0.2px; line-height: 1.25; max-width: 148px;
  }
  .power-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 6px; font-size: 13px; color: #d7deea; letter-spacing: 1px;
  }
  .power-head b {
    color: #ffe08a; font-size: 22px; font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(255, 220, 120, 0.35);
  }
  .meter {
    height: 10px; background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12); border-radius: 4px; overflow: hidden;
  }
  .meter.power-meter {
    position: relative; height: 22px; overflow: visible; border: 0; border-radius: 0;
    background: transparent;
    box-shadow: 0 0 16px rgba(232,201,122,.1);
  }
  .power-segments {
    display: grid; grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 2px; width: 100%; height: 100%;
  }
  .power-segment {
    height: 100%; overflow: hidden; border: 1px solid rgba(232,201,122,.48);
    background: rgba(0,0,0,.38); border-radius: 0;
  }
  .power-segment:first-child { border-radius: 7px 0 0 7px; }
  .power-segment:last-child { border-radius: 0 7px 7px 0; }
  .power-segment-fill {
    width: 0; height: 100%; background: #72ca6c;
    box-shadow: inset 0 0 8px rgba(255,255,255,.12);
  }
  .power-segment:nth-child(n+4) .power-segment-fill { background: #e2cb59; }
  .power-segment:nth-child(n+7) .power-segment-fill { background: #df644d; }
  .power-segments.charging .power-segment-fill {
    filter: brightness(1.2); box-shadow: inset 0 0 10px rgba(255,255,255,.34);
  }
  .power-marker {
    position: absolute; z-index: 3; left: 0; top: -6px; width: 20px; height: 34px;
    transform: translateX(-50%); cursor: ew-resize; touch-action: none;
  }
  .power-marker::before {
    content: ""; position: absolute; left: 9px; top: 5px; width: 2px; height: 28px;
    background: #fff0b0; box-shadow: 0 0 6px rgba(255,224,130,.85);
  }
  .power-marker::after {
    content: ""; position: absolute; left: 4px; top: 0; width: 0; height: 0;
    border-left: 6px solid transparent; border-right: 6px solid transparent;
    border-top: 7px solid #fff0b0;
  }
  .meter.move-mini { height: 6px; margin-top: 4px; border-radius: 3px; }
  .meter .fill { height: 100%; width: 0%; }
  .meter .fill.move { background: linear-gradient(90deg, #6bcf9a, #c6f0a8); }
  .move-mini-label {
    font-size: 11px; color: #9aa8b8; text-align: center; letter-spacing: 1px;
  }
  .move-mini-label b { color: #9ee0b8; margin-left: 4px; font-variant-numeric: tabular-nums; }
  .weapon-row { display: flex; gap: 6px; margin-bottom: 6px; }
  .weapon-slot {
    flex: 1; padding: 6px 8px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
    font-size: 10px; color: #9aa8b8; line-height: 1.3;
  }
  .weapon-slot.active {
    border-color: rgba(232, 201, 122, 0.7);
    background: rgba(232, 201, 122, 0.12); color: #f3efe4;
  }
  .weapon-slot.locked {
    opacity: .42;
    cursor: not-allowed;
  }
  .weapon-slot b { display: block; color: var(--sand); margin-bottom: 1px; font-size: 11px; }
  .item-row { display: flex; gap: 4px; margin-bottom: 0; }
  .hint {
    text-align: center; font-size: 10px; color: #7f8b9a; line-height: 1.45;
    margin-top: 5px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 4px;
  }
  @media (max-width: 820px) {
    .ctrl-spread { flex-wrap: wrap; }
    .ctrl-block.power { flex: 1 1 100%; order: -1; }
    .ctrl-block.move { flex: 0 0 70px; }
  }
  .hint kbd {
    display: inline-block; padding: 1px 5px; margin: 0 1px;
    border: 1px solid rgba(255,255,255,.18); border-radius: 3px;
    background: rgba(255,255,255,.06); color: #e8d9a8; font-family: inherit; font-size: 11px;
  }
  #overlay {
    position: fixed; inset: 0; z-index: 20;
    display: flex; align-items: center; justify-content: center;
    background:
      radial-gradient(circle at 30% 20%, rgba(126,200,232,.22), transparent 40%),
      radial-gradient(circle at 70% 80%, rgba(232,201,122,.15), transparent 42%),
      rgba(8, 12, 18, 0.88);
  }
  #overlay.hidden { display: none; }
  .card {
    width: min(940px, 96vw); max-height: 94vh; overflow-y: auto; padding: 24px 28px 22px;
    border: 1px solid var(--line); border-radius: 12px;
    background: linear-gradient(160deg, rgba(22,32,44,.95), rgba(12,18,26,.96));
    box-shadow: 0 24px 80px rgba(0,0,0,.45); text-align: center;
  }
  .card .eyebrow { color: var(--sand); font-size: 12px; letter-spacing: 5px; margin-bottom: 10px; }
  .card h1 {
    font-size: clamp(30px, 5vw, 44px); letter-spacing: 3px; color: #fff8e7;
    text-shadow: 0 2px 0 #3a2c12, 0 8px 24px rgba(0,0,0,.35);
  }
  .setup-intro-grid {
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr);
    gap: 22px; align-items: stretch; margin-bottom: 14px; text-align: left;
  }
  .setup-copy { min-width: 0; padding: 4px 8px 2px; }
  .setup-copy .eyebrow { text-align: left; }
  .setup-copy h1 { font-size: clamp(30px, 4vw, 40px); }
  .setup-copy > p { margin: 8px 0 14px; color: #a8b4c4; font-size: 13px; line-height: 1.55; }
  .setup-copy .cheat-row { justify-content: flex-start; margin-bottom: 9px; }
  .setup-map-panel {
    min-width: 0; padding: 11px 13px; border: 1px solid rgba(232,201,122,.2);
    border-radius: 9px; background: rgba(255,255,255,.025);
  }
  .setup-map-panel .map-row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  .setup-map-panel .map-row > label { color: var(--sand); font-size: 13px; font-weight: 800; letter-spacing: 1px; }
  .setup-map-panel select#mapSelect { width: 100%; min-width: 0; }
  .match-setup { margin: 0 0 16px; text-align: left; }
  .mode-picker {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    width: min(520px, 100%); margin: 0 auto 14px;
  }
  .turn-rule-picker {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
    width: min(620px, 100%); margin: -6px auto 12px;
  }
  .ai-strategy-row {
    display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
    width: min(620px, 100%); margin: -5px auto 11px; color: #aebaca;
    font-size: 12px; letter-spacing: .5px;
  }
  .ai-option-pair { display: flex; align-items: center; gap: 7px; }
  .ai-strategy-row label { color: #e8c97a; font-weight: 700; white-space: nowrap; }
  .ai-strategy-row select {
    min-width: 170px; padding: 6px 9px; color: #e9eef5;
    border: 1px solid rgba(255,255,255,.16); border-radius: 6px;
    background: #18222e; font: inherit; font-size: 12px;
  }
  .team-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .team-setup {
    min-width: 0; padding: 12px; border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px; background: rgba(255,255,255,.035);
  }
  .team-setup.team-a { border-top-color: #3d8bff; }
  .team-setup.team-b { border-top-color: #e85d4c; }
  .team-setup h2 {
    display: flex; align-items: center; gap: 7px; margin: 0 0 9px;
    color: #fff8e7; font-size: 15px; letter-spacing: 1px;
  }
  .team-setup h2 span { width: 9px; height: 9px; border-radius: 50%; background: #3d8bff; }
  .team-setup.team-b h2 span { background: #e85d4c; }
  .setup-slots { display: grid; gap: 7px; }
  .setup-slot {
    display: grid; grid-template-columns: 42px minmax(0, 1.25fr) minmax(0, .9fr);
    align-items: center; gap: 7px; padding: 7px;
    border: 1px solid rgba(255,255,255,.08); border-radius: 7px;
    background: rgba(0,0,0,.14);
  }
  .setup-slot.empty { opacity: .58; }
  .slot-label { color: var(--sand); font-size: 12px; font-weight: 800; text-align: center; }
  .setup-slot select {
    width: 100%; min-width: 0; padding: 7px 8px; color: #e9eef5;
    border: 1px solid rgba(255,255,255,.14); border-radius: 6px;
    background: #18222e; font: inherit; font-size: 12px;
  }
  .setup-slot select:disabled { opacity: .45; }
  .setup-status {
    min-height: 20px; margin-top: 10px; padding: 7px 10px; text-align: center;
    border-radius: 6px; background: rgba(126,200,232,.07); color: #9fb1c4; font-size: 12px;
  }
  .setup-status.ready { color: #9ee0b8; background: rgba(107,207,154,.08); }
  .setup-status.pending { color: #e8c97a; background: rgba(232,201,122,.08); }
  .setup-status.error { color: #ff9b92; background: rgba(232,93,76,.08); }
  .card button {
    min-width: 200px; padding: 12px 28px; border: 1px solid #e2c36a; border-radius: 8px;
    background: linear-gradient(180deg, #f0d27a, #c9a03e);
    color: #2a2110; font-weight: 800; font-size: 16px; letter-spacing: 2px; cursor: pointer;
  }
  .card button:hover { filter: brightness(1.06); transform: translateY(-1px); }
  .card button:disabled { filter: grayscale(.4); opacity: .55; cursor: not-allowed; transform: none; }
  .card .mode-option {
    min-width: 0; padding: 8px 10px; border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.05); color: #aebaca; font-size: 13px; letter-spacing: 1px;
  }
  .card .mode-option.active {
    border-color: #e8c97a; background: rgba(232,201,122,.14); color: #fff1bd;
    box-shadow: inset 0 0 0 1px rgba(232,201,122,.18);
  }
  .card .turn-rule-option {
    min-width: 0; padding: 7px 10px; border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.035); color: #9fabb9; font-size: 12px; letter-spacing: .5px;
  }
  .card .turn-rule-option.active {
    border-color: #7ec8e8; background: rgba(126,200,232,.13); color: #d9f3ff;
    box-shadow: inset 0 0 0 1px rgba(126,200,232,.14);
  }
  .card .sub { margin-top: 14px; font-size: 12px; color: #7f8b9a; }
  #toast {
    position: fixed; left: 50%; top: 64px; transform: translateX(-50%);
    z-index: 15; padding: 8px 16px; background: rgba(10,14,20,.8);
    border: 1px solid var(--line); border-radius: 6px; font-size: 13px;
    letter-spacing: 1px; opacity: 0; transition: opacity .25s; pointer-events: none;
  }
  #toast.show { opacity: 1; }
  @media (max-width: 720px) {
    .card { padding: 18px 14px; }
    .setup-intro-grid { grid-template-columns: 1fr; gap: 10px; }
    .team-setup-grid { grid-template-columns: 1fr; }
    .setup-slot { grid-template-columns: 38px minmax(0, 1.2fr) minmax(0, 1fr); }
  }
