/* ==========================================================================
   Bahrain Social Club: brand tokens and shared components for the events dashboard.
   Copied from the website (website/src/static/assets/css/site.css) so the dashboard
   and bahrainsocialclub.com look like one thing. Change a token there, change it here.
   Brand palette only: Club Red, Gulf Teal, Sun, Flamingo (accent only), Sand, Ink.
   ========================================================================== */

/* ---------- Fonts (SIL Open Font License, see fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Shantell Sans";
  src: url("fonts/ShantellSans-Variable.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Rubik Marker Hatch";
  src: url("fonts/RubikMarkerHatch-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* brand colours: the same in both themes */
  --club-red: #d22619;
  --club-red-dark: #b01e13;
  --gulf-teal: #0e7470;
  --gulf-teal-dark: #0a5c59;
  --sun: #ffc83d;
  --flamingo: #ff9cc2;
  --sand: #faf1e2;
  --ink: #2a1712;

  /* theme: day */
  --surface: #faf1e2;
  --surface-raised: #fff9ef;
  --line: #e6d5ba;
  --text: #2a1712;
  --text-muted: #6b5549;
  --accent-text: #d22619;
  --teal-text: #0e7470;
  --header-bg: rgba(250, 241, 226, 0.95);
  --shadow-sticker: 3px 4px 0 #2a1712;
  --shadow-color: #2a1712;
  --logo-fg: #d22619;
  --logo-d1: #d22619;
  --logo-d2: #d22619;

  /* what components read (tones override these) */
  --bg: var(--surface);
  --fg: var(--text);
  --muted: var(--text-muted);
  --pop: var(--club-red);
  --link-color: var(--accent-text);
  --focus-color: var(--text);
  --card: var(--surface-raised);
  --card-edge: var(--text);

  --font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-text: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Shantell Sans", "Segoe Print", "Bradley Hand", cursive;
  --font-scribble: "Rubik Marker Hatch", "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-hero: clamp(2.4rem, 6.2vw, 5.6rem);
  --fs-xl: clamp(2.6rem, 7vw, 6rem);
  --fs-lg: clamp(2.1rem, 4.8vw, 4.1rem);
  --fs-md: clamp(1.55rem, 2.6vw, 2.25rem);
  --fs-sm: clamp(1.2rem, 1.6vw, 1.4rem);
  --fs-lead: clamp(1.1rem, 1.5vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.9rem;
  --fs-note: clamp(1.2rem, 1.9vw, 1.55rem);

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #1f1411;
    --surface-raised: #2e1e19;
    --line: #4a3530;
    --text: #faf1e2;
    --text-muted: #cdbba6;
    --accent-text: #ff6b57;
    --teal-text: #4fc7bf;
    --header-bg: rgba(31, 20, 17, 0.95);
    --shadow-sticker: 3px 4px 0 #000000;
    --shadow-color: #000000;
    --logo-fg: #faf1e2;
    --logo-d1: #ff9cc2;
    --logo-d2: #ffc83d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface: #1f1411;
  --surface-raised: #2e1e19;
  --line: #4a3530;
  --text: #faf1e2;
  --text-muted: #cdbba6;
  --accent-text: #ff6b57;
  --teal-text: #4fc7bf;
  --header-bg: rgba(31, 20, 17, 0.95);
  --shadow-sticker: 3px 4px 0 #000000;
  --shadow-color: #000000;
  --logo-fg: #faf1e2;
  --logo-d1: #ff9cc2;
  --logo-d2: #ffc83d;
  color-scheme: dark;
}

