@font-face { font-family:"Vampire King"; src:url("assets/fonts/VampireKingRegular.woff") format("woff"); font-style:normal; font-weight:400; font-display:swap; }
:root {
      color-scheme: light;
      --bg: #79191d;
      --surface: #ffffff;
      --text: #172033;
      --muted: #657087;
      --border: #dce2ec;
      --accent: #b42318;
      --accent-hover: #8f1d14;
      --soft: #fff0ed;
      --success: #087443;
      --danger: #b42318;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    * { box-sizing: border-box; }
    html { scrollbar-gutter: stable; }
    body { margin: 0; background-color: var(--bg); background-image:none; color: var(--text); line-height: 1.45; }
    .background-pattern-defs { position:absolute; width:0; height:0; overflow:hidden; }
    .background-pattern { position:fixed; z-index:0; inset:0; overflow:hidden; pointer-events:none; filter:blur(1.2px); }
    .background-pattern-grid { position:absolute; top:50%; left:50%; display:grid; gap:clamp(24px,3vw,42px) 58px; width:max-content; transform:translate(-50%,-50%) rotate(-20deg); }
    .background-pattern-row { display:flex; align-items:center; gap:58px; white-space:nowrap; }
    .background-pattern-row:nth-child(even) { transform:translateX(88px); }
    .background-pattern-row span,
    .background-pattern-row::before,
    .background-pattern-row::after { color:#000; -webkit-text-fill-color:#000; -webkit-text-stroke:0; filter:url("#gametrackr-outline"); text-shadow:none; font-family:"Vampire King", Georgia, serif; font-size:clamp(30px,3.6vw,54px); line-height:1; letter-spacing:.035em; }
    .background-pattern-row::before,
    .background-pattern-row::after { content:none; }
    @media (min-width: 1500px) {
      body::after { content:""; position:fixed; z-index:0; right:14px; bottom:0; width:min(340px, calc((100vw - 1060px) / 2 - 28px)); aspect-ratio:900 / 1068; background:url("assets/images/goblin-background.png") right bottom / contain no-repeat; filter:blur(1.2px) drop-shadow(0 0 4px var(--bg)) drop-shadow(0 0 6px var(--bg)); opacity:1; pointer-events:none; }
    }
    .wrap { position:relative; z-index:1; max-width: 1060px; margin: 0 auto; padding: 32px 18px 56px; }
    header { margin-bottom: 24px; }
    .site-header { position:relative; display:flex; align-items:flex-start; justify-content:space-between; gap:28px; }
    .site-brand { min-width:0; padding-top:2px; flex:1; }
    .site-logo { display:block; width:min(100%, 520px); height:auto; max-height:116px; object-fit:contain; object-position:left center; }
    .site-logo-home { display:block; padding:0; border:0; border-radius:0; background:transparent; line-height:0; }
    .site-logo-home:focus-visible { outline:3px solid rgba(180,35,24,.45); outline-offset:4px; border-radius:4px; }
    .auth-panel:not(.is-expanded):not(.is-sticky-popover) { display:none; }
        .auth-panel { position:relative; z-index:101; flex:0 0 auto; width:max-content; max-width:100%; background:rgba(255,255,255,.92); border:1px solid #cfd7e6; border-radius:20px; padding:16px 18px; box-shadow:0 8px 24px rgba(25,35,70,.07); }
    .auth-panel.is-expanded { position:absolute; z-index:110; top:0; right:0; width:min(360px, calc(100% - 12px)); max-height:min(80vh, 720px); overflow-y:auto; }
    .auth-panel.is-sticky-popover { position:fixed !important; z-index:99; top:calc(var(--sticky-tabs-bottom, 54px) + 8px); right:max(12px, calc((100vw - 1500px)/2)); width:min(360px, calc(100vw - 24px)); max-height:min(80vh, 720px); overflow-y:auto; animation:account-popover-enter .3s cubic-bezier(.2,.75,.25,1) both; }
    @keyframes account-popover-enter { from { opacity:0; transform:translateY(-14px); } to { opacity:1; transform:translateY(0); } }
    .auth-register-backdrop { position:fixed; z-index:13000; inset:0; display:grid; place-items:center; padding:20px; background:rgba(23,32,51,.84); animation:register-backdrop-enter .2s ease-out both; }
    .auth-register-backdrop[hidden] { display:none !important; }
    @keyframes register-backdrop-enter { from { opacity:0; } to { opacity:1; } }
    .auth-panel.is-expanded.is-register-overlay { position:fixed !important; z-index:13001; top:50%; left:50%; right:auto; width:min(460px, calc(100vw - 32px)); max-width:none; height:min(680px, calc(100dvh - 20px)); max-height:calc(100dvh - 20px); overflow-y:auto; scrollbar-width:none; -ms-overflow-style:none; transform:translate(-50%,-50%); background:#fff; animation:register-panel-enter .24s cubic-bezier(.2,.75,.25,1) both; }
    .auth-panel.is-expanded.is-register-overlay::-webkit-scrollbar { display:none; }
    .auth-panel.is-expanded.is-register-overlay .auth-form { width:100%; }
    @keyframes register-panel-enter { from { opacity:0; transform:translate(-50%,calc(-50% - 12px)); } to { opacity:1; transform:translate(-50%,-50%); } }
    .auth-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .auth-panel-title { margin:0 0 6px; font-size:.78rem; font-weight:800; color:#59657b; text-transform:uppercase; letter-spacing:.09em; }
    .auth-panel-close { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; margin-top:-8px; padding:0; border:0; border-radius:50%; color:var(--text); background:#eef1f7; font-family:Arial,sans-serif; font-size:22px; line-height:1; cursor:pointer; }
    .auth-entry-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
    .auth-entry-actions button { min-height:38px; padding:7px 12px; border-radius:9px; font-size:.82rem; }
    .auth-entry-actions[hidden], .auth-panel-close[hidden] { display:none !important; }
    .auth-toggle-row { display:flex; justify-content:stretch; }
    .google-auth-button-shell { width:min(100%, 400px); min-height:46px; margin:0 auto; }
    .google-auth-provider-trigger { display:flex; align-items:center; justify-content:center; width:100%; min-height:46px; }
    .auth-mode-switch { display:flex; gap:6px; margin:0 0 6px; padding:4px; border-radius:10px; background:#eef1f7; }
    .auth-mode-button { flex:1; border:0; border-radius:7px; padding:7px 9px; color:var(--muted); background:transparent; font:inherit; font-size:.82rem; font-weight:700; cursor:pointer; }
    .auth-mode-button.active { color:var(--ink); background:#fff; box-shadow:0 1px 4px #1c2a441c; }
    .auth-mode-switch[hidden] { display:none !important; }
    .auth-form { width:min(340px, 100%); }
    .auth-form .field { margin:0 0 5px; }
    .auth-form label { display:block; margin-bottom:3px; font-size:.76rem; font-weight:700; }
    .auth-form input { width:100%; min-height:38px; box-sizing:border-box; }
    .auth-form .auth-register { margin-top:2px; }
    .auth-form-links { display:grid; gap:8px; margin-top:2px; color:#59657b; font-size:.8rem; line-height:1.45; }
    .auth-form-links p { margin:0; }
    .auth-inline-link { display:inline; padding:0; border:0; border-radius:0; background:transparent; color:var(--accent); font:inherit; font-weight:700; text-align:left; text-decoration:none; cursor:pointer; }
    .auth-inline-link:hover { text-decoration:underline; }
    .auth-forgot-link { justify-self:start; }
    .auth-inline-link[hidden] { display:none !important; }
    .auth-google-separator { display:flex; align-items:center; gap:8px; margin:6px 0; color:var(--muted); font-size:.76rem; }
    .auth-google-separator[hidden] { display:none !important; }
    .auth-google-separator::before, .auth-google-separator::after { content:""; height:1px; flex:1; background:#dce2ed; }
    .auth-panel #googleLoginStatus:empty, .auth-panel #emailAccountStatus:empty { display:none; }
    .auth-register { width:100%; margin-top:10px; }
    .auth-toggle { padding:10px 17px; border-radius:11px; font-size:.9rem; white-space:nowrap; }
    .auth-form[hidden] { display:none; }
    .auth-form { display:grid; gap:8px; }
    .auth-field { display:grid; gap:4px; }
    .auth-field label { color:#59657b; font-size:.72rem; font-weight:700; }
    .auth-field input { width:100%; min-width:0; border:1px solid #d9dfeb; border-radius:8px; padding:9px 10px; font:inherit; font-size:.86rem; background:#fff; }
    .auth-field input:focus { outline:3px solid rgba(180,35,24,.16); border-color:var(--accent); }
    .auth-submit-row { display:flex; justify-content:flex-end; align-items:center; gap:10px; }
    .auth-submit { padding:8px 13px; border-radius:9px; font-size:.82rem; }
    .auth-panel .status { margin-top:8px; padding:8px 10px; font-size:.78rem; }
    .auth-user { display:flex; align-items:center; justify-content:flex-start; gap:12px; }
    .auth-avatar { width:48px; height:48px; flex:0 0 48px; display:grid; place-items:center; overflow:hidden; border-radius:14px; color:#fff; font-weight:850; background:linear-gradient(135deg,#b42318,#ef4444); }
    .auth-avatar.has-picture { background:#eef1f6; }
    .auth-avatar img { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
    .auth-user-copy { min-width:0; flex:0 1 auto; }
    .auth-user-name { font-weight:800; overflow-wrap:anywhere; }
    .auth-user-label { color:var(--muted); font-size:.75rem; }
    .auth-profile-button { display:inline; margin-top:4px; padding:0; border:0; background:transparent; color:var(--accent); font:inherit; font-size:.78rem; font-weight:750; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
    .auth-profile-button:hover { color:#8f1d16; }
    .auth-user-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:4px; }
    .auth-user-actions .auth-profile-button { margin-top:0; }
    .auth-user-actions .auth-profile-button[hidden] { display:none !important; }
    .auth-resend-link[hidden] { display:none !important; }
    .auth-logout { background:#fff0ef; color:var(--danger); border:1px solid #ffd8d5; border-radius:9px; padding:8px 10px; font-size:.8rem; white-space:nowrap; }
    .auth-toggle-row[hidden], .auth-logout[hidden], .auth-form[hidden], .auth-user[hidden] { display:none !important; }
    @media(min-width:761px) { .auth-panel.is-expanded { position:absolute; } }
    @media(max-width:760px) { .auth-panel.is-expanded { position:relative; top:auto; right:auto; width:100%; max-height:none; overflow:visible; } }
    @media(max-width:760px) { .site-header { flex-direction:column; gap:18px; } .auth-panel { width:100%; max-width:none; flex-basis:auto; } .site-logo { max-width:100%; max-height:90px; } }
    @media(max-width:760px) { .background-pattern-grid { gap:28px 34px; } .background-pattern-row { gap:34px; } .background-pattern-row span, .background-pattern-row::before, .background-pattern-row::after { font-size:29px; } }
    .intro { color: rgba(255,255,255,.9); margin: 12px 0 0; width:min(100%, 520px); max-width:520px; white-space:nowrap; line-height:1.2; }
    .game-metadata-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .game-duration-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px; }
    .game-duration-fields[hidden], .game-duration-fields .field[hidden] { display:none !important; }
    .card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 18px; box-shadow: 0 4px 18px rgba(21, 34, 66, .035); }
    .section-head { display:flex; align-items:center; gap:10px; min-height:28px; margin:0 0 18px; font-size:1.08rem; line-height:1.3; }
    .section-number { display:inline-grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border-radius:9px; background:var(--soft); color:var(--accent); font-size:.82rem; line-height:1; }
    .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

    .session-card-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; flex-wrap:wrap; }
    .session-card-heading .section-head { margin-bottom:0; }
    .current-season-badge { display:inline-flex; flex:0 0 108px; width:108px; min-height:38px; align-items:center; justify-content:center; padding:7px 12px; border-radius:999px; background:#3f4652; color:#fff; font-size:.82rem; font-weight:700; letter-spacing:.02em; white-space:nowrap; }
    .current-season-badge .stats-loading-spinner { border-color:rgba(255,255,255,.38); border-top-color:#fff; }
    .session-number-fields { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
    @media (max-width: 700px) { .session-number-fields { grid-template-columns:1fr; } }

    .field { min-width: 0; }
    label, .label { display: block; font-size: .88rem; font-weight: 650; margin-bottom: 7px; }
    input, select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text); font: inherit; outline: none; }
    textarea { width:100%; min-height:110px; padding:10px 12px; border:1px solid var(--border); border-radius:9px; background:#fff; color:var(--text); font:inherit; resize:vertical; }
    input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180,35,24,.14); }
    input.commander-invalid { border-color: var(--danger); background: #fff5f5; box-shadow: 0 0 0 3px rgba(180,35,24,.10); }
    input.commander-valid { border-color: var(--success); }
    .commander-status { margin: 6px 0 0; font-size: .8rem; }
    .commander-row { display: flex; gap: 8px; align-items: center; }
    .commander-row input { flex: 1; min-width: 0; }
    .commander-field-wrap { position: relative; }
    .commander-suggestions { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(21,34,66,.14); padding: 5px; }
    .commander-suggestion { display: block; width: 100%; min-height: 38px; padding: 9px 10px; text-align: left; border-radius: 7px; background: transparent; color: var(--text); font-weight: 500; }
    .commander-suggestion:hover, .commander-suggestion:focus { background: var(--soft); outline: none; }
    .clear-commander { flex: 0 0 40px; min-height: 40px; padding: 0; border: 1px solid var(--border); background: #fff; color: var(--muted); display: inline-grid; place-items: center; font-size: 1.25rem; line-height: 1; }
    .clear-commander:hover { color: var(--danger); border-color: var(--danger); }
    .color-options.locked .choice { opacity: .62; background: #f0f2f6; border-color: #d3d8e2; cursor: not-allowed; }
    .color-options.locked input { pointer-events: none; }
    .commander-status.invalid { color: var(--danger); }
    .commander-status.valid { color: var(--success); }
    .commander-status.checking { color: var(--muted); }
    input[type="radio"], input[type="checkbox"] { width: auto; min-height: auto; accent-color: var(--accent); }
    .seat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .seat { border: 1px solid var(--border); border-radius: 13px; padding: 17px; background: #fcfdff; }
    .seat-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
    .seat h3 { margin: 0; font-size: 1rem; }
    .scryfall-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); font-weight: 650; cursor: pointer; white-space: nowrap; }
    .scryfall-toggle input { width: 16px; height: 16px; min-height: auto; accent-color: var(--accent); }
    .commander-art { width: 100%; max-width: 210px; aspect-ratio: 5 / 7; margin: 18px auto 0; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #edf0f6, #e2e7f0); box-shadow: 0 5px 14px rgba(23,32,51,.12); display: grid; place-items: center; position: relative; }
    .commander-art::before { content: none; } 
    .commander-art.has-image::before { display: none; }
    .planeswalker-placeholder { display: none; }
    .commander-art .art-loading { font-size: .9rem; font-weight: 650; color: #8a94a8; }
    .app-footer { position:relative; z-index:1; width:100%; margin:0; padding:0 0 28px; color:rgba(255,255,255,.9); font-size:.8rem; background:transparent; }
    .footer-inner { max-width:1060px; margin:0 auto; border-top:1px solid rgba(255,255,255,.48); padding:14px 18px 0; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
    .footer-version { display:inline-flex; align-items:center; gap:5px; }
    .api-health-dot { display:inline-block; width:11px; height:11px; flex:0 0 11px; border:1px solid rgba(255,255,255,.62); border-radius:50%; vertical-align:middle; }
    .api-health-dot.is-pending { background:#f2c230; box-shadow:0 0 6px rgba(242,194,48,.55); }
    .api-health-dot.is-healthy { background:#20b45a; box-shadow:0 0 6px rgba(32,180,90,.48); }
    .api-health-dot.is-unhealthy { background:#e53935; box-shadow:0 0 6px rgba(229,57,53,.45); }
    .commander-art img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; box-shadow: 0 5px 14px rgba(23,32,51,.18); }
    .commander-art .art-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; color: #8a94a8; font-size: .8rem; text-align: center; }
    .commander-art.has-image .art-loading { display: none; }
    .seat-fields { display: grid; grid-template-columns: 1fr; gap: 13px; }
    .partner-toggle { display:inline-flex; align-items:center; gap:7px; margin-left:auto; font-size:.78rem; color:var(--muted); font-weight:650; cursor:pointer; white-space:nowrap; }
    .partner-toggle input { width:16px; min-height:auto; accent-color:var(--accent); }
    .seat-top-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px; }
    .commander-art-stack { position:relative; width:100%; max-width:390px; height:294px; margin:18px auto 0; }
    .commander-art-stack .commander-art { position:absolute; top:0; width:57%; max-width:210px; margin:0; }
    .commander-art-stack .commander-art.primary-art { left:0; top:12px; z-index:2; }
    .commander-art-stack .commander-art.partner-art { right:0; left:34%; top:0; z-index:1; }
    .commander-art-stack:not(.has-partner) { max-width:210px; height:auto; aspect-ratio:5 / 7; }
    .commander-art-stack:not(.has-partner) .commander-art { width:100%; max-width:210px; }
    .commander-art-stack:not(.has-partner) .partner-art { display:none; }
    @media (max-width:760px) { .commander-art-stack { max-width:320px; height:245px; } }
    .hidden { display: none !important; }
    .admin-preview-rail { position:fixed; z-index:20; right:18px; top:50%; transform:translateY(-50%); width:220px; display:flex; flex-direction:column; gap:10px; }
    .admin-preview-card { padding:13px; border:1px solid var(--border); border-radius:13px; background:rgba(255,255,255,.98); box-shadow:0 8px 26px rgba(23,32,51,.16); }
    .admin-preview-card label { display:block; margin:0 0 7px; font-size:.84rem; font-weight:750; }
    .admin-preview-card select { min-height:40px; padding:8px 10px; font-size:.84rem; }
    .admin-preview-rail .status { margin:0; }
    @media(max-width:1250px) { .admin-preview-rail { display:none !important; } }
    .color-options, .radio-options { display: flex; flex-wrap: wrap; gap: 8px; }
    .choice { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px; background: white; font-size: .9rem; cursor: pointer; }
    .choice:has(input:checked) { background: var(--soft); border-color: #a5b4fc; color: #3730a3; }
    .hint { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }
    .winner-summary { background: #f8f9ff; border: 1px solid #dfe3ff; border-radius: 12px; padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .summary-value { font-weight: 700; min-height: 24px; overflow-wrap: anywhere; }
    .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
    button { border: 0; border-radius: 10px; padding: 12px 17px; font: inherit; font-weight: 700; cursor: pointer; }
    .primary { background: var(--accent); color: white; }
    .primary:hover { background: var(--accent-hover); }
    .secondary { background: #edf0f6; color: #293247; }
    button:disabled { opacity: .6; cursor: wait; }
    .status { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: .9rem; display: none; overflow-wrap: anywhere; }
    .status.show { display: block; }
    .status.ok { background: #eaf8f0; color: var(--success); }
    .status.error { background: #fff0ef; color: var(--danger); }
    .toast-container { position: fixed; z-index: 10000; top: auto; left: 50%; right: auto; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; transform: translateX(-50%); }
    .app-toast { width: 100%; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 12px 35px rgba(15,23,42,.2); font-size: .92rem; text-align: center; overflow-wrap: anywhere; animation: toast-enter .18s ease-out; }
    .app-toast.success { border-color: #b9e5ca; background: #eaf8f0; color: #167548; }
    .app-toast.error { border-color: #ffd0cb; background: #fff0ef; color: var(--danger); }
    .app-toast.leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
    @keyframes toast-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
    .backend-note { margin-top: 12px; color: var(--muted); font-size: .82rem; }
    .backend-note code { background: #f0f2f8; padding: 2px 5px; border-radius: 4px; }
    .tabs { position:sticky; top:0; z-index:100; display:flex; align-items:stretch; justify-content:center; gap:8px; width:100%; margin:0; padding:4px max(18px, calc((100vw - 1060px)/2 + 18px)) 0; border-bottom:1px solid rgba(255,255,255,.82); background:var(--bg); }
    .tab-items { display:flex; align-items:stretch; gap:8px; min-width:0; }
    .sticky-brand, .sticky-account-actions { display:flex; align-items:center; position:absolute; top:50%; z-index:2; translate:0 -50%; animation:sticky-identity-enter .28s ease-out both; }
    .sticky-brand { left:max(12px, calc((100vw - 1500px)/2)); width:clamp(48px, calc((100vw - 1060px)/2 - 26px), 190px); }
    .sticky-brand img { display:block; width:100%; height:auto; max-height:36px; object-fit:contain; object-position:left center; }
    .sticky-account-actions { right:max(12px, calc((100vw - 1500px)/2)); gap:14px; }
    .sticky-account-actions:not(.is-login) { right:max(12px, calc((100vw - 1500px)/2)); }
    .sticky-account { display:flex; align-items:center; gap:7px; max-width:190px; overflow:hidden; padding:0; border:0; background:transparent; color:#fff; font:inherit; font-size:.92rem; white-space:nowrap; cursor:pointer; }
    .sticky-account:hover { color:#fff; opacity:.88; }
    .sticky-account:disabled { opacity:1; cursor:default; }
    .sticky-account:focus-visible { outline:2px solid #fff; outline-offset:4px; border-radius:6px; }
    .sticky-account .material-symbol-icon { color:#fff; font-size:26px; }
    .sticky-decks-link { display:inline-flex; align-items:center; gap:5px; padding:0; border:0; background:transparent; color:#fff; font:inherit; font-size:.92rem; font-weight:400; white-space:nowrap; cursor:pointer; }
    .sticky-decks-link:hover { color:#fff; opacity:.86; }
    .sticky-decks-link:focus-visible { outline:2px solid #fff; outline-offset:4px; border-radius:6px; }
    .sticky-decks-link .material-symbol-icon { color:#fff; font-size:23px; }
    .sticky-decks-link[hidden] { display:none !important; }
    .profile-decks-card { scroll-margin-top:72px; }
    body:has(#panel-decks:not([hidden])) .wrap { max-width:1920px; }
    .sticky-register { padding:5px 12px; border:1px solid rgba(255,255,255,.82); border-radius:999px; background:transparent; color:#fff; font:inherit; font-size:.7rem; font-weight:700; letter-spacing:.035em; line-height:1; text-transform:uppercase; white-space:nowrap; }
    .sticky-register:hover { background:rgba(255,255,255,.1); }
    .sticky-register[hidden] { display:none !important; }
    .sticky-login { padding:5px 12px; border:1px solid rgba(255,255,255,.82); border-radius:999px; background:transparent; color:#fff; font:inherit; font-size:.7rem; font-weight:700; letter-spacing:.035em; line-height:1; text-transform:uppercase; white-space:nowrap; }
    .sticky-login:hover { background:rgba(255,255,255,.1); }
    .sticky-login[hidden] { display:none !important; }
    .sticky-account-actions.is-login .sticky-account { max-width:none; width:30px; height:30px; justify-content:center; overflow:visible; }
    .sticky-account-actions.is-login #stickyAccountName { display:none; }
    #stickyAccountName { overflow:hidden; text-overflow:ellipsis; }
    @keyframes sticky-identity-enter { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
    @media (min-width:761px) and (max-width:1300px) { .sticky-account { gap:4px; font-size:.8rem; } .sticky-account .material-symbol-icon { font-size:22px; } .sticky-decks-link { font-size:.8rem; gap:3px; } .sticky-decks-link .material-symbol-icon { font-size:20px; } .sticky-account-actions { gap:10px; } .sticky-login, .sticky-register { font-size:.65rem; padding-inline:9px; } }
    @media (min-width:761px) and (max-width:1144px) { .sticky-brand, .sticky-account-actions { display:none; } }
    .tab-button { border-radius: 10px 10px 0 0; background: transparent; color: rgba(255,255,255,.94); border-bottom: 3px solid transparent; padding: 12px 16px; transition: color .24s ease, background-color .24s ease, border-color .24s ease, box-shadow .24s ease, transform .24s ease; }
    .tab-button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); background: var(--surface); box-shadow: 0 5px 16px rgba(25,20,20,.13); }
    .tab-button:active { transform: translateY(1px); }
    .logout-button { margin-left:auto; align-self:center; white-space:nowrap; background:#fff0ef; color:var(--danger); border:1px solid #ffd8d5; border-radius:9px; padding:9px 13px; }
    .logout-button[hidden] { display:none; }
    @media(max-width:760px) {
      .toast-container { bottom: 12px; width: calc(100vw - 24px); }
      .tabs { display:none; }
      .logout-button { margin-left:0; }
      .wrap { width:100%; }
    }
    .tab-panel[hidden] { display: none; }
    .tab-panel.is-tab-leaving { animation: tab-panel-leave .2s ease both; pointer-events:none; }
    .tab-panel.is-tab-entering { animation: tab-panel-enter .34s cubic-bezier(.2,.75,.25,1) both; }
    @keyframes tab-panel-leave { to { opacity:0; transform:translateY(-8px); } }
    @keyframes tab-panel-enter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
    @media (prefers-reduced-motion: reduce) {
      .tab-button { transition:none; }
      .tab-button:active { transform:none; }
      .tab-panel.is-tab-leaving, .tab-panel.is-tab-entering { animation:none; }
      .sticky-brand, .sticky-account-actions { animation:none; }
      .auth-panel.is-sticky-popover { animation:none; }
      .deck-editor-card { transition:none; }
    }
    .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
    table { width: 100%; border-collapse: collapse; min-width: 760px; background: white; }
    th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: .88rem; }
    th { background: #f8f9fc; color: #4b5568; font-weight: 700; white-space: nowrap; }
    tbody tr:last-child td { border-bottom: 0; }
    .empty-row { text-align: center; color: var(--muted); padding: 28px 12px; }
    .game-detail-backdrop { position:fixed; inset:0; z-index:1000; display:none; align-items:center; justify-content:center; padding:20px; background:rgba(15,23,42,.58); }
    .game-detail-backdrop.open { display:flex; }
    .game-detail-modal { width:min(900px,100%); max-height: min(90vh, 900px); overflow:auto; background:#fff; border-radius:18px; box-shadow:0 24px 80px rgba(0,0,0,.28); padding:24px; }
    .profile-modal { width:min(620px,100%); }
    .profile-content { display:grid; gap:0; margin:0; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
    .profile-row { display:grid; grid-template-columns:minmax(130px,.8fr) minmax(0,1.2fr); gap:16px; padding:12px 14px; border-bottom:1px solid var(--border); }
    .profile-row:last-child { border-bottom:0; }
    .profile-row dt { color:var(--muted); font-size:.88rem; font-weight:700; }
    .profile-row dd { margin:0; overflow-wrap:anywhere; }
    .profile-page-card { margin-bottom:18px; }
    .profile-page-summary { display:grid; grid-template-columns:104px minmax(0,1fr); gap:20px; align-items:start; }
    .profile-page-avatar { width:96px; height:96px; display:grid; place-items:center; overflow:hidden; border-radius:50%; background:var(--danger); color:#fff; font-size:2.5rem; font-weight:800; }
    .profile-page-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
    .profile-page-details { width:100%; }
    .profile-decks-table { min-width:780px; }
    .profile-decks-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 10px; }
    .profile-decks-toolbar-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
    .profile-decks-sort-selector { margin:0; }
    .profile-decks-view-selector { margin:0; }
    .profile-decks-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr)); gap:16px; }
    .profile-deck-tile { min-width:0; overflow:hidden; border:1px solid var(--border); border-radius:13px; background:var(--surface); box-shadow:0 5px 16px rgba(16,24,40,.10); }
    .profile-deck-tile-visual { position:relative; isolation:isolate; display:flex; aspect-ratio:1.62; min-height:190px; flex-direction:column; justify-content:space-between; overflow:hidden; padding:16px; color:#fff; background:linear-gradient(135deg,#7e1b20,#202634); }
    .profile-deck-tile-visual::before,.profile-deck-tile-visual::after { position:absolute; inset:0; content:""; pointer-events:none; }
    .profile-deck-tile-visual::before { z-index:-1; background:var(--profile-deck-art,linear-gradient(135deg,#7e1b20,#202634)) center / cover no-repeat; filter:saturate(.32); }
    .profile-deck-tile-visual::after { z-index:0; background:linear-gradient(180deg,rgba(12,16,24,.52),rgba(12,16,24,.08) 46%,rgba(12,16,24,.82)); }
    .profile-deck-tile-visual > * { position:relative; z-index:1; }
    .profile-deck-tile-title { display:inline-block; max-width:100%; overflow:hidden; color:#fff; font-size:1.3rem; font-weight:800; line-height:1.2; text-decoration:none; text-overflow:ellipsis; text-shadow:0 1px 4px rgba(0,0,0,.75); white-space:nowrap; }
    .profile-deck-tile-author { margin-top:0; color:rgba(255,255,255,.92); font-size:.82rem; font-weight:650; text-shadow:0 1px 4px rgba(0,0,0,.8); }
    .profile-deck-tile-last-played { margin-top:2px; color:rgba(255,255,255,.96); font-size:.78rem; text-shadow:0 1px 4px rgba(0,0,0,.9); }
    .profile-deck-tile-stats { display:flex; width:100%; box-sizing:border-box; align-items:flex-end; justify-content:space-between; gap:8px; padding-right:8px; font-size:.82rem; text-shadow:0 1px 4px rgba(0,0,0,.9); }
    .profile-deck-tile-stats span:last-child { text-align:right; }
    .profile-deck-tile-stats strong { display:inline-block; margin-top:3px; color:#fff; }
    .profile-deck-tile-footer { display:flex; min-height:58px; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; }
    .profile-deck-tile-footer > a { font-weight:700; }
    .profile-deck-tile-no-deck { color:var(--muted); font-size:.88rem; }
    .profile-deck-tile .profile-decklist-actions { justify-content:flex-end; }
    .profile-decks-empty { grid-column:1/-1; margin:0; padding:16px; color:var(--muted); }
    .profile-decks-table th:last-child,.profile-decks-table td:last-child { width:1%; white-space:nowrap; }
    .profile-decklist-button { min-height:36px; padding:7px 10px; font-size:.82rem; }
    .profile-decklist-actions { display:flex; align-items:center; justify-content:center; gap:8px; }
    .profile-decklist-icon-button { display:grid; place-items:center; width:38px; height:38px; padding:0; border:1px solid var(--border); border-radius:11px; background:#f8f9fc; color:#344054; cursor:pointer; }
    .profile-decklist-icon-button:hover { background:#edf0f6; }
    .profile-decklist-icon-button .material-symbol-icon { font-size:21px; }
    .profile-decklist-icon-button.is-delete { border-color:#ffd1cc; background:#fff8f7; color:var(--danger); }
    .profile-decklist-icon-button.is-delete:hover { background:#fff0ed; }
    .profile-decklist-modal { width:min(560px,100%); }
    .deck-editor { margin-top:22px; padding-top:22px; border-top:1px solid var(--border); }
    .deck-editor-top { display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
    .deck-editor-toolbar-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
    .deck-editor-heading-group { min-width:0; }
    .deck-editor-title { display:flex; align-items:center; gap:8px; }
    .deck-editor-name-edit-button { display:grid; place-items:center; width:32px; height:32px; padding:0; border:1px solid var(--border); border-radius:8px; background:#f8f9fc; color:var(--muted); cursor:pointer; }
    .deck-editor-name-edit-button:hover { color:var(--accent); background:var(--soft); }
    .deck-editor-name-edit-button .material-symbol-icon { font-size:19px; }
    .deck-editor-name-edit { display:flex; align-items:center; gap:6px; margin-top:8px; }
    .deck-editor-name-edit input { width:min(420px,70vw); min-height:38px; padding:7px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); font:inherit; }
    .deck-editor-name-edit label { margin-left:8px; color:var(--muted); font-size:.85rem; font-weight:700; }
    .deck-editor-name-edit select { min-height:38px; padding:6px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); font:inherit; }
    .deck-editor-name-edit-action { width:36px; height:36px; border:1px solid var(--border); border-radius:8px; background:#f8f9fc; color:var(--text); cursor:pointer; font-size:18px; }
    .deck-editor-summary { margin:3px 0 12px; color:var(--muted); font-size:.9rem; }
    .deck-editor-top-actions { display:flex; align-items:center; gap:12px; }
    .deck-editor-view-selector { margin:0 !important; }
    .deck-editor-top h2 { margin:0; }
    .deck-editor-metadata { display:grid; grid-template-columns:max-content; gap:10px; margin-bottom:18px; }
    .deck-editor-metadata > * { display:flex; flex-direction:column; justify-content:center; gap:5px; min-height:66px; padding:9px 11px; border:1px solid var(--border); border-radius:10px; color:var(--muted); font-size:.8rem; }
    .deck-editor-metadata .deck-editor-stat { max-width:130px; }
    .deck-editor-metadata strong { color:var(--text); }
    .deck-editor-metadata input,.deck-editor-metadata select,.deck-editor-search input { width:100%; min-height:42px; padding:8px 11px; border:1px solid var(--border); border-radius:9px; background:var(--surface); color:var(--text); }
    .deck-editor-search { position:relative; max-width:560px; margin:0 0 24px; }
    .deck-editor-search label { display:block; margin-bottom:7px; font-weight:700; }
    .deck-editor-columns { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); align-items:start; gap:10px; overflow:visible; padding:4px 2px 18px; }
    .deck-editor-columns:has(.deck-editor-commander-preview) { align-items:stretch; }
    .deck-editor-column { min-width:0; }
    .deck-editor-column h3 { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; gap:8px; margin:0; padding:10px; border:1px solid var(--border); border-radius:10px 10px 0 0; background:var(--surface); font-size:.9rem; }
    .deck-editor-column h3 span { color:var(--muted); }
    .deck-editor-stack { padding-top:7px; }
    .deck-editor-card { position:relative; height:54px; margin-bottom:-23px; overflow:hidden; border-radius:9px; background:var(--surface); box-shadow:0 2px 7px #10182822; transition:height .32s cubic-bezier(.2,.75,.25,1),margin .32s cubic-bezier(.2,.75,.25,1); }
    .deck-editor-card:last-child { height:auto; margin:0 0 12px; }
    .deck-editor-card:hover,.deck-editor-card:focus-within { z-index:3; height:var(--deck-expanded-height,300px); margin-bottom:12px; }
    .deck-editor-card:last-child:hover,.deck-editor-card:last-child:focus-within { height:auto; margin-bottom:12px; }
    .deck-editor-card img { display:block; width:100%; height:auto; object-fit:contain; object-position:top; }
    .deck-editor-card-fallback { padding:13px; font-weight:700; }
    .deck-editor-card-fallback small { display:block; margin-top:5px; color:var(--muted); font-weight:400; }
    .deck-editor-qty { position:absolute; z-index:1; top:5px; left:6px; padding:2px 6px; border-radius:5px; background:#111c; color:white; font-weight:700; }
    .deck-editor-card-actions { position:absolute; top:22%; right:4px; display:flex; flex-direction:column; gap:3px; opacity:0; }
    .deck-editor-card:hover .deck-editor-card-actions,.deck-editor-card:focus-within .deck-editor-card-actions { opacity:1; }
    .deck-editor-card-actions > button { width:30px; height:34px; padding:0; border:1px solid #fff; border-radius:5px; background:#ffffffd9; color:#202a3d; box-shadow:0 1px 4px #0004; cursor:pointer; font-size:22px; line-height:1; }
    .deck-editor-card-menu { position:absolute; top:68px; right:35px; z-index:5; width:max-content; padding:4px; border:1px solid var(--border); border-radius:8px; background:var(--surface); box-shadow:0 4px 16px #0003; }
    .deck-editor-card-menu button { display:block; width:100%; min-height:34px; padding:6px 10px; border:0; border-radius:5px; background:transparent; color:var(--text); cursor:pointer; white-space:nowrap; text-align:left; }
    .deck-editor-card-menu button:hover { background:#f3f5f8; }
    .deck-editor-list { padding:4px 0; }
    .deck-editor-list-row { display:grid; grid-template-columns:30px minmax(0,1fr) 48px 30px; align-items:center; gap:4px; min-height:38px; border-bottom:1px solid var(--border); font-size:.78rem; }
    .deck-editor-list-row.is-preview-selected { background:#e9edf2; }
    :root[data-theme="dark"] .deck-editor-list-row.is-preview-selected { background:#3b4252; }
    .deck-editor-list-quantity,.deck-editor-list-mana { color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
    .deck-editor-list-quantity { text-align:center; }
    .deck-editor-list-mana { display:flex; align-items:center; justify-content:flex-end; gap:1px; text-align:right; font-size:.92em; }
    .mana-cost-symbol { display:inline-flex; line-height:1; }
    .mana-cost-symbol .ms { font-size:1.12em; }
    .mana-cost-fallback { font-size:.85em; }
    .deck-editor-list-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
    .deck-editor-list-name:hover,.deck-editor-list-name:focus-visible { color:var(--accent); text-decoration:underline; }
    .deck-editor-list-actions { position:relative; display:flex; justify-content:flex-end; }
    .deck-editor-list-actions .deck-editor-list-menu-toggle { width:28px; height:27px; padding:0; border:1px solid var(--border); border-radius:6px; background:#f8f9fc; color:var(--text); cursor:pointer; font-size:19px; line-height:1; }
    .deck-editor-list-menu { position:absolute; top:calc(100% + 3px); right:0; z-index:12; width:max-content; min-width:155px; padding:4px; border:1px solid var(--border); border-radius:8px; background:var(--surface); box-shadow:0 5px 18px #0003; }
    .deck-editor-list-menu button { display:block; width:100%; min-height:32px; padding:6px 9px; border:0; border-radius:5px; background:transparent; color:var(--text); cursor:pointer; text-align:left; white-space:nowrap; font-size:.76rem; }
    .deck-editor-list-menu button:hover { background:#f3f5f8; }
    .deck-editor-commander-preview { display:flex; flex-direction:column; align-items:center; gap:7px; margin-top:12px; }
    .deck-editor-commander-preview strong { max-width:100%; color:var(--muted); font-size:.75rem; text-align:center; }
    .deck-editor-commander-preview img { display:block; width:100%; height:auto; border-radius:9px; box-shadow:0 2px 8px #10182825; }
    @media(min-width:1101px) {
      .deck-editor-column:first-child { height:100%; }
      .deck-editor-commander-preview { position:sticky; z-index:4; top:calc(var(--sticky-tabs-bottom,54px) + 12px); width:100%; max-height:calc(100vh - var(--sticky-tabs-bottom,54px) - 24px); margin-top:12px; padding:0 4px 8px; overflow:hidden; background:var(--surface); }
      .deck-editor-commander-preview img { max-width:100%; max-height:calc(100vh - var(--sticky-tabs-bottom,54px) - 72px); object-fit:contain; }
    }
    .deck-history { margin-top:20px; padding-top:16px; border-top:1px solid var(--border); }
    .deck-history-version { margin:10px 0; padding:0 14px; border:1px solid var(--border); border-radius:11px; }
    .deck-history-version summary { display:flex; justify-content:space-between; gap:12px; padding:12px 0; cursor:pointer; list-style:none; }
    .deck-history-version summary::-webkit-details-marker { display:none; }
    .deck-history-version summary::after { content:"＋"; color:var(--muted); }
    .deck-history-version[open] summary::after { content:"−"; }
    .deck-history-version summary span { color:var(--muted); }
    .deck-history-version ul { margin:0 0 12px; padding-left:20px; }
    .deck-combo-analysis,.deck-mana-analysis,.deck-opening-hand { margin-top:24px; padding:20px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
    .deck-combo-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; }
    .deck-combo-heading h2,.deck-combo-heading h3 { margin:0; font-size:1.15rem; }
    .deck-combo-source,.deck-combo-guidance { color:var(--muted); font-size:.78rem; }
    .deck-combo-source a { display:inline-flex; align-items:center; justify-content:center; border-radius:9px; }
    .deck-combo-source img { display:block; width:42px; height:42px; object-fit:contain; border-radius:9px; }
    .deck-combo-source a:focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
    .deck-combo-guidance { margin:6px 0 14px; }
    .deck-combo-count { margin:0 0 10px; color:var(--muted); font-size:.82rem; }
    .deck-combo-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr)); gap:14px; }
    .deck-combo-card { min-width:0; padding:12px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:0 3px 12px #10182812; }
    .deck-combo-pieces { display:flex; min-height:130px; align-items:center; justify-content:center; overflow:hidden; padding:3px 4px 9px; }
    .deck-combo-piece { position:relative; flex:0 1 102px; width:102px; aspect-ratio:.715; overflow:hidden; border:2px solid #111; border-radius:9px; background:#252525; box-shadow:0 3px 9px #10182835; }
    .deck-combo-piece + .deck-combo-piece { margin-left:-20px; }
    .deck-combo-piece img { display:block; width:100%; height:100%; object-fit:cover; }
    .deck-combo-piece span { display:grid; width:100%; height:100%; place-items:center; padding:7px; color:#fff; font-size:.7rem; text-align:center; }
    .deck-combo-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:.82rem; }
    .deck-combo-tag { padding:3px 8px; border-radius:999px; background:#edf0f5; color:var(--muted); font-size:.7rem; font-weight:700; }
    :root[data-theme="dark"] .deck-combo-tag { background:#3b4252; }
    .deck-combo-prerequisites,.deck-combo-outcomes { margin:8px 0 0; font-size:.78rem; }
    .deck-combo-outcomes > strong { display:block; margin-bottom:3px; }
    .deck-combo-outcomes ul { margin:0; padding-left:19px; }
    .deck-combo-details { margin-top:9px; padding-top:8px; border-top:1px solid var(--border); font-size:.76rem; }
    .deck-combo-details summary { cursor:pointer; color:var(--muted); }
    .deck-combo-details p { margin:7px 0 0; line-height:1.45; }
    .deck-combo-brackets { display:flex; justify-content:space-between; gap:5px; margin-top:11px; }
    .deck-combo-bracket { flex:1 1 0; padding:5px 3px; border-radius:999px; color:#fff; font-size:.68rem; font-weight:800; text-align:center; white-space:nowrap; }
    .deck-combo-bracket.is-yes { background:#16812a; }
    .deck-combo-bracket.is-caution { background:#b66b0b; }
    .deck-combo-bracket.is-no { background:#c62828; }
    .deck-mana-analysis,.deck-opening-hand { margin-top:24px; padding:20px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
    .deck-mana-analysis { display:flex; height:560px; box-sizing:border-box; flex-direction:column; overflow:hidden; }
    .deck-mana-analysis > h3,.deck-opening-hand h3 { margin:0; font-size:1.15rem; }
    .deck-mana-kpis { display:flex; align-items:flex-end; flex-wrap:wrap; gap:18px; margin:14px 0 0; }
    .deck-mana-kpi { display:flex; flex-direction:column; gap:3px; color:var(--muted); font-size:.82rem; }
    .deck-mana-kpi strong { color:var(--text); font-size:1rem; }
    .deck-mana-kpi-primary strong { font-size:2rem; line-height:1.05; font-weight:850; }
    .deck-mana-layout { display:grid; grid-template-columns:minmax(280px, .95fr) minmax(280px, 1fr) minmax(210px, .58fr); flex:1; min-height:0; gap:20px; align-items:start; overflow:hidden; }
    .deck-mana-chart-column { display:flex; min-width:0; min-height:0; flex-direction:column; }
    .deck-mana-chart { min-width:0; padding-top:12px; }
    .deck-mana-bars { display:flex; align-items:flex-end; gap:6px; height:220px; padding:8px 6px 0; border-bottom:1px solid var(--border); background:repeating-linear-gradient(to bottom, transparent 0, transparent 43px, var(--border) 44px, transparent 45px); }
    .deck-mana-bar { position:relative; display:flex; flex:1 1 0; min-width:18px; max-width:60px; height:100%; flex-direction:column; align-items:center; justify-content:flex-end; padding:0; border:0; background:transparent; color:var(--muted); cursor:pointer; }
    .deck-mana-bar-fill { display:block; width:min(76%,40px); min-height:2px; border-radius:4px 4px 0 0; background:var(--accent); transition:filter .15s, background .15s; }
    .deck-mana-bar-count { position:absolute; bottom:calc(var(--bar-height, 0%) + 22px); color:var(--muted); font-size:.68rem; }
    .deck-mana-bar-label { min-height:23px; padding-top:4px; font-size:.76rem; }
    .deck-mana-bar:hover .deck-mana-bar-fill { filter:brightness(.9); }
    .deck-mana-bar.is-selected .deck-mana-bar-fill { background:#8f1d14; filter:brightness(.78) saturate(1.35); box-shadow:0 0 0 3px #b42318aa; }
    .deck-mana-bar.is-selected { color:var(--text); }
    .deck-mana-bar.is-selected .deck-mana-bar-label { font-weight:850; }
    .deck-mana-bar:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
    .deck-mana-axis-label { padding-top:7px; color:var(--muted); font-size:.76rem; text-align:center; }
    .deck-mana-card-list { height:auto; min-height:0; max-height:none; align-self:start; overflow:auto; padding:0 4px; }
    .deck-mana-card-list h4 { position:sticky; top:0; margin:0 0 10px; padding:7px 0; background:var(--surface); font-size:.95rem; }
    .deck-mana-type-group { margin-bottom:12px; }
    .deck-mana-type-group h5 { margin:0; padding:6px 0; border-bottom:1px solid var(--border); font-size:.82rem; }
    .deck-mana-card-row { display:flex; width:100%; min-height:31px; align-items:center; gap:9px; padding:4px 5px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text); cursor:pointer; text-align:left; }
    .deck-mana-card-row > span { color:var(--muted); white-space:nowrap; }
    .deck-mana-card-row .deck-mana-card-quantity { flex:0 0 28px; }
    .deck-mana-card-row strong { flex:1 1 auto; min-width:0; overflow:hidden; font-size:.82rem; text-overflow:ellipsis; white-space:nowrap; }
    .deck-mana-card-row .deck-mana-card-cost { display:flex; flex:0 0 auto; align-items:center; justify-content:flex-end; gap:1px; min-width:48px; }
    .deck-mana-card-cost .ms { font-size:.88rem; }
    .deck-mana-card-row:hover,.deck-mana-card-row.is-active { background:#e9edf2; }
    :root[data-theme="dark"] .deck-mana-card-row:hover,:root[data-theme="dark"] .deck-mana-card-row.is-active { background:#3b4252; }
    .deck-mana-preview { position:static; top:auto; margin-top:0; padding-top:0; display:flex; min-height:180px; flex-direction:column; align-items:center; align-self:start; gap:8px; }
    .deck-mana-preview > strong { color:var(--muted); font-size:.82rem; text-align:center; }
    .deck-mana-preview img { display:block; width:min(100%,280px); max-height:62vh; border-radius:9px; object-fit:contain; box-shadow:0 2px 8px #10182825; }
    .deck-mana-preview-empty { display:grid; width:100%; min-height:180px; place-items:center; border:1px dashed var(--border); border-radius:10px; color:var(--muted); text-align:center; }
    .deck-opening-hand { padding:20px; }
    .deck-opening-hand-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
    .deck-opening-hand-heading .hint { margin:5px 0 0; }
    .deck-opening-hand-actions { display:flex; flex-wrap:wrap; gap:8px; }
    .deck-opening-hand-actions button { min-height:38px; padding:7px 12px; }
    .deck-opening-hand-cards { display:flex; align-items:flex-start; gap:10px; margin-top:18px; overflow-x:auto; padding:4px 2px 12px; }
    .deck-opening-hand-card { position:relative; flex:0 0 clamp(105px,12vw,165px); aspect-ratio:0.715; overflow:hidden; border-radius:10px; background:#151515; box-shadow:0 2px 8px #10182830; }
    .deck-opening-hand-card img { display:block; width:100%; height:100%; object-fit:cover; }
    .deck-opening-hand-card > span { position:absolute; top:6px; left:7px; display:grid; width:25px; height:25px; place-items:center; border-radius:50%; background:#111a; color:#fff; font-weight:750; }
    @media(max-width:1000px) { .deck-mana-analysis { height:760px; } .deck-mana-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr) minmax(0,1.5fr); } .deck-mana-chart-column { grid-column:1; grid-row:1; } .deck-mana-preview { grid-column:2; grid-row:1; } .deck-mana-card-list { grid-column:1 / -1; grid-row:2; } }
    @media(max-width:600px) { .deck-combo-analysis,.deck-mana-analysis,.deck-opening-hand { padding:14px; } .deck-combo-grid { grid-template-columns:1fr; } .deck-combo-piece { flex-basis:88px; width:88px; } .deck-mana-analysis { height:920px; } .deck-mana-layout { grid-template-columns:1fr; grid-template-rows:minmax(0,.8fr) minmax(0,1.5fr) minmax(0,.8fr); } .deck-mana-chart,.deck-mana-card-list,.deck-mana-preview { grid-column:auto; grid-row:auto; } .deck-mana-preview { position:static; } .deck-opening-hand-heading { align-items:flex-start; flex-direction:column; } .deck-opening-hand-card { flex-basis:118px; } }
    @media(max-width:1100px) { .deck-editor-columns { grid-template-columns:repeat(4,minmax(0,1fr)); } }
    @media(max-width:720px) { body:has(#panel-decks:not([hidden])) .wrap { max-width:100%; } .deck-editor-metadata { grid-template-columns:repeat(2,minmax(0,1fr)); } .deck-editor-toolbar-row { align-items:flex-start; flex-direction:column; } .deck-editor-top-actions { flex-wrap:wrap; } .deck-editor-columns { grid-template-columns:repeat(2,minmax(0,1fr)); } }
    .profile-commander-modal { width:min(560px,100%); }
    .profile-commander-field { position:relative; }
    .profile-commander-field .commander-suggestions { top:calc(100% + 4px); }
    .commander-decklists-heading { margin:18px 0 10px; font-size:.92rem; }
    .commander-details-top .commander-decklists-wrap { width:100%; max-width:100%; min-width:0; margin-top:0; overflow-x:hidden; }
    .commander-details-top .commander-decklists-table { width:100%; min-width:0; table-layout:fixed; }
    .commander-details-top .commander-decklists-table th,.commander-details-top .commander-decklists-table td { padding:5px 3px; font-size:.68rem; line-height:1.2; white-space:normal; overflow-wrap:anywhere; }
    .commander-details-top .commander-decklists-table th:nth-child(1),.commander-details-top .commander-decklists-table td:nth-child(1) { width:16%; }
    .commander-details-top .commander-decklists-table th:nth-child(2),.commander-details-top .commander-decklists-table td:nth-child(2) { width:24%; }
    .commander-details-top .commander-decklists-table th:nth-child(3),.commander-details-top .commander-decklists-table td:nth-child(3) { width:12%; }
    .commander-details-top .commander-decklists-table th:nth-child(4),.commander-details-top .commander-decklists-table td:nth-child(4) { width:10%; text-align:center; }
    .commander-details-top .commander-decklists-table th:nth-child(5),.commander-details-top .commander-decklists-table td:nth-child(5) { width:38%; }
    .commander-details-top .commander-decklists-table .commander-tier { width:24px; height:24px; min-width:24px; border-radius:6px; font-size:.68rem; }
    .commander-decklist-link { display:inline-flex; align-items:center; gap:2px; white-space:nowrap; font-size:.72rem; }
    .commander-decklist-link .material-symbol-icon { font-size:16px; }
    .decklist-hosts { columns:2; margin:8px 0 18px; padding-left:20px; color:var(--muted); }
    .decklist-hosts li { margin:4px 0; }
    @media(max-width:520px) { .profile-page-summary { grid-template-columns:1fr; } .profile-page-avatar { width:76px; height:76px; font-size:2rem; } .decklist-hosts { columns:1; } }
    .my-playgroup-members { margin-top:18px; }
    .my-playgroup-members h3 { margin:0 0 8px; font-size:1rem; }
    .my-playgroup-members ul { margin:0; padding:0; list-style:none; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
    .my-playgroup-members li { padding:10px 14px; border-bottom:1px solid var(--border); }
    .my-playgroup-members li:last-child { border-bottom:0; }
    @media(max-width:520px) { .profile-row { grid-template-columns:1fr; gap:4px; } }
    .game-detail-modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
    .game-detail-modal-head h2 { margin:0; font-size:1.35rem; }
    .modal-close { width:40px; height:40px; padding:0; flex:0 0 40px; display:grid; place-items:center; font-size:1.5rem; line-height:1; background:#edf0f6; color:#293247; }

    .user-row-actions { display:flex; align-items:center; gap:8px; white-space:nowrap; }
    .icon-action { display:inline-grid; place-items:center; width:36px; height:36px; padding:0; border:1px solid var(--border); border-radius:9px; background:#fff; color:#374151; }
    .icon-action:hover { background:#f3f4f6; }
    .icon-action.delete { color:var(--danger); border-color:#ffd8d5; }
    .icon-action svg { width:17px; height:17px; }
    .user-modal-form { display:grid; gap:14px; }
    .user-modal-copy { color:var(--muted); margin-top:-6px; }
    .danger-button { background:#b42318; color:#fff; }
    .danger-button:hover { background:#912018; }
    #adminUsersSection .section-head { font-size:.96rem; margin-bottom:10px; }
    #adminUsersSection .hint { font-size:.78rem; line-height:1.4; margin:0 0 10px; }
    #adminUsersSection .stats-table { min-width:820px; }
    #adminUsersSection .stats-table th,
    #adminUsersSection .stats-table td { padding:8px 10px; font-size:.70rem; line-height:1.35; }
    #adminUsersSection .stats-table select { min-height:34px; padding:5px 7px; font-size:.70rem; }
    #panel-history .table-wrap th,
    #panel-history .table-wrap td { padding:8px 10px; font-size:.70rem; line-height:1.35; }
    #panel-game-archive .archive-table-wrap { max-width:100%; max-height:min(70vh,760px); overflow:auto; position:relative; }
    #panel-game-archive .game-archive-table { width:100%; min-width:0; table-layout:fixed; }
    #panel-game-archive .game-archive-table thead th { position:sticky; top:0; z-index:2; background:#f8f9fc; box-shadow:0 1px 0 var(--border); }
    #panel-game-archive .game-archive-table th,
    #panel-game-archive .game-archive-table td { padding:7px 5px; font-size:.70rem; line-height:1.3; vertical-align:middle; overflow-wrap:anywhere; }
    #panel-game-archive .game-archive-table th:nth-child(1), #panel-game-archive .game-archive-table td:nth-child(1) { width:6%; }
    #panel-game-archive .game-archive-table th:nth-child(2), #panel-game-archive .game-archive-table td:nth-child(2) { width:8%; }
    #panel-game-archive .game-archive-table th:nth-child(3), #panel-game-archive .game-archive-table td:nth-child(3) { width:10%; }
    #panel-game-archive .game-archive-table th:nth-child(4), #panel-game-archive .game-archive-table td:nth-child(4) { width:7%; }
    #panel-game-archive .game-archive-table th:nth-child(5), #panel-game-archive .game-archive-table td:nth-child(5) { width:5%; }
    #panel-game-archive .game-archive-table th:nth-child(n+6):nth-child(-n+10), #panel-game-archive .game-archive-table td:nth-child(n+6):nth-child(-n+10) { width:8%; }
    #panel-game-archive .game-archive-table th:nth-child(11), #panel-game-archive .game-archive-table td:nth-child(11) { width:5%; }
    #panel-game-archive .game-archive-table th:nth-child(n+12), #panel-game-archive .game-archive-table td:nth-child(n+12) { width:5%; }
    #panel-game-archive .game-archive-table .archive-seat-cell { min-width:0; }
    .archive-seat-player,.archive-seat-commander { display:block; max-width:100%; overflow-wrap:anywhere; }
    .archive-seat-player { font-weight:750; }
    .archive-seat-commander { margin-top:3px; color:var(--muted); font-size:.72rem; }
    #panel-game-archive .archive-admin-column[hidden] { display:none; }
    #panel-game-archive .game-archive-table .history-detail-button,
    #panel-game-archive .game-archive-table .history-edit-button,
    #panel-game-archive .game-archive-table .history-delete-button { width:30px; height:30px; margin:0; }
    @media(max-width:760px) {
      #panel-game-archive .game-archive-table th,
      #panel-game-archive .game-archive-table td { padding:5px 2px; font-size:.58rem; }
      #panel-game-archive .archive-seat-commander { font-size:.55rem; }
      #panel-game-archive .game-archive-table .history-detail-button,
      #panel-game-archive .game-archive-table .history-edit-button,
      #panel-game-archive .game-archive-table .history-delete-button { width:24px; height:26px; }
    }
    #adminUsersSection .user-row-actions { gap:6px; }
    #adminUsersSection .admin-account-action { width:34px; height:34px; padding:0; display:inline-grid; place-items:center; border:1px solid #d1d5db; border-radius:8px; background:#eef0f4; color:#111827; cursor:pointer; }
    #adminUsersSection .admin-account-action .material-symbol-icon { font-size:19px; line-height:1; }
    #adminUsersSection .admin-account-action:hover { background:#e1e4e9; border-color:#b8bec8; }
    #adminUsersSection .admin-account-action.save { color:#111827; }
    #adminUsersSection .admin-account-action.save .material-symbol-icon { color:#111827; }
    #adminUsersSection .admin-account-action.delete { color:var(--danger); }
    #adminUsersSection .admin-account-action svg { width:18px; height:18px; }
    #adminUsersSection .admin-account-action:disabled { opacity:.55; cursor:wait; }
    #adminUsersSection .account-self-note { color:var(--muted); font-size:.7rem; font-weight:650; }
    #adminPlaygroupsSection .section-head { font-size:.96rem; margin-bottom:10px; }
    #adminPlaygroupsSection .hint { font-size:.78rem; line-height:1.4; margin:0 0 10px; }
    #adminPlaygroupsSection .stats-table { min-width:760px; }
    #adminPlaygroupsSection .stats-table th,
    #adminPlaygroupsSection .stats-table td { padding:8px 10px; font-size:.70rem; line-height:1.35; }
    #adminPlaygroupsSection input,
    #adminPlaygroupsSection select { min-height:34px; padding:5px 7px; font-size:.70rem; }
    #adminPlaygroupsSection .user-row-actions { gap:6px; }
    #adminPlaygroupsSection .admin-account-action { width:34px; height:34px; padding:0; display:inline-grid; place-items:center; border:1px solid #d1d5db; border-radius:8px; background:#eef0f4; color:#111827; cursor:pointer; }
    #adminPlaygroupsSection .admin-account-action .material-symbol-icon { font-size:19px; line-height:1; }
    #adminPlaygroupsSection .admin-account-action.delete { color:var(--danger); }
    #adminPlaygroupsSection .admin-account-action svg { width:18px; height:18px; }
    #adminPlaygroupsSection .admin-account-action:disabled { opacity:.45; cursor:not-allowed; }
    .game-meta-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:22px; }
    .game-meta-item { background:#f8f9fc; border:1px solid var(--border); border-radius:10px; padding:11px; min-width:0; }
    .game-meta-label { display:block; color:var(--muted); font-size:.76rem; margin-bottom:4px; }
    .game-meta-value { display:block; font-weight:700; overflow-wrap:anywhere; }
    .game-detail-seats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .game-detail-seat { border:1px solid var(--border); border-radius:13px; padding:16px; background:#fcfdff; }
    .game-detail-seat.winner { border:2px solid #16a34a; background:#effbf3; box-shadow:0 0 0 3px rgba(22,163,74,.08); }
    .game-detail-seat-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; font-weight:800; }
    .winner-badge { background:#15803d; color:#fff; padding:4px 8px; border-radius:999px; font-size:.72rem; white-space:nowrap; }
    .seat-meta-line { margin:7px 0 0; overflow-wrap:anywhere; }
    .history-detail-button { width:36px; height:36px; padding:0; display:inline-grid; place-items:center; border:1px solid var(--border); background:#f8f9fc; color:var(--accent); border-radius:9px; }
    .history-detail-button:hover, .history-edit-button:hover { background:var(--soft); border-color:#a5b4fc; }
    .history-edit-button { width:36px;height:36px;padding:0;display:inline-grid;place-items:center;border:1px solid var(--border);background:#f8f9fc;color:#293247;border-radius:9px;margin-left:6px; }
    .history-delete-button { width:36px;height:36px;padding:0;display:inline-grid;place-items:center;border:1px solid #ffd8d5;background:#fff7f6;color:var(--danger);border-radius:9px;margin-left:6px; }
    .history-delete-button:hover { background:#ffebe9;border-color:#fda29b; }
    .history-delete-button svg { width:18px;height:18px; }
    .history-edit-button svg { width:18px;height:18px; }
    .history-actions { white-space:nowrap; }
    .history-top-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
    @media (max-width: 650px) { .history-top { align-items:flex-start; flex-direction:column; } .history-top-actions { width:100%; } .history-top-actions button { flex:1; } }
    .edit-form-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
    .edit-seat { border:1px solid var(--border);border-radius:12px;padding:12px;margin-top:12px; }
    .edit-seat h4 { margin:0 0 10px; }
    .edit-error { color:var(--danger);font-size:.9rem;margin-top:10px; }
    @media(max-width:700px){.edit-form-grid{grid-template-columns:1fr;} .game-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
    .history-detail-button svg { width:18px; height:18px; }
    .history-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
    .stats-filter-controls { display:flex; align-items:flex-start; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
    .stats-filter-controls .field { min-width:150px; }
    .tag-filter-native { display:none !important; }
    .player-count-native { display:none !important; }
    .tag-filter-dropdown, .player-count-dropdown { position:relative; width:100%; }
    .tag-filter-trigger, .player-count-trigger { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:43px; padding:10px 12px; border:1px solid var(--border); border-radius:9px; background:#fff; color:var(--text); text-align:left; font-weight:400; }
    .tag-filter-trigger:focus-visible, .player-count-trigger:focus-visible { outline:3px solid rgba(180,35,24,.16); border-color:var(--accent); }
    .tag-filter-menu, .player-count-menu { position:absolute; z-index:40; top:calc(100% + 5px); left:0; right:0; max-height:280px; overflow:auto; padding:6px; border:1px solid var(--border); border-radius:10px; background:#fff; box-shadow:0 12px 28px rgba(23,32,51,.18); }
    .tag-filter-menu[hidden], .player-count-menu[hidden] { display:none; }
    .tag-filter-option { display:flex; align-items:center; gap:9px; min-height:36px; padding:6px 8px; border-radius:7px; color:var(--text); font-weight:500; cursor:pointer; }
    .tag-filter-option:hover { background:var(--soft); }
    .tag-filter-option input { flex:0 0 auto; width:16px; min-height:16px; height:16px; margin:0; padding:0; accent-color:var(--accent); }
    .stats-filter-controls select:disabled { background:#f3f5f8; color:#7a8497; cursor:not-allowed; }
    .game-tags-field { margin-top:14px; }
    .game-tags-inputs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:6px; }
    .game-tag-input-wrap { position:relative; min-width:0; }
    .game-tag-control { position:relative; display:flex; align-items:center; }
    .game-tag-control input { width:100%; padding-right:42px; }
    .game-tag-clear { position:absolute; right:7px; top:50%; display:grid; width:28px; height:28px; place-items:center; padding:0; border:0; border-radius:50%; background:transparent; color:var(--muted); font:inherit; font-size:1.3rem; line-height:1; cursor:pointer; transform:translateY(-50%); }
    .game-tag-clear:hover, .game-tag-clear:focus-visible { outline:none; background:var(--soft); color:var(--accent); }
    .game-tag-suggestions { position:absolute; z-index:30; top:calc(100% + 5px); left:0; right:0; max-height:220px; overflow:auto; padding:5px; border:1px solid var(--border); border-radius:10px; background:#fff; box-shadow:0 10px 24px rgba(25,35,70,.16); }
    .game-tag-suggestions[hidden] { display:none; }
    .game-tag-suggestion { display:block; width:100%; padding:8px 10px; border:0; border-radius:7px; background:#fff; color:var(--text); text-align:left; font:inherit; font-size:.9rem; cursor:pointer; }
    .game-tag-suggestion:hover, .game-tag-suggestion:focus-visible { outline:none; background:var(--soft); color:var(--accent); }
    .game-tag-suggestions-empty { padding:8px 10px; color:var(--muted); font-size:.82rem; }
    .player-aggregate-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
    .player-aggregate-controls .stats-section-title { margin-top:0; margin-bottom:10px; }
    .player-aggregate-toggle { display:inline-flex; align-items:center; gap:8px; margin-bottom:10px; color:var(--muted); font-size:.86rem; font-weight:650; cursor:pointer; }
    .player-aggregate-toggle input { width:17px; height:17px; accent-color:var(--accent); margin:0; }
    .stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
    .stat-tile { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #fff; min-width: 0; }
    .stats-grid .stat-tile { display:grid; grid-template-rows:minmax(2.5em,auto) auto 1fr; }
    .stat-label { color: var(--muted); font-size: .82rem; margin-bottom: 7px; }
    .stat-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; }
    .stats-grid .stat-value { font-size:1.9rem; }
    .stats-grid .stat-tile > .hint { align-self:end; margin-top:12px; }
    .stats-section-title { font-size: 1rem; margin: 22px 0 12px; }
    .stats-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; }
    .stats-table { min-width: 680px; }
    .rate-cell { min-width: 130px; }
    .rate-track { height: 7px; background: #edf0f6; border-radius: 999px; overflow: hidden; margin-top: 6px; }
    .rate-fill { height: 100%; background: var(--accent); border-radius: 999px; }
    .stats-note { color: var(--muted); font-size: .82rem; margin-top: 10px; }
    .tag-distribution-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
    .tag-distribution-card h4 { margin:0 0 12px; font-size:.98rem; }
    .tag-pie-content { display:flex; align-items:center; gap:14px; min-height:190px; }
    .tag-pie-svg { width:min(180px,44%); flex:0 0 min(180px,44%); height:auto; }
    .tag-pie-legend { display:grid; gap:6px; list-style:none; margin:0; padding:0; min-width:0; width:100%; }
    .tag-pie-legend li { display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:7px; font-size:.76rem; line-height:1.25; }
    .tag-pie-swatch { width:10px; height:10px; border-radius:3px; }
    .tag-pie-name { overflow-wrap:anywhere; }
    .tag-pie-value { color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
    .tag-pie-caption { margin:8px 0 0; color:var(--muted); font-size:.75rem; }
    .stats-loading-inline { display:inline-flex; align-items:center; justify-content:center; gap:8px; color:var(--muted); }
    .stats-loading-spinner { display:inline-block; width:16px; height:16px; flex:0 0 16px; border:2px solid #dfe3ee; border-top-color:var(--accent); border-radius:50%; vertical-align:middle; animation:stats-spin .75s linear infinite; }
    .stat-value .stats-loading-spinner { width:19px; height:19px; flex-basis:19px; }
    @keyframes stats-spin { to { transform:rotate(360deg); } }
    @media (prefers-reduced-motion: reduce) { .stats-loading-spinner { animation:none; } }
    .player-group-toggle { display:inline-flex; align-items:center; gap:8px; padding:3px 0; background:transparent; color:var(--text); font:inherit; font-weight:750; text-align:left; }
    .player-group-toggle .chevron { display:inline-block; color:var(--accent); transition:transform .15s ease; }
    .player-group-toggle[aria-expanded="true"] .chevron { transform:rotate(90deg); }
    .commander-pilot-toggle { display:inline-grid; place-items:center; width:22px; height:24px; margin:0 0 0 8px; padding:0; border:0; background:transparent; color:var(--accent); font-size:1rem; font-weight:900; line-height:1; vertical-align:middle; cursor:pointer; }
    .commander-pilot-toggle[aria-expanded="true"] { transform:rotate(90deg); }
    .player-stats-link { display:inline; padding:0; border:0; background:transparent; color:inherit; font:inherit; font-weight:inherit; text-align:left; text-decoration:none; cursor:pointer; }
    .player-stats-link:hover, .player-stats-link:focus-visible { color:inherit; text-decoration:none; }
    .material-symbol-icon.verified-player-icon { display:inline-flex; vertical-align:middle; margin-left:3px; font-size:22px; line-height:1; color:#000; }
    .player-name-management { display:flex; align-items:center; gap:3px; }
    .player-name-management input { min-width:0; flex:1; }
    .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
    .player-detail-row td { background:#f8f9fc; padding:12px 18px; }
    .player-detail-panel { border-left:3px solid #c7d2fe; padding-left:14px; }
    .player-detail-panel table { min-width:0; width:100%; background:transparent; }
    .player-detail-panel th, .player-detail-panel td { font-size:.82rem; padding:8px 10px; }
    .player-detail-panel th { background:#fff0ed; }
    .commander-pilot-detail-row > td { padding:0 !important; }
    .commander-pilot-detail-panel { width:100%; box-sizing:border-box; border-left:3px solid #c7d2fe; padding-left:0; }
    .commander-pilot-detail-panel table { min-width:760px; width:100%; table-layout:fixed; }
    .commander-pilot-detail-panel th, .commander-pilot-detail-panel td { vertical-align:middle; }
    .commander-pilot-detail-panel .commander-tier { width:34px; height:34px; min-width:34px; border-radius:8px; font-size:.95rem; }
    .top-commander-controls { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
    .top-commander-controls .field { min-width:190px; }
    .top-commander-controls .stats-filter-controls .field { min-width:170px; }
    .top-commander-view-selector { display:flex; flex-wrap:wrap; gap:6px; width:max-content; max-width:100%; margin:0 0 18px; padding:4px; border:1px solid var(--border); border-radius:11px; background:#f3f5f8; }
    .top-commander-view-button { border:0; border-radius:8px; background:transparent; color:var(--muted); padding:8px 14px; font:inherit; font-size:.86rem; font-weight:700; cursor:pointer; }
    .top-commander-view-button:hover { background:#fff; color:var(--text); }
    .top-commander-view-button.active { background:#fff; color:var(--accent); box-shadow:0 1px 4px rgba(21,34,66,.12); }
    .commander-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:12px; margin-bottom:22px; }
    .commander-table { min-width:760px; width:100%; table-layout:fixed; }
    .commander-table td, .commander-table th { white-space:normal; }
    .commander-table td:nth-child(1) { overflow-wrap:anywhere; }
    .commander-edhrec-link { color:inherit; text-decoration:none; text-decoration-color:var(--accent); text-underline-offset:3px; }
    .commander-edhrec-link:hover, .commander-edhrec-link:focus-visible { color:var(--accent); text-decoration:underline; }
    .commander-table .winrate-cell { min-width:140px; }

    .color-dashboard { display:grid; gap:18px; }
    .color-dashboard > .top-commander-controls { align-items:flex-start; margin-bottom:0; }
    .color-dashboard > .top-commander-controls .section-head { margin-bottom:4px; }
    .color-dashboard > div > .stats-section-title { margin-top:0; }
    .color-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
    .color-kpi { border:1px solid var(--border); border-radius:14px; padding:16px; background:#fff; }
    .color-kpi .stat-value { font-size:1.65rem; }
    .color-chart { display:grid; gap:13px; }
    .color-bar-row { display:grid; grid-template-columns:34px minmax(70px,1fr) 64px 54px; align-items:center; gap:12px; }
    .color-symbol { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; border:1px solid #d8deea; }
    .color-symbol.W { background:#fff2cf; color:#70541c; }
    .color-symbol.U { background:#d8eaff; color:#174f91; }
    .color-symbol.B { background:#dedce5; color:#27232e; }
    .color-symbol.R { background:#ffe0d9; color:#a12e1e; }
    .color-symbol.G { background:#d9f2df; color:#216b3c; }
    .color-bar-track { height:12px; border-radius:999px; background:#edf0f6; overflow:hidden; }
    .color-bar-fill { height:100%; border-radius:999px; }
    .color-bar-fill.W { background:#d9b85f; } .color-bar-fill.U { background:#5c9de6; }
    .color-bar-fill.B { background:#6f687d; } .color-bar-fill.R { background:#df705e; }
    .color-bar-fill.G { background:#5da978; }
    .color-combo-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
    .color-combo-card { border:1px solid var(--border); border-radius:12px; padding:13px; background:#fff; }
    .color-combo-card h4 { margin:0 0 8px; font-size:.92rem; }
    .color-combo-card .combo-number { font-size:1.35rem; font-weight:800; }
    .color-combo-card .hint { margin-top:3px; }
    .color-combo-card .combo-rate { margin-top:9px; font-weight:700; }
    .color-identity-table { min-width:650px; width:100%; }

    .history-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:16px; margin:0 0 16px; border:1px solid var(--border); border-radius:12px; background:#fbfcff; }
    .history-filter-actions { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
    .history-filter-count { color:var(--muted); font-size:.85rem; margin:0 0 12px; }
    @media(max-width:760px) { .history-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
    @media(max-width:480px) { .history-filters { grid-template-columns:1fr; } }
    .admin-settings-form { display:grid; gap:22px; margin-top:22px; }
    .admin-settings-form .field { width:100%; }

    .color-identity-section.is-filtered-out { display:none; }

    .color-identity-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; margin-bottom:8px; }
    .color-identity-heading .stats-section-title { margin:0; }
    .color-identity-filter { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
    .color-filter-option { display:inline-flex; align-items:center; gap:7px; padding:8px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; cursor:pointer; font-weight:700; color:var(--text); }
    .color-filter-option:has(input:checked) { border-color:var(--primary, #5145e5); background:#f1f0ff; color:#3730a3; }
    .color-filter-option input { margin:0; accent-color:#5145e5; }
    .color-filter-option input:disabled { cursor:not-allowed; }
    .color-filter-note { flex-basis:100%; font-size:.8rem; color:var(--muted); margin-top:1px; }

    .color-identity-table td:first-child { font-weight:750; }
    @media(max-width:760px) { .color-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .color-combo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .color-bar-row { grid-template-columns:34px minmax(40px,1fr) 52px 45px; gap:7px; } }

    .player-stats-content { display:grid; gap:20px; }
    .player-stats-panel { border:1px solid var(--border); border-radius:16px; background:#fbfcff; padding:20px; display:grid; gap:16px; box-shadow:0 3px 12px rgba(21,34,66,.025); }
    .player-stats-panel-title { margin:0; font-size:1.08rem; }
    .player-elo-panel { gap:14px; }
    .player-elo-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
    .player-elo-heading .hint { margin:5px 0 0; }
    .player-elo-current { display:grid; grid-template-columns:auto auto; align-items:center; justify-items:end; column-gap:10px; }
    .player-elo-current .stat-label { grid-column:1 / -1; color:var(--muted); font-size:.78rem; }
    .player-elo-current strong { font-size:2.25rem; line-height:1.1; font-variant-numeric:tabular-nums; }
    .player-elo-change { font-size:1rem; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .player-elo-change.up { color:#16834a; }
    .player-elo-change.down { color:#c1271b; }
    .player-elo-change.neutral { color:#7b8493; }
    .player-elo-periods { display:flex; flex-wrap:wrap; gap:6px; padding:4px; border:1px solid var(--border); border-radius:11px; background:#f3f5f8; width:max-content; max-width:100%; }
    .player-elo-period { border:0; border-radius:8px; background:transparent; color:var(--muted); padding:8px 14px; font:inherit; font-size:.86rem; font-weight:700; cursor:pointer; }
    .player-elo-period:hover { background:#fff; color:var(--text); }
    .player-elo-period.active { background:#fff; color:var(--accent); box-shadow:0 1px 4px rgba(21,34,66,.12); }
    .player-elo-controls { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
    .player-elo-playercounts { display:flex; flex-wrap:wrap; gap:6px; padding:4px; border:1px solid var(--border); border-radius:11px; background:#f3f5f8; width:max-content; max-width:100%; }
    .player-elo-chart-wrap { position:relative; min-width:0; overflow:hidden; border-radius:10px; background:#fff; }
    .player-elo-chart { display:block; width:100%; height:auto; min-height:180px; }
    .player-elo-gridline { stroke:#e8ebf1; stroke-width:1; stroke-dasharray:4 5; }
    .player-elo-axis-label { fill:#778197; font:12px system-ui,sans-serif; }
    .player-elo-area { fill:url(#playerEloFill); }
    .player-elo-line { fill:none; stroke:#bd241a; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
    .player-elo-point { fill:#fff; stroke:#bd241a; stroke-width:2; }
    .player-elo-peak-star { fill:#f1b900; stroke:#fff; stroke-width:2px; paint-order:stroke; font:700 21px Arial,sans-serif; text-anchor:middle; dominant-baseline:central; filter:drop-shadow(0 1px 2px rgba(21,34,66,.3)); pointer-events:none; }
    .player-elo-hover-guide { stroke:#bd241a; stroke-width:1.4; stroke-dasharray:4 4; opacity:.65; pointer-events:none; }
    .player-elo-hover-point { fill:#fff; stroke:#bd241a; stroke-width:3; pointer-events:none; }
    .player-elo-tooltip { position:absolute; z-index:4; display:grid; gap:4px; width:max-content; max-width:min(300px, calc(100% - 16px)); padding:10px 12px; border:1px solid #d7deeb; border-radius:10px; background:#fff; color:var(--text); box-shadow:0 8px 24px rgba(21,34,66,.2); font-size:.78rem; line-height:1.35; pointer-events:none; }
    .player-elo-tooltip[hidden] { display:none; }
    .player-elo-tooltip strong { font-size:.82rem; }
    .player-elo-tooltip span { color:var(--muted); overflow-wrap:anywhere; }
    .player-elo-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .player-elo-metric { display:grid; gap:5px; padding:13px 15px; border:1px solid var(--border); border-radius:12px; background:#fff; min-width:0; }
    .player-elo-metric > span { color:var(--muted); font-size:.8rem; }
    .player-elo-metric strong { color:var(--text); font-size:1.3rem; font-variant-numeric:tabular-nums; }
    .player-elo-metric small { color:var(--muted); font-size:.82rem; font-weight:600; }
    .player-elo-rank-metric { position:relative; z-index:2; }
    .player-elo-rank-toggle { display:flex; align-items:center; gap:7px; width:max-content; max-width:100%; padding:0; border:0; background:transparent; color:var(--text); font:inherit; font-size:1.3rem; font-weight:800; text-align:left; cursor:pointer; }
    .player-elo-rank-toggle span { margin-left:4px; color:var(--muted); font-size:.85rem; }
    .player-elo-rank-popover { position:absolute; z-index:20; top:calc(100% + 8px); left:0; width:min(100%, 380px); max-height:300px; overflow:auto; padding:8px; border:1px solid var(--border); border-radius:12px; background:#fff; box-shadow:0 12px 30px rgba(21,34,66,.2); }
    .player-elo-rank-popover ol { display:grid; gap:2px; margin:0; padding:0; list-style:none; }
    .player-elo-rank-popover li { display:flex; justify-content:space-between; gap:14px; padding:7px 8px; border-radius:7px; color:var(--text); font-size:.84rem; }
    .player-elo-rank-popover li.current-player { background:#fff1ef; color:var(--accent); }
    .player-elo-rank-popover li span { min-width:0; overflow-wrap:anywhere; }
    .player-elo-rank-popover li strong { flex:0 0 auto; font-size:.84rem; }
    .player-stats-empty { min-height:150px; display:flex; align-items:center; justify-content:center; text-align:center; padding:24px; color:var(--muted); background:#fbfcff; border:1px dashed var(--border); border-radius:12px; }
    .player-stats-kpis { display:grid; gap:12px; }
    .player-stats-kpi-grid { display:grid; gap:12px; min-width:0; }
    .player-stats-summary-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .player-stats-average-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .player-stats-seat-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .player-stats-color-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .player-stats-kpi { border:1px solid var(--border); border-radius:13px; background:#fff; padding:16px; min-width:0; }
    .player-stats-kpi .stat-value { font-size:1.55rem; overflow-wrap:anywhere; }
    .player-stats-kpi-compact { padding:8px 10px; }
    .player-stats-kpi-compact .stat-label { font-size:.78rem; margin-bottom:3px; }
    .player-stats-kpi-compact .stat-value { font-size:1.1rem; }
    .player-stats-seat-kpis .player-stats-kpi { padding:10px; }
    .player-stats-seat-kpis .stat-label { font-size:.82rem; }
    .player-stats-opponents { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .player-commander-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
    .head-to-head-list { display:grid; gap:14px; }
    .head-to-head-row { display:grid; gap:7px; }
    .head-to-head-labels { display:none; }
    .head-to-head-bar { display:flex; width:100%; height:38px; overflow:hidden; border-radius:7px; background:#e9edf5; box-shadow:0 2px 0 rgba(23,32,51,.25); }
    .head-to-head-own { display:flex; align-items:center; justify-content:flex-start; padding:0 10px; background:#ed7d31; color:white; font-size:.85rem; font-weight:700; min-width:0; overflow:hidden; white-space:nowrap; }
    .head-to-head-opponent { display:flex; align-items:center; justify-content:flex-end; padding:0 10px; background:#5b9bd5; color:white; font-size:.85rem; font-weight:700; min-width:0; overflow:hidden; white-space:nowrap; }
    .head-to-head-note { margin:0; color:var(--muted); font-size:.84rem; }
    .player-analysis-panel { border:1px solid var(--border); border-radius:16px; background:#fbfcff; padding:20px; margin-top:18px; box-shadow:0 3px 12px rgba(21,34,66,.025); }
    .player-analysis-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:18px; align-items:start; }
    .player-analysis-chart { width:100%; max-width:900px; margin:0 auto; display:block; }
    .player-analysis-explanations { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
    .player-analysis-metric { border:1px solid var(--border); border-radius:12px; padding:14px 16px; background:#fff; }
    .player-analysis-metric strong { display:block; font-size:1.4rem; margin-bottom:4px; }
    .player-analysis-metric strong.influence-level { font-size:1rem; font-weight:700; margin-top:2px; margin-bottom:8px; }
    .player-analysis-metric p { margin:4px 0 0; color:var(--muted); font-size:.84rem; }
    .player-analysis-metric.seat { background:#eff6ff; }
    .player-analysis-metric.commander { background:#f5f0ff; }
    .player-analysis-metric.opponents { background:#ecfdf3; }
    @media(max-width:760px) { .player-analysis-layout {grid-template-columns:1fr;} .player-analysis-explanations {grid-template-columns:1fr;} }
    .player-commander-card { border:1px solid var(--border); border-radius:14px; padding:12px; background:#fff; min-width:0; }
    .player-commander-art { width:100%; max-width:220px; margin:0 auto 12px; overflow:hidden; border-radius:12px; background:#08090d; box-shadow:0 5px 14px rgba(23,32,51,.18); }
    .player-commander-image { position:relative; z-index:2; width:100%; aspect-ratio:5/7; object-fit:cover; display:block; margin:0; border-radius:12px 12px 7px 7px; background:#edf0f6; }
    .player-commander-art .commander-art-footer { margin-top:-22px; padding-top:26px; }
    .player-commander-card h4 { margin:0 0 8px; overflow-wrap:anywhere; }
    .player-commander-card p { margin:5px 0; color:var(--muted); font-size:.88rem; }
    .player-commander-card .playgroup-commander-pilots { margin-top:9px; line-height:1.55; }
    .player-commander-card .playgroup-commander-pilots strong { color:var(--text); }
    .player-commander-card a { color:var(--accent); text-decoration:none; font-weight:750; }
    .player-commander-card a:hover { text-decoration:underline; }
    .player-commander-list { min-width:680px; }
    .player-commander-list td:first-child a { color:var(--text); text-decoration:none; font-weight:750; }
    .player-commander-list td:first-child a:hover { color:var(--accent); text-decoration:underline; }
    @media(max-width:760px) {
      .top-commander-view-selector { display:grid; grid-template-columns:1fr; width:100%; }
      .top-commander-view-button { text-align:left; }
      .player-elo-panel { padding:14px; }
      .player-elo-heading { align-items:center; gap:10px; }
      .player-elo-current strong { font-size:1.8rem; }
      .player-elo-change { font-size:.86rem; }
      .player-elo-periods { width:100%; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
      .player-elo-controls { align-items:stretch; flex-direction:column; }
      .player-elo-playercounts { width:100%; }
      .player-elo-period { padding:8px 5px; font-size:.76rem; }
      .player-elo-chart { min-height:150px; }
      .player-elo-axis-label { font-size:10px; }
      .player-elo-metric { padding:10px; }
      .player-elo-metric > span { font-size:.72rem; }
      .player-elo-metric strong { font-size:1.12rem; }
      .player-stats-summary-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .player-stats-average-kpis, .player-stats-color-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .player-stats-seat-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
      .player-stats-seat-kpis .player-stats-kpi { padding:8px 5px; }
      .player-stats-seat-kpis .stat-label { font-size:.68rem; }
      .player-stats-seat-kpis .stat-value { font-size:1rem; }
      .player-stats-seat-kpis .stat-meta { font-size:.66rem; }
      .player-commander-cards {grid-template-columns:1fr;}
      .player-stats-opponents {grid-template-columns:1fr;}
    }
    @media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(5, minmax(180px, 1fr)); overflow-x: auto; } .game-meta-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .game-detail-seats { grid-template-columns:1fr; } }
    @media (max-width:760px) { .tag-distribution-grid { grid-template-columns:1fr; } .tag-pie-content { min-height:170px; } }
    @media (max-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .game-tags-inputs { grid-template-columns:1fr; } .seat-grid { grid-template-columns: 1fr; } .winner-summary { grid-template-columns: 1fr; } }
    @media (max-width: 480px) { .footer-inner { padding-left:12px; padding-right:12px; } .wrap { padding: 22px 12px 36px; } .card { padding: 16px; } .grid { grid-template-columns: 1fr; } }

    /* Mobile layout refinements – Beta 08 */
    @media (max-width: 760px) {
      .auth-panel {
        width: 100%;
        min-height: 122px;
        padding: 18px 16px;
      }
      .auth-panel-title {
        text-align: center;
        margin-bottom: 14px;
      }
      .auth-loading {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        text-align: center;
      }
      .auth-user {
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 12px;
      }
      .auth-avatar {
        margin-left: 0;
      }
      .auth-user-copy {
        flex: 0 1 auto;
        text-align: left;
      }
      .auth-logout {
        margin-right: 0;
      }

      /* Prevent native date controls from exceeding their parent card. */
      #date,
      input[type="date"] {
        -webkit-appearance: none;
        appearance: none;
        display: block;
        box-sizing: border-box;
        inline-size: 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
      }
      .grid,
      .grid > .field {
        min-width: 0;
        max-width: 100%;
      }
      .field,
      .session-number-fields,
      .seat,
      .seat-fields {
        min-width: 0;
      }

      /* Align Seat heading to the top and standardize toggle typography/checkboxes. */
      .seat-top {
        align-items: flex-start;
        gap: 10px;
      }
      .seat-top > h3 {
        padding-top: 2px;
        flex: 0 0 auto;
      }
      .seat-top-controls {
        flex: 1 1 auto;
        min-width: 0;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 8px 12px;
      }
      .scryfall-toggle,
      .partner-toggle {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        margin: 0;
        font-size: .78rem;
        line-height: 1.25;
        font-weight: 650;
        white-space: nowrap;
      }
      .scryfall-toggle input,
      .partner-toggle input {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        margin: 0;
        flex: 0 0 18px;
      }

      /* Give the commander preview more breathing room at the bottom. */
      .commander-art-stack {
        margin-top: 18px;
        margin-bottom: 16px;
      }
      .commander-art {
        margin-bottom: 16px;
      }

      /* Compact winner choices so all options fit on one row on an iPhone. */
      .radio-options[aria-label="Bracket"] {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
      }
      .radio-options[aria-label="Winning Seat"] {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
      }
      .radio-options[aria-label="Bracket"] .choice,
      .radio-options[aria-label="Winning Seat"] .choice {
        box-sizing: border-box;
        min-width: 0;
        width: 100%;
        justify-content: center;
        gap: 5px;
        padding: 8px 3px;
        font-size: .76rem;
        line-height: 1.15;
        white-space: nowrap;
      }
      .radio-options[aria-label="Bracket"] .choice input,
      .radio-options[aria-label="Winning Seat"] .choice input {
        width: 15px;
        height: 15px;
        min-width: 15px;
        min-height: 15px;
        margin: 0;
        flex: 0 0 15px;
      }
      .winner-summary {
        grid-template-columns: 1fr;
        gap: 10px;
      }
    }

    @media (max-width: 390px) {
      .auth-user { gap: 9px; }
      .auth-avatar { width: 40px; height: 40px; flex-basis: 40px; }
      .auth-logout { padding: 9px 11px; font-size: .84rem; }
      .radio-options[aria-label="Winning Seat"] .choice {
        gap: 3px;
        padding-left: 2px;
        padding-right: 2px;
        font-size: .70rem;
      }
      .radio-options[aria-label="Winning Seat"] .choice input {
        width: 13px;
        height: 13px;
        min-width: 13px;
        min-height: 13px;
        flex-basis: 13px;
      }
    }

/* Initialer Auth-Zustand: kein kurzzeitiger falscher Login-Button */
.auth-loading { color: var(--muted); font-size: .85rem; text-align: center; padding: 10px 0; }
.auth-loading[hidden] { display: none !important; }


/* Commander-Tier-Badges */
.commander-tier-cell { width:78px; text-align:center; }
    .commander-tier { display:inline-flex; align-items:center; justify-content:center; width:48px; height:48px; min-width:48px; border:2px solid currentColor; border-radius:11px; font-size:1.25rem; line-height:1; font-weight:850; letter-spacing:-.02em; box-shadow:inset 0 0 0 1px rgba(255,255,255,.025); }
    .commander-tier.tier-s { color:#f4b72b; background:#39351f; border-color:#786327; }
    .commander-tier.tier-a { color:#35d6a2; background:#19372f; border-color:#216a56; }
    .commander-tier.tier-b { color:#2ed9d2; background:#193a3b; border-color:#216a68; }
    .commander-tier.tier-c { color:#ff925b; background:#3b2b25; border-color:#75452f; }
    .commander-tier.tier-d { color:#fa718b; background:#3b252d; border-color:#783646; }
    .player-commander-rate { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
    .player-commander-rate .commander-tier { width:38px; height:38px; min-width:38px; border-radius:9px; font-size:1.05rem; }

    


/* Commander hover preview: card and price footer form one compact component. */
.commander-hover-card {
  position: fixed;
  z-index: 10000;
  width: 230px;
  max-width: calc(100vw - 24px);
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #08090d;
  color: #fff;
  box-shadow: 0 9px 24px rgba(0,0,0,.28);
  pointer-events: none;
  border: 0;
}
.commander-hover-card.hidden { display: none; }
.commander-hover-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62vh, 430px);
  object-fit: contain;
  background: #08090d;
  border-radius: 12px 12px 8px 8px;
  box-shadow: none;
}
.commander-hover-price {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin: -12px 0 0;
  padding: 15px 14px 8px;
  background: #292d36;
  color: #fff;
  font-size: .8rem;
  line-height: 1.3;
  font-weight: 700;
  text-align: center;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: none;
}
.commander-hover-market-price {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.commander-hover-archetype {
  grid-column: 1;
  justify-self: start;
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.2;
  white-space: nowrap;
}
.commander-hover-archetype[hidden] { display: none; }
.commander-hover-salt-score {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.commander-hover-salt-score[hidden] { display: none; }
.commander-hover-salt-icon { display: block; width: 16px; height: 16px; flex: 0 0 auto; object-fit: contain; filter: invert(1); transform: scaleX(-1); }
.commander-hover-market-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  object-fit: contain;
}
.commander-hover-loading {
  min-height: 100px;
  display: grid;
  place-items: center;
  padding: 16px;
  font-size: .85rem;
  text-align: center;
  color: #f3f4f6;
}
a.commander-hover-preview { cursor: pointer; }
.game-detail-commander-link { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.game-detail-commander-link:hover, .game-detail-commander-link:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
.commander-art-stack { margin-bottom: 16px; }
.commander-art-stack.has-partner { height: 350px; }
.commander-art-stack:not(.has-partner) { height: auto; aspect-ratio: auto; margin-bottom: 16px; }
.commander-art-stack:not(.has-partner) .commander-art { position: relative; left: auto; right: auto; top: auto; width: 100%; max-width: 210px; margin: 0 auto; }
.commander-art.has-image { display: block; height: auto; aspect-ratio: auto; overflow: hidden; border-radius: 12px; background: #08090d; }
.commander-art:not(.has-image) { display: block; height: auto; aspect-ratio: auto; }
.commander-art:not(.has-image)::before { content: ""; display: block; width: 100%; aspect-ratio: 5 / 7; }
.commander-art:not(.has-image) .art-loading { bottom: 34px; }
.commander-art.has-image > img { position: relative; z-index: 2; width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 12px 12px 7px 7px; box-shadow: none; }
.commander-art-footer { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 5px; margin-top: -8px; padding: 12px 9px 8px; border-radius: 0 0 12px 12px; background: #292d36; color: #fff; }
.commander-art-footer-placeholder { min-height: 35px; }
.commander-art:not(.has-image) .commander-art-footer { visibility: hidden; }
.commander-art-footer .commander-hover-archetype { grid-column: 1; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .55rem; }
.commander-art-footer .commander-hover-market-price { grid-column: 2; gap: 4px; font-size: .72rem; }
.commander-art-footer .commander-hover-market-icon,
.commander-art-footer .commander-hover-salt-icon { width: 14px; height: 14px; }
.commander-art-footer .commander-hover-salt-score { grid-column: 3; gap: 4px; font-size: .72rem; }
.commander-art-stack:not(.has-partner) .commander-art.has-image { margin-bottom: 0; }
.commander-details-backdrop { position:fixed; inset:0; z-index:11000; display:flex; align-items:flex-start; justify-content:center; padding:clamp(12px,3vw,30px); overflow-x:hidden; overflow-y:auto; scrollbar-gutter:auto; visibility:hidden; pointer-events:none; background:rgba(12,16,25,0); backdrop-filter:blur(0); -webkit-backdrop-filter:blur(0); transition:background-color .56s ease, backdrop-filter .56s ease, visibility 0s linear .56s; }
.commander-details-backdrop.open { visibility:visible; pointer-events:auto; background:rgba(12,16,25,.68); backdrop-filter:blur(9px); -webkit-backdrop-filter:blur(9px); transition:background-color .56s ease, backdrop-filter .56s ease, visibility 0s; }
body.commander-details-open { overflow:hidden; }
.commander-details-modal { position:relative; width:min(900px,100%); margin:auto 0; padding:22px; border:0; border-radius:18px; overflow:visible; background:transparent; color:#172033; box-shadow:none; transform:translateY(calc(100vh + 100%)); transition:transform .56s cubic-bezier(.2,.78,.25,1); }
.commander-details-backdrop.open .commander-details-modal { transform:translateY(0); }
.commander-details-modal::before { content:""; position:absolute; z-index:0; inset:0 auto 0 0; width:calc(100% - clamp(187px,calc(25vw + 22px),247px)); border:1px solid rgba(255,255,255,.65); border-radius:18px; background:#eef0f4; box-shadow:0 24px 80px rgba(0,0,0,.36); }
.commander-details-close { position:absolute; top:14px; right:14px; z-index:2; width:38px; height:38px; padding:0; border-radius:50%; background:rgba(27,33,44,.88); color:#fff; font-size:1.45rem; line-height:1; }
.commander-details-modal > .commander-details-close { top:-20px; right:calc(clamp(187px,calc(25vw + 22px),247px) + 14px); }
.commander-details-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,300px); gap:24px; align-items:start; }
.commander-details-layout { position:relative; z-index:1; }
.commander-details-copy { min-width:0; }
.commander-details-heading { position:relative; padding:4px 42px 16px 0; border-bottom:1px solid #cbd0d8; }
.commander-details-heading h2 { margin:0; font-size:clamp(1.25rem,2.8vw,1.7rem); line-height:1.2; overflow-wrap:anywhere; }
.commander-details-heading .commander-details-close { display:none; }
.commander-details-eyebrow { margin:0 0 5px; color:#586273; font-size:.7rem; font-weight:850; letter-spacing:.1em; }
.commander-details-type { margin:5px 0 0; color:#566071; font-size:.9rem; }
.commander-details-links { display:flex; flex-wrap:wrap; gap:9px; padding:16px 0; border-bottom:1px solid #cbd0d8; }
.commander-details-link { display:inline-flex; align-items:center; min-height:38px; padding:8px 11px; border-radius:8px; background:#fff; color:#172033; font-size:.8rem; font-weight:800; text-decoration:none; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.commander-details-link:hover { color:var(--accent); outline:1px solid var(--accent); }
.commander-details-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:15px 0; border-bottom:1px solid #cbd0d8; }
.commander-details-stats div { display:grid; gap:4px; min-width:0; }
.commander-details-stats span { color:#596477; font-size:.7rem; font-weight:700; }
.commander-details-stats strong { font-size:.9rem; overflow-wrap:anywhere; }
.commander-details-top { padding-top:14px; }
.commander-details-top h3 { margin:0 0 12px; font-size:1rem; }
.commander-top-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.commander-top-card { min-width:0; }
.commander-top-card-image { display:grid; place-items:center; aspect-ratio:5/7; overflow:hidden; border-radius:9px; background:#dfe3ea; color:#6b7280; }
.commander-top-card-image img { display:block; width:100%; height:100%; object-fit:cover; }
.commander-top-card p { margin:6px 0 0; font-size:.75rem; font-weight:750; line-height:1.25; overflow-wrap:anywhere; }
.commander-details-empty { margin:0; padding:12px; border-radius:9px; background:rgba(255,255,255,.55); color:#5c6677; font-size:.85rem; }
.commander-details-art { position:sticky; top:0; transform:translateY(calc(100vh + 100%)); transition:transform .672s cubic-bezier(.2,.78,.25,1); perspective:1100px; }
.commander-details-backdrop.open .commander-details-art { transform:translateY(0); transition-delay:.1s; }
.commander-details-tilt { width:100%; transform:perspective(1100px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transform-style:preserve-3d; transition:transform .22s ease-out, filter .22s ease-out; will-change:transform; }
.commander-details-art img { display:block; width:100%; max-height:calc(90vh - 44px); object-fit:contain; border-radius:13px; box-shadow:0 10px 28px rgba(0,0,0,.25); }
.commander-details-art::after { content:""; position:absolute; inset:0; border-radius:13px; pointer-events:none; opacity:0; background:radial-gradient(circle at var(--shine-x,50%) var(--shine-y,50%),rgba(255,255,255,.28),transparent 48%); transition:opacity .2s ease; }
.commander-details-art.is-tilting .commander-details-tilt { transform:perspective(1100px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) scale(1.035); transition-duration:.08s; filter:drop-shadow(0 20px 26px rgba(0,0,0,.34)); }
.commander-details-art.is-tilting::after { opacity:1; }
.commander-details-art-empty { display:grid; min-height:260px; place-items:center; padding:20px; border-radius:13px; background:#dfe3ea; color:#687386; text-align:center; }
@media (max-width: 600px) {
  .commander-hover-card { width: 190px; }
}
@media (max-width: 760px) {
  .commander-art-stack.has-partner { height: 310px; margin-bottom: 16px; }
  .commander-details-backdrop { padding:10px; align-items:flex-start; }
  .commander-details-modal { margin:auto 0; padding:18px; transform:translateY(calc(-100vh - 100%)); }
  .commander-details-backdrop.open .commander-details-modal { transform:translateY(0); }
  .commander-details-modal::before { right:0; width:auto; }
  .commander-details-layout { grid-template-columns:1fr; gap:18px; }
  .commander-details-art { grid-row:1; position:relative; width:min(220px,calc(45vh * 5 / 7)); margin:0 auto; transform:translateY(calc(-100vh - 100%)); }
  .commander-details-backdrop.open .commander-details-art { transform:translateY(0); }
  .commander-details-art::before { content:""; position:absolute; z-index:0; top:80%; right:-5px; bottom:-5px; left:-5px; border-radius:0 0 14px 14px; background:#dfe3ea; }
  .commander-details-tilt,
  .commander-details-art-empty { position:relative; z-index:1; }
  .commander-details-art img { max-height:calc(45vh); }
  .commander-details-art-empty { min-height:0; aspect-ratio:5/7; }
  .commander-details-heading { padding-right:42px; }
  .commander-details-heading .commander-details-close { display:grid; }
  .commander-details-modal > .commander-details-close { display:none; }
  .commander-details-stats { grid-template-columns:1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .commander-details-backdrop,
  .commander-details-backdrop.open { transition:none; }
  .commander-details-modal,
  .commander-details-backdrop.open .commander-details-modal { transition:none; transform:none; }
  .commander-details-art,
  .commander-details-backdrop.open .commander-details-art { transition:none; transform:none; }
}

/* Mobile-only navigation drawer */
.mobile-menu-toggle,
.mobile-menu-backdrop { display:none; }
@media (max-width:760px) {
      .profile-decks-toolbar { align-items:stretch; flex-direction:column; }
      .profile-decks-toolbar-controls { align-items:stretch; flex-direction:column; }
      .profile-decks-toolbar-controls .top-commander-view-selector { display:flex; width:100%; }
      .profile-decks-toolbar-controls .top-commander-view-button { flex:1; }
      .profile-decks-toolbar > .primary { align-self:flex-start; }
      .profile-deck-tile-visual { min-height:180px; }
  .mobile-menu-toggle {
    position:fixed; top:max(12px,env(safe-area-inset-top)); right:14px; z-index:12002;
    width:48px; height:48px; padding:12px; display:flex; flex-direction:column;
    justify-content:center; gap:5px; border:1px solid rgba(255,255,255,.38); border-radius:14px;
    background:#79191d; box-shadow:0 5px 18px rgba(24,9,10,.28); cursor:pointer;
  }
  .mobile-menu-toggle span { display:block; width:22px; height:2px; border-radius:2px; background:#fff; }
  body.mobile-menu-open .mobile-menu-toggle,
  body.mobile-menu-closing .mobile-menu-toggle { visibility:hidden; opacity:0; pointer-events:none; }
  .mobile-menu-backdrop {
    position:fixed; inset:0; z-index:12001; display:block; visibility:hidden; pointer-events:none;
    background:rgba(14,17,25,0); transition:background .28s ease,visibility .28s;
  }
  .mobile-menu-backdrop.open { visibility:visible; pointer-events:auto; background:rgba(14,17,25,.58); }
  .mobile-menu-drawer {
    position:absolute; inset:0 auto 0 0; width:min(88vw,360px); height:100vh; height:100dvh;
    box-sizing:border-box; padding:calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
    display:flex; flex-direction:column; gap:20px; overflow:hidden; background:#fff;
    box-shadow:12px 0 36px rgba(0,0,0,.22); transform:translateX(-102%);
    transition:transform .3s cubic-bezier(.2,.75,.25,1);
  }
  .mobile-menu-backdrop.open .mobile-menu-drawer { transform:translateX(0); }
  .mobile-drawer-header { display:flex; align-items:center; justify-content:space-between; flex:none; }
  .mobile-drawer-header h2 { margin:0; color:#172033; font-size:1.15rem; }
  .mobile-menu-close { width:42px; height:42px; padding:0; border-radius:50%; background:#303744; color:white; font-size:1.8rem; line-height:1; }
  .mobile-account-slot { flex:none; min-height:0; }
  .mobile-account-slot .auth-panel:not(.is-expanded):not(.is-sticky-popover) { display:block; }
  .mobile-account-slot .auth-panel { display:block; width:100%; max-width:none; min-height:0; box-sizing:border-box; padding:16px 14px; }
  .mobile-account-slot .auth-panel-title { text-align:left; margin-bottom:12px; }
  .mobile-account-slot .auth-loading { min-height:48px; }
  .mobile-account-slot .auth-user { flex-wrap:wrap; gap:10px; }
  .mobile-account-slot .auth-user-copy { flex:1 1 120px; }
  .mobile-account-slot .auth-logout { margin-left:auto; }
  .mobile-drawer-nav { flex:none; display:grid; gap:10px; }
  .mobile-drawer-nav button { width:100%; text-align:left; color:#263044; background:#f2f4f8; border:1px solid #e0e5ee; }
  .mobile-drawer-nav button:active { background:#fff0ef; color:#b42318; }
  .mobile-drawer-mascot { flex:1 1 auto; min-height:0; width:100%; display:flex; align-items:flex-end; justify-content:center; overflow:hidden; }
  .mobile-drawer-mascot img { display:block; width:min(72%,240px); height:100%; max-height:280px; object-fit:contain; object-position:center bottom; filter:sepia(.18) saturate(.8) brightness(1.04); opacity:.8; }
  .mobile-drawer-footer { flex:none; margin-top:auto; padding-top:14px; border-top:1px solid #e0e5ee; color:#657087; font-size:.82rem; display:grid; gap:4px; }
  body.mobile-menu-open { overflow:hidden; }
  .site-header { padding-right:56px; }
  .site-header > .auth-panel { display:none; }
  .app-footer { display:none; }
  .player-analysis-panel { display:none !important; }
  #panel-player-stats,
  #panel-player-stats > .card,
  #playerStatsPlaceholder,
  .player-stats-content,
  .player-stats-panel,
  .player-stats-panel > *,
  .player-stats-kpis,
  .player-stats-opponents,
  .player-commander-cards,
  .head-to-head-list,
  .head-to-head-row { width:100%; min-width:0; max-width:100%; }
  .player-stats-panel,
  .player-stats-panel > * { box-sizing:border-box; }
  .player-stats-summary-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .player-stats-seat-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .player-stats-opponents { grid-template-columns:minmax(0,1fr); }
  .player-commander-cards { grid-template-columns:minmax(0,1fr); }
  .player-commander-art { max-width:min(220px,100%); }
  #panel-player-stats .stats-table-wrap { width:100%; min-width:0; max-width:100%; overflow-x:auto; }
  #panel-player-stats .stats-table { min-width:680px; }
  .head-to-head-bar { width:100%; min-width:0; max-width:100%; }
  #panel-top-color,
  #panel-top-color > .card,
  #panel-top-color .color-dashboard,
  #panel-top-color .color-dashboard > *,
  #panel-top-color .color-identity-dashboard,
  #panel-top-color .color-identity-dashboard > *,
  #panel-top-color .color-identity-section,
  #panel-top-color .color-identity-section .stats-table-wrap { min-width:0; max-width:100%; }
  #panel-top-color .color-dashboard,
  #panel-top-color .color-identity-dashboard { width:100%; }
  #panel-top-color .color-identity-section .stats-table-wrap { width:100%; overflow-x:auto; }
  #panel-top-color .color-identity-table { width:100%; min-width:0; table-layout:fixed; }
  #panel-top-color .color-identity-table th,
  #panel-top-color .color-identity-table td { padding:9px 8px; font-size:.8rem; }
  #panel-top-color .color-identity-table th:nth-child(1),
  #panel-top-color .color-identity-table td:nth-child(1) { width:36%; }
  #panel-top-color .color-identity-table th:nth-child(2),
  #panel-top-color .color-identity-table td:nth-child(2),
  #panel-top-color .color-identity-table th:nth-child(3),
  #panel-top-color .color-identity-table td:nth-child(3) { width:18%; }
  #panel-top-color .color-identity-table th:nth-child(4),
  #panel-top-color .color-identity-table td:nth-child(4) { width:28%; }
  #panel-top-color .color-identity-dashboard .hint { overflow-wrap:anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-backdrop, .mobile-menu-drawer { transition:none !important; }
}

    .material-symbol-icon { font-family:'Material Symbols Outlined'; font-size:22px; font-weight:normal; font-style:normal; line-height:1; letter-spacing:normal; text-transform:none; white-space:nowrap; word-wrap:normal; direction:ltr; -webkit-font-smoothing:antialiased; color:var(--accent); }

@media (max-width:760px) { .mobile-drawer-nav button { display:flex; align-items:center; gap:10px; } .mobile-drawer-nav button[hidden] { display:none !important; } .mobile-tab-icon { display:inline-flex; flex:0 0 22px; width:22px; justify-content:center; font-size:20px; color:var(--accent); } }

.player-invite-link-area { margin-top:14px; padding:14px; border:1px solid var(--border,#d9e0ee); border-radius:12px; background:#f7f9fc; overflow-wrap:anywhere; }
.player-invite-link { display:block; font-size:.95rem; line-height:1.5; }
.player-invite-link-area .hint { margin-bottom:0; }

.player-invite-link-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.player-invite-copy { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; padding:0; }
.player-invite-copy .material-symbol-icon { color:#111; }
.player-email-readonly { background:#f1f3f7 !important; color:#6b7280 !important; cursor:not-allowed; }
.player-invitation-status { color:#68758d; font-size:.78rem; line-height:1.35; }
#panel-playgroup-admin .stats-table-wrap { overflow-x:auto; }
.playgroup-player-management { padding-top:10px; }
.playgroup-player-management > .stats-section-title { margin-top:0; }
.playgroup-name-setting-card { margin:18px 0 0; padding-top:10px; }
.playgroup-name-setting-card > .stats-section-title { margin-top:0; }
.playgroup-name-setting-form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:12px; margin-top:12px; }
.playgroup-name-setting-form .field label { margin-bottom:6px; }
.playgroup-name-setting-form button { min-height:43px; }
.playgroup-admin-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:18px; }
.playgroup-setting-card { min-width:0; margin:0; padding-top:10px; }
.playgroup-setting-card > .stats-section-title { margin-top:0; }
.player-access-warning { display:flex; align-items:flex-start; gap:10px; margin:12px 0; padding:11px 13px; border:1px solid #fecdca; border-radius:10px; background:#fff3f2; color:#912018; font-size:.88rem; line-height:1.45; }
.player-access-warning .material-symbol-icon { flex:0 0 auto; color:#b42318; font-size:22px; }
#panel-playgroup-admin #playgroupPlayersBody td { padding:9px 10px; vertical-align:middle; font-size:.82rem; line-height:1.35; }
#panel-playgroup-admin #playgroupPlayersBody td:first-child { width:23%; }
#panel-playgroup-admin #playgroupPlayersBody td:nth-child(2) { width:33%; }
#panel-playgroup-admin #playgroupPlayersBody td:last-child { width:44%; }
#panel-playgroup-admin #playgroupPlayersBody input[data-player-name] { min-height:38px; padding:7px 10px; font-size:.84rem; }
#panel-playgroup-admin #playgroupPlayersBody #playgroupPlayerName { min-height:38px; padding:7px 10px; font-size:.84rem; }
.player-email-cell { display:flex; align-items:center; gap:7px; min-height:38px; }
.player-management-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
#panel-playgroup-admin .player-management-actions .admin-account-action { width:36px; height:36px; padding:0; display:inline-grid; place-items:center; border:1px solid #d1d5db; border-radius:8px; background:#eef0f4; color:#111827; cursor:pointer; }
#panel-playgroup-admin .player-management-actions .admin-account-action .material-symbol-icon { font-size:19px; line-height:1; }
#panel-playgroup-admin .player-management-actions .admin-account-action.save .material-symbol-icon { color:#111827; }
#panel-playgroup-admin .player-management-actions .admin-account-action.delete { color:var(--danger); }
#panel-playgroup-admin .player-management-actions .admin-account-action:hover { background:#e1e4e9; border-color:#b8bec8; }
.player-invitation-info { display:inline-grid; place-items:center; width:30px; height:30px; padding:0; border:1px solid var(--border); border-radius:50%; background:#f3f5f8; color:#56627a; cursor:help; }
.player-invitation-info .material-symbol-icon { color:inherit; font-size:18px; }
@media (max-width:760px) { #panel-entry .game-metadata-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:480px) { #panel-entry .game-metadata-grid { grid-template-columns:1fr; } }
#panel-stats .stats-filter-controls select:disabled { background-color:#eef0f4; color:#68758d; cursor:not-allowed; opacity:1; }
@media (max-width:760px) {
  .game-duration-fields { grid-template-columns:1fr; gap:10px; }
  .playgroup-name-setting-form { grid-template-columns:1fr; }
  .playgroup-admin-settings-grid { grid-template-columns:1fr; }
  #panel-playgroup-admin #playgroupPlayersBody td { padding:8px 7px; font-size:.76rem; }
  #panel-playgroup-admin #playgroupPlayersBody td:first-child { width:30%; }
  #panel-playgroup-admin #playgroupPlayersBody td:nth-child(2) { width:30%; }
  #panel-playgroup-admin #playgroupPlayersBody td:last-child { width:40%; }
  #panel-playgroup-admin .player-management-actions .secondary { padding:7px 9px; font-size:.75rem; }
}

@media (max-width:760px) {
  .site-brand { width:100%; flex:0 0 auto; }
  .site-brand .site-logo { width:min(100%, calc(100vw - 110px)); max-width:calc(100vw - 110px); max-height:82px; }
  .site-brand .intro {
    width:100%; max-width:100%; white-space:normal; overflow-wrap:anywhere;
    line-height:1.3; font-size:13px;
  }
}

@media (max-width:760px) {
  #panel-stats .stats-filter-controls,
  #panel-top-commanders .stats-filter-controls,
  #panel-top-color .stats-filter-controls,
  #panel-player-stats .stats-filter-controls {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
    justify-content:stretch;
    width:100%;
  }
  #panel-stats .stats-filter-controls > .field:first-child,
  #panel-top-commanders .stats-filter-controls > .field:first-child,
  #panel-top-color .stats-filter-controls > .field:first-child,
  #panel-player-stats .stats-filter-controls > .field:first-child {
    grid-column:1 / -1;
  }
  #panel-stats .stats-filter-controls .field,
  #panel-top-commanders .stats-filter-controls .field,
  #panel-top-color .stats-filter-controls .field,
  #panel-player-stats .stats-filter-controls .field {
    width:100%;
    min-width:0;
    max-width:100%;
  }
  #panel-top-commanders .top-commander-controls > .stats-filter-controls,
  #panel-top-color .top-commander-controls > .stats-filter-controls,
  #panel-player-stats .top-commander-controls > .stats-filter-controls {
    flex:1 0 100%;
  }
}

.player-cards-pagination { display:flex; align-items:center; justify-content:center; gap:12px; margin-top:12px; }
.player-cards-pagination[hidden] { display:none; }
.player-stats-cards-panel a.card-hover-preview { color:var(--text); text-decoration:none; font-weight:750; cursor:pointer; }
.player-stats-cards-panel a.card-hover-preview:hover { color:var(--accent); text-decoration:underline; }

/* Theme toggle and persisted dark palette */
.theme-toggle { display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:6px 9px; border:1px solid rgba(255,255,255,.78); border-radius:999px; background:transparent; color:#fff; font:inherit; font-size:.72rem; font-weight:700; white-space:nowrap; cursor:pointer; }
.theme-toggle:hover { background:rgba(255,255,255,.12); }
.theme-toggle:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.theme-toggle .material-symbol-icon { font-size:18px; }
.auth-panel-heading .auth-panel-title { margin-bottom:0; }
.auth-panel-heading .theme-toggle { margin-left:auto; border-color:var(--border); background:#f1f3f8; color:var(--text); }
.auth-panel-heading .theme-toggle:hover { background:#e5e9f1; }
.auth-panel.is-register-overlay .auth-panel-heading .theme-toggle { display:none; }
@media (min-width:761px) and (max-width:1300px) { .theme-toggle { gap:3px; padding:5px 7px; font-size:.66rem; } .theme-toggle .material-symbol-icon { font-size:17px; } }
@media (min-width:761px) and (max-width:1144px) { .sticky-account-actions { display:flex; right:10px; gap:8px; } .sticky-account-actions > :not(.theme-toggle) { display:none !important; } }
:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#171923;
  --surface:#242936;
  --text:#edf1f8;
  --muted:#a7b0c2;
  --border:#41495a;
  --accent:#e34a3e;
  --accent-hover:#f05b4f;
  --soft:#3a282b;
  --success:#59d18e;
  --danger:#ff766c;
}
:root[data-theme="dark"] body { background-color:var(--bg); color:var(--text); }
:root[data-theme="dark"] .background-pattern-row span { color:rgba(255,255,255,.045); -webkit-text-fill-color:rgba(255,255,255,.045); filter:none; }
:root[data-theme="dark"] .tabs { border-bottom-color:#424858; }
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .auth-panel,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .dialog,
:root[data-theme="dark"] .get-started-step,
:root[data-theme="dark"] .admin-card,
:root[data-theme="dark"] .stat-card { background-color:var(--surface); color:var(--text); border-color:var(--border); }
:root[data-theme="dark"] .get-started-step-featured { background:linear-gradient(135deg,#242936 52%,#34282b); border-color:#74403d; }
:root[data-theme="dark"] .get-started-illustration,
:root[data-theme="dark"] .table-wrap,
:root[data-theme="dark"] .filter-panel,
:root[data-theme="dark"] .chart-card,
:root[data-theme="dark"] .chart-container { background-color:#202531; border-color:var(--border); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background-color:#1b202b; color:var(--text); border-color:var(--border); }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color:#a7b0c2; }
:root[data-theme="dark"] table { background:#202531; color:var(--text); }
:root[data-theme="dark"] th { background:#2d3442; color:#e4e9f2; }
:root[data-theme="dark"] th,
:root[data-theme="dark"] td { border-color:var(--border); }
:root[data-theme="dark"] button.secondary,
:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .modal-close,
:root[data-theme="dark"] .auth-panel-close,
:root[data-theme="dark"] .auth-mode-switch,
:root[data-theme="dark"] .auth-mode-button { background-color:#343b4a; color:var(--text); border-color:var(--border); }
:root[data-theme="dark"] .auth-mode-button.active { background:#4a5262; }
:root[data-theme="dark"] .auth-panel-title,
:root[data-theme="dark"] th { color:#d5dceb; }
:root[data-theme="dark"] .status,
:root[data-theme="dark"] .app-toast { background:#2a3140; color:var(--text); border-color:var(--border); }
:root[data-theme="dark"] .status.error,
:root[data-theme="dark"] .app-toast.error { background:#422b30; color:#ffaaa2; }
:root[data-theme="dark"] .status.ok,
:root[data-theme="dark"] .app-toast.success { background:#20392f; color:#8de2b1; }
:root[data-theme="dark"] .backend-note code { background:#343b4a; color:var(--text); }
:root[data-theme="dark"] .device-promo-chart { background-image:repeating-linear-gradient(to bottom,transparent 0 24px,#41495a 25px 26px); }
:root[data-theme="dark"] .auth-panel.is-expanded.is-register-overlay { background:var(--surface); }
:root[data-theme="dark"] .auth-panel-heading .theme-toggle { background:#343b4a; color:var(--text); border-color:var(--border); }
:root[data-theme="dark"] .auth-panel-heading .theme-toggle:hover { background:#41495a; }
:root[data-theme="dark"] .get-started-hero,
:root[data-theme="dark"] .get-started-mobile-callout,
:root[data-theme="dark"] .mobile-menu-drawer,
:root[data-theme="dark"] .mobile-drawer-header,
:root[data-theme="dark"] .mobile-drawer-nav { background-color:var(--surface); color:var(--text); border-color:var(--border); }
:root[data-theme="dark"] .auth-panel input,
:root[data-theme="dark"] .auth-panel select,
:root[data-theme="dark"] .auth-panel textarea { background-color:#1b202b; color:var(--text); }
:root[data-theme="dark"] .footer-inner { border-color:var(--border); color:var(--muted); }

.duration-charts-wrap { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:18px 0 24px; }
.duration-charts-wrap[hidden], .duration-chart-card[hidden] { display:none !important; }
.duration-chart-card { min-width:0; padding:14px 14px 10px; border:1px solid var(--border); border-radius:14px; background:#fbfcff; }
.duration-chart-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:32px; margin-bottom:8px; }
.duration-chart-heading h3 { margin:0; color:var(--text); font-size:1rem; font-weight:750; }
.duration-chart-average { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:#fff0ef; color:var(--accent); font-size:.8rem; font-weight:750; white-space:nowrap; }
.duration-chart-svg { display:block; width:100%; height:auto; overflow:visible; }
.duration-chart-gridline { stroke:#e5e9f1; stroke-width:1; stroke-dasharray:3 4; }
.duration-chart-axis { stroke:#cfd6e3; stroke-width:1; }
.duration-chart-bar { fill:var(--accent); }
.duration-chart-label { fill:var(--muted); font:12px system-ui,-apple-system,"Segoe UI",sans-serif; }
.duration-chart-axis-title { fill:var(--muted); font:12px system-ui,-apple-system,"Segoe UI",sans-serif; }
.monthly-games-panel { border:1px solid var(--border); border-radius:16px; background:#fbfcff; padding:20px; margin:18px 0 24px; }
.last-game-panel { margin-top:0; }
.last-game-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
#lastGameHeading { display:flex; align-items:center; gap:8px; margin:0; }
.last-game-navigation { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.84rem; }
.last-game-navigation:empty { display:none; }
.last-game-navigation button { padding:8px 12px; white-space:nowrap; }
.last-game-seats { display:grid; grid-template-columns:repeat(var(--last-game-seat-count),minmax(0,1fr)); gap:12px; align-items:stretch; }
.last-game-seat-card { min-width:0; padding:12px; border:1px solid var(--border); border-radius:13px; background:#fff; }
.last-game-seat-card.is-winner { border-color:#16834b; background:#effaf3; box-shadow:inset 0 0 0 1px rgba(22,131,75,.12); }
.last-game-seat-card h4 { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 10px; font-size:1rem; }
.last-game-winner-badge { flex:0 0 auto; padding:3px 8px; border-radius:999px; background:#16834b; color:#fff; font-size:.72rem; }
.last-game-seat-art { width:100%; max-width:190px; aspect-ratio:5/7; margin:0 auto 10px; overflow:hidden; border-radius:10px; background:#edf0f6; box-shadow:0 4px 12px rgba(23,32,51,.14); }
.last-game-seat-art img { width:100%; height:100%; display:block; object-fit:cover; }
.last-game-seat-art.image-unavailable { display:flex; align-items:center; justify-content:center; padding:12px; color:var(--muted); text-align:center; font-size:.85rem; }
.last-game-seat-art.image-unavailable img { display:none; }
.last-game-commander-link { display:block; color:var(--text); font-weight:750; line-height:1.35; overflow-wrap:anywhere; text-decoration:none; cursor:pointer; }
.last-game-commander-link:hover { color:var(--text); text-decoration:none; }
.last-game-commander-link:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:3px; }
.last-game-pilot { display:grid; gap:2px; margin:9px 0 0; color:var(--muted); font-size:.78rem; }
.last-game-pilot strong { color:var(--text); font-size:.92rem; overflow-wrap:anywhere; }
.last-game-metadata { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:16px 0 0; }
.last-game-metadata > div { min-width:0; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.last-game-metadata dt { color:var(--muted); font-size:.78rem; }
.last-game-metadata dd { margin:3px 0 0; font-weight:650; overflow-wrap:anywhere; }
.last-game-footer { display:flex; justify-content:flex-end; margin-top:12px; }
.last-game-archive-button { display:inline-flex; align-items:center; gap:5px; }
.last-game-archive-button .material-symbol-icon { color:#fff; font-size:20px; line-height:1; }
#playgroupTopCommanderHeading { display:flex; align-items:center; gap:8px; margin-top:0; }
.playgroup-top-commander-name { white-space:nowrap; overflow-wrap:normal; }
.playgroup-top-commander-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; }
.playgroup-top-commander-heading #playgroupTopCommanderHeading { margin-bottom:0; }
.playgroup-top-commander-selector { flex-shrink:0; margin:0; }
.playgroup-top-commander-footer { display:flex; align-items:center; justify-content:flex-end; gap:9px; margin-top:12px; }
.last-game-footer { align-items:center; gap:9px; }
.tile-copy-button { display:inline-grid; place-items:center; flex:0 0 42px; width:42px; height:42px; padding:0; border-radius:10px; color:var(--text); }
.tile-copy-button .material-symbol-icon { font-size:21px; line-height:1; }
.tile-copy-button:disabled { opacity:.6; cursor:wait; }
.playgroup-top-commander-button { display:inline-flex; align-items:center; gap:5px; }
.playgroup-top-commander-button .material-symbol-icon { color:#fff; font-size:20px; line-height:1; }
.player-analysis-button { display:inline-flex; align-items:center; gap:5px; }
.player-analysis-button .material-symbol-icon { color:#fff; font-size:20px; line-height:1; }
#winningCommanderColorHeading { display:flex; align-items:center; gap:8px; margin-top:0; }
@media(max-width:760px) { .last-game-seats { grid-template-columns:repeat(min(var(--last-game-seat-count),2),minmax(0,1fr)); } }
@media(max-width:600px) { .last-game-section-heading { align-items:flex-start; flex-direction:column; } .last-game-navigation { width:100%; flex-wrap:wrap; } }
@media(max-width:760px) { .playgroup-top-commander-heading { align-items:flex-start; flex-direction:column; } .playgroup-top-commander-selector { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; } .playgroup-top-commander-selector .top-commander-view-button { padding:8px 6px; text-align:center; } }
@media(max-width:460px) { .last-game-seats { grid-template-columns:1fr; } .last-game-metadata { grid-template-columns:1fr; } }
.monthly-games-chart { display:grid; grid-template-columns:repeat(13,minmax(0,1fr)); gap:8px; min-width:0; align-items:end; }
.monthly-games-panel #monthlyGamesChart { overflow-x:auto; }
.monthly-games-column { display:grid; grid-template-rows:20px 132px 32px; gap:6px; text-align:center; min-width:0; }
.monthly-games-count { color:var(--text); font-size:.8rem; font-weight:700; line-height:20px; }
.monthly-games-track { height:132px; display:flex; align-items:flex-end; justify-content:center; background:linear-gradient(to top,rgba(102,112,133,.08) 1px,transparent 1px) 0 0/100% 25%; border-bottom:1px solid var(--border); }
.monthly-games-bar { width:min(70%,28px); min-height:0; border-radius:6px 6px 0 0; background:var(--accent); transition:height .2s ease; }
.monthly-games-label { color:var(--muted); font-size:.72rem; line-height:1.1; }

@media (max-width:760px) { .monthly-games-chart { min-width:500px; } }
@media (max-width:760px) { .duration-charts-wrap { grid-template-columns:1fr; } }

.player-general-stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.player-general-stat { display:flex; min-width:0; min-height:105px; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; padding:14px 16px; border:1px solid var(--border); border-radius:13px; background:#fff; }
.player-general-stat .stat-label { margin:0; font-size:.8rem; }
.player-general-stat > strong { color:var(--text); font-size:1.45rem; line-height:1.15; letter-spacing:-.025em; overflow-wrap:anywhere; }
.player-general-stat > small { color:var(--muted); font-size:.76rem; line-height:1.35; }
.player-last-ten-stat { grid-column:span 2; }
.player-last-games { display:flex; align-items:center; flex-wrap:wrap; gap:7px; min-height:30px; }
.player-last-game { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:#fff; font-size:.67rem; font-weight:800; }
.player-last-game.is-win { background:#13804c; }
.player-last-game.is-loss { background:#b42318; }
.player-rolling-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.player-rolling-chart { min-width:0; padding:15px; border:1px solid var(--border); border-radius:13px; background:#fff; }
.player-rolling-chart-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.player-rolling-chart h4 { margin:0; font-size:.98rem; }
.player-rolling-chart .hint { margin:4px 0 0; }
.player-rolling-chart-heading > strong { flex:0 0 auto; color:var(--accent); font-size:1.25rem; }
.player-rolling-svg-wrap { width:100%; margin-top:10px; }
.player-rolling-svg { display:block; width:100%; height:auto; overflow:visible; }
.player-rolling-gridline { stroke:#e4e9f1; stroke-width:1; stroke-dasharray:4 5; }
.player-rolling-axis-label { fill:var(--muted); font:12px Inter,ui-sans-serif,system-ui,sans-serif; }
.player-rolling-line { fill:none; stroke:var(--accent); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.player-rolling-dot { fill:#fff; stroke:var(--accent); stroke-width:2; }
.player-rolling-chart-empty { display:grid; place-items:center; min-height:215px; margin-top:10px; padding:16px; border-radius:9px; background:#f8f9fc; color:var(--muted); text-align:center; font-size:.86rem; }
@media(max-width:900px) {
  .player-general-stats-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:760px) {
  .player-general-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .player-rolling-chart-grid { grid-template-columns:1fr; }
}
@media(max-width:420px) {
  .player-general-stat { min-height:92px; padding:12px; }
  .player-general-stat > strong { font-size:1.25rem; }
  .player-last-ten-stat { grid-column:span 2; }
}

/* Public welcome page shown before account registration. */
.get-started-panel { color:var(--text); }
.get-started-hero { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(280px,.88fr); align-items:center; gap:26px; overflow:hidden; padding:clamp(24px,4vw,48px); margin-bottom:32px; border:1px solid #e4d9d7; border-radius:22px; background:linear-gradient(125deg,#fff 0%,#fff 58%,#fff3f1 100%); box-shadow:0 10px 30px rgba(21,34,66,.08); }
.get-started-hero-copy { max-width:590px; }
.get-started-eyebrow { margin:0 0 8px; color:var(--accent); font-size:.78rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.get-started-hero h1 { margin:0 0 12px; font-size:clamp(2rem,4vw,3rem); line-height:1.08; letter-spacing:-.035em; }
.get-started-title-logo { display:block; width:min(100%, 380px); height:auto; margin-top:4px; }
.get-started-hero-copy > p:not(.get-started-eyebrow) { max-width:560px; margin:0; color:var(--muted); font-size:1.04rem; }
.get-started-cta { display:inline-flex; align-items:center; gap:10px; margin-top:22px; padding:13px 18px; }
.get-started-cta .material-symbol-icon { font-size:20px; }
.get-started-device-promo { position:relative; min-height:245px; }
.device-promo-phone { position:absolute; z-index:2; left:8%; top:7px; width:132px; height:230px; padding:9px; border:5px solid #202a3d; border-radius:25px; background:#202a3d; box-shadow:0 12px 26px rgba(25,35,70,.2); transform:rotate(-7deg); }
.device-promo-screen { position:relative; display:flex; height:100%; flex-direction:column; align-items:flex-start; gap:8px; overflow:hidden; padding:14px 10px; border-radius:14px; background:#fff; color:var(--text); font-size:.72rem; }
.device-promo-logo { display:grid; place-items:center; width:29px; height:29px; margin-bottom:7px; border-radius:9px; background:var(--accent); color:#fff; font-weight:900; font-size:1rem; }
.device-promo-screen > span:not(.device-promo-logo):not(.device-promo-check) { color:var(--muted); }
.device-promo-lines { display:grid; gap:8px; width:100%; margin-top:11px; }
.device-promo-lines i { display:block; height:22px; border:1px solid var(--border); border-radius:6px; background:#f8f9fc; }
.device-promo-check { align-self:flex-end; margin-top:auto; color:var(--success); font-size:25px; }
.device-promo-tablet { position:absolute; right:0; top:34px; width:76%; height:190px; padding:8px; border:5px solid #263044; border-radius:17px; background:#263044; box-shadow:0 14px 30px rgba(25,35,70,.18); transform:rotate(4deg); }
.device-promo-tablet .device-promo-screen { gap:6px; padding:12px 15px; border-radius:9px; font-size:.75rem; }
.device-promo-chart { display:flex; flex:1; align-items:flex-end; justify-content:space-around; width:100%; padding:12px 9px 0; border-bottom:1px solid var(--border); background:repeating-linear-gradient(to bottom,transparent 0 24px,#edf0f6 25px 26px); }
.device-promo-chart i { width:8%; border-radius:5px 5px 0 0; background:var(--accent); }
.device-promo-chart i:nth-child(1) { height:30%; }.device-promo-chart i:nth-child(2) { height:52%; }.device-promo-chart i:nth-child(3) { height:40%; }.device-promo-chart i:nth-child(4) { height:76%; }.device-promo-chart i:nth-child(5) { height:61%; }.device-promo-chart i:nth-child(6) { height:88%; }.device-promo-chart i:nth-child(7) { height:69%; }
.device-promo-chart-label { font-size:.67rem; }
.get-started-section-heading { margin:0 0 16px; text-align:center; }
.get-started-section-heading h2 { margin:0; font-size:clamp(1.45rem,2.5vw,2rem); }
.get-started-steps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.get-started-step { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(140px,.95fr); align-items:center; gap:12px; min-height:210px; padding:20px; border:1px solid var(--border); border-radius:17px; background:#fff; box-shadow:0 5px 18px rgba(21,34,66,.045); }
.get-started-step-featured { border-color:#f1b8b1; background:linear-gradient(135deg,#fff 52%,#fff5f3); }
.get-started-step-copy { align-self:start; }
.get-started-step-number { color:var(--accent); font-size:.78rem; font-weight:850; letter-spacing:.12em; }
.get-started-step h3 { margin:5px 0 8px; font-size:1.12rem; line-height:1.25; }
.get-started-step p { margin:0; color:var(--muted); font-size:.91rem; }
.get-started-illustration { display:grid; place-items:center; min-width:0; min-height:150px; border-radius:13px; background:#f8f9fc; }
.get-started-illustration svg { display:block; width:min(100%,250px); height:auto; }
.get-started-step-note { display:inline-flex; align-items:center; gap:6px; margin-top:12px; padding:6px 9px; border-radius:999px; background:#fff0ed; color:var(--accent); font-size:.77rem; font-weight:750; }
.get-started-step-note .material-symbol-icon { font-size:17px; }
.get-started-mobile-callout { display:flex; align-items:center; gap:16px; margin-top:18px; padding:20px 22px; border:1px solid #f1c3be; border-radius:16px; background:#fff2f0; }
.get-started-mobile-callout > .material-symbol-icon { flex:0 0 auto; color:var(--accent); font-size:30px; }
.get-started-mobile-callout h2 { margin:0 0 3px; font-size:1.05rem; }
.get-started-mobile-callout p { margin:0; color:var(--muted); font-size:.88rem; }
.get-started-mobile-callout button { flex:0 0 auto; margin-left:auto; }
@media(max-width:850px) {
  .get-started-hero { grid-template-columns:1fr; }
  .get-started-device-promo { width:min(100%,410px); justify-self:center; }
  .get-started-steps { grid-template-columns:1fr; }
  .get-started-step { min-height:190px; }
}
@media(max-width:560px) {
  .get-started-hero { gap:12px; padding:22px 18px; }
  .get-started-hero-copy > p:not(.get-started-eyebrow) { font-size:.95rem; }
  .get-started-device-promo { min-height:210px; transform:scale(.88); transform-origin:top center; margin-bottom:-24px; }
  .get-started-step { grid-template-columns:1fr; gap:14px; padding:17px; }
  .get-started-illustration { min-height:120px; }
  .get-started-illustration svg { max-width:220px; }
  .get-started-mobile-callout { align-items:flex-start; flex-wrap:wrap; padding:17px; }
  .get-started-mobile-callout > div { flex:1; min-width:190px; }
  .get-started-mobile-callout button { width:100%; margin:0; }
}

.deck-editor-title { flex-wrap:wrap; }
.deck-editor-share-button { color:var(--accent); }
.shared-deck-mode .mobile-menu-toggle,
.shared-deck-mode .mobile-menu-backdrop,
.shared-deck-mode .app-footer { display:none !important; }
.shared-deck-mode .tabs { display:flex !important; height:56px; min-height:56px; padding:0; }
.shared-deck-mode .tab-items { display:none !important; }
.shared-deck-mode .wrap { width:100%; max-width:none; min-height:calc(100vh - 56px); padding:32px clamp(12px,3.7vw,76px) 48px; }
.shared-deck-mode .wrap > :not(#sharedDeckView) { display:none !important; }
.shared-deck-view { position:relative; z-index:1; }
.shared-deck-card { min-height:calc(100vh - 88px); padding:20px 24px 36px; border:1px solid var(--border); border-radius:18px; background:var(--surface); box-shadow:0 18px 45px rgba(20,28,48,.14); }
.shared-deck-combo-analysis { margin-top:24px; }
.shared-deck-mana-analysis { margin-top:24px; }
.shared-deck-mana-analysis h2 { margin:0 0 12px; font-size:1.15rem; }
.shared-deck-mana-analysis .deck-mana-layout { height:490px; }
.shared-deck-mana-analysis .deck-mana-card-list { max-height:100%; }
.shared-deck-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:8px; }
.shared-deck-title { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.shared-deck-title h1 { flex:0 1 auto; margin:0; color:var(--text); font-size:clamp(1.15rem,1.7vw,1.55rem); line-height:1.35; }
.shared-deck-title .deck-editor-summary { flex-basis:100%; margin:0 0 2px; }
.shared-deck-toolbar .deck-editor-view-selector { flex:0 0 auto; }
.shared-deck-columns { grid-template-columns:repeat(8,minmax(0,1fr)); gap:10px; }
.shared-deck-columns.is-list-view { align-items:stretch; }
.shared-deck-list-row { grid-template-columns:30px minmax(0,1fr) 48px; padding:0 2px; }
.shared-deck-list-row .deck-editor-list-name { cursor:default; }
.shared-deck-visual-card { cursor:default; }
.shared-deck-visual-card:hover { cursor:default; }
@media(max-width:1100px) { .shared-deck-columns { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1000px) { .shared-deck-mana-analysis .deck-mana-layout { height:620px; } }
@media(max-width:720px) { .shared-deck-mode .wrap { padding:12px; } .shared-deck-card { padding:16px 12px 24px; } .shared-deck-toolbar { flex-direction:column; } .shared-deck-toolbar .deck-editor-view-selector { width:100%; } .shared-deck-columns { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .shared-deck-combo-analysis { padding:14px; } .shared-deck-mana-analysis .deck-mana-layout { height:840px; } }

