/* Frames, borders, focus rings and chevrons use the skin's light button blue, not green (Micha 26 Oct 11:38); green stays only where it means status. */
:root { --ds-frame: var(--ds-btn-strong, #0098D7); }
/* Manager styles: Main's palette (zinc + emerald), landscape-first layout (two columns on tablet landscape/desktop, one column on tablet portrait, a note instead of the app on phones), 44 px touch targets, 100dvh and safe-area insets. */
:root {
  --zinc-200: #e4e4e7; --zinc-300: #d4d4d8; --zinc-400: #a1a1aa; --zinc-500: #71717a; --zinc-700: #3f3f46; --zinc-800: #27272a; --zinc-900: #18181b; --zinc-950: #09090b;
  --emerald-300: #6ee7b7; --emerald-400: #34d399; --emerald-600: #059669; --emerald-700: #047857;
  --red: #f87171; --red-bg: rgba(248, 113, 113, 0.12); --amber: #fbbf24; --amber-bg: rgba(251, 191, 36, 0.12); --blue: #60a5fa;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100dvh; background: var(--zinc-950); color: #fff; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; -webkit-tap-highlight-color: transparent; }
a { color: var(--emerald-300); }
h1 { margin: 0.2rem 0; font-size: 1.6rem; }
h2 { margin: 0 0 0.4rem; font-size: 1.15rem; display: flex; align-items: center; gap: 0.5rem; }
h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.muted { color: var(--zinc-400); }
.small { font-size: 0.85rem; }
.grow { flex: 1; }
.right { display: flex; justify-content: flex-end; }
[hidden] { display: none !important; }

/* ----- phone note vs app ----- */
.phone-note { display: none; }
@media (max-width: 699px), (orientation: landscape) and (max-height: 500px) {
  .phone-note { display: flex; min-height: 100dvh; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); text-align: center; }
  .phone-note .panel { max-width: 360px; }
  .phone-logo { width: 7rem; }
  .app { display: none !important; }
  .org-gate { display: none !important; }
  #toasts { display: none; }
}

/* ----- chrome: org strip above the menu (t1107u). Sticky as one piece so the session org stays on screen. ----- */
.app-chrome { position: sticky; top: 0; z-index: 10; }
.org-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.85rem; min-height: 44px; padding: max(6px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left)); background: var(--zinc-900); border-bottom: 1px solid var(--zinc-700); }
.app-name { flex: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.session-org { min-width: 0; flex: 1; font-weight: 700; font-size: 1.15rem; line-height: 1.3; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1rem; padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); background: rgba(9, 9, 11, 0.95); border-bottom: 1px solid var(--zinc-800); backdrop-filter: blur(6px); }
.ctx-kicker { font-weight: 800; white-space: nowrap; line-height: 1; }
/* Org: labels the organization pages. The label and every item in that section are amber. Nothing here changes the session organization. No event chooser on this row (t1175u). */
.org-menu { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem 0.35rem; flex: 1 1 auto; min-width: 0; color: var(--amber); }
.org-menu .ctx-kicker { display: inline-flex; align-items: center; min-height: 44px; color: var(--amber); cursor: default; }
.org-menu .mainnav { flex: 1 1 auto; flex-wrap: wrap; }
.org-menu .mainnav a,
.org-menu .mainnav a.on { color: var(--amber); }
.org-menu .mainnav a.on,
.org-menu .mainnav a:hover { background: var(--amber-bg); }
.org-menu .mainnav a:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mainnav { display: flex; flex: 1 0 auto; gap: 0.25rem; min-width: 0; }
.mainnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem; border-radius: 0.6rem; color: var(--zinc-300); text-decoration: none; font-weight: 600; white-space: nowrap; }
.mainnav a.on { background: var(--zinc-800); color: #fff; }
.org-strip .top-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 0.5rem; }
/* Event edit: Back to Org is the middle of this header line. The name stays on the left and the tools stay on the right (t1184u). */
.org-strip.has-back { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 0.75rem; }
.org-strip.has-back .strip-left { display: flex; align-items: center; gap: 0.85rem; min-width: 0; overflow: hidden; }
.org-strip.has-back .session-org { flex: 1 1 auto; }
.org-strip.has-back .top-right { margin-left: 0; justify-self: end; justify-content: flex-end; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.back-to-org { justify-self: center; }
.env-banner, .ro-banner { margin: 0.75rem auto 0; max-width: 1100px; padding: 0.7rem 1rem; border-radius: 0.75rem; background: var(--amber-bg); border: 1px solid var(--amber); color: var(--amber); font-weight: 600; }
.ro-banner { margin: 0 0 0.75rem; }

/* ----- page ----- */
.page { max-width: 1100px; margin: 0 auto; padding: 1rem max(16px, env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.page-head p { margin: 0.2rem 0 0; }
/* Buttons stay on the bottom of the title block, as on Org Events. A wrapped button row must not push the h1 down. Event edit headers keep their own alignment. */
.page-head:not(:has(.event-chrome)) > :not(:first-child) { align-self: flex-end; }
.page-head-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.title-block { min-width: 0; }
.page-head:has(.event-chrome) { align-items: flex-start; }
.event-chrome { min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.event-chrome .chrome-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.55rem; margin: 0; min-width: 0; }
/* Event edit header (and the wizard, which uses the same title block): Event No and Title on one line. The side panel stays stacked. */
.page-head .event-chrome { flex-direction: row; flex-wrap: nowrap; align-items: baseline; column-gap: 1.5rem; }
.page-head .event-chrome .chrome-line { align-items: baseline; }
.page-head .event-chrome .chrome-line:last-child { flex: 1 1 auto; }
.chrome-label { font-weight: 700; color: var(--zinc-200); }
.chrome-no { font-weight: 800; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.chrome-title { font-weight: 700; font-size: 1.35rem; line-height: 1.3; overflow-wrap: anywhere; }
.side .event-chrome { margin-bottom: 0.45rem; }
.side .chrome-title { font-size: 1.05rem; }
.panel { background: var(--zinc-900); border: 1px solid var(--zinc-800); border-radius: 1rem; padding: 1rem 1.1rem; margin-bottom: 0.9rem; }
.panel > .muted:first-of-type { margin-top: 0; }
.sub-panel { border: 1px solid var(--zinc-700); border-radius: 0.8rem; padding: 0.8rem; margin: 0.6rem 0; background: var(--zinc-950); }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.sub-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem; }

/* two columns on tablet landscape / desktop: forms (max ~720) + side panel */
.layout2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 680px; margin: 0 auto; }
.layout2 .side { order: -1; }
@media (min-width: 900px) and (min-height: 501px) and (orientation: landscape) {
  .layout2 { grid-template-columns: minmax(0, 720px) minmax(260px, 1fr); max-width: none; align-items: start; }
  .layout2 .side { order: 0; position: sticky; top: 12rem; } /* below the org strip and the org menu */
}
.side-graphic { width: 100%; max-height: 140px; object-fit: cover; border-radius: 0.6rem; margin-bottom: 0.6rem; }
@media not ((min-width: 900px) and (min-height: 501px) and (orientation: landscape)) {
  .side .side-graphic { display: none; }
  .side .facts { grid-template-columns: auto 1fr auto 1fr; }
}

/* ----- forms ----- */
.field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0.6rem 0; min-width: 0; }
.label { font-size: 0.85rem; font-weight: 700; color: var(--zinc-300); }
.hint { font-size: 0.8rem; color: var(--zinc-500); }
.error { font-size: 0.85rem; color: var(--red); min-height: 0; }
.error:empty { display: none; }
input[type='text'], input[type='url'], input[type='number'], input[type='datetime-local'], input[type='password'], select, textarea {
  width: 100%; min-height: 44px; padding: 0.55rem 0.7rem; border-radius: 0.6rem; border: 1px solid var(--zinc-700); background: var(--zinc-950); color: #fff; font: inherit; color-scheme: dark;
}
textarea { resize: vertical; }
/* placeholders are examples, never look like a typed value (Micha 25 Oct, t413u) */
input::placeholder, textarea::placeholder { color: var(--zinc-500); opacity: 1; font-style: italic; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ds-frame); outline-offset: 1px; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.6; }
.invalid { border-color: var(--red) !important; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
input[type='checkbox'] { width: 22px; height: 22px; accent-color: var(--emerald-600); flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 44px; padding: 0 1.1rem; border-radius: 0.7rem; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; color: #fff; white-space: nowrap; }
.btn.small { min-height: 44px; padding: 0 0.8rem; font-size: 0.9rem; }
.btn.big { min-height: 56px; padding: 0 1.6rem; font-size: 1.1rem; }
.btn.primary { background: var(--emerald-700); border-color: var(--emerald-600); }
/* Button colour rule (Micha 26 Oct 11:40): green/red only for actions that change data; navigation, open, view, pickers, toggles and tabs are blue. */
.btn.blue { background: var(--ds-btn-fade, linear-gradient(#4CC5F7, #0098D7)); border-color: var(--ds-frame); color: #fff; } /* non-data action buttons (Micha 26 Oct 11:42: clickable text only for navigation) */
summary.btn { list-style: none; display: inline-flex; width: auto; cursor: pointer; }
summary.btn::-webkit-details-marker { display: none; }
.btn.primary.nav { background: var(--ds-btn-fade, linear-gradient(#4CC5F7, #0098D7)); border-color: var(--ds-frame); color: #fff; }
.btn.primary.nav:active { background: var(--ds-btn-deeper, #00638C); }

.btn.primary:active { transform: scale(0.98); }
.btn.secondary { background: var(--zinc-800); border-color: var(--zinc-700); }
.btn.ghost { background: transparent; color: var(--zinc-300); }
.btn.ghost:hover { background: var(--zinc-800); }
.btn.danger { color: var(--red); }
.btn.red { background: #dc2626; border-color: #b91c1c; color: #fff; } /* destructive action you can take (Micha 26 Oct 12:04) */
.btn.red:active { background: #b91c1c; }
.row-btns.voucher-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.row-btns.voucher-btns .btn { flex: 0 0 12rem; } /* Edit note and Delete vouchers: same width, side by side */
.btn[disabled], .btn.disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--ds-frame); outline-offset: 2px; }
.file-btn { position: relative; }
/* the invisible file input covers the whole button incl. its 2 px border: 44 px tap target, not 40 (deep test 22 Oct, iPad portrait) */
.file-btn input { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); opacity: 0; cursor: pointer; }

.image-field { display: flex; align-items: center; gap: 0.8rem; }
.image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.thumb { width: 88px; height: 66px; object-fit: cover; border-radius: 0.5rem; border: 1px solid var(--zinc-700); background: var(--zinc-950); flex: none; }
.thumb.empty { display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--zinc-500); }

.choice-list, .game-list, .prize-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ts-add { margin: 0.2rem 0 0.6rem; }
.ts-add-line { display: flex; gap: 0.6rem; align-items: flex-end; }
.ts-add-line .field { flex: 1; margin: 0; }
.ts-add .hint { margin: 0.3rem 0 0; }
.choice { display: flex; align-items: center; gap: 0.7rem; min-height: 48px; padding: 0.4rem 0.7rem; border-radius: 0.7rem; border: 1px solid var(--zinc-700); background: var(--zinc-950); cursor: pointer; }
.choice.on, .prize-row.on .choice { border-color: var(--ds-frame); }
.game-row, .prize-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.game-row .max, .prize-row .max { display: flex; flex-direction: column; width: 8.5rem; }
.prize-row .choice { cursor: default; }
.prize-row .prize-extra { flex: 1 0 100%; margin: 0; }
.prize-add { max-width: 32rem; }
.prize-add .field { margin-top: 0.2rem; }
.tag { margin-left: auto; font-size: 0.75rem; color: var(--zinc-400); border: 1px solid var(--zinc-700); border-radius: 999px; padding: 0.1rem 0.5rem; }
.icon-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.icon-sm.ph { display: inline-flex; align-items: center; justify-content: center; background: var(--zinc-800); font-weight: 800; }
details.inline-new { margin-top: 0.8rem; border-top: 1px dashed var(--zinc-700); padding-top: 0.6rem; }
details.inline-new summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--emerald-300); }
.warn-box { background: var(--amber-bg); border: 1px solid var(--amber); color: var(--amber); border-radius: 0.6rem; padding: 0.6rem 0.8rem; }
.confirm-mask { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.65); }
.confirm-card { width: min(28rem, 100%); background: var(--zinc-900); border: 1px solid var(--zinc-700); border-radius: 1rem; padding: 1.1rem 1.2rem; }
.confirm-card p { margin: 0 0 1rem; font-weight: 700; }
.confirm-card .confirm-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }

/* banner preview (M9) */
.banner-preview { position: relative; overflow: hidden; height: 64px; border-radius: 0.6rem; background: linear-gradient(90deg, #0b3b2e, #065f46); border: 1px solid var(--emerald-600); display: flex; align-items: center; }
.bp-inner { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.9rem; white-space: nowrap; font-weight: 800; font-size: 1.1rem; }
.bp-inner img { height: 48px; border-radius: 0.3rem; }
.type-scroll .bp-inner, .type-text_scroll .bp-inner { animation: bp-scroll 8s linear infinite; }
.type-blink .bp-inner { animation: bp-blink 1s steps(2, start) infinite; }
.bp-timer { position: absolute; right: 0.5rem; top: 0.3rem; font-size: 0.7rem; color: var(--emerald-300); }
/* button chip of a picture, text and button banner (blue like the phones' default skin) */
.bp-btn { flex: none; padding: 0.2rem 0.7rem; border-radius: 0.45rem; background: linear-gradient(#4CC5F7, #0098D7); color: #fff; font-size: 0.85rem; text-transform: uppercase; }
.banner-preview.has-btn .bp-inner { animation: none; flex: 1; min-width: 0; } /* stands still on the phones */
.banner-preview.has-btn .bp-inner img { flex: none; max-width: 35%; object-fit: contain; }
.banner-preview.has-btn .bp-btn { min-width: 0; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* a small preview may shorten the button text; the full text is listed under it */
.banner-preview.has-btn .bp-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Poll checks: white squares, fixed signal green and red (never themed). */
.bp-poll { display: inline-flex; gap: 0.35rem; flex: none; }
.bp-yes, .bp-no { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; background: #fff; font-weight: 800; }
.bp-yes { color: #22c55e; }
.bp-no { color: #ef4444; }
.banner-preview.has-poll .bp-inner { animation: none; flex: 1; min-width: 0; }
@keyframes bp-scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
@keyframes bp-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .bp-inner { animation: none !important; } }

.qr-wrap { display: flex; gap: 1rem; align-items: flex-start; }
.qr { width: 150px; height: 150px; border-radius: 0.6rem; background: #fff; flex: none; }
.qr.empty { display: inline-flex; align-items: center; justify-content: center; background: var(--zinc-950); border: 1px dashed var(--zinc-700); color: var(--zinc-500); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.8rem; margin: 0.6rem 0; font-size: 0.9rem; }
.facts dt { color: var(--zinc-400); }
.facts dd { margin: 0; }

/* stepper */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.35rem; padding: 0; margin: 0 0 1rem; }
.stepper li > * { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-height: 56px; padding: 0.35rem 0.2rem; border-radius: 0.7rem; text-decoration: none; color: var(--zinc-400); text-align: center; font-size: 0.78rem; }
.stepper .num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--zinc-800); color: var(--zinc-300); font-weight: 800; }
.stepper li.done .num { background: var(--emerald-700); color: #fff; }
.stepper li.current > * { background: var(--zinc-900); color: #fff; outline: 2px solid var(--ds-frame); }
.stepper li.current .num { background: var(--emerald-400); color: var(--zinc-950); }
.stepper li.todo { opacity: 0.55; }
.stepper a:hover { background: var(--zinc-900); }
@media (max-width: 899px), (orientation: portrait) { .stepper .sname { font-size: 0.7rem; } }
.wizard-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.8rem 0; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--zinc-950) 30%); padding-bottom: max(0.8rem, env(safe-area-inset-bottom)); }
.wizard-foot > div { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* tabs */
.tabs { display: flex; gap: 0.3rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: 2px; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem; border-radius: 0.7rem; background: var(--zinc-900); border: 1px solid var(--zinc-800); color: var(--zinc-300); text-decoration: none; font-weight: 600; white-space: nowrap; }
.tabs a.on { background: var(--ds-frame); border-color: var(--ds-frame); color: #fff; }

/* review */
.summary { display: flex; flex-direction: column; gap: 0.4rem; }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--zinc-800); }
.sum-title { display: block; font-size: 0.8rem; color: var(--zinc-400); font-weight: 700; }
.sum-val { display: block; }
.issues { margin: 0.8rem 0; }
.issue { margin: 0.35rem 0; padding: 0.5rem 0.7rem; border-radius: 0.6rem; }
.issue.block { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
.issue.warn { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.5); }
.issue.ok { background: rgba(52, 211, 153, 0.12); color: var(--emerald-300); border: 1px solid var(--emerald-600); }
.issue a { color: inherit; font-weight: 700; }
.ready-action { display: flex; justify-content: flex-end; }
.ready-stack { display: flex; flex-direction: column; align-items: stretch; gap: 0.75rem; width: 100%; }
.ready-box { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; color: var(--emerald-300); }

/* badges */
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--zinc-800); color: var(--zinc-300); }
.badge.ready { background: rgba(52, 211, 153, 0.15); color: var(--emerald-300); }
.badge.authorised { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
.badge.draft { background: var(--amber-bg); color: var(--amber); }
.badge.active { background: rgba(96, 165, 250, 0.15); color: var(--blue); }

/* home */
.ev-group { margin-bottom: 1.2rem; }
.ev-group h2 .count { font-size: 0.8rem; background: var(--zinc-800); border-radius: 999px; padding: 0.1rem 0.5rem; color: var(--zinc-300); }
.ev-group > p { margin: 0 0 0.6rem; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.8rem; }
@media (min-width: 900px) and (orientation: landscape) { .ev-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1300px) and (orientation: landscape) { .ev-grid { grid-template-columns: repeat(3, 1fr); } }
.ev-card { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; gap: 0.4rem 0.8rem; padding: 0.8rem; border-radius: 1rem; background: var(--zinc-900); border: 1px solid var(--zinc-800); }
.ev-graphic { width: 72px; height: 72px; object-fit: cover; border-radius: 0.7rem; }
.ev-graphic.ph { display: flex; align-items: center; justify-content: center; background: var(--zinc-800); font-size: 1.6rem; font-weight: 800; color: var(--zinc-400); }
.ev-body h3 { margin: 0; }
.ev-body p { margin: 0.2rem 0; }
.ev-actions { grid-column: 1 / -1; display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.empty { margin: 0; }

.org-list { display: grid; grid-template-columns: 1fr; gap: 0; max-width: 720px; }
@media (min-width: 900px) and (orientation: landscape) { .org-list { grid-template-columns: 1fr 1fr; gap: 0 1rem; max-width: none; } }
.org-row.new { border-style: dashed; }
.org-row .right { gap: 0.4rem; flex-wrap: wrap; }
.page-head-actions .btn[aria-pressed="true"] { border-color: var(--ds-frame); color: var(--emerald-300); }

#toasts { position: fixed; z-index: 50; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 0.4rem; width: min(92vw, 520px); }
.toast { padding: 0.75rem 1rem; border-radius: 0.7rem; background: var(--emerald-700); color: #fff; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.toast.err { background: #7f1d1d; border: 1px solid var(--red); }
.loading { padding: 2rem; text-align: center; }
.top-right .org { white-space: nowrap; }
button.org-switch { background: none; border: 0; color: var(--zinc-400); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 0 0.15rem; min-height: 44px; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-underline-offset: 3px; }
button.org-switch:hover { color: #fff; }
button.org-switch:focus-visible { outline: 2px solid var(--ds-frame); outline-offset: 2px; }
/* organization picker after login (and "switch organization" on a wide screen) */
.org-gate { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: rgba(9, 9, 11, 0.86); }
.org-gate-card { width: min(440px, 100%); max-height: min(640px, 100%); display: flex; flex-direction: column; margin: 0; }
.org-gate-card h1 { font-size: 1.35rem; }
.org-gate-card .lang-pick { align-self: flex-start; margin: 0.2rem 0 0.2rem; }
.org-options { overflow: auto; display: flex; flex-direction: column; gap: 0.45rem; margin: 0.6rem 0; min-height: 0; }
.org-option { display: flex; align-items: center; gap: 0.7rem; min-height: 48px; padding: 0.45rem 0.75rem; border: 2px solid var(--zinc-700); border-radius: 0.75rem; background: var(--zinc-950); cursor: pointer; }
.org-option:has(input:checked) { border-color: var(--ds-frame); background: rgba(5, 150, 105, 0.15); }
.org-option:focus-within { outline: 2px solid var(--ds-frame); outline-offset: 1px; }
.org-option input { width: 22px; height: 22px; accent-color: var(--emerald-600); flex: none; }
.org-gate .org-actions { display: flex; flex-direction: column; gap: 0.4rem; }
.org-gate .btn.primary { width: 100%; }
@media (max-width: 999px) { .top-right .org { display: none; } .topbar { gap: 0.5rem; } .mainnav a { padding: 0 0.55rem; } } /* nav items; org name stays in the strip above; switch hidden on narrow */
/* ----- Questions (AI): topic chips, status, preview ----- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { display: inline-flex; align-items: center; gap: 0.2rem; border: 1px solid var(--emerald-600); border-radius: 999px; padding: 0.15rem 0.3rem 0.15rem 0.6rem; background: var(--zinc-950); }
.chip input { border: 0; min-height: 44px; width: 13rem; padding: 0.3rem; background: transparent; }
.chip-x { min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: var(--zinc-800); color: #fff; font-size: 1.2rem; cursor: pointer; }
.chip-x:disabled { opacity: 0.4; cursor: default; }
.gen-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.5rem 0; }
.static { min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.qstatus { font-weight: 700; border-radius: 999px; padding: 0.2rem 0.7rem; border: 1px solid var(--zinc-700); }
.qstatus.ready { color: var(--emerald-300); border-color: var(--emerald-600); }
.qstatus.generating, .qstatus.checking { color: var(--blue); border-color: var(--blue); }
.qstatus.failed { color: var(--red); border-color: var(--red); }
.q-part h3 { margin: 0.6rem 0 0.2rem; font-size: 1rem; }
.q-part ul { margin: 0.2rem 0 0.4rem 1.1rem; padding: 0; }
.ok-line { color: var(--emerald-300); }
.sub-panel h3 { margin: 0 0 0.4rem; font-size: 1rem; }

/* home: "Show" filter above the event cards (44 px select, native picker on iPad) */
.ev-filter { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; }
.ev-filter .label { font-size: 0.9rem; }
.ev-filter select { width: auto; min-width: 18rem; max-width: 100%; min-height: 44px; }
.ev-filter .list-stamp { margin-left: auto; font-variant-numeric: tabular-nums; }
.ev-empty p { margin: 0 0 0.4rem; }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
/* ----- Banners page (org core banners): list rows with preview, edit form ----- */
.bn-list { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 900px) and (orientation: landscape) { .bn-list { grid-template-columns: 1fr 1fr; gap: 0 1rem; max-width: none; } }
.bn-row { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.bn-body h3 { margin: 0; overflow-wrap: anywhere; }
.bn-body p { margin: 0.2rem 0; overflow-wrap: anywhere; }
.bn-body .tag { margin-left: 0; }
.bn-actions { display: flex; gap: 0.4rem; justify-content: flex-end; flex-wrap: wrap; }
.bn-prev .banner-preview { height: 56px; }
.bn-prev .bp-inner img { height: 42px; }
.bn-edit { max-width: 720px; }
.bn-kinds { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.bn-kinds .choice { flex: 1; min-width: 9rem; }
.bn-kinds input[type='radio'] { width: 22px; height: 22px; accent-color: var(--emerald-600); flex: none; }
.bn-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding-bottom: max(0.8rem, env(safe-area-inset-bottom)); }
.bn-foot > div { display: flex; gap: 0.5rem; }
.issue .iu-head { margin: 0 0 0.3rem; font-weight: 700; }
.issue ul { margin: 0.2rem 0 0.4rem 1.2rem; padding: 0; }
.preview-slot code, .bn-edit code { overflow-wrap: anywhere; }
.bn-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
/* one-step picture banner upload (#/org/banners/upload): a big drop zone, the whole zone is the tap target */
.bu-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; min-height: 180px; padding: 1.2rem; border: 2px dashed var(--zinc-600); border-radius: 0.9rem; background: var(--zinc-950); text-align: center; cursor: pointer; }
.bu-drop.over, .bu-drop:focus-within { border-color: var(--ds-frame); }
.bu-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bu-big { font-size: 1.15rem; font-weight: 700; }
.bu-details[hidden], .bu-drop[hidden] { display: none; }
/* a refused upload on the upload screen: same black box, red border and yellow text as the other Manager errors (rule below) */
.upload-reject:empty { display: none; }
.upload-reject:not(:empty) { display: block; margin-top: 0.4rem; padding: 0.35rem 0.6rem; border-radius: 0.5rem; font-weight: 600; }

/* V.XY deploy version badge (shared/version.js): small and muted; tap shows release, commit and deploy time */
.ver-badge { background: none; border: 0; padding: 2px 4px; color: var(--zinc-500, #71717a); font: 500 0.72rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.02em; cursor: pointer; white-space: nowrap; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
.ver-badge:hover, .ver-badge:focus-visible { color: var(--zinc-300, #d4d4d8); }
/* US-M32: event note on the card / side panel (plain text, kept line breaks) */
.ev-note { margin-top: 0.35rem; display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.ev-note-text { margin: 0; font-size: 0.9rem; color: var(--zinc-200); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7.5em; overflow: auto; }
.ev-note-title { font-weight: 700; color: var(--zinc-400); }
.ev-note textarea { min-height: 5.5rem; }
.ev-note-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; flex-wrap: wrap; }
.ev-note-btns { display: flex; gap: 0.4rem; }
.ev-note .hint.warn { color: var(--amber-400, #fbbf24); }
.ev-note .link-btn { min-height: 44px; }
.ev-note button.link-btn { background: none; border: 0; padding: 0; color: var(--emerald-400); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.ev-note button.link-btn:focus-visible { outline: 2px solid var(--ds-frame); outline-offset: 2px; }

/* ----- Ready to be authorized box (readiness.js) ----- */
.readiness .ready-btn-row { margin: 0.5rem 0; }
.readiness .ready-btn-row .btn { width: 100%; }
.ready-out.busy { opacity: 0.5; }
.ready-text { margin-top: 0.6rem; }
.ready-first { margin: 0.2rem 0 0.5rem; padding: 0.5rem 0.7rem; border-radius: 0.6rem; font-weight: 700; }
.ready-first.ok { background: rgba(52, 211, 153, 0.12); color: var(--emerald-300); border: 1px solid var(--emerald-600); }
.ready-first.block { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
.ready-sub { margin: 0.7rem 0 0.2rem; font-weight: 700; color: var(--amber); font-size: 0.9rem; }
.ready-sub.must { color: var(--red); }
.ready-list { margin: 0.2rem 0; padding-left: 1.1rem; }
.ready-list li { margin: 0.35rem 0; line-height: 1.35; font-size: 0.92rem; }
.ready-list li.block::marker { color: var(--red); }
.ready-list li.warn::marker { color: var(--amber); }
.ready-link { display: inline-flex; align-items: center; min-height: 32px; margin-left: 0.4rem; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.ready-more .ready-link { margin-left: 0; margin-right: 0.6rem; }
.ready-meta { margin: 0.6rem 0 0; padding-bottom: 0.2rem; line-height: 1.6; display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem; } /* Micha 25 Oct: the label was cut at the bottom */
.ai-tag { display: inline-block; white-space: nowrap; line-height: 1.4; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.ai-tag.ai { background: rgba(96, 165, 250, 0.15); color: var(--blue); border: 1px solid rgba(96, 165, 250, 0.5); }
.ai-tag.noai { background: var(--zinc-800); color: var(--zinc-300); border: 1px solid var(--zinc-700); }
/* with the readiness note the side column can be taller than the screen: let it scroll with the page instead of sticking */
.layout2 .side:has(.readiness), .layout2 .side.has-readiness { position: static; } /* class too: browsers without :has kept the column sticky and cut its bottom (the AI label) */

/* ----- 22 Oct manual test, item 10 ----- */
/* 10e: every error / warning message is a black box with a red border and yellow text (they looked green like the buttons) */
.toast.err, .warn-box, .issue.block, .issue.warn, .error:not(:empty), .upload-reject:not(:empty) { background: #000; border: 2px solid #ef4444; color: #facc15; }
.error:not(:empty) { display: block; margin-top: 0.3rem; padding: 0.35rem 0.6rem; border-radius: 0.5rem; font-weight: 600; }
.issue.block a, .issue.warn a { color: #facc15; }
/* 10c: Next / Save draft & next while saving */
.btn[aria-busy=true] { opacity: 0.75; cursor: progress; }
/* 10d: the Grand Prize gets its own section look, so it does not read as part of the prize list */
.panel.gp-section { border: 1px solid var(--amber); }
.panel.gp-section > h2 { color: var(--amber); }

/* EN / DE language picker in the top bar (22 Oct, Manager EN + DE): two small toggle buttons, the active one filled. */
.lang-pick { display: inline-flex; border: 1px solid var(--zinc-700); border-radius: 999px; overflow: hidden; flex: none; }
.lang-btn { min-width: 44px; min-height: 44px; padding: 0 0.7rem; border: 0; background: transparent; color: var(--zinc-400); font: inherit; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.03em; cursor: pointer; }
.lang-btn + .lang-btn { border-left: 1px solid var(--zinc-700); }
.lang-btn.on { background: var(--ds-frame); color: #fff; }
.lang-btn:focus-visible { outline: 2px solid var(--ds-frame); outline-offset: -2px; }
/* Narrower menu (iPad portrait, 820 px): tighter gaps. The app name and the organization sit in the strip above, so the menu does not also carry them. */
@media (max-width: 999px) {
  .topbar { gap: 0.5rem; }
  .mainnav { gap: 0.1rem; }
  .mainnav a { padding: 0 0.55rem; }
  .top-right { gap: 0.35rem; }
  .top-right .btn.small { padding-left: 0.6rem; padding-right: 0.6rem; }
}

/* Vouchers per prize (Micha 22 Oct 21:24-21:31): the batch box under each chosen prize, full row width */
.voucher-box { flex-basis: 100%; display: flex; flex-direction: column; gap: 0.4rem; padding: 0.6rem 0.8rem; border: 1px dashed var(--line, #3f3f46); border-radius: 0.6rem; }
.voucher-box p { margin: 0; }
.voucher-box .warn { color: var(--amber, #f59e0b); font-weight: 600; }
.voucher-box .row-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.voucher-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.pw-once .pw { font: 700 1.4rem/1.2 ui-monospace, monospace; letter-spacing: .05em; user-select: all; }

/* ----- Org settings (org-settings.js): one row per setting with its explanation; sticky save bar ----- */
.gear span { font-size: 1.25rem; line-height: 1; }
.gear.on { background: var(--zinc-800); color: #fff; }
.os-red { background: var(--red-bg); border: 1px solid var(--red); color: var(--red); border-radius: 0.6rem; padding: 0.6rem 0.8rem; font-weight: 600; margin-bottom: 0.75rem; }
.env-banner.os-red { color: var(--red); }
.os-changed { color: var(--amber); font-weight: 600; }
.os-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.75rem 0; }
.os-only-changed { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; cursor: pointer; font-weight: 700; }
.os-only-changed input { width: 1.15rem; height: 1.15rem; }
.os-tools input[type=search] { min-width: 16rem; min-height: 44px; padding: 0.55rem 0.7rem; border-radius: 0.6rem; border: 1px solid var(--zinc-700); background: var(--zinc-950); color: #fff; font: inherit; color-scheme: dark; }
.os-area > summary { display: flex; align-items: baseline; gap: 0.75rem; cursor: pointer; list-style: none; min-height: 44px; }
.os-area > summary::-webkit-details-marker { display: none; }
.os-area > summary::before { content: '▸'; color: var(--zinc-400); }
.os-area[open] > summary::before { content: '▾'; }
.os-area > summary h2 { margin: 0; }
.os-field { border-top: 1px solid var(--zinc-800); padding: 0.75rem 0 0.6rem; }
.os-field.changed .os-label::after { content: ' •'; color: var(--emerald-300); }
.os-field.edited { box-shadow: inset 3px 0 0 var(--amber); padding-left: 0.7rem; }
.os-field.has-error { box-shadow: inset 3px 0 0 var(--red); padding-left: 0.7rem; }
.os-field.has-error input { border-color: var(--red) !important; }
.os-field.locked { opacity: 0.8; }
.os-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.75rem; }
.os-label { font-weight: 700; }
.os-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.os-chip { font-size: 0.72rem; color: var(--zinc-400); border: 1px solid var(--zinc-700); border-radius: 999px; padding: 0.05rem 0.45rem; white-space: nowrap; }
.os-chip.os-changed-mark { color: #09090b; background: var(--amber); border-color: var(--amber); font-weight: 800; }
.os-chip.tier-ops { color: var(--blue); border-color: var(--blue); }
.os-chip.lock { color: var(--amber); border-color: var(--amber); }
.os-chip.pending { color: var(--zinc-300); border-style: dashed; }
.os-desc { margin: 0.25rem 0 0.45rem; color: var(--zinc-300); font-size: 0.92rem; max-width: 60rem; }
.os-lock { color: var(--amber); margin: 0 0 0.4rem; }
.os-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.os-ctl input[type=number] { width: 9rem; }
.os-ctl input[type=text], .os-ctl select { width: auto; min-width: 12rem; max-width: 100%; }
.os-ctl .link-btn { background: none; border: 0; color: var(--emerald-300); cursor: pointer; font: inherit; font-weight: 700; padding: 0 0.3rem; }
.os-ctl .link-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.os-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.os-switch { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.os-switch input { width: 1.4rem; height: 1.4rem; }
.os-own { color: var(--emerald-300); }
.os-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.5rem -0.25rem 0; padding: 0.6rem 0.75rem max(0.6rem, env(safe-area-inset-bottom)); background: rgba(24, 24, 27, 0.97); border: 1px solid var(--zinc-800); border-radius: 0.9rem; }
.os-bar.dirty { border-color: var(--amber); }
.os-bar input { flex: 1 1 14rem; width: auto; }
.os-versions { list-style: none; margin: 0; padding: 0; }
.os-versions > li { border-top: 1px solid var(--zinc-800); padding: 0.6rem 0; }
.os-versions > li.current { box-shadow: inset 3px 0 0 var(--ds-frame); padding-left: 0.7rem; }
.os-vhead { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; }
.os-changes { margin: 0.35rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; }
.os-old { color: var(--zinc-400); text-decoration: line-through; }
.os-new { color: var(--emerald-300); font-weight: 600; }
.os-note { margin: 0.2rem 0; font-style: italic; }
.os-gap { gap: 0.5rem; }
@media (max-width: 699px) { .os-tools input[type=search] { min-width: 0; flex: 1 1 100%; } .os-ctl input[type=number] { width: 7rem; } }
@media (max-width: 999px) { .top-right { gap: 0.3rem; } .top-right .gear { padding: 0 0.5rem; } .top-right .btn.ghost.small { padding: 0 0.5rem; } .mainnav a { padding: 0 0.45rem; } } /* the gear (23 Oct) still fits iPad portrait */
/* Help in the menu is the "?" button only (Micha t1115–1116). iPad portrait (820) may wrap the menu onto a second line instead of scrolling sideways. The organization name stays in the strip above, at every width. */
@media (max-width: 999px) { .topbar { flex-wrap: wrap; row-gap: 0.25rem; } }
/* Translations card (translations.js, multilingual banners) */
.tr-langs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 8px 0; }
.tr-lang { display: flex; flex-direction: column; gap: 4px; }
.tr-lang input, .tr-start input, .tr-start select { min-height: 44px; }
.tr-start { display: grid; gap: 8px; margin-top: 8px; }
.tr-status { font-weight: 600; margin: 6px 0; }
.tr-status.blocked, .tr-status.failed { color: #b42318; }
.tr-status.needs_ok { color: #b54708; }
.tr-status.approved { color: #027a48; }
/* Team sets page (teamsets.js) */
.ts-trs { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.ts-tr { border-left: 3px solid #ccd; padding: 4px 10px; }
.ts-tr[data-status=approved] { border-color: #2a8; }
.ts-tr[data-status=blocked], .ts-tr[data-status=failed] { border-color: #c33; }
.ts-pick select { min-height: 44px; }
.ts-secondary { margin-top: 0.85rem; }
.ts-sec-row { margin-top: 0.65rem; }
.ts-sec-line { display: flex; gap: 0.5rem; align-items: center; }
.ts-sec-line select { flex: 1; min-width: 0; }
.ts-secondary-add { margin-top: 0.65rem; }
.ts-pick option:disabled { color: var(--zinc-500); }
.ts-members { list-style: none; margin: 0.2rem 0 0.6rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.ts-member { min-height: 44px; display: flex; align-items: center; padding: 0.35rem 0.7rem; border-radius: 0.7rem; border: 1px solid var(--zinc-700); background: var(--zinc-950); }
/* From iPad landscape (1180 px) down: tighter nav; hide switch (strip keeps the org name). */
@media (max-width: 1299px) { .top-right .org { display: none; } .topbar { gap: 0.5rem; } .mainnav a { padding: 0 0.55rem; } }
@media (max-width: 899px) { .mainnav { min-width: 0; gap: 0; overflow-x: auto; scrollbar-width: none; } .mainnav a { padding: 0 0.25rem; font-size: 0.85rem; white-space: nowrap; } }
/* Survivor settings block (survivor.js) */
.surv-switches { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0.6rem 0; }
.surv-advanced { margin: 0.6rem 0; }
.surv-advanced summary { cursor: pointer; color: var(--zinc-400); }
.surv-q { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.75rem; }
.surv-qlist { margin: 0.5rem 0 0; padding-left: 1.4rem; font-size: 0.9rem; }
.surv-qlist li { margin: 0.25rem 0; }
.surv-qlist li[data-kind='speed'] { color: var(--amber); }

/* Org Admin (#/org/admin): read-only list of what is set in Core for the organization. */
.admin-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; margin: 0 0 0.9rem; }
.admin-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.admin-sec-head h2, .admin-sec-head h3 { margin: 0; }
.admin-owner { margin-left: 0; font-weight: 800; }
.admin-owner.core { color: var(--amber); border-color: var(--amber); }
.admin-row { border-top: 1px solid var(--zinc-800); padding: 0.7rem 0; }
.admin-all summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--zinc-400); font-weight: 700; }
.admin-json { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.78rem; line-height: 1.35; background: var(--zinc-950); border-radius: 0.6rem; padding: 0.7rem; max-height: 22rem; overflow: auto; }

/* Live add from Dash (app.js liveBannerEmbed): shown in a frame, without the Manager chrome */
.embed .app-chrome, .embed .env-banner { display: none; }
.embed .page { padding-top: 12px; }
/* Club skin editor (skin-editor.js) */
.confirm-card.skin-editor { width: min(84rem, 100%); max-height: 94vh; overflow: auto; }
.skin-cols { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 1rem; align-items: start; }
/* Preview panel: fixed beside the fields (own scroll), so a change is seen at once */
.skin-right { position: sticky; top: 0; max-height: calc(94vh - 9rem); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
@media (max-width: 900px) { .skin-cols { grid-template-columns: 1fr; } .skin-right { position: static; max-height: none; } }
.sg-app { margin: 0.5rem 0; }
.sg-app > summary { cursor: pointer; font-weight: 700; padding: 0.25rem 0; }
.sg-frame { display: block; width: 100%; height: 400px; border: 1px solid var(--zinc-700); border-radius: 0.5rem; background: #111; }
.sg-drag { padding: 0.4rem; border: 1px dashed var(--zinc-700); border-radius: 0.5rem; }
.sg-dim { opacity: 0.25; }
.sg-hit { outline: 3px solid #f59e0b; outline-offset: -1px; opacity: 1; }
.sk-eyewrap { display: inline-flex; align-items: center; gap: 0.3rem; }
.sk-eye { min-height: 0; padding: 0.1rem 0.35rem; border-radius: 0.4rem; border: 1px solid var(--zinc-700); background: transparent; color: inherit; cursor: pointer; filter: grayscale(1); opacity: 0.6; font-size: 0.9rem; line-height: 1.2; }
.sk-eye[aria-pressed=true] { filter: none; opacity: 1; background: #f59e0b33; border-color: #f59e0b; }
.sk-eye-note { white-space: nowrap; }
.sk-adv { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0.3rem 0 0.6rem; font-size: 0.9rem; }
.sk-sec { border: 1px solid var(--zinc-700); border-radius: 0.6rem; padding: 0.3rem 0.7rem 0.5rem; margin-bottom: 0.5rem; }
.sk-sec > summary { cursor: pointer; font-weight: 700; padding: 0.3rem 0; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.15rem 0.8rem; }
.sk-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0; font-size: 0.85rem; }
.sk-lab { flex: 0 0 7.5rem; color: var(--zinc-300, #d4d4d8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-color { display: inline-flex; align-items: center; gap: 0.35rem; }
.sk-sw { position: absolute; inset: 0; border-radius: 0.35rem; border: 1px solid var(--zinc-600, #52525b); background: linear-gradient(var(--c), var(--c)), repeating-conic-gradient(#71717a 0 25%, #d4d4d8 0 50%) 0 0 / 8px 8px; pointer-events: none; }
.sk-sw.unset { background: repeating-conic-gradient(#3f3f46 0 25%, #27272a 0 50%) 0 0 / 8px 8px; }
.sk-color { position: relative; }
.sk-swbtn { position: relative; width: 1.9rem; height: 1.9rem; flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 0.35rem; }
.sk-swbtn:focus-visible { outline: 2px solid var(--ds-frame); outline-offset: 2px; }
.sk-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 17rem; padding: 0.6rem; border-radius: 0.6rem; background: var(--zinc-900, #18181b); border: 1px solid var(--zinc-600, #52525b); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.sk-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.sk-pop-body { display: flex; gap: 0.6rem; align-items: stretch; }
.sk-pop-cur.sk-sw { position: relative; inset: auto; width: 4.2rem; height: 4.2rem; flex: none; border-radius: 0.5rem; }
.sk-pop-ctl { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; flex: 1; }
.sk-pop-lab { display: flex; flex-direction: column; gap: 0.1rem; }
.sk-pop input[type=color] { width: 100%; height: 1.8rem; padding: 0; border: 1px solid var(--zinc-600, #52525b); border-radius: 0.3rem; background: none; cursor: pointer; }
.sk-pop input.sk-hex { width: 100%; }
.sk-hex { width: 10.5rem; font: 0.8rem ui-monospace, Menlo, monospace; padding: 0.25rem 0.4rem; }
.sk-hex.bad { border-color: #f87171; }
.sk-grad { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 0; }
.sk-bar { display: block; height: 1.4rem; border-radius: 0.35rem; border: 1px solid var(--zinc-700); }
.sk-gctl, .sk-stops { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.sk-gctl input.sk-angle { width: 4.5rem; }
.sk-color input.sk-hex { width: 10.5rem; }
.sk-gctl .sk-color input.sk-hex { width: 8rem; }
.sk-gtext { width: 100%; font: 0.8rem ui-monospace, Menlo, monospace; }
.btn.sm { min-height: 32px; padding: 0.2rem 0.55rem; font-size: 0.8rem; }
.sk-out { min-width: 3.5rem; }
.sk-crest { width: 3rem; height: 3rem; object-fit: contain; background: #27272a; border-radius: 0.4rem; padding: 0.2rem; }
/* live phone preview: same --ds-* vars as the Player's applySkin, scoped to the mock phone */
.sp-phone { --pg: var(--ds-bg, #001934); width: 240px; border: 6px solid #3f3f46; border-radius: 26px; overflow: hidden; background: var(--pg); color: var(--ds-text, #fff); font-family: var(--ds-font, system-ui, sans-serif); font-size: 12px; }
.sp-phone[data-tone=light] { --pg: var(--ds-accent-press, #931818); }
.sp-phone b, .sp-gname, .sp-ev { font-family: var(--ds-font-head, var(--ds-font, system-ui)); }
.sp-upper .sp-gname, .sp-upper .sp-ev, .sp-upper .sp-btn, .sp-upper .sp-cap { text-transform: uppercase; }
.sp-main { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.sp-top { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin: -8px -8px 0; background: var(--ds-accent-strong, #0098d7); color: var(--ds-on-accent, #fff); font-weight: 700; }
.sp-phone[data-tone=dark] .sp-top { background: var(--ds-bg, #000); color: var(--ds-text, #fff); border-bottom: 1px solid var(--ds-line, #333); }
.sp-crest { width: 22px; height: 22px; flex: none; background: var(--ds-crest, none) center / contain no-repeat; }
.sp-sponsor { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--ds-radius-card, 8px); background: var(--ds-decor-waiting, linear-gradient(#00142a, #0b3a6e)); color: #fff; }
.sp-cap { font-size: 9px; letter-spacing: 0.1em; color: var(--ds-accent-strong, #4cc5f7); }
.sp-phone[data-tone=light] .sp-cap { color: #fff; }
.sp-sname { font-size: 18px; }
.sp-strip, .sp-card { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: var(--ds-radius-card, 8px); background: var(--ds-surface, #fff); color: var(--ds-text, #000); }
.sp-strip { background: var(--ds-surface-2, #eaeaea); }
.sp-phone:not([data-tone]) .sp-strip, .sp-phone:not([data-tone]) .sp-card { color: #000; }
.sp-muted { color: var(--ds-muted, #666); }
.sp-num { font-family: var(--ds-font-mono, var(--ds-font-head, system-ui)); font-size: 16px; color: var(--ds-accent, inherit); }
.sp-btn { border: 0; padding: 9px; border-radius: var(--ds-radius, 9px); background: var(--ds-accent-strong, #0098d7); color: var(--ds-on-accent, #fff); font: 700 13px var(--ds-font-head, system-ui); }
.sp-opts { display: flex; gap: 6px; }
.sp-opt { flex: 1; text-align: center; padding: 6px; border-radius: var(--ds-radius, 9px); background: var(--ds-surface-2, #eaeaea); color: var(--ds-text, #000); }
.sp-opt.sel { background: var(--ds-selected-bg, transparent); outline: 2px solid var(--ds-selected, #ffd400); color: var(--ds-text, #fff); }
.sp-game { border-top: 4px solid #3f3f46; }
.sp-head { display: flex; align-items: center; gap: 6px; padding: 7px 8px; background: var(--ds-decor-header, linear-gradient(#0b3a6e, #001934)); color: var(--ds-header-text, #fff); }
.sp-gname { flex: 1; font-size: 14px; }
.sp-score { color: var(--ds-header-accent, var(--ds-header-muted, #fff)); font-family: var(--ds-font-mono, inherit); font-weight: 700; }
.sp-play { height: 90px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--ds-decor-play, linear-gradient(#001934, #0b3a6e)); }
.sp-tile { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--ds-radius-area, 8px); background: var(--ds-tile-bg, #fff); color: var(--ds-tile-text, #000); font: 800 18px var(--ds-font-mono, system-ui); }
.sp-tile.hi { outline: 3px solid var(--ds-highlight, #ffd400); }
.skin-editor .skin-json { width: 100%; box-sizing: border-box; font: 0.8rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--zinc-950, #09090b); color: inherit; border: 1px solid var(--zinc-700); border-radius: 0.5rem; padding: 0.6rem; resize: vertical; }
.skin-editor .err { color: #f87171; min-height: 1em; }
.club-skin-row { display: flex; gap: 0.5rem; align-items: center; }
.club-skin-row select { flex: 1; }
.sk-pop-head .btn { background: var(--zinc-800, #27272a); border-color: var(--zinc-600, #52525b); color: #fff; }
.ev-graphs { margin-top: 0.4rem; }
.ev-graphs .gt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0.3rem 0; }
.ev-graphs .gt-row > span:first-child { min-width: 6rem; }
