/* Shared look: paper, ink, and raffle-ticket colours. Every event page takes one of the six
   tints (data-tint on <body>); organiser screens and the site use the house violet. */
:root {
  --paper: #faf9ff; --card: #fff; --ink: #17123a; --muted: #625e82; --line: #e3e0f2;
  --link: #4a39d6; --ok: #0b7f5f; --wait: #a45a00; --bad: #c62f3b;
  --accent: #5b4bff; --on-accent: #fff; --sun: #ffc41f;
  --display: "Unbounded Variable", system-ui, sans-serif;
  --body: "Onest Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #110d2b; --card: #1a1540; --ink: #f3f1ff; --muted: #aba6d4; --line: #322b66;
    --link: #a99cff; --ok: #4fd3a5; --wait: #f0b050; --bad: #ff8089; --accent: #7a6bff; }
}
[data-tint="tomato"] { --accent: #e0432a; --on-accent: #fff; }
[data-tint="mint"] { --accent: #0b8563; --on-accent: #fff; }
[data-tint="sky"] { --accent: #2b63e6; --on-accent: #fff; }
[data-tint="sun"] { --accent: #ffc41f; --on-accent: #17123a; }
[data-tint="pink"] { --accent: #d62f7c; --on-accent: #fff; }
[data-tint="violet"] { --accent: #5b4bff; --on-accent: #fff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
main { max-width: 540px; margin: 0 auto; padding: 12px 16px 56px; }
nav { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 4px 0 8px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
h1 { font-size: 24px; line-height: 1.2; margin: 12px 0 8px; }
h2 { font-size: 17px; line-height: 1.3; margin: 22px 0 8px; }
a { color: var(--link); }
small, .small { color: var(--muted); font-size: 14px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.facts { margin: 8px 0 12px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 14px 0; display: grid; gap: 12px; }
.card h2, .card p { margin: 0; }
.card h2:not(:first-child) { margin-top: 10px; } /* a second heading starts a new part of the card */
label { display: grid; gap: 4px; font-size: 15px; color: var(--muted); }
label.check { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 17px; }
label.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; width: 100%; min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--link); outline: none; }
select { width: auto; min-width: 72px; }
input[type="file"] { padding: 8px; }
fieldset { border: 1.5px solid var(--line); border-radius: 12px; display: grid; gap: 10px; padding: 10px 12px; margin: 0; }
legend { font-size: 15px; color: var(--muted); padding: 0 4px; }
button, .button { font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; display: block; width: 100%;
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent); border-radius: 14px; padding: 12px 16px; min-height: 52px; line-height: 1.4; }
button.second, .button.second { background: transparent; color: var(--ink); border-color: var(--line); }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button:active, .button:active { transform: translateY(1px); }

.total { font-size: 19px; margin: 0; }
.total b { font-family: var(--display); }
#paid { display: grid; gap: 10px; }
.note { border-left: 4px solid var(--muted); background: var(--card); padding: 10px 12px; border-radius: 8px; margin: 12px 0; }
.card .note { margin: 0; background: var(--paper); }
.note.ok { border-color: var(--ok); } .note.bad { border-color: var(--bad); }
a.bad { color: var(--bad); } small.ok { color: var(--ok); }
.badge { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 99px; padding: 1px 10px; border: 1.5px solid currentColor; }
.badge.ok { color: var(--ok); } .badge.wait { color: var(--wait); } .badge.off { color: var(--muted); }
.copy { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.copy > span { min-width: 0; overflow-wrap: anywhere; }
.copy b { font-family: var(--mono); font-size: 18px; letter-spacing: 0.01em; }
.copy button { width: auto; flex: none; min-height: 40px; padding: 6px 14px; }
.copy input { flex: 1; }
.langs { margin-top: 32px; display: flex; gap: 16px; font-size: 14px; }

/* ---------- event page ---------- */
.cover { border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--accent); margin-top: 4px; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* No photo: the date becomes the poster, with a scalloped ticket edge along the bottom. */
.cover.poster { aspect-ratio: 16 / 10; color: var(--on-accent); display: grid; align-content: end; padding: 20px 22px 34px; position: relative; }
.cover.poster .day { font: 800 clamp(84px, 30vw, 132px)/0.82 var(--display); letter-spacing: -0.04em; }
.cover.poster .month { font: 700 clamp(20px, 6.4vw, 28px)/1.1 var(--display); text-transform: uppercase; margin-top: 8px; }
.cover.poster::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 18px;
  background: radial-gradient(circle at 12px 9px, var(--paper) 8px, transparent 8.6px) 0 0 / 24px 18px repeat-x; }
.event h1 { font-size: clamp(25px, 7.2vw, 36px); line-height: 1.1; margin: 20px 0 6px; }
.host { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.where { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.where li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; }
.where .tile { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; overflow: hidden; text-align: center; }
.where .tile.date { grid-template-rows: 17px 1fr; place-items: stretch; }
.where .tile.date i { font: 700 10px/17px var(--body); font-style: normal; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent); color: var(--on-accent); }
.where .tile.date b { font: 700 18px/29px var(--display); }
.where .tile svg { width: 22px; height: 22px; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.where b { display: block; line-height: 1.25; }
.where span { color: var(--muted); font-size: 15px; }
.about { margin: 0 0 18px; }
.alert { display: inline-block; font-weight: 700; font-size: 14px; border-radius: 99px; padding: 5px 12px; background: color-mix(in srgb, var(--accent) 14%, var(--paper)); margin: 0 0 14px; }

.buy h2 { font-size: 16px; }
.tt { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; }
.tt:has(input:not([value="0"])) { border-color: var(--ink); }
.tt b { overflow-wrap: anywhere; }
.tt .p { color: var(--muted); font-size: 15px; grid-column: 1; }
.stepper { grid-row: span 2; grid-column: 2; display: flex; align-items: center; gap: 2px; }
.stepper button { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); font-size: 22px; line-height: 1; }
.stepper input { width: 44px; min-height: 40px; padding: 0; text-align: center; border: 0; background: transparent; font-weight: 700; font-size: 18px; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tt.none { opacity: 0.55; }

/* ---------- a ticket: stub, tear line, QR ---------- */
.ticket { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; margin: 14px 0; overflow: hidden; }
.ticket .stub { background: var(--accent); color: var(--on-accent); padding: 14px 18px; display: grid; gap: 2px; }
.ticket .stub small { color: inherit; opacity: 0.85; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }
.ticket .stub b { font: 700 19px/1.2 var(--display); overflow-wrap: anywhere; }
.ticket .body { padding: 18px; text-align: center; border-top: 2px dashed var(--line); position: relative; display: grid; gap: 10px; justify-items: center; }
/* the two half-circle notches where the stub tears off */
.ticket .body::before, .ticket .body::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.ticket .body::before { left: -11px; } .ticket .body::after { right: -11px; }
.ticket svg { width: 208px; max-width: 100%; height: auto; background: #fff; border-radius: 10px; padding: 6px; }
.ticket p { margin: 0; }

/* ---------- organiser screens ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin: 12px 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.stats b { display: block; font: 700 20px/1.3 var(--display); color: var(--ink); }
.stats b small { font-size: 13px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.actions > :first-child { grid-column: 1 / -1; }
.list { list-style: none; padding: 0; margin: 12px 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li > a:first-child { text-decoration: none; color: var(--ink); flex: 1; }
.list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.list li button, .list li .button { width: auto; flex: none; min-height: 42px; padding: 8px 14px; }
.list li.hit { background: color-mix(in srgb, var(--ok) 12%, transparent); padding-inline: 10px; border-radius: 12px; }
.type { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
/* Door: large and high-contrast, to be read outdoors. */
.count { font-size: 22px; margin: 8px 0; } .count b { font: 700 34px/1 var(--display); }
#door { display: grid; gap: 10px; }
#cam { width: 100%; border-radius: 16px; background: #000; }
#flash { font: 700 22px/1.2 var(--display); text-align: center; color: #fff; border-radius: 16px; padding: 22px 12px; }
#flash.ok { background: #0b7f5f; } #flash.warn { background: #a45a00; } #flash.bad { background: #b3261e; }
#guests li { font-size: 19px; min-height: 56px; cursor: pointer; }
#guests li.in { color: var(--muted); }
#guests li.in::after { content: "✓"; color: var(--ok); font-size: 28px; font-weight: 700; }

/* ---------- second round: share, sticky bar, colour picker, organiser cards ---------- */
.linkish { display: inline; width: auto; min-height: 0; padding: 0; border: 0; background: none; color: var(--link); font-weight: 600; text-decoration: underline; }
.host b { color: var(--ink); }
.cta { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); text-decoration: none; border-radius: 18px; padding: 10px 10px 10px 18px; box-shadow: 0 12px 30px rgb(23 18 58 / 0.3); transition: transform 0.25s, opacity 0.25s; }
.cta b { background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 11px 18px; }
.cta.away { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (min-width: 700px) { .cta { display: none; } }
@media (prefers-reduced-motion: reduce) { .cta { transition: none; } }
.event { padding-bottom: 8px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { display: block; position: relative; }
.swatches input { position: absolute; opacity: 0; width: 44px; height: 44px; min-height: 0; margin: 0; cursor: pointer; }
.swatches span { display: block; width: 44px; height: 44px; border-radius: 14px; background: var(--accent); border: 3px solid var(--card); outline: 2px solid var(--line); }
.swatches input:checked + span { outline: 3px solid var(--ink); }
.swatches input:focus-visible + span { outline: 3px solid var(--link); }

.evcard { display: grid; grid-template-columns: 48px 1fr; gap: 6px 12px; align-items: center; padding: 14px; margin: 10px 0; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 16px; }
.evcard .tile { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); display: grid; grid-template-rows: 17px 1fr; overflow: hidden; text-align: center; }
.evcard .tile i { font: 700 10px/17px var(--body); font-style: normal; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent); color: var(--on-accent); }
.evcard .tile b { font: 700 18px/29px var(--display); }
.evcard .what { display: grid; min-width: 0; }
.evcard .what b { font: 700 16px/1.25 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.evcard .nums { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }

#flash { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
#flash button { width: auto; min-height: 44px; padding: 6px 16px; font: 700 16px/1 var(--body); background: #fff; color: #17123a; border-color: #fff; }

/* ---------- third round: a fuller event page ---------- */
.block { margin: 26px 0 0; display: grid; gap: 12px; }
.block h2 { margin: 0; font-size: 16px; }
.block p { margin: 0; }
.rich { display: grid; gap: 12px; overflow-wrap: anywhere; }
.rich p, .rich ul, .rich h3 { margin: 0; }
.rich h3 { font: 700 17px/1.3 var(--body); letter-spacing: 0; }
.rich ul { padding-left: 1.2em; display: grid; gap: 4px; }
.rich li::marker { color: var(--accent); }
.know { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.know li { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 14px; font-size: 15px; }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px -16px 0; padding: 0 16px 6px; }
.gallery img { height: 190px; width: auto; max-width: 86%; flex: none; border-radius: 18px; object-fit: cover; scroll-snap-align: center; }
.map { width: 100%; height: 220px; border: 1.5px solid var(--line); border-radius: 18px; }
.host-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.who { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; overflow-wrap: anywhere; }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 20px/1 var(--display); }
img.avatar { display: block; }
.block .evcard { margin: 0; }

.placebox { position: relative; }
.suggest { list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; left: 0; right: 0; z-index: 4; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgb(23 18 58 / 0.18); }
.suggest button { background: none; border: 0; color: var(--ink); font-weight: 500; text-align: left; min-height: 44px; padding: 8px 10px; border-radius: 10px; }
.suggest button:hover, .suggest button:focus-visible { background: var(--paper); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs label { display: grid; gap: 4px; justify-items: center; font-size: 14px; }
.thumbs img { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; }
.thumbs input { width: 20px; height: 20px; min-height: 0; }
small.answer { color: var(--ink); }

/* ---------- maps: two apps, and a way onto the phone ---------- */
.maplinks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tophone { border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); }
.tophone summary { cursor: pointer; font-weight: 700; padding: 13px 16px; }
.tophone > div { display: grid; gap: 10px; justify-items: center; padding: 4px 16px 16px; text-align: center; }
.tophone img { background: #fff; border-radius: 12px; padding: 6px; }

/* ---------- fourth round: organiser screens ---------- */
body.org main { max-width: 760px; }
body.org h1 { font-size: clamp(22px, 5.6vw, 30px); letter-spacing: -0.03em; }
.bar { align-items: center; padding: 8px 0 14px; border-bottom: 1.5px solid var(--line); margin-bottom: 14px; }
.bar .brand { display: inline-flex; align-items: center; gap: 9px; font: 700 17px/1 var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.bar .brand svg { width: 28px; height: 28px; }
.bar .brand svg rect { fill: #5b4bff; } .bar .brand svg path { fill: var(--sun); }
.bar .me { display: flex; align-items: center; gap: 14px; }
.bar .me a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.bar .me a:first-child { color: var(--ink); font-weight: 600; }
.bar .avatar { width: 30px; height: 30px; font-size: 13px; background: #5b4bff; color: #fff; }
.crumb { display: inline-block; font-size: 15px; text-decoration: none; margin-bottom: 4px; }
.stats .hot { border-color: var(--wait); } .stats .hot b { color: var(--wait); }
.empty { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 28px 18px; border: 2px dashed var(--line); border-radius: 22px; margin: 14px 0; }
.empty .cover.poster { width: 120px; aspect-ratio: 1; padding: 0; place-items: center; align-content: center; border-radius: 26px; }
.empty .cover.poster .day { font-size: 70px; line-height: 1; }
.empty .cover.poster::after { display: none; }
.empty h2, .empty p { margin: 0; } .empty p { color: var(--muted); }
.empty .button { width: auto; padding-inline: 30px; }

.dash-head { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: start; background: var(--card); border: 1px solid var(--line); border-top: 8px solid var(--accent); border-radius: 20px; padding: 16px; }
.dash-head h1 { margin: 0 0 4px; }
.dash-head p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.dash-head .button { width: auto; display: inline-block; min-height: 44px; padding: 8px 16px; }
.thumb { width: 104px; height: 104px; border-radius: 16px; object-fit: cover; display: block; }
.thumb.poster { background: var(--accent); color: var(--on-accent); display: grid; place-content: center; justify-items: center; }
.thumb.poster b { font: 800 44px/0.9 var(--display); letter-spacing: -0.04em; }
.thumb.poster i { font: 700 12px/1.6 var(--body); font-style: normal; text-transform: uppercase; letter-spacing: 0.1em; }
@media (max-width: 420px) { .dash-head { grid-template-columns: 72px 1fr; } .thumb { width: 72px; height: 72px; } .thumb.poster b { font-size: 30px; } }
.progress { position: relative; display: flex; height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 14px 0 0; }
.progress span { background: var(--ok); } .progress .pending { background: var(--wait); opacity: 0.7; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
@media (min-width: 620px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tiles form { display: contents; }
.tile-a { display: grid; gap: 3px; align-content: start; text-align: left; width: 100%; min-height: 84px; padding: 14px 16px; border-radius: 16px; text-decoration: none; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--line); font: inherit; }
.tile-a b { font: 700 16px/1.25 var(--body); } .tile-a small { color: var(--muted); font-weight: 400; }
.tile-a:hover { border-color: var(--ink); }
.tile-a.main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tile-a.main small { color: inherit; opacity: 0.85; }
.tile-a.hot { border-color: var(--wait); } .tile-a.hot small { color: var(--wait); font-weight: 700; }
.shine ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.shine li { padding-left: 28px; position: relative; }
.shine li::before { content: "+"; position: absolute; left: 0; top: -1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #17123a; font-weight: 800; font-size: 15px; }
.sharebox { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.sharebox img { border-radius: 12px; background: #fff; width: 120px; height: 120px; }
.sharebox > div { display: grid; gap: 8px; min-width: 0; }
@media (max-width: 420px) { .sharebox { grid-template-columns: 1fr; } }
.filter { display: grid; gap: 8px; margin: 8px 0; }
.filter .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter .chips button { width: auto; min-height: 36px; padding: 4px 14px; border-radius: 99px; background: transparent; color: var(--muted); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; }
.filter .chips button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.eventform { display: grid; gap: 18px; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 6px 18px 18px; gap: 14px; }
.group > legend { font: 700 15px/1 var(--display); color: var(--ink); letter-spacing: -0.02em; padding: 0 8px; }
.two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.two select { width: 100%; }
.swatches { align-items: center; } .swatches .lab { flex-basis: 100%; font-size: 15px; color: var(--muted); }
.savebar { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 30%); }
.button.inline { display: inline-block; width: auto; min-height: 44px; padding: 8px 16px; }
.sharebtns { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .sharebtns { grid-template-columns: 1.4fr 1fr 1fr; } }

/* promo kit: small previews of each picture */
.kit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
@media (min-width: 620px) { .kit { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kit-item { display: grid; gap: 6px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; text-align: center; }
.kit-item img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: block; }

/* ---------- fifth round: organiser dashboard in two columns, guests, sales picture ---------- */
@media (min-width: 1020px) {
  body.org.wide main { max-width: 1160px; }
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
  .dash-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 2px; }
  .dash-side .kit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-side .sharebtns { grid-template-columns: 1fr; }
}
.dash-side > .card:first-child { margin-top: 0; }
.insight { grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 560px) { .insight { grid-template-columns: 1.2fr 1fr; } }
.insight h2 { font-size: 14px; margin: 0 0 10px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 72px; }
.spark span { flex: 1; min-width: 0; border-radius: 4px 4px 0 0; background: var(--accent); }
.spark span.none { background: var(--line); }
.types { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.types li { display: flex; justify-content: space-between; gap: 12px; }
.guest-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.guest-tools button { width: auto; min-height: 42px; padding: 6px 14px; }
.addguest summary { cursor: pointer; font-weight: 700; }
.addguest form { display: grid; gap: 12px; margin-top: 12px; }
.list.guests li { display: block; padding: 0; }
.list.guests details > summary { list-style: none; cursor: pointer; padding: 12px 26px 12px 0; position: relative; overflow-wrap: anywhere; }
.list.guests details > summary::-webkit-details-marker { display: none; }
.list.guests details > summary::after { content: "›"; position: absolute; right: 6px; top: 12px; font-size: 22px; color: var(--muted); transition: transform 0.2s; }
.list.guests details[open] > summary::after { transform: rotate(90deg); }
.tix { list-style: none; margin: 0; padding: 0 0 8px; display: grid; gap: 6px; font-size: 15px; }
.tix li { display: flex; gap: 8px; align-items: center; border: 0; padding: 0; justify-content: flex-start; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; }
.row-actions button, .row-actions .button { width: auto; min-height: 42px; padding: 6px 14px; }
.type { grid-template-columns: 1.3fr 1fr 1fr 44px; align-items: end; }
.type .rm { min-height: 48px; padding: 0; font-size: 22px; line-height: 1; }
.type:only-child .rm { visibility: hidden; }

/* ---------- fees and statements ---------- */
.invoice .amount { font-size: 15px; display: flex; align-items: center; gap: 12px; }
.invoice .amount b { font: 700 34px/1 var(--display); letter-spacing: -0.03em; }
.lines { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.lines th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 8px 6px; border-bottom: 1.5px solid var(--line); }
.lines td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.lines td:last-child, .lines th:last-child { text-align: right; white-space: nowrap; }
.lines tfoot td { font-weight: 700; border-bottom: 0; }
.bar .me { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
@media print { .bar, .crumb, .langs, .noprint, .copy button { display: none !important; } body { background: #fff; } }

/* ---------- sixth round: organiser home and tools ---------- */
.today { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin: 4px 0 14px; border-radius: 20px; background: var(--accent); color: var(--on-accent); }
.today span { display: grid; gap: 2px; min-width: 0; }
.today small { color: inherit; opacity: 0.9; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }
.today b { font: 700 20px/1.2 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.today .button { width: auto; padding-inline: 22px; background: var(--paper); border-color: var(--paper); color: var(--ink); }
.evcard > img.tile { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; border: 0; display: block; }
.evcard a.what { text-decoration: none; color: inherit; }
.evcard .quick { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.evcard .quick a, .evcard .quick .linkish { color: var(--link); font-weight: 600; text-decoration: none; font-size: 14px; }
.evcard a.badge { text-decoration: none; }
.empty > a:not(.button) { font-size: 15px; }
.stats a { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.stats a:hover { border-color: var(--ink); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.feed li { display: flex; justify-content: space-between; gap: 12px; padding-left: 16px; position: relative; }
.feed li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.feed li.actConfirmed::before, .feed li.actArrived::before { background: var(--ok); }
.feed small { white-space: nowrap; }
.guest-edit { display: grid; gap: 8px; padding-bottom: 10px; }
.guest-edit .tk-row { display: flex; align-items: center; gap: 8px; }
.guest-edit .tk-row input { flex: 1; }
.guest-edit button { width: auto; justify-self: start; min-height: 42px; padding: 6px 14px; }

/* ---------- tiers, wristbands, gifts ---------- */
.tt.banded { border-left: 8px solid var(--band); }
.band-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); display: inline-block; }
#guests li { justify-content: flex-start; }
#guests li span { flex: 1; }
.band-flash { font: 700 16px/1 var(--body); padding: 8px 14px; border-radius: 99px; border: 2px solid #fff; }
#bytype { margin: 0; }
#giftfields { background: var(--paper); }
.type { grid-template-columns: 1.3fr 1fr 1fr 44px; }
.type .desc { grid-column: 1 / 3; } .type .band { grid-column: 3 / -1; }
.type .band select { width: 100%; }
.type + .type { border-top: 1.5px dashed var(--line); padding-top: 12px; margin-top: 4px; }

/* early-bird price on a ticket-type row; struck-through full price; pass a ticket; promo note */
.type .early { grid-column: 1 / 3; } .type .early-until { grid-column: 3 / -1; min-width: 0; }
.type .early-until input { width: 100%; min-width: 0; }
s { color: var(--muted); font-weight: 400; }
.pass { margin: -4px 0 14px; } .pass summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 0; }
.pass form { display: grid; gap: 10px; margin-top: 8px; }
#promonote.ok { color: var(--ok); } #promonote.bad { color: var(--bad); }
/* the ticket-type row fits a 320px phone: tracks may shrink below their longest word */
.type { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 44px; }
.type label { min-width: 0; overflow-wrap: anywhere; } .type input, .type select { min-width: 0; width: 100%; }

/* getting paid: one card per payment method, its state beside the name */
.paymethods { display: grid; gap: 14px; margin-bottom: 14px; }
.paymethods .card { margin: 0; }
.org .card h2 .badge { vertical-align: middle; margin-left: 6px; font: 700 12px/1 var(--body); letter-spacing: 0; }

/* the payment page: the amount, then the ways to pay as a row of choices, then the chosen one's details */
.pay h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pay h2 .amount { font: 700 22px/1 var(--display); letter-spacing: -0.02em; }
.payways { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.payways button { display: grid; gap: 4px; text-align: left; min-height: 0; padding: 12px 14px; background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: 14px; font-weight: 400; }
.payways button b { font: 700 16px/1.2 var(--body); }
.payways button small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.payways button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.buy .ways { text-align: center; margin: -4px 0 0; }

.wallet { margin: -6px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; } .wallet .button { width: auto; display: inline-block; padding: 10px 18px; min-height: 0; }

/* a receipt prints as itself: no buttons, no language links */
.receipt .copy { padding: 6px 0; } .receipt .copy b { font-family: var(--body); font-size: 16px; }
@media print { .noprint, .langs, nav.bar { display: none !important; } body { background: #fff; } }

/* Tables of figures (admin). Words read left-aligned, amounts and counts right-aligned (class n, or
   every column but the first in a "nums" table). A card holding a table scrolls sideways on a phone
   instead of spilling out of its frame. */
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain th, table.plain td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; padding-top: 4px; }
table.plain tr:last-child td { border-bottom: 0; }
table.plain td:first-child, table.plain th:first-child { padding-left: 0; }
table.plain td:last-child, table.plain th:last-child { padding-right: 0; }
table.plain .n, table.plain.nums td:not(:first-child), table.plain.nums th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.plain td small { color: var(--muted); }
table.plain td:first-child { white-space: nowrap; }
.card:has(> table.plain) { overflow-x: auto; }
@media (max-width: 700px) { table.plain td { white-space: nowrap; } }

/* Admin: tabs, figures in one row, and two columns on a wide screen. */
.tabs { display: flex; justify-content: flex-start; gap: 6px; margin: 4px 0 14px; padding: 0; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.admin-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.admin-cols { display: grid; gap: 0 18px; }
.admin-cols > div > .card:first-child { margin-top: 0; }
@media (min-width: 1000px) { .admin-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.staff-add { display: grid; gap: 10px; align-items: end; }
@media (min-width: 560px) { .staff-add { grid-template-columns: minmax(0, 1fr) 130px auto; } }
.staff-add button { width: auto; min-height: 48px; padding: 8px 18px; font-size: 15px; }
button.fit { width: auto; justify-self: start; padding: 8px 18px; min-height: 42px; font-size: 15px; }
/* A form inside a card stacks its fields with the same gap as the card, so a button never sits
   flush against the box above it. (Row forms, .copy and .staff-add, lay out their own children.) */
.card form:not(.copy):not(.staff-add) { display: grid; gap: 10px; }
.types li small { color: var(--muted); }

/* The saved photo beside the field that replaces it. */
.photo-field { display: flex; align-items: center; gap: 14px; }
.photo-field .avatar { flex: 0 0 auto; }

/* On a phone the account links sit in one row under the brand instead of wrapping into three lines. */
@media (max-width: 560px) {
  .bar { flex-wrap: wrap; row-gap: 10px; }
  .bar .me { width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; gap: 16px; font-size: 15px; scrollbar-width: none; }
  .bar .me a { white-space: nowrap; }
}

/* Copy rows: a long text keeps its Copy button at the top beside it and scrolls inside a short box;
   a link reads at text size instead of large code type. */
.copy:has(> .pre) { align-items: flex-start; }
.copy > .pre { max-height: 190px; overflow-y: auto; padding-right: 4px; }
.copy > span > b { font-size: 16px; overflow-wrap: anywhere; }
/* Code to paste into a website: small monospace, so it reads as code and not as words to edit. */
.copy > .pre.code { font: 12.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.copy > .pre.code small { font-family: var(--body); }
.sitebtn { display: grid; gap: 8px; justify-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.sitebtn small { color: var(--muted); font-size: 13px; }
.sitebtn label { width: 100%; }
