/* Dashboard: the darkroom look (tokens and .aurora come from ui.css). */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--body); min-height: 100dvh; overflow-x: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
input[type='date'], input[type='time'], input[type='datetime-local'] { color-scheme: dark; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 20px max(20px, env(safe-area-inset-right)) 80px max(20px, env(safe-area-inset-left)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 28px; }
.brand { font: 500 13px var(--mono); letter-spacing: .12em; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.brand::before { content: ''; width: 22px; height: 16px; border-radius: 3px; border: 1.5px solid var(--amber); background: linear-gradient(var(--amber), var(--amber)) center / 12px 8px no-repeat; flex: none; }
.top .right { display: flex; gap: 14px; align-items: center; font: 13px var(--mono); color: var(--fg-2); flex-wrap: wrap; justify-content: flex-end; }
h1 { font: 300 clamp(32px, 5vw, 46px)/1.06 var(--display); letter-spacing: -.015em; text-wrap: balance; }
h1 em { font-style: italic; color: var(--amber); }
h2 { font: 400 24px/1.2 var(--display); margin-bottom: 12px; }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.muted { color: var(--fg-2); font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Glass buttons */
.btn { position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, .2); padding: 0 22px; min-height: 46px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; color: var(--fg); background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05)); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -10px 20px -12px rgba(0, 0, 0, .5), 0 12px 26px -14px rgba(0, 0, 0, .8); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, opacity .2s; }
.btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .4) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s; pointer-events: none; }
.btn:hover { transform: translateY(-2px); }
.btn:hover::before { transform: translateX(120%); }
.btn:active { transform: scale(.98); }
.btn.primary, .btn.go { background: linear-gradient(180deg, rgba(246, 190, 98, .96), rgba(214, 138, 38, .9)); color: var(--amber-ink); border-color: rgba(255, 224, 160, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 14px 30px -14px rgba(234, 164, 60, .7); }
.btn.quiet { background: none; box-shadow: none; border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--fg-2); }
.btn.quiet::before { display: none; }
.btn.danger { color: var(--bad); border-color: rgba(255, 156, 133, .4); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { background: none; border: 0; padding: 4px; color: var(--amber); text-decoration: underline; font-size: 14px; }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 22px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.event-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s; animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.event-card:hover { transform: translateY(-4px); border-color: rgba(234, 164, 60, .5); }
.event-card h3 { font: 400 24px/1.15 var(--display); margin: 0; }
.stats { display: flex; gap: 18px; font: 500 13px var(--mono); color: var(--fg-2); }
.chip { display: inline-block; font: 500 12px var(--mono); padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); }
.chip.on { background: rgba(111, 191, 115, .16); border-color: rgba(111, 191, 115, .5); color: var(--ok); }
.chip.off { color: var(--fg-2); }

