:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #637083;
    --line: #dbe1e8;
    --surface: #ffffff;
    --canvas: #f3f5f7;
    --brand: #176b5b;
    --brand-dark: #0e5145;
    --accent: #e9aa35;
    --danger: #b42318;
    --focus: #0877d1;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.5; }
a { color: inherit; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, .button { min-height: 42px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); outline-offset: 2px; }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 20; background: var(--ink); color: white; padding: 10px 14px; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 68px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, calc((100vw - 1180px) / 2)); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--brand); color: white; border-radius: 6px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 0.72rem; }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a { text-decoration: none; color: var(--muted); }
.topnav a.is-active { color: var(--ink); font-weight: 700; }
.topnav form { margin: 0; }
.admin-name { color: var(--muted); font-size: 0.9rem; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-header.compact { align-items: center; }
.page-header h1 { margin: 3px 0 4px; font-size: 2.45rem; line-height: 1.15; }
.page-summary { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--brand); font-weight: 800; font-size: 0.76rem; text-transform: uppercase; }
.header-actions, .form-actions { display: flex; align-items: center; gap: 10px; }
.back-link { color: var(--brand); font-size: 0.9rem; }

.button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; text-decoration: none; font-weight: 700; background: transparent; color: var(--ink); }
.button-primary { background: var(--brand); color: white; }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { background: var(--surface); border-color: var(--line); }
.button.is-disabled { opacity: 0.58; cursor: not-allowed; }
.button-quiet { color: var(--muted); }
.button-danger { color: var(--danger); border-color: #f0b4ae; background: #fff7f6; }
.button-wide { width: 100%; }

.notice { padding: 12px; border: 1px solid; border-radius: 6px; }
.notice-success { background: #eaf8f1; color: #17613f; border-color: #b7e1cd; }
.notice-error { background: #fff1f0; color: #9b1c13; border-color: #f2b8b5; }

.toast-viewport { position: fixed; z-index: 50; top: 84px; right: 20px; width: min(390px, calc(100vw - 40px)); display: grid; gap: 10px; pointer-events: none; }
.toast { display: grid; grid-template-columns: 32px minmax(0,1fr) 32px; gap: 11px; align-items: start; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 12px 36px rgba(23,32,51,.14); pointer-events: auto; animation: toast-enter .2s ease-out both; }
.toast-success { border-color: #b9d9ce; box-shadow: 0 12px 36px rgba(23,32,51,.14), 0 0 0 3px rgba(32,129,93,.07); }
.toast-error { border-color: #edc5c1; box-shadow: 0 12px 36px rgba(23,32,51,.14), 0 0 0 3px rgba(180,35,24,.07); }
.toast-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: .86rem; font-weight: 900; }
.toast-success .toast-icon { color: #17613f; background: #e3f5ec; }
.toast-error .toast-icon { color: #9b1c13; background: #fde8e6; }
.toast-copy strong { display: block; font-size: .9rem; }
.toast-copy p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.toast-close { width: 30px; height: 30px; min-height: 30px; padding: 0; border: 0; background: transparent; color: var(--muted); border-radius: 4px; cursor: pointer; font-size: 1.25rem; line-height: 1; }
.toast-close:hover { background: var(--canvas); color: var(--ink); }
.toast.is-leaving { animation: toast-leave .18s ease-in both; }

.confirm-dialog { width: min(450px, calc(100vw - 32px)); padding: 24px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 24px 70px rgba(10,18,32,.28); }
.confirm-dialog::backdrop { background: rgba(15,23,38,.52); backdrop-filter: blur(2px); }
.confirm-dialog[open] { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; animation: dialog-enter .16s ease-out both; }
.confirm-dialog-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #9b1c13; background: #fde8e6; font-weight: 900; }
.confirm-dialog-copy h2 { margin: 1px 0 6px; font-size: 1.08rem; }
.confirm-dialog-copy p { margin: 0; color: var(--muted); }
.confirm-dialog-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.confirm-dialog-submit { color: #fff; background: var(--danger); border-color: var(--danger); }
.confirm-dialog-submit:hover { background: #921b13; }

@keyframes toast-enter { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-leave { to { opacity: 0; transform: translateY(-6px); } }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } }

.event-list { border-top: 1px solid var(--line); }
.event-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.event-date { width: 72px; height: 72px; display: grid; place-content: center; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.event-date strong { font-size: 1.6rem; line-height: 1; }
.event-date span { color: var(--muted); font-size: 0.75rem; margin-top: 4px; }
.event-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.event-title-line h1, .event-title-line h2 { margin: 0; }
.event-title-line h2 { font-size: 1.18rem; }
.event-title-line a { text-decoration: none; }
.event-title-line a:hover { color: var(--brand); }
.event-url { margin: 3px 0 12px; color: var(--muted); font-size: 0.88rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: 10px 30px; margin: 0; }
.event-meta div { display: flex; gap: 7px; }
.event-meta dt { color: var(--muted); }
.event-meta dd { margin: 0; font-weight: 700; }
.status { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; background: #e8edf2; color: #485568; font-size: 0.72rem; font-weight: 800; }
.status-open, .status-active { background: #dff4e9; color: #12633d; }
.status-scheduled { background: #fff0cf; color: #7c5200; }
.status-ended, .status-archived { background: #eceef1; color: #596273; }

.empty-state { min-height: 360px; display: grid; place-items: center; align-content: center; text-align: center; border-block: 1px solid var(--line); }
.empty-state h2 { margin: 12px 0 4px; }
.empty-state p { max-width: 520px; color: var(--muted); margin: 0 0 20px; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; font-size: 1.5rem; }

.section-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.section-tabs a, .section-tabs span { white-space: nowrap; padding: 11px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.section-tabs .is-active { color: var(--ink); border-color: var(--brand); font-weight: 800; }
.section-tabs span[aria-disabled="true"] { opacity: 0.55; }
.event-form { display: grid; gap: 0; }
.form-section { display: grid; grid-template-columns: minmax(200px, 0.75fr) minmax(0, 2fr); gap: 50px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-start; gap: 12px; }
.section-heading > span { flex: 0 0 auto; color: var(--brand); font-weight: 800; font-size: 0.75rem; padding-top: 5px; }
.section-heading h2 { margin: 0; font-size: 1.08rem; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 0.9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { min-width: 0; }
.field-span-2 { grid-column: span 2; }
.field label { display: block; margin-bottom: 6px; font-size: 0.86rem; font-weight: 800; }
.optional { color: var(--muted); font-weight: 400; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .field textarea, .field select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #bdc6d1; border-radius: 5px; background: var(--surface); color: var(--ink); }
.field textarea { resize: vertical; }
.field input[type="checkbox"], .field input[type="radio"] { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--brand); }
.field input[type="range"] { width: 100%; margin: 0; accent-color: var(--brand); }
.field .checkbox-field { display: flex; align-items: center; gap: 8px; width: fit-content; margin-bottom: 6px; cursor: pointer; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid #bdc6d1; border-radius: 5px; background: var(--surface); overflow: hidden; }
.input-prefix span { display: flex; align-items: center; padding: 0 10px; color: var(--muted); background: #eef1f4; border-right: 1px solid #bdc6d1; white-space: nowrap; }
.input-prefix input { border: 0; border-radius: 0; min-width: 0; }
.event-url-copy { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:8px; }
.event-url-copy .button { min-height:34px; padding:5px 10px; font-size:.8rem; }
.event-url-copy .field-help { margin:0; }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 0.82rem; }
.form-actions { justify-content: flex-end; padding: 24px 0; }
.danger-zone { margin-top: 38px; padding: 22px 0; border-block: 1px solid #edb9b4; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.danger-zone h2 { margin: 0; font-size: 1rem; color: var(--danger); }
.danger-zone p { margin: 4px 0 0; color: var(--muted); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr); gap: 40px; align-items: start; }
.section-bar { display:flex; justify-content:space-between; align-items:end; border-bottom:1px solid var(--line); padding-bottom:14px; }
.section-bar h2,.side-editor h2 { margin:0; font-size:1.1rem; }
.section-bar p,.record-row p,.compact-empty p { margin:4px 0 0; color:var(--muted); }
.record-row { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:18px 0; border-bottom:1px solid var(--line); }
.record-actions,.editor-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.record-actions form { margin:0; }
.assignment-list { display:grid; gap:8px; margin:0; padding:12px; border:1px solid var(--line); border-radius:5px; }
.assignment-list legend { font-weight:800; font-size:.86rem; }
.assignment-list label { display:grid; grid-template-columns:minmax(0,1fr) 130px; align-items:center; gap:10px; }
.assignment-list select { min-height:36px; }
.compact-empty { padding:56px 20px; text-align:center; border-bottom:1px solid var(--line); }
.compact-empty h3 { margin:0; }
.side-editor { display:grid; gap:16px; padding:22px; background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.content-toolbar { position:sticky; top:0; z-index:8; display:flex; align-items:end; justify-content:space-between; gap:24px; padding:12px 0 18px; background:color-mix(in srgb,var(--canvas) 95%,transparent); backdrop-filter:blur(8px); }
.content-toolbar p { margin:0 0 11px; color:var(--muted); white-space:nowrap; }
.content-toolbar-actions { display:flex; align-items:end; gap:12px; }
.content-toolbar-actions form { margin:0; }
.content-search { width:min(560px,100%); }
.content-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(390px,.72fr); gap:36px; align-items:start; }
.program-editor-list { min-width:0; }
.content-day { margin-bottom:34px; }
.content-day>header { display:flex; align-items:center; gap:13px; padding:0 0 12px; border-bottom:1px solid var(--line); }
.content-day>header>span { width:6px; height:42px; background:var(--brand); border-radius:3px; }
.content-day>header p { margin:0; color:var(--brand); font-size:.72rem; font-weight:800; text-transform:uppercase; }
.content-day>header h2 { margin:1px 0 0; font-size:1.18rem; }
.content-room { margin:20px 0 0; }
.content-room>h3 { display:flex; align-items:center; gap:8px; margin:0 0 7px; font-size:.82rem; color:var(--muted); text-transform:uppercase; }
.content-room>h3 span { min-width:24px; padding:2px 7px; border-radius:999px; text-align:center; color:var(--ink); background:#e6eaee; font-size:.7rem; }
.session-record { display:grid; grid-template-columns:62px minmax(0,1fr) auto; gap:15px; align-items:start; padding:15px 0; border-bottom:1px solid var(--line); }
.session-record>time { padding-top:3px; color:var(--brand); font-weight:850; font-variant-numeric:tabular-nums; }
.session-record-title { display:flex; align-items:flex-start; gap:9px; }
.session-record-title strong { line-height:1.35; }
.session-record-copy p { margin:5px 0 0; color:var(--muted); font-size:.79rem; overflow-wrap:anywhere; }
.session-record-signals { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.session-record-signal { display:inline-flex; align-items:center; gap:5px; min-height:25px; padding:3px 8px; border:1px solid color-mix(in srgb,var(--brand) 22%,var(--line)); border-radius:999px; color:var(--ink); background:color-mix(in srgb,var(--brand) 6%,var(--surface)); font-size:.7rem; font-weight:750; line-height:1; }
.session-record-signal.is-empty { opacity:.44; filter:saturate(.45); }
.session-record-signal svg,.session-record-document svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:0 0 auto; }
.session-record-signal b { color:var(--brand); font-variant-numeric:tabular-nums; }
.session-record-document { display:flex; align-items:flex-start; gap:5px; color:var(--ink)!important; }
.session-record-document svg { margin-top:1px; color:var(--brand); }
.session-record .record-actions { align-self:center; }
.session-editor { position:sticky; top:76px; display:grid; max-height:calc(100vh - 96px); overflow:auto; background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:0 10px 34px rgba(23,32,51,.08); }
.session-editor>.editor-heading { position:sticky; top:0; z-index:2; padding:18px 20px; border-bottom:1px solid var(--line); background:var(--surface); }
.session-editor>.editor-heading p { margin:0; color:var(--brand); font-size:.72rem; font-weight:800; text-transform:uppercase; }
.session-editor>.editor-heading h2 { margin:2px 0 0; max-width:290px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.editor-section { display:grid; gap:14px; margin:0; padding:20px; border:0; border-bottom:1px solid var(--line); }
.editor-section>legend { float:left; width:100%; padding:0; margin-bottom:2px; font-size:.9rem; font-weight:850; }
.editor-section>.field-help { margin:-8px 0 0; }
.repeat-list { display:grid; gap:10px; }
.content-media-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.repeat-row { position:relative; display:grid; gap:10px; padding:13px 42px 13px 13px; border:1px solid var(--line); border-radius:6px; background:#f8f9fa; }
.repeat-row .field label { font-size:.76rem; }
.person-picker { display:grid; gap:8px; padding:10px; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.person-picker-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; font-weight:700; font-size:.82rem; }
.person-picker-heading output { color:var(--muted); font-size:.76rem; font-weight:600; }
.person-picker-search input { width:100%; min-height:36px; padding:6px 9px; }
.person-picker-list { max-height:190px; overflow:auto; border:1px solid var(--line); border-radius:4px; background:#fff; }
.person-picker-choice { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:8px; align-items:center; padding:7px 9px; cursor:pointer; font-size:.86rem; }
.person-picker-choice[hidden] { display:none; }
.person-picker-choice + .person-picker-choice { border-top:1px solid #edf0f3; }
.person-picker-choice[data-selected="true"] { background:#edf6f2; }
.person-picker-choice input { margin:0; min-height:auto; }
.person-picker-choice span { overflow-wrap:anywhere; }
.person-picker-choice small { grid-column:2; color:var(--muted); font-size:.75rem; overflow-wrap:anywhere; }
.archived-sessions { grid-column:1/-1; margin-top:18px; border-top:1px solid var(--line); }
.archived-sessions>summary { padding:16px 0; color:var(--muted); font-weight:700; cursor:pointer; }
.archived-sessions>summary span { display:inline-grid; min-width:24px; min-height:24px; place-items:center; margin-left:6px; border-radius:50%; background:#eceff2; font-size:.75rem; }
.archived-sessions>div { display:grid; gap:0; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.archived-sessions article { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 14px; border-bottom:1px solid var(--line); }
.archived-sessions article:last-child { border-bottom:0; }
.archived-sessions article div { display:grid; gap:3px; }
.archived-sessions article small { color:var(--muted); }
.assignment-row { grid-template-columns:minmax(0,1.2fr) minmax(110px,.65fr); }
.assignment-row .assignment-person-picker { align-self:stretch; }
.assignment-row .field:nth-child(3) { grid-column:1/-1; }
.icon-remove { position:absolute; top:8px; right:8px; width:30px; height:30px; min-height:30px; padding:0; border:0; border-radius:4px; background:transparent; color:var(--muted); cursor:pointer; font-size:1.2rem; }
.icon-remove:hover { color:var(--danger); background:#fff1f0; }
.editor-actions { position:sticky; bottom:0; z-index:2; display:flex; justify-content:flex-end; padding:15px 20px; background:var(--surface); border-top:1px solid var(--line); box-shadow:0 -8px 20px rgba(23,32,51,.05); }
.theme-workspace { display:grid; grid-template-columns:minmax(300px,.65fr) minmax(0,1.35fr); gap:40px; align-items:start; }
.color-field { display:grid; grid-template-columns:1fr 64px; align-items:center; }
.color-field label { margin:0; }
.color-field input { padding:3px; }
.theme-preview { min-height:520px; padding:40px; background:var(--preview-bg,var(--surface)); border:1px solid var(--line); border-radius:8px; }
.theme-preview__rail { display:grid; grid-template-columns:repeat(4,1fr); height:8px; margin:-40px -40px 30px; overflow:hidden; border-radius:8px 8px 0 0; }
.theme-preview__rail span:nth-child(1) { background:var(--theme-primary); }
.theme-preview__rail span:nth-child(2) { background:var(--theme-secondary); }
.theme-preview__rail span:nth-child(3) { background:var(--theme-highlight); }
.theme-preview__rail span:nth-child(4) { background:var(--theme-accent); }
.theme-preview__chips { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.theme-preview__chips span { padding:6px 10px; border-left:4px solid; background:color-mix(in srgb, var(--theme-surface, #fff) 78%, transparent); color:var(--theme-text, #172033); font-size:.82rem; font-weight:700; }
.field-help { margin:6px 0 0; color:var(--muted); font-size:.82rem; line-height:1.45; }
.field label small { color:var(--muted); font-weight:500; }
.team-card { margin-bottom:28px; padding:28px; background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 26px rgba(23,32,51,.035); }
.team-card__heading { display:flex; justify-content:space-between; gap:18px; margin-bottom:24px; padding-bottom:17px; border-bottom:1px solid var(--line); }
.team-card__heading h2 { margin:0; font-size:1.25rem; }
.team-card__heading p { margin:5px 0 0; color:var(--muted); font-size:.9rem; }
.team-form { display:grid; gap:22px; max-width:880px; }
.team-form .form-grid { gap:16px 20px; }
.team-event-picker { min-width:0; margin:0; padding:0; border:0; }
.team-event-picker legend { padding:0; font-weight:800; font-size:.92rem; }
.team-event-picker .field-help { margin:5px 0 12px; }
.team-event-picker__list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.team-event-choice { display:grid; grid-template-columns:18px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:48px; padding:10px 12px; border:1px solid var(--line); border-radius:6px; background:#fafbfc; cursor:pointer; }
.team-event-choice:hover { border-color:#afcfc5; background:#f5faf8; }
.team-event-choice:has(input:checked) { border-color:#79b5a3; background:#edf7f3; }
.team-event-choice input[type="checkbox"] { width:16px; height:16px; min-height:16px; margin:0; accent-color:var(--brand); }
.team-event-choice span { min-width:0; font-size:.9rem; font-weight:700; overflow-wrap:anywhere; }
.team-event-choice small { color:var(--muted); font-size:.76rem; white-space:nowrap; }
.team-form__actions { display:flex; align-items:center; padding-top:2px; }
.table-wrap { overflow-x:auto; }
.data-table { width:100%; border-collapse:collapse; font-size:.88rem; }
.data-table th { padding:10px 12px; color:var(--muted); text-align:left; border-bottom:1px solid var(--line); font-size:.73rem; font-weight:800; letter-spacing:.02em; text-transform:uppercase; white-space:nowrap; }
.data-table td { padding:15px 12px; vertical-align:top; border-bottom:1px solid var(--line); }
.data-table tbody tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover { background:#fafbfc; }
.system-update-summary{display:flex;gap:10px;margin:18px 0}.system-update-summary div{min-width:150px;padding:12px 14px;border:1px solid var(--line);border-radius:7px;background:#f8f9fa}.system-update-summary strong,.system-update-summary span{display:block}.system-update-summary strong{font-size:1.2rem}.system-update-summary span,.system-update-current{color:var(--muted);font-size:.84rem}.system-update-current{margin:18px 0 0}
.team-table { min-width:940px; table-layout:fixed; }
.team-table th:nth-child(1) { width:22%; }.team-table th:nth-child(2) { width:13%; }.team-table th:nth-child(3) { width:16%; }.team-table th:nth-child(4) { width:15%; }.team-table th:nth-child(5) { width:10%; }.team-table th:nth-child(6) { width:24%; }
.team-person strong,.team-person small { display:block; }.team-person small { margin-top:3px; color:var(--muted); overflow-wrap:anywhere; }
.team-role { display:inline-flex; padding:3px 7px; border-radius:999px; background:#edf1f5; color:#485568; font-size:.76rem; font-weight:750; }
.team-events { display:grid; gap:4px; }.team-events span { overflow-wrap:anywhere; }
.team-last-login { color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
.status-suspended { background:#fff0ef; color:#9b1c13; }
.team-actions { display:grid; gap:8px; }.team-actions form { margin:0; }
.team-reset-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; align-items:end; }.team-reset-form label { display:grid; gap:4px; color:var(--muted); font-size:.73rem; font-weight:700; }.team-reset-form input { width:100%; min-height:36px; padding:6px 8px; border:1px solid #bdc6d1; border-radius:5px; }.team-reset-form .button { min-height:36px; padding:6px 10px; font-size:.8rem; }
.theme-preview__devices { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.theme-preview__devices button { border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--text); padding:7px 11px; font:inherit; font-size:.82rem; cursor:pointer; }
.theme-preview__devices button[aria-pressed="true"] { background:var(--theme-primary,#2563eb); border-color:var(--theme-primary,#2563eb); color:#fff; }
.theme-preview__stage { position:relative; isolation:isolate; overflow:hidden; min-height:540px; display:grid; padding:28px; background-color:var(--theme-primary,#2563eb); background-repeat:no-repeat; background-size:contain; background-position:center; border-radius:var(--preview-backdrop-radius,16px); }
.theme-preview__stage::before { content:""; position:absolute; inset:0; z-index:0; background:color-mix(in srgb, var(--preview-backdrop-color,#fff) calc(var(--preview-backdrop-opacity,0) * 100%), transparent); backdrop-filter:blur(calc(var(--preview-backdrop-opacity,0) * 8px)); pointer-events:none; }
.theme-preview__form { position:relative; z-index:1; width:min(var(--preview-panel-width,360px),100%); background:color-mix(in srgb, var(--preview-panel-color,#fff) calc(var(--preview-panel-opacity,.96) * 100%), transparent); border:1px solid color-mix(in srgb, var(--theme-text,#172033) 15%, transparent); border-radius:var(--preview-panel-radius,8px); padding:28px; box-shadow:none; transform:translateY(var(--preview-vertical-offset,0px)); }
.theme-preview__form h2 { margin-top:0; }
.theme-preview__form input { width:100%; min-height:46px; border:1px solid color-mix(in srgb, var(--theme-text,#172033) 25%, transparent); background:color-mix(in srgb, var(--preview-input-color,#fff) calc(var(--preview-input-opacity,1) * 100%), transparent); border-radius:var(--preview-input-radius,5px); padding:9px 11px; font:inherit; }
.theme-preview__form .button-primary { width:100%; min-height:46px; border-radius:var(--preview-input-radius,5px); }
.theme-preview__stage[data-layout="artwork"][data-horizontal="left"] { justify-items:start; }
.theme-preview__stage[data-layout="artwork"][data-horizontal="center"] { justify-items:center; }
.theme-preview__stage[data-layout="artwork"][data-horizontal="right"] { justify-items:end; }
.theme-preview__stage[data-layout="artwork"][data-vertical="top"] { align-items:start; }
.theme-preview__stage[data-layout="artwork"][data-vertical="center"] { align-items:center; }
.theme-preview__stage[data-layout="artwork"][data-vertical="bottom"] { align-items:end; }
.theme-preview__stage[data-layout="standard"] { align-items:center; justify-items:end; }
.theme-preview[data-preview-device="tablet"] .theme-preview__stage { min-height:620px; max-width:620px; margin:auto; }
.theme-preview[data-preview-device="mobile"] .theme-preview__stage { min-height:660px; max-width:360px; margin:auto; padding:18px; }
.theme-preview__note { margin:16px 0 0; color:var(--muted); font-size:.84rem; }

@media (min-width: 781px) and (min-height: 720px) {
    .theme-preview {
        position: sticky;
        top: 24px;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}
.preview-player { aspect-ratio:16/9; display:grid; place-items:center; background:#161b22; color:#fff; border-radius:6px; margin-bottom:28px; }
.preview-management-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,.65fr); gap:40px; align-items:start; }
.review-link-once { margin-bottom:28px; padding:20px; border:1px solid #b7d9ca; background:#f0faf5; border-radius:6px; }
.review-link-once h2 { margin:0 0 4px; font-size:1.05rem; }
.review-link-once p { margin:0 0 12px; color:var(--muted); }
.review-link-once code { display:block; padding:12px; margin-bottom:12px; overflow-wrap:anywhere; background:var(--surface); border:1px solid var(--line); border-radius:5px; }
.review-link-row { align-items:flex-start; }
.review-link-copy { min-width:0; }
.review-link-copy code { display:block; max-width:680px; margin-top:10px; padding:9px 10px; overflow-wrap:anywhere; background:#f8f9fa; border:1px solid var(--line); border-radius:5px; font-size:.78rem; user-select:all; }
.review-link-legacy { max-width:620px; color:var(--muted); font-size:.84rem; }
.review-link-actions { flex:0 0 auto; flex-wrap:wrap; justify-content:flex-end; }
.review-link-actions form { flex:0 0 auto; }
.muted,.field-help { color:var(--muted); }
.field-help { margin:6px 0 0; font-size:.82rem; }

.auth-layout { min-height: calc(100vh - 200px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr); gap: 80px; align-items: center; }
.auth-intro h1 { max-width: 700px; margin: 8px 0 16px; font-size: 5.2rem; line-height: 0.98; }
.auth-intro > p:last-child { color: var(--muted); max-width: 560px; font-size: 1.1rem; }
.auth-form { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 28px; display: grid; gap: 18px; }

@media (max-width: 780px) {
    .topbar { padding: 12px 20px; align-items: flex-start; }
    .admin-name, .topnav > a { display: none; }
    .page-shell { width: min(100% - 28px, 1180px); padding-top: 28px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .page-header h1 { font-size: 1.9rem; }
    .event-row { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; }
    .event-row > .button { grid-column: 2; justify-self: start; }
    .event-date { width: 58px; height: 62px; }
    .event-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-meta div { display: block; }
    .form-section { grid-template-columns: 1fr; gap: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-span-2 { grid-column: span 1; }
    .team-card { padding:20px 16px; }
    .team-event-picker__list { grid-template-columns:1fr; }
    .team-event-choice { min-height:46px; }
    .input-prefix span { display: none; }
    .danger-zone { align-items: flex-start; flex-direction: column; }
    .workspace-grid,.theme-workspace,.preview-management-grid,.content-workspace { grid-template-columns:1fr; }
    .content-page-header .button { width:100%; }
    .content-toolbar { top:0; }
    .session-record { grid-template-columns:48px minmax(0,1fr); }
    .session-record .record-actions { grid-column:2; justify-content:flex-start; }
    .session-editor { position:static; max-height:none; }
    .assignment-row { grid-template-columns:1fr; }
    .assignment-row .field:nth-child(3) { grid-column:auto; }
    .auth-layout { grid-template-columns: 1fr; gap: 36px; }
    .auth-intro h1 { font-size: 2.6rem; }
    .toast-viewport { top: 76px; right: 14px; width: calc(100vw - 28px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
