/* ==================================================================
   LYSTED · BULK BUILDER — liquid glass
   A cinematic near-black wall with two large glass panes floating over
   it: the HUD rail and the console. Everything else is drawn *inside*
   the console with hairlines and inset tints, so the page never stacks
   more than a couple of backdrop-filters at a time.

   Accent: swap the six --em* tokens below and the whole surface follows.
   ================================================================== */
*{margin:0;padding:0;box-sizing:border-box}

:root{
  /* UI chrome is system sans everywhere. Mono is reserved for data a
     human would actually select and copy: emails, order numbers, event
     IDs, file names, CSV. */
  --sans:-apple-system,BlinkMacSystemFont,'SF Pro Display','SF Pro Text','Inter','Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;

  --bg:#04050a;
  --fg:#f2f0ea;
  --muted:#9aa0b2;
  --faint:#565d72;

  --em:#36e0a6;
  --em-12:rgba(54,224,166,.12);
  --em-20:rgba(54,224,166,.2);
  --em-45:rgba(54,224,166,.45);
  --em-60:rgba(54,224,166,.6);
  --em-ink:#04140c;

  --warn:#e8be78;
  --bad:#ff7b7b;

  --line:rgba(255,255,255,.12);
  --hair:rgba(255,255,255,.07);
  --glass:rgba(16,18,26,.36);

  --ease:cubic-bezier(.22,.61,.36,1);
  --spring:cubic-bezier(.34,1.56,.64,1);
}

html{-webkit-text-size-adjust:100%;background:var(--bg);scrollbar-color:rgba(255,255,255,.16) transparent}
body{
  font-family:var(--sans);font-size:14px;line-height:1.5;
  color:var(--fg);background:var(--bg);min-height:100svh;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;-webkit-appearance:none}
code,pre{font-family:var(--mono)}
::selection{background:var(--em-20)}
:focus-visible{outline:2px solid var(--em);outline-offset:3px;border-radius:12px}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:8px}
::-webkit-scrollbar-track{background:transparent}
/* the JS contract: app.js flips .hidden on cards, panels, modal and toast.
   #toast is styled by id, so this has to outrank it. */
.hidden{display:none!important}

/* ---------- the wall ----------------------------------------------
   Soft radial masses, no filter:blur anywhere — a gradient is already
   soft, and only transform/opacity are ever animated. */
#wall{position:fixed;inset:0;z-index:0;overflow:hidden;background:var(--bg);pointer-events:none}
#wall .amb{position:absolute;border-radius:50%;opacity:0;transition:opacity 2.2s ease;will-change:transform}
body.ready #wall .amb{opacity:1}
.amb.a1{width:82vmax;height:82vmax;left:-26vmax;top:-32vmax;
  background:radial-gradient(circle,rgba(54,224,166,.15),rgba(54,224,166,.04) 38%,transparent 66%);
  animation:drift1 42s ease-in-out infinite alternate}
.amb.a2{width:70vmax;height:70vmax;right:-28vmax;bottom:-30vmax;
  background:radial-gradient(circle,rgba(96,132,255,.11),rgba(96,132,255,.03) 42%,transparent 68%);
  animation:drift2 52s ease-in-out infinite alternate}
.amb.a3{width:46vmax;height:46vmax;left:6%;bottom:-14vmax;
  background:radial-gradient(circle,rgba(232,190,120,.055),transparent 62%);
  animation:drift3 61s ease-in-out infinite alternate}
@keyframes drift1{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(8vmax,6vmax,0) scale(1.13)}}
@keyframes drift2{from{transform:translate3d(0,0,0) scale(1.08)}to{transform:translate3d(-7vmax,-5vmax,0) scale(1)}}
@keyframes drift3{from{transform:translate3d(0,0,0) scale(.9)}to{transform:translate3d(-6vmax,4vmax,0) scale(1.15)}}

.grade{position:fixed;inset:0;z-index:1;pointer-events:none;mix-blend-mode:overlay;
  background:linear-gradient(118deg,rgba(54,224,166,.10),transparent 44%,rgba(232,190,120,.10))}
.vignette{position:fixed;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(122% 96% at 50% 116%,rgba(4,5,10,.9),transparent 55%),
    radial-gradient(130% 80% at 50% -22%,rgba(4,5,10,.74),transparent 52%),
    radial-gradient(150% 110% at 50% 50%,rgba(2,3,6,.22),rgba(2,3,6,.38) 52%,rgba(2,3,6,.7) 100%)}
