@font-face { font-family: 'Mona Sans'; src: url(/fonts/mona-sans-latin-wdth-normal.woff2) format('woff2-variations'); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: 'Fustat'; src: url(/fonts/fustat-latin-wght-normal.woff2) format('woff2-variations'); font-weight: 200 800; font-display: swap; }

:root {
  /* Mulaya brand */
  --dark: #252525;
  --accent: #706f68;
  --main: #abaaa1;
  --white: #ffffff;
  /* derived */
  --ink: #161616;
  --dark-2: #2f2f2e;
  --tint: #e9e8e3;
  --paper: #f4f4f1;
  --text: #252525;
  --muted: #5f5e58;
  --line: #dcdbd4;
  --line-dark: rgb(255 255 255 / .12);
  --on-dark: #ffffff;
  --on-dark-muted: #abaaa1;
  --danger: #b3261e;

  --display: 'Mona Sans', 'Arial', sans-serif;
  --body: 'Fustat', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --r: 10px;
  --r-l: 18px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 1280px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--main) transparent; }
body { margin: 0; font: 400 1rem/1.55 var(--body); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
::selection { background: var(--dark); color: var(--white); }
input, textarea, select { caret-color: var(--dark); }
:focus-visible { outline: 2px solid var(--dark); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.block { display: block; }
.error { color: var(--danger); }
.icon { flex: none; width: 1.1em; height: 1.1em; }
.logo { display: block; height: auto; }
.logo--s { width: 96px; }
.logo--m { width: 124px; }

.display { font-family: var(--display); font-weight: 750; font-stretch: 112%; line-height: 1; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.display--xl { font-size: clamp(2.75rem, 7vw, 5rem); }
.display--l { font-size: clamp(2rem, 5vw, 3.25rem); }
.display--m { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.h2 { display: flex; align-items: center; gap: .5rem; font: 650 1.15rem/1.2 var(--display); font-stretch: 105%; margin: 0 0 .5rem; }
.label { font: 600 .6875rem/1.3 var(--display); font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0; }
.label--on-dark { color: var(--on-dark-muted); }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.35rem; border: 0; border-radius: 999px; font: 600 .9375rem/1.2 var(--display); font-stretch: 105%; text-decoration: none; cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--dark); color: var(--white); }
.btn--light { background: var(--white); color: var(--dark); }
.btn--quiet { background: var(--tint); color: var(--dark); }
.btn--ghost { background: transparent; color: inherit; padding: .5rem .7rem; }
.btn--ghost-light { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); }
.btn--danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--wide { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: #3b3b39; }
  .btn--light:hover { background: var(--tint); }
  .btn--quiet:hover { background: #dedcd5; }
  .btn--ghost:hover { background: rgb(37 37 37 / .07); }
  .btn--ghost-light:hover { background: rgb(255 255 255 / .08); }
  .btn--danger:hover { background: #fbeae8; }
}

.field { display: grid; gap: .4rem; }
.field > span { font-weight: 600; font-size: .9375rem; }
.field small { color: var(--muted); font-size: .8125rem; }
.field input, .field textarea, .field select, .search input {
  width: 100%; min-height: 46px; padding: .65rem .85rem; font: 400 1rem/1.4 var(--body); color: var(--text);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r); transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgb(112 111 104 / .18); }
.field [aria-invalid="true"] { border-color: var(--danger); }
::placeholder { color: #8a897f; }
.field-error { color: var(--danger); font-weight: 600; margin: 0; }
.field-error--on-dark { color: #ff9a90; }
.code { font: 400 .8125rem/1.5 var(--mono) !important; tab-size: 2; }
input[type="checkbox"] { accent-color: var(--dark); width: 18px; height: 18px; cursor: pointer; }

.flash { display: flex; align-items: center; gap: .5rem; margin: 0 0 1.5rem; padding: .8rem 1.1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); font-weight: 600; }
.alert { margin: 0 0 1.5rem; padding: .8rem 1.1rem; background: #fbeae8; color: var(--danger); border-radius: var(--r); }
.alert ul { margin: .25rem 0 0; padding-left: 1.2rem; }

/* ---------- dark pages: gate, messages ---------- */
.page-dark { background: var(--ink); color: var(--on-dark); min-height: 100dvh; }
.page-dark ::selection, .hero ::selection, .reveal ::selection { background: var(--white); color: var(--dark); }
.page-dark :focus-visible, .hero :focus-visible, .reveal :focus-visible, .topbar :focus-visible { outline-color: var(--white); }
.gate { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; padding: var(--pad); }
.gate__body { align-self: center; width: min(100%, 640px); display: grid; gap: 1.25rem; padding-bottom: 8vh; }
.gate__title { font-stretch: 118%; }
.gate__text { margin: 0; font-size: 1.125rem; color: var(--on-dark-muted); max-width: 46ch; }
.inline-form { display: flex; gap: .5rem; padding: .375rem; background: var(--dark-2); border: 1px solid var(--line-dark); border-radius: 999px; max-width: 460px; }
.inline-form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--white); font: 500 1.0625rem var(--body); padding: 0 1rem; caret-color: var(--white); }
.inline-form input:focus { outline: none; }
.inline-form:focus-within { border-color: rgb(255 255 255 / .35); }
.login { display: grid; gap: 1rem; max-width: 420px; }
.login .field > span { color: var(--on-dark-muted); }
.login .field input { background: var(--dark-2); border-color: var(--line-dark); color: var(--white); caret-color: var(--white); }

/* ---------- landing hero ---------- */
.page-landing { background: var(--paper); }
.hero { background: var(--ink); color: var(--on-dark); }
.hero__inner { max-width: var(--max); margin: 0 auto; padding: var(--pad) var(--pad) clamp(2rem, 5vw, 3.5rem); display: grid; gap: clamp(2.5rem, 7vw, 5rem); }
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hero__title { margin: 0; font: 800 clamp(3rem, 11vw, 9.5rem)/.88 var(--display); font-stretch: 125%; letter-spacing: -.045em; text-transform: uppercase; overflow: hidden; padding-bottom: .04em; text-wrap: balance; }
.hero__title > span { display: block; }
.hero__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); border-top: 1px solid var(--line-dark); padding-top: 1.5rem; }
.hero-stat { display: grid; gap: .6rem; align-content: start; }
.hero-stat__big { margin: 0; font: 700 clamp(2.25rem, 4.5vw, 3.25rem)/1 var(--display); font-stretch: 112%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-stat__big span { color: var(--accent); }
.hero-stat__sub { margin: 0; color: var(--on-dark-muted); font-size: .9375rem; }
.hero-stat__sub::first-letter { text-transform: uppercase; }
.countdown { display: flex; gap: clamp(.75rem, 2vw, 1.25rem); }
.countdown__unit { display: grid; gap: .25rem; }
.countdown__num { font: 700 clamp(2.25rem, 4.5vw, 3.25rem)/1 var(--display); font-stretch: 112%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.countdown__label { font-size: .75rem; color: var(--on-dark-muted); }
.meter { height: 4px; background: var(--line-dark); border-radius: 4px; overflow: hidden; margin-top: .35rem; }
.meter > span { display: block; height: 100%; width: var(--v); background: var(--white); border-radius: inherit; transform-origin: left; }

/* ---------- roster ---------- */
.roster { max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad) 5rem; }
.roster__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 2rem; }
.roster__head p { margin: 0; max-width: 48ch; }
.roster__empty { color: var(--muted); font-size: 1.0625rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 2.5rem 1.5rem; align-items: start; }

