/* Layout: one narrow column on phones, widening to a photo grid; controls are big thumb targets. */
:root {
  /* Exceptional Entertainment palette: near-black #111111, gold #c6a75e, cream #f4f1ea, warm grey #cfc7bd, bronze #8e6f3e */
  --bg: #f4f1ea; --card: #fdfcf9; --ink: #111111; --muted: #6a635a; --line: #cfc7bd;
  --accent: #c6a75e; --accent-ink: #111111; --accent-deep: #8e6f3e; --sun: #c6a75e; --ok: #2a7049; --warn: #6f5730; --bad: #b3261e;
  /* gold is too pale to read as text on cream, so text and focus rings use the bronze */
  /* small text gets the bronze deepened a touch: plain #8e6f3e on cream falls just short of the 4.5:1 reading standard */
  --accent-text: color-mix(in srgb, var(--accent-deep) 80%, black); --focus: var(--accent-deep);
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111111; --card: #1c1a17; --ink: #f4f1ea; --muted: #cfc7bd; --line: #3b352d;
    --ok: #6fcf9a; --warn: #c6a75e; --bad: #ff8a80; color-scheme: dark;
    /* on the dark ground the gold itself reads well; a custom dark color is lightened a little */
    --accent-text: color-mix(in srgb, var(--accent) 88%, white); --focus: var(--accent); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left)) 80px max(16px, env(safe-area-inset-right)); display: flex; flex-direction: column; gap: 18px; }
.narrow { max-width: 520px; }
h1 { font-size: clamp(1.6rem, 6vw, 2.3rem); line-height: 1.1; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 1.1rem; margin: 0; }
p { margin: 0; }
a { color: var(--accent-text); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); font-weight: 700; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 180px; min-width: 0; }
.spread { justify-content: space-between; }

