/* Shared presentation layer. Workflow-specific layouts remain in style.css. */
:root {
  --ui-accent:#7b1e3a; --ui-paper:#f6f4f2; --ui-tint:#f7e9ee; --ui-line:#e3dcdf;
  --ui-ink:#291e23; --ui-muted:#675760; --ui-radius:16px;
  --ui-shadow:0 4px 20px #32152606; --header:72px; --rail:244px;
}
body { color:var(--ui-ink); background:var(--ui-paper); line-height:1.5; }
html { scroll-padding-top:96px; }
* { -webkit-tap-highlight-color:transparent; }
:is(h1,h2,h3,h4,p,dt,dd) { overflow-wrap:anywhere; }
button, input, select, textarea { font:inherit; }
button { font-weight:600; }
:is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid #7b1e3a !important; outline-offset:3px; }
main:focus { outline:none; }
main .text-xs,main [class*="text-[10px]"],main [class*="text-[11px]"] { font-size:13px; line-height:1.5; }
main .text-ink-soft { color:var(--ui-muted); }
:is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]) { min-height:48px; border-radius:10px; font-size:16px; }
textarea { line-height:1.6; }
input[type=checkbox],input[type=radio] { flex:none; width:20px; height:20px; }
label { line-height:1.5; }
.field-error { font-size:13px; }
.password-toggle { width:44px; height:44px; right:3px; }
button:not(.leaderboard-open):not(.password-toggle):not(.home-banner-dot) { min-height:44px; }
:is(button,a).bg-accent { border-radius:10px; font-weight:650; }
:is(button,a).bg-accent:hover { background:#60152d; }
.site-header { background:#fff; padding-inline:26px; border-bottom:1px solid var(--ui-line); }
.brand-link img { width:144px; height:52px; }
.shell-context { display:flex; align-items:center; gap:10px; color:var(--ui-muted); font-size:13px; }
.shell-context strong { color:var(--ui-ink); font-weight:600; }
.shell-context span { padding:5px 10px; border-radius:99px; background:var(--ui-paper); }
.desktop-rail { padding:24px 14px 18px; }
.nav-caption { font-size:11px; color:var(--ui-muted); }
.rail-link { min-height:47px; border-radius:10px; font-size:14px; margin-bottom:5px; }
.rail-link.is-active { background:var(--ui-accent); color:#fff; box-shadow:none; }
.rail-footer { font-size:13px; }
.header-icon-actions > :is(a,button) { border-radius:12px; }
.drawer-heading { padding:18px 22px; }
.drawer-account { padding:22px 12px; }
.drawer-account p { font-size:14px; }
#rightSidebar[aria-hidden="true"] { visibility:hidden; pointer-events:none; }
body:has(.desktop-rail) > main,#spaPage > main { max-width:1480px; padding:34px 36px 48px; }
main .page-heading { align-items:center; border-bottom:0; padding:0 0 10px; gap:16px; }
.page-heading :is(h1,h2),.collections-intro h2 { font-size:clamp(26px,2.6vw,34px); line-height:1.2; font-weight:700; }
.page-heading p { font-size:15px; color:var(--ui-muted); }
.page-eyebrow { display:block; margin-bottom:7px; font-size:12px; font-weight:700; color:var(--ui-accent); text-transform:uppercase; }
.table-panel,main > section.bg-surface,main > div.bg-surface { border-radius:var(--ui-radius); box-shadow:var(--ui-shadow); }
thead th { padding-block:16px; background:#f5f1f3; color:#675760; font-size:12px; text-transform:none; }
tbody td { padding-block:16px; }
.section-tabs { gap:6px; padding:6px; border:1px solid var(--ui-line); border-radius:14px; background:#fff; }
.section-tabs > button { border:0; font-size:14px; }
.section-tabs > button.text-accent { background:var(--ui-accent); color:white; }
.settings-mobile-select { display:none; }
.settings-page > section { padding-top:12px; }
.settings-page > section > .flex { align-items:center; }
.settings-page > section > .flex > p { max-width:600px; font-size:14px; }
.settings-page #termsBody { min-height:280px; }
.empty-state,#emptyState:not(.hidden),#noRoundState:not(.hidden) { border:1px dashed #cfc1c7; border-radius:16px; padding:36px 24px; background:#fff; }
.empty-state p { font-size:14px; }
#loadingState { border-radius:16px; padding:32px 24px; background:#fff; font-size:15px; }
.ui-hint { display:flex; align-items:flex-start; gap:12px; padding:16px 18px; border:1px solid #e7dac2; border-radius:14px; background:#fffaf0; color:#65522c; font-size:14px; line-height:1.6; }
.ui-hint .lucide { margin-top:2px; flex:none; }
.ui-hint strong { display:block; color:#4a371a; }
.ticket-summary { gap:12px; padding:0; border:0; }
.ticket-summary > div { flex:1 1 130px; flex-direction:column; gap:3px; padding:16px 20px; background:#fff; border:1px solid var(--ui-line); border-radius:14px; }
.ticket-summary strong { font-size:28px; }
.ticket-summary span { font-size:14px; }
.ticket-composer { border-radius:16px; box-shadow:var(--ui-shadow); }
.event-ticket .ticket-details > div > span:first-child,.event-ticket .ticket-heading > p { font-size:12px; }
.event-ticket .ticket-details { font-size:14px; }
.collections-page { --collections-muted:#6d5660; --collections-border:#e5dce0; background:var(--ui-paper); }
.collections-kicker { font-size:12px; color:#73551c; }
.collections-intro p { font-size:15px; line-height:1.6; }
.collections-page .collection-tabs { border-radius:14px; box-shadow:none; padding:6px; }
.collections-page .collection-tabs > button { font-size:13px; min-height:66px; gap:6px; }
.collections-page :is(#ticketsView,#raffleView) label,.ticket-filter-fields label { font-size:13px; color:var(--ui-muted); }
.collections-active-filters { font-size:13px; padding:12px; }
.collections-stat-primary > span,.collections-stat-next > span,.collections-stat-primary > small,.collections-stat-secondary span { font-size:13px; line-height:1.5; }
.collections-stat-primary,.collections-stat-next { min-height:156px; padding:20px; }
.collections-stat-details { grid-column:1 / -1; border:1px solid var(--ui-line); border-radius:12px; background:#fff; overflow:hidden; }
.collections-stat-details summary { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; padding:13px 16px; min-height:48px; color:var(--ui-ink); font-size:14px; font-weight:600; }
.collections-stat-details summary span { color:var(--ui-muted); font-size:12px; font-weight:400; }
.collections-stat-details .collections-stat-secondary { border:0; border-top:1px solid var(--ui-line); border-radius:0; }
.collections-room-eyebrow,.collections-status,.collections-room-leader span,.collections-room-progress span,.collections-room-facts,.collections-room-attention { font-size:13px; }
.collections-room-leader strong { font-size:15px; }
.collections-room-action,.collections-room-progress strong,.collections-room-facts b { font-size:14px; }
.collections-filter-panel { max-height:90dvh; overflow:auto; }
.collections-filter-panel > label { font-size:14px; }
.results-page .leaderboard-heading h3 { font-size:18px; }
.results-page .leaderboard-name { font-size:16px; }
.results-page .leaderboard-meta { font-size:13px; color:var(--ui-muted); }
.results-page .leaderboard-value span,.results-page .leaderboard-eyebrow { font-size:12px; color:var(--ui-muted); }
.results-page .leaderboard-row { min-height:84px; }
.mobile-ticket-preview-top small,.mobile-ticket-eyebrow,.mobile-ticket-badge,.mobile-ticket-preview-bottom { font-size:12px; }
.mobile-ticket-preview-meta { font-size:14px; color:var(--ui-muted); }
.mobile-ticket-preview-top small,.mobile-ticket-eyebrow { color:#705760; }
.mobile-record-status[data-tone=success] { color:#176b3a; }
.mobile-ticket-detail-section h3 { font-size:13px; }
.mobile-ticket-detail-row { font-size:14px; }
.mobile-ticket-detail-row dt { flex:0 1 42%; color:var(--ui-muted); }
.mobile-ticket-detail-row dd { min-width:0; }
.mobile-ticket-close { width:44px; height:44px; }
.mobile-ticket-sheet-actions :is(button,a) { min-height:48px; font-size:15px; }
.mobile-record-preview .mobile-ticket-preview-top { align-items:flex-start; }
.mobile-record-preview .mobile-ticket-preview-top strong { font-size:17px; }
.mobile-table-message { padding:26px 16px; color:var(--ui-muted); font-size:14px; text-align:center; }
.mobile-record-sheet .mobile-ticket-sheet-body img { max-width:100%; height:auto; }
[id$=Modal] > .bg-surface { border-radius:18px; }
[id$=Modal] h2,[id$=Modal] h3 { line-height:1.3; }
button[id^=close],button[id^=cancel] { flex-shrink:0; }
#toast { border:1px solid #ffffff24; border-radius:12px; padding:15px 20px; line-height:1.5; }
.auth-page { background:var(--ui-paper); }
.auth-page > header { min-height:76px; padding:14px 28px; }
.auth-page main > .max-w-md { max-width:460px; margin:32px 0; padding:32px; border:1px solid var(--ui-line); border-radius:20px; background:#fff; box-shadow:0 16px 50px #381d2810; }
.auth-page h1 { font-size:30px; }
.auth-page .text-center.mb-10 { margin-bottom:24px; }
.auth-page > .max-w-md > .bg-surface { border-radius:20px; padding:28px; box-shadow:var(--ui-shadow); }
.auth-page #loginBtn { min-height:50px; border-radius:10px; }
.auth-page form a { min-height:44px; display:flex; align-items:center; justify-content:center; }
.auth-page .auth-links { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; padding-top:0; }
.auth-page .auth-links > a { margin:0; font-size:13px; }
.auth-page .auth-verify { margin-top:22px; margin-bottom:0; font-size:13px; padding:14px; background:#faf8f5; border:1px solid var(--ui-line); }
.auth-intro { color:var(--ui-muted); margin-top:8px; font-size:15px; }
.reset-step { padding:8px; border-radius:8px; font-size:12px; }
.reset-step.is-active { color:var(--ui-accent); background:var(--ui-tint); }
.help-page #faqGroups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; align-items:start; }
.help-page #faqGroups > * { margin:0; }
.help-page .faq-item { border-radius:14px; }
.help-page .faq-item summary { min-height:60px; font-size:15px; }
.help-page .faq-item[open] { border-color:#bf8b9b; }
.concerns-page > .concern-filters { gap:14px; padding:20px; }
.account-page dl { line-height:1.6; }
.home-app { --home-muted:#6d5660; --home-line:#e5dce0; }
.home-welcome h1 { max-width:600px; font-size:clamp(26px,3vw,36px); }
.home-welcome p { font-size:15px; color:var(--ui-muted); }
.home-role { font-size:12px; color:var(--ui-muted); padding:7px 12px; background:white; border-radius:99px; }
.home-overview { background:linear-gradient(120deg,#6b1832,#8a2947); box-shadow:0 12px 28px #6b183218; }
.home-event-label { font-size:13px; }
.home-event-label > span:last-child { font-size:11px; }
.home-app .home-eyebrow { font-size:12px; }
.home-app #homeOverviewHint { font-size:15px; }
.home-overview h2 { font-size:28px; }
.home-metrics strong { font-size:30px; }
.home-metrics span { font-size:13px; }
.home-primary-action { min-height:52px; font-size:15px; }
.home-section-heading h2 { font-size:18px; }
.home-section-heading > span { font-size:12px; color:var(--ui-muted); }
.home-section-heading > a { min-height:44px; font-size:13px; }
.home-quick-actions > a { font-size:13px; background:white; border:1px solid var(--ui-line); padding:14px 8px; border-radius:14px; }
.home-ticket-top > span:first-child,.home-status,.home-ticket-number small,.home-ticket-actions > small,.home-update time { font-size:12px; }
.home-ticket-person strong,.home-attention-row strong { font-size:15px; }
.home-ticket-person span,.home-attention-row small,.home-app .home-update p,.home-app .home-empty p,.home-help small { font-size:14px; }
.home-update strong,.home-help strong,.home-manage summary,.home-manage nav a { font-size:14px; }
.home-app .home-event-note p { font-size:14px; color:#655638; }
.home-update time { color:var(--ui-muted); }
.home-help { padding:14px; background:white; border:1px solid var(--ui-line); border-radius:14px; }
.home-help small { color:var(--ui-muted); }
.score-progress { margin-bottom:18px; padding:20px; border:1px solid var(--ui-line); border-radius:16px; background:white; }
.score-progress-top { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.score-progress-top strong { font-size:16px; }
.score-progress-top span { color:var(--ui-muted); font-size:14px; }
.score-progress progress { display:block; width:100%; height:8px; margin:12px 0; border:0; border-radius:99px; overflow:hidden; accent-color:var(--ui-accent); }
.score-progress progress::-webkit-progress-bar { background:#eee6e9; }
.score-progress progress::-webkit-progress-value { background:var(--ui-accent); }
.score-progress p { color:var(--ui-muted); font-size:13px; }
.score-mobile-controls { display:none; }
.score-candidate-actions { display:none; }
.score-input[aria-invalid=true] { background:#fff4f4 !important; }
#scoreFeedback { font-size:14px; color:var(--ui-muted); }
#scoreFeedback[data-state=error] { color:#a52121; }
#scoreFeedback[data-state=saved] { color:#17633d; }
.verify-page { background:var(--ui-paper); }
.verify-panel { border-radius:20px; box-shadow:var(--ui-shadow); }
.verify-kicker { font-size:13px; }
.verify-footer { color:var(--ui-muted); }
@media (min-width:900px) {
  .settings-page .section-tabs { align-items:center; }
  .collections-page .collection-tabs > button { flex-direction:row; min-height:52px; gap:10px; font-size:15px; }
}
@media (max-width:899px) {
  :root { --rail:0px; --header:64px; --bottom:calc(70px + env(safe-area-inset-bottom)); }
  .site-header { padding-inline:16px; }
  .shell-context { display:none; }
  .mobile-nav { box-shadow:0 -4px 24px #32152608; padding-inline:10px; }
  .mobile-nav > :is(a,button) { font-size:12px; border-radius:12px; gap:4px; }
  .mobile-nav .is-active { color:var(--ui-accent); background:var(--ui-tint); }
  #rightSidebar .rail-link.is-active { color:#fff; }
  body:has(.desktop-rail) > main,#spaPage > main { padding:26px 22px 36px; }
  .settings-mobile-select { display:block; padding:16px; border:1px solid var(--ui-line); border-radius:14px; background:#fff; }
  .settings-mobile-select label { display:block; margin-bottom:7px; color:var(--ui-muted); font-size:13px; font-weight:600; }
  .settings-mobile-select select { width:100%; border:1px solid var(--ui-line); padding:10px 12px; }
  .settings-page > .section-tabs { display:none; }
}
@media (max-width:639px) {
  body:has(.desktop-rail) > main,#spaPage > main,body:has(.desktop-rail) > main.home-app,#spaPage > main.home-app { padding:24px 16px 32px; }
  main .page-heading { gap:14px; }
  .page-heading :is(h1,h2),.collections-intro h2 { font-size:28px; }
  .page-heading p { font-size:14px; }
  .page-heading > .flex { width:auto; }
  .page-heading > .flex > input { flex:1 1 100%; width:100%; }
  .ticket-summary { gap:8px; }
  .ticket-summary > div { flex:1 1 0; min-width:0; padding:14px 10px; }
  .ticket-summary span { font-size:12px; }
  .ticket-summary strong { font-size:25px; }
  .ui-hint { padding:14px; font-size:13px; }
  .ticket-page .ticket-composer[open] > summary { font-size:17px; padding:18px 16px; }
  .ticket-page .ticket-composer[open] > div { padding:18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .collections-page .collection-tabs > button { font-size:12px; }
  .collections-page #statsStrip { gap:8px; }
  .collections-stat-primary,.collections-stat-next { min-height:112px; padding:14px 12px; }
  .collections-stat-next .lucide { display:none; }
  .collections-stat-primary > strong,.collections-stat-next > strong { margin:10px 0 6px; }
  .collections-stat-primary > strong,.collections-stat-next > strong { font-size:30px; }
  .collections-stat-secondary { grid-template-columns:1fr; }
  .collections-stat-secondary > div { min-height:52px; }
  .collections-stat-secondary span { max-width:none; }
  .collections-room-grid { gap:14px; }
  .collections-page :is(#ticketsView,#raffleView) > section:first-child { padding:16px; }
  .collections-page :is(#ticketsView,#raffleView) label { font-size:13px; }
  .ticket-filter-fields { grid-template-columns:1fr; }
  .ticket-filter-panel .collections-filter-actions { position:sticky; bottom:-20px; margin:16px -4px -4px; padding:12px 4px; background:white; }
  .mobile-ticket-preview { padding:17px 16px; border-radius:14px; box-shadow:none; }
  .mobile-ticket-preview-top { gap:8px; }
  .mobile-ticket-badge { max-width:52%; }
  .mobile-ticket-preview-bottom { color:var(--ui-muted); }
  .mobile-ticket-detail-row { gap:12px; }
  .mobile-ticket-sheet-body { padding:18px 16px; }
  .mobile-ticket-sheet-head { padding-inline:16px; }
  .mobile-card-table tbody td::before { font-size:13px; }
  .results-page .leaderboard-row { grid-template-columns:36px minmax(0,1fr) minmax(52px,auto); gap:8px; padding:12px 24px 12px 10px; }
  .results-page .leaderboard-name { font-size:15px; }
  .results-page .leaderboard-meta { font-size:12px; }
  .results-page .leaderboard-value strong { font-size:20px; }
  .results-page .leaderboard-value span { font-size:11px; }
  .results-page .leaderboard-rank { width:34px; height:34px; font-size:18px; }
  .home-welcome h1 { font-size:28px; }
  .home-overview h2 { font-size:26px; }
  .home-event-label > span:last-child { display:none; }
  .home-metrics strong { font-size:26px; }
  .home-metrics span { font-size:12px; }
  .home-quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .home-quick-actions > a { flex-direction:row; align-items:center; justify-content:flex-start; gap:10px; min-height:70px; padding:12px; text-align:left; }
  .home-action-icon { width:36px; height:36px; border-radius:10px; flex:none; }
  .home-action-icon .lucide { width:20px; height:20px; }
  .home-section-heading > span { display:none; }
  .home-overview-content { padding:20px 18px; }
  .auth-page main > .max-w-md { padding:24px 20px; margin:8px 0 24px; }
  .auth-page > .max-w-md > .bg-surface { padding:22px 18px; }
  .auth-page > header { padding:12px 16px; }
  .auth-page h1 { font-size:27px; }
  .help-page #faqGroups { grid-template-columns:1fr; gap:26px; }
  .help-page > section:last-child { padding:24px 20px; }
  .concerns-page > .concern-filters { grid-template-columns:1fr; }
  .concerns-page > .concern-filters > label { grid-column:auto; }
  .score-mobile-controls { display:grid; gap:12px; margin-top:16px; }
  .score-progress { padding:16px; margin-bottom:12px; }
  .score-mobile-controls { gap:6px; margin-top:12px; }
  .score-candidate-actions { display:grid; gap:8px; margin-top:16px; }
  .score-mobile-controls label { color:var(--ui-muted); font-size:13px; }
  .score-mobile-controls select { width:100%; padding:10px; border:1px solid var(--ui-line); }
  .score-mobile-buttons { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .score-mobile-buttons button { padding:10px; border:1px solid var(--ui-line); border-radius:10px; background:#fff; font-size:14px; }
  .score-mobile-buttons button:last-child { color:white; background:var(--ui-accent); border-color:var(--ui-accent); }
  .score-matrix tbody tr.score-wing-row { display:none; }
  .scoring-page #roundTitle + div { display:none; }
  .score-matrix tbody tr[data-candidate-id]:not(.score-current) { display:none; }
  .score-matrix tbody { padding:0; }
  .score-matrix tbody tr { border:0; border-radius:0; padding:16px; }
  .score-matrix tbody td { grid-template-columns:minmax(0,1fr) minmax(90px,38%); padding:14px 0 !important; }
  .score-matrix tbody td:nth-child(1) { display:none; }
  .score-matrix tbody td:nth-child(2) { padding-bottom:20px !important; }
  .score-matrix tbody td:last-child { background:var(--ui-tint); margin-top:8px; padding:14px !important; border-radius:10px; }
  .score-matrix tbody td .field-error { grid-column:1 / -1; text-align:left; }
  #submitBar > div { gap:8px; }
  #submitBar #submitStatus { font-size:13px; }
  #submitBar #submitBtn { min-height:48px; }
}
@media (max-width:360px) {
  .home-quick-actions > a { gap:7px; padding:10px 8px; font-size:12px; }
  .collections-page .collection-tabs > button { font-size:11px; }
  .home-metrics { gap:6px; }
  .home-metrics strong { font-size:23px; }
  .ticket-summary span { font-size:12px; }
}
@media print { .ui-hint,.score-progress,.settings-mobile-select,.shell-context { display:none !important; } }