/* ---------- Tones: a band or card sets its ground, and everything inside follows ---------- */
.tone-paper,
.tone-raised {
  --fg: var(--text);
  --muted: var(--text-muted);
  --pop: var(--accent-text);
  --link-color: var(--accent-text);
  --focus-color: var(--text);
  --card-edge: var(--text);
}
.tone-paper {
  --bg: var(--surface);
  --card: var(--surface-raised);
}
.tone-raised {
  --bg: var(--surface-raised);
  --card: var(--surface);
}
.tone-red {
  --bg: var(--club-red);
  --fg: var(--sand);
  --muted: var(--sand);
  --pop: var(--sun);
  --link-color: var(--sand);
  --focus-color: var(--sand);
  --card: rgba(42, 23, 18, 0.16);
  --card-edge: var(--sand);
  --logo-fg: var(--sand);
  --logo-d1: var(--flamingo);
  --logo-d2: var(--sun);
}
.tone-teal {
  --bg: var(--gulf-teal);
  --fg: var(--sand);
  --muted: var(--sand);
  --pop: var(--sun);
  --link-color: var(--sand);
  --focus-color: var(--sand);
  --card: rgba(42, 23, 18, 0.18);
  --card-edge: var(--sand);
  --logo-fg: var(--sand);
  --logo-d1: var(--flamingo);
  --logo-d2: var(--sun);
}
.tone-sun {
  --bg: var(--sun);
  --fg: var(--ink);
  --muted: var(--ink);
  --pop: var(--club-red);
  --link-color: var(--ink);
  --focus-color: var(--ink);
  --card: rgba(255, 249, 239, 0.55);
  --card-edge: var(--ink);
  --logo-fg: var(--ink);
  --logo-d1: var(--ink);
  --logo-d2: var(--ink);
}
.tone-ink {
  --bg: var(--ink);
  --fg: var(--sand);
  --muted: #e3d3be;
  --pop: var(--sun);
  --link-color: var(--sun);
  --focus-color: var(--sand);
  --card: rgba(250, 241, 226, 0.07);
  --card-edge: var(--sand);
  --logo-fg: var(--sand);
  --logo-d1: var(--flamingo);
  --logo-d2: var(--sun);
}
.tone-paper,
.tone-raised,
.tone-red,
.tone-teal,
.tone-sun,
.tone-ink {
  background-color: var(--bg);
  color: var(--fg);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img,
svg {
  max-width: 100%;
}
img {
  height: auto;
  display: block;
}
p,
ul,
ol,
dl,
h1,
h2,
h3,
h4,
figure,
blockquote {
  margin: 0;
}
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}