.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; margin: 22px 0 22px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tabs button { background: none; border: 0; padding: 10px 18px; border-radius: 999px; font-weight: 500; color: var(--fg-2); min-height: 42px; transition: background .25s, color .25s; }
.tabs button[aria-selected='true'] { color: var(--fg); background: var(--glass-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > .lbl { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field > label output, .lbl output { color: var(--amber); font-size: 15px; letter-spacing: 0; text-transform: none; }
.field input[type='text'], .field input[type='email'], .field input[type='number'], .field input[type='date'], .field input[type='time'], .field input[type='datetime-local'], .field select { min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .25); padding: 0 14px; width: 100%; transition: border-color .25s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--amber); }
.field select option { background: #1b1610; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); cursor: pointer; transition: border-color .25s, background .25s; }
.opt input { margin-top: 4px; accent-color: var(--amber); }
.opt:has(input:checked) { border-color: var(--amber); background: rgba(234, 164, 60, .09); }
.opt b { display: block; font-size: 15px; font-weight: 600; }
.opt span { font-size: 14px; color: var(--fg-2); }
.hint { font-size: 13px; color: var(--fg-2); }
.msg { font-size: 14px; min-height: 20px; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }

.share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share code { font: 500 14px var(--mono); background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; overflow-wrap: anywhere; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pgrid label { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #0a0805; cursor: pointer; border: 3px solid transparent; transition: border-color .2s, transform .25s; }
.pgrid label:hover { transform: scale(1.03); }
.pgrid label:has(input:checked) { border-color: var(--amber); }
.pgrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgrid input { position: absolute; top: 6px; inset-inline-start: 6px; width: 20px; height: 20px; accent-color: var(--amber); }
.pgrid .tag { position: absolute; bottom: 4px; inset-inline-end: 4px; font: 500 11px var(--mono); background: rgba(0, 0, 0, .7); color: #fff; padding: 2px 6px; border-radius: 6px; }
.pgrid .hid img { opacity: .35; }
.toolbar { position: sticky; top: 0; z-index: 2; background: rgba(16, 13, 9, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 10px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 10px 10px; border-bottom: 1px solid var(--line); }
th { font: 500 12px var(--mono); letter-spacing: .08em; color: var(--fg-2); text-transform: uppercase; }

.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qr-preview { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.qr-preview h2 { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin: 0; }
.qr-preview img { width: 100%; max-width: 300px; border-radius: 6px; background: #fff; box-shadow: 0 30px 50px -26px #000; }
.progress { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--amber); width: 0; transition: width .2s; }
.login { max-width: 420px; margin: 12vh auto 0; text-align: center; display: flex; flex-direction: column; gap: 18px; align-items: center; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.seg button { border: 0; background: none; padding: 10px 20px; border-radius: 999px; color: var(--fg-2); transition: color .25s, background .25s; min-height: 44px; font-weight: 500; }
.seg button[aria-pressed='true'] { color: var(--fg); background: var(--glass-hi); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 18px -8px rgba(0, 0, 0, .7); }

/* ---------- Create-event wizard ---------- */
.wiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(24px, 4vw, 60px); align-items: start; }
.rail { display: flex; gap: 8px; margin-bottom: 30px; }
.rail button { flex: 1; text-align: start; background: none; border: 0; padding: 0; min-width: 0; }
.rail span { display: block; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; }
.rail span::after { content: ''; position: absolute; inset: 0; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
[dir='rtl'] .rail span::after { transform-origin: right; }
.rail button.done span::after, .rail button.on span::after { transform: scaleX(1); }
.rail small { display: block; margin-top: 8px; font: 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); transition: color .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail button.on small { color: var(--fg); }
.rail button:disabled { cursor: default; }
.panel > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.panel > *:nth-child(2) { animation-delay: .05s; } .panel > *:nth-child(3) { animation-delay: .1s; } .panel > *:nth-child(4) { animation-delay: .15s; } .panel > *:nth-child(5) { animation-delay: .2s; } .panel > *:nth-child(6) { animation-delay: .25s; }
.lede { color: var(--fg-2); margin: 10px 0 30px; max-width: 46ch; }
.panel .field { margin-bottom: 26px; }
.text { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0 12px; font: 300 28px var(--display); color: var(--fg); transition: border-color .3s; border-radius: 0; }
.text::placeholder { color: rgba(241, 230, 205, .28); }
.text:focus { outline: none; border-color: var(--amber); }
.field input.sm { font: 17px var(--body); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 22px; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.choice { text-align: start; padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s, background .25s; display: grid; gap: 10px; align-content: start; }
.choice:hover { transform: translateY(-3px); }
.choice[aria-pressed='true'] { border-color: var(--amber); background: rgba(234, 164, 60, .1); box-shadow: 0 0 0 1px var(--amber) inset, 0 14px 30px -16px rgba(234, 164, 60, .5); }
.choice strong { font-weight: 600; font-size: 16px; }
.choice span { font-size: 13.5px; color: var(--fg-2); line-height: 1.4; }
.swatch { height: 54px; border-radius: 10px; background: linear-gradient(120deg, #c9733a, #e9b563 45%, #5d8a86); }
.swatch.bw { background: linear-gradient(120deg, #2a2a2a, #bdbdbd 50%, #555); }
.swatch.both { background: linear-gradient(90deg, #c9733a, #e9b563 50%, #8a8a8a 50%, #3a3a3a); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 10px; width: 100%; text-align: start; }
.switch div { min-width: 0; } .switch strong { display: block; font-weight: 600; } .switch small { color: var(--fg-2); font-size: 13.5px; }
.knob { flex: none; width: 46px; height: 28px; border-radius: 99px; background: rgba(241, 230, 205, .16); position: relative; transition: background .3s; }
.knob::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--fg); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.switch[aria-pressed='true'] .knob { background: var(--amber); }
.switch[aria-pressed='true'] .knob::after { transform: translateX(18px); background: var(--amber-ink); }
[dir='rtl'] .switch[aria-pressed='true'] .knob::after { transform: translateX(-18px); }

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--amber) var(--p, 40%), var(--line) var(--p, 40%)); outline-offset: 8px; direction: ltr; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--fg); border: 0; box-shadow: 0 0 0 6px rgba(234, 164, 60, .22), 0 4px 10px rgba(0, 0, 0, .5); cursor: grab; transition: box-shadow .2s; }
.range:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(234, 164, 60, .25), 0 4px 10px rgba(0, 0, 0, .5); }
.range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--fg); border: 0; }
.ticks { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--fg-2); margin-top: 8px; direction: ltr; }

.drop { display: grid; place-items: center; text-align: center; gap: 6px; padding: 26px 18px; border-radius: 18px; border: 1.5px dashed rgba(241, 230, 205, .28); background: var(--glass); cursor: pointer; transition: border-color .25s, background .25s, transform .3s; }
.drop:hover, .drop.over { border-color: var(--amber); background: rgba(234, 164, 60, .08); transform: translateY(-2px); }
.drop strong { font-weight: 600; } .drop small { color: var(--fg-2); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumbs button { width: 64px; height: 64px; padding: 0; border-radius: 12px; border: 2px solid transparent; overflow: hidden; background-size: cover; background-position: center; transition: border-color .2s, transform .25s; }
.thumbs button:hover { transform: scale(1.05); }
.thumbs button[aria-pressed='true'] { border-color: var(--amber); }
.wnav { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; align-items: center; }
.wnav .msg { flex-basis: 100%; }
.sum { display: grid; gap: 1px; background: var(--line); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); margin: 0 0 8px; }
.sum div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--bg-2); }
.sum dt { color: var(--fg-2); } .sum dd { margin: 0; text-align: end; font-weight: 500; }

.stage { position: sticky; top: 20px; display: grid; justify-items: center; gap: 18px; }
.vcam, .vprint { width: min(100%, 320px); }
.phone { width: 100%; aspect-ratio: 9 / 18.6; border-radius: 46px; padding: 11px; background: linear-gradient(160deg, #3b3226, #17120c); box-shadow: 0 40px 80px -30px #000, inset 0 0 0 1.5px rgba(255, 255, 255, .12); position: relative; }
.phone .scr { position: absolute; inset: 11px; border-radius: 36px; overflow: hidden; background: #000; direction: ltr; }
.phone .scr::after { content: ''; position: absolute; top: 10px; left: 50%; width: 84px; height: 24px; margin-left: -42px; border-radius: 99px; background: #000; z-index: 5; }
.vf { position: absolute; inset: 0; background: #2b2018 url(/img/film-6-s.jpg) center 30% / cover no-repeat; transition: filter .7s; }
.ghost { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ghost i { aspect-ratio: 1; border-radius: 10px; background: center / cover no-repeat; filter: blur(10px) saturate(.7); opacity: .5; }
.vf::after { content: ''; position: absolute; inset: 0; background: radial-gradient(closest-side, transparent 55%, rgba(0, 0, 0, .55)); }
.phone.bw .vf { filter: grayscale(1) contrast(1.2); }
.phone.flash .scr::before { content: ''; position: absolute; inset: 0; background: #fff; z-index: 4; animation: flashpop 3.6s infinite; opacity: 0; pointer-events: none; }
@keyframes flashpop { 0%, 88%, 100% { opacity: 0; } 90% { opacity: .85; } }
.hud { position: absolute; z-index: 3; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; font: 12px var(--mono); color: #fff; letter-spacing: .08em; }
.hud.t { top: 46px; } .hud.b { bottom: 24px; justify-content: center; gap: 28px; }
.pill { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .18); }
.shut { width: 66px; height: 66px; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center; }
.shut::after { content: ''; width: 50px; height: 50px; border-radius: 50%; background: #fff; }
.stamp { position: absolute; z-index: 3; right: 22px; bottom: 120px; font: 500 13px var(--mono); color: #ff9a3c; text-shadow: 0 0 6px rgba(255, 140, 40, .7); opacity: 0; transition: opacity .4s; }
.phone.stamped .stamp { opacity: 1; }
.vprint img { width: 100%; aspect-ratio: 1000 / 1414; display: block; border-radius: 6px; background: #f2e9d8; box-shadow: 0 40px 70px -26px #000; transition: opacity .25s; }
.caption { font: 12px var(--mono); color: var(--fg-2); letter-spacing: .08em; text-align: center; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); padding: 14px 22px; border-radius: 99px; background: var(--glass-hi); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255, 255, 255, .22); transition: transform .5s cubic-bezier(.2, .9, .3, 1.2); }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 900px) { .wiz { grid-template-columns: minmax(0, 1fr); } .stage { order: -1; position: static; } .vcam, .vprint { width: min(100%, 240px); } }
@media (max-width: 700px) {
  .form, .qr-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .btn, .btn::before, .event-card, .panel > *, .phone.flash .scr::before { animation: none !important; transition: none !important; } }

/* The print sheet: 4 table cards per A4 page, hidden on screen. */
#printarea { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body > *:not(#printarea) { display: none !important; }
  #printarea { display: block; }
  #printarea .sheet { width: 210mm; height: 297mm; display: grid; grid-template-columns: 105mm 105mm; grid-template-rows: 148.5mm 148.5mm; page-break-after: always; break-after: page; }
  #printarea .sheet:last-child { page-break-after: auto; break-after: auto; }
  #printarea img { width: 105mm; height: 148.5mm; display: block; outline: 0.2mm dashed #999; outline-offset: -0.2mm; }
}
