/* Staff page. Same tokens as the public site (core.css), quieter and denser. */

body { background: var(--bg); }
h2 { font-size: 26px; }
h3 { font-size: 21px; }
h4 { font-size: 17px; }
.muted { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.spaced { margin-top: 12px; }
code { padding: 1px 5px; background: var(--ink); color: var(--ice); font-size: .92em; }

/* ---------- Sign-in ---------- */
.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    repeating-linear-gradient(135deg, #ffffff05 0 1px, transparent 1px 9px),
    radial-gradient(ellipse 70% 50% at 50% 0%, #0f2a40 0%, transparent 70%),
    var(--bg);
}
.login-card { --cut: 22px; display: grid; gap: 12px; width: min(440px, 100%); padding: 34px 32px 28px; }
.login-logo { width: 72px; height: 72px; object-fit: cover; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.login-card h1 { margin-top: 6px; font-size: 38px; }
.login-card label { margin-top: 8px; font-weight: 500; }
.password-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.password-wrap input { border-right: 0; font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.password-toggle { padding: 0 14px; border: 1px solid var(--line-2); background: var(--panel-3); color: var(--muted); font-size: 13px; }
.login-submit { margin-top: 6px; min-height: 48px; font-size: 18px; }
.error-text { min-height: 1.4em; color: var(--bad); font-size: 14px; }
.login-notes { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.login-notes li { padding-left: 14px; position: relative; }
.login-notes li::before { content: ''; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; background: var(--blue); }
.public-page-link { margin-top: 6px; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Shell ---------- */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 236px; padding: 18px 14px; border-right: 1px solid var(--line); background: #06090d; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 20px; }
.side-brand img { width: 38px; height: 38px; object-fit: cover; }
.side-brand strong, .side-brand small { display: block; }
.side-brand strong { font-family: var(--display); font-size: 19px; line-height: 1.1; }
.side-brand small { color: var(--blue); font-size: 12px; }
.sidebar nav { display: grid; gap: 2px; }
.nav-caption { margin: 16px 0 4px; padding: 0 10px; color: var(--dim); font-size: 12px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-left: 3px solid transparent; background: none; color: var(--muted); font-family: var(--display); font-size: 17px; font-weight: 600; text-align: left; }
.nav-item:hover { background: #ffffff08; color: var(--text); }
.nav-item.active { border-left-color: var(--blue); background: linear-gradient(90deg, #2ea6f224, transparent); color: var(--text); }
.nav-icon { width: 19px; height: 19px; flex: none; }
.nav-icon svg { width: 100%; height: 100%; }
.sidebar-bottom { display: grid; gap: 10px; margin-top: auto; padding-top: 18px; }
.connection-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel); color: var(--muted); font-size: 13px; }
.connection-chip strong { margin-left: auto; color: var(--text); font-weight: 500; }
.status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.offline .status-dot { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

.main-area { max-width: 1500px; min-height: 100vh; margin-left: 236px; padding: 0 34px 90px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 16px; border-bottom: 1px solid var(--line); background: #080b10fa; }
.topbar h1 { font-size: 34px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.status-pill, .server-chip, .saved-indicator { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
.saved-indicator.unsaved { border-color: var(--warn); color: var(--warn); }
.notice { position: fixed; right: 26px; bottom: 26px; z-index: 80; max-width: min(460px, calc(100% - 52px)); padding: 12px 16px; border-left: 3px solid var(--ok); background: #111822; box-shadow: 0 18px 50px #000c; font-size: 14px; }
.notice.error { border-left-color: var(--bad); }
.page { display: grid; gap: 16px; padding-top: 22px; }
.footer { margin-top: 40px; color: var(--dim); font-size: 12.5px; }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-intro h2 { margin-bottom: 4px; }
.section-intro .muted { max-width: 70ch; }

/* ---------- Online / offline switch ---------- */
.studio-card { --cut: 20px; --state: var(--dim); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px 28px; align-items: center; padding: 22px 24px; background: color-mix(in srgb, var(--state) 55%, var(--line-2)); }
.studio-card::before { background: radial-gradient(ellipse 60% 120% at 0% 50%, color-mix(in srgb, var(--state) 22%, transparent), transparent 70%), var(--panel); }
.studio-card[data-state="online"], .studio-pill[data-state="online"] { --state: var(--ok); }
.studio-card[data-state="offline"], .studio-pill[data-state="offline"] { --state: var(--bad); }
.studio-now { display: flex; align-items: center; gap: 22px; padding-left: 10px; }
.studio-now h2 { font-size: 34px; }
.studio-light { position: relative; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--state); box-shadow: 0 0 18px var(--state); }
.studio-card[data-state="online"] .studio-light::after { content: ''; position: absolute; inset: -7px; border: 2px solid var(--state); border-radius: 50%; animation: studio-ping 1.8s ease-out infinite; }
@keyframes studio-ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.studio-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.studio-button { min-height: 54px; font-size: 18px; white-space: normal; line-height: 1.15; text-align: center; }
.studio-button-on { background: linear-gradient(180deg, #7dffb4 0%, #3ddc84 50%, #1f9d58 100%); color: #03170c; text-shadow: 0 1px 0 #ffffff55; }
.studio-button-off { background: linear-gradient(180deg, #ff8f9a 0%, #ff4d5e 50%, #b92736 100%); color: #1c0306; text-shadow: 0 1px 0 #ffffff44; }
.studio-button.is-current { background: var(--panel-3); color: var(--muted); text-shadow: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.studio-note { grid-column: 2; grid-row: 1; }
.studio-actions { grid-column: 2; }
.studio-hint { grid-column: 1; grid-row: 2; align-self: start; }
.studio-pill { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 1px solid color-mix(in srgb, var(--state, var(--dim)) 60%, var(--line-2)); background: color-mix(in srgb, var(--state, var(--dim)) 12%, var(--panel)); color: var(--text); font-family: var(--display); font-size: 16px; font-weight: 700; text-align: left; }
.studio-pill .studio-light { width: 10px; height: 10px; }
.studio-pill:hover { filter: brightness(1.2); }

/* ---------- Cards ---------- */
.card { min-width: 0; padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-heading .muted { margin-top: 3px; max-width: 64ch; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sub-heading { margin: 22px 0 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-card { padding: 16px 18px; border: 1px solid var(--line); border-top: 3px solid var(--line-2); background: var(--panel); }
.stat-card:first-child { border-top-color: var(--blue); }
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 4px; font-family: var(--display); font-size: 38px; line-height: 1; }
.stat-card small { display: block; margin-top: 6px; color: var(--dim); font-size: 12.5px; }
.checklist { display: grid; gap: 8px; }
.check-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-mark { display: grid; place-items: center; width: 22px; height: 22px; flex: none; background: #3ddc8422; color: var(--ok); font-size: 13px; font-weight: 700; }
.check-mark.missing { background: #ffb02022; color: var(--warn); }
.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.shortcut-card { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--line); background: var(--panel); text-align: left; }
.shortcut-card:hover { border-color: var(--blue); }
.shortcut-card span { width: 22px; height: 22px; margin-bottom: 8px; color: var(--blue); }
.shortcut-card strong { font-family: var(--display); font-size: 19px; }
.shortcut-card small { color: var(--muted); font-size: 13px; }
.cap-list { display: grid; gap: 10px; }
.cap-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(80px, 1.4fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.cap-bar { height: 8px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.cap-bar i { display: block; height: 100%; background: #ffc23d; }
.cap-bar i.is-full { background: var(--bad); }
.cap-row b { min-width: 48px; font-family: var(--display); font-size: 17px; text-align: right; }

/* ---------- Forms ---------- */
input, select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 0; background: var(--ink); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; }
input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: var(--blue); }
input[type="color"] { padding: 3px; }
textarea { min-height: 70px; resize: vertical; }
select[multiple] { min-height: 130px; }
label, .field-label { font-size: 13.5px; }
.field-label { display: block; margin-bottom: 6px; color: var(--muted); }
.friendly-field { display: grid; gap: 6px; min-width: 0; }
.friendly-field > span { color: var(--muted); font-size: 13px; }
.friendly-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line); }
.friendly-toggle > span { color: var(--text); font-size: 14px; }
.friendly-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.friendly-fields > .array-section, .friendly-fields > .friendly-group { grid-column: 1 / -1; }
.friendly-group { padding: 12px 14px 14px; border: 1px solid var(--line); background: #ffffff04; }
.friendly-group summary { margin-bottom: 12px; cursor: pointer; font-family: var(--display); font-size: 18px; font-weight: 700; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.setting-field { display: grid; gap: 6px; }
.setting-field label { color: var(--muted); }
.toggle-settings { display: grid; gap: 8px; }
.level-row, .add-level { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.level-row span { font-family: var(--display); font-size: 18px; font-weight: 600; }
.feature-form, .queue-add-form, .grant-form { display: grid; gap: 12px; }
.feature-form-grid, .catalog-form-grid, .poll-option-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.member-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 14px; }
.grant-form { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 100px auto; align-items: end; }
.panel-button-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 14px; }
.button.primary { background: linear-gradient(180deg, #7fd0ff 0%, #2ea6f2 45%, #1378c2 100%); color: #03101a; text-shadow: 0 1px 0 #ffffff55; }
.button.secondary { background: #ffffff10; box-shadow: inset 0 0 0 1px #ffffff22; clip-path: none; }
.button.secondary:hover { background: #ffffff1a; filter: none; }
.remove-button { padding: 5px 10px; border: 1px solid #ff4d5e55; background: #3a121855; color: #ffb3bb; font-size: 13px; }
.remove-button:hover { background: #3a1218; }

/* ---------- Bot settings editor ---------- */
.config-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.config-nav { position: sticky; top: 96px; display: grid; gap: 2px; padding: 10px; }
.config-section { padding: 8px 10px; border: 0; border-left: 3px solid transparent; background: none; color: var(--muted); font-size: 14px; text-align: left; }
.config-section:hover { color: var(--text); }
.config-section.active { border-left-color: var(--blue); background: #2ea6f21a; color: var(--text); }
.editor-modes { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.editor-modes > span { margin-left: auto; color: var(--dim); font-size: 12.5px; }
.mode-button { padding: 7px 12px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 13.5px; }
.mode-button.active { border-color: var(--blue); color: var(--text); }
#config-editor { min-height: 420px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.array-section { display: grid; gap: 10px; }
.array-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.array-heading > div { display: flex; align-items: baseline; gap: 10px; }
.array-count { color: var(--dim); font-size: 13px; }
.repeat-card, .catalog-item { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); background: #ffffff04; }
.repeat-card-heading, .catalog-item-heading, .catalog-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.repeat-card-heading strong, .catalog-item-heading strong { font-family: var(--display); font-size: 18px; }
.catalog-item-footer { color: var(--dim); font-size: 12.5px; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.catalog-list { display: grid; gap: 10px; margin: 14px 0; }
.catalog-add-form { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.empty-list { padding: 18px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- Members, queue, commands ---------- */
.member-results { display: grid; gap: 10px; }
.member-card { display: grid; gap: 10px; }
.member-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.member-identity strong, .member-identity span { display: block; }
.member-identity strong { font-family: var(--display); font-size: 19px; }
.member-identity span { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.member-avatar { width: 42px; height: 42px; object-fit: cover; }
.member-state { padding: 3px 9px; border: 1px solid #3ddc8455; color: var(--ok); font-size: 12.5px; white-space: nowrap; }
.member-state.warning-state { border-color: #ffb02055; color: var(--warn); }
.member-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.member-disabled-note, .member-safety-note, .queue-help { color: var(--muted); font-size: 13px; }
.queue-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.queue-list { display: grid; gap: 8px; }
.queue-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); background: #ffffff04; }
.queue-position { color: var(--blue); font-family: var(--display); font-size: 26px; font-weight: 700; }
.queue-item-details strong, .queue-item-details span { display: block; }
.queue-customer { color: var(--muted); font-size: 12.5px; }
.queue-stage { padding: 3px 9px; border: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.queue-item .button { min-height: 34px; padding: 0 12px; font-size: 14px; }
.command-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.command-card h3 { color: var(--ice); }
.command-card p { margin: 6px 0 10px; }
.command-option-count { color: var(--dim); font-size: 12.5px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 8px 10px; border-bottom: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table code { background: none; padding: 0; font-size: 13.5px; }
.data-table .button { min-height: 30px; padding: 0 10px; font-size: 13.5px; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cell-empty { padding: 22px 10px; color: var(--muted); text-align: center; }
.cell-item { display: flex; align-items: center; gap: 9px; }
.cell-item span { width: 22px; height: 22px; flex: none; color: var(--rar); }
.pill { display: inline-block; padding: 1px 8px; background: color-mix(in srgb, var(--rar) 18%, transparent); color: var(--rar); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.table-filter { max-width: 300px; }
.soon { color: var(--warn); }

/* ---------- Cases page ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-family: var(--display); font-size: 18px; font-weight: 700; }
.tab:hover { color: var(--text); }
.tab.active { border-bottom-color: var(--blue); color: var(--text); }
.tab-count { margin-left: 4px; padding: 0 7px; background: var(--panel-3); color: var(--ice); font-size: 14px; }
.case-tab { display: grid; gap: 16px; }
.code-result { margin-top: 14px; padding: 14px; border-left: 3px solid var(--ok); background: var(--ink); }
.code-result.is-bad { border-left-color: var(--bad); }
.code-result h4 { margin-bottom: 4px; font-size: 20px; }
.code-result .button { margin-top: 12px; }

.loot-crates { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.loot-crate { display: grid; gap: 2px; justify-items: center; padding: 10px 12px 14px; border: 1px solid var(--line); background: var(--panel); }
.loot-crate .crate-art { width: 120px; }
.loot-crate strong { font-family: var(--display); font-size: 20px; }
.loot-crate small { color: var(--muted); font-size: 12.5px; }
.loot-crate.active { border-color: var(--blue); background: linear-gradient(180deg, #2ea6f21f, var(--panel)); }
.loot-crate .crate-img, .upload-preview .crate-img { width: 100%; aspect-ratio: 6 / 5; object-fit: contain; }
.loot-crate-add { align-content: center; border-style: dashed; color: var(--muted); }
.loot-crate-add:hover { border-color: var(--blue); color: var(--text); }
.loot-add-icon { width: 34px; height: 34px; margin-bottom: 6px; color: var(--blue); }
.weight-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.chance-help { margin: -4px 0 12px; }
.upload-row { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px dashed var(--line-2); background: var(--ink); }
.upload-preview { width: 150px; flex: none; }
.upload-preview-item { display: grid; place-items: center; width: 84px; height: 84px; padding: 8px; background: var(--panel-2); color: var(--rar, var(--blue)); }
.upload-preview-item svg, .upload-preview-item img { width: 100%; height: 100%; object-fit: contain; }
.upload-controls { display: grid; gap: 8px; min-width: 0; }
.upload-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-fill { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.settings-grid > .full { grid-column: 1 / -1; }
.loot-item summary > span:first-child img, .cell-item span img { width: 100%; height: 100%; object-fit: contain; }
.loot-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; align-items: start; }
.weight-list { display: grid; gap: 8px; }
.weight-row { display: grid; grid-template-columns: 110px 96px minmax(60px, 1fr) 64px; gap: 12px; align-items: center; }
.weight-row .pill { justify-self: start; }
.weight-bar { height: 10px; background: var(--ink); }
.weight-bar i { display: block; height: 100%; background: var(--rar); }
.weight-row b { font-family: var(--display); font-size: 18px; text-align: right; }
.forecast { display: grid; gap: 8px; }
.forecast-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.forecast-row:last-child { border-bottom: 0; }
.forecast-row b { font-family: var(--display); font-size: 17px; white-space: nowrap; }
.forecast-row small { display: block; color: var(--muted); font-size: 12.5px; }
.forecast-note { padding: 10px 12px; background: #ffc23d14; color: #ffd98a; font-size: 13.5px; }

.loot-items { display: grid; gap: 6px; }
.loot-group { margin: 12px 0 2px; color: var(--rar); font-family: var(--display); font-size: 18px; font-weight: 700; }
.loot-group:first-child { margin-top: 0; }
.loot-item { border: 1px solid var(--line); border-left: 3px solid var(--rar); background: #ffffff04; }
.loot-item summary { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1.6fr) 110px 90px; gap: 12px; align-items: center; padding: 8px 12px; cursor: pointer; list-style: none; }
.loot-item summary::-webkit-details-marker { display: none; }
.loot-item summary > span:first-child { width: 30px; height: 30px; color: var(--rar); }
.loot-item summary strong { font-family: var(--display); font-size: 18px; }
.loot-item summary small { color: var(--muted); font-size: 12.5px; }
.loot-item .odds { font-family: var(--display); font-size: 17px; font-weight: 700; text-align: right; }
.loot-item .odds.is-off { color: var(--dim); font-family: var(--body); font-size: 12.5px; font-weight: 400; }
.loot-item .cap { color: #ffc23d; font-size: 12.5px; text-align: right; }
.loot-item[open] summary { border-bottom: 1px solid var(--line); background: #ffffff06; }
.loot-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 14px 12px; align-items: end; }
.loot-fields .wide { grid-column: span 2; }
.loot-fields .full { grid-column: 1 / -1; }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chips label { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line-2); background: var(--ink); font-size: 13.5px; }
.loot-item-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.loot-item-foot small { color: var(--dim); }

.rarity-editor, .rule-editor { display: grid; gap: 8px; }
.rarity-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 120px; gap: 8px; align-items: center; }
.rule-row { display: grid; grid-template-columns: auto 84px auto minmax(0, 1fr) 76px auto; gap: 8px; align-items: center; font-size: 14px; }
.rule-row.single { grid-template-columns: minmax(150px, 1fr) minmax(0, 1fr) 76px minmax(0, auto); }
.rule-row .muted { white-space: nowrap; }

.save-bar { position: fixed; left: 236px; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 34px; border-top: 1px solid var(--warn); background: #171207f5; color: #ffd98a; font-size: 14px; }
.save-bar div { display: flex; gap: 8px; }
.plain-steps { display: grid; gap: 8px; padding-left: 20px; list-style: decimal; color: var(--muted); font-size: 14px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .studio-card { grid-template-columns: 1fr; }
  .studio-note, .studio-actions, .studio-hint { grid-column: 1; grid-row: auto; }
  .panel-grid, .catalog-grid, .queue-layout, .loot-layout, .config-layout { grid-template-columns: 1fr; }
  .config-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .grant-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .nav-caption { display: none; }
  .sidebar-bottom { grid-template-columns: 1fr 1fr; margin-top: 12px; }
  .main-area { margin-left: 0; padding: 0 16px 90px; }
  .topbar { position: static; }
  .topbar h1 { font-size: 28px; }
  .status-pill { display: none; }
  .save-bar { left: 0; padding: 10px 16px; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
  .loot-item summary { grid-template-columns: 30px minmax(0, 1fr) 80px; }
  .loot-item summary small, .loot-item .cap { display: none; }
  .queue-item { grid-template-columns: 36px minmax(0, 1fr); }
  .weight-row { grid-template-columns: 90px 80px minmax(40px, 1fr) 56px; }
  .rule-row, .rule-row.single { grid-template-columns: 1fr 1fr; }
  .grant-form, .member-search-form { grid-template-columns: 1fr; }
}