.grain{position:fixed;inset:0;z-index:2;pointer-events:none;opacity:.05;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.svgdefs{position:fixed;width:0;height:0;overflow:hidden;pointer-events:none}

/* ==================================================================
   LIQUID GLASS MATERIAL
   .lg   = tinted, heavily blurred pane — small surfaces (rail, sheet)
   .lg-r = refractive pane — the big console; a lighter blur, plus an
           SVG displacement backdrop where Chromium can render one.
   ================================================================== */
.lg{position:relative;background:var(--glass);
  -webkit-backdrop-filter:blur(22px) saturate(1.7) brightness(1.06);
  backdrop-filter:blur(22px) saturate(1.7) brightness(1.06);
  border:1px solid var(--line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(255,255,255,.04),
    inset 0 0 22px rgba(255,255,255,.03),0 24px 60px -18px rgba(0,0,0,.7)}
.lg-r{position:relative;background:rgba(18,20,28,.4);
  -webkit-backdrop-filter:blur(11px) saturate(1.45) brightness(1.05);
  backdrop-filter:blur(11px) saturate(1.45) brightness(1.05);
  border:1px solid rgba(255,255,255,.15);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(255,255,255,.05),
    inset 2px 4px 18px rgba(255,255,255,.05),0 28px 64px -20px rgba(0,0,0,.72)}
html.refract .lg-r{
  -webkit-backdrop-filter:url(#lgRefract) blur(9px) saturate(1.45) brightness(1.05);
  backdrop-filter:url(#lgRefract) blur(9px) saturate(1.45) brightness(1.05)}

/* specular sheen — the pane lights up under the pointer (--mx/--my) */
.sheen::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0;
  background:radial-gradient(180px 120px at var(--mx,50%) var(--my,-30%),
    rgba(255,255,255,.13),rgba(255,255,255,.04) 44%,transparent 72%);
  opacity:0;transition:opacity .35s ease}
.sheen:hover::after{opacity:1}
.sheen>*{position:relative;z-index:1}

/* ---------- entrance ----------------------------------------------
   opacity + translateY only. A filter:blur() leg on panes this large is
   a full-viewport gaussian per frame and buys nothing. */
html.js .riser{opacity:0;transform:translateY(18px);
  transition:opacity .8s var(--ease),transform .9s var(--spring)}
html.js body.ready .riser{opacity:1;transform:none}
html.js body.ready .riser.d1{transition-delay:.06s}
html.js body.ready .riser.d2{transition-delay:.16s}
html.js body.ready .riser.d3{transition-delay:.28s}
html.js body.ready .riser.d4{transition-delay:.4s}

/* ---------- HUD rail ---------- */
.hud{position:fixed;top:calc(14px + env(safe-area-inset-top));left:0;right:0;z-index:40;
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  padding:0 clamp(12px,3vw,26px);pointer-events:none}
.hud .pill{pointer-events:auto;display:flex;align-items:center;gap:11px;
  height:48px;padding:0 18px;border-radius:999px}
/* the two rail actions are their own panes — nesting buttons inside a
   third pill reads as a button in a button */
.hud .acts{display:flex;align-items:center;gap:10px;pointer-events:auto}
.hud .acts .btn-ghost{height:48px;border-radius:999px;background:var(--glass);color:var(--muted)}
.hud .acts .icon-btn{width:48px;padding:0}
.hud .acts .btn-ghost:hover{color:var(--fg);border-color:rgba(255,255,255,.3);
  background:rgba(255,255,255,.09)}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--fg)}
.brand .mark{font-weight:800;font-size:15.5px;letter-spacing:-.015em;line-height:1}
.brand .mark i{font-style:normal;color:var(--em)}
.brand .dot{animation:pulse 2.8s infinite}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 var(--em-45)}
  70%{box-shadow:0 0 0 8px rgba(54,224,166,0)}
  100%{box-shadow:0 0 0 0 rgba(54,224,166,0)}}

/* ---------- status dots ---------- */
.dot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;
  background:var(--em);box-shadow:0 0 10px -1px var(--em);
  transition:background .3s ease,box-shadow .3s ease}
.dot.dim{background:var(--faint);box-shadow:none}
.dot.good{background:var(--em);box-shadow:0 0 10px -1px var(--em)}

