/* Dungon Queen: maroon application accent, neutral work surfaces, semantic status colors. */
:root { --ui-accent:#7b1e3a; --ui-gold:#9a7428; --ui-paper:#f9f7f8; --ui-tint:#f9edf1; --ui-line:#e2e2e5; --rail:232px; --header:76px; --bottom:calc(64px + env(safe-area-inset-bottom)); }
* { box-sizing:border-box; letter-spacing:0 !important; }
html { background:var(--ui-paper); scroll-padding-top:96px; scrollbar-gutter:stable; }
body { margin:0; font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif; -webkit-font-smoothing:antialiased; }
::selection { background:#fae4eb; }
button,a { touch-action:manipulation; }
button:not(:disabled),summary { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.6; }
:is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid var(--ui-accent) !important; outline-offset:3px; }
:is(button,a,input,select,textarea) { transition:background-color .16s,border-color .16s,color .16s,box-shadow .16s; }
main { min-width:0; }
main :is(.grid,.flex) > :is(div,section,article) { min-width:0; }
main p { line-height:1.65; }
.collection-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:12px; }
.collection-stats.hidden { display:none; }
.collection-stat { min-width:0; min-height:92px; padding:16px 18px; border:1px solid #eedfe4; border-radius:16px; background:#fff; box-shadow:0 3px 12px #4a202d0a; display:flex; flex-direction:column; justify-content:space-between; gap:12px; }
.collection-stat-label { color:#765861; font-size:11px; font-weight:700; line-height:1.3; text-transform:uppercase; }
.collection-stat-value { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:26px; font-weight:750; line-height:1; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.collection-stat-small { min-height:78px; padding:13px 15px; background:#fefafb; }
.collection-stat-small .collection-stat-value { font-size:20px; }
@media (max-width:420px) {
  .collection-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .collection-stat { min-height:88px; padding:13px 14px; gap:10px; }
  .collection-stat-label { font-size:10px; }
  .collection-stat-value { font-size:24px; }
  .collection-stats:not(.collection-stats-compact) > .collection-stat:last-child:nth-child(odd) { grid-column:1 / -1; min-height:74px; flex-direction:row; align-items:center; }
  .collection-stat-small { min-height:76px; }
  .collection-stat-small .collection-stat-value { font-size:18px; }
}
h1,h2,h3 { text-wrap:balance; }
img { object-fit:contain; }
.lucide { width:20px; height:20px; flex-shrink:0; }
.skip-link { position:fixed; left:16px; top:-80px; padding:12px 18px; background:white; z-index:150; border:2px solid var(--ui-accent); }
.skip-link:focus { top:12px; }
.site-header { height:var(--header); position:sticky; top:0; z-index:40; display:flex; align-items:center; padding:0 28px; gap:28px; background:white; border-bottom:1px solid var(--ui-line); }
.brand-link { width:calc(var(--rail) - 28px); flex-shrink:0; display:flex; align-items:center; }
.brand-link img { width:142px; height:54px; }
.header-actions { margin-left:auto; display:flex; gap:14px; align-items:center; }
.header-icon-actions { display:flex; align-items:center; gap:8px; }
.header-icon-actions > :is(a,button) { display:grid; place-items:center; width:44px; height:44px; border:1px solid #efe5e8; border-radius:50%; background:#fff; color:#795560; }
.header-icon-actions > button { border-color:#f6e6eb; color:var(--ui-accent); background:#faf0f3; }
.header-icon-actions > :is(a,button):hover { border-color:#d7b5bf; background:var(--ui-tint); }
.icon-button { position:relative; display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid var(--ui-line); border-radius:8px; color:#45353a; background:white; flex-shrink:0; }
.icon-button:hover { background:var(--ui-tint); border-color:#d7b5bf; }
.desktop-rail { position:fixed; top:var(--header); bottom:0; left:0; width:var(--rail); padding:26px 14px 16px; background:white; border-right:1px solid var(--ui-line); display:flex; flex-direction:column; overflow-y:auto; z-index:35; }
.nav-caption { font-size:10px; font-weight:700; color:#777780; padding:0 14px 14px; }
.rail-link { display:flex; align-items:center; gap:12px; width:100%; padding:12px 14px; min-height:44px; border-radius:6px; color:#535360; font-size:13px; font-weight:500; text-align:left; margin-bottom:3px; }
.rail-link:hover { background:#f8f6f7; color:var(--ui-accent); }
.rail-link.is-active { background:var(--ui-tint); color:var(--ui-accent); font-weight:700; box-shadow:inset 3px 0 var(--ui-accent); }
.nav-unread-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 4px; margin-left:auto; border-radius:999px; background:#d12222; color:white; font-size:10px; font-weight:700; line-height:1; }
.nav-unread-badge.hidden { display:none; }
.desktop-rail .signout-button { margin-top:auto; }
.rail-footer { margin-top:auto; border-top:1px solid var(--ui-line); padding:20px 14px 0; display:flex; flex-direction:column; gap:12px; color:#666670; font-size:11px; }
.rail-footer img { width:96px; height:auto; }
.drawer-heading { display:flex; align-items:center; justify-content:space-between; padding:20px; border-bottom:1px solid var(--ui-line); }
.drawer-heading img { width:113px; height:42px; }
.drawer-account { padding:20px 12px; overflow-wrap:anywhere; }
.drawer-account strong { font-size:15px; }
.drawer-account p { font-size:12px; color:#646470; margin-top:4px; }
.signout-button { margin-top:20px; border-top:1px solid var(--ui-line); border-radius:0; }
#rightSidebar { height:100dvh; }
.mobile-nav { display:none; }
body:has(.desktop-rail) > main, body:has(.desktop-rail) > #spaPage { margin-left:var(--rail); }
body:has(.desktop-rail) > main, #spaPage > main { width:auto; max-width:1440px; padding:32px 32px 48px; }
#spaPage { min-width:0; }
main .page-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; background:transparent; border:0; border-bottom:1px solid var(--ui-line); padding:0 0 22px; border-radius:0; box-shadow:none; }
.page-heading :is(h1,h2) { font-size:26px; font-weight:650; line-height:1.25; }
.page-heading p { max-width:640px; margin-top:6px; }
.page-heading button { min-height:44px; flex-shrink:0; }
.page-heading > .flex { min-width:0; flex-wrap:wrap; }
.page-heading input { min-width:0; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea { min-height:44px; border-radius:6px; background-color:white; }
:is(input,select,textarea):hover { border-color:#b3a5a9; }
:is(input,select,textarea):focus { background-color:white; }
input[class]::placeholder,textarea[class]::placeholder { color:#777782; opacity:1; }
input[type=checkbox],input[type=radio] { accent-color:var(--ui-accent); width:18px; height:18px; }
button.rounded-full,a.rounded-full { border-radius:6px; }
:is(button,a).bg-accent { background-image:none; box-shadow:none; }
button.bg-accent:disabled { background:#e2e2e5; color:#5c5c64; opacity:1; }
.field-error { margin:6px 0 0; color:#b91c1c; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.field-error[hidden] { display:none; }
.field-required { color:#b91c1c; }
:is(input,select,textarea)[aria-invalid=true] { border-color:#b91c1c; }
.password-input-wrap { position:relative; }
.password-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:40px; height:40px; padding:10px; color:var(--ui-accent); border-radius:6px; display:inline-flex; align-items:center; justify-content:center; }
.password-toggle:hover { background:var(--ui-tint); }
table { font-variant-numeric:tabular-nums; }
thead th { font-size:11px; line-height:1.5; }
tbody tr:hover { background:#fcf8f9; }
td { line-height:1.6; }
.overflow-x-auto { overscroll-behavior-x:contain; scrollbar-width:thin; }
.table-panel td { vertical-align:middle; }
.section-tabs { display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--ui-line); padding:0 0 8px; }
.section-tabs > button,.tabBtn { min-height:44px; padding:10px 16px; border-radius:6px; }
.section-tabs > button.text-accent,.tabBtn.text-accent { background:var(--ui-tint); }
.collection-tabs { display:flex; flex-wrap:nowrap; gap:8px; padding:5px; border:1px solid var(--ui-line); border-radius:14px; background:#fff; overflow-x:auto; }
.collection-tabs > button { flex:1 0 auto; min-height:44px; padding:10px 16px; border:0; border-radius:10px; line-height:1.2; text-align:center; }
.collection-tabs > button.text-accent { background:var(--ui-accent); color:#fff; box-shadow:0 2px 7px #7b1e3a29; }
.collection-tabs > button.hidden { display:none; }
@media (max-width:600px) {
  .collection-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; overflow:visible; }
  .collection-tabs > button { min-width:0; width:100%; padding:10px 6px; font-size:13px; white-space:normal; }
}
.settings-page > section > .flex { gap:16px; flex-wrap:wrap; }
.settings-page > section > .flex > button { flex-shrink:0; }
[id$=Modal] > .bg-surface,[id$=Modal] > div > .bg-surface { border-radius:8px; max-height:calc(100dvh - 32px); overflow-y:auto; box-shadow:0 20px 70px #19141530; }
[id$=Modal] button { min-height:44px; }
body:has([id$=Modal].fixed:not(.hidden)) { overflow:hidden; }
#ticketFooter,#submitBar { background:white; box-shadow:0 -4px 16px #19141508; padding-bottom:env(safe-area-inset-bottom); left:var(--rail); }
body:has(#ticketFooter:not(.hidden)) { padding-bottom:180px; }
body:has(#submitBar:not(.hidden)) { padding-bottom:120px; }
#toast { max-width:calc(100vw - 32px); }
.hide-scrollbar::-webkit-scrollbar { display:none; }
@keyframes fade-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
.animate-fade-in { animation:fade-in .2s ease-out; }

/* Home combines the real event identity with role-specific destinations. */
.dashboard-intro { padding:0 0 22px; border-bottom:1px solid var(--ui-line); }
.dashboard-intro h1 { font-size:28px; font-weight:650; line-height:1.3; }
.dashboard-intro p { color:#646470; font-size:14px; margin-top:6px; }
.event-banner { display:flex; align-items:center; gap:28px; padding:28px 0; border-bottom:1px solid var(--ui-line); }
.event-banner img { width:200px; height:90px; flex-shrink:0; }
.event-banner .event-copy { border-left:1px solid #d5c7a5; padding-left:28px; }
.event-banner h2 { font-size:24px; font-weight:650; }
.event-banner p { font-size:13px; color:#60606c; margin-top:6px; max-width:500px; }
.event-eyebrow { color:var(--ui-gold); font-size:11px; font-weight:700; margin-bottom:8px; }
.home-section-title { font-size:16px; font-weight:650; margin-bottom:14px; }
.portal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.portal-card { display:flex; align-items:center; gap:16px; padding:22px; border:1px solid var(--ui-line); border-radius:8px; background:white; min-width:0; }
.portal-card:hover { border-color:#cfaab5; background:#fffdfe; }
.portal-card .portal-icon { display:grid; place-items:center; width:44px; height:44px; background:var(--ui-tint); color:var(--ui-accent); border-radius:8px; flex-shrink:0; }
.portal-card:nth-child(3n+2) .portal-icon { background:#eaf5f0; color:#237255; }
.portal-card:nth-child(3n+3) .portal-icon { background:#faf3e4; color:#89651f; }
.portal-card h3 { font-size:15px; font-weight:650; }
.portal-card p { margin-top:5px; font-size:12px; color:#666670; }
.portal-card > .lucide { margin-left:auto; width:17px; color:#777782; }
.support-link { display:flex; align-items:center; gap:12px; color:#565663; font-size:13px; border-top:1px solid var(--ui-line); padding-top:22px; }
.support-link a { margin-left:auto; font-weight:600; color:var(--ui-accent); }

/* Tickets remain official raffle records; the status controls printing. */
.ticket-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:28px; align-items:start; }
.ticket-collection { min-width:0; }
.ticket-composer { grid-column:2; grid-row:1; }
.ticket-collection { grid-column:1; grid-row:1; }
.ticket-composer { border:1px solid var(--ui-line); border-radius:8px; background:white; position:sticky; top:100px; scroll-margin-top:96px; }
.ticket-composer > summary { padding:18px 20px; font-size:15px; font-weight:650; display:flex; gap:12px; align-items:center; list-style:none; }
.ticket-composer > summary::-webkit-details-marker { display:none; }
.ticket-composer > summary .composer-chevron { margin-left:auto; }
.ticket-composer-close { display:none; }
.mobile-ticket-create-label { display:none; }
.ticket-composer[open] > summary { border-bottom:1px solid var(--ui-line); }
.ticket-composer[open] > summary .composer-chevron { transform:rotate(180deg); }
.ticket-composer > div { padding:20px; }
.ticket-page #ticketsWrap,.ticket-page #cancelledWrap { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); }
.ticket-summary { display:flex; gap:24px; flex-wrap:wrap; border-bottom:1px solid var(--ui-line); padding:0 0 20px; margin-bottom:22px; }
.ticket-summary div { display:flex; gap:6px; align-items:baseline; }
.ticket-summary strong { font-size:23px; color:var(--ui-accent); font-variant-numeric:tabular-nums; }
.ticket-summary span { font-size:12px; color:#666670; }
.ticket-summary.hidden { display:none; }
.section-tabs.hidden { display:none; }
.print-card .ticket-heading > span.font-mono { font-size:28px; }
#spaPage[aria-busy=true] { cursor:progress; }
#spaPage[aria-busy=true]::before { content:''; position:fixed; z-index:45; top:var(--header); left:var(--rail); right:0; height:3px; background:var(--ui-gold); }
.event-ticket[id],.event-ticket.print-card { border:1px solid var(--ui-line); border-top:3px solid var(--ui-accent); border-radius:8px; padding:0; box-shadow:0 2px 6px #19141505; }
.event-ticket .ticket-heading { margin:0; padding:18px; border-bottom:1px solid var(--ui-line); background:white; }
.ticket-brand { display:block; width:106px; height:40px; margin:0 auto 12px; }
.event-ticket .ticket-heading > p { font-size:10px; color:#696973; }
.event-ticket .ticket-heading > span { max-width:100%; overflow-wrap:anywhere; font-size:14px; background:transparent; }
.event-ticket .ticket-details { padding:18px; }
.event-ticket .ticket-details > div { gap:12px; align-items:baseline; }
.event-ticket .ticket-details > div > span:first-child { flex-shrink:0; font-size:10px; }
.event-ticket .ticket-details > div > span:last-child { min-width:0; text-align:right; overflow-wrap:anywhere; }
.event-ticket .ticket-stub { margin:0; padding:18px; border-top:2px dashed #d9d7cc; background:#fafaf8; }
.event-ticket .ticket-stub .font-mono { max-width:100%; overflow-wrap:anywhere; }
.event-ticket .ticket-stub > .border-dashed { border-top:0; padding-top:4px; }
.event-ticket .ticket-stub button,.event-ticket .ticket-stub a { min-height:44px; }
.print-card.event-ticket { max-width:680px; display:grid; grid-template-columns:minmax(0,1fr) 220px; }
.print-card .ticket-heading,.print-card .ticket-details { grid-column:1; }
.print-card .ticket-stub { grid-column:2; grid-row:1 / 3; display:flex; flex-direction:column; justify-content:center; border-top:0; border-left:2px dashed #d9d7cc; }
.empty-state { padding:36px 20px; text-align:center; border:1px dashed #d5c8cc; border-radius:8px; color:#62626c; }
.empty-state > .lucide { width:32px; height:32px; color:var(--ui-accent); margin:0 auto 12px; }
.empty-state strong { display:block; color:#302528; margin-bottom:8px; }
.empty-state p { font-size:13px; }
.empty-state button { margin-top:18px; }

/* Results use one compact row per candidate at every screen size. */
.results-page { max-width:1100px; }
.results-page .leaderboard-panel { overflow:hidden; border:1px solid #ecdfe3; border-radius:14px; background:white; box-shadow:0 8px 26px #7b1e3a0a; }
.results-page .leaderboard-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 20px 15px; border-bottom:1px solid #f2e9ec; background:linear-gradient(110deg,#fef9fa 0%,#fff 68%); }
.results-page .leaderboard-eyebrow { display:block; margin-bottom:3px; color:#956876; font-size:10px; font-weight:700; text-transform:uppercase; }
.results-page .leaderboard-heading h3 { color:var(--ui-accent); font-size:17px; font-weight:700; line-height:1.3; }
.results-page .leaderboard-heading-mark { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:10px; background:#fcedf2; color:var(--ui-accent); font-size:15px; }
.results-page .leaderboard-panel--choice .leaderboard-heading { background:linear-gradient(110deg,#fff9f8 0%,#fff 68%); }
.results-page .leaderboard-panel--choice .leaderboard-heading-mark { background:#fceeed; color:#b5444c; }
.results-page .leaderboard-list { display:grid; gap:7px; margin:0; padding:10px; list-style:none; }
.results-page .leaderboard-row { display:grid; grid-template-columns:48px minmax(0,1fr) minmax(74px,auto); align-items:center; gap:12px; min-width:0; min-height:69px; padding:10px 14px; border:1px solid #f3ecee; border-radius:11px; background:#fff; }
.results-page .leaderboard-row--top { border-color:#eed9df; background:#fefbfc; }
.results-page .leaderboard-row--1 { border-color:#e9d9ad; background:linear-gradient(100deg,#fffbf1 0%,#fff 66%); box-shadow:inset 3px 0 #b8954e; }
.results-page .leaderboard-row--2 { box-shadow:inset 3px 0 #c09ba6; }
.results-page .leaderboard-row--3 { box-shadow:inset 3px 0 #ba9175; }
.results-page .leaderboard-rank { display:flex; align-items:baseline; justify-content:center; gap:1px; width:44px; height:44px; padding-top:8px; border-radius:12px; background:#f6f1f3; color:#785862; font-size:20px; font-weight:750; line-height:1; font-variant-numeric:tabular-nums; }
.results-page .leaderboard-rank small { font-size:10px; font-weight:700; }
.results-page .leaderboard-row--1 .leaderboard-rank { background:#f6e9c9; color:#79591b; }
.results-page .leaderboard-row--2 .leaderboard-rank { background:#f6e8ec; color:#7f4b5b; }
.results-page .leaderboard-row--3 .leaderboard-rank { background:#f6eae4; color:#895b44; }
.results-page .leaderboard-person { min-width:0; }
.results-page .leaderboard-name { display:block; overflow-wrap:anywhere; color:#301920; font-size:14px; font-weight:700; line-height:1.35; }
.results-page .leaderboard-meta { display:flex; align-items:center; flex-wrap:wrap; gap:2px 7px; margin-top:4px; color:#85666f; font-size:11px; line-height:1.3; }
.results-page .leaderboard-meta > span + span::before { content:'·'; margin-right:7px; color:#b5a0a6; }
.results-page .leaderboard-wing { color:#794253; font-weight:650; }
.results-page .leaderboard-value { min-width:0; text-align:right; white-space:nowrap; }
.results-page .leaderboard-value strong { display:block; color:var(--ui-accent); font-size:21px; font-weight:750; line-height:1.1; font-variant-numeric:tabular-nums; }
.results-page .leaderboard-row--1 .leaderboard-value strong { color:#755714; }
.results-page .leaderboard-value span { display:block; margin-top:3px; color:#8c747b; font-size:10px; font-weight:600; }
.results-page .leaderboard-empty { padding:30px 18px; color:#836870; font-size:13px; text-align:center; }
.results-page #emptyState.hidden { display:none; }

@media (max-width:420px) {
  .results-page .leaderboard-heading { padding:14px 15px 13px; }
  .results-page .leaderboard-heading h3 { font-size:15px; }
  .results-page .leaderboard-list { gap:6px; padding:8px; }
  .results-page .leaderboard-row { grid-template-columns:40px minmax(0,1fr) minmax(60px,auto); gap:8px; min-height:63px; padding:8px; }
  .results-page .leaderboard-rank { width:38px; height:38px; padding-top:7px; border-radius:10px; font-size:18px; }
  .results-page .leaderboard-rank small { font-size:9px; }
  .results-page .leaderboard-name { font-size:12px; }
  .results-page .leaderboard-meta { gap:2px 5px; font-size:10px; }
  .results-page .leaderboard-meta > span + span::before { margin-right:5px; }
  .results-page .leaderboard-value strong { font-size:18px; }
  .results-page .leaderboard-value span { font-size:9px; }
}

.auth-page { background:white; }
.auth-page > header { background:white; min-height:76px; }
.auth-page > header img { width:130px; height:48px; }
.auth-page main > .max-w-md { margin:24px 0; padding:24px 12px; }
.auth-page #loginBtn { background:var(--ui-accent); color:white; border-radius:6px; }
.auth-page #loginBtn:hover { background:#591329; }
.auth-page h1 { font-size:28px; }
.auth-page form { text-align:left; }
.auth-page .shadow-xl { box-shadow:none; }
.auth-page > .max-w-md > .bg-surface { padding:24px; }

@media (max-width:1100px) {
  :root { --rail:208px; }
  .ticket-layout { grid-template-columns:minmax(0,1fr); }
  .ticket-composer { position:static; }
  .ticket-composer { grid-column:1; grid-row:1; }
  .ticket-collection { grid-column:1; grid-row:2; }
}
@media (max-width:899px) {
  :root { --header:64px; --rail:0px; }
  .desktop-rail { display:none; }
  .site-header { padding:0 16px; gap:12px; }
  .brand-link { width:auto; }
  .brand-link img { width:118px; height:44px; }
  .header-actions { gap:8px; }
  .mobile-nav { position:fixed; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); height:var(--bottom); padding:4px 8px calc(4px + env(safe-area-inset-bottom)); background:white; border-top:1px solid var(--ui-line); z-index:40; }
  .mobile-nav > :is(a,button) { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font-size:10px; color:#686874; min-width:0; border-radius:6px; }
  .mobile-nav a { position:relative; }
  .mobile-nav .nav-unread-badge { position:absolute; top:2px; left:calc(50% + 5px); margin:0; }
  .mobile-nav .is-active { color:var(--ui-accent); background:var(--ui-tint); font-weight:700; }
  body:has(.mobile-nav) { padding-bottom:calc(var(--bottom) + 20px); }
  body:has(.desktop-rail) > main,#spaPage > main { padding:24px 20px 36px; }
  #ticketFooter,#submitBar { bottom:var(--bottom); left:0; }
  body:has(#ticketFooter:not(.hidden)) { padding-bottom:calc(var(--bottom) + 230px); }
  body:has(#submitBar:not(.hidden)) { padding-bottom:calc(var(--bottom) + 150px); }
  #toast { bottom:calc(var(--bottom) + 14px); }
  body:has(#ticketFooter:not(.hidden)) #toast,body:has(#submitBar:not(.hidden)) #toast { bottom:auto; top:76px; }
  #rightSidebar { top:auto; bottom:0; max-width:none; height:min(88dvh,740px); border-radius:12px 12px 0 0; transform:translateY(0); }
  #rightSidebar.translate-x-full { transform:translateY(105%); }
}
@media (max-width:639px) {
  .ticket-page .ticket-collection { grid-row:1; }
  .ticket-page .ticket-composer { display:none; }
  .ticket-page .ticket-composer[open] { display:flex; position:fixed; inset:0; z-index:70; flex-direction:column; align-items:center; justify-content:flex-end; width:100%; margin:0; border:0; border-radius:0; background:#2b111991; overflow:hidden; }
  .ticket-page .ticket-composer[open] > summary { flex:none; width:100%; max-width:520px; min-height:62px; padding:15px 20px; border-radius:20px 20px 0 0; border-bottom:1px solid var(--ui-line); background:#fff; }
  .ticket-page .ticket-composer[open] > div { width:100%; max-width:520px; max-height:calc(90dvh - 62px); padding:18px 20px calc(24px + env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; background:#fff; }
  .ticket-page .ticket-composer[open] .composer-chevron { display:none; }
  .ticket-page .ticket-composer[open] .ticket-composer-close { display:block; margin-left:auto; color:#644b52; font-size:28px; font-weight:400; line-height:1; }
  body:has(.ticket-page .ticket-composer[open]) { overflow:hidden; }
  body:has(.desktop-rail) > main,#spaPage > main { padding:24px 16px 32px; }
  .page-heading :is(h1,h2),.dashboard-intro h1 { font-size:24px; }
  .page-heading > .flex { width:100%; }
  .page-heading > .flex > input { flex:1 1 100%; }
  .portal-grid { grid-template-columns:1fr; gap:10px; }
  .portal-card { padding:18px 16px; }
  .event-banner { gap:16px; padding:24px 0; flex-wrap:wrap; }
  .event-banner img { width:156px; height:60px; }
  .event-banner .event-copy { border:0; padding:0; width:100%; }
  .event-banner h2 { font-size:22px; }
  .support-link { flex-wrap:wrap; }
  .support-link a { margin-left:32px; }
  .ticket-summary { gap:16px; }
  .ticket-summary strong { font-size:21px; }
  .ticket-page > .page-heading > div { flex:1 1 100%; min-width:0; }
  .ticket-page .new-ticket-label { display:none; }
  .ticket-page .mobile-ticket-create-label { display:inline; }
  .ticket-page > .page-heading > button { justify-content:center; width:100%; min-height:46px; padding:12px 16px; }
  input:not([type=checkbox]):not([type=radio]),select,textarea { min-height:48px; font-size:16px !important; }
  textarea { min-height:112px; }
  :is(button,a).bg-accent,button[type=submit] { min-height:46px; }
  .auth-page main.flex-1 { align-items:flex-start; padding-top:20px; }
  .auth-page > header { padding:12px 16px; }
  .auth-page main > .max-w-md { margin:12px 0; padding:12px; }
  #ticketFooter > div,#submitBar > div { padding:12px 16px; gap:12px; flex-wrap:wrap; }
  #ticketFooter > div > div,#submitBar > div > button { width:100%; }
  #ticketFooter button,#submitBar button { width:100%; justify-content:center; }
  #toast { left:16px; right:16px; width:auto; text-align:center; }
  [id$=Modal].fixed { align-items:flex-end !important; padding:0 !important; }
  [id$=Modal].fixed:not(.hidden) { display:flex !important; flex-direction:column; justify-content:flex-end; }
  [id$=Modal].fixed > div,[id$=Modal].fixed > .bg-surface { width:100%; max-width:none; max-height:min(90dvh,760px); margin:0; overflow-y:auto; border-radius:12px 12px 0 0; padding:22px 16px calc(22px + env(safe-area-inset-bottom)); }
  [id$=Modal] form > .grid.grid-cols-2 { grid-template-columns:1fr; }
  [id$=Modal] form > .flex:last-child { flex-wrap:wrap; }
  #imageModal.fixed:not(.hidden) { align-items:center !important; justify-content:center; padding:20px !important; }
  #imageModal.fixed > div { width:auto; max-width:100%; padding:0; overflow:visible; border-radius:0; }
  .overflow-x-auto:has(> .mobile-card-table) { overflow:visible; }
  .mobile-card-table { display:block; width:100%; min-width:0 !important; }
  .mobile-card-table thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .mobile-card-table tbody { display:grid; gap:12px; padding:10px; background:var(--ui-paper); }
  .mobile-card-table tbody tr { display:grid; padding:8px 10px; border:1px solid var(--ui-line); border-radius:8px; background:white; }
  .mobile-card-table tbody td { display:grid; grid-template-columns:minmax(80px,34%) minmax(0,1fr); align-items:center; gap:12px; min-height:42px; padding:9px 4px !important; border:0; border-bottom:1px solid #f2eeef; text-align:right !important; overflow-wrap:anywhere; }
  .mobile-card-table tbody td:last-child { border-bottom:0; }
  .mobile-card-table tbody td::before { content:attr(data-label); color:#646470; font-size:11px; font-weight:500; line-height:1.4; text-align:left; }
  .mobile-card-table tbody td[colspan] { display:block; padding:20px 10px !important; text-align:center !important; }
  .mobile-card-table tbody td[colspan]::before { content:none; }
  .mobile-card-table tbody td > :is(button,a) { justify-self:end; min-height:44px; }
  .mobile-card-table tbody td .flex { justify-content:flex-end; flex-wrap:wrap; }
  .mobile-card-table tbody td :is(button,a) { white-space:normal; }
  .mobile-card-table tbody td button { min-height:44px; }
  .score-matrix tbody td:nth-child(2) { display:block; min-width:0 !important; text-align:left !important; }
  .score-matrix tbody td:nth-child(2)::before { content:none; }
  .score-matrix tbody td:nth-child(2) .flex { justify-content:flex-start; }
  .score-matrix tbody td:nth-child(2) :is(img,.w-20) { width:48px; height:48px; flex-shrink:0; }
  .score-matrix .score-input { width:100%; text-align:center; }
  .score-input { font-variant-numeric:tabular-nums; }
  .print-card.event-ticket { display:block; max-width:440px; }
  .print-card .ticket-stub { border-left:0; border-top:2px dashed #d9d7cc; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

/* Compact ticket previews share one mobile interaction across both ticket pages. */
.mobile-ticket-list,.mobile-ticket-preview,.mobile-ticket-modal,.mobile-record-list { display:none; }
.leaderboard-open { display:none; }
.room-person-mobile { display:none; }
@media (max-width:639px) {
  .mobile-record-desktop { display:none !important; }
  .mobile-record-list { display:grid; gap:10px; padding:10px; background:var(--ui-paper); }
  .mobile-record-preview .mobile-ticket-preview-top strong { color:#30252a; font-family:inherit; font-size:16px; line-height:1.3; overflow-wrap:anywhere; }
  .mobile-record-status { flex:none; color:var(--ui-accent); background:var(--ui-tint); }
  .mobile-record-status[data-tone=success] { color:#0f8c3b; background:#e7f6ec; }
  .mobile-record-status[data-tone=danger] { color:#a92929; background:#fce9e9; }
  .mobile-record-status[data-tone=pending] { color:#a74d05; background:#fdf3e8; }
  .mobile-record-status:is(:empty) { display:none; }
  .mobile-record-sheet .mobile-ticket-sheet-actions:has(button) { display:flex; }
  .mobile-record-open { overflow:hidden; }
  #concernList { display:grid; gap:10px; padding:10px; background:var(--ui-paper); }
  #concernList .concern-preview { position:relative; padding:14px 34px 14px 16px; border:1px solid #ede1e5; border-radius:14px; background:#fff; box-shadow:0 3px 12px #1914150a; }
  #concernList .concern-preview > :nth-child(2),#concernList .concern-preview > :nth-child(4),#concernList .concern-preview > :nth-child(5) { display:none; }
  #concernList .concern-preview > :nth-child(3) { margin-top:5px; font-size:12px; color:#745961; }
  #concernList .concern-preview::after { content:'›'; position:absolute; right:13px; top:50%; transform:translateY(-50%); color:#a68b93; font-size:23px; }
  #detailPanel { display:none; }
  #detailPanel.mobile-concern-open { display:block; position:fixed; z-index:72; left:0; right:0; bottom:0; max-height:91dvh; overflow-y:auto; overscroll-behavior:contain; padding:28px 20px calc(20px + env(safe-area-inset-bottom)); border-radius:20px 20px 0 0; box-shadow:0 -12px 40px #2b11192b; }
  #concernBackdrop:not(.hidden) { display:block; position:fixed; z-index:71; inset:0; background:#2b111991; }
  .concern-sheet-close { float:right; margin:-10px -2px 8px 8px; }
  .notification-desktop-card { display:none; }
  .mobile-notification-preview .mobile-ticket-preview-top strong { color:#30252a; font-family:inherit; font-size:13px; font-weight:700; line-height:1.35; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .mobile-notification-sheet .notification-message { margin-top:18px; color:#30252a; font-size:15px; line-height:1.55; overflow-wrap:anywhere; }
  .mobile-notification-sheet .notification-date { margin-top:16px; color:#836971; font-size:12px; }
  .room-navigation-card { position:relative; min-height:0; padding:14px 38px 14px 16px; border-radius:14px; box-shadow:0 3px 12px #1914150a; }
  .room-navigation-card:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
  .room-navigation-card::after { content:'›'; position:absolute; right:13px; top:50%; transform:translateY(-50%); color:#a68b93; font-size:23px; }
  .room-navigation-card > .flex:first-child { margin-bottom:6px; }
  .room-navigation-card > .flex:first-child h3,.room-navigation-card > .flex:first-child h4 { font-size:16px; }
  .room-navigation-card > .mt-auto { margin-top:0; padding-top:5px; border-top:0; }
  .room-collection-card > .space-y-2 { margin-top:0; }
  .room-collection-card > .space-y-2 > :nth-child(n+2) { display:none; }
  .room-collection-card > .space-y-2 > :first-child { justify-content:flex-start; gap:6px; font-size:12px; }
  .room-collection-card > .space-y-2 > :first-child .pl-4 { padding-left:0; }
  .pay-request-desktop { display:none !important; }
  .pay-request-preview .mobile-ticket-preview-top strong { color:#30252a; font-family:inherit; font-size:15px; }
  .pay-request-preview .mobile-ticket-badge { max-width:45%; }
  .pay-request-sheet .mobile-ticket-sheet-body > div { display:grid; gap:10px; color:#30252a; }
  .pay-request-sheet .mobile-ticket-sheet-actions:not(:has(button)) { color:#836971; font-size:12px; text-align:center; }
  .my-concern-desktop { display:none; }
  .my-concern-preview .mobile-ticket-preview-top strong { color:#30252a; font-family:inherit; font-size:15px; line-height:1.3; }
  .my-concern-sheet .my-concern-desktop { display:block; }
  .results-page .leaderboard-row { position:relative; padding-right:26px; }
  .leaderboard-open { display:block; position:absolute; inset:0; width:100%; border-radius:inherit; color:transparent; cursor:pointer; }
  .leaderboard-open::after { content:'›'; position:absolute; right:7px; top:50%; transform:translateY(-50%); color:#a68b93; font-size:23px; }
  .leaderboard-open:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
  #roomDetailView #roomLeaderContainer,#roomDetailView .resident-desktop-table { display:none; }
  .room-person-mobile:not(.hidden) { display:grid; gap:10px; padding:10px; background:var(--ui-paper); border:1px solid var(--ui-line); border-radius:14px; }
  .room-person-mobile.hidden { display:none; }
  #roomLeaderMobile:not(.hidden) { border-color:#f0d8ba; background:#fffaf5; }
  .room-person-preview .mobile-ticket-preview-top strong { color:#30252a; font-family:inherit; font-size:16px; line-height:1.3; overflow-wrap:anywhere; }
  .room-detail-actions { flex-wrap:wrap; }
  #roomPersonTitle { min-width:0; overflow-wrap:anywhere; }
  #ticketsView .overflow-x-auto:has(#ticketRegistryTable) { display:none; }
  .collection-residents-table { display:none; }
  .mobile-ticket-list { display:grid; gap:10px; padding:10px; background:var(--ui-paper); }
  .collection-resident-preview .collection-resident-name { color:#30252a; font-family:inherit; font-size:16px; line-height:1.3; overflow-wrap:anywhere; }
  .remittance-desktop-card { display:none; }
  .ticket-page #ticketsWrap,.ticket-page #cancelledWrap { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  .ticket-page #ticketsWrap.hidden,.ticket-page #cancelledWrap.hidden { display:none; }
  .ticket-page .event-ticket[id] { display:none; }
  .mobile-ticket-preview { display:flex; flex-direction:column; width:100%; min-width:0; padding:15px 16px 12px; border:1px solid #ede1e5; border-radius:14px; background:#fff; box-shadow:0 3px 12px #1914150a; color:#30252a; text-align:left; cursor:pointer; }
  .mobile-ticket-preview:active { background:#fdf8fa; transform:scale(.995); }
  .mobile-ticket-preview:focus-visible,.mobile-ticket-close:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; }
  .mobile-ticket-preview-top { display:flex; justify-content:space-between; align-items:center; gap:10px; width:100%; }
  .mobile-ticket-preview-top > span:first-child { display:flex; flex-direction:column; min-width:0; }
  .mobile-ticket-preview-top small,.mobile-ticket-eyebrow { color:#8d747b; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.09em; }
  .mobile-ticket-preview-top strong { color:var(--ui-accent); font-size:19px; line-height:1.2; font-weight:750; font-variant-numeric:tabular-nums; }
  .mobile-ticket-preview-top .rounded,.mobile-ticket-badge { display:inline-flex; align-items:center; max-width:55%; padding:5px 9px; border-radius:999px; font-size:10px; font-weight:750; line-height:1.2; text-align:center; text-transform:none; letter-spacing:0; }
  .mobile-ticket-preview-name { display:block; width:100%; margin-top:10px; color:#30252a; font-size:14px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
  .mobile-ticket-preview-meta { display:block; width:100%; margin-top:3px; color:#804c5c; font-size:12px; line-height:1.35; overflow-wrap:anywhere; }
  .mobile-ticket-preview-bottom { display:flex; justify-content:space-between; align-items:center; gap:8px; width:100%; margin-top:10px; padding-top:8px; border-top:1px solid #f4eff1; color:#836971; font-size:11px; line-height:1.3; overflow-wrap:anywhere; }
  .mobile-ticket-chevron { color:#a68b93; font-size:23px; font-weight:300; line-height:1; }
  .mobile-ticket-modal:not(.hidden) { display:flex; position:fixed; inset:0; z-index:60; align-items:flex-end; }
  .mobile-ticket-backdrop { position:absolute; inset:0; background:#2b111991; }
  .mobile-ticket-sheet { position:relative; display:flex; flex-direction:column; width:100%; max-height:min(91dvh,820px); border-radius:20px 20px 0 0; background:#fff; box-shadow:0 -12px 40px #2b11192b; overflow:hidden; outline:none; }
  .mobile-ticket-sheet-head { flex:none; padding:8px 20px 14px; border-bottom:1px solid #f3ecee; }
  .mobile-ticket-handle { width:38px; height:4px; margin:0 auto 15px; border-radius:99px; background:#e3d6da; }
  .mobile-ticket-sheet-title { display:flex; align-items:center; justify-content:space-between; gap:14px; }
  .mobile-ticket-sheet-title h2 { color:#33171f; font-size:22px; font-weight:750; line-height:1.2; }
  .mobile-ticket-close { display:grid; place-items:center; flex:none; width:42px; height:42px; border:1px solid #ebe3e5; border-radius:12px; color:#5a3943; font-size:26px; line-height:1; }
  .mobile-ticket-sheet-body { min-height:0; padding:18px 20px 24px; overflow-y:auto; overscroll-behavior:contain; }
  .mobile-ticket-detail-status { margin-bottom:18px; }
  .mobile-ticket-detail-section + .mobile-ticket-detail-section { margin-top:22px; }
  .mobile-ticket-detail-section h3 { margin-bottom:8px; color:#83606a; font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.08em; }
  .mobile-ticket-detail-section dl { padding:2px 14px; border:1px solid #f1e9eb; border-radius:13px; background:#fefafb; }
  .mobile-ticket-detail-row { display:flex; justify-content:space-between; align-items:baseline; gap:18px; padding:10px 0; font-size:12px; line-height:1.45; }
  .mobile-ticket-detail-row + .mobile-ticket-detail-row { border-top:1px solid #f1e9eb; }
  .mobile-ticket-detail-row dt { flex:none; color:#8d727a; }
  .mobile-ticket-detail-row dd { margin:0; color:#40252d; font-weight:650; text-align:right; overflow-wrap:anywhere; }
  .mobile-ticket-sheet-actions { display:flex; flex-direction:column; gap:8px; flex:none; padding:12px 20px calc(14px + env(safe-area-inset-bottom)); border-top:1px solid #f3ecee; background:#fff; }
  .mobile-ticket-sheet-actions:empty { display:none; }
  .mobile-ticket-sheet-actions :is(button,a) { display:flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; border-radius:10px; font-size:13px; font-weight:700; text-align:center; }
  .my-ticket-display-modal:not(.hidden) { align-items:center; justify-content:center; padding:16px; }
  .my-ticket-display-modal .mobile-ticket-sheet { width:min(100%,420px); max-height:calc(100dvh - 32px); border-radius:20px; background:#fcf7f9; box-shadow:0 16px 48px #2b111940; }
  .my-ticket-display-head { display:flex; justify-content:flex-end; flex:none; padding:10px 12px; }
  .my-ticket-display-modal .mobile-ticket-sheet-body { padding:0 12px calc(12px + env(safe-area-inset-bottom)); }
  .my-ticket-display-modal .my-ticket-modal-card { display:flex; width:100%; min-height:0; padding:0; border:1px solid var(--ui-line); border-top:3px solid var(--ui-accent); border-radius:8px; box-shadow:0 2px 6px #19141505; }
  .my-ticket-display-modal .my-ticket-modal-card .ticket-stub { flex:none; }
  #remitModal > .bg-surface { display:flex; flex-direction:column; overflow:hidden; }
  #remitModalBody { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
  #remitModalActions { flex:none; background:#fff; }
  .mobile-ticket-primary { background:var(--ui-accent); color:#fff; }
  .mobile-ticket-secondary { border:1px solid #ecdfe3; color:var(--ui-accent); }
  .mobile-ticket-danger { border:1px solid #ebc4c4; color:#a42828; background:#fff8f8; }
  .mobile-ticket-no-actions { color:#957c84; font-size:11px; text-align:center; }
  body:has(.mobile-ticket-modal:not(.hidden)) { overflow:hidden; }
}
/* Collections: mobile-first event operations */
.collections-page { --collections-ink:#30252a; --collections-muted:#8b6470; --collections-border:#f1e4e8; --collections-card:#fff; background:#fcf7f9; color:var(--collections-ink); }
.collections-page .collections-main { padding-top:22px; padding-bottom:32px; }
.collections-page .collections-main > * + * { margin-top:18px; }
.collections-intro { display:block; }
.collections-kicker { display:inline-flex; align-items:center; gap:6px; color:#90702a; font-size:11px; font-weight:800; text-transform:uppercase; }
.collections-kicker .lucide { width:14px; height:14px; }
.collections-intro h2 { margin-top:5px; color:var(--collections-ink); font-size:25px; line-height:1.15; letter-spacing:-.025em !important; }
.collections-intro p { max-width:540px; margin-top:6px; color:var(--collections-muted); font-size:13px; line-height:1.45; }
.collections-page .collection-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:5px; border:1px solid var(--collections-border); border-radius:16px; background:#fff; box-shadow:0 4px 18px #501c2c0a; overflow:visible; }
.collections-page .collection-tabs.hidden { display:none; }
.collections-page .collection-tabs > button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:62px; padding:7px 2px; border:0; border-radius:12px; background:transparent; color:#8b6973; font-size:10px; font-weight:700; line-height:1.1; white-space:normal; }
.collections-page .collection-tabs > button.hidden { display:none; }
.collections-page .collection-tabs:has(#tabRooms.hidden) { grid-template-columns:repeat(2,minmax(0,1fr)); }
.collections-page .collection-tabs > button .lucide { width:20px; height:20px; }
.collections-page .collection-tabs > button.is-current { background:#7b1e3a; color:#fff; box-shadow:0 3px 9px #7b1e3a2e; }
.collections-page .collection-tabs > button:active,.collections-page .collections-filter-button:active,.collections-page .collections-room-card:active { transform:scale(.98); }
.collections-toolbar { display:flex; gap:9px; }
.collections-toolbar.hidden { display:none; }
.collections-search { display:flex; align-items:center; gap:9px; flex:1; min-width:0; min-height:48px; padding:0 13px; border:1px solid var(--collections-border); border-radius:13px; background:#fff; box-shadow:0 2px 9px #30252a08; }
.collections-search .lucide { width:18px; height:18px; color:#95747e; }
.collections-search input { width:100%; min-width:0; min-height:46px; padding:0; border:0; outline:0; background:transparent; color:var(--collections-ink); font-size:16px; }
.collections-search:focus-within { border-color:#c48d9e; box-shadow:0 0 0 3px #7b1e3a18; }
.collections-filter-button { position:relative; display:flex; align-items:center; justify-content:center; gap:7px; min-width:48px; min-height:48px; padding:0 13px; border:1px solid var(--collections-border); border-radius:13px; background:#fff; color:var(--collections-ink); font-size:13px; font-weight:700; }
.collections-filter-button.hidden { display:none; }
.collections-filter-button .lucide { width:18px; height:18px; }
.collections-filter-button.has-filter { border-color:#d69dae; background:#f9edf1; color:#7b1e3a; }
.collections-filter-dot { position:absolute; top:7px; right:7px; width:6px; height:6px; border-radius:50%; background:#b17825; }
.collections-filter-dot.hidden { display:none; }
.collections-filter-dialog.hidden { display:none; }
.collections-filter-dialog { position:fixed; inset:0; z-index:80; display:flex; align-items:flex-end; }
.collections-filter-backdrop { position:absolute; inset:0; background:#31111b91; }
.collections-filter-panel { position:relative; width:100%; padding:20px 20px calc(20px + env(safe-area-inset-bottom)); border-radius:22px 22px 0 0; background:#fff; box-shadow:0 -15px 40px #33101a33; animation:collections-rise .2s ease-out; }
.collections-filter-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:22px; }
.collections-filter-head h3 { margin-top:4px; font-size:21px; font-weight:750; }
.collections-icon-button { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--collections-border); border-radius:11px; }
.collections-filter-panel > label { display:block; margin-bottom:7px; font-size:12px; font-weight:700; }
.collections-filter-panel select { width:100%; min-height:50px; padding:0 12px; border:1px solid var(--collections-border); border-radius:12px; background:#fff; font-size:16px; }
.collections-filter-actions { display:grid; grid-template-columns:1fr 1.5fr; gap:10px; margin-top:23px; }
.collections-filter-actions button { min-height:48px; border-radius:12px; font-size:14px; font-weight:700; }
.collections-filter-actions button:first-child { border:1px solid var(--collections-border); }
.collections-filter-actions button:last-child { background:#7b1e3a; color:#fff; }
.ticket-registry-toolbar { max-width:none; }
.collections-active-filters { margin-top:10px; padding:8px 11px; border-radius:10px; background:#fbf1f4; color:#7e384d; font-size:11px; font-weight:650; line-height:1.4; overflow-wrap:anywhere; }
.collections-active-filters.hidden { display:none; }
.ticket-filter-panel { max-height:min(90dvh,760px); overflow-y:auto; overscroll-behavior:contain; }
.ticket-filter-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 10px; }
.ticket-filter-fields > div { min-width:0; }
.ticket-filter-fields label { display:block; margin-bottom:6px; }
.ticket-filter-fields input,.ticket-filter-fields select { width:100%; }
.collections-page #statsStrip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.collections-page #statsStrip.hidden { display:none; }
.collections-stat-primary,.collections-stat-next { min-width:0; min-height:142px; padding:17px; border-radius:17px; display:flex; flex-direction:column; }
.collections-stat-primary { background:#7b1e3a; color:#fff; box-shadow:0 9px 20px #7b1e3a29; }
.collections-stat-primary > span,.collections-stat-next > span { font-size:11px; font-weight:700; }
.collections-stat-primary > strong,.collections-stat-next > strong { margin:auto 0 7px; font-size:36px; line-height:1; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.collections-stat-primary > small { color:#ecc8d3; font-size:10px; }
.collections-stat-primary > small b { color:#fff; }
.collections-stat-next { border:1px solid #e6e2d4; background:#fffdf8; color:#614b20; }
.collections-stat-next .lucide { width:20px; height:20px; margin-bottom:9px; color:#a77c27; }
.collections-stat-next > strong { color:#7b1e3a; }
.collections-stat-secondary { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; overflow:hidden; border:1px solid var(--collections-border); border-radius:16px; background:var(--collections-border); }
.collections-stat-secondary > div { min-height:68px; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:8px; background:#fff; }
.collections-stat-secondary span { max-width:100px; color:var(--collections-muted); font-size:11px; line-height:1.25; }
.collections-stat-secondary strong { color:var(--collections-ink); font-size:19px; font-weight:750; font-variant-numeric:tabular-nums; }
.collections-stat-secondary .needs-attention strong { color:#aa520c; }
.collections-room-group + .collections-room-group { margin-top:26px; }
.collections-group-heading { display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:12px; }
.collections-group-heading h3 { color:var(--collections-ink); font-size:16px; font-weight:750; }
.collections-group-heading span { color:var(--collections-muted); font-size:12px; }
.collections-room-grid { display:grid; grid-template-columns:1fr; gap:12px; }
.collections-page .collections-room-card { position:relative; min-height:0; padding:17px; border:1px solid var(--collections-border); border-radius:17px; background:#fff; box-shadow:0 4px 15px #501a2a0b; cursor:pointer; transition:transform .16s,box-shadow .16s,border-color .16s; }
.collections-page .collections-room-card::after { content:none; }
.collections-page .collections-room-card:hover { border-color:#deb1bf; box-shadow:0 8px 22px #501a2a18; }
.collections-room-top { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.collections-room-eyebrow { color:var(--collections-muted); font-size:10px; font-weight:700; text-transform:uppercase; }
.collections-room-top h4 { margin-top:2px; font-size:22px; font-weight:800; line-height:1.1; }
.collections-status { max-width:58%; padding:6px 9px; border-radius:999px; font-size:10px; font-weight:750; line-height:1.2; text-align:center; }
.collections-room-leader { display:flex; flex-direction:column; gap:2px; margin-top:15px; }
.collections-room-leader span,.collections-room-progress span { color:var(--collections-muted); font-size:11px; }
.collections-room-leader strong { color:var(--collections-ink); font-size:13px; font-weight:700; overflow-wrap:anywhere; }
.collections-room-progress { margin-top:15px; }
.collections-room-progress > div:first-child { display:flex; justify-content:space-between; gap:8px; margin-bottom:7px; }
.collections-room-progress strong { color:#7b1e3a; font-size:12px; }
.collections-progress-track { height:7px; overflow:hidden; border-radius:99px; background:#f6ecef; }
.collections-progress-track span { display:block; height:100%; border-radius:inherit; background:#a77c27; }
.collections-room-facts { display:flex; flex-wrap:wrap; gap:7px 14px; margin-top:15px; color:var(--collections-muted); font-size:11px; }
.collections-room-facts b { color:var(--collections-ink); font-size:12px; }
.collections-room-attention { margin-top:12px; color:#ad530b; font-size:11px; font-weight:700; }
.collections-room-action { display:flex; justify-content:space-between; margin-top:16px; padding-top:12px; border-top:1px solid #f5edef; color:#7b1e3a; font-size:12px; font-weight:750; }
.collections-empty { min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px; border:1px dashed #e4cfd5; border-radius:17px; background:#fff; text-align:center; }
.collections-empty .lucide { width:26px; height:26px; margin-bottom:10px; color:#b08d98; }
.collections-empty strong { font-size:15px; }
.collections-empty p { margin-top:4px; color:var(--collections-muted); font-size:12px; }
.collections-empty button { min-height:44px; margin-top:15px; padding:0 18px; border-radius:10px; background:#7b1e3a; color:#fff; font-weight:700; }
.collections-loading.hidden { display:none; }
.collections-loading { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.collections-loading > div { height:100px; border-radius:16px; background:linear-gradient(100deg,#f3e9ec 20%,#fcf7f9 40%,#f3e9ec 60%); background-size:200% 100%; animation:collections-shimmer 1.2s linear infinite; }
.collections-loading > div:last-child { grid-column:1 / -1; height:145px; }
.collections-page :is(#ticketsView,#raffleView) > section { border:1px solid var(--collections-border); border-radius:17px; box-shadow:0 4px 18px #501c2c0a; }
.collections-page :is(#ticketsView,#raffleView) > section:first-child { padding:18px; }
.collections-page :is(#ticketsView,#raffleView) :is(input,select) { min-height:48px; border-radius:11px; background:#fff; font-size:16px; }
.collections-page :is(#ticketsView,#raffleView) label { color:#7e5863; font-size:11px; font-weight:750; }
.collections-page :is(#ticketsView,#raffleView) :is(#ticketSearchBtn,#rafflePreviewBtn,#raffleGenerateBtn,#downloadSalesPdfBtn) { min-height:46px; }
.collections-page :is(#ticketsView,#raffleView) .grid.grid-cols-2 { gap:12px; }
.collections-page #ticketRegistryMobile { padding:12px; background:transparent; }
.collections-page #roomResidentsMobile,.collections-page .collection-resident-list { padding:12px; background:transparent; }
.collections-page .remittance-preview { border-color:var(--collections-border); border-radius:16px; box-shadow:0 3px 14px #501a2a0b; }
.collections-page #remitHistoryWrap h3 { margin:0 0 12px; color:var(--collections-ink); font-size:16px; text-transform:none; }
.collections-page #remitPendingList .collections-empty { min-height:150px; }
.collections-raffle-history-mobile { display:none; }
.collections-history-card { padding:15px; border:1px solid var(--collections-border); border-radius:14px; background:#fff; }
.collections-history-card + .collections-history-card { margin-top:9px; }
.collections-history-card > div { display:flex; justify-content:space-between; gap:10px; }
.collections-history-card strong { color:#7b1e3a; font-size:14px; }
.collections-history-card span,.collections-history-card small { color:var(--collections-muted); font-size:11px; }
.collections-history-card p { margin:8px 0 2px; font-size:13px; font-weight:700; }
.collections-history-card b { color:var(--collections-muted); font-weight:500; }
.collections-page .mobile-nav { box-shadow:0 -6px 20px #33101a10; }
.collections-page .mobile-nav > :is(a,button) { min-height:48px; border-radius:11px; }
.collections-page .mobile-nav .is-active { background:#fcedf2; }
@media (max-width:639px) {
  .collections-page .collections-main { padding-left:14px; padding-right:14px; }
  .collections-page #raffleView > section:last-child > .overflow-x-auto { display:none; }
  .collections-page .collections-raffle-history-mobile { display:block; padding:12px; }
  .collections-page #rafflePreviewCard { padding:14px; }
  .collections-page #rafflePreviewStats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .collections-page #raffleGenerateBtn,.collections-page #downloadSalesPdfBtn { width:100%; }
  .collections-page #ticketSearchBtn { width:100%; }
  .collections-page #ticketsView .grid.grid-cols-2 > div:last-child { grid-column:1 / -1; }
  .collections-page #ticketsView > section:first-child { padding:17px; }
  .collections-page #ticketsView .ticket-registry-toolbar { max-width:none; }
  .collections-page #ticketsView .ticket-filter-panel { padding:19px 16px calc(19px + env(safe-area-inset-bottom)); }
  .collections-page .mobile-ticket-preview { min-height:90px; border-color:var(--collections-border); border-radius:14px; }
  .collections-page .mobile-ticket-preview:active { transform:scale(.985); }
  .collections-page #roomDetailView > .flex:first-child { align-items:flex-start; flex-direction:column; gap:12px; }
  .collections-page #roomActionBtnContainer { width:100%; display:flex; gap:8px; flex-wrap:wrap; }
  .collections-page #roomActionBtnContainer button { flex:1 1 160px; min-height:46px; margin:0; }
}
@keyframes collections-shimmer { to { background-position-x:-200%; } }
@keyframes collections-rise { from { opacity:.5; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@media (min-width:640px) {
  .collections-page .collections-main { padding-top:30px; }
  .collections-page .collection-tabs { max-width:640px; }
  .collections-page .collection-tabs > button { flex-direction:row; gap:9px; min-height:50px; font-size:13px; }
  .collections-page #statsStrip { grid-template-columns:1fr 1fr 1.5fr; }
  .collections-stat-secondary { grid-column:auto; }
  .collections-room-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .collections-toolbar { max-width:650px; }
  .collections-filter-dialog { align-items:center; justify-content:center; padding:20px; }
  .collections-filter-panel { max-width:420px; border-radius:20px; padding:24px; }
}
@media (min-width:1024px) { .collections-room-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion:reduce) { .collections-filter-panel,.collections-loading > div { animation:none; } }
/* Shared motion: short transform/opacity feedback, never on printable ticket content. */
@media (prefers-reduced-motion:no-preference) {
  :root { --motion-fast:140ms; --motion-normal:220ms; --motion-ease:cubic-bezier(.2,.7,.2,1); }
  @keyframes motion-enter { from { opacity:0; transform:translate3d(0,8px,0); } to { opacity:1; transform:translate3d(0,0,0); } }
  @keyframes motion-pop { from { opacity:0; transform:translate3d(0,6px,0) scale(.985); } to { opacity:1; transform:translate3d(0,0,0) scale(1); } }
  @keyframes motion-fade { from { opacity:0; } to { opacity:1; } }
  @keyframes motion-check { from { opacity:0; transform:scale(.7); } to { opacity:1; transform:scale(1); } }
  @keyframes motion-badge { 50% { transform:scale(1.13); } }
  @keyframes motion-page-fade { from { opacity:0; } to { opacity:1; } }
  main.motion-page-enter { animation:motion-page-fade var(--motion-normal) var(--motion-ease) backwards; }
  .dashboard .dashboard-intro { animation:motion-enter 180ms var(--motion-ease) both; }
  .dashboard .event-banner { animation:motion-enter 210ms var(--motion-ease) both; animation-delay:25ms; }
  .dashboard .portal-grid > .portal-card { animation:motion-enter 200ms var(--motion-ease) both; }
  .dashboard .portal-grid > .portal-card:nth-child(2),.collections-room-grid > :nth-child(2) { animation-delay:25ms; }
  .dashboard .portal-grid > .portal-card:nth-child(3),.collections-room-grid > :nth-child(3) { animation-delay:50ms; }
  :is(.collections-room-grid > .collections-room-card,.mobile-ticket-list > .mobile-ticket-preview,#unreadList > div,#readList > div,#ticketsWrap > .event-ticket,.collection-stats > .collection-stat) { animation:motion-enter 190ms var(--motion-ease) both; }
  :is(.mobile-ticket-list,.collection-stats) > :nth-child(2) { animation-delay:20ms; }
  :is(.mobile-ticket-list,.collection-stats) > :nth-child(3) { animation-delay:40ms; }
  :is(.mobile-ticket-list,.collection-stats) > :nth-child(n+4) { animation-delay:55ms; }
  :is(button,a,.room-navigation-card,.portal-card,.mobile-ticket-preview) { transition:transform var(--motion-fast) var(--motion-ease),background-color var(--motion-fast) ease,border-color var(--motion-fast) ease,color var(--motion-fast) ease,box-shadow var(--motion-fast) ease; }
  :is(button,a,.room-navigation-card,.portal-card,.mobile-ticket-preview):active { transform:translate3d(0,1px,0) scale(.985); }
  @media (hover:hover) { :is(.portal-card,.room-navigation-card,.mobile-ticket-preview):hover { transform:translate3d(0,-2px,0); box-shadow:0 8px 22px #501a2a18; } }
  .section-tabs > button,.mobile-nav > :is(a,button),.rail-link { transition:background-color var(--motion-fast) ease,color var(--motion-fast) ease,transform var(--motion-fast) var(--motion-ease); }
  #rightSidebar { transition:transform var(--motion-normal) var(--motion-ease); }
  #sidebarOverlay { transition:opacity var(--motion-normal) ease; }
  [id$=Modal].fixed:not(.hidden) > :is(.bg-surface,.mobile-ticket-sheet),.mobile-ticket-modal:not(.hidden) .mobile-ticket-sheet { animation:motion-pop var(--motion-normal) var(--motion-ease) both; }
  @media (max-width:639px) { [id$=Modal].fixed:not(.hidden) > :is(.bg-surface,.mobile-ticket-sheet) { animation:motion-fade 160ms ease-out both; } }
  [id$=Modal].fixed:not(.hidden),.mobile-ticket-modal:not(.hidden) .mobile-ticket-backdrop { animation:motion-fade 160ms ease-out both; }
  .collections-filter-dialog:not(.hidden) .collections-filter-backdrop { animation:motion-fade 160ms ease-out both; }
  @media (min-width:640px) { .ticket-composer[open] > :not(summary) { animation:motion-enter 180ms var(--motion-ease) both; } }
  .field-error:not([hidden]),#confirmActionPwdError:not(.hidden) { animation:motion-enter var(--motion-fast) var(--motion-ease) both; }
  .otp-digit:focus { transform:translate3d(0,-2px,0); box-shadow:0 5px 15px #7b1e3a1c; }
  #toast:not(.hidden) { animation:motion-pop 190ms var(--motion-ease) both; }
  .motion-success-check::before { content:'✓'; display:inline-grid; place-items:center; flex:0 0 18px; width:18px; height:18px; margin-right:8px; border-radius:50%; background:#e7f6ec; color:#0f8c3b; font-size:12px; font-weight:800; line-height:1; animation:motion-check 180ms var(--motion-ease) both; }
  .nav-unread-badge.motion-badge-update { animation:motion-badge 260ms var(--motion-ease); }
  button.is-processing { position:relative; padding-right:38px !important; }
  button.is-processing::after { content:''; position:absolute; right:14px; top:calc(50% - 7px); width:14px; height:14px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:motion-spin .7s linear infinite; }
  @keyframes motion-spin { to { transform:rotate(1turn); } }
}
@media (max-width:639px) {
  .ticket-page .ticket-composer[open] { background:transparent; }
  .ticket-page .ticket-composer[open]::before { content:''; position:absolute; inset:0; background:#2b111991; }
  .ticket-page .ticket-composer[open] > :is(summary,div) { position:relative; z-index:1; }
}
@media (max-width:639px) and (prefers-reduced-motion:no-preference) {
  @keyframes ticket-backdrop-in { from { opacity:0; } to { opacity:1; } }
  @keyframes ticket-backdrop-out { from { opacity:1; } to { opacity:0; } }
  @keyframes ticket-sheet-in { from { opacity:.6; transform:translate3d(0,24px,0); } to { opacity:1; transform:translate3d(0,0,0); } }
  @keyframes ticket-sheet-out { from { opacity:1; transform:translate3d(0,0,0); } to { opacity:0; transform:translate3d(0,18px,0); } }
  .ticket-page .ticket-composer[open]:not(.is-closing)::before { animation:ticket-backdrop-in 180ms ease-out both; }
  .ticket-page .ticket-composer[open]:not(.is-closing) > :is(summary,div) { animation:ticket-sheet-in 210ms cubic-bezier(.2,.7,.2,1) both; }
  .ticket-page .ticket-composer[open].is-closing::before { animation:ticket-backdrop-out 170ms ease-in both; }
  .ticket-page .ticket-composer[open].is-closing > :is(summary,div) { animation:ticket-sheet-out 170ms ease-in both; }
}
@media print {
  *,*::before,*::after { animation:none !important; transition:none !important; }
  [data-app-shell],.skip-link { display:none !important; }
  body { background:white !important; padding:0 !important; }
  body:has(.desktop-rail) > main,body:has(.desktop-rail) > #spaPage { margin-left:0; }
  .print-card.event-ticket { display:grid; grid-template-columns:minmax(0,1fr) 180px; width:100%; max-width:680px; border:1px solid #555; border-top:3px solid #7b1e3a; box-shadow:none; break-inside:avoid; }
  .print-card .ticket-stub { border-top:0; border-left:2px dashed #777; }
}