label { display: flex; flex-direction: column; gap: 5px; font-size: 0.875rem; font-weight: 600; }
input[type=text], input[type=date], input[type=datetime-local], input[type=password], input[type=tel] {
  font: inherit; font-weight: 400; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check b { display: block; }

button, .btn { font: inherit; font-weight: 650; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 11px 16px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }
button:disabled { opacity: 0.5; cursor: default; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.big { padding: 18px 22px; font-size: 1.1rem; width: 100%; border-radius: 16px; }
.danger { color: var(--bad); }
.ghost { border-color: transparent; background: transparent; }

.tabs { display: flex; gap: 6px; }
.tabs button { min-height: 38px; padding: 6px 14px; }
.tabs button[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* upload queue */
.queue { display: flex; flex-direction: column; gap: 8px; }
.qi { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 0.875rem; }
.qi .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.qi .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.qi.done .bar i { background: var(--ok); }
.qi.fail .bar i { background: var(--bad); }
.qi button { min-height: 30px; padding: 2px 10px; font-size: 0.8rem; }

/* gallery */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; } }
.tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); border: 0; padding: 0; min-height: 0; cursor: pointer; display: block; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tag { position: absolute; left: 6px; bottom: 6px; background: rgba(17, 17, 17, 0.72); color: #fff; font-size: 0.7rem; font-weight: 600; padding: 3px 7px; border-radius: 999px; }
.tile .tag.tr { left: auto; right: 6px; bottom: auto; top: 6px; }
.tile .tag.wait { background: var(--sun); color: #111111; }
.tile.dim img, .tile.dim video { opacity: 0.35; }
.empty { text-align: center; padding: 36px 12px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }

/* host media cards */
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hitem { display: flex; flex-direction: column; gap: 6px; }
.hitem .meta { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hitem .acts { display: flex; gap: 6px; }
.hitem .acts button { flex: 1; min-height: 34px; padding: 4px 6px; font-size: 0.8rem; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.qr { width: 170px; max-width: 100%; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.link { font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; background: var(--bg); border: 1px solid var(--line); padding: 10px; border-radius: 10px; overflow-wrap: anywhere; }

/* lightbox */
.lb { position: fixed; inset: 0; background: #111111; color: #fff; z-index: 50; display: flex; flex-direction: column; }
.lb .stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.lb .stage img, .lb .stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb .bar { display: flex; gap: 8px; align-items: center; padding: 10px max(12px, env(safe-area-inset-left)); padding-bottom: max(10px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
.lb .top { padding-top: max(10px, env(safe-area-inset-top)); justify-content: space-between; }
.lb .info { flex: 1 1 160px; min-width: 0; font-size: 0.9rem; }
.lb .info span { display: block; color: #b9b9cf; overflow-wrap: anywhere; }
.lb button, .lb .btn { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: transparent; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; padding: 0; font-size: 1.4rem; }
.lb .prev { left: 8px; } .lb .next { right: 8px; }
.lb .liked { background: var(--accent); color: #fff; }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; z-index: 99; max-width: 90vw; text-align: center; }
.banner { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--sun) 28%, var(--card)); font-size: 0.92rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* all-events dashboard */
.events { display: flex; flex-direction: column; gap: 10px; }
.ev { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; }
.ev h2 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.ev .facts { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ev .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ev .acts .btn { min-height: 38px; padding: 6px 14px; font-size: 0.9rem; }
@media (max-width: 640px) { .ev { grid-template-columns: 1fr; } }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; vertical-align: middle; margin-left: 6px; }
.pill.open { color: var(--ok); } .pill.soon { color: var(--accent-text); } .pill.ended, .pill.paused { color: var(--muted); }
.attn { color: var(--warn); font-weight: 650; }

/* tiles that arrive after the first paint fade in */
@keyframes enter { from { opacity: 0; transform: scale(0.92); } }
.enter { animation: enter 0.45s ease-out; }

/* branding */
.brandmark { display: flex; align-items: center; min-height: 0; font-weight: 700; font-size: 0.9rem; color: var(--muted); }
.brandmark img { max-height: 40px; max-width: 180px; object-fit: contain; }
.cover { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; max-height: 320px; width: 100%; background: var(--line); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* guest upload */
details.more { border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
details.more[open] summary { margin-bottom: 10px; }
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress .bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s; }
.done { padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 16%, var(--card)); font-weight: 600; }
.done.warn { background: color-mix(in srgb, var(--sun) 28%, var(--card)); }

/* host: tabs, filters, selection */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabbar button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 10px 16px; color: var(--muted); white-space: nowrap; }
.tabbar button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { min-height: 36px; padding: 5px 13px; font-size: 0.9rem; }
.chips button[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hitem.sel .tile { outline: 4px solid var(--accent); outline-offset: -4px; }
.tile .pick { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(17, 17, 17, 0.45); color: #fff; font-size: 0.9rem; line-height: 22px; text-align: center; font-weight: 700; }
.hitem.sel .pick { background: var(--accent); color: var(--accent-ink); }
.actionbar { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 10px 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); }
.actionbar b { margin-right: auto; }
.actionbar button, .actionbar .btn { min-height: 38px; padding: 6px 14px; font-size: 0.9rem; }
input[type=search], input[type=color] { font: inherit; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
input[type=search] { padding: 10px 12px; width: 100%; }
input[type=color] { width: 56px; height: 44px; padding: 3px; }

/* staff navigation */
.nav { background: var(--card); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1040px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); text-decoration: none; padding-bottom: 8px; }
.nav-brand img { max-height: 34px; max-width: 150px; object-fit: contain; }
.nav-links { display: flex; gap: 2px; flex: 1 1 auto; overflow-x: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 650; padding: 10px 12px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current=page] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); padding-bottom: 8px; min-width: 0; }
.nav-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.nav-user button { min-height: 34px; padding: 4px 12px; font-size: 0.85rem; }
.crumbs { font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.shortcuts { display: flex; gap: 6px; flex-wrap: wrap; }
.shortcuts .btn { min-height: 38px; padding: 6px 14px; font-size: 0.9rem; }
.credit { text-align: center; font-size: 0.85rem; color: var(--muted); padding-top: 12px; }
select { font: inherit; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }

/* logo cropper */
.cropper { position: fixed; inset: 0; z-index: 60; background: rgba(17, 17, 17, 0.8); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cropper .box { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; max-width: 100%; max-height: 100%; overflow: auto; }
.crop-stage { position: relative; align-self: center; line-height: 0; touch-action: none; user-select: none;
  background: repeating-conic-gradient(#e6e1d8 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px; } /* checkerboard shows transparent areas */
.crop-stage img { display: block; max-width: none; pointer-events: none; }
.crop-rect { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(17, 17, 17, 0.55); cursor: move; }
.crop-rect i { position: absolute; width: 22px; height: 22px; background: var(--accent); border: 2px solid #111111; border-radius: 50%; }
.crop-rect i[data-h=nw] { left: -12px; top: -12px; cursor: nwse-resize; } .crop-rect i[data-h=ne] { right: -12px; top: -12px; cursor: nesw-resize; }
.crop-rect i[data-h=sw] { left: -12px; bottom: -12px; cursor: nesw-resize; } .crop-rect i[data-h=se] { right: -12px; bottom: -12px; cursor: nwse-resize; }
.crop-stage { overflow: hidden; }

.tile .nothumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.lb .nopreview { max-width: 28ch; text-align: center; color: #cfc7bd; padding: 24px; }