/* ---------- page shell ---------- */
.shell{position:relative;z-index:10;max-width:1140px;margin:0 auto;
  padding:calc(104px + env(safe-area-inset-top)) clamp(14px,3.2vw,28px) calc(88px + env(safe-area-inset-bottom))}
.hero{margin:0 6px 24px}
.hero h1{font-size:clamp(30px,5.4vw,46px);font-weight:800;letter-spacing:-.035em;line-height:1.03}
.hero p{margin-top:11px;font-size:14.5px;color:var(--muted);max-width:58ch}

/* ---------- the console ---------- */
.console{border-radius:clamp(20px,2.4vw,30px)}
.sect{position:relative;padding:clamp(20px,2.8vw,32px)}
.sect+.sect{border-top:1px solid var(--hair)}
.sect-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:19px}
.kicker{font-size:10.5px;font-weight:600;letter-spacing:.055em;text-transform:uppercase;color:var(--em)}
.sect-head h2{margin-top:6px;font-size:19px;font-weight:700;letter-spacing:-.02em}

/* ---------- source tiles ----------
   Deliberately NOT glass: two more backdrop-filters inside a pane that
   already has one is the expensive mistake. Inset tint + hairline reads
   the same at a fraction of the cost. */
.source-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.source-tile{position:relative;display:flex;flex-direction:column;gap:10px;
  padding:19px 19px 17px;border-radius:20px;
  border:1px solid var(--hair);
  background:linear-gradient(165deg,rgba(255,255,255,.05),rgba(255,255,255,.014));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
  transition:border-color .25s ease,background .25s ease,transform .35s var(--spring),box-shadow .35s ease}
.source-tile:hover{border-color:rgba(255,255,255,.2);transform:translateY(-2px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.13),0 18px 38px -20px rgba(0,0,0,.85)}
#zip-tile{cursor:pointer}
.drop-zone.dragging{border-color:var(--em-60);background:linear-gradient(165deg,var(--em-12),rgba(54,224,166,.03));
  transform:translateY(-3px);box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 20px 44px -18px rgba(54,224,166,.4)}
.drop-zone.dragging *{pointer-events:none}
.tile-row{display:flex;align-items:center;gap:10px}
.tile-title{font-weight:600;font-size:15px;letter-spacing:-.012em}
.tile-sub{flex:1;font-size:12.8px;line-height:1.6;color:var(--muted)}
.tile-sub code{font-size:11.5px;padding:1px 6px;border-radius:6px;color:var(--fg);
  background:rgba(255,255,255,.07);border:1px solid var(--hair)}

/* ---------- buttons ---------- */
.btn-primary,.btn-ghost,.tile-cta{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:40px;padding:0 18px;border-radius:999px;
  font-weight:600;font-size:13px;letter-spacing:.004em;white-space:nowrap;
  border:1px solid var(--line);background:rgba(255,255,255,.05);color:var(--fg);
  transition:border-color .22s ease,background .22s ease,color .22s ease,
    transform .3s var(--spring),box-shadow .3s ease}
.btn-primary:hover,.btn-ghost:hover,.tile-cta:hover{border-color:rgba(255,255,255,.3);
  background:rgba(255,255,255,.09);transform:translateY(-1px)}
.btn-primary:active,.btn-ghost:active,.tile-cta:active{transform:scale(.96)}
.btn-primary:disabled,.btn-ghost:disabled,.tile-cta:disabled{opacity:.4;pointer-events:none;transform:none}
.btn-primary{color:#eafff5;border-color:var(--em-60);
  background:linear-gradient(180deg,rgba(54,224,166,.3),rgba(54,224,166,.15));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 12px 28px -14px rgba(54,224,166,.65)}
.btn-primary:hover{border-color:var(--em);background:linear-gradient(180deg,rgba(54,224,166,.4),rgba(54,224,166,.2));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 16px 34px -14px rgba(54,224,166,.8)}
.btn-ghost{color:var(--muted)}
.btn-ghost:hover{color:var(--fg)}
.btn-ghost.danger{color:var(--bad);border-color:rgba(255,123,123,.26)}
.btn-ghost.danger:hover{color:var(--bad);border-color:rgba(255,123,123,.5);background:rgba(255,123,123,.1)}
.icon-btn{width:38px;height:38px;padding:0;border-radius:13px}
.icon-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.tile-cta{align-self:flex-start;margin-top:2px;max-width:100%;overflow:hidden;text-overflow:ellipsis;display:block;
  line-height:38px;text-align:center}