a {
  color: var(--link-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus {
  outline: none;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--sand);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */
.shout-hero,
.shout-xl,
.shout-lg,
.shout-md,
.shout-sm,
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  text-wrap: balance;
  font-variation-settings: "opsz" 96;
}
.shout-hero {
  font-size: var(--fs-hero);
  line-height: 0.86;
  letter-spacing: -0.045em;
}
.shout-xl {
  font-size: var(--fs-xl);
  line-height: 0.88;
  letter-spacing: -0.045em;
}
.shout-lg,
h2 {
  font-size: var(--fs-lg);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.shout-md,
h3 {
  font-size: var(--fs-md);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.shout-sm {
  font-size: var(--fs-sm);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h4 {
  font: 800 1.15rem / 1.2 var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.scribble {
  display: block;
  font-family: var(--font-scribble);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.95;
  color: var(--pop);
  font-variation-settings: normal;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  font-weight: 500;
  max-width: 52ch;
}
.small {
  font-size: var(--fs-small);
  line-height: 1.45;
}
.muted {
  color: var(--muted);
}
.kicker {
  font: 800 0.82rem / 1 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variation-settings: "opsz" 12;
}
.kicker.accent {
  color: var(--pop);
}
.tone-paper .kicker.accent,
.tone-raised .kicker.accent {
  color: var(--accent-text);
}

.note {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 var(--fs-note) / 1.15 var(--font-hand);
  text-transform: lowercase;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---------- Sparkles ---------- */
.sparkle {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
}

/* ---------- Ticket buttons (the one primary action on a view is a ticket) ---------- */
.ticket-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  display: inline-block;
  max-width: 100%;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease;
  vertical-align: middle;
}
.ticket-btn:hover {
  transform: rotate(-2deg) scale(1.03);
}
.ticket-btn:active {
  transform: rotate(-1deg) scale(0.99);
}
.ticket-btn:disabled {
  cursor: progress;
  opacity: 0.65;
  transform: none;
}
.ticket {
  --n: 0.5em;
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  background: var(--t-bg);
  color: var(--t-fg);
  border-radius: var(--radius-sm);
  font: 800 1.1rem / 1.05 var(--font-display);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-variation-settings: "opsz" 36;
  -webkit-mask:
    radial-gradient(circle var(--n) at 0 50%, #0000 96%, #000) 0 0 / 51% 100% no-repeat,
    radial-gradient(circle var(--n) at 100% 50%, #0000 96%, #000) 100% 0 / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--n) at 0 50%, #0000 96%, #000) 0 0 / 51% 100% no-repeat,
    radial-gradient(circle var(--n) at 100% 50%, #0000 96%, #000) 100% 0 / 51% 100% no-repeat;
}
.ticket.is-lg {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}
.ticket-label {
  padding-block: 0.85em;
  padding-inline: 1.3em 1em;
  text-wrap: balance;
}
.ticket-stub {
  display: flex;
  align-items: center;
  padding-inline: 0.75em 1.05em;
  border-inline-start: 0.12em dashed currentColor;
}
.ticket .sparkle {
  width: 0.8em;
  height: 0.8em;
}
.t-red {
  --t-bg: var(--club-red);
  --t-fg: var(--sand);
}
.t-sun {
  --t-bg: var(--sun);
  --t-fg: var(--ink);
}
.t-teal {
  --t-bg: var(--gulf-teal);
  --t-fg: var(--sand);
}
.t-ink {
  --t-bg: var(--ink);
  --t-fg: var(--sand);
}
.t-sand {
  --t-bg: var(--sand);
  --t-fg: var(--ink);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}
.arrow-link svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}
.arrow-link:hover svg {
  transform: translateX(3px);
}

.text-button {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  color: var(--link-color);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  color: inherit;
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 30px);
}
.card.outlined {
  border: 2.5px solid var(--card-edge);
  box-shadow: 5px 6px 0 var(--shadow-color);
}

/* ---------- Series cards (event types) ---------- */
.series-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.series-card .kicker {
  opacity: 1;
}
.series-card.tone-paper,
.series-card.tone-raised {
  box-shadow: inset 0 0 0 2.5px var(--text);
}
.series-card.tone-white {
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 0 0 2.5px var(--ink);
  --pop: var(--club-red);
  --focus-color: var(--ink);
}
.series-card.is-online {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 0 0 0 2.5px var(--text);
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(14, 116, 112, 0.07) 14px 16px);
}

/* Event formats: colour is the accent. Mixed = Club Red, women only = Flamingo, men only = Gulf Teal */
.format-mixed {
  --fmt: var(--club-red);
}
.format-women {
  --fmt: var(--flamingo);
}
.format-men {
  --fmt: var(--gulf-teal);
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface-raised);
  color: var(--text);
  border: 2.5px solid var(--text);
  border-radius: var(--radius-lg);
  box-shadow: 6px 7px 0 var(--shadow-color);
  padding: clamp(18px, 4vw, 36px);
}
.form {
  display: grid;
  gap: 22px;
}
.form-note {
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.req {
  color: var(--accent-text);
  font-weight: 800;
}
.opt {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9em;
}
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.field > label,
.field > legend,
.field-label {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
  padding: 0;
}
.field > legend {
  margin-bottom: 8px;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="url"],
.form input[type="password"],
.form select,
.form textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2.5px solid var(--text);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: 500 1.0625rem / 1.4 var(--font-text);
}
.form textarea {
  min-height: 132px;
  resize: vertical;
}
.form ::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.form input:focus-visible,
.form select:focus-visible,
.form textarea:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "";
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  transform: rotate(45deg);
  pointer-events: none;
}
.form select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 44px;
}
.hint {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.error-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
}
.error-msg::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-text);
  color: var(--surface);
  font: 800 0.8rem / 1 var(--font-display);
  margin-top: 1px;
}
.form [aria-invalid="true"] {
  border-color: var(--accent-text) !important;
  box-shadow: 0 0 0 1.5px var(--accent-text);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill-choice {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.pill-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.pill-choice span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 2.5px solid var(--text);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-weight: 700;
}
.pill-choice span::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  flex: none;
}
.pill-choice input[type="checkbox"] + span::before {
  border-radius: 4px;
}
.pill-choice input:checked + span {
  background: var(--club-red);
  border-color: var(--club-red);
  color: var(--sand);
}
.pill-choice input:checked + span::before {
  background: var(--sand);
  box-shadow: inset 0 0 0 3px var(--club-red);
  border-color: var(--sand);
}
.pill-choice input:focus-visible + span {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}
.choice-group[aria-invalid="true"] .pill-choice span {
  border-color: var(--accent-text);
}

