@import url("dashboard_fixpack3_badge.css");
/* The existing registration/restore flow, with precise input and explicit Savior. */
body.res-theme .registration-modal{width:min(650px,calc(100vw - 24px));max-height:calc(100dvh - 24px);gap:10px;padding:16px}
body.res-theme .registration-modal h2{margin:0;font-size:20px}
body.res-theme .registration-modal .registration-body{min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:10px}
body.res-theme .registration-modal .registration-event-name{margin:0;font-size:13px;overflow-wrap:anywhere}
body.res-theme .registration-modal .muted{margin:0;font-size:12px;line-height:1.5}
body.res-theme .registration-parameters{display:flex;flex-direction:column;gap:10px}
body.res-theme .registration-parameters[hidden]{display:none}
body.res-theme .registration-parameters fieldset{padding:8px;border:1px solid #695636;border-radius:7px;margin:0;min-width:0}
body.res-theme .registration-parameters legend{color:var(--gold);font-weight:650;font-size:13px}
body.res-theme .registration-classes>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
body.res-theme .registration-classes label{position:relative;display:flex;align-items:center;gap:4px;padding:5px;border:1px solid #566071;border-radius:5px;font-size:11px;line-height:14px;cursor:pointer;min-height:40px;box-sizing:border-box;min-width:0;background:#151a23}
body.res-theme .registration-classes label>span{color:var(--class-color);background:var(--class-label-bg,#080a0e);border-radius:2px;padding:0 2px}
body.res-theme .registration-classes .res-class-png{width:24px;height:28px;object-fit:contain;flex:none}
body.res-theme .registration-parameters input[type=radio]{position:absolute!important;opacity:0;width:1px!important;min-width:1px!important;max-width:1px!important;height:1px!important;min-height:1px!important;margin:0!important;padding:0!important}
body.res-theme .registration-parameters label:has(input[type=radio]:focus-visible){outline:2px solid var(--gold);outline-offset:2px}
body.res-theme .registration-parameters label:has(input[type=radio]:checked){border-color:var(--gold);background:#29271f}
body.res-theme .registration-parameters label>small{font-size:12px;color:var(--muted);line-height:1.5}
body.res-theme .registration-savior>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.res-theme .registration-savior-option{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;min-height:64px;padding:8px 6px 22px;border:1px solid #566071;border-radius:6px;background:#151a23;cursor:pointer}
body.res-theme .registration-savior-option .res-savior-icon{width:28px;height:28px;flex:none}
body.res-theme .registration-savior-option::after{content:attr(data-selection-label);position:absolute;bottom:3px;left:3px;right:3px;text-align:center;font-size:11px;color:#7cda9a;visibility:hidden}
body.res-theme .registration-savior-option:has(input:checked)::after{visibility:visible}
body.res-theme .registration-savior legend small{color:var(--muted);font-size:11px;font-weight:500}
body.res-theme .registration-result:empty{display:none}
body.res-theme .registration-modal>.form-actions{margin:0;flex:none;gap:8px}
@media(max-width:640px){body.res-theme .registration-classes>div{grid-template-columns:repeat(2,minmax(0,1fr))}body.res-theme .registration-modal{padding:12px}body.res-theme .registration-modal>.form-actions .button{min-height:38px;flex:1 1 140px;font-size:12px}}
/* Original supplied artwork remains in separate local image layers. */
body.res-theme{--bg:#0e1015;--panel:#191b22;background:#0e1015 url('branding/background.webp') center top/1600px auto repeat;color:#f1eee8}
body.res-theme .main{background:linear-gradient(#101219ed,#101219ed),url('branding/background.webp') center top/1400px auto repeat}
body.res-theme .top{position:relative;isolation:isolate;display:block;padding:0;background:#101219;border:0;margin-bottom:24px;min-width:0}
body.res-theme .header-art{position:relative;aspect-ratio:3/1;background:#101219;pointer-events:none;isolation:isolate}
body.res-theme .header-art picture,body.res-theme .header-art img{display:block;width:100%;height:100%}
body.res-theme .header-art img{object-fit:contain}
/* A static, narrow light stays on the sword, below the face and above the frame. */
body.res-theme .header-art::after{content:'';position:absolute;left:48.8%;top:45%;width:2.4%;height:32%;background:radial-gradient(ellipse,#ffbc5824,transparent 70%);pointer-events:none}
body.res-theme .header-information{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px 0 20px;background:#101219;min-width:0}
body.res-theme .header-heading{flex:1 1 260px;min-width:0}
body.res-theme .top :is(h1,.eyebrow,#section-description){overflow-wrap:anywhere}
body.res-theme .top h1{min-width:0;display:flex;align-items:center;gap:10px}
body.res-theme .top h1>span{min-width:0}
body.res-theme .top-actions{display:flex;flex:0 1 auto;max-width:100%;color:#c5cbd5}
body.res-theme #connection{overflow-wrap:anywhere;min-width:0}
body.res-theme .status-dot{flex:none}
/* Preserve the established sidebar widths and horizontal mobile navigation. */
body.res-theme .sidebar{border-right-color:#8f7950;min-width:0}
body.res-theme .sidebar #nav{padding:4px}
body.res-theme .brand{padding:0;gap:10px;min-width:0}
body.res-theme .brand>div{min-width:0}
body.res-theme .brand b{font-size:12px;letter-spacing:.08em}
body.res-theme .sidebar-logo{width:40px;height:40px;flex:none}
body.res-theme .sidebar-collapsed .brand{min-height:40px}
body.res-theme .sidebar :is(button,.button):focus-visible{outline-color:#d9b66d;outline-offset:2px}
body.res-theme #sidebar-toggle{border-color:#9c814b}
body.res-theme .sidebar :is(.guild-trigger,.guild-option){white-space:normal}
body.res-theme .sidebar :is(.guild-trigger,.guild-option)>span:not(.guild-fallback){white-space:normal;overflow-wrap:anywhere;text-overflow:clip}
body.res-theme .sidebar-collapsed .guild-trigger>span:not(.guild-fallback){display:none}
body.res-theme .sidebar-collapsed .guild-pick{padding:0}
body.res-theme .sidebar :is(.guild-menu,.navigation-tooltip){z-index:10010}
body.res-theme :is(.card,.planner-battle,.planner-team,.planner-right,.planner-reserve){background-color:#171b23;border-color:#4a4140}
body.res-theme .dashboard-footer{height:32px;margin-top:16px;background:url('branding/footer.webp') center top/cover no-repeat;opacity:.72;pointer-events:none}
@media(max-width:980px){
 body.res-theme .app{display:block}
 body.res-theme .sidebar{position:relative;height:auto;gap:12px;padding:16px;border-right:0;border-bottom:1px solid #8f7950}
 body.res-theme .sidebar #nav{display:flex;flex-direction:row;overflow-x:auto;overflow-y:hidden;max-width:100%;gap:4px;padding:4px}
 body.res-theme .sidebar #nav button{flex:none;min-width:44px}
 body.res-theme .sidebar-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:0}
 body.res-theme .sidebar-collapsed .sidebar{padding:8px;gap:8px}
 body.res-theme .sidebar-collapsed .sidebar-bottom{gap:7px}
 body.res-theme .sidebar-collapsed #nav button{width:44px;flex-basis:44px}
 body.res-theme .main{padding:20px}
}
@media(max-width:640px){
 body.res-theme .header-art{aspect-ratio:3/2}
 body.res-theme .header-art::after{content:none}
 body.res-theme .header-information{gap:10px;padding:12px 0 16px}
 body.res-theme .main{padding:16px}
 body.res-theme .main,body.res-theme{background-attachment:scroll}
}
@media(prefers-reduced-motion:reduce){body.res-theme .header-art::after{animation:none;transition:none}}

/* Review fixes: transparent empty banner margin, centered vector chevron. */
body.res-theme :is(.top,.header-art,.header-information){background:transparent}
body.res-theme .header-art img{mask-image:linear-gradient(to bottom,#000 90.8%,transparent 97.5%),linear-gradient(to bottom,#000 95.5%,transparent 100%);mask-size:100% 100%,8% 100%;mask-position:center;mask-repeat:no-repeat;mask-composite:add}
body.res-theme #sidebar-toggle{display:flex;align-items:center;justify-content:center}
body.res-theme .sidebar-toggle-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;line-height:1;flex:none}
body.res-theme .sidebar-toggle-icon svg{display:block;width:20px;height:20px}

/* Valid, independent picker controls; full names wrap instead of badge truncation. */
body.res-theme .planner-picker{width:min(720px,calc(100vw - 32px));min-width:0;box-sizing:border-box}
body.res-theme .picker-results{display:grid;gap:8px;min-width:0}
body.res-theme .picker-person{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:12px;background:#171b23;border:1px solid #665334;border-left:3px solid var(--class-color,#a58a50);border-radius:7px;min-width:0}
body.res-theme .picker-person>div{min-width:0}
body.res-theme .picker-person strong,body.res-theme .picker-person span{display:block;white-space:normal;overflow-wrap:anywhere}
body.res-theme .picker-person strong{font-size:15px;color:#f1eee8}
body.res-theme .picker-person span{font-size:12px;color:#c5cbd5;margin-top:4px}
body.res-theme .picker-person .button{min-height:44px;min-width:44px}
body.res-theme .planner-badge-status button.planner-game-state{padding:0;width:100%;height:auto;min-height:0;min-width:0;border:0;background:transparent;font:inherit;cursor:pointer;text-align:inherit}
body.res-theme .planner-badge-status button.game-yes{color:#6cc98c}
body.res-theme .planner-badge-status button.game-no{color:#ee7b83}
body.res-theme .planner-badge-status button.game-unknown{color:var(--gold)}
body.res-theme .planner-badge-status button.planner-game-state:disabled{cursor:default;opacity:1}
body.res-theme .planner-clan-counts{display:block;width:100%;min-width:0;margin-top:16px}
body.res-theme .planner-clan-counts h3{color:var(--gold)}
body.res-theme .clan-participation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.res-theme .clan-participation-card{min-width:0;padding:14px;border:1px solid #665334;border-radius:10px;background:#171b23}
body.res-theme .clan-participation-card header{display:flex;align-items:center;gap:12px;margin-bottom:12px}
body.res-theme .clan-participation-card header>div{min-width:0}
body.res-theme .clan-participation-card h4{margin:0;color:var(--gold);overflow-wrap:anywhere}
body.res-theme .clan-participation-card p{font-size:12px;margin:6px 0}
body.res-theme .clan-share{display:grid;place-items:center;position:relative;isolation:isolate;flex:none;width:72px;height:72px;border-radius:50%;background:conic-gradient(var(--clan-color) var(--share),#343841 0)}
body.res-theme .clan-share::before{content:'';position:absolute;inset:7px;border-radius:50%;background:#171b23;z-index:-1}
body.res-theme .clan-share b{font-size:21px;color:#f1eee8;font-variant-numeric:tabular-nums}
body.res-theme .clan-participation-card>button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;padding:8px 0;border:0;border-top:1px solid #343841;background:transparent;text-align:left;color:#ddd8cd;font-size:12px;white-space:normal}
body.res-theme .clan-participation-card>button span{min-width:0;overflow-wrap:anywhere}
body.res-theme .clan-metric-list{min-width:0;overflow-wrap:anywhere}
body.res-theme .clan-metric-list small{display:block;color:#c5cbd5}
body.res-theme .game-status-overlay .control-dialog{width:min(560px,calc(100vw - 32px));box-sizing:border-box}
body.res-theme .game-status-overlay p{overflow-wrap:anywhere}
@media(max-width:1100px){body.res-theme .clan-participation{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){body.res-theme .picker-person{grid-template-columns:1fr 1fr}body.res-theme .picker-person>div{grid-column:1/-1}}

/* Separate date text and calendar control, with a full-width date on small screens. */
body.res-theme .event-date-group{grid-template-columns:minmax(190px,1.4fr) minmax(100px,1fr)}
body.res-theme .event-date-field{display:grid;grid-template-columns:minmax(0,1fr) 38px;column-gap:5px;align-items:end}
body.res-theme .event-date-display{padding-right:8px!important;min-width:0;grid-column:1;grid-row:2}
body.res-theme .event-date-field .calendar-trigger{position:static;grid-column:2;grid-row:2;width:38px;height:38px;min-height:38px;margin:0}
@media(max-width:600px){body.res-theme .event-date-group{grid-template-columns:minmax(0,1fr)}body.res-theme .event-date-group>label{width:100%}}

/* Full content-width artwork and visible original background texture. */
body.res-theme .main{--dashboard-gutter:clamp(18px,4vw,68px);padding:0 var(--dashboard-gutter) 32px;background:linear-gradient(#10121933,#10121933),url('branding/background.webp') center top/512px auto repeat}
body.res-theme .top{margin-inline:calc(-1 * var(--dashboard-gutter))}
body.res-theme .header-information{padding-inline:var(--dashboard-gutter)}
@media(max-width:980px){body.res-theme .main{--dashboard-gutter:20px}}
@media(max-width:640px){body.res-theme .main{--dashboard-gutter:16px}}

/* Scoped planner ergonomics: retain existing controls and draft callbacks. */
body.res-theme .planner-right .class-group>summary .planner-full-banner{width:100%;max-width:none;max-height:none;aspect-ratio:5/1;object-fit:contain}
body.res-theme .immortal-battle-bar{align-items:center;flex-wrap:wrap;gap:8px}
body.res-theme .immortal-battle-bar>strong{flex:1;min-width:0;border-left:1px solid var(--gold);padding-left:10px}
body.res-theme .immortal-clan-edit{display:inline-flex;align-items:center;gap:8px;max-width:100%;color:var(--gold);font:inherit}
body.res-theme .immortal-clan-edit>span:first-child{overflow-wrap:anywhere}
body.res-theme .immortal-clan-edit .ui-icon{width:15px;height:15px;flex:none}
body.res-theme .battle-edit-label{font-size:10px;font-weight:500;color:var(--muted)}
body.res-theme .immortal-reveal{display:inline-flex;align-items:center;gap:6px;border-radius:7px;padding:7px 9px;min-height:32px;font-size:11px}
body.res-theme .immortal-reveal.active{background:color-mix(in srgb,var(--gold) 12%,var(--panel))}
body.res-theme .player-assignment-action{grid-column:1/-1;padding:10px 0;border-top:1px solid var(--border)}
body.res-theme .player-inline-move,body.res-theme [data-player-account-link]{display:inline-flex;align-items:center;gap:8px;white-space:normal;text-align:left}
body.res-theme .player-link-discord-icon{width:20px;height:16px;object-fit:contain;flex:none}
body.res-theme:has(#planner-actions) .main{padding-bottom:110px}
body.res-theme .planner-save-bar{position:fixed;z-index:90;bottom:10px;left:280px;right:18px;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:10px 14px;border:1px solid var(--gold);border-radius:10px;background:var(--panel);box-shadow:0 3px 14px #0005}
body.res-theme .sidebar-collapsed .planner-save-bar{left:90px}
body.res-theme .planner-save-bar #roster-status{margin-right:auto;min-width:0;overflow-wrap:anywhere}
body.res-theme .planner-save-bar #confirm-roster{display:inline-flex;align-items:center;gap:7px}
@media(max-width:980px){body.res-theme .planner-save-bar,body.res-theme .sidebar-collapsed .planner-save-bar{left:12px;right:12px;bottom:8px}body.res-theme:has(#planner-actions) .main{padding-bottom:150px}}
@media(max-width:480px){body.res-theme .planner-save-bar{gap:5px;padding:8px}body.res-theme .planner-save-bar #roster-status{flex-basis:100%;font-size:11px}body.res-theme .planner-save-bar .button{font-size:10px;padding:7px}body.res-theme .battle-edit-label{display:none}}

body.res-theme .immortal-battle-bar>strong::before{content:none}
body.res-theme:has(#planner-actions) #toast-region{bottom:100px}
@media(max-width:980px){body.res-theme:has(#planner-actions) #toast-region{bottom:145px}}

/* Event picker shares the gold mode header, outside its button. */
body.res-theme .mode-event-picker{display:flex;flex-direction:column;gap:5px;min-width:0;grid-column:1/-1}
body.res-theme .mode-event-picker>span{font-size:10px;letter-spacing:.08em;color:var(--muted)}
body.res-theme .mode-event-picker select{width:100%;min-width:0;max-width:100%;text-overflow:ellipsis}
body.res-theme .roster-mode-fixed.roster-event-context{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,420px);align-items:center;gap:14px;padding:12px 18px;border:2px solid var(--gold);border-radius:14px;background:color-mix(in srgb,var(--gold) 12%,var(--panel))}
body.res-theme .roster-event-context.roster-mode-fixed>.res-mode-tile{border:0!important;background:transparent!important;min-height:64px!important;padding:0!important;box-shadow:none}
body.res-theme .roster-mode-fixed .mode-event-picker{grid-column:2}
@media(max-width:760px){body.res-theme .roster-mode-fixed.roster-event-context{grid-template-columns:minmax(0,1fr);padding:12px;gap:8px}body.res-theme .roster-mode-fixed .mode-event-picker{grid-column:1}}

/* Compact two-column roster heading beneath the artwork. */
body.res-theme .header-information.roster-split-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 24px;align-items:center}
body.res-theme .roster-split-header>.header-heading{min-width:0}
body.res-theme .roster-split-header>.roster-event-context{margin:0;min-width:0;width:100%;grid-column:2;grid-row:1/3}
body.res-theme .roster-split-header>.top-actions{grid-column:1;margin:0;justify-self:start}
body.res-theme .roster-split-header .roster-mode-fixed.roster-event-context{grid-template-columns:minmax(0,1fr);gap:7px;padding:12px 16px}
body.res-theme .roster-split-header .roster-mode-fixed .mode-event-picker{grid-column:1}
body.res-theme .roster-event-context.roster-mode-fixed>.res-mode-tile{grid-template-columns:44px minmax(0,1fr);gap:4px 10px;min-height:54px!important}
body.res-theme .roster-event-context.roster-mode-fixed>.res-mode-tile>svg{grid-row:1/3;grid-column:1;width:40px!important;height:40px!important;min-width:40px}
body.res-theme .roster-event-context.roster-mode-fixed>.res-mode-tile>strong{grid-column:2;grid-row:1}
body.res-theme .roster-event-context.roster-mode-fixed>.res-mode-tile>small{grid-column:2;grid-row:2;align-self:start}
@media(max-width:980px){body.res-theme .header-information.roster-split-header{grid-template-columns:minmax(0,1fr)}body.res-theme .roster-split-header>.roster-event-context{grid-column:1;grid-row:3}body.res-theme .roster-split-header>.top-actions{grid-row:2}}

/* Shared persistent view actions and alliance totals. */
body.res-theme .planner-view-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-right:auto}
body.res-theme .planner-save-bar #roster-status{margin-right:8px}
body.res-theme .clan-participation{grid-template-columns:repeat(4,minmax(0,1fr))}
body.res-theme .clan-participation-card header>div{flex:1;text-align:center}
body.res-theme .clan-participation-card h4{font-size:20px;line-height:1.3;margin:0;overflow-wrap:anywhere;text-align:center}
body.res-theme .alliance-participation-summary header{min-height:72px}
body.res-theme .alliance-participation-summary header small{color:var(--muted);font-size:11px}
body.res-theme .alliance-summary-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px;padding:8px 0;border-top:1px solid var(--border);font-size:12px}
body.res-theme .alliance-summary-row b{flex:none;font-variant-numeric:tabular-nums}
body.res-theme .alliance-summary-extra{margin-top:8px;color:var(--muted)}
body.res-theme .alliance-summary-extra b{color:var(--text)}
@media(max-width:1400px){body.res-theme .clan-participation{grid-template-columns:repeat(2,minmax(0,1fr))}body.res-theme:has(#planner-actions) .main{padding-bottom:190px}body.res-theme:has(#planner-actions) #toast-region{bottom:180px}}
@media(max-width:640px){body.res-theme .clan-participation{grid-template-columns:minmax(0,1fr)}body.res-theme .planner-view-actions{flex-basis:100%;justify-content:space-between;gap:4px}body.res-theme .planner-view-actions .button{flex:1}body.res-theme:has(#planner-actions) .main{padding-bottom:220px}body.res-theme:has(#planner-actions) #toast-region{bottom:210px}}

body.res-theme .clan-participation{align-items:start}
body.res-theme .alliance-participation-summary .alliance-summary-row{min-height:32px;padding:6px 0;font-size:11px}

body.res-theme .alliance-participation-summary .alliance-summary-row,body.res-theme .alliance-participation-summary header small{text-transform:uppercase}
body.res-theme .alliance-participation-summary button.alliance-summary-row{width:100%;font-family:inherit;text-align:left;cursor:pointer}
body.res-theme .alliance-participation-summary button.clan-team-metric{min-height:44px;padding:8px 10px;font-size:12px}

/* Even action rows, without an extra bulk-operation heading. */
body.res-theme .planner-controls-layout{grid-template-columns:1.1fr 1.65fr 1fr}
body.res-theme .planner-controls-layout [data-action-section]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;align-items:stretch}
body.res-theme .planner-controls-layout [data-action-section="1"]{display:block}
body.res-theme .planner-controls-layout [data-action-section="2"]{grid-template-columns:repeat(3,minmax(0,1fr))}
body.res-theme .planner-controls-layout [data-action-section="3"]{grid-template-columns:minmax(0,1fr)}
body.res-theme .planner-controls-layout [data-action-section]>.button{width:100%;min-width:0;min-height:40px;justify-content:center;white-space:normal;line-height:1.3;text-align:center;padding:7px;font-size:11px}
@media(max-width:1100px){body.res-theme .planner-controls-layout{grid-template-columns:minmax(0,1fr)}body.res-theme .planner-controls-layout [data-action-section="3"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){body.res-theme .planner-controls-layout [data-action-section="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}}

body.res-theme [data-clan-metric="alliance:allAssigned"]{margin-top:8px}

/* Collapsible planning controls and readable battle heading. */
body.res-theme .planner-control-panel{border:1px solid var(--border);border-radius:12px;margin:0 0 14px;min-width:0}
body.res-theme .planner-control-panel>summary{display:flex;align-items:center;gap:9px;list-style:none;cursor:pointer;color:var(--gold);padding:12px 14px;font-size:12px;font-weight:700}
body.res-theme .planner-control-panel>summary::-webkit-details-marker{display:none}
body.res-theme .planner-control-panel>summary>.ui-icon:last-child{margin-left:auto;transition:transform .15s}
body.res-theme .planner-control-panel[open]>summary>.ui-icon:last-child{transform:rotate(180deg)}
body.res-theme .planner-control-panel:not([open])>.planner-action-sections{display:none!important}
body.res-theme .planner-control-panel>.planner-action-sections{padding:0 10px 10px}
body.res-theme .immortal-battle-bar{display:flex!important;flex-wrap:wrap;gap:10px;padding:12px;border:1px solid var(--gold);border-radius:14px;background:color-mix(in srgb,var(--gold) 9%,var(--panel))}
body.res-theme .immortal-battle-title{display:flex;align-items:center;gap:9px;min-width:0;flex:1;color:var(--gold);font-size:16px}
body.res-theme .immortal-battle-title>strong{overflow-wrap:anywhere}
body.res-theme .immortal-battle-title>b{flex:none}
body.res-theme .immortal-battle-title>.ui-icon{width:15px;height:15px;flex:none}
body.res-theme .immortal-battle-counts{display:flex;align-items:center;gap:12px;font-size:10px;color:var(--muted)}
body.res-theme .immortal-battle-counts>span{display:flex;flex-direction:column;gap:3px;text-align:center}
body.res-theme .immortal-battle-counts b{font-size:13px;color:var(--text);font-variant-numeric:tabular-nums}
body.res-theme .immortal-battle-edit,body.res-theme .immortal-reveal{display:inline-flex;align-items:center;gap:6px;justify-content:center;border-radius:9px;min-height:36px;white-space:nowrap}
@media(max-width:760px){body.res-theme .immortal-battle-title{flex-basis:100%}body.res-theme .immortal-battle-counts{margin-right:auto}body.res-theme .immortal-battle-bar>.button{font-size:10px;padding:7px}}
@media(prefers-reduced-motion:reduce){body.res-theme .planner-control-panel>summary>.ui-icon:last-child{transition:none}}

/* Statistics live in each badge's native dropdown, freeing identity space. */
body.res-theme .planner-person[data-badge-dropdown][data-badge-variant]{grid-template-columns:minmax(0,1fr) 32px var(--badge-controls-width)!important}
body.res-theme .planner-person[data-badge-dropdown] [data-badge-stat-source][hidden]{display:none!important}
body.res-theme .planner-person[data-badge-dropdown]>.planner-badge-data{min-width:28px}
body.res-theme .planner-stats-toggle{display:grid;place-items:center;width:28px;height:26px;padding:4px;border:1px solid var(--border);border-radius:6px;background:var(--panel);color:var(--gold);cursor:pointer}
body.res-theme .planner-stats-toggle .ui-icon{width:16px;height:16px}
body.res-theme .planner-stats-toggle[aria-expanded=true] .ui-icon{transform:rotate(180deg)}
body.res-theme .planner-stats-popover{position:fixed;inset:auto;margin:0;width:min(460px,calc(100vw - 24px));box-sizing:border-box;padding:12px;border:1px solid var(--gold);border-radius:9px;background:var(--panel);color:var(--text);box-shadow:0 5px 18px #0006}
body.res-theme .planner-stats-popover::backdrop{background:transparent}
body.res-theme .planner-stats-popover .planner-compact-stats{display:flex;flex-wrap:nowrap;align-items:center;gap:12px 16px}
body.res-theme .planner-stats-popover .planner-stat{display:inline-flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap}
body.res-theme .planner-stats-popover .res-stat-png,body.res-theme .planner-stats-popover .res-savior-icon{display:inline-flex;width:20px;height:20px;flex:none;object-fit:contain}
body.res-theme .planner-stats-popover .res-savior-icon img{width:100%;height:100%;object-fit:contain}

/* Attributes join the top action row; both event statuses remain visible. */
body.res-theme .planner-person[data-badge-dropdown][data-badge-dual][data-badge-variant]{display:grid!important;grid-template-columns:minmax(0,1fr) var(--badge-controls-width)!important}
body.res-theme .planner-person[data-badge-dual]>[data-badge-stat-source]{display:none!important}
body.res-theme .planner-person[data-badge-dual]>.planner-badge-controls{grid-column:2;grid-row:1;position:static;inset:auto;width:auto;gap:3px;min-width:0;justify-content:center}
body.res-theme .planner-person[data-badge-dual] .planner-row-action{display:grid!important;grid-template-columns:minmax(0,1fr) repeat(3,20px);gap:3px;width:100%;height:22px}
body.res-theme .planner-person[data-badge-dual] .planner-row-action>button{width:20px;height:21px;min-height:21px;padding:1px}
body.res-theme .planner-person[data-badge-dual] .planner-row-action>.planner-stats-toggle{display:flex;width:100%;gap:3px;align-items:center;justify-content:center;font-size:9px;color:var(--gold);white-space:nowrap}
body.res-theme .planner-person[data-badge-dual] .planner-stats-toggle>.ui-icon{width:12px;height:12px;flex:none}
body.res-theme .planner-person[data-badge-dual] .planner-badge-status{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;position:static;inset:auto;width:100%;height:20px;text-align:center}
body.res-theme .planner-person[data-badge-dual] .planner-badge-status>button{display:block!important;width:100%;min-width:0;height:20px;min-height:20px;box-sizing:border-box;border:1px solid currentColor;border-radius:4px;background:color-mix(in srgb,currentColor 9%,var(--panel));padding:2px;font-size:9px;font-weight:600;line-height:14px;white-space:nowrap;overflow:hidden;text-align:center;color:var(--muted)}
body.res-theme .planner-person[data-badge-dual] [data-dc-state=registered],body.res-theme .planner-person[data-badge-dual] .planner-badge-status>.game-yes{color:#75d69c}
body.res-theme .planner-person[data-badge-dual] [data-dc-state=unregistered],body.res-theme .planner-person[data-badge-dual] .planner-badge-status>.game-no{color:#ff808a}
body.res-theme .planner-person[data-badge-dual] [data-dc-state=absent],body.res-theme .planner-person[data-badge-dual] .planner-badge-status>.game-unknown{color:var(--gold)}
body.res-theme .planner-person[data-badge-dual] .planner-manual-details{display:none}

/* Narrow badges keep identity and action rows separate, without overlap. */
body.res-theme .planner-person[data-badge-dual]>.planner-identity{position:static!important;inset:auto!important;grid-column:1;grid-row:1;height:100%;min-width:0;overflow:hidden}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes][data-badge-variant]{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:40px 46px!important;min-height:90px!important;height:auto!important;row-gap:3px!important}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes]>.planner-identity{grid-template-columns:30px minmax(0,1fr) minmax(52px,.8fr)!important;grid-template-rows:40px!important;gap:4px}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes] .planner-class-icon{grid-row:1!important;height:36px!important}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes] .player-name{grid-row:1!important;align-self:center!important;font-size:12px!important;line-height:16px!important}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes] .planner-class-clan{display:grid!important;grid-column:3!important;grid-row:1!important;height:40px!important;position:static!important;align-self:center!important}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes] .planner-clan{display:flex!important;font-size:9px;line-height:12px}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes] .player-class{font-size:9px;line-height:12px}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes]>.planner-badge-controls{grid-column:1;grid-row:2;width:100%;height:46px;gap:3px}
body.res-theme .planner-slot:has(>.planner-person[data-badge-actions-stack=yes]){height:auto!important;min-height:94px!important}
body.res-theme .immortal-battle{container-type:inline-size}
@container(max-width:600px){body.res-theme .immortal-battle-title{flex-basis:100%}body.res-theme .immortal-battle-counts{margin-right:auto}}

body.res-theme .planner-person[data-badge-dual]>.planner-badge-controls{display:flex!important;flex-direction:column}
body.res-theme .planner-person[data-badge-dual] .planner-row-action{position:static!important;inset:auto!important}
body.res-theme .planner-person[data-badge-dual][data-badge-actions-stack=yes] .planner-class-icon{position:static!important;inset:auto!important;width:30px!important}

body.res-theme .planner-person[data-badge-dual] .planner-badge-status>[data-dc-state=registered]{color:#75d69c}
body.res-theme .planner-person[data-badge-dual] .planner-badge-status>[data-dc-state=unregistered]{color:#ff808a}
body.res-theme .planner-person[data-badge-dual] .planner-badge-status>[data-dc-state=absent]{color:var(--gold)}

/* Badge attribute disclosure and readable class ink. */
body.res-theme .planner-stats-popover .planner-savior-state{display:inline-flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap}
body.res-theme .planner-person .planner-class-clan>.player-class{color:var(--class-readable-color,var(--class-color))!important;-webkit-text-stroke:0}

body.res-theme .planner-person .planner-name-resonance{grid-column:2;grid-row:1;display:flex;align-items:center;gap:5px;min-width:0;overflow:hidden}
body.res-theme .planner-person .planner-name-resonance>.player-name{display:block;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:700;line-height:20px;letter-spacing:0;text-transform:none}
body.res-theme .planner-person .planner-visible-resonance{display:inline-flex;align-items:center;gap:3px;flex:none;white-space:nowrap;font-size:12px;line-height:16px;font-variant-numeric:tabular-nums;color:var(--text)}
body.res-theme .planner-person .planner-visible-resonance .res-stat-png{width:16px;height:16px;object-fit:contain;flex:none}
body.res-theme .planner-person[data-badge-identity=stacked] .planner-name-resonance{align-self:end}
body.res-theme .planner-person[data-badge-actions-stack=yes] .planner-name-resonance{align-self:center}
body.res-theme .planner-person[data-badge-actions-stack=yes] .planner-visible-resonance{font-size:10px;gap:2px}
body.res-theme .planner-person[data-badge-actions-stack=yes] .planner-visible-resonance .res-stat-png{width:12px;height:12px}

body.res-theme .planner-stats-popover{overflow-x:auto;overflow-y:hidden}
body.res-theme .planner-stats-popover .planner-compact-stats{width:max-content;white-space:nowrap}
body.res-theme .planner-stats-popover .planner-stat,body.res-theme .planner-stats-popover .planner-savior-state{flex:none}

/* Opponent registration badges are neutral, rather than alliance status colours. */
body.res-theme .planner-person.planner-opponent-card[data-badge-dual] .planner-badge-status>button{background:#000!important;color:#f5f5f5!important;border-color:#686b72}

/* Class choices use readable text, without per-word black/white backing. */
body.res-theme .registration-classes label>span{background:transparent!important;color:var(--class-readable-color,var(--class-color));border-radius:0;padding:0}
body.res-theme .registration-savior>div{display:flex;flex-wrap:wrap;gap:8px}
body.res-theme .registration-savior-option{flex:1 1 150px;min-width:0}

body.res-theme .resource-member-chip .resource-member-clear{display:grid;place-items:center;flex:none;width:28px;height:28px;min-height:28px;padding:5px;border:1px solid var(--res-line,var(--border));border-radius:var(--res-radius,8px);background:var(--res-control-bg,var(--panel));color:var(--gold)}
body.res-theme .resource-member-chip .resource-member-clear svg{width:16px;height:16px}
body.res-theme .resource-member-chip .resource-member-clear:hover{border-color:var(--gold);background:var(--res-control-hover,var(--panel))}

body.res-theme .discord-registration-actions .form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;justify-content:center}
body.res-theme .discord-registration-actions .form-actions>button{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-width:0;white-space:normal}

/* Approved variant 2: class tint, diagonal fade to the middle. */
body.res-theme :is(.planner-person,.db-planner-badge)[data-class-color]{background-image:linear-gradient(104deg,color-mix(in srgb,var(--class-color) 46%,transparent) 0%,color-mix(in srgb,var(--class-color) 18%,transparent) 27%,transparent 55%);background-repeat:no-repeat}

/* Read-only manual DM receipts, one expandable header control. */
body.res-theme .dm-receipt-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body.res-theme .dm-receipt-trigger{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:10px;min-height:28px;padding:4px 7px;white-space:nowrap}
body.res-theme .dm-receipt-trigger>.ui-icon{width:15px;height:15px}
body.res-theme .dm-receipt-trigger [data-dm-count]{display:inline-grid;place-items:center;min-width:20px;border-radius:12px;background:var(--bg);color:var(--text);padding:1px 4px;font-variant-numeric:tabular-nums}
body.res-theme .dm-receipt-trigger.has-pending [data-dm-count]{background:var(--gold);color:var(--bg)}
body.res-theme .dm-receipt-trigger.has-error{border-color:#ff808a}
body.res-theme .dm-receipt-popover{position:fixed;inset:auto;margin:0;box-sizing:border-box;padding:12px;border:1px solid var(--gold);border-radius:10px;background:var(--panel);color:var(--text);overflow:auto;overscroll-behavior:contain;font-family:inherit;box-shadow:0 5px 18px #0006}
body.res-theme .dm-receipt-popover::backdrop{background:transparent}
body.res-theme .dm-receipt-top{position:sticky;top:-12px;padding:4px 0 8px;background:var(--panel);z-index:1}
body.res-theme .dm-receipt-top header{display:flex;align-items:center;gap:7px;color:var(--gold);margin-bottom:10px}
body.res-theme .dm-receipt-top header>strong{margin-right:auto}
body.res-theme .dm-receipt-top header>button{display:grid;place-items:center;width:28px;height:28px;padding:5px;border:1px solid var(--border);border-radius:7px;background:var(--bg);color:var(--gold)}
body.res-theme .dm-receipt-popover .ui-icon{width:16px;height:16px;flex:none}
body.res-theme .dm-receipt-popover [role=tablist]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:8px}
body.res-theme .dm-receipt-popover [role=tab]{min-width:0;padding:7px 4px;border:1px solid var(--border);border-radius:6px;background:var(--bg);color:var(--text);font-size:11px;white-space:normal}
body.res-theme .dm-receipt-popover [role=tab][aria-selected=true]{border-color:var(--gold);color:var(--gold)}
body.res-theme .dm-receipt-popover [role=tab] b{margin-left:4px;font-variant-numeric:tabular-nums}
body.res-theme .dm-receipt-popover input{box-sizing:border-box;width:100%;min-width:0;margin:0 0 6px}
body.res-theme .dm-receipt-popover [data-dm-alert]:empty,body.res-theme .dm-receipt-popover [data-dm-excluded]:empty{display:none}
body.res-theme .dm-receipt-popover [data-dm-alert]{color:#ff808a;margin:4px 0}
body.res-theme .dm-receipt-popover small{color:var(--muted);font-size:11px}
body.res-theme .dm-receipt-popover ul{list-style:none;padding:0;margin:0}
body.res-theme .dm-receipt-row{display:grid;grid-template-columns:30px minmax(0,1fr) minmax(145px,.85fr);align-items:center;gap:8px;padding:10px 0;border-top:1px solid var(--border)}
body.res-theme .dm-receipt-icon img{width:30px;max-height:40px;object-fit:contain}
body.res-theme .dm-receipt-person,body.res-theme .dm-receipt-state{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}
body.res-theme .dm-receipt-person strong{font-size:14px}
body.res-theme .dm-receipt-state{text-align:right;font-size:11px;color:var(--gold)}
body.res-theme .dm-receipt-row.is-confirmed .dm-receipt-state{color:#75d69c}
body.res-theme .dm-receipt-row.is-failed .dm-receipt-state{color:#ff808a}
body.res-theme .dm-receipt-empty{padding:12px 0;color:var(--muted);font-size:12px}
@media(max-width:500px){body.res-theme .dm-receipt-row{grid-template-columns:24px minmax(0,1fr);gap:7px}body.res-theme .dm-receipt-state{grid-column:2;text-align:left}body.res-theme .dm-receipt-icon img{width:24px}body.res-theme .dm-receipt-popover [role=tab]{font-size:10px}}

/* Pool switch follows the width of the resizable player panel. */
body.res-theme .planner-right > header > .segmented-buttons {
  display:flex;width:100%;box-sizing:border-box;min-width:0;
}
body.res-theme .planner-right > header > .segmented-buttons > [data-pool] {
  flex:1 1 0;min-width:0;justify-content:center;white-space:nowrap;
}
body.res-theme .planner-right > header > .segmented-buttons > [data-pool][hidden] {display:none;}

/* Temporary selection lock, released on drop/cancel; normal text remains selectable. */
html.res-pointer-drag,html.res-pointer-drag * {user-select:none!important;-webkit-user-select:none!important;-webkit-user-drag:none!important;}

body.res-theme .opponent-pool-filters > label {display:flex;flex-direction:column;gap:4px;min-width:0;}
body.res-theme .opponent-pool-filters > label > select {width:100%;min-width:0;}

body.res-theme .immortal-battle-bar.planner-drop {outline:2px solid var(--gold,#d9ad60);outline-offset:-2px;}

/* Consistent outlined metrics; team participation is the single filled metric. */
body.res-theme .clan-participation-card > button[data-clan-metric] {
  min-height:44px;padding:8px;border:1px solid var(--gold);border-radius:6px;
  font-family:inherit;font-size:12px;
}
body.res-theme .clan-participation-card > button[data-clan-metric] + button[data-clan-metric] {margin-top:4px;}
body.res-theme .clan-participation-card > button[data-clan-metric]:not(.clan-team-metric) {background:transparent;}
body.res-theme .clan-participation-card > button[data-clan-metric] > span {display:flex;align-items:center;gap:7px;}
body.res-theme .clan-participation-card > button[data-clan-metric] .ui-icon {width:16px;height:16px;flex-shrink:0;}

body.res-theme .event-order-handle {display:inline-flex;align-items:center;justify-content:center;flex:none;width:26px;height:30px;padding:3px;border:0;background:transparent;color:var(--gold);cursor:grab;touch-action:none;}
body.res-theme .event-order-handle .ui-icon {width:18px;height:22px;stroke-width:4;}
body.res-theme .event-order-handle:focus-visible {outline:1px solid var(--gold);border-radius:4px;}
body.res-theme .event-order-moving {opacity:.55;}
body.res-theme .event-order-before {box-shadow:0 -2px 0 var(--gold);}
body.res-theme .event-order-after {box-shadow:0 2px 0 var(--gold);}

/* Aligned event columns, with participant roles from the existing event scope. */
body.res-theme #event-cards {display:block;--event-columns:26px minmax(180px,2fr) 85px 145px 62px minmax(120px,1fr) minmax(150px,1.25fr) 145px 16px;}
body.res-theme .event-list-columns,body.res-theme .event-card-detail > summary.event-summary-grid {display:grid;grid-template-columns:var(--event-columns);align-items:center;gap:10px;}
body.res-theme .event-list-columns {padding:6px 12px 9px;color:var(--muted);font-size:10px;font-weight:600;}
body.res-theme #event-cards > .event-card {margin-bottom:8px;}
body.res-theme .event-summary-grid > .event-summary-cell {display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0;font-size:11px;overflow-wrap:anywhere;}
body.res-theme .event-summary-grid > .event-summary-cell:first-of-type {flex-wrap:nowrap;gap:8px;}
body.res-theme .event-summary-cell h2 {font-size:14px;margin:0;min-width:0;width:auto;}
body.res-theme .event-summary-cell > .ui-icon {width:19px;height:19px;flex:none;}
body.res-theme .event-summary-cell .discord-role-chip {max-width:100%;white-space:normal;}
body.res-theme .event-summary-cell .role-chip-name {overflow-wrap:anywhere;min-width:0;}
body.res-theme .event-summary-grid > .event-order-handle {grid-column:1;grid-row:1;}
body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="0"] {grid-column:2;}
body.res-theme .event-summary-grid > .ui-icon:last-child {margin:0;width:16px;}
@media(max-width:1450px){
 body.res-theme .event-list-columns {display:none;}
 body.res-theme .event-card-detail > summary.event-summary-grid {grid-template-columns:26px repeat(3,minmax(0,1fr)) 16px;align-items:start;}
 body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="0"] {grid-column:2 / 5;}
 body.res-theme .event-summary-grid > .event-summary-cell:not([data-event-column="0"]) {grid-column:auto;display:flex;flex-direction:column;align-items:flex-start;}
 body.res-theme .event-summary-grid > .event-summary-cell:not([data-event-column="0"])::before {content:attr(data-label);color:var(--muted);font-size:9px;}
 body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="1"],body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="4"] {grid-column:2;}
 body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="6"] {grid-column:2 / 5;}
 body.res-theme .event-summary-grid > .ui-icon:last-child {grid-column:5;grid-row:1;}
}
@media(max-width:640px){
 body.res-theme .event-card-detail > summary.event-summary-grid {grid-template-columns:24px minmax(0,1fr) minmax(0,1fr) 16px;gap:9px 6px;}
 body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="0"] {grid-column:2 / 4;}
 body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="1"],body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="3"],body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="5"] {grid-column:2;}
 body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="2"],body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="4"] {grid-column:3;}
 body.res-theme .event-summary-grid > .event-summary-cell[data-event-column="6"] {grid-column:2 / 4;}
 body.res-theme .event-summary-grid > .ui-icon:last-child {grid-column:4;}
}

/* Event headings stay centered over their corresponding data columns. */
body.res-theme .event-list-columns > span {min-width:0;text-align:center;overflow-wrap:anywhere;line-height:1.35;}
@media(min-width:1451px){
 body.res-theme #event-cards {--event-columns:26px minmax(180px,2fr) 85px 145px 100px minmax(140px,1fr) minmax(150px,1.25fr) 145px 16px;}
 body.res-theme .event-card-detail > summary.event-summary-grid > .event-summary-cell {justify-content:center;text-align:center;}
 body.res-theme .event-summary-cell[data-event-column="5"] {flex-direction:column;}
}

/* Native top layer keeps the guild picker above banners and sidebar stacking contexts. */
body.res-theme .guild-menu[popover] {position:fixed!important;margin:0!important;right:auto!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box;}
body.res-theme .guild-menu[popover]:not(:popover-open) {display:none;}
body.res-theme .guild-menu[popover]:popover-open {display:block;}

body.res-theme .event-summary-cell .event-countdown {display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;}
body.res-theme .event-summary-cell .event-countdown-label,body.res-theme .event-summary-cell .event-countdown-value {display:block;white-space:nowrap;}

/* Events use the same compact split header as the roster page. */
body.res-theme .header-information.events-split-header {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 24px;align-items:center;}
body.res-theme .events-split-header > .header-heading {min-width:0;}
body.res-theme .events-split-header > .events-header-overview {grid-column:2;grid-row:1 / 3;margin:0;min-width:0;width:100%;padding:12px 16px;box-sizing:border-box;}
body.res-theme .events-split-header > .top-actions {grid-column:1;margin:0;justify-self:start;}
body.res-theme .events-header-overview > h2 {margin:0 0 10px;font-size:12px;}
body.res-theme .events-header-overview .control-summary > section {padding:6px 4px;margin:0;}
body.res-theme .events-header-overview .control-summary h2 {font-size:22px;margin:0 0 4px;}
body.res-theme .events-header-overview .control-summary small {font-size:9px;line-height:1.35;overflow-wrap:anywhere;}
@media(max-width:980px){
 body.res-theme .header-information.events-split-header {grid-template-columns:minmax(0,1fr);}
 body.res-theme .events-split-header > .events-header-overview {grid-column:1;grid-row:3;}
 body.res-theme .events-split-header > .top-actions {grid-row:2;}
}

/* Database badges share the planner identity, class gradient and attribute disclosure. */
body.res-theme .db-planner-badge {position:relative;display:grid;grid-template-columns:minmax(0,1fr) 90px;align-items:center;gap:4px;min-width:0;border:1px solid var(--border);border-left:3px solid var(--class-color);border-radius:6px;background-color:#1b2029;}
body.res-theme .db-planner-badge > .db-player-row {display:grid;grid-template-columns:40px minmax(0,1fr) minmax(90px,34%);align-items:center;gap:8px;min-width:0;min-height:60px;padding:5px 8px;border:0;background:transparent;color:var(--text);width:100%;}
body.res-theme .db-planner-badge .db-badge-class-icon {display:flex;align-items:center;justify-content:center;}
body.res-theme .db-planner-badge .db-badge-class-icon img {width:38px;height:44px;object-fit:contain;}
body.res-theme .db-badge-identity {display:flex;align-items:center;flex-wrap:wrap;gap:4px 7px;min-width:0;}
body.res-theme .db-planner-badge .db-nickname {display:block;min-width:0;max-width:100%;font-weight:800;font-size:14px;line-height:1.3;overflow-wrap:anywhere;}
body.res-theme .db-planner-badge .db-reso {display:inline-flex;align-items:center;gap:4px;white-space:nowrap;color:var(--text);font-size:12px;}
body.res-theme .db-planner-badge .db-reso img {width:16px;height:16px;object-fit:contain;}
body.res-theme .db-badge-meta {display:flex;flex-direction:column;gap:3px;min-width:0;}
body.res-theme .db-planner-badge .db-class {color:var(--class-readable-color,var(--class-color))!important;font-size:11px;line-height:1.3;}
body.res-theme .db-planner-badge .db-clan {display:flex;gap:4px;font-size:10px;line-height:1.3;}
body.res-theme .db-badge-attributes {min-width:0;margin:0 5px 0 0;}
body.res-theme .db-badge-attributes > summary {display:flex;align-items:center;justify-content:center;gap:3px;border:1px solid var(--border);border-radius:4px;padding:5px 3px;color:var(--gold);font-size:9px;cursor:pointer;list-style:none;}
body.res-theme .db-badge-attributes > summary .ui-icon {width:12px;height:12px;}
body.res-theme .db-badge-attributes[open] {grid-column:1/-1;margin:0 6px 5px;}
body.res-theme .db-badge-attributes[open] > summary {margin-left:auto;width:84px;}
body.res-theme .db-badge-attributes[open] > summary .ui-icon {transform:rotate(180deg);}
body.res-theme .db-badge-attributes > div {display:flex;align-items:center;gap:12px;padding:9px 4px;overflow-x:auto;white-space:nowrap;}
body.res-theme .db-badge-attributes > div > span {display:inline-flex;align-items:center;gap:5px;font-size:11px;flex:none;}
body.res-theme .db-badge-attributes > div img {width:17px;height:17px;object-fit:contain;}
@media(max-width:640px){body.res-theme .db-planner-badge {grid-template-columns:minmax(0,1fr);}body.res-theme .db-badge-attributes {margin:0 6px 5px;}body.res-theme .db-badge-attributes > summary {width:84px;margin-left:auto;}}

/* Header statistics use readable label widths on narrow screens. */
@media(max-width:600px){body.res-theme .events-header-overview .control-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body.res-theme .events-header-overview .control-summary small{font-size:11px;overflow-wrap:normal;word-break:normal}body.res-theme .events-header-overview .control-summary>section{border:0;padding:8px}}