.status-line{margin-top:16px;min-height:19px;font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.status-line:empty{margin-top:0;min-height:0}

/* ---------- tabs ---------- */
.tabs{display:inline-flex;gap:4px;padding:4px;border-radius:999px;
  border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04)}
.tab{display:inline-flex;align-items:center;gap:8px;padding:8px 15px;border-radius:999px;
  font-weight:600;font-size:12.5px;color:var(--muted);
  transition:color .2s ease,background .25s ease,box-shadow .25s ease,transform .25s var(--spring)}
.tab:hover{color:var(--fg)}
.tab:active{transform:scale(.96)}
.tab.active{color:var(--em-ink);background:var(--em);box-shadow:0 6px 16px -6px var(--em-60)}
.tab .count{padding:1px 7px;border-radius:999px;font-size:11px;font-weight:700;
  font-variant-numeric:tabular-nums;background:rgba(255,255,255,.09);color:var(--muted)}
.tab.active .count{background:rgba(4,20,12,.2);color:var(--em-ink)}

/* ---------- ticket tables ---------- */
.table-wrap{position:relative;border:1px solid var(--hair);border-radius:18px;
  background:rgba(255,255,255,.018);overflow-x:auto;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}
.ticket-table{width:100%;min-width:760px;border-collapse:collapse;font-size:13px}
#errors-table{min-width:620px}
.ticket-table thead th{text-align:left;white-space:nowrap;padding:12px 15px;
  font-size:10.5px;font-weight:600;letter-spacing:.055em;text-transform:uppercase;color:var(--faint);
  background:rgba(255,255,255,.026);border-bottom:1px solid var(--hair)}
.ticket-table tbody td{padding:11px 15px;white-space:nowrap;vertical-align:middle;
  border-bottom:1px solid rgba(255,255,255,.045)}
.ticket-table tbody tr:last-child td{border-bottom:0}
.ticket-table tbody tr{transition:background .18s ease}
.ticket-table tbody tr:hover{background:rgba(255,255,255,.038)}
.ticket-table .num{font-variant-numeric:tabular-nums;text-align:right}
.ticket-table .muted{color:var(--faint)}
.ticket-table .reason{white-space:normal;min-width:230px;color:var(--warn)}
/* mono only where the value is something you'd select and paste:
   order number + buyer email on valid rows, .eml name + email on errors */
#valid-table tbody td:nth-child(7),
#valid-table tbody td:nth-child(8),
#errors-table tbody td:nth-child(4){font-family:var(--mono);font-size:12px;letter-spacing:-.01em}
.empty{padding:36px 16px;text-align:center;font-size:13px;color:var(--faint)}
.row-remove{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;
  font-size:17px;line-height:1;color:var(--faint);
  transition:color .2s ease,background .2s ease,transform .28s var(--spring)}
.row-remove:hover{color:var(--bad);background:rgba(255,123,123,.12);transform:scale(1.14)}

/* ---------- event id rows ---------- */
.event-rows{display:flex;flex-direction:column;gap:9px}
.event-row{display:grid;grid-template-columns:1fr minmax(170px,250px) 62px;align-items:center;gap:16px;
  padding:12px 15px;border-radius:16px;border:1px solid var(--hair);background:rgba(255,255,255,.022);
  transition:border-color .22s ease,background .22s ease}
.event-row:hover{border-color:rgba(255,255,255,.17);background:rgba(255,255,255,.035)}
.event-row .date{font-weight:600;font-size:14px;letter-spacing:-.012em;font-variant-numeric:tabular-nums}
.event-row .count{margin-top:2px;font-size:11.5px;color:var(--faint)}
.event-row input{font-family:var(--mono);font-size:13px;letter-spacing:.01em}
.event-row .hint{font-size:11.5px;color:var(--em);text-align:right;white-space:nowrap}
.hint{font-size:12.2px;color:var(--faint)}
.hint.warn{color:var(--warn)}
.sect>.hint{display:block;margin-top:14px}

/* ---------- inputs ---------- */
.field input,.event-row input,.login-card input{
  width:100%;height:42px;padding:0 14px;border-radius:13px;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.045);
  color:var(--fg);font-size:14px;outline:0;
  transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}
.field input:focus,.event-row input:focus,.login-card input:focus{
  border-color:var(--em-60);background:rgba(255,255,255,.06);box-shadow:0 0 0 3px var(--em-12)}