.checks {
  display: grid;
  gap: 14px;
  border: 0;
  padding: 0;
  margin: 0;
}
.check {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
}
.check input {
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--club-red);
  cursor: pointer;
}
.check label {
  line-height: 1.45;
  cursor: pointer;
}
.check .error-msg {
  grid-column: 2;
}

.inline-note {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(14, 116, 112, 0.1);
  border: 2px dashed var(--gulf-teal);
  font-size: 0.98rem;
  line-height: 1.5;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}
.form-small {
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.form-status {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(210, 38, 25, 0.1);
  border: 2px solid var(--accent-text);
  font-weight: 600;
}

/* ---------- Small pill buttons ---------- */
.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.copy-row code,
.copy-text {
  font: 700 1rem / 1.4 var(--font-text);
  user-select: all;
  word-break: break-all;
}
.copy-btn {
  appearance: none;
  border: 2px solid var(--text);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font: 800 0.8rem / 1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.copy-btn:hover {
  background: var(--text);
  color: var(--surface);
}
.copy-btn.danger {
  border-color: var(--accent-text);
  color: var(--accent-text);
}
.copy-btn.danger:hover {
  background: var(--accent-text);
  color: var(--surface);
}

/* ---------- Staff rows (lists of people and things with actions) ---------- */
.staff-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.staff-list > .staff-row:last-child {
  border-bottom: 2px solid var(--line);
}
.staff-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 12px 0;
  border-top: 2px solid var(--line);
}
.staff-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Empty state ---------- */
.empty-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius-lg);
  border: 3px dashed var(--text-muted);
}
.empty-state p {
  font-size: var(--fs-lead);
  font-weight: 600;
  max-width: 42ch;
}

/* ---------- Modal ---------- */
.modal {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 2.5px solid var(--text);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 8px 9px 0 var(--club-red);
}
.modal::backdrop {
  background: rgba(42, 23, 18, 0.62);
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 4vw, 28px);
  background: var(--surface-raised);
  border-bottom: 2px solid var(--line);
}
.modal-head h2 {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.modal-body {
  padding: clamp(18px, 4vw, 28px);
}
.modal-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2.5px solid var(--text);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.modal-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}
.modal-close:hover {
  background: var(--text);
  color: var(--surface);
}
.modal .form-card {
  box-shadow: none;
}
body:has(.modal[open]) {
  overflow: hidden;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92vw, 460px);
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--sand);
  box-shadow: 4px 5px 0 var(--club-red);
  font-weight: 600;
  text-align: center;
}
.toast.is-error {
  box-shadow: 4px 5px 0 var(--sun);
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .ticket-btn:hover,
  .ticket-btn:active {
    transform: none;
  }
}

/* ---------- Print ---------- */
@media print {
  .app-header,
  .app-foot,
  .ticket-btn,
  .toast,
  .btn,
  .copy-btn {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #2a1712 !important;
  }
}
