:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#e6ede8;background:#111715;color-scheme:dark;font-synthesis:none;--ink:#e6ede8;--muted:#a2b2a8;--line:#34423b;--lime:#c9f27a;--orange:#f29d60;--panel:#1b2420;--green:#b5de88}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ef9e56;outline-offset:4px}[hidden]{display:none!important}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(2rem,4vw,3.25rem);letter-spacing:-.06em;line-height:1.08;margin-bottom:16px}h2{font-size:1.3rem;letter-spacing:-.03em}h3{font-size:1rem}p{line-height:1.65}.muted{color:var(--muted)}.eyebrow{font-size:.7rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--green);margin-bottom:14px}.topbar{height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 5%;background:#fff;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:.86rem;letter-spacing:.045em;line-height:1.3}.brand strong{font-weight:850}.brand small{display:block;font-size:.58rem;letter-spacing:.2em;color:var(--muted);margin-top:3px}.header-right{display:flex;align-items:center;gap:20px;font-size:.8rem}.edition{font-size:.63rem;font-weight:750;letter-spacing:.13em;color:var(--muted)}.connection{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:.72rem}.connection:before{content:"";width:7px;height:7px;border-radius:50%;background:#a6aca6}.connection.online:before{background:#59aa70;box-shadow:0 0 0 4px #59aa7015}.connection.offline:before{background:#d48b30}.button{border:0;background:var(--ink);color:white;padding:13px 20px;border-radius:10px;font-size:.88rem;font-weight:700;display:inline-flex;justify-content:center;align-items:center;gap:8px;text-decoration:none;transition:background .15s,transform .15s}.button:hover:not(:disabled){background:#28594f;transform:translateY(-1px)}.button.lime{background:var(--lime);color:var(--ink)}.button.lime:hover{background:#b6e765}.button.ghost{background:transparent;border:1px solid var(--line);color:var(--ink)}.button.small{padding:9px 13px;font-size:.75rem}.button.wide{width:100%}.pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:6px;background:#edf3e8;color:#47704e;font-size:.66rem;font-weight:750;letter-spacing:.03em}.pill.orange{background:#fff0df;color:#986019}.pill.dark{background:#ffffff15;color:#d3e1d2}.site-footer{display:flex;justify-content:space-between;gap:16px;padding:25px 5%;border-top:1px solid var(--line);font-size:.65rem;color:var(--muted)}.loading-screen{min-height:70vh;display:grid;place-content:center;text-align:center;gap:15px}.loader{border:3px solid var(--line);border-top-color:var(--green);border-radius:50%;width:30px;height:30px;animation:spin 1s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}.skip-link{position:absolute;top:-100px;left:10px;z-index:10;padding:10px;background:white}.skip-link:focus{top:10px}
.welcome{max-width:460px;margin:40px auto;padding:0 18px;min-height:calc(100vh - 240px)}.welcome h1{font-size:1.65rem;letter-spacing:-.03em}.welcome p{font-size:.85rem}
.auth-panel{background:white;border:1px solid var(--line);border-radius:20px;padding:35px;box-shadow:0 20px 50px #203a3706}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#f1f3ed;border-radius:10px;padding:5px;gap:4px;margin:25px 0}.auth-tabs button{border:0;background:transparent;color:var(--muted);padding:12px 5px;border-radius:7px;font-size:.85rem;font-weight:700}.auth-tabs button[aria-selected=true]{background:white;color:var(--ink);box-shadow:0 2px 6px #00000008}label{display:block;font-size:.8rem;font-weight:650;margin-bottom:9px}input,select{background:#fafbf7;border:1px solid #dce3d8;border-radius:9px;padding:13px 14px;width:100%;color:var(--ink);min-height:44px}input::placeholder{color:#9aaba1}.field{margin-bottom:20px}.field small{display:block;color:var(--muted);font-size:.68rem;line-height:1.5;margin-top:7px}.auth-note{font-size:.7rem;text-align:center;color:var(--muted);margin:16px 0 0}.notice{border:1px solid #eadac0;background:#fff7e9;border-radius:10px;padding:14px;font-size:.8rem;line-height:1.6;margin-bottom:20px}.form-error{color:#a83b37;font-size:.8rem;line-height:1.5;margin:10px 0}.divider{display:flex;align-items:center;gap:15px;color:#97a299;font-size:.65rem;margin:22px 0}.divider:before,.divider:after{content:"";height:1px;background:var(--line);flex:1}
.workspace{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:calc(100vh - 154px);max-width:1600px;margin:auto}.sidebar{background:#142d2b;color:#d3ded6;padding:30px 18px;display:flex;flex-direction:column;gap:25px}.sidebar-title{padding:0 14px}.sidebar-title .eyebrow{color:#91a99a;font-size:.6rem}.sidebar-title h2{font-size:1.1rem;color:white;line-height:1.35;overflow-wrap:anywhere}.sidebar nav{display:flex;flex-direction:column;gap:6px}.nav-tab{border:0;background:transparent;color:#aabeb1;display:flex;align-items:center;gap:12px;padding:14px;border-radius:9px;font-size:.85rem;text-align:left}.nav-tab svg{width:19px;height:19px;stroke-width:1.6}.nav-tab[aria-selected=true]{background:var(--lime);color:#142d2b;font-weight:750}.nav-tab:disabled{opacity:.36}.sidebar-bottom{margin-top:auto;background:#ffffff06;border:1px solid #ffffff10;border-radius:12px;padding:16px;font-size:.72rem;line-height:1.7;color:#aabeb1}.sidebar-bottom strong{display:block;color:white;margin-bottom:5px}.main-panel{padding:38px clamp(20px,4vw,56px);min-width:0}.page-title{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:28px}.page-title h1{font-size:2.35rem}.page-title p{font-size:.86rem;margin-bottom:0;color:var(--muted)}.page-title .actions{display:flex;gap:8px;flex-wrap:wrap}.card{background:white;border:1px solid var(--line);border-radius:15px;padding:24px}.card-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}.card-heading h2{margin:0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:25px 0}.stat{background:white;border:1px solid var(--line);border-radius:12px;padding:20px}.stat small{display:block;color:var(--muted);font-size:.68rem;margin-bottom:9px}.stat strong{font-size:1.75rem;letter-spacing:-.05em}.stat span{font-size:.7rem;color:var(--muted);margin-left:7px}.two-col{display:grid;grid-template-columns:1.5fr 1fr;gap:22px}.player-list{list-style:none;margin:0;padding:0}.player-row{display:flex;align-items:center;gap:13px;padding:14px 0;border-bottom:1px solid #edf0e9}.player-row:last-child{border:0}.player-row .name{flex:1;font-weight:650;font-size:.88rem}.avatar{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;background:#e8efdf;color:#58713e;font-size:.8rem;font-weight:800;flex-shrink:0}.avatar.alt{background:#f6e8d9;color:#977046}.player-index{color:#9aa69c;font-size:.72rem}.rule-list{padding-left:18px;color:var(--muted);font-size:.83rem;line-height:1.9}.waiting{background:#f2f6ed;border:1px dashed #d3dfc7;padding:18px;border-radius:10px;font-size:.82rem;color:#5c7255;line-height:1.6;margin-top:22px}.create-page{max-width:850px;margin:55px auto;padding:0 25px;min-height:70vh}.create-card{max-width:560px;margin:30px 0}.saved-leagues{display:grid;gap:12px;margin-top:25px}.saved-league{padding:18px;display:flex;justify-content:space-between;text-decoration:none;border:1px solid var(--line);border-radius:10px;background:white;gap:15px}.saved-league span{font-size:.8rem;color:var(--muted)}
.turn-banner{background:var(--ink);color:white;border-radius:15px;padding:24px 28px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.turn-banner.yours{background:#d9efb8;color:var(--ink)}.turn-banner small{display:block;letter-spacing:.12em;font-size:.62rem;text-transform:uppercase;opacity:.7;margin-bottom:8px}.turn-banner strong{font-size:1.4rem;letter-spacing:-.03em}.turn-banner p{font-size:.8rem;margin:7px 0 0;opacity:.75}.turn-order{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 14px;margin-bottom:8px}.turn-person{display:flex;align-items:center;gap:8px;padding:9px 13px;border-radius:8px;background:#e8ece3;white-space:nowrap;font-size:.74rem}.turn-person.active{background:var(--ink);color:white}.turn-person.done{opacity:.5}.turn-person b{opacity:.6;font-size:.65rem}.pokemon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:15px}.pokemon-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px;position:relative;min-width:0;text-align:left;color:var(--ink);transition:transform .18s,box-shadow .18s,border .18s}.pokemon-card:not(:disabled):hover{transform:translateY(-4px);border-color:#9ac362;box-shadow:0 10px 25px #23442c0d}.pokemon-card:disabled{opacity:1;cursor:default}.pokemon-number{font-size:.61rem;color:#96a08e;letter-spacing:.08em}.pokemon-art{height:120px;display:grid;place-items:center;background:radial-gradient(ellipse,#ecf4e6,transparent 68%);margin:4px 0}.pokemon-art img{width:108px;height:108px;object-fit:contain;image-rendering:pixelated;transition:transform .18s}.pokemon-card:hover img{transform:scale(1.06)}.pokemon-name{display:block;font-size:.88rem;font-weight:750;overflow-wrap:anywhere;min-height:35px}.pokemon-type{display:inline-flex;gap:5px;margin-top:8px;font-size:.6rem;color:#728064}.pokemon-type span{background:#eef2e7;border-radius:4px;padding:4px 7px}.pick-hint{display:block;font-size:.68rem;font-weight:700;color:var(--green);margin-top:14px;border-top:1px solid #edf1e7;padding-top:11px}.draft-layout{display:grid;grid-template-columns:minmax(0,1fr) 225px;gap:22px}.roster-sidebar h2{font-size:.95rem}.roster-mini{display:flex;align-items:center;gap:8px;font-size:.74rem;padding:6px 0;border-bottom:1px solid #eff1eb}.roster-mini img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}.roster-empty{border:1px dashed var(--line);padding:22px 10px;text-align:center;border-radius:9px;color:var(--muted);font-size:.78rem;line-height:1.6}.roster-block{margin-bottom:25px}.roster-block .pokemon-grid{grid-template-columns:repeat(auto-fill,minmax(135px,1fr))}.roster-block .pokemon-art{height:80px}.roster-block .pokemon-art img{width:80px;height:80px}.progress{height:5px;background:#dfe9d4;border-radius:4px;overflow:hidden;margin-top:15px}.progress span{display:block;background:#638b39;height:100%}.empty-state{padding:50px 25px;text-align:center;background:white;border:1px dashed #d4dec9;border-radius:15px;color:var(--muted)}.empty-state h2{color:var(--ink)}.empty-state .empty-icon{font-size:2rem;margin-bottom:15px}
.table-card{padding:0;overflow:hidden}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-size:.62rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700;background:#f8faf5;padding:17px 20px;border-bottom:1px solid var(--line)}td{padding:18px 20px;border-bottom:1px solid #eef1e8;font-size:.88rem}tr:last-child td{border:0}.playoff-qualified td:first-child{border-left:3px solid #a3ca6a}.rank{font-weight:750;color:#859481}.playoff-qualified .rank{color:var(--green)}.table-player{display:flex;align-items:center;gap:12px}.table-player strong{font-size:.86rem}.me-tag{font-size:.55rem;color:#76856b;margin-left:8px}.positive{color:#2c7e57;font-weight:750}.negative{color:#b36c55}.table-note{padding:18px 22px;font-size:.7rem;color:var(--muted);border-top:1px solid var(--line);line-height:1.8}.qualify-dot{display:inline-block;width:8px;height:8px;background:#a3ca6a;border-radius:3px;margin-right:7px}.fixtures-toolbar{display:flex;gap:15px;align-items:center;justify-content:space-between;margin-bottom:25px}.fixtures-toolbar select{max-width:200px}.fixtures-toolbar label{margin:0;display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.75rem}.round-heading{display:flex;justify-content:space-between;align-items:center;margin:25px 0 12px}.round-heading h2{font-size:1rem;margin:0}.round-heading span{font-size:.68rem;color:var(--muted)}.match{background:white;border:1px solid var(--line);border-radius:12px;padding:17px 20px;margin-bottom:10px}.match.postponed{border-color:#e8d4af;background:#fffcf4}.match-top{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:20px;align-items:center}.match-player{font-size:.85rem;font-weight:650;overflow-wrap:anywhere;display:flex;align-items:center;gap:10px}.match-player:last-child{justify-content:flex-end;text-align:right}.match-score{background:#f1f4eb;border-radius:7px;padding:9px 13px;font-weight:750;font-size:.88rem;min-width:65px;text-align:center}.match-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;border-top:1px solid #edf0e5;padding-top:14px;margin-top:14px}.match-controls label{font-size:.68rem;margin:0;color:var(--muted)}.match-controls select{width:105px;padding:8px;min-height:36px;font-size:.75rem}.match-controls .button{min-height:36px}.match-status{margin-top:12px;text-align:center}.bye{font-size:.74rem;color:var(--muted);padding:5px 0 15px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:20;padding:16px 24px;background:#173b35;color:white;border-radius:12px;box-shadow:0 8px 35px #0003;max-width:min(90vw,560px);font-size:.85rem;line-height:1.5}.toast.error{background:#8c433d}.connection-notice{padding:10px 20px;text-align:center;font-size:.75rem;background:#e8f2d9;color:#4e6a36}.connection-notice a{margin-left:10px;font-weight:750}.invite-fallback{width:100%;margin-top:12px;font-size:.72rem}
@media(min-width:1450px){.pokemon-grid{grid-template-columns:repeat(auto-fill,minmax(175px,1fr))}}
@media(max-width:1050px){.workspace{grid-template-columns:190px minmax(0,1fr)}.main-panel{padding:30px 25px}.draft-layout{grid-template-columns:1fr}.roster-sidebar{display:none}.welcome{gap:30px}.two-col{grid-template-columns:1fr}.edition{display:none}.page-title h1{font-size:2rem}.pokemon-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}}
@media(max-width:700px){.topbar{height:74px;padding:0 18px}.header-right{gap:10px}.header-right #identity{display:none}.connection{font-size:.63rem}.brand{font-size:.74rem;gap:8px}.brand img{width:31px;height:31px}.welcome{grid-template-columns:1fr;padding:35px 22px;gap:30px}.welcome h1{font-size:3.2rem}.welcome-copy>p{font-size:.9rem}.hero-scene{display:none}.auth-panel{padding:25px}.workspace{display:block}.sidebar{padding:12px 14px;gap:0}.sidebar-title,.sidebar-bottom{display:none}.sidebar nav{flex-direction:row;justify-content:space-between;gap:3px;overflow-x:auto}.nav-tab{flex-direction:column;font-size:.6rem;padding:10px 12px;gap:6px;min-width:55px}.nav-tab svg{width:18px;height:18px}.main-panel{padding:25px 18px}.page-title{flex-direction:column;gap:15px;margin-bottom:22px}.page-title h1{font-size:2rem}.page-title .actions{width:100%}.stats{gap:8px;margin:20px 0}.stat{padding:14px 12px}.stat strong{font-size:1.5rem}.stat small{font-size:.61rem}.stat span{display:block;margin:5px 0 0;font-size:.6rem}.card{padding:19px}.table-card{padding:0}.turn-banner{padding:20px}.turn-banner strong{font-size:1.2rem}.pokemon-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pokemon-card{padding:12px}.pokemon-name{font-size:.78rem}.pokemon-art{height:100px}.pokemon-art img{height:95px;width:95px}.roster-block .pokemon-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fixtures-toolbar{flex-wrap:wrap;align-items:flex-start}.match{padding:14px}.match-top{gap:10px}.match-player{font-size:.73rem;gap:6px}.match-player .avatar{display:none}.match-score{font-size:.78rem;padding:8px;min-width:55px}.match-controls{gap:6px}.site-footer{flex-direction:column;gap:8px;padding:22px}.table-wrap td,.table-wrap th{padding:14px}.table-player .avatar{width:27px;height:27px;border-radius:8px}.toast{bottom:15px}.create-page{margin-top:35px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.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}

/* Compact, everyday league interface. */
.topbar{height:68px}.auth-panel{padding:26px;border-radius:12px;box-shadow:none}.page-title h1,.create-page h1{font-size:1.8rem;letter-spacing:-.035em}.main-panel{padding-top:28px}.sidebar{padding-top:24px}.card,.turn-banner{border-radius:10px}.stats{margin:18px 0}.stat{padding:14px}.stat strong{font-size:1.4rem}.create-page{margin-top:32px}.welcome .auth-note{font-size:.73rem}.welcome .auth-tabs{margin:20px 0}@media(max-width:700px){.welcome{margin:24px auto;padding:0 16px}.welcome h1{font-size:1.6rem}.auth-panel{padding:22px}.page-title h1{font-size:1.6rem}}
/* Dark theme for all league screens and native form controls. */
.topbar,.sidebar{background:#161e1a}
.auth-panel,.card,.stat,.saved-league,.pokemon-card,.empty-state,.match,.skip-link{background:var(--panel);color:var(--ink)}
.auth-tabs,input,select,th{background:#141c18}
input,select{border-color:var(--line);accent-color:var(--lime)}
input::placeholder{color:#93a498}
input:autofill{box-shadow:0 0 0 1000px #202d25 inset;color:var(--ink)}
.auth-tabs button[aria-selected=true]{background:#304035;color:var(--ink);box-shadow:none}
.button,.button.lime{background:var(--lime);color:#172313}
.button:hover:not(:disabled),.button.lime:hover{background:#b6e765;color:#172313}
.button.ghost{background:transparent;color:var(--ink);border-color:var(--line)}
.button.ghost:hover:not(:disabled){background:#2b3b30;color:var(--ink)}
.pill,.pokemon-type span,.avatar{background:#2b3d2b;color:#c4e6ad}
.pill.dark{background:#ffffff0d;color:#c4d4c8}
.pill.orange,.avatar.alt{background:#443423;color:#f1c083}
.sidebar-title h2,.sidebar-bottom strong{color:var(--ink)}
.nav-tab{color:#b4c5ba}
.nav-tab[aria-selected=true]{color:#172313}
.player-row,.roster-mini,.pick-hint,td,.match-controls{border-color:var(--line)}
.waiting,.connection-notice{background:#202e24;color:#b9d4ad;border-color:#42593d}
.notice,.match.postponed{background:#2e271d;border-color:#6c5536;color:#edd7b3}
.form-error{color:#ffaaa3}
.turn-banner{background:#24342b;color:var(--ink)}
.turn-banner.yours{background:#30472c;color:#e2f1d6;box-shadow:inset 3px 0 var(--lime)}
.turn-person,.match-score{background:#29362e;color:var(--ink)}
.turn-person.active{background:var(--lime);color:#172313}
.pokemon-art{background:radial-gradient(ellipse,#31452e,transparent 70%)}
.pokemon-number,.pokemon-type,.rank,.me-tag,.player-index{color:var(--muted)}
.pokemon-card:not(:disabled):hover{border-color:var(--lime);box-shadow:0 8px 24px #0003}
.progress{background:#354431}.progress span{background:#aed87d}
.empty-state{border-color:var(--line)}
.playoff-qualified{background:#213023}
.positive{color:#8edba8}.negative{color:#f2a08c}
.toast{background:#2c4938;color:#edf5ec;border:1px solid #52725c}
.toast.error{background:#632e2a;border-color:#a65d55}
::selection{background:#526f3e;color:#fff}
/* ── Transfer modal ── */
.modal-backdrop{position:fixed;inset:0;z-index:50;background:#000a;display:grid;place-items:center;padding:18px;animation:fadeIn .2s}
.modal{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:28px;max-width:640px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px #0005;animation:slideUp .25s}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.modal-header h2{margin:0;font-size:1.2rem}
.modal-close{background:transparent;border:0;color:var(--muted);font-size:1.1rem;padding:6px 10px;border-radius:6px}.modal-close:hover{background:#ffffff10;color:var(--ink)}
.transfer-form-grid{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:start}
.transfer-form-col{display:flex;flex-direction:column;gap:4px}
.transfer-form-swap{display:flex;align-items:center;justify-content:center;font-size:1.5rem;color:var(--lime);margin-top:36px;font-weight:800}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:22px}
.transfer-roster{display:flex;flex-direction:column;gap:4px;margin-top:12px;max-height:300px;overflow-y:auto;padding-right:4px}
.transfer-pick{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;cursor:pointer;border:1px solid transparent;transition:background .15s,border-color .15s;font-size:.8rem;font-weight:600;margin:0}
.transfer-pick:hover{background:#ffffff08}
.transfer-pick:has(input:checked){background:#2a3e25;border-color:var(--lime)}
.transfer-pick input[type=checkbox]{width:16px;height:16px;min-height:16px;accent-color:var(--lime);flex-shrink:0;cursor:pointer}
.transfer-pick img{width:32px;height:32px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.transfer-pick span{overflow-wrap:anywhere}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
/* ── Transfer history ── */
.transfer-history{margin-top:28px}
.transfer-list{display:flex;flex-direction:column;gap:12px}
.transfer-entry{background:#1a2722;border:1px solid var(--line);border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:10px}
.transfer-detail{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:center}
.transfer-side{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:110px}
.transfer-player{font-weight:750;font-size:.82rem}
.transfer-arrow{font-size:.65rem;color:var(--muted);text-transform:uppercase;letter-spacing:.1em}
.transfer-pokemon{display:flex;align-items:center;gap:7px;font-size:.82rem;font-weight:600}
.transfer-pokemon img{width:36px;height:36px;object-fit:contain;image-rendering:pixelated}
.transfer-pokemon-list{display:flex;flex-direction:column;gap:4px;align-items:center}
.transfer-swap-icon{font-size:1.6rem;color:var(--lime);font-weight:800}
.transfer-entry small{text-align:center;font-size:.68rem}
@media(max-width:700px){.transfer-form-grid{grid-template-columns:1fr;gap:16px}.transfer-form-swap{margin:0;font-size:1.3rem}.modal{padding:22px;border-radius:12px}.transfer-detail{flex-direction:column;gap:8px}.transfer-swap-icon{font-size:1.2rem}}


.reroll-controls{margin-bottom:24px}.reroll-controls p{font-size:.82rem}.market-admin{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.market-admin label{margin:0;min-width:150px}.market-admin select{margin-top:8px}.reroll-button{width:100%;margin-top:6px}.roster-block .pokemon-card{width:100%}.reroll-dialog{width:min(680px,calc(100vw - 28px));max-height:90dvh;overflow:auto;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:24px}.reroll-dialog::backdrop{background:#000b}.reroll-dialog p{font-size:.82rem}.reroll-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}.reroll-options [aria-pressed=true]{border-color:var(--lime);box-shadow:0 0 0 2px var(--lime)}.reroll-options button:disabled{opacity:.4;cursor:not-allowed}@media(max-width:480px){.reroll-dialog{padding:16px}.reroll-options{gap:6px}.reroll-options .pokemon-card{padding:8px}.reroll-options .pokemon-art img{width:72px;height:72px}.reroll-options .pokemon-art{height:80px}.reroll-options .pokemon-name{font-size:.75rem}}

.late-entry-controls { margin-bottom: 24px; }
.late-entry-controls .field { margin-top: 18px; }
.late-entry-controls input { width: 100%; min-width: 0; }

.draft-history { margin: 0 0 28px; }
.draft-history .card-heading { gap: 16px; align-items: center; flex-wrap: wrap; }
.draft-history-filter { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .8rem; }
.draft-history-filter select { width: auto; min-width: 116px; }
.draft-history > p { font-size: .8rem; line-height: 1.6; }
.draft-history-list { list-style: none; padding: 0; margin: 14px 0 0; }
.draft-history-row { display: grid; grid-template-columns: 32px minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.draft-history-position { color: var(--lime); font-weight: 750; }
.draft-history-player { font-weight: 650; overflow-wrap: anywhere; }
.draft-history-pokemon { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .85rem; overflow-wrap: anywhere; }
.draft-history-pokemon img { flex-shrink: 0; image-rendering: pixelated; }
@media(max-width:480px) {
  .draft-history-row { grid-template-columns: 26px minmax(0,1fr); gap: 3px 8px; }
  .draft-history-pokemon { grid-column: 2; }
  .draft-history-filter { flex-wrap: wrap; }
}

.trade-market { margin-bottom: 24px; }
.trade-market p, .p2p-dialog p { font-size: .82rem; line-height: 1.6; }
.propose-trade { margin-bottom: 16px; }
.p2p-dialog { width: min(760px,calc(100vw - 28px)); max-height: 90dvh; overflow: auto; padding: 24px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
.p2p-dialog::backdrop { background: #000b; }
.p2p-dialog .card-heading { align-items: start; gap: 16px; }
.p2p-dialog h3 { font-size: .95rem; }
.p2p-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.trade-offer-side { min-width: 0; }
.trade-offer-side .field { margin-top: 16px; }
.trade-inbox-offer { padding: 16px 0; border-bottom: 1px solid var(--line); }
.trade-assets { display: flex; flex-direction: column; gap: 6px; align-items: start; }
.trade-asset { display: flex; align-items: center; gap: 6px; font-size: .82rem; overflow-wrap: anywhere; }
.trade-asset img { image-rendering: pixelated; flex-shrink: 0; }
.trade-offer-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.trade-confirm { background: #f2be68; color: #1b2118; }
@media(max-width:540px) { .p2p-dialog { padding: 16px; } .p2p-columns { grid-template-columns: 1fr; gap: 14px; } .p2p-dialog .auth-tabs button { font-size: .75rem; padding: 10px 5px; } }

/* Joke cards are display-only, with no draft or market actions. */
.joke-card{border-style:dashed;cursor:default}.joke-card:not(:disabled):hover{transform:none;box-shadow:none;border-color:var(--line)}

/* Top-six live projection. Scroll only the bracket on small screens. */
.playoffs{margin-top:24px;min-width:0}.playoffs>.card-heading{gap:12px;flex-wrap:wrap}.playoffs h2{font-size:1.05rem}.playoffs>p{font-size:.8rem;line-height:1.6}
.playoff-scroll{overflow-x:auto;padding:4px 2px 12px;max-width:100%}.playoff-scroll:focus-visible{outline:2px solid var(--lime);outline-offset:3px;border-radius:6px}
.playoff-grid{display:grid;grid-template-columns:minmax(210px,1fr) 32px minmax(210px,1fr) 40px minmax(210px,1fr);grid-template-rows:auto repeat(2,minmax(188px,1fr));min-width:720px}
.playoff-round{font-size:.82rem;margin:0 0 12px;align-self:end}.playoff-round small{display:block;font-size:.65rem;font-weight:400;color:var(--muted);margin-top:4px}.playoff-round-pre{grid-column:1}.playoff-round-semi{grid-column:3}.playoff-round-final{grid-column:5}
.playoff-match{align-self:center;min-width:0;border:1px solid var(--line);border-radius:9px;background:#141c18;overflow:hidden}.playoff-match h4{font-size:.65rem;font-weight:600;color:var(--muted);margin:0;padding:10px 12px;border-bottom:1px solid var(--line)}
.playoff-pre-top{grid-column:1;grid-row:2}.playoff-pre-bottom{grid-column:1;grid-row:3}.playoff-semi-top{grid-column:3;grid-row:2}.playoff-semi-bottom{grid-column:3;grid-row:3}.playoff-final{grid-column:5;grid-row:2 / 4}
.playoff-slot{display:flex;align-items:center;gap:8px;padding:12px 10px;min-height:57px;border-bottom:1px solid var(--line)}.playoff-slot:last-child{border-bottom:0}.playoff-slot .avatar{width:27px;height:27px;flex-shrink:0;border-radius:7px;font-size:.63rem}.playoff-seed{font-size:.7rem;color:var(--muted);min-width:20px;font-weight:700}.playoff-player{min-width:0;overflow-wrap:anywhere}.playoff-player strong{font-size:.8rem;display:block}.playoff-player small{font-size:.62rem;display:block;margin-top:3px;color:var(--lime)}.playoff-direct{background:#293c25;box-shadow:inset 3px 0 var(--lime)}.playoff-direct .playoff-seed{color:var(--lime)}.playoff-pending{font-size:.73rem;color:var(--muted)}.playoff-empty-icon{color:var(--muted)}
.playoff-link{grid-column:2;align-self:center;border-top:2px solid #58705d}.playoff-link-top{grid-row:2}.playoff-link-bottom{grid-row:3}.playoff-link-final{grid-column:4;grid-row:2 / 4;position:relative}.playoff-link-final:before{content:"";position:absolute;left:0;right:50%;top:25%;bottom:25%;border:2px solid #58705d;border-left:0;border-radius:0 5px 5px 0}.playoff-link-final:after{content:"";position:absolute;left:50%;right:0;top:50%;border-top:2px solid #58705d}.playoff-note{margin-bottom:0}.playoff-scroll-hint{display:none}
@media(max-width:1050px){.playoff-scroll-hint{display:block}}

/* Direct semifinal places (1º y 2º) stand apart in gold. Next four qualifiers (3º al 6º) in light green. */
.table-card th,.table-card td{padding:14px 12px}.table-card th{line-height:1.5}.standings-player-name{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.rank-number{display:inline-grid;place-items:center;min-width:30px;min-height:30px}
.standings-direct,
.standings-gold{background:#362f1e !important}
.standings-direct td:first-child,
.standings-gold td:first-child{border-left:5px solid #f59e0b !important}
.standings-direct .rank-number,
.standings-gold .rank-number{background:linear-gradient(135deg,#fbbf24 0%,#d97706 100%) !important;color:#181105 !important;border-radius:7px !important;font-size:1rem !important;font-weight:850 !important;box-shadow:0 2px 8px rgba(245,158,11,0.4) !important}
.standings-direct .standings-points,
.standings-gold .standings-points{color:#ffe39e !important;font-weight:800 !important}
.standings-direct .avatar,
.standings-gold .avatar{background:#514428;color:#ffe39e}

.playoff-qualified:not(.standings-direct),
.standings-lime{background:#18281d !important}
.playoff-qualified:not(.standings-direct) td:first-child,
.standings-lime td:first-child{border-left:5px solid #4ade80 !important}
.playoff-qualified:not(.standings-direct) .rank-number,
.standings-lime .rank-number{background:linear-gradient(135deg,#a3e635 0%,#4ade80 100%) !important;color:#052e16 !important;border-radius:7px !important;font-size:1rem !important;font-weight:850 !important;box-shadow:0 2px 8px rgba(74,222,128,0.35) !important}
.playoff-qualified:not(.standings-direct) .standings-points,
.standings-lime .standings-points{color:#bbf7d0 !important;font-weight:800 !important}

.qualify-dot.gold{background:#f59e0b}
.qualify-dot.lime{background:#4ade80}
.playoff-direct{background:#3d331e;box-shadow:inset 4px 0 #f4ce70}.playoff-direct .playoff-seed{background:#f4ce70;color:#28200e;padding:5px 4px;border-radius:5px;text-align:center}.playoff-direct .playoff-player small{color:#ffe39e;font-weight:750}.playoff-direct .avatar{background:#514428;color:#ffe39e}

/* ── Reroll Draft ── */
.rd-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:22px;align-items:start}
.rd-layout>aside{position:sticky;top:20px}
.rd-order-card{padding:20px}
.rd-order-card h2{font-size:1rem;margin-bottom:14px}
.rd-order{list-style:none;margin:0;padding:0;counter-reset:rd}
.rd-order li{display:grid;grid-template-columns:30px 1fr auto;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:.82rem}
.rd-order li:last-child{border-bottom:0}
.rd-order li.active{color:var(--lime)}
.rd-order li.done{opacity:.45}
.rd-step{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:7px;background:#29362e;font-size:.72rem;font-weight:750}
.rd-order li.active .rd-step{background:var(--lime);color:#172313}
.rd-order li strong{display:block;line-height:1.3;overflow-wrap:anywhere}
.rd-order li small{display:block;font-size:.65rem;color:var(--muted)}
.rd-step-state{font-size:.65rem;color:var(--muted);text-align:right;white-space:nowrap}
.rd-order li.active .rd-step-state{color:var(--lime)}

.rd-admin{margin-bottom:22px}
.rd-admin h2{font-size:1.05rem}
.rd-admin p{font-size:.82rem;line-height:1.6;margin-bottom:14px}

.rd-panel{margin-bottom:22px}
.rd-panel h2{font-size:1.1rem}
.rd-panel p{font-size:.82rem;line-height:1.6}
.rd-counter{font-size:.8rem}
.rd-roster{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin:16px 0}
.rd-roster .pokemon-card{width:100%}
.rd-roster .pokemon-art{height:80px}
.rd-roster .pokemon-art img{width:80px;height:80px}
.rd-pokemon .rd-pick-state{display:block;font-size:.68rem;font-weight:700;color:var(--muted);margin-top:6px;border-top:1px solid var(--line);padding-top:8px}
.rd-pokemon[aria-pressed=true]{border-color:var(--lime);box-shadow:0 0 0 2px var(--lime)}
.rd-pokemon[aria-pressed=true] .rd-pick-state{color:var(--lime)}

.rd-choice-group{border:1px solid var(--line);border-radius:10px;padding:18px;margin:0 0 14px}
.rd-choice-group legend{font-weight:700;font-size:.88rem;padding:0 6px}
.rd-candidates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.rd-candidates .pokemon-card{width:100%}
.rd-candidates .pokemon-art{height:90px}
.rd-candidates .pokemon-art img{width:85px;height:85px}

.rd-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:16px}
.rd-actions p{margin:0;font-size:.8rem;flex:1;min-width:120px}

.rd-wait{margin-bottom:22px}
.rd-wait h2{font-size:1.05rem}
.rd-wait p{font-size:.82rem;line-height:1.6}
.rd-finished{margin-bottom:22px;text-align:center}

.rd-history{margin-bottom:22px}
.rd-history h2{font-size:1.05rem;margin-bottom:16px}
.rd-history>div{display:flex;flex-direction:column;gap:14px}
.rd-history article{padding:14px 0;border-bottom:1px solid var(--line)}
.rd-history article:last-child{border-bottom:0}
.rd-history article>strong{display:block;font-size:.88rem;margin-bottom:4px}
.rd-history article .muted{display:block;font-size:.72rem;margin-bottom:6px}
.rd-swaps{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
.rd-swaps>span{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;background:#1a2722;border:1px solid var(--line);border-radius:8px;padding:8px 10px}
.rd-swaps img{width:36px;height:36px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.rd-swaps b{color:var(--lime);font-size:.9rem}

@media(max-width:900px){
  .rd-layout{grid-template-columns:1fr}
  .rd-layout>aside{position:static}
  .rd-order{display:flex;gap:6px;overflow-x:auto;padding-bottom:8px}
  .rd-order li{grid-template-columns:auto auto;gap:6px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;white-space:nowrap;min-width:0;border-bottom:1px solid var(--line)}
  .rd-order li small{display:none}
  .rd-step-state{display:none}
}
@media(max-width:700px){
  .rd-roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .rd-candidates{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .rd-candidates .pokemon-art{height:70px}
  .rd-candidates .pokemon-art img{width:65px;height:65px}
  .rd-candidates .pokemon-name{font-size:.75rem}
  .rd-swaps{flex-direction:column}
  .rd-swaps>span{width:100%}
}

/* Version switcher (8-bit vs Classic) */
.pixel-preview-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.76rem;
  font-weight:700;
  padding:8px 12px;
  border-radius:8px;
  border:1px solid #486a55;
  background:#182b20;
  color:#a8e899;
  box-shadow:0 2px 6px rgba(0,0,0,0.25);
  white-space:nowrap;
  cursor:pointer;
  transition:background .15s,color .15s,border-color .15s;
}
.pixel-preview-toggle:hover:not(:disabled){
  background:#223c2d;
  color:#c4f5b8;
  border-color:#609372;
}
.pixel-preview-toggle .toggle-label-short{
  display:none;
}
@media(max-width:700px){
  .header-right{flex-wrap:wrap;justify-content:flex-end;gap:8px}
  .pixel-preview-toggle{
    font-size:.65rem;
    padding:6px 9px;
    min-height:32px;
  }
  .pixel-preview-toggle .toggle-label-long{
    display:none;
  }
  .pixel-preview-toggle .toggle-label-short{
    display:inline;
  }
}

/* ── Pokédex Modal & Planteles inspectable ── */
.pokemon-card-inspectable {
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pokemon-card-inspectable:hover {
  transform: translateY(-2px);
  border-color: var(--lime);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.pokedex-hint {
  font-size: .65rem;
  font-weight: 700;
  color: var(--lime);
  margin-top: 5px;
  display: block;
  letter-spacing: .02em;
}

.pokedex-dialog, .player-history-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: 90dvh;
  overflow-y: auto;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
}
.pokedex-dialog::backdrop, .player-history-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
}
.pokedex-modal-card, .player-history-card {
  padding: 24px;
}
.pokedex-modal-header, .player-history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.pokedex-modal-header h2, .player-history-header h2 {
  margin: 4px 0 2px;
  font-size: 1.4rem;
}
.pokedex-genus {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
}
.pokedex-modal-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 20px;
}
.pokedex-art-frame {
  background: radial-gradient(circle, rgba(201, 242, 122, 0.12), transparent 70%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}
.pokedex-sprite {
  image-rendering: pixelated;
  width: 130px;
  height: 130px;
  object-fit: contain;
}
.pokedex-types {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.pokedex-types .type-pill {
  background: #273b2d;
  color: #bbf0a8;
  border: 1px solid #4a6850;
  font-weight: 700;
  font-size: .7rem;
}
.pokedex-detail-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pokedex-desc-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.pokedex-desc-header, .pokedex-stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pokedex-text {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
  font-style: italic;
}
.pokedex-stats-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.pokedex-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.pokedex-stat {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 6px;
  padding: 8px 4px;
  text-align: center;
}
.pokedex-stat small {
  display: block;
  font-size: .58rem;
  color: var(--muted);
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.pokedex-stat strong {
  font-size: .95rem;
  color: var(--lime);
}

/* ── Standings Table Clickable Rows & History Modal ── */
.table-row-clickable {
  cursor: pointer;
  transition: background .12s ease;
}
.table-row-clickable:hover {
  background: rgba(201, 242, 122, 0.08) !important;
}
.table-row-clickable:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}
.history-click-hint {
  display: block;
  font-size: .62rem;
  color: var(--lime);
  font-weight: 600;
  margin-top: 2px;
  opacity: .85;
}

.player-history-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.player-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}
.history-match-item {
  display: grid;
  grid-template-columns: 85px 1.4fr 1.1fr 1.5fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.history-match-item.match-win {
  border-left: 4px solid var(--lime);
}
.history-match-item.match-loss {
  border-left: 4px solid #f29d60;
}
.history-match-item.match-postponed {
  border-left: 4px solid #e0aa40;
}
.history-match-round {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.history-match-round small {
  font-size: .62rem;
}
.history-match-rival {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.condition-badge {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.rival-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rival-name {
  font-size: .88rem;
  font-weight: 700;
}
.history-match-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.history-score-display {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.pill-win {
  background: #253d2c;
  color: #9fe290;
  border: 1px solid #476e4e;
  font-weight: 700;
}
.pill-loss {
  background: #402a20;
  color: #f7bc86;
  border: 1px solid #734c38;
  font-weight: 700;
}
.history-match-diff-col {
  text-align: right;
}
.diff-summary {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
  display: block;
}
.diff-summary.positive {
  color: #a6ec95;
}
.diff-summary.negative {
  color: #fca274;
}

@media (max-width: 700px) {
  .pokedex-modal-body {
    grid-template-columns: 1fr;
  }
  .pokedex-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .player-history-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .history-match-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .history-match-score-col {
    flex-direction: row;
    justify-content: space-between;
  }
  .history-match-diff-col {
    text-align: left;
  }
}

/* ── Starter Avatar Customization ── */
.avatar.avatar-pokemon {
  width: 42px;
  height: 42px;
  background: #14231b;
  border: 1.5px solid rgba(179, 237, 73, 0.4);
  padding: 2px;
  overflow: hidden;
}
.avatar.avatar-pokemon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}
.user-identity-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  color: inherit;
  font: inherit;
  font-size: .84rem;
  cursor: pointer;
  transition: all .15s ease;
}
.user-identity-btn:hover {
  background: rgba(179, 237, 73, 0.15);
  border-color: rgba(179, 237, 73, 0.6);
  transform: translateY(-1px);
}
.user-identity-btn .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: .65rem;
}
.user-identity-btn .avatar-pokemon {
  border-radius: 50%;
  padding: 2px;
}
.user-identity-btn .avatar-pokemon img {
  width: 100%;
  height: 100%;
}
.user-identity-edit {
  color: var(--lime);
  font-size: .8rem;
  opacity: .9;
}
.customize-avatar-btn {
  margin-left: auto;
  font-size: .78rem;
  padding: 7px 12px;
}

/* Starter Avatar Modal */
.starter-avatar-dialog {
  border: 1px solid #334437;
  border-radius: 18px;
  background: #141f1a;
  color: #e4ebe5;
  padding: 0;
  max-width: 720px;
  width: min(94vw, 720px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
}
.starter-avatar-dialog::backdrop {
  background: rgba(5, 10, 8, 0.78);
  backdrop-filter: blur(4px);
}
.starter-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.starter-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #233328;
}
.starter-modal-eyebrow {
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--lime);
  font-weight: 800;
  margin-bottom: 4px;
}
.starter-modal-header h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: white;
}
.starter-modal-header p {
  margin: 0;
  font-size: .8rem;
}
.starter-modal-close {
  background: transparent;
  border: 1px solid #324637;
  color: #abbcb0;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.starter-modal-close:hover {
  color: white;
  border-color: #55725d;
}
.starter-regions-nav {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  overflow-x: auto;
  border-bottom: 1px solid #233328;
  background: #0f1713;
  -webkit-overflow-scrolling: touch;
}
.starter-tab {
  border: 1px solid #283a2e;
  background: transparent;
  color: #9cb2a3;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.starter-tab:hover {
  color: white;
  border-color: #4b6653;
}
.starter-tab.active {
  background: var(--lime);
  color: #111a13;
  border-color: var(--lime);
  font-weight: 800;
}
.starter-grid-wrap {
  padding: 20px 24px;
  overflow-y: auto;
  min-height: 280px;
}
.starter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 14px;
}
.starter-pick-card {
  background: #192720;
  border: 1px solid #293d30;
  border-radius: 12px;
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  transition: all .15s ease;
  color: inherit;
  font: inherit;
  text-align: center;
}
.starter-pick-card:hover {
  border-color: var(--lime);
  background: #203329;
  transform: translateY(-2px);
}
.starter-pick-card.starter-pick-selected {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--lime);
  background: #20372b;
}
.starter-pick-dex {
  font-size: .62rem;
  color: #8da494;
  font-weight: 700;
}
.starter-pick-sprite {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
}
.starter-pick-sprite img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.starter-pick-name {
  font-size: .84rem;
  color: white;
  margin-top: 2px;
}
.starter-pick-types {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.starter-type-tag {
  font-size: .58rem;
  font-weight: 750;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.starter-type-planta { background: #325828; color: #bde9b0; }
.starter-type-fuego { background: #6f2e1a; color: #ffbeaa; }
.starter-type-agua { background: #204968; color: #b2dcff; }
.starter-type-veneno { background: #502759; color: #e4b6ed; }
.starter-type-volador { background: #3c426e; color: #cdd2ff; }
.starter-active-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--lime);
  color: #111a13;
  font-size: .52rem;
  font-weight: 850;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: .04em;
}
.starter-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid #233328;
  background: #111a15;
}
.starter-modal-status {
  font-size: .75rem;
  color: #9cb2a3;
  flex: 1;
  text-align: center;
}
.starter-modal-status strong {
  color: white;
}
@media (max-width: 600px) {
  .starter-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .starter-pick-card {
    padding: 10px 6px 8px;
  }
  .starter-modal-footer {
    flex-direction: column;
    gap: 8px;
  }
  .starter-modal-status {
    order: -1;
  }
}

/* Battle Upload and Match Stats Modal */
.battle-upload-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: 90dvh;
  overflow-y: auto;
  padding: 0;
  background: var(--panel, #121815);
  color: var(--ink, #fff);
  border: 1px solid var(--line, #24352a);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
}
.battle-upload-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.battle-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #24352a);
}
.battle-upload-header h2 {
  margin: 4px 0 2px;
  font-size: 1.35rem;
}
.battle-player-mapping {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line, #24352a);
  border-radius: 10px;
}
.battle-mapping-select {
  margin-top: 6px;
  width: 100%;
  padding: 8px 12px;
  background: #0d1310;
  border: 1px solid var(--line, #24352a);
  border-radius: 8px;
  color: white;
  font-size: .88rem;
}
.battle-upload-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line, #24352a);
  padding-bottom: 8px;
}
.battle-input-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.battle-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.battle-log-textarea {
  width: 100%;
  font-family: monospace;
  font-size: .78rem;
  background: #090e0b;
  color: #c7d8cc;
  border: 1px solid var(--line, #24352a);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}
.battle-log-textarea:focus {
  outline: none;
  border-color: var(--lime, #4ade80);
}
.battle-parsed-card {
  padding: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line, #24352a);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.battle-parsed-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.battle-parsed-stats-grid .stat-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}
.battle-parsed-stats-grid .stat-box small {
  font-size: .62rem;
  color: var(--muted, #86998c);
  font-weight: 700;
  letter-spacing: .04em;
}
.battle-parsed-stats-grid .stat-box strong {
  font-size: 1.1rem;
  margin: 2px 0;
}
.battle-parsed-stats-grid .stat-box span {
  font-size: .7rem;
  color: var(--muted, #86998c);
}
.battle-kills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.mon-kill-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #17241d;
  border: 1px solid #284031;
  font-size: .78rem;
}
.battle-series-summary {
  background: linear-gradient(135deg, rgba(23, 36, 29, 0.8), rgba(15, 22, 18, 0.9));
  border: 1px solid #365743;
  padding: 16px;
  border-radius: 12px;
}
.battle-series-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}
.hero-mvp-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #446f54;
  margin-top: 6px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.hero-stats > div {
  background: rgba(0, 0, 0, 0.25);
  padding: 8px;
  border-radius: 8px;
}
.hero-stats small {
  display: block;
  font-size: .62rem;
  color: var(--muted, #86998c);
  font-weight: 700;
}
.hero-stats strong {
  font-size: 1.15rem;
  display: block;
  margin-top: 4px;
}
.match-stats-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3px 10px !important;
  border-radius: 9999px !important;
  background: rgba(74, 222, 128, 0.12) !important;
  border: 1px solid rgba(74, 222, 128, 0.3) !important;
  color: var(--lime, #4ade80) !important;
  font-size: .72rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  line-height: 1.3 !important;
}
.match-stats-badge strong {
  color: #fff;
  font-weight: 700;
}
.match-stats-extra {
  color: #a3c3b5;
  font-size: .65rem;
  font-weight: 500;
}
.match.is-final {
  border-left: 4px solid #4ade80;
  background: #17221c;
}
.match-score.is-final {
  background: rgba(74, 222, 128, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #ffffff;
  font-weight: 850;
}
.match-player.winner {
  color: #ffffff;
  font-weight: 750;
}
.match-player.winner .avatar {
  box-shadow: 0 0 0 2px #4ade80;
}
.match-player.loser {
  opacity: 0.45;
  transition: opacity .15s;
}
.match:hover .match-player.loser {
  opacity: 0.7;
}
.match-stats-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  width: 100%;
}
.win-crown {
  font-size: .85rem;
  margin: 0 4px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 600px) {
  .battle-parsed-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .battle-series-hero {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Roster Quick K/D/A Badge ── */
button.pokemon-kda-badge,
.pokemon-kda-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink, #e6ede8);
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
  text-align: center;
}
button.pokemon-kda-badge:hover,
.pokemon-kda-badge:hover {
  background: rgba(201, 242, 122, 0.12);
  border-color: var(--lime, #c9f27a);
  transform: translateY(-1px);
}
.pokemon-kda-badge .kda-label {
  font-size: 0.62rem;
  color: var(--muted, #a2b2a8);
  font-weight: 750;
  letter-spacing: 0.04em;
}
.pokemon-kda-badge .kda-kills {
  color: var(--lime, #4ade80);
  font-weight: 800;
}
.pokemon-kda-badge .kda-sep {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
  font-size: 0.7rem;
}
.pokemon-kda-badge .kda-deaths {
  color: #f87171;
  font-weight: 800;
}
.pokemon-kda-badge .kda-ratio {
  color: var(--muted, #a2b2a8);
  font-size: 0.68rem;
  font-weight: 500;
}
.pokemon-kda-badge .kda-mvp {
  color: #fbbf24;
  font-size: 0.75rem;
  line-height: 1;
}
.pokemon-kda-badge.muted {
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}
.pokemon-kda-badge.muted:hover {
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Pokemon Stats Page & Leaders ── */
.stats-subnav-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  max-width: fit-content;
}
.stats-nav-pill {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stats-nav-pill:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.stats-nav-pill.active {
  background: rgba(74, 222, 128, 0.15);
  color: var(--lime, #4ade80);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.nba-leaders-section {
  margin-bottom: 24px;
}
.nba-leaders-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.nba-leader-card {
  position: relative;
  background: linear-gradient(145deg, #18221c, #141c18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform .18s, border-color .18s;
}
.nba-leader-card:hover {
  transform: translateY(-2px);
}
.nba-leader-card.leader-kills {
  border-top: 4px solid #f59e0b;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), #161e19 70%);
}
.nba-leader-card.leader-mvp {
  border-top: 4px solid #fbbf24;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), #161e19 70%);
}
.nba-leader-card.leader-kd {
  border-top: 4px solid #4ade80;
  background: linear-gradient(145deg, rgba(74, 222, 128, 0.08), #161e19 70%);
}
.nba-leader-card.leader-tank {
  border-top: 4px solid #60a5fa;
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.08), #161e19 70%);
}
.nba-leader-badge {
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.leader-kills .nba-leader-badge { color: #f59e0b; }
.leader-mvp .nba-leader-badge { color: #fbbf24; }
.leader-kd .nba-leader-badge { color: #4ade80; }
.leader-tank .nba-leader-badge { color: #60a5fa; }
.nba-leader-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nba-leader-art {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.nba-leader-art img {
  image-rendering: pixelated;
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.nba-leader-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nba-leader-info strong {
  font-size: .95rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nba-leader-owner {
  font-size: .65rem;
  color: var(--muted);
  margin: 2px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nba-leader-stat .stat-number {
  font-size: 1.3rem;
  font-weight: 850;
  line-height: 1;
  color: var(--ink);
}
.leader-kills .nba-leader-stat .stat-number { color: #fbbf24; }
.leader-kd .nba-leader-stat .stat-number { color: #4ade80; }
.nba-leader-stat small {
  font-size: .62rem;
  color: var(--muted);
  margin-left: 4px;
}
.nba-stats-banner {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: .78rem;
  color: var(--ink);
}
.nba-stats-banner strong {
  color: var(--lime, #4ade80);
}
.nba-toolbar-card {
  padding: 16px 20px;
  margin-bottom: 20px;
}
.nba-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.nba-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.nba-filter-group.search-group {
  flex: 1 1 200px;
}
.nba-filter-group label {
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0;
}
.nba-filter-group select,
.nba-filter-group input {
  min-height: 38px;
  font-size: .78rem;
  padding: 8px 10px;
  border-radius: 8px;
}
.nba-stats-table th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.nba-stats-table th:hover {
  color: var(--ink);
}
.nba-stats-table .th-highlight {
  color: var(--lime, #4ade80);
}
.nba-mon-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.nba-mon-cell:hover strong {
  color: var(--lime, #4ade80);
  text-decoration: underline;
}
.nba-mon-sprite {
  image-rendering: pixelated;
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
}
.nba-type-pills {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.nba-type-pills .pill.mini {
  font-size: .55rem;
  padding: 1px 5px;
  border-radius: 4px;
}
.nba-team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
}
.nba-team-cell .avatar {
  width: 22px;
  height: 22px;
  font-size: .5rem;
  border-radius: 6px;
}
.cell-kills strong {
  color: var(--lime, #4ade80);
  font-size: .95rem;
}
.cell-deaths {
  color: #f87171;
}
.kd-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.kd-badge.high {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.kd-badge.med {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.kd-badge.low {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}
.mvp-star {
  color: #fbbf24;
  font-weight: 750;
}
.nba-rank-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}
.nba-rank-badge.rank-gold {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1a1103;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}
.nba-rank-badge.rank-silver {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  color: #0f172a;
}
.nba-rank-badge.rank-bronze {
  background: linear-gradient(135deg, #f97316, #b45309);
  color: #ffffff;
}
.button.mini {
  padding: 3px 8px;
  font-size: .68rem;
  min-height: 26px;
}
@media (max-width: 1024px) {
  .nba-leaders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .nba-leaders-grid {
    grid-template-columns: 1fr;
  }
  .nba-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .nba-filter-group {
    width: 100%;
  }
}





/* Riolu: enlarge the assigned mini sprite without changing avatar frames. */
.avatar.avatar-pokemon img[src$="/riolu.png"] {
  transform: scale(1.5);
  transform-origin: center;
}

.standings-tie-label { display:block; color:var(--muted); font-size:.68rem; line-height:1.35; margin-top:3px; }

/* Public transfer history, shared by classic and modern roster views. */
.roster-history-nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px;border-bottom:1px solid var(--line);padding-bottom:12px}
.roster-history-nav .button{min-height:44px}
.roster-history-nav .button.ghost[aria-pressed="true"]{border-color:var(--lime);background:var(--lime);color:#172313}
.roster-history-total{font-variant-numeric:tabular-nums;opacity:.8;margin-left:6px}
.trade-log{padding:24px}
.trade-log-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.trade-log-heading h2{margin:0;font-size:1.2rem}
.trade-log-heading p{margin:8px 0 0;font-size:.85rem;max-width:65ch}
.trade-log-filter{display:grid;gap:8px;font-size:.8rem;min-width:210px}
.trade-log-filter select{min-height:44px;width:100%;margin:0}
.trade-log-count{font-size:.78rem;color:var(--muted);margin:24px 0 12px;font-variant-numeric:tabular-nums}
.trade-log-list{list-style:none;padding:0;margin:0}
.trade-log-entry{padding:20px 0;border-top:1px solid var(--line)}
.trade-log-meta{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:.73rem;margin-bottom:16px;font-variant-numeric:tabular-nums}
.trade-log-exchange{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:center;gap:24px}
.trade-log-side{min-width:0}
.trade-log-side h3{font-size:.95rem;margin:0 0 4px;overflow-wrap:anywhere}
.trade-log-direction{font-size:.72rem;color:var(--muted)}
.trade-log-assets{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-wrap:wrap;gap:6px 16px}
.trade-log-assets li{display:flex;align-items:center;gap:7px;min-height:36px;font-size:.82rem;max-width:100%;overflow-wrap:anywhere}
.trade-log-assets img{object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.trade-log-rerolls strong{color:var(--lime)}
.trade-log-swap{width:24px;height:24px;color:var(--muted)}
.trade-log-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--line);padding-top:20px;font-size:.8rem}
.trade-log-pagination .button{min-height:44px}
.trade-log-empty{padding:32px 0}
.trade-log-empty h3{font-size:1rem;margin:0 0 8px}
.trade-log-empty p{font-size:.85rem;margin:0}
@media(max-width:600px){
  .trade-log{padding:18px}
  .trade-log-heading{flex-direction:column;gap:18px}
  .trade-log-filter{width:100%;min-width:0}
  .trade-log-exchange{grid-template-columns:minmax(0,1fr);gap:12px}
  .trade-log-swap{display:none}
  .trade-log-side+.trade-log-swap+.trade-log-side{border-top:1px dashed var(--line);padding-top:12px}
  .trade-log-meta{font-size:.7rem}
}

.match-outlook{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 22px}.match-outlook article{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px}.match-outlook h2{font-size:.85rem;color:var(--muted);margin:0 0 12px}.match-outlook p{margin:6px 0;font-size:.9rem;overflow-wrap:anywhere}.match-outlook small{display:block;color:var(--muted);font-size:.72rem}@media(max-width:600px){.match-outlook{grid-template-columns:1fr}}

.postseason{margin-top:24px}.postseason-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px}.postseason-round{padding:16px;border:1px solid var(--line);border-radius:12px;margin:12px 0}.postseason-game{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.postseason-scores{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.postseason label{display:grid;gap:6px;font-size:.8rem}.postseason-champion{padding:20px;background:#c3ee7018;border:1px solid var(--lime);border-radius:12px}.postseason-champion h3{font-size:1.8rem;margin:8px 0}.postseason>.button{margin:8px 8px 0 0}

.competition-fields{border:0;padding:0;margin:24px 0}.competition-fields legend{font-weight:700;margin-bottom:16px}.competition-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:16px;margin:16px 0}.competition-options label{display:grid;gap:8px;font-size:.85rem}.competition-options select{width:100%;min-width:0}.competition-check{display:flex;align-items:center;gap:10px;margin:16px 0}.competition-check input{width:18px;min-height:18px}.competition-fields p{font-size:.8rem;line-height:1.7}#competition-preview{padding:14px;border:1px solid var(--line);border-radius:10px}#premade-form{margin-bottom:20px}
.format-explainer{width:100%;min-width:0;color:var(--ink);text-align:left}
.format-explainer h3{margin:0 0 8px;font-size:1.05rem;line-height:1.4;letter-spacing:0}
.format-explainer .format-summary{margin:0 0 18px;color:var(--muted);font-size:.82rem}
.format-explainer .format-pass{margin:8px 0;padding:12px 14px;border-radius:8px;background:color-mix(in srgb,#d7b96b 12%,transparent);color:inherit;font-size:.84rem;line-height:1.6}
.format-pass strong,.format-direct strong{color:#edcc83}
.format-rounds,.format-flow{list-style:none;padding:0;margin:22px 0 0}
.format-round{display:grid;grid-template-columns:100px minmax(0,1fr);gap:16px;padding:16px 0;border-top:1px solid var(--line)}
.format-round h4{font-size:.8rem;line-height:1.5;margin:9px 0 0;font-weight:650}
.format-pairings{display:grid;gap:8px;min-width:0}
.format-pairing{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);align-items:center;text-align:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:10px 8px;min-height:42px}
.format-pairing strong{font-size:1rem}.format-pairing span{font-size:.77rem;line-height:1.45;display:block;text-wrap:balance}.format-pairing small{font-size:.68rem;color:var(--muted)}
.format-explainer .format-footnote{font-size:.75rem;line-height:1.6;color:var(--muted);margin:12px 0 0}
.format-flow li{display:grid;gap:6px;padding:14px 0;border-top:1px solid var(--line)}
.format-flow strong{font-size:.85rem}.format-flow span{font-size:.8rem;line-height:1.6;color:var(--muted)}
html[data-theme=dark] .format-pass strong,html[data-theme=dark] .format-direct strong{color:#edcc83}
@media(max-width:600px){.format-round{grid-template-columns:1fr;gap:10px}.format-round h4{margin:0}.format-explainer h3{font-size:1rem}}