.field input::placeholder,.event-row input::placeholder,.login-card input::placeholder{color:var(--faint)}
input[type=number]{-moz-appearance:textfield}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* ---------- export ---------- */
.export-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.csv-preview{margin-top:18px;max-height:340px;overflow:auto;padding:17px 19px;border-radius:16px;
  border:1px solid var(--hair);background:rgba(2,3,7,.5);
  font-size:11.5px;line-height:1.8;color:var(--muted);white-space:pre;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}

/* ---------- settings sheet ----------
   #settings-modal must stay the full-bleed backdrop: app.js closes on a
   click whose target IS this element. */
.modal-backdrop{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;
  padding:calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  background:rgba(2,3,7,.55);
  -webkit-backdrop-filter:blur(7px) saturate(1.2);backdrop-filter:blur(7px) saturate(1.2);
  animation:veilin .35s ease}
@keyframes veilin{from{opacity:0}to{opacity:1}}
.modal{display:flex;flex-direction:column;width:min(100%,640px);max-height:min(88svh,780px);
  border-radius:28px;animation:sheetin .5s var(--spring)}
@keyframes sheetin{from{opacity:0;transform:translateY(26px) scale(.97)}to{opacity:1;transform:none}}
.modal-head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:21px 24px 17px;border-bottom:1px solid var(--hair)}
.modal-head h2{font-size:18px;font-weight:700;letter-spacing:-.02em}
.title-row{display:flex;align-items:center;gap:11px}
.settings-grid{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  display:grid;grid-template-columns:1fr 1fr;gap:15px 16px;padding:21px 24px 24px;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}
.settings-grid .full{grid-column:1/-1}
.field{display:flex;flex-direction:column;gap:7px;min-width:0}
.field label{display:flex;align-items:baseline;gap:7px;
  font-size:10.5px;font-weight:600;letter-spacing:.055em;text-transform:uppercase;color:var(--faint)}
.field label .hint{text-transform:none;letter-spacing:0;font-weight:500;font-size:11px}
.divider{display:flex;align-items:center;gap:13px;margin-top:8px;color:var(--faint)}
.divider span{font-size:10.5px;font-weight:600;letter-spacing:.055em;text-transform:uppercase;white-space:nowrap}
.divider::after{content:"";flex:1;height:1px;background:var(--hair)}
.danger-row{display:flex;align-items:center;gap:15px;flex-wrap:wrap;
  margin-top:8px;padding-top:18px;border-top:1px solid var(--hair)}
.danger-row .hint{flex:1;min-width:200px}
.settings-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:2px}

/* ---------- toast ----------
   app.js rewrites className wholesale (`toast success`), so the material
   has to hang off the id, not a .lg utility class. */
#toast{position:fixed;left:50%;bottom:calc(26px + env(safe-area-inset-bottom));z-index:80;
  display:flex;align-items:center;gap:11px;max-width:min(92vw,460px);
  padding:13px 20px;border-radius:16px;font-size:13.2px;font-weight:500;
  transform:translateX(-50%);
  background:rgba(16,18,26,.62);
  -webkit-backdrop-filter:blur(20px) saturate(1.7);backdrop-filter:blur(20px) saturate(1.7);
  border:1px solid var(--line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 22px 48px -18px rgba(0,0,0,.85);
  animation:toastin .45s var(--spring)}
@keyframes toastin{from{opacity:0;transform:translateX(-50%) translateY(18px)}
  to{opacity:1;transform:translateX(-50%)}}
#toast::before{content:"";width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:var(--muted)}
#toast.success{border-color:var(--em-45)}
#toast.success::before{background:var(--em);box-shadow:0 0 10px -1px var(--em)}
#toast.error{border-color:rgba(255,123,123,.45)}
#toast.error::before{background:var(--bad);box-shadow:0 0 10px -1px var(--bad)}

/* ---------- login ---------- */
body.centered{display:grid;place-items:center;min-height:100svh;
  padding:calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom))}
