/* Existing site tokens, with a denser account-management layout. */
html:has(.roster-app),body.roster-app{overflow-x:visible;min-height:100%;background:#171819}
.roster-app{font-family:var(--font-family);line-height:1.5;color:var(--color-text-primary);font-size:1rem}
.roster-app button,.roster-app input,.roster-app select{font:inherit}
.roster-app button,.roster-app select{min-height:44px;border:1px solid #424446;border-radius:var(--radius-sm);background:#26282a;color:inherit;padding:.5rem .8rem;cursor:pointer}
.roster-app button:hover{background:#343638;border-color:#737577}.roster-app button:disabled{opacity:.45;cursor:default}
.roster-app input[type=search],.roster-app input[type=number],.roster-app input[type=text]{min-height:44px;width:100%;min-width:0;border:1px solid #494b4d;border-radius:6px;background:#1c1e20;color:inherit;padding:.6rem .75rem}
.roster-app select{max-width:100%;min-width:0}.roster-app input[type=checkbox]{width:18px;height:18px;accent-color:var(--color-accent)}
.roster-app :focus-visible{outline:2px solid var(--color-accent);outline-offset:3px}.roster-app a{color:inherit;text-decoration:none}.roster-app a:hover{text-decoration:underline}
.roster-app h1{font-size:clamp(1.8rem,4vw,2.4rem);letter-spacing:-.04em;line-height:1.25}.roster-app h2{font-size:1.15rem}.roster-app h3{font-size:1rem}
.roster-app [hidden]{display:none!important}.roster-shell{max-width:1280px;margin:auto;padding:1.5rem 2rem 3rem}.topline{display:flex;align-items:center;gap:.8rem;margin-bottom:2rem;color:#b5b7b9;font-size:.85rem}.preview-tag,.tiny-tag{border:1px solid #5f5540;color:#d9bf7c;border-radius:4px;padding:.1rem .4rem;font-size:.7rem}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.eyebrow{color:#b5ab92;font-size:.8rem;margin-bottom:.4rem}.muted{color:var(--color-text-muted)}#account-summary{margin-top:.6rem;font-size:.9rem}.header-actions{display:flex;gap:.5rem;flex-wrap:wrap}.preview-note{margin:1.25rem 0 1rem;color:#aeb0b2;font-size:.8rem;display:flex;gap:.5rem;justify-content:space-between;flex-wrap:wrap}#save-state{color:#bdc7b6}.page-tabs{display:flex;gap:1.5rem;border-bottom:1px solid #414345;margin-bottom:1.5rem}.page-tabs button{border:0;border-radius:0;background:transparent;padding:.8rem .15rem;color:#999c9f;position:relative}.page-tabs button[aria-current]{color:var(--color-accent);box-shadow:inset 0 -2px var(--color-accent)}.page-tabs span{margin-left:.3rem;font-size:.8rem}
.inventory-toolbar{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}.search-wrap{flex:1;min-width:160px}.segmented{display:inline-flex;flex-wrap:wrap;gap:0;max-width:100%}.segmented button{border-radius:0;background:transparent}.segmented button:first-child{border-radius:6px 0 0 6px}.segmented button:last-child{border-radius:0 6px 6px 0}.segmented button+button{margin-left:-1px}.segmented button[aria-pressed=true]{color:var(--color-accent);background:#2e2e2b;border-color:#827040;z-index:1}.filterbar{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin-top:1rem;font-size:.85rem}.filterbar label{display:flex;align-items:center;gap:.5rem}.more-filters summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:.4rem;color:#bfc1c3}.more-filters>div{display:flex;gap:.8rem;flex-wrap:wrap;padding:.5rem 0}.list-meta{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap;margin:1.2rem 0 .8rem;color:#aaadaf;font-size:.85rem}.list-meta button{font-size:.8rem;padding:.35rem .6rem}#selection-tools{display:flex;gap:.4rem;flex-wrap:wrap}.character-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}.character-card{min-width:0;background:#222426;border:1px solid #3b3e40;border-radius:8px;overflow:hidden;position:relative}.character-card.is-selected{border-color:#c3a456;box-shadow:inset 0 0 0 1px #c3a456}.card-identity{padding:.85rem;display:flex;gap:.75rem;align-items:center}.card-portrait{width:64px;height:76px;object-fit:cover;object-position:top;border-radius:5px;background:#303234;flex-shrink:0}.card-identity h3{overflow-wrap:anywhere;margin-top:.25rem;line-height:1.35}.realm-name{font-size:.7rem;letter-spacing:.03em;color:#a7abae}.card-sub{font-size:.8rem;color:#bdc0c3;margin-top:.3rem}.ownership{display:flex;align-items:center;gap:.4rem;font-size:.75rem;min-height:32px;color:#c3c6c9;cursor:pointer}.ownership input{flex-shrink:0}.card-growth{margin:0 .85rem;padding:.7rem 0;border-top:1px solid #36393b;font-size:.8rem}.stat-line{display:flex;align-items:baseline;justify-content:space-between;gap:.4rem;margin:.2rem 0;color:#aeb2b5}.stat-line strong{color:#e0e2e4;font-weight:500}.card-skill{display:block;padding-top:.6rem;margin-top:.6rem;border-top:1px solid #36393b}.card-skill summary{cursor:pointer;min-height:32px;overflow-wrap:anywhere}.card-skill dl{margin-top:.4rem}.card-skill .stat-line{font-size:.75rem}.card-actions{display:grid;grid-template-columns:1fr 1fr;gap:.4rem;padding:0 .85rem .85rem}.card-actions button{font-size:.8rem;padding:.4rem .2rem}.missing-data{font-size:.78rem;color:#b9aa8b;padding:.5rem 0}.not-owned .card-portrait{filter:grayscale(.85);opacity:.7}.not-owned .card-identity h3{color:#b0b3b6}.select-label{position:absolute;right:.5rem;top:.4rem;background:#222426;padding:.2rem .3rem;border-radius:4px}.select-label input{width:20px;height:20px}.empty{padding:3rem 1rem;text-align:center;background:#222426;border:1px dashed #4a4d50;border-radius:8px;grid-column:1/-1}.empty p{color:#afb2b5;margin:.6rem 0 1rem}.list-view{grid-template-columns:1fr}.list-view .character-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}.list-view .card-identity{grid-column:1/-1}.list-view .card-actions{grid-column:1/-1}.list-view .card-growth{margin:.1rem .85rem .8rem;grid-column:1/-1}.wheel-card .card-portrait{width:70px;height:70px;object-fit:contain}.wheel-card .card-actions{display:flex;align-items:center;justify-content:space-between}.wheel-card select{width:auto;font-size:.8rem}.page-footer{margin-top:2rem;color:#8e9397;font-size:.8rem;border-top:1px solid #33373a;padding-top:1rem}
.primary{background:#d5b765!important;border-color:#d5b765!important;color:#1e201f!important;font-weight:600}.team-intro{display:flex;gap:1rem;justify-content:space-between;align-items:start;flex-wrap:wrap}.team-intro p{font-size:.9rem;margin-top:.35rem}.demo-label{color:#cfb782;font-size:.78rem;border:1px solid #64573a;padding:.3rem .5rem;border-radius:4px}.team-filters{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;margin:1.25rem 0;padding:1rem;background:#222426;border:1px solid #3c3f41;border-radius:8px}.team-filters label{font-size:.85rem;display:flex;gap:.5rem;align-items:center;max-width:100%}.team-filters select{max-width:180px}.team-grid{display:grid;gap:1rem}.team-card{background:#222426;border:1px solid #3c3f41;border-radius:8px;padding:1.1rem;min-width:0}.team-card header{display:flex;gap:.5rem;justify-content:space-between;flex-wrap:wrap}.team-tag{color:#b2b7ba;font-size:.75rem}.team-members{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.6rem;margin:1.1rem 0}.team-member{min-width:0;text-align:center;font-size:.8rem;overflow-wrap:anywhere}.team-member img{width:64px;height:76px;object-fit:cover;border-radius:5px;display:block;margin:0 auto .4rem}.team-member .muted{font-size:.7rem}.team-status{padding:.7rem 0;border-top:1px solid #3a3d3f;color:#c3c8be;font-size:.85rem}.team-card details{margin:.6rem 0}.team-card summary{min-height:44px;cursor:pointer;display:flex;align-items:center;font-size:.85rem}.team-card summary:before{content:'›';margin-right:.5rem}.team-card details[open] summary:before{transform:rotate(90deg)}.comparison{font-size:.8rem;margin-bottom:.8rem}.comparison p{margin:.5rem 0}.team-actions{display:flex;gap:.5rem;flex-wrap:wrap}.team-actions button{font-size:.8rem}
.roster-app dialog{color:inherit;border:1px solid #505355;border-radius:12px;background:#232527;max-width:min(680px,calc(100vw - 2rem));width:680px;max-height:calc(100dvh - 2rem);margin:auto;padding:0;overflow:auto}.roster-app dialog::backdrop{background:#000b;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.1rem 1.3rem;border-bottom:1px solid #3d4042}.dialog-heading button{font-size:1.4rem;flex-shrink:0;min-width:44px;background:transparent}.dialog-heading h2{font-size:1.15rem}.editor-person{display:flex;gap:.75rem;align-items:center}.editor-person img{width:46px;height:56px;object-fit:cover;border-radius:4px}.dialog-body{padding:1.25rem}.dialog-footer{display:flex;justify-content:flex-end;gap:.5rem;padding:1rem 1.25rem;border-top:1px solid #3d4042;background:#232527;flex-wrap:wrap}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.field{display:flex;flex-direction:column;gap:.35rem;min-width:0}.field span{font-size:.85rem;color:#c4c7c9}.field small{font-size:.75rem;color:#969da1}.field select{width:100%}.field-heading{font-size:.9rem;margin:1.5rem 0 .75rem;color:#d9d4c5}.quick-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin:.8rem 0}.quick-actions button{font-size:.8rem}.editor-note{font-size:.8rem;color:#a9afb3;margin:.75rem 0}.editor-note.warning{color:#d6b779}.preset-row{display:flex;align-items:center;gap:.5rem;justify-content:space-between;padding:.7rem 0;border-bottom:1px solid #3c3f41;flex-wrap:wrap}.preset-row>div{display:flex;gap:.4rem;flex-wrap:wrap}.preset-row button{font-size:.8rem}.check-line{display:flex;align-items:center;gap:.5rem;margin:.8rem 0;font-size:.85rem}.utility-section+.utility-section{border-top:1px solid #414547;margin-top:1.5rem;padding-top:1.5rem}.utility-section p{margin:.5rem 0 1rem;color:#b0b5b8;font-size:.85rem}.import-summary{background:#1d1f21;padding:.8rem;margin:1rem 0;border-radius:6px;overflow-wrap:anywhere}.download-link{display:inline-flex;min-height:44px;padding:.5rem .8rem;align-items:center;border:1px solid #555;border-radius:6px}
#bulk-bar{position:sticky;bottom:0;background:#292c2e;border-top:1px solid #7c6a3e;padding:1rem max(1rem,calc((100vw - 1216px)/2));padding-bottom:max(1rem,env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;z-index:5;box-shadow:0 -8px 30px #0003}#bulk-bar>div{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}#hidden-selection{font-size:.75rem}#bulk-bar button{font-size:.85rem}.toast{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);z-index:20;max-width:calc(100vw - 2rem);width:max-content;background:#e5dfce;color:#202322;padding:.7rem 1rem;border-radius:8px;box-shadow:0 5px 24px #0008;display:flex;align-items:center;gap:.6rem;font-size:.85rem}.roster-app .toast button{color:#252929;background:transparent;border-color:#a9a493;padding:.2rem .5rem}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:768px){.character-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.list-view{grid-template-columns:1fr}.list-view .character-card{grid-template-columns:240px minmax(0,1fr) 160px;align-items:center}.list-view .card-identity,.list-view .card-growth,.list-view .card-actions{grid-column:auto}.list-view .card-growth{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.25rem 1rem;margin:0;padding:.8rem;border:0}.list-view .card-skill{grid-column:1/-1}.list-view .card-actions{display:flex;flex-direction:column;padding:.6rem}.list-view .card-actions button{width:100%}.team-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1100px){.character-grid:not(.list-view){grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:767px){.roster-shell{padding:1rem 1rem 2rem}.topline{margin-bottom:1.3rem}.page-tabs{gap:1.1rem;margin-bottom:1rem}.page-heading{align-items:start}.header-actions button{font-size:.8rem}.preview-note{font-size:.75rem}.card-identity{flex-direction:column;align-items:start;padding:.7rem;gap:.4rem}.card-portrait{width:100%;height:auto;aspect-ratio:1.3;object-fit:cover;object-position:50% 20%}.card-identity>div{width:100%}.card-growth{margin:0 .7rem}.card-actions{grid-template-columns:1fr;padding:0 .7rem .7rem}.card-actions button{width:100%}.card-identity h3{font-size:.9rem}.card-sub{font-size:.75rem}.stat-line{font-size:.75rem}.list-view .card-identity{flex-direction:row;align-items:center}.list-view .card-portrait{width:64px;height:76px;aspect-ratio:auto}.list-view .card-growth{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;border-top:0}.list-view .card-growth .stat-line{display:block}.list-view .card-growth .stat-line strong{display:block}.list-view .card-skill{grid-column:1/-1}.list-view .card-actions{grid-template-columns:1fr 1fr}.roster-app dialog{max-width:100%;width:100%;max-height:92dvh;margin:auto 0 0;border-radius:12px 12px 0 0}.dialog-heading,.dialog-body{padding:1rem}.field-grid{gap:.8rem}.team-member img{width:100%;height:auto;aspect-ratio:.85}.team-member{font-size:.75rem}.team-card{padding:.9rem}.toast{bottom:.7rem;flex-wrap:wrap}.roster-app:has(#bulk-bar:not([hidden])) .toast{bottom:10rem}.inventory-toolbar>.search-wrap{flex-basis:100%}.team-filters{padding:.8rem}.team-filters label{flex-wrap:wrap}}
@media(max-width:379px){.character-grid:not(.list-view){grid-template-columns:1fr}.character-grid:not(.list-view) .card-identity{flex-direction:row;align-items:center}.character-grid:not(.list-view) .card-portrait{width:76px;height:90px}.card-actions{grid-template-columns:1fr 1fr}.field-grid{grid-template-columns:1fr}.header-actions{width:100%}.team-members{grid-template-columns:repeat(2,minmax(0,1fr))}.team-member img{max-width:80px}.page-tabs{gap:.8rem}.page-tabs button{font-size:.9rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.character-card{display:flex;flex-direction:column}.card-actions{margin-top:auto}.list-view .card-actions{margin-top:0}

@media(max-width:767px){
 .topline{margin-bottom:.6rem}.eyebrow{display:none}.page-heading{gap:.6rem}.page-heading h1{font-size:1.8rem}#account-summary{margin-top:.3rem;font-size:.8rem}
 .header-actions{gap:.4rem}.preview-note{margin:.65rem 0 .4rem;gap:.2rem;font-size:.7rem}.page-tabs{margin-bottom:.75rem}.page-tabs button{padding:.6rem .15rem}
 .inventory-toolbar{display:grid;grid-template-columns:1.6fr 1fr 1fr;gap:.4rem}.inventory-toolbar .search-wrap{grid-column:1/-1}.inventory-toolbar button{font-size:.75rem;padding:.4rem .25rem}.inventory-toolbar .segmented{display:flex;flex-wrap:nowrap}.inventory-toolbar .segmented button{flex:1;min-width:0}.filterbar{gap:.5rem;margin-top:.6rem}.filterbar .segmented button{padding:.45rem .6rem}.more-filters{width:100%}.more-filters summary{min-height:36px}.list-meta{margin:.6rem 0}.list-meta p{font-size:.75rem}
}
@media(max-width:379px){.inventory-toolbar{grid-template-columns:1.3fr 1fr 1fr}.inventory-toolbar button{overflow-wrap:anywhere}.header-actions{width:auto}}

.team-view-switch{margin-top:1rem}.demo-stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:.6rem}.roster-app .demo-stat{display:flex;gap:.75rem;align-items:center;text-align:left;font-size:.85rem}.demo-stat img{object-fit:cover;border-radius:4px}.demo-stat strong{margin-left:auto}.roster-app :is(button,select){overflow-wrap:anywhere}