/* Portrait card: greyscale until the gift is bought */
.pcard { display: grid; gap: .9rem; min-width: 0; }
.pcard__media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-l); overflow: hidden; background: var(--tint); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.04); transition: filter 400ms ease, transform 600ms var(--ease-out); }
.pcard.is-done .pcard__media img, .pcard.is-color .pcard__media img { filter: none; }
@media (hover: hover) and (pointer: fine) {
  .pcard:hover .pcard__media img { filter: none; transform: scale(1.03); }
}
.pcard__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--main); }
.pcard__empty .icon { width: 36%; height: 36%; stroke-width: 1.25; }
.badge { position: absolute; left: .75rem; top: .75rem; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem .35rem .55rem; border-radius: 999px;
  background: rgb(255 255 255 / .92); color: var(--dark); font: 600 .75rem/1 var(--display); font-stretch: 105%; box-shadow: 0 2px 10px rgb(0 0 0 / .12); }
.pcard__body { display: grid; gap: .3rem; min-width: 0; padding: 0 .15rem; }
.pcard__name { margin: 0; font: 650 1.125rem/1.2 var(--display); font-stretch: 108%; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pcard__dept { margin: 0; font: 600 .6875rem/1.3 var(--display); font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.pcard__likes { margin: .2rem 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }

.pending { aspect-ratio: 4 / 5; border: 1.5px dashed var(--main); border-radius: var(--r-l); padding: 1.5rem; display: grid; align-content: end; gap: .5rem; color: var(--muted); }
.pending p { margin: 0; }
.pending__num { font: 700 3rem/1 var(--display) !important; font-stretch: 112%; letter-spacing: -.03em; color: var(--dark); }

/* One authored entrance: title rises, cards settle in sequence */
@media (prefers-reduced-motion: no-preference) {
  .hero__title > span { animation: rise 900ms var(--ease-out) both; }
  .hero__stats { animation: fade-up 700ms var(--ease-out) 250ms both; }
  .meter > span { animation: grow 1100ms var(--ease-out) 450ms both; }
  .grid > * { animation: settle 600ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms + 150ms); }
  .card-grid__preview[data-just="regalo"] .badge { animation: pop 320ms var(--ease-out) 150ms both; }
}
@media (prefers-reduced-motion: reduce) {
  .grid > *, .hero__stats { animation: fade 250ms ease both; }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes settle { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- personal card ---------- */
.page-paper { min-height: 100dvh; }
.topbar { background: var(--ink); color: var(--on-dark); }
.topbar__inner { max-width: 1040px; margin: 0 auto; padding: 1.1rem var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar__inner a { display: block; }
.card-page { max-width: 1040px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem) var(--pad) 5rem; }
.lede { margin: .75rem 0 2rem; font-size: 1.125rem; max-width: 58ch; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: clamp(1.75rem, 5vw, 3.5rem); align-items: start; }
.card-form { display: grid; gap: 1.25rem; }
.photo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.photo-pick input:focus-visible + label { outline: 2px solid var(--dark); outline-offset: 3px; }
#preview .pcard__media img { transition: opacity 200ms ease; }

.reveal { display: grid; grid-template-columns: minmax(220px, 380px) minmax(0, 1fr); background: var(--ink); color: var(--on-dark); border-radius: calc(var(--r-l) + 6px); overflow: hidden; margin-bottom: clamp(3rem, 7vw, 4.5rem); }
.reveal__media { min-height: 100%; background: var(--dark-2); }
.reveal__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.reveal__body { padding: clamp(1.5rem, 4vw, 3rem); display: grid; gap: .6rem; align-content: center; }
.reveal__body p { margin: 0; }
.reveal__name { font: 800 clamp(2rem, 5vw, 3.5rem)/1 var(--display); font-stretch: 120%; letter-spacing: -.035em; text-transform: uppercase; margin-bottom: .1rem !important; }
.reveal__dept { color: var(--on-dark-muted); margin-bottom: 1rem !important; }
.reveal__likes { font-size: 1.1875rem; line-height: 1.5; max-width: 50ch; white-space: pre-line; margin-bottom: .5rem !important; }
.reveal__note, .reveal__hint { color: var(--on-dark-muted); font-size: .9375rem; }
.gift-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1rem; }
.gift-toggle__done { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }

@media (max-width: 720px) {
  .hero__top .label { display: none; }
  .card-grid, .reveal { grid-template-columns: 1fr; }
  .card-grid__preview { max-width: 280px; }
  .reveal__media img { aspect-ratio: 1 / 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
  .pcard__name { font-size: 1rem; }
  .pcard__likes { font-size: .875rem; }
  .pending { padding: 1rem; font-size: .875rem; }
  .pending__num { font-size: 2.25rem !important; }
  .countdown__num, .hero-stat__big { font-size: 2.25rem; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero__stats > :first-child { grid-column: 1 / -1; }
}

/* ---------- admin ---------- */
.page-admin { background: var(--paper); }
.admin-head { background: var(--ink); color: var(--on-dark); position: sticky; top: 0; z-index: 5; }
.admin-head__inner { max-width: var(--max); margin: 0 auto; padding: .55rem var(--pad); display: flex; align-items: center; gap: 1.5rem; }
.admin-head__brand { display: flex; align-items: center; gap: .9rem; color: var(--on-dark-muted); text-decoration: none; white-space: nowrap; }
.admin-head__brand .tracked { font: 600 .6875rem/1 var(--display); font-stretch: 112%; letter-spacing: .16em; text-transform: uppercase; }
.admin-head nav { flex: 1; overflow-x: auto; }
.admin-head ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.admin-head nav a { display: block; padding: .55rem .9rem; border-radius: 999px; color: var(--on-dark-muted); text-decoration: none; font: 550 .9375rem var(--display); white-space: nowrap; transition: background-color 160ms ease, color 160ms ease; }
.admin-head nav a[aria-current="page"] { color: var(--white); background: rgb(255 255 255 / .12); }
@media (hover: hover) and (pointer: fine) { .admin-head nav a:hover { color: var(--white); } }
.admin-head .btn--ghost { color: var(--on-dark-muted); }
.admin { max-width: var(--max); margin: 0 auto; padding: 2rem var(--pad) 8rem; display: grid; gap: 1.5rem; }
.admin-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }
.kpis { display: flex; flex-wrap: wrap; gap: .5rem 2.25rem; margin: 0; }
.kpis div { display: grid; gap: .2rem; }
.kpis dt { font: 600 .6875rem/1.3 var(--display); font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpis dd { margin: 0; font: 700 1.75rem/1.1 var(--display); font-stretch: 112%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpis__text { font-size: 1.05rem !important; line-height: 1.7 !important; }
.back { font-weight: 600; text-decoration: none; color: var(--muted); }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel > summary { display: flex; align-items: center; gap: .5rem; padding: 1rem 1.25rem; font: 600 1rem var(--display); cursor: pointer; list-style: none; }
.panel > summary::-webkit-details-marker { display: none; }
.panel[open] > summary { border-bottom: 1px solid var(--line); }
.panel--flat { padding: 1.5rem; }
.import { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: start; padding: 1.25rem; }
.import > button { margin-top: 1.75rem; }
.import p { grid-column: 1 / -1; margin: 0; }

.table-tools { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { min-height: 36px; padding: .35rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font: 550 .875rem var(--display); color: var(--muted); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.chip span { font-variant-numeric: tabular-nums; opacity: .7; margin-left: .2rem; }
.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--white); }
.search { flex: 0 1 320px; }
.search input { border-radius: 999px; padding-inline: 1.1rem; }

.people { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; font-variant-numeric: tabular-nums; }
.people th { text-align: left; font: 600 .6875rem/1.3 var(--display); font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .85rem .75rem; border-bottom: 1px solid var(--line); }
.people td { padding: .65rem .75rem; border-bottom: 1px solid #ecebe6; vertical-align: middle; }
.people tr:last-child td { border-bottom: 0; }
.people tr:has(input[name="ids"]:checked) td { background: #f3f2ee; }
.col-check { width: 44px; padding-left: 1rem !important; }
.person { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.person > span:last-child { display: grid; min-width: 0; }
.person strong { font-weight: 650; }
.person .muted { font-size: .875rem; overflow-wrap: anywhere; }
.thumb { flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--tint); color: var(--accent); font: 650 .9375rem var(--display); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; font: 550 .8125rem var(--display); white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--none { background: #f0efeb; color: var(--muted); }
.status--scheduled { box-shadow: inset 0 0 0 1px var(--main); color: var(--dark); }
.status--invited { background: var(--tint); color: var(--dark); }
.status--joined { background: var(--dark); color: var(--white); }
.status--bought { background: var(--accent); color: var(--white); }
.filter-empty { padding: 1rem; }

.bulk { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 10; translate: -50% 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; width: max-content; max-width: calc(100vw - 2rem);
  padding: .55rem .6rem .55rem 1.25rem; background: var(--ink); color: var(--white); border-radius: 999px; box-shadow: 0 20px 40px -12px rgb(0 0 0 / .45);
  transform: translateY(calc(100% + 2rem)); opacity: 0; pointer-events: none;
  transition: transform 240ms var(--ease-out), opacity 160ms ease; }
.bulk.is-open { transform: none; opacity: 1; pointer-events: auto; }
.bulk__count { font-variant-numeric: tabular-nums; margin-right: .25rem; }
.bulk__when { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--main); }
.bulk__when input { min-height: 40px; padding: .4rem .75rem; border-radius: 999px; border: 0; font: 500 .9375rem var(--body); color-scheme: light; }
.bulk .btn { min-height: 40px; padding: .45rem 1rem; }
.bulk .btn--primary { background: var(--white); color: var(--dark); }
.bulk .btn--quiet { background: rgb(255 255 255 / .12); color: var(--white); }
.bulk .btn--danger { color: #ff9a90; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.25rem; }
.field--full { grid-column: 1 / -1; }
.veto-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: 1rem 0; }
.veto-form .field { flex: 1 1 200px; }
.veto-arrow { font-size: 1.5rem; color: var(--muted); padding-bottom: .5rem; }
.vetos { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.vetos li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem .5rem .35rem 1rem; background: var(--paper); border-radius: var(--r); }

/* Hold to confirm: slow while deciding, instant release */
.hold { position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: 52px; padding: 0 1.5rem; border: 0; border-radius: 999px;
  background: var(--tint); color: var(--dark); font: 600 1rem var(--display); cursor: pointer; user-select: none; touch-action: none; transition: transform 160ms var(--ease-out); }
.hold > span:last-child { display: inline-flex; align-items: center; gap: .5rem; }
.hold__fill { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 1.5rem; background: var(--dark); color: var(--white);
  clip-path: inset(0 100% 0 0); transition: clip-path 200ms var(--ease-out); }
.hold__fill > span { display: inline-flex; align-items: center; gap: .5rem; }
.hold.is-holding { transform: scale(.98); }
.hold.is-holding .hold__fill { clip-path: inset(0 0 0 0); transition: clip-path 2s linear; }
.hold:disabled { opacity: .5; cursor: not-allowed; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: .65rem 1rem; font: 550 .9375rem var(--display); color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--dark); border-bottom-color: var(--dark); }
.tpl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.tpl__form { display: grid; gap: 1rem; }
.tpl__form code { background: var(--tint); padding: .1rem .4rem; border-radius: 6px; font: .8125rem var(--mono); }
.tpl__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.field--inline { flex: 1 1 180px; }
.tpl__preview { margin: 0; position: sticky; top: 5rem; display: grid; gap: .5rem; }
.tpl__preview iframe { width: 100%; height: 680px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--white); }

@media (max-width: 860px) {
  .tpl { grid-template-columns: 1fr; }
  .import { grid-template-columns: 1fr; }
  .import > button { margin-top: 0; }
  .people thead { display: none; }
  .people, .people tbody, .people tr, .people td { display: block; }
  .people tr { display: grid; grid-template-columns: 44px 1fr auto; padding: .5rem; border-bottom: 1px solid var(--line); }
  .people td { border: 0; padding: .25rem; }
  .people td:nth-child(3), .people td:nth-child(4), .people td:nth-child(5) { grid-column: 2; }
  .people td:nth-child(6) { grid-column: 3; grid-row: 1; }
  .admin-head__brand .tracked { display: none; }
}

/* Mobile: centred composition; form fields stay left-aligned for scanning */
@media (max-width: 720px) {
  .hero__inner, .gate__body, .roster__head, .pcard__body, .pending, .lede, .mine > h1, .mine > h2, .reveal__body, .admin-title { text-align: center; }
  .hero__top, .gate__top, .topbar__inner { justify-content: center; }
  .hero__top .logo, .gate__top .logo { margin-inline: auto; }
  .hero-stat, .gate__body, .reveal__body { justify-items: center; }
  .countdown { justify-content: center; }
  .meter { width: 100%; }
  .roster__head { flex-direction: column; align-items: center; }
  .roster__head p, .lede, .gate__text { margin-inline: auto; }
  .pending { align-content: center; }
  .inline-form { width: 100%; margin-inline: auto; }
  .card-grid__preview { margin-inline: auto; width: 100%; }
  .topbar__inner .label { display: none; }
  .gift-toggle, .kpis, .photo-pick { justify-content: center; }
}
.bulk__gender { display: inline-flex; gap: .35rem; align-items: center; }
.bulk__gender select { min-height: 40px; border-radius: 999px; border: 0; padding: 0 .75rem; font: 500 .9375rem var(--body); }

/* Modal: no-photo warning and desktop camera */
.modal { border: 0; padding: clamp(1.5rem, 4vw, 2rem); border-radius: 22px; width: min(92vw, 440px); background: var(--white); color: var(--text); text-align: center;
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / .45); opacity: 1; transform: none;
  transition: opacity 200ms ease-out, transform 260ms var(--ease-out), overlay 260ms allow-discrete, display 260ms allow-discrete; }
.modal::backdrop { background: rgb(22 22 22 / .55); backdrop-filter: blur(3px); transition: opacity 200ms ease-out, overlay 260ms allow-discrete, display 260ms allow-discrete; }
@starting-style { .modal[open] { opacity: 0; transform: translateY(10px) scale(.97); } .modal[open]::backdrop { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal { transform: none !important; } }
.modal h2 { margin-bottom: .6rem; }
.modal p { margin: 0 auto 1.5rem; color: var(--muted); font-size: 1.0625rem; max-width: 34ch; }
.modal__art { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin: 0 auto 1.1rem; }
.modal__actions { display: grid; gap: .5rem; }
.modal--camera { width: min(92vw, 480px); }
.camera { margin-bottom: 1rem; }
.camera video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; background: var(--ink); transform: scaleX(-1); }
.camera__error { color: var(--danger) !important; }
.photo-pick__hint { flex-basis: 100%; }
@media (max-width: 720px) { .photo-pick__hint { text-align: center; } }
.tpl__cap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tpl__cap a { font: 600 .875rem var(--display); color: var(--dark); }
.status--dropped { background: #fbeae8; color: var(--danger); }
.hold--danger .hold__fill { background: var(--danger); }

/* Participa switch: instant feedback, no motion beyond the knob */
.switch { position: relative; display: inline-block; width: 40px; height: 24px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background-color 160ms ease; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform 160ms var(--ease-out); }
.switch input:checked + span { background: var(--dark); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--dark); outline-offset: 2px; }
.people tr.is-out td:nth-child(2), .people tr.is-out td:nth-child(3), .people tr.is-out td:nth-child(4) { opacity: .45; }
.topbar__link { display: inline-flex !important; align-items: center; gap: .4rem; color: var(--on-dark); text-decoration: none; font: 600 .875rem var(--display); padding: .5rem .9rem; border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); transition: background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .topbar__link:hover { background: rgb(255 255 255 / .08); } }
@media (max-width: 720px) { .topbar__inner { justify-content: space-between !important; } }