.login-card{position:relative;z-index:10;width:min(100%,404px);border-radius:26px;padding:30px 28px 28px}
.login-card h1{font-size:20px;font-weight:700;letter-spacing:-.025em}
.login-card .subtitle{margin-top:9px;font-size:13px;color:var(--muted)}
#login-form{display:flex;flex-direction:column;gap:9px;margin-top:24px}
.login-card label{font-size:10.5px;font-weight:600;letter-spacing:.055em;text-transform:uppercase;color:var(--faint)}
.login-card .error{min-height:17px;font-size:12.2px;color:var(--bad)}
.login-card .btn-primary{width:100%;height:46px;margin-top:5px}
/* a wrong password shakes the pane — pure CSS, login.js only writes text */
.login-card:has(.error:not(:empty)){animation:shake .42s ease}
@keyframes shake{20%{transform:translateX(-9px)}40%{transform:translateX(8px)}
  60%{transform:translateX(-5px)}80%{transform:translateX(4px)}}

/* ---------- custom cursor ---------- */
.cur,.curR{position:fixed;top:0;left:0;z-index:90;pointer-events:none;border-radius:50%;
  transform:translate(-100px,-100px);display:none}
.cur{width:5px;height:5px;background:#fff;mix-blend-mode:difference}
.curR{width:30px;height:30px;border:1px solid rgba(255,255,255,.5);mix-blend-mode:difference;
  transition:width .25s var(--ease),height .25s var(--ease)}
.curR.big{width:46px;height:46px}
body.cursor-on .cur,body.cursor-on .curR{display:block}
@media (pointer:fine){
  body.cursor-on,body.cursor-on a,body.cursor-on button,body.cursor-on .source-tile{cursor:none}
  body.cursor-on input{cursor:text}
}

/* ---------- responsive ---------- */
@media (max-width:860px){
  .source-grid{grid-template-columns:1fr}
  .sect-head{align-items:flex-start;flex-direction:column;gap:14px}
}
@media (max-width:680px){
  .shell{padding-top:calc(94px + env(safe-area-inset-top))}
  .hud{top:calc(10px + env(safe-area-inset-top))}
  .hud .pill{height:44px;padding:0 15px;gap:9px}
  .hud .acts{gap:8px}
  .hud .acts .btn-ghost{height:44px}
  .hud .acts .icon-btn{width:44px}
  .hero{margin-bottom:18px}
  .event-row{grid-template-columns:1fr;gap:11px}
  .event-row .hint{text-align:left}
  .settings-grid{grid-template-columns:1fr}
  .modal{max-height:calc(100svh - 36px);border-radius:24px}
  .export-row{gap:10px}
  .export-row .btn-primary,.export-row .btn-ghost{flex:1 1 auto}
  #export-hint{flex:1 0 100%}
}
@media (pointer:coarse){
  /* under 16px iOS Safari zooms the viewport on focus and does not
     reliably zoom back out */
  .field input,.event-row input,.login-card input{font-size:16px}
  .source-tile:hover{transform:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
}

/* ---------- lite pipeline ----------------------------------------
   Safari composites stacked backdrop-filters and blend modes far more
   slowly than Chromium, and phones pay for all of it in battery. Swap
   the material for solid gradients; the layout is identical. */
html.lite .grain,html.lite .grade{display:none}
html.lite .lg,html.lite .lg-r,html.lite .modal-backdrop,html.lite #toast{
  -webkit-backdrop-filter:none;backdrop-filter:none}
/* without a blur behind them these panes are just tinted windows, and
   content scrolling under the rail reads straight through — so lite
   trades translucency for opacity rather than losing legibility */
html.lite .lg{background:linear-gradient(180deg,rgba(27,30,41,.94),rgba(12,14,21,.96))}
html.lite .lg-r{background:linear-gradient(180deg,rgba(24,27,37,.9),rgba(11,13,20,.93))}
html.lite .hud .acts .btn-ghost{background:linear-gradient(180deg,rgba(27,30,41,.94),rgba(12,14,21,.96))}
html.lite .modal-backdrop{background:rgba(2,3,7,.8)}
html.lite #toast{background:rgba(17,19,28,.95)}
html.lite .cur{mix-blend-mode:normal;background:#fff}
html.lite .curR{mix-blend-mode:normal;border-color:rgba(255,255,255,.55)}
/* three viewport-sized layers drifting forever is a battery tax on a
   phone for something you barely read as motion */
html.lite #wall .amb{animation:none}
html.lite .amb.a1{opacity:1;transform:translate3d(4vmax,3vmax,0) scale(1.06)}
html.lite .amb.a2{transform:translate3d(-3vmax,-2vmax,0) scale(1.04)}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.15s!important}
  html.js .riser{opacity:1;transform:none}
  #wall .amb{animation:none;opacity:1}
}
