/* Shared presentation for all existing controls. Planner card/slot geometry stays in the planner stylesheets. */
body.res-theme{color-scheme:dark;--res-control-bg:#191e28;--res-control-hover:#252b35;--res-line:#695636;--res-radius:8px}
body.res-theme :is(button,.button,.flag-choice,input[type=submit],input[type=button]){text-transform:uppercase}
body.res-theme :is(.res-data,.role-chip-name,.player-name,.player-class,.guild-option,.guild-trigger,.resource-option,.resource-member-chip,.resource-channel-chip,.db-player-row,.profile-directory-card,.permission-event-options label,.permission-event-chips .tag,.picker-results button,select,option){text-transform:none}
body.res-theme :is(button,.button,.flag-choice){max-width:100%}
body.res-theme button:not(.slot-add,.slot-remove){background-color:var(--res-control-bg)}
body.res-theme :is(.button,button.action,.db-pagination button,.db-view-controls button,.db-import-tools button,.db-clan-manager button,.resurrection-confirm button){background:var(--res-control-bg);color:var(--text);border:1px solid var(--res-line);border-radius:var(--res-radius)}
body.res-theme :is(button,.button):is(.primary,.success,.danger,.warning,.db-save,.db-gold-primary){background:var(--res-control-bg)!important;border-color:var(--gold)!important;color:var(--text)!important;font-weight:700}
body.res-theme :is(button,.button):is(.danger,.danger-outline){border-color:#ab5866!important}
body.res-theme :is(button,.button):is(.primary,.success,.danger,.warning,.db-save,.db-gold-primary):hover:not(:disabled){background:var(--res-control-hover)!important}
body.res-theme :is(.button,button.action,.db-action-tile,.resource-option,.guild-option):hover:not(:disabled){border-color:var(--gold)}
body.res-theme :is(button,.button) svg{color:var(--gold)!important}
body.res-theme :is(button,.button):is(.primary,.success,.danger,.warning,.db-save,.db-gold-primary) svg{color:var(--gold)!important}
/* Class, attendance, Savior and statistic colours carry information. */
body.res-theme :is(.planner-person,.db-player-row,.class-group,.db-stat-icon,.savior-shield,[data-stat-color],.db-status-card,.db-savior-card) svg{color:inherit!important}
body.res-theme :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--gold);outline-offset:3px}
body.res-theme :is(button,.button):disabled{cursor:not-allowed}
body.res-theme :is(.res-form,.res-dialog,fieldset){min-width:0}
body.res-theme :is(input:not([type=checkbox],[type=radio],[type=range],[type=hidden]),textarea,.res-select){background-color:#10151e;color:var(--text);border:1px solid #566071;border-radius:var(--res-radius);min-width:0}
body.res-theme .res-select{appearance:none;padding-right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d9b66d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;text-overflow:ellipsis}
body.res-theme .res-select option{background:#141923;color:var(--text)}
body.res-theme input[type=file]::file-selector-button{background:#191e28;color:var(--gold);border:1px solid var(--res-line);border-radius:6px;padding:6px 10px;margin-right:8px;font:inherit;text-transform:uppercase;cursor:pointer}
body.res-theme input[type=range]{accent-color:var(--gold)}
body.res-theme :is(.resource-results,.guild-menu){background:#141923;border-color:var(--res-line);border-radius:var(--res-radius)}
body.res-theme :is(.resource-option,.guild-option){background:#191e28}
body.res-theme .res-checkbox,body.res-theme .res-radio{appearance:none;display:inline-block!important;vertical-align:middle;flex:0 0 22px;width:22px!important;height:22px!important;min-height:22px!important;max-height:22px!important;min-width:22px!important;max-width:22px!important;padding:0!important;margin:0 8px 0 0!important;border:1px solid #8f7950;border-radius:5px;background:#10151e;cursor:pointer}
body.res-theme .res-radio{border-radius:50%}
body.res-theme .res-checkbox:checked{background:#202631 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9b66d' stroke-width='3'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center/18px no-repeat;border-color:var(--gold)}
body.res-theme .res-radio:checked{background:radial-gradient(circle,var(--gold) 0 5px,#10151e 6px);border-color:var(--gold)}
body.res-theme :is(.res-checkbox,.res-radio):disabled{opacity:.5;cursor:not-allowed}
body.res-theme .res-check-option:not(.appearance-card){line-height:1.6}
body.res-theme .res-chosen::after,body.res-theme .res-variant:has(input:checked)::after{content:attr(data-selection-label);display:block;color:#7cda9a;font-size:10px;font-weight:750;line-height:14px;letter-spacing:.02em;margin:3px 0 0;text-transform:uppercase}
body.res-theme .res-chosen{border-color:var(--gold)}
body.res-theme button.res-chosen{background:#29271f!important;color:var(--text)!important}
body.res-theme .sidebar-collapsed #logout::before{content:none}
body.res-theme .sidebar-collapsed #logout svg{width:19px!important;height:19px!important;min-width:19px;flex:none;display:inline-block}
body.res-theme .res-selection-chip::after{content:none}
body.res-theme .res-check-option:has(>input[role=switch])::after{content:attr(data-switch-state);color:var(--gold);font-size:11px;font-weight:750;margin-left:4px}
body.res-theme :is(.res-mode-tile,.owner-section-picker .button,.db-action-tile).res-choice{position:relative;padding-bottom:24px}
body.res-theme :is(.res-mode-tile,.owner-section-picker .button,.db-action-tile).res-chosen::after{position:absolute;right:10px;bottom:5px;margin:0}
body.res-theme :is(.db-savior-card,.db-status-card,.appearance-card){position:relative}
body.res-theme .db-savior-card{padding-bottom:28px!important}
body.res-theme .db-savior-choice .db-savior-card{min-height:104px}
body.res-theme .db-savior-choice>div{grid-auto-rows:1fr}
body.res-theme :is(.db-savior-card,.db-status-card,.appearance-card):has(input:checked)::after{position:absolute;right:8px;bottom:5px;margin:0;white-space:nowrap}
body.res-theme .db-status-card{flex-wrap:wrap}
body.res-theme .permission-state.res-radio-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;width:100%;min-height:40px}
body.res-theme .permission-state .res-radio{margin:0!important}
body.res-theme .permission-state.res-radio-option::after{content:none}
body.res-theme .permission-columns>span{min-width:0;overflow-wrap:anywhere}
body.res-theme .flag-choice{flex-wrap:wrap;justify-content:center}
body.res-theme .flag-choice.res-chosen::after{flex-basis:100%;margin:0;font-size:9px}
body.res-theme .sidebar-collapsed .flag-choice.res-chosen::after{flex-basis:100%;font-size:7px;line-height:1.3}
body.res-theme .res-toggle{border:1px solid var(--res-line)!important;border-radius:20px;background:#161b24!important;color:var(--text)}
body.res-theme button.res-toggle{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;min-height:34px;text-transform:uppercase}
body.res-theme button.res-toggle::before{content:'';box-sizing:border-box;flex:0 0 38px;width:38px;height:22px;border:1px solid #8f7950;border-radius:12px;background:radial-gradient(circle at 10px 10px,#a9afba 0 6px,transparent 7px),#10151e}
body.res-theme button.res-toggle[aria-checked=true]::before{background:radial-gradient(circle at 26px 10px,var(--gold) 0 6px,transparent 7px),#10151e;border-color:var(--gold)}
body.res-theme button.res-toggle::after{content:none}
body.res-theme input.res-toggle[role=switch]{position:static!important;opacity:1!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:22px!important;flex-basis:38px;border-radius:14px;background:radial-gradient(circle at 10px 10px,#a9afba 0 6px,transparent 7px),#10151e!important}
body.res-theme input.res-toggle[role=switch]:checked{background:radial-gradient(circle at 26px 10px,var(--gold) 0 6px,transparent 7px),#10151e!important;border-color:var(--gold)!important}
body.res-theme input.res-toggle[role=switch]::before,body.res-theme input.res-toggle[role=switch]::after{content:none!important;display:none!important}
body.res-theme :is(.res-dialog,.form-card,.event-form-section){border-color:var(--res-line);background-color:#171c25}
body.res-theme .res-dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
body.res-theme :is(.res-dialog header,.res-dialog footer){border-color:var(--res-line)}
body.res-theme :is(.res-dialog h2,.res-dialog h3,.res-form legend){color:var(--gold)}
body.res-theme :is(.form-actions,.res-dialog footer,.control-tabs,.level-picker,.segmented-buttons){flex-wrap:wrap}
body.res-theme :is(.form-grid,.res-two-columns,.notification-columns,.owner-guilds,.control-summary)>*{min-width:0}
body.res-theme :is(.field-error,.db-field-error,.db-form-error){color:#ff9ca9}
body.res-theme .db-stat-tile dd{line-height:1}
body.res-theme .db-stat-tile dd:has(>[data-db-text]){font-size:13px!important;line-height:1.25;font-weight:500;color:#bac3d2!important}
body.res-theme :is(.notice,.empty){overflow-wrap:anywhere}
body.res-theme :is(.db-pagination,.pagination){display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px}
@media(max-width:640px){
 body.res-theme .res-dialog{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
 body.res-theme :is(.res-dialog footer,.form-actions){gap:8px}
 body.res-theme :is(.control-tabs,.level-picker,.segmented-buttons){gap:6px}
 body.res-theme :is(.res-dialog .form-grid,.control-summary,.owner-guilds){grid-template-columns:minmax(0,1fr)}
 body.res-theme .res-dialog :is(input:not([type=checkbox],[type=radio],[type=range]),select,textarea){max-width:100%}
 body.res-theme .db-status-choice{display:grid;grid-template-columns:minmax(0,1fr)}
 body.res-theme .appearance-card{grid-template-columns:22px 65px minmax(0,1fr)}
 body.res-theme .permission-columns{grid-template-columns:minmax(0,1fr) repeat(3,50px);gap:4px}
 body.res-theme .db-profile-comparison :is(.db-primary-metrics,.db-secondary-metrics){grid-template-columns:minmax(0,1fr)}
}
/* Receipt corrections: selection markers belong only to deliberate variants. */
body.res-theme .res-data,body.res-theme .res-data *{text-transform:none!important}
body.res-theme :is(.res-check-option,.res-radio-option):not(.res-variant)::after{content:none!important}
body.res-theme .res-choice{position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;align-self:stretch;gap:3px;padding:8px 5px 23px!important;height:68px;min-height:68px;max-height:68px;box-sizing:border-box;white-space:normal;text-align:center}
body.res-theme .res-choice::after{content:attr(data-selection-label);display:block;position:absolute;left:3px;right:3px;bottom:5px;font-size:10px;line-height:14px;height:14px;color:#7cda9a;visibility:hidden}
body.res-theme .res-choice.res-chosen::after{visibility:visible}
body.res-theme .res-choice>.res-variant-label{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:0;max-width:100%;line-height:15px}
body.res-theme :is(.event-mode-tile.selected,.res-mode-tile.active){background:#29271f!important;color:var(--text)!important;border-color:var(--gold)!important}
body.res-theme :is([data-edit-clan],.immortal-clan-edit){text-transform:none!important}
body.res-theme [data-profile]{text-transform:none}
body.res-theme .db-savior-card.res-variant:has(input:checked)::after{left:4px;right:4px;text-align:center;color:#7cda9a}
body.res-theme .db-savior-card>.res-savior-icon{width:28px;height:28px;flex:0 0 28px}
body.res-theme .db-savior-card>svg:last-child{display:none}
body.res-theme .db-savior-choice .db-savior-card{grid-template-columns:28px minmax(0,1fr);color:var(--text);background:#191e28;border-color:#695636}
body.res-theme .db-savior-choice .db-savior-card:has(input:checked){background:#29271f!important;border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold)}
body.res-theme .discord-role-chip{background:#191e28;border-color:#695636;color:#e5c786}
body.res-theme .role-at{color:var(--gold);font-weight:800;font-size:16px;line-height:1;flex:none}
body.res-theme .role-chip-name{color:var(--text)}
body.res-theme .res-stat-png{width:18px;height:18px;object-fit:contain;vertical-align:middle;flex:none;background:none;border:0}
body.res-theme .profile-card-character :is(.res-class-png,.res-stat-png){width:14px;height:14px;object-fit:contain;vertical-align:middle}
body.res-theme .res-class-png{width:20px;height:20px;object-fit:contain;vertical-align:middle;flex:none;background:none;border:0;margin-right:5px}
body.res-theme .res-savior-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;font-size:11px;color:#a9afba;background:none;border:0}
body.res-theme .res-savior-icon img{display:block;width:100%;height:100%;object-fit:contain;border:0;background:none}
body.res-theme .db-stat-icon .res-stat-png{width:30px;height:30px}
body.res-theme .db-field-label>.res-stat-png{margin-right:6px}
body.res-theme [data-stat-sort]{display:flex;align-items:center;justify-content:center;gap:5px;text-align:center;width:100%}
body.res-theme :is(td[data-stat-value],th:has([data-stat-sort])){text-align:center}
body.res-theme #sidebar-toggle{justify-content:center}
body.res-theme #nav button{height:44px;min-height:44px;max-height:44px;box-sizing:border-box}
body.res-theme .nav-label{min-width:0;white-space:normal;font-size:12px;line-height:15px;overflow-wrap:normal}
body.res-theme :is(.guild-pick,.guild-trigger,.guild-menu){min-width:0;max-width:100%;box-sizing:border-box}
body.res-theme .sidebar-collapsed .guild-menu{max-width:min(310px,calc(100vw - 100px))}
body.res-theme .guild-fallback{background:#30291f;color:var(--gold)}
body.res-theme :is(.guild-trigger,.guild-option)>span:not(.guild-fallback){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.res-theme .control-summary:has([data-event-summary]){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:0}
body.res-theme [data-event-summary].card{padding:8px 3px;text-align:center;margin:0;border:0;border-right:1px solid #695636;border-radius:0;display:flex;flex-direction:column-reverse;align-items:center}
body.res-theme [data-event-summary]:last-child{border-right:0}
body.res-theme [data-event-summary] h2{font-size:25px;margin:0;line-height:1.15;color:var(--gold)}
body.res-theme [data-event-summary] small{font-size:10px;text-transform:uppercase;margin-top:4px}
body.res-theme .res-mode-tiles:has([data-create-mode]){grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;grid-auto-rows:1fr}
body.res-theme .res-mode-tile[data-create-mode]{height:138px!important;min-height:138px;max-height:138px;padding:12px!important;display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center}
body.res-theme .res-mode-tile[data-create-mode]>svg{height:30px!important;width:30px!important;min-width:30px;padding:0;background:none;border-radius:0}
body.res-theme .res-mode-tile[data-create-mode]>strong{font-size:13px;line-height:16px}
body.res-theme .res-mode-tile[data-create-mode]>p{margin:0;font-size:11px}
body.res-theme .res-mode-tile[data-create-mode]>b{font-size:10px}
body.res-theme .event-cards{display:flex;flex-direction:column;align-items:stretch;gap:9px}
body.res-theme .event-list-empty[hidden]{display:none}
body.res-theme .event-card{padding:0;min-width:0;width:100%}
body.res-theme .event-card-detail>summary{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px;min-height:54px;cursor:pointer}
body.res-theme .event-card-detail>summary>svg{width:22px;height:22px;flex:none;color:var(--gold)}
body.res-theme .event-card-detail>summary>svg:first-child{margin-left:0}
body.res-theme .event-card-detail>summary>svg:last-child{margin-left:auto;width:16px}
body.res-theme .event-card-detail>summary>h2{font-size:16px;margin:0;min-width:0;flex:1 1 170px;overflow-wrap:anywhere;text-transform:none}
body.res-theme .event-card-detail>summary>time,body.res-theme .event-card-detail>summary>span{font-size:11px}
body.res-theme .event-card-detail>h3,body.res-theme .event-card-actions,body.res-theme .event-admin-actions{margin:12px}
body.res-theme .event-card-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
body.res-theme .event-card-actions>.button{height:72px;min-height:72px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:7px;white-space:normal;text-align:center;font-size:11px;line-height:14px}
body.res-theme .event-card-actions>.button>svg{width:22px;height:22px;flex:none}
body.res-theme .event-card-actions b{font:inherit}
body.res-theme .event-countdown{font-variant-numeric:tabular-nums;color:var(--gold);white-space:normal}
body.res-theme .event-date-field{position:relative;display:block}
body.res-theme .event-date-group>b{text-transform:uppercase}
body.res-theme .event-date-display{padding-right:38px!important;width:100%;font-variant-numeric:tabular-nums;font-size:14px}
body.res-theme .calendar-trigger{position:absolute;bottom:4px;right:4px;width:30px;height:30px;min-height:0;padding:4px}
body.res-theme .calendar-popover{position:fixed;z-index:20000;box-sizing:border-box;padding:10px;max-width:calc(100vw - 16px);background:#171c25;border:1px solid #a58a50;border-radius:9px;box-shadow:0 10px 35px #000b}
body.res-theme .calendar-heading{display:grid;grid-template-columns:24px minmax(0,1fr) 65px 24px;gap:4px;align-items:center;margin-bottom:7px}
body.res-theme .calendar-heading :is(input,select,button){width:100%;min-width:0;padding:3px;height:30px;min-height:30px;font-size:12px;box-sizing:border-box}
body.res-theme .calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
body.res-theme .calendar-days button{height:30px;min-height:30px;padding:2px;border:1px solid #3a3e46;border-radius:4px}
body.res-theme .calendar-days [aria-pressed=true]{border-color:var(--gold);color:var(--gold)}
body.res-theme .event-preview-profile{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.res-theme .event-preview-profile>:is(h3,details){grid-column:1/-1}
body.res-theme .event-preview-profile>p{padding:9px;background:#111721;border:1px solid #514632;border-radius:7px;margin:0;overflow-wrap:anywhere}
body.res-theme .profile-directory{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
body.res-theme .profile-card{display:flex;flex-direction:column;align-items:stretch;gap:9px;padding:13px;min-width:0;min-height:0;text-align:left}
body.res-theme .profile-card-identity{display:flex;align-items:center;gap:10px;min-width:0}
body.res-theme .profile-card-identity b{overflow-wrap:anywhere;text-transform:none;font-size:15px}
body.res-theme .profile-avatar{width:40px;height:40px;flex:none;object-fit:cover;border-radius:50%}
body.res-theme :is(.profile-card-character,.profile-card-dates){display:grid;gap:4px;font-size:11px;color:#c5cbd5}
body.res-theme .profile-card small{margin-top:auto;font-size:10px}
body.res-theme .control-dialog-body>h3:has(.profile-avatar){display:flex;align-items:center;gap:12px}
body.res-theme .permission-grant-tools{display:grid;grid-template-columns:minmax(120px,1fr) minmax(110px,.6fr) minmax(110px,.6fr) auto;gap:8px;margin:12px 0}
body.res-theme .permission-grant-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px}
body.res-theme .permission-grant-table :is(th,td){padding:9px 7px;text-align:left;border-bottom:1px solid #343941;overflow-wrap:anywhere;vertical-align:middle}
body.res-theme .permission-grant-table th{text-transform:uppercase;color:var(--gold);font-size:11px}
body.res-theme .permission-grant-table th:nth-child(2){width:17%}
body.res-theme .permission-grant-table th:last-child{width:24%}
body.res-theme .permission-grant-actions{display:flex;gap:5px;flex-wrap:wrap}
body.res-theme .permission-grant-actions button{font-size:10px;padding:5px 7px;display:flex;align-items:center;gap:4px}
body.res-theme :is(#reminder-times,#notify-audience,#notify-delivery){display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));width:100%;box-sizing:border-box}
body.res-theme .notification-columns>*,body.res-theme .notification-body{min-width:0}
body.res-theme .planner-controls-layout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body.res-theme .planner-controls-layout>.res-section{margin:0;padding:12px}
body.res-theme .planner-controls-layout>.planner-primary-controls{grid-column:1/-1}
body.res-theme .planner-primary-controls>h2{display:flex;flex-wrap:wrap;gap:10px}
body.res-theme #roster-status{margin-left:auto;font-size:11px;color:#c5cbd5;font-weight:500}
body.res-theme .planner-controls-layout .roster-toolbar-row{display:flex;flex-wrap:wrap;gap:7px}
body.res-theme .planner-controls-layout .button{font-size:10px;line-height:14px;min-height:34px;white-space:normal}
body.res-theme .planner-controls-layout h2{font-size:12px}
/* Existing geometry was measured in Chromium against the verified backup. */
body.res-theme .planner-person{container-type:inline-size;display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;grid-template-rows:24px 28.25px!important;column-gap:3px;row-gap:0!important;box-sizing:border-box;height:58.25px!important;min-height:58.25px!important;max-height:58.25px!important;padding:2px 3px!important;overflow:hidden;font-size:11px}
body.res-theme .planner-slot{height:48px!important;min-height:48px!important;max-height:48px!important;box-sizing:border-box;align-items:center}
body.res-theme .immortal-grid .planner-slot{height:62px!important;min-height:62px!important;max-height:62px!important}
body.res-theme .immortal-grid .planner-person{height:50px!important;min-height:50px!important;max-height:50px!important;grid-template-rows:22px 20px!important;padding-top:3px!important;padding-bottom:3px!important}
body.res-theme .planner-person>.player-name{grid-column:1;grid-row:1;min-width:0;font-size:clamp(8px,3cqi,12px);text-transform:none}
body.res-theme .planner-person>.player-class{grid-column:2;grid-row:1;display:flex;justify-content:center;align-items:center;min-width:0;width:clamp(30px,18cqi,60px);height:20px}
body.res-theme .planner-mini-banner{width:auto;height:20px;max-width:100%;object-fit:contain;border:0;border-radius:0;background:none}
body.res-theme .planner-person>.planner-row-action{grid-column:3;grid-row:1;display:flex;align-items:center;justify-self:end;gap:1px;width:auto;min-width:0}
body.res-theme .planner-person>.planner-row-action button{width:16px;height:16px;min-height:0;padding:0;border:0;display:grid;place-items:center;font-size:12px}
body.res-theme .planner-person>.planner-row-action svg{width:12px;height:12px}
body.res-theme .planner-person>.planner-clan{grid-column:1;grid-row:2;min-width:0;display:flex;align-items:center;gap:2px;width:clamp(20px,16cqi,70px);font-size:clamp(6px,2cqi,9px);line-height:12px;white-space:nowrap}
body.res-theme .planner-clan>span{overflow:hidden;text-overflow:ellipsis;min-width:0}
body.res-theme .planner-clan>svg{width:10px;height:10px;flex:none;color:var(--gold)}
body.res-theme .planner-person>.planner-compact-stats{grid-column:1/4;grid-row:2;display:flex;align-items:center;justify-content:center;gap:clamp(1px,.5cqi,3px);min-width:0;margin-left:clamp(21px,17cqi,72px);margin-right:clamp(12px,6cqi,28px);height:16px}
body.res-theme .planner-stat{display:inline-flex;align-items:center;gap:1px;min-width:0;flex:0 1 auto;font-size:clamp(6px,2.8cqi,10px);line-height:12px;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--text)}
body.res-theme .planner-stat>.res-stat-png,body.res-theme .planner-compact-stats>.res-savior-icon{width:clamp(8px,4cqi,16px);height:clamp(8px,4cqi,16px);flex-shrink:0}
body.res-theme .planner-stat b{font-weight:600;letter-spacing:-.3px}
body.res-theme .planner-person>.planner-badge-status{grid-column:3;grid-row:2;display:flex;gap:1px;justify-content:flex-end;align-items:center;min-width:0;max-width:26px}
body.res-theme .planner-badge-status .planner-signup-warning{position:static;display:inline-flex;width:13px;max-width:13px;height:13px;min-width:13px;padding:0;font-size:0;line-height:12px;margin:0;overflow:hidden}
body.res-theme .planner-badge-status .planner-signup-warning>span{font-size:10px}
body.res-theme .planner-badge-status :is(.member-line,.manual-status){font-size:0!important;line-height:12px;display:flex;gap:0;padding:0;min-width:0;height:13px;flex-wrap:nowrap}
body.res-theme .planner-badge-status .member-line>span{display:none}
body.res-theme .planner-badge-status :is(button,svg){width:12px;height:12px;min-width:12px;min-height:0;padding:0;font-size:0;flex:none}
body.res-theme .planner-badge-status .manual-status>span{display:none}
body.res-theme .planner-person>.planner-inline-stats{display:none!important}
body.res-theme .planner-full-stat-grid{display:grid;gap:9px;min-width:0;margin:14px 0}
body.res-theme .planner-full-stat-grid>div{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;background:#111721;border:1px solid #514632;border-radius:6px}
body.res-theme .planner-full-stat-grid span{font-size:12px;overflow-wrap:anywhere}
body.res-theme .planner-full-stat-grid b{font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
body.res-theme .res-tooltip{position:fixed;z-index:20050;max-width:calc(100vw - 16px);box-sizing:border-box;padding:6px 9px;border:1px solid #a58a50;border-radius:6px;background:#171c25;color:#f0d59a;font-size:12px;line-height:16px;overflow-wrap:anywhere;pointer-events:none;box-shadow:0 5px 18px #0009}
body.res-theme .res-tooltip[hidden]{display:none}
body.res-theme .planner-slot.occupied{height:59.25px!important;min-height:59.25px!important;max-height:59.25px!important}
body.res-theme .immortal-grid .planner-slot{height:62px!important;min-height:62px!important;max-height:62px!important}
body.res-theme .immortal-grid .planner-opponent-card{height:48.5px!important;min-height:48.5px!important;max-height:48.5px!important;grid-template-rows:20px 22.5px!important}
body.res-theme .planner-full-banner{display:block;width:100%;height:auto;max-height:80px;object-fit:contain;border:0;border-radius:0;background:none}
body.res-theme .class-group>summary:has(.planner-full-banner){position:relative;padding:2px;background:none;border:0;min-width:0}
body.res-theme .class-group>summary:has(.planner-full-banner)>.class-accent{display:none}
body.res-theme .class-group>summary:has(.planner-full-banner)>small{position:absolute;right:7px;top:6px;padding:1px 5px;background:#12151bbf;color:#f0d59a;border-radius:4px}
body.res-theme .slot-add{font-size:14px;font-weight:500;letter-spacing:0;text-align:left;white-space:normal;min-width:0}
body.res-theme .slot-add>span:last-child{min-width:0}
body.res-theme .immortal-opponent-slot:not(:has(.planner-person)){padding:0 4px;gap:5px}
body.res-theme .slot-number{font-size:12px;font-weight:600;width:18px;flex:none}
body.res-theme .roster-conflict pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;max-height:160px;overflow:auto;text-transform:none}
body.res-theme .roster-conflict fieldset{margin:10px 0;border:1px solid #695636}
@media(max-width:1440px){body.res-theme .profile-directory{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1000px){body.res-theme .res-mode-tiles:has([data-create-mode]){grid-template-columns:repeat(2,minmax(0,1fr))}body.res-theme .profile-directory{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){
 body.res-theme .planner-person{height:56.25px!important;min-height:56.25px!important;max-height:56.25px!important;grid-template-rows:22px 28.25px!important}
 body.res-theme .planner-slot.occupied{height:57.25px!important;min-height:57.25px!important;max-height:57.25px!important}
 body.res-theme .immortal-grid .planner-slot{height:62px!important;min-height:62px!important;max-height:62px!important}
 body.res-theme .immortal-grid .planner-person{height:50px!important;min-height:50px!important;max-height:50px!important;grid-template-rows:22px 22px!important}
 body.res-theme .immortal-grid .planner-opponent-card{height:46.5px!important;min-height:46.5px!important;max-height:46.5px!important;grid-template-rows:18px 22.5px!important}
 body.res-theme .planner-controls-layout{grid-template-columns:minmax(0,1fr)}
 body.res-theme .permission-grant-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.res-theme .permission-grant-table{font-size:10px}body.res-theme .permission-grant-table :is(td,th){padding:7px 3px;font-size:9px}
 body.res-theme .permission-grant-actions .button{font-size:8px;padding:4px;gap:2px;min-height:28px}body.res-theme .permission-grant-actions svg{width:11px;height:11px}
 body.res-theme .event-card-detail>summary{gap:7px}body.res-theme .event-card-detail>summary>h2{flex-basis:75%;font-size:14px}
 body.res-theme .event-card-actions>.button{font-size:9px;line-height:12px;height:76px;min-height:76px;padding:5px}
 body.res-theme [data-event-summary] small{font-size:8px}
 body.res-theme .profile-directory{grid-template-columns:minmax(0,1fr)}
 body.res-theme .event-preview-profile{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:430px){body.res-theme .res-mode-tiles:has([data-create-mode]){grid-template-columns:minmax(0,1fr)}}

/* One checkbox state throughout the dashboard; SVG keeps the tick centred. */
body.res-theme input[type=checkbox]{background-image:none!important;box-shadow:none;accent-color:#369b64}
body.res-theme input[type=checkbox]:checked{background-color:#369b64!important;border-color:#62cc91!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E")!important;background-position:center!important;background-size:17px 17px!important;background-repeat:no-repeat!important;box-shadow:none!important}
body.res-theme input[type=checkbox]::after{content:none!important}
body.res-theme input[type=checkbox]:checked:enabled:hover{background-color:#2e8957!important;border-color:#7de0a8!important}
body.res-theme input[type=checkbox]:focus-visible{outline:2px solid #7de0a8!important;outline-offset:3px}
body.res-theme input[type=checkbox]:disabled{opacity:.5;cursor:not-allowed}

/* Member/opponent names are data, including clickable table names. */
body.res-theme [data-profile],body.res-theme [data-profile] *,body.res-theme .db-nickname,body.res-theme .db-alias{text-transform:none!important}

/* Consistent numeric column; reserve the chevron column on every summary row. */
body.res-theme .clan-participation-card>button[data-clan-metric]{display:grid;grid-template-columns:minmax(0,1fr) 5ch 16px!important;align-items:center;column-gap:8px;padding:8px;box-sizing:border-box;width:100%}
body.res-theme .clan-participation-card>button[data-clan-metric]>span{grid-column:1;min-width:0;display:flex;align-items:center;gap:7px;text-align:left}
body.res-theme .clan-participation-card>button[data-clan-metric]>b{grid-column:2;justify-self:stretch;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
body.res-theme .clan-participation-card>button[data-clan-metric]>.ui-icon{grid-column:3;justify-self:center;width:16px;height:16px}

body.res-theme .clan-participation-card>button[data-clan-metric]{padding-inline:8px!important;border-width:1px!important}

/* Voice transfer preview: separate summary, filters, results and acknowledgement. */
body.res-theme .voice-move-overlay .control-dialog-body{display:grid;gap:18px;align-content:start}
body.res-theme .voice-move-overlay .control-dialog-body>h3{margin:4px 0 0}
body.res-theme .voice-move-overlay .voice-move-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:4px 0}
body.res-theme .voice-move-overlay .voice-move-counts>.card{margin:0;padding:18px 20px;min-width:0}
body.res-theme .voice-move-overlay .voice-move-filters{gap:8px;margin:2px 0}
body.res-theme .voice-move-overlay .voice-move-list{margin:0;border:1px solid var(--res-line,#554734);border-radius:8px;min-height:0}
body.res-theme .voice-move-overlay .voice-move-list table{margin:0}
body.res-theme .voice-move-overlay label:has(#voice-ack){display:flex;align-items:center;gap:12px;padding:14px 16px;margin:0;border:1px solid var(--res-line,#554734);border-radius:8px;line-height:1.5}
body.res-theme .voice-move-overlay #voice-ack{margin:0;flex:none}
body.res-theme .voice-move-overlay .control-dialog>footer{margin-top:18px!important;padding-top:16px!important;gap:10px}
@media(max-width:760px){body.res-theme .voice-move-overlay .voice-move-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}

body.res-theme .voice-war-layout{align-items:stretch}
body.res-theme .voice-war-layout>.card{display:grid;grid-template-rows:auto auto minmax(44px,1fr) auto auto;gap:16px;align-content:start;margin:0}
body.res-theme .voice-war-layout>.card>h2,body.res-theme .voice-war-layout>.card>p,body.res-theme .voice-war-layout>.card>.form-actions{margin:0}
body.res-theme .voice-war-layout .voice-event-field{display:grid;gap:8px;margin:0}
body.res-theme .voice-war-layout .form-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start}
body.res-theme .voice-war-settings{display:grid;gap:18px;min-width:0}
body.res-theme .voice-war-settings>.voice-access-block,body.res-theme .voice-war-settings>.voice-permissions-block{margin:0}
body.res-theme .voice-channel-status-list{display:grid;gap:10px;margin:18px 0}
body.res-theme .voice-channel-status-list>article{display:flex;justify-content:space-between;gap:16px;border:1px solid var(--res-line,#554734);border-radius:8px;padding:14px;overflow-wrap:anywhere}

/* Channel plans follow Discord's single-line list structure. */
body.res-theme .res-modal:has(.voice-channel-status-list){--modal-width:1160px}
body.res-theme .voice-channel-status-list{display:grid;gap:6px;margin:14px 0;overflow-x:auto;min-width:0}
body.res-theme .voice-channel-status-list>article{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:8px 12px;min-height:36px;box-sizing:border-box;min-width:max-content;border-radius:6px;white-space:nowrap;overflow-wrap:normal}
body.res-theme .voice-channel-status-list>article>strong{font-size:13px;line-height:1.4;font-weight:600;white-space:nowrap;overflow-wrap:normal;flex:1}
body.res-theme .voice-channel-status-list>article>span{font-size:12px;line-height:1.4;white-space:nowrap;overflow-wrap:normal;flex:none;font-variant-numeric:tabular-nums}

body.res-theme .private-voice-toggle{display:flex;align-items:center;gap:10px;margin:16px 0 8px;line-height:1.5}body.res-theme .private-access-note{margin:10px 0 16px;line-height:1.55;color:var(--muted)}
