/* ==========================================================================
   Andhra Anime Club v2 — single design system for every page
   Palette: crimson #a0022d → #4a0012, white, gold #fbbf24
   ========================================================================== */

:root {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --crimson: #a0022d;
  --crimson-2: #b0022d;
  --crimson-deep: #4a0012;
  --ink: #180105;
  --bg: #0e0003;
  --bg-raised: #1a0207;
  --surface: rgba(var(--fg-rgb), 0.06);
  --surface-2: rgba(var(--fg-rgb), 0.1);
  --line: rgba(var(--fg-rgb), 0.12);
  --text: #ffffff;
  --fg-rgb: 255, 255, 255;
  --bg-rgb: 14, 0, 3;
  --contrast: #ffffff;
  --on-contrast: #180105;
  --input-bg: rgba(0, 0, 0, 0.3);
  --pill: rgba(255, 255, 255, 0.14);
  --bg-glow: radial-gradient(120% 50% at 50% 0%, #3a000e 0%, #0e0003 62%);
  --muted: rgba(var(--fg-rgb), 0.64);
  --faint: rgba(var(--fg-rgb), 0.4);
  --gold: #fbbf24;
  --green: #22c55e;
  --red: #f87171;
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 66px;
  --top-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  font-family: var(--font);
  background: var(--bg-glow) fixed, var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.page { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.page.no-nav { padding-bottom: 32px; }
body.no-top .page { padding-top: calc(var(--safe-t) + 12px); }
.section { padding: 22px 0 6px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.center { text-align: center; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  padding-top: var(--safe-t);
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text small { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.brand-text strong { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.2px; white-space: nowrap; }
/* Mobile: name + location, no logo, no theme button (that lives in Profile). Desktop: logo + club name. */
.brand-desk { display: none; }
.brand-mob strong { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; }
.brand-mob small { display: flex; align-items: center; gap: 3px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mob small .ico { width: 13px; height: 13px; flex: none; color: var(--gold); }
.brand > img { display: none; }
.top-actions .theme-btn { display: none; }
@media (min-width: 900px) {
  .brand-desk { display: flex; }
  .brand-mob { display: none; }
  .brand > img { display: block; }
  .top-actions .theme-btn { display: grid; }
}
.search-results { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; min-height: 120px; }
.search-hit { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.search-hit:hover { background: var(--surface); }
.search-hit img { width: 46px; height: 60px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.search-hit span { min-width: 0; }
.search-hit b { display: block; font-size: 0.88rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-hit small { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.input-group .prefix .ico { width: 18px; height: 18px; }
.top-links { display: none; gap: 4px; }
.top-links a { padding: 8px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.top-links a:hover, .top-links a.active { color: var(--text); background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
}
.icon-btn svg { width: 20px; height: 20px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 0.95rem; color: #fff;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep));
  border: 1px solid rgba(var(--fg-rgb), 0.18);
  overflow: hidden; position: relative;
}
/* Photo sits over the initial, so a broken link just shows the initial. */
.avatar img, .pf-avatar img, .pf-photo-big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; background: #fff; }
.top-actions .here { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.back-btn svg { width: 22px; height: 22px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(var(--bg-rgb), 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.64rem; font-weight: 700; color: var(--faint);
}
.bottom-nav svg, .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a.active { color: var(--text); }
.bottom-nav a.active svg { stroke: var(--gold); }

@media (min-width: 900px) {
  .top-links { display: flex; }
  .bottom-nav { display: none; }
  .page { padding-bottom: 40px; }
}

/* ---------- Headings ---------- */
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.head:has(.filter-btn) { align-items: center; }
.head h2, .h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.3px; }
.head .link { color: var(--gold); font-size: 0.82rem; font-weight: 700; }
.h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.eyebrow { font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 14px;
  font-size: 0.88rem; font-weight: 800; white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, var(--crimson-2), var(--crimson)); color: #fff; box-shadow: 0 8px 20px rgba(160, 2, 45, 0.35); }
.btn-light { background: var(--contrast); color: var(--on-contrast); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 0.95rem; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.78rem; border-radius: 10px; }

/* ---------- Cards / surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-crimson { background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-deep) 100%); border: 0; border-radius: var(--radius); padding: 18px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  background: var(--crimson); color: #fff;
}
.tag.muted-tag { background: rgba(var(--fg-rgb), 0.14); color: var(--text); }
.tag.gold-tag { background: var(--gold); color: var(--ink); }
.tag.green-tag { background: rgba(34,197,94,0.18); color: #86efac; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 36px 12px; color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.empty svg { display: block; width: 42px; height: 42px; margin: 0 auto 10px; opacity: .5; }

/* ---------- Chips / segmented ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; height: 34px; padding: 0 14px; border-radius: 99px;
  font-size: 0.78rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.chips button.active { background: var(--contrast); color: var(--on-contrast); border-color: var(--contrast); }
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface); }
.seg button { flex: 1; height: 36px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.seg button.active { background: var(--crimson); color: #fff; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.field em { font-style: normal; opacity: .7; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm);
  background: var(--input-bg); border: 1px solid var(--line); color: var(--text);
  font-size: 0.9rem; outline: none; resize: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--gold); }
.field option { background: var(--bg-raised); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.input-group { position: relative; }
.input-group .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.input-group input { padding-left: 52px; }
.input-group .suffix { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-error { color: var(--red); font-size: 0.8rem; font-weight: 600; }

/* ---------- Auth card (profile, signed out) ---------- */
.auth-card { position: relative; max-width: 420px; margin: 0 auto; padding: 24px 0 32px; }
.auth-back { position: absolute; left: 0; top: 18px; }
/* Logged-out profile = a standalone sign-in screen: no top bar, bottom nav or footer. */
body.auth-only .topbar, body.auth-only .bottom-nav, body.auth-only .footer { display: none; }
body.auth-only .page { padding-top: var(--safe-t); padding-bottom: calc(24px + var(--safe-b)); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 22px; }
.auth-pane .field-row { gap: 10px; }
.auth-loc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.auth-loc-head > span { font-size: 0.72rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.auth-loc-head .auth-link { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; }
.auth-loc-head .ico { width: 15px; height: 15px; }
.auth-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(160, 2, 45, 0.08); border: 1px solid rgba(160, 2, 45, 0.2); font-size: 0.76rem; line-height: 1.55; color: var(--muted); }
.auth-tip b { color: var(--text); }
.auth-tip .ico { width: 18px; height: 18px; flex: none; color: var(--gold); margin-top: 1px; }
.auth-brand img { width: 30px; height: 30px; border-radius: 50%; }
.auth-brand span { font-size: 0.72rem; font-weight: 800; letter-spacing: 2.4px; }
.auth-card h1 { text-align: center; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.auth-sub { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 8px 0 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 16px; background: var(--surface); margin-bottom: 24px; }
.auth-tabs.none { display: none; }
.auth-tabs button { height: 44px; border-radius: 12px; font-size: 0.86rem; font-weight: 700; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; }
.auth-tabs button.active { background: var(--pill); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.auth-pane { display: flex; flex-direction: column; gap: 12px; }
.auth-pane h2 { font-size: 1.02rem; font-weight: 800; }
.auth-pane > p { color: var(--muted); font-size: 0.84rem; line-height: 1.55; margin: -8px 0 6px; }
.auth-input {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; min-width: 0;
  border-radius: 16px; background: var(--surface); border: 1.5px solid transparent;
  transition: border-color .15s, background .15s;
}
.auth-input:focus-within { border-color: var(--gold); background: var(--input-bg); }
.auth-input > .ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.auth-input input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 0.92rem; font-weight: 500; }
.auth-input input::placeholder { color: var(--faint); }
.auth-input select { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 0.92rem; font-weight: 500; }
.auth-input option { background: var(--bg-raised); }
.auth-prefix { color: var(--muted); font-size: 0.92rem; font-weight: 700; }
.auth-input .eye { display: grid; place-items: center; padding: 6px; margin-right: -6px; color: var(--muted); }
.auth-input .eye .ico { width: 20px; height: 20px; }
.auth-link { color: var(--gold); font-size: 0.84rem; font-weight: 700; }
.auth-link.forgot { align-self: flex-end; font-size: 0.8rem; margin: -2px 0 4px; }
.auth-link.center-link { align-self: center; margin-top: 8px; }
.auth-pane .btn-primary { height: 54px; border-radius: 16px; font-size: 0.95rem; }
.auth-terms { text-align: center; font-size: 0.72rem; color: var(--muted); }
.auth-terms a { color: var(--gold); font-weight: 700; }
.auth-notice { padding: 12px 14px; border-radius: 12px; font-size: 0.82rem; font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.auth-notice.ok { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.auth-notice.err { background: rgba(248, 113, 113, 0.12); color: var(--red); }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 0.74rem; font-weight: 700; margin: 22px 0 14px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-google { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 16px; }
.auth-google svg { width: 18px; height: 18px; }

/* ---------- Join the club ---------- */
.join-hero { position: relative; overflow: hidden; padding: 26px 20px; }
.join-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(251, 191, 36, 0.16); }
.join-hero > * { position: relative; z-index: 1; }
.join-hero h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.6px; margin: 14px 0 10px; }
.join-hero h1 span { color: var(--gold); }
.join-hero p { font-size: 0.88rem; line-height: 1.6; color: var(--muted); margin-bottom: 18px; max-width: 520px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-grid div { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 0.78rem; font-weight: 700; }
.feature-grid .ico { width: 18px; height: 18px; color: var(--gold); flex: none; }
.join-card { padding: 18px; }
.join-progress { margin-bottom: 18px; }
.join-progress > div:first-child { display: flex; justify-content: space-between; font-size: 0.74rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.join-step { border: 0; min-width: 0; animation: fade .25s ease; }
.join-step legend { font-size: 1.05rem; font-weight: 800; line-height: 1.35; margin-top: 4px; }
.join-step > p { font-size: 0.78rem; margin: 2px 0 14px; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 640px) { .opt-grid { grid-template-columns: repeat(3, 1fr); } }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line);
  font-size: 0.82rem; font-weight: 700; line-height: 1.3; cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt i { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid var(--faint); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.opt input[type="radio"] + i { border-radius: 50%; }
.opt input:checked + i { background: var(--crimson); border-color: var(--crimson); }
.opt input[type="checkbox"]:checked + i::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.opt input[type="radio"]:checked + i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt:has(input:checked) { border-color: var(--crimson); background: rgba(160, 2, 45, 0.12); }
.opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.opt.consent { align-items: flex-start; font-weight: 600; color: var(--muted); line-height: 1.6; }
.opt.consent i { margin-top: 2px; }
.join-nav { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.join-nav .btn { flex: 1; }
.join-nav .btn-primary { flex: 2; }
.join-done { text-align: center; padding-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.join-done-icon { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: rgba(34, 197, 94, 0.14); color: var(--green); animation: fade .4s ease; }
.join-done-icon .ico { width: 44px; height: 44px; stroke-width: 2.4; }
.join-done p { font-size: 0.88rem; line-height: 1.7; max-width: 420px; }
.join-lock { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 20px; }
.join-lock-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 191, 36, 0.14); color: var(--gold); }
.join-lock-icon .ico { width: 36px; height: 36px; }
.join-lock p { font-size: 0.88rem; line-height: 1.7; max-width: 440px; }
.join-done .join-wait { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; }
.join-wait .ico { width: 18px; height: 18px; color: var(--gold); flex: none; }
.join-wait b { font-variant-numeric: tabular-nums; }

/* ---------- Event cards ---------- */
.event-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .event-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .event-grid { grid-template-columns: 1fr 1fr 1fr; } }
.event-card {
  display: flex; gap: 12px; padding: 10px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: background .15s, transform .15s;
}
.event-card:hover { background: var(--surface-2); }
.event-card:active { transform: scale(0.99); }
.event-card .thumb { position: relative; flex: 0 0 88px; height: 124px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
/* Type + city sit side by side above the title, so nothing covers the poster */
.event-card .card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* In-card city badge: crimson-tinted pill matching the type tag's size */
.event-card .card-tags .city-tag {
  padding: 3px 10px 3px 7px; color: var(--text);
  background: linear-gradient(135deg, rgba(255,75,114,0.16), rgba(160,2,45,0.06));
  border-color: rgba(255,75,114,0.38); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.event-card .card-tags .city-tag .ico { color: #ff4b72; }

/* City label: frosted dark pill, readable on any poster in both themes */
.city-tag {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0;
  padding: 4px 10px 4px 8px; border-radius: 99px;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; white-space: nowrap;
  color: #fff; background: rgba(14,0,3,0.62); border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.city-tag .ico { width: 11px; height: 11px; flex: none; stroke-width: 2.4; color: #ff4b72; }
.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* "This meet is in VIZAG": loud city strip on event, booking and ticket pages */
.city-banner {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px;
  border-radius: 14px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #e11d48 0%, #a0022d 100%);
  box-shadow: 0 6px 18px rgba(160,2,45,.28), inset 0 1px 0 rgba(255,255,255,.18);
}
.city-banner > .ico { width: 30px; height: 30px; flex: none; padding: 6px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; stroke-width: 2.4; }
.city-banner > span { display: flex; flex-direction: column; min-width: 0; }
.city-banner small { font-size: .62rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.8); margin: 0; }
.city-banner b { font-size: 1.35rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; line-height: 1.15; color: #fff; }
.city-banner em { font-style: normal; font-size: .76rem; font-weight: 600; color: rgba(255,255,255,.85); overflow-wrap: anywhere; }
a.city-banner em { text-decoration: underline; text-decoration-color: rgba(255,255,255,.45); text-underline-offset: 3px; }
.city-note { margin: 8px 2px 0; font-size: .76rem; font-weight: 600; color: var(--muted); }
.city-note b { color: var(--text); text-transform: uppercase; }
.ticket-body > .city-banner { grid-column: 1 / -1; margin: 0; }
.ticket-body .city-banner small { color: rgba(255,255,255,.8); margin: 0; }
.ticket-body .city-banner b { font-size: 1.2rem; }

/* Events toolbar: Filter button + removable active-filter pills */
.ev-tools { display: flex; align-items: center; gap: 8px; margin: 0 -16px 14px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.ev-tools::-webkit-scrollbar { display: none; }
.filter-btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 12px; font-size: 0.82rem; font-weight: 800; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
.filter-btn:hover { background: var(--surface-2); }
.filter-btn .ico { width: 16px; height: 16px; stroke-width: 2; }
.filter-btn.on { border-color: rgba(255,75,114,0.5); }
.filter-btn em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font-size: 0.66rem; background: var(--crimson); color: #fff; }
.active-filters { display: flex; gap: 6px; }
.active-filters button {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 8px 0 11px;
  border-radius: 99px; font-size: 0.74rem; font-weight: 700; color: var(--text);
  background: rgba(160,2,45,0.12); border: 1px solid rgba(255,75,114,0.32);
}
.active-filters .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.active-filters .ico:first-child:not(:last-child) { color: #ff4b72; }
.active-filters .ico:last-child { opacity: .6; }

/* Filter sheet */
.filter-sheet h3 { margin-bottom: 4px; }
.fl-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fl-group:last-child { border-bottom: 0; }
.fl-group > small { display: block; margin-bottom: 10px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.9px; text-transform: uppercase; color: var(--muted); }
.fl-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-opts button {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 12px; font-size: 0.82rem; font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); transition: color .15s, border-color .15s, background .15s;
}
.fl-opts button .ico { width: 14px; height: 14px; stroke-width: 2.2; }
.fl-opts button em { font-style: normal; font-size: 0.66rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.fl-opts button.on { color: var(--text); border-color: var(--crimson); background: rgba(160,2,45,0.14); }
.fl-opts button.on .ico { color: #ff4b72; }
.fl-opts button.on em { background: var(--crimson); color: #fff; }
.fl-foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 16px; }
.fl-foot .btn { height: 48px; }
.event-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2px 0; }
.event-card h3 { font-size: 0.95rem; font-weight: 800; line-height: 1.25; margin: 6px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card .meta { font-size: 0.72rem; color: var(--muted); font-weight: 600; line-height: 1.55; }
.event-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 700; color: var(--gold); }
.mini-rating svg { width: 13px; height: 13px; }
.mini-rating.none { color: var(--faint); font-weight: 600; }
.go { font-size: 0.74rem; font-weight: 800; padding: 7px 12px; border-radius: 10px; background: var(--contrast); color: var(--on-contrast); }
.go.alt { background: var(--surface-2); color: var(--text); }

/* Event list pagination */
#events { scroll-margin-top: 72px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; }
.pager button {
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center;
  font-size: 0.84rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); transition: background .15s, color .15s, border-color .15s;
}
.pager button:hover:not(:disabled):not(.on) { background: var(--surface-2); color: var(--text); }
.pager button.on { color: #fff; background: var(--crimson); border-color: var(--crimson); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .ico { width: 18px; height: 18px; stroke-width: 2.2; }
.pg-gap { min-width: 20px; text-align: center; font-weight: 800; color: var(--faint); }

/* ---------- Hero slider ---------- */
.hero-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
  position: relative; flex: 0 0 100%;
  aspect-ratio: 4 / 5; max-height: 540px;
  border-radius: 22px; overflow: hidden; scroll-snap-align: center; box-shadow: var(--shadow);
}
@media (min-width: 700px) { .hero-slide { aspect-ratio: 21 / 9; } }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(24,1,5,0.78) 70%, rgba(24,1,5,0.97) 100%); }
.hero-info { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 1; max-width: 560px; }
.hero-info h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; margin: 10px 0 6px; letter-spacing: -0.4px; }
@media (min-width: 700px) { .hero-info { left: 32px; bottom: 32px; } .hero-info h2 { font-size: 2.2rem; } }
.hero-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8rem; color: rgba(var(--fg-rgb), 0.82); font-weight: 600; }
.hero-cta { display: flex; gap: 8px; margin-top: 14px; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dots span { width: 6px; height: 6px; border-radius: 99px; background: rgba(var(--fg-rgb), 0.3); transition: width .3s, background .3s; }
.dots span.active { width: 20px; background: var(--contrast); }

/* ---------- Upcoming banner (home): wide image cards, text on a dark fade ---------- */
.head .up-count { font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.up-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
.up-track::-webkit-scrollbar { display: none; }
.up-card {
  position: relative; flex: 0 0 88%; min-height: 250px; display: flex; align-items: flex-end;
  border-radius: 20px; overflow: hidden; scroll-snap-align: center; box-shadow: var(--shadow); background: #180105;
}
.up-track.single .up-card { flex-basis: 100%; }
@media (min-width: 700px) { .up-card { flex-basis: 70%; min-height: 300px; } }
.up-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.up-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,1,5,.15) 0%, rgba(24,1,5,.55) 45%, rgba(24,1,5,.96) 100%); }
.up-body { position: relative; z-index: 1; width: 100%; padding: 16px; }
@media (min-width: 700px) { .up-body { padding: 24px; } }
.up-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.up-body h3 { margin: 10px 0 4px; font-size: 1.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.3px; }
@media (min-width: 700px) { .up-body h3 { font-size: 1.7rem; } }
.up-line { font-size: 0.84rem; font-weight: 600; color: rgba(255,255,255,.86); line-height: 1.4; }
.up-when { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 0.76rem; font-weight: 700; color: rgba(255,255,255,.78); }
.up-when .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.up-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.up-foot .btn { flex: none; }
.up-cd { display: flex; gap: 6px; min-width: 0; }
.up-cd > span { min-width: 40px; padding: 5px 4px; border-radius: 10px; text-align: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); }
.up-cd b { display: block; font-size: 0.98rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.up-cd small { font-size: 0.56rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.7); }
.up-live { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; font-size: 0.74rem; font-weight: 800; background: rgba(34,197,94,.18); border: 1px solid rgba(34,197,94,.45); color: #86efac; }
.up-live i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: up-pulse 1.4s infinite; }
.up-live.done { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.7); }
@keyframes up-pulse { 50% { opacity: .35; } }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.stats > div { padding: 14px 4px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 1.1rem; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.stats small { font-size: 0.66rem; color: var(--muted); font-weight: 600; }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: 6px; }
.countdown > div { min-width: 50px; padding: 7px 4px; border-radius: 10px; background: rgba(0,0,0,0.25); text-align: center; }
.countdown b { display: block; font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.countdown small { font-size: 0.58rem; color: rgba(var(--fg-rgb), 0.7); font-weight: 700; text-transform: uppercase; }

/* ---------- Stars & reviews ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 14px; height: 14px; }
.stars .off { color: rgba(var(--fg-rgb), 0.2); }
.rating-card { display: flex; gap: 18px; align-items: center; }
.rating-big { text-align: center; min-width: 92px; }
.rating-big b { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.rating-big small { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 600; margin-top: 4px; }
.bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.bar i { flex: 1; height: 6px; border-radius: 99px; background: rgba(var(--fg-rgb), 0.1); overflow: hidden; }
.bar i::after { content: ""; display: block; height: 100%; width: var(--w, 0%); background: var(--gold); border-radius: inherit; transition: width .6s ease; }
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.review-top { display: flex; align-items: center; gap: 10px; }
.review-top .avatar { width: 36px; height: 36px; font-size: 0.85rem; }
.review-who { flex: 1; min-width: 0; }
.review-who b { display: block; font-size: 0.86rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-who small { font-size: 0.68rem; color: var(--muted); font-weight: 600; }
.review p { margin-top: 10px; font-size: 0.85rem; line-height: 1.55; color: rgba(var(--fg-rgb), 0.88); overflow-wrap: anywhere; }
.review .pill { margin-top: 10px; }
.star-input { display: flex; justify-content: center; gap: 10px; padding: 4px 0; }
.star-input button { color: rgba(var(--fg-rgb), 0.2); transition: transform .15s, color .15s; }
.star-input button.on { color: var(--gold); }
.star-input button:active { transform: scale(1.2); }
.star-input svg { width: 38px; height: 38px; }

/* ---------- Bottom sheet / modal ---------- */
.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,0.65); animation: fade .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  margin: 0 auto; width: 100%; max-width: 520px;
  padding: 10px 18px calc(22px + var(--safe-b));
  background: var(--bg-raised); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 24px 24px 0 0;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  animation: up .28s cubic-bezier(.16,1,.3,1);
}
/* Keep a sheet's main button visible while its form scrolls (e.g. Edit profile on small phones). */
.sheet form > .btn-primary:last-child {
  position: sticky; bottom: 0; z-index: 1; flex: none;
  box-shadow: 0 -14px 0 var(--bg-raised), 0 calc(22px + var(--safe-b)) 0 var(--bg-raised);
}
@media (min-width: 700px) {
  .sheet { max-height: 88vh; max-height: 88dvh; bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 24px; border-bottom: 1px solid var(--line); animation: fade .2s ease; }
}
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: rgba(var(--fg-rgb), 0.25); margin: 0 auto 14px; }
.sheet h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 14px; }
.sheet-close { position: absolute; right: 12px; top: 12px; }
@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: var(--contrast); color: var(--on-contrast); font-size: 0.84rem; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #fee2e2; color: #7f1d1d; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 15px 16px; font-size: 0.9rem; font-weight: 700; }
.list-item + .list-item { border-top: 1px solid var(--line); }
.list-item .ico { color: var(--gold); flex: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item small { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.list-item .chev { width: 18px; height: 18px; color: var(--faint); }
a.list-item:hover, button.list-item:hover { background: var(--surface); }
button.list-item { width: 100%; text-align: left; }
.switch-ui { position: relative; width: 44px; height: 26px; flex: none; border-radius: 99px; background: rgba(var(--fg-rgb), 0.2); transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); transition: transform .2s; }
[aria-checked="true"] > .switch-ui { background: var(--crimson); }
[aria-checked="true"] > .switch-ui::after { transform: translateX(18px); }

/* ---------- Info grid ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-grid > div { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.info-grid small { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.info-grid b { font-size: 0.88rem; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 99px; background: rgba(var(--fg-rgb), 0.1); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #f59e0b); border-radius: inherit; transition: width .6s ease; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* ---------- Footer ---------- */
.footer { padding: 30px 0 12px; text-align: center; border-top: 1px solid var(--line); margin-top: 30px; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 14px; }
.footer nav a { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.footer nav a:hover { color: var(--text); }
.socials { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.footer p { font-size: 0.72rem; color: var(--faint); }
/* On mobile the bottom nav does the footer's job; keep it only on pages without one. */
@media (max-width: 899px) { body:not(.no-bottom-nav) .footer { display: none; } }

/* ---------- Pull to refresh (touch screens, see pullToRefresh in core.js) ---------- */
@media (pointer: coarse) { html, body { overscroll-behavior-y: contain; } } /* our pull replaces the browser's */
.ptr {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 8px); z-index: 150; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-raised); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--muted); opacity: 0; transform: translate3d(-50%, -48px, 0); pointer-events: none; will-change: transform, opacity;
}
.ptr svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ptr.ready { color: var(--gold); }
.ptr.back { transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
.ptr.spin svg { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ---------- Full-screen page loader (Wi-Fi arcs, from the original app) ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 30px; text-align: center; background: var(--bg-glow), var(--bg); transition: opacity .35s ease, visibility .35s;
}
.page-loader.hide { opacity: 0; visibility: hidden; }
.page-loader svg { width: 46px; height: 46px; fill: none; stroke: var(--crimson-2); stroke-width: 2.5; stroke-linecap: round; }
:root[data-theme="dark"] .page-loader svg { stroke: #ff4b72; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-loader svg { stroke: #ff4b72; } }
.page-loader .w-dot { fill: currentColor; stroke: none; color: inherit; animation: wifi-dot 1.4s infinite ease-in-out; }
.page-loader svg { color: var(--crimson-2); }
.page-loader .w-a1 { animation: wifi-a1 1.4s infinite ease-in-out; }
.page-loader .w-a2 { animation: wifi-a2 1.4s infinite ease-in-out; }
.page-loader .w-a3 { animation: wifi-a3 1.4s infinite ease-in-out; }
.page-loader b { font-size: .74rem; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.page-loader small { max-width: 230px; font-size: .64rem; line-height: 1.5; font-weight: 600; color: var(--faint); margin-top: 6px; }
@keyframes wifi-dot { 0%, 100% { opacity: .3; } 30% { opacity: 1; } }
@keyframes wifi-a1 { 0%, 100% { opacity: .1; } 45% { opacity: 1; } }
@keyframes wifi-a2 { 0%, 100% { opacity: .1; } 60% { opacity: 1; } }
@keyframes wifi-a3 { 0%, 100% { opacity: .1; } 75% { opacity: 1; } }

/* ---------- Loader ---------- */
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(var(--fg-rgb), 0.15); border-top-color: var(--text); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Seat map ---------- */
.seat-wrap { overflow-x: auto; margin: 0 -16px; padding: 8px 16px 4px; scrollbar-width: thin; }
.seat-grid {
  display: grid; grid-template-columns: 18px repeat(var(--seat-cols), 24px) 18px; gap: 5px;
  width: max-content; margin: 0 auto;
}
.seat-row-label { font-size: 0.62rem; font-weight: 800; color: var(--faint); display: grid; place-items: center; }
.seat-gap { width: 24px; height: 24px; }
.seat {
  width: 24px; height: 24px; border-radius: 6px 6px 4px 4px;
  font-size: 0.55rem; font-weight: 800; color: rgba(var(--fg-rgb), 0.85);
  border: 1.5px solid var(--seat-c, rgba(var(--fg-rgb), 0.35)); background: transparent;
  transition: transform .1s, background .1s;
}
.seat.cat-silver { --seat-c: #b5b5c3; }
.seat.cat-gold { --seat-c: #fbbf24; }
.seat.cat-platinum { --seat-c: #ff4d88; }
.seat.cat-normal { --seat-c: #10b981; }
.seat.available:hover { background: color-mix(in srgb, var(--seat-c) 25%, transparent); }
.seat.selected { background: var(--seat-c); color: var(--ink); transform: scale(1.06); }
.seat.sold { background: rgba(var(--fg-rgb), 0.14); border-color: transparent; color: transparent; }
.seat.held { background: repeating-linear-gradient(45deg, rgba(var(--fg-rgb), 0.12) 0 3px, transparent 3px 6px); border-color: rgba(var(--fg-rgb), 0.15); color: transparent; }
.seat.blocked { opacity: 0.12; border-style: dashed; color: transparent; }
.seat.paint.cat-none { border-style: dashed; opacity: .35; }
.seat-screen { margin: 18px auto 0; max-width: 520px; text-align: center; }
.seat-screen span { display: block; height: 6px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: linear-gradient(90deg, transparent, rgba(var(--fg-rgb), .7), transparent); box-shadow: 0 -8px 24px rgba(var(--fg-rgb), .25); }
.seat-screen small { display: block; margin-top: 6px; font-size: 0.62rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--c, var(--text)); }
.legend i.fill { background: var(--c); }
.legend i.sold { background: rgba(var(--fg-rgb), 0.14); border-color: transparent; }

/* ---------- Sticky action bar ---------- */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(var(--bg-rgb), 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.action-bar .wrap { display: flex; align-items: center; gap: 12px; padding: 0; }
.action-bar .sum { flex: 1; min-width: 0; }
.action-bar .sum b { display: block; font-size: 1.1rem; font-weight: 800; }
.action-bar .sum small { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.has-action-bar .page { padding-bottom: calc(96px + var(--safe-b)); }

/* ---------- Steps ---------- */
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps span { flex: 1; height: 4px; border-radius: 99px; background: rgba(var(--fg-rgb), 0.12); }
.steps span.on { background: var(--gold); }

/* ---------- Ticket ---------- */
.ticket-list { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); align-items: start; }
.ticket-list > .empty, .ticket-list > .spinner { grid-column: 1 / -1; }
.ticket { border-radius: 22px; overflow: hidden; background: #fff; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; }
.ticket.focus { outline: 3px solid var(--gold); outline-offset: 3px; }
.ticket-top { position: relative; height: 150px; overflow: hidden; }
.ticket-top img { width: 100%; height: 100%; object-fit: cover; }
.ticket-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(24,1,5,.85)); }
.ticket-top .tt { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; color: #fff; }
.ticket-top .tt b { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.2; }
.ticket-top .tt small { font-size: 0.72rem; opacity: .85; font-weight: 600; }
.ticket-body { padding: 18px 18px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ticket-body > div { min-width: 0; }
.ticket-body .full { grid-column: 1 / -1; }
.ticket-body small { display: block; margin-bottom: 2px; font-size: 0.62rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #64748b; }
.ticket-body b { display: block; font-size: 0.9rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.ticket-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #eef2f6; }
.ticket-foot b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.ticket-foot .ticket-status { flex: none; }
.ticket-cut { position: relative; height: 22px; }
.ticket-cut::before { content: ""; position: absolute; left: 16px; right: 16px; top: 50%; border-top: 2px dashed #e2e8f0; }
.ticket-cut::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0 50%, var(--bg) 11px, transparent 12px), radial-gradient(circle at 100% 50%, var(--bg) 11px, transparent 12px); }
.ticket-qr { padding: 8px 20px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ticket-qr .qr { width: 168px; height: 168px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 8px; }
.ticket-qr .qr img, .ticket-qr .qr canvas { width: 100% !important; height: 100% !important; }
.ticket-qr p { max-width: 280px; font-size: 0.78rem; color: #475569; font-weight: 600; line-height: 1.5; }
.ticket-qr .code { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 8px; background: #fef3c7; color: #92400e; font-weight: 800; font-size: 0.8rem; overflow-wrap: anywhere; }
.ticket-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.ticket-status.ok { background: #dcfce7; color: #166534; }
.ticket-status.wait { background: #fef3c7; color: #92400e; }
.ticket-status.past { background: #e2e8f0; color: #475569; }

/* ==========================================================================
   Light theme. Follows the phone/PC setting unless the visitor picks one
   (stored by js/theme.js as <html data-theme="light|dark">).
   ========================================================================== */
:root[data-theme="light"] {
  --bg: #faf7f8; --bg-rgb: 250, 247, 248; --bg-raised: #ffffff;
  --surface: rgba(24, 1, 5, 0.04); --surface-2: rgba(24, 1, 5, 0.08); --line: rgba(24, 1, 5, 0.11);
  --text: #180105; --fg-rgb: 24, 1, 5; --muted: rgba(24, 1, 5, 0.64); --faint: rgba(24, 1, 5, 0.44);
  --contrast: #180105; --on-contrast: #ffffff; --input-bg: #ffffff; --pill: #ffffff;
  --gold: #b45309; --red: #dc2626;
  --shadow: 0 12px 32px rgba(24, 1, 5, 0.12);
  --bg-glow: radial-gradient(120% 50% at 50% 0%, #fde4eb 0%, #faf7f8 60%);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faf7f8; --bg-rgb: 250, 247, 248; --bg-raised: #ffffff;
    --surface: rgba(24, 1, 5, 0.04); --surface-2: rgba(24, 1, 5, 0.08); --line: rgba(24, 1, 5, 0.11);
    --text: #180105; --fg-rgb: 24, 1, 5; --muted: rgba(24, 1, 5, 0.64); --faint: rgba(24, 1, 5, 0.44);
    --contrast: #180105; --on-contrast: #ffffff; --input-bg: #ffffff; --pill: #ffffff;
    --gold: #b45309; --red: #dc2626;
    --shadow: 0 12px 32px rgba(24, 1, 5, 0.12);
    --bg-glow: radial-gradient(120% 50% at 50% 0%, #fde4eb 0%, #faf7f8 60%);
    color-scheme: light;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

:root[data-theme="light"] .tag.green-tag { color: #15803d; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .tag.green-tag { color: #15803d; } }

/* Gold buttons/tags need white text on the darker light-mode gold */
:root[data-theme="light"] .btn-gold, :root[data-theme="light"] .tag.gold-tag { color: #fff; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn-gold, :root:not([data-theme="dark"]) .tag.gold-tag { color: #fff; } }

/* Areas that sit on photos or crimson always stay dark, in both themes */
.hero-slide, .up-card, .card-crimson, .ticket-top, .lightbox, .about-hero, .auth-art, .on-dark {
  --fg-rgb: 255, 255, 255; --text: #ffffff; --muted: rgba(255, 255, 255, 0.74); --faint: rgba(255, 255, 255, 0.46);
  --contrast: #ffffff; --on-contrast: #180105; --gold: #fbbf24;
  --surface: rgba(255, 255, 255, 0.1); --surface-2: rgba(255, 255, 255, 0.16); --line: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

/* Theme toggle button */
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="dark"]) .theme-btn .moon { display: none; }
}
body, .topbar, .bottom-nav, .card, .sheet { transition: background-color .25s ease, color .25s ease; }

/* ==========================================================================
   Profile (signed in): hero, quick access, grouped lists, rewards, certificates
   ========================================================================== */
.pf-hero { position: relative; overflow: hidden; margin-top: 18px; padding: 20px 16px 16px; border-radius: 24px; box-shadow: 0 18px 40px rgba(160, 2, 45, 0.28); }
.pf-hero::before { content: ""; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, 0.28), transparent 70%); pointer-events: none; }
.pf-hero::after { content: ""; position: absolute; inset: 0; background: url(../assets/aac_logo.png) right -40px bottom -50px / 190px no-repeat; opacity: .07; pointer-events: none; }
.pf-id { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.pf-avatar { width: 76px; height: 76px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; font-weight: 800; color: var(--crimson); background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 0 0 5px var(--gold); }
button.pf-avatar { position: relative; padding: 0; border: 0; font-family: inherit; cursor: pointer; }
.pf-cam { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #180105; border: 2px solid var(--crimson-deep); }
.pf-cam .ico { width: 14px; height: 14px; }
.pf-photo-big { position: relative; width: 140px; height: 140px; margin: 4px auto 18px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: var(--crimson); background: #fff; box-shadow: 0 0 0 4px var(--gold); }
.pf-photo-actions { display: flex; flex-direction: column; gap: 10px; }
.pf-photo-link { display: flex; gap: 8px; }
.pf-photo-link .input { flex: 1; min-width: 0; }
.pf-photo-link .btn { flex: none; }
.pf-hi { flex: 1; min-width: 0; }
/* Names wrap instead of being cut off with dots. */
.pf-hi h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.4px; line-height: 1.2; overflow-wrap: break-word; }
.pf-hi h1.long { font-size: 1.12rem; }
.pf-hi p { margin-top: 2px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.pf-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pf-chips .pf-mid, .pf-chips .pf-rank { margin: 0; padding: 5px 12px 5px 9px; font-size: 0.76rem; }
.pf-rank { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px 3px 7px; border-radius: 99px; background: rgba(251, 191, 36, 0.18); color: var(--gold); font-size: 0.72rem; font-weight: 800; }
.pf-rank .ico { width: 14px; height: 14px; }
.pf-edit { align-self: flex-start; }
.pf-edit svg { width: 18px; height: 18px; }
/* Stats: one frosted-glass strip inside the crimson card, split by hairlines. */
.pf-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; }
.pf-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px 6px 12px; text-align: center; color: #fff; transition: background-color .15s; }
.pf-stat + .pf-stat { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.pf-stat:active { background: rgba(255, 255, 255, 0.08); }
.pf-stat-ico { display: grid; place-items: center; color: var(--gold); }
.pf-stat-ico .ico { width: 18px; height: 18px; }
.pf-stat > span:last-child { min-width: 0; }
.pf-stat b { display: block; font-size: 1.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.3px; }
.pf-stat small { display: block; margin-top: 1px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.pf-dash { display: inline-block; width: 26px; height: 16px; border-radius: 6px; vertical-align: middle; background-color: rgba(255, 255, 255, 0.18); }
/* Phones: smaller avatar, tighter stats strip. */
@media (max-width: 480px) {
  .pf-id { gap: 12px; }
  .pf-avatar { width: 58px; height: 58px; font-size: 1.5rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 0 0 4px var(--gold); }
  .pf-hi h1 { font-size: 1.22rem; }
  .pf-hi h1.long { font-size: 1.02rem; }
  .pf-stats { margin-top: 14px; }
  .pf-stat { padding: 12px 4px 10px; }
  .pf-stat b { font-size: 1.18rem; }
  .pf-stat small { font-size: 0.6rem; letter-spacing: 0.3px; }
}

.pf-complete { display: block; width: 100%; margin-top: 12px; text-align: left; }
.pf-complete-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 0.84rem; }
.pf-complete-top .gold { font-weight: 800; white-space: nowrap; }
.pf-complete .progress { display: block; }

.pf-bub { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(160, 2, 45, 0.16); color: var(--gold); }
.pf-bub .ico { width: 19px; height: 19px; }
.pf-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .pf-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-quick { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .15s, background .15s; }
.pf-quick:hover { background: var(--surface-2); }
.pf-quick:active { transform: scale(.98); }
.pf-quick .pf-bub { margin-bottom: 10px; }
.pf-quick b { font-size: 0.95rem; font-weight: 800; }
.pf-quick small { font-size: 0.72rem; font-weight: 600; color: var(--muted); padding-right: 34px; line-height: 1.35; }
.pf-go { position: absolute; right: 12px; bottom: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.pf-go .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.pf-list .pf-row { padding: 12px 14px; gap: 12px; }
.pf-list .pf-row .ico { color: inherit; }
.pf-list .pf-row .pf-bub .ico { color: var(--gold); }
.pf-list .pf-row .chev { color: var(--faint); }
.pf-tail { color: var(--faint); display: grid; }
.pf-tail .ico { width: 16px; height: 16px; }
.pf-logout { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--red); font-size: 0.95rem; font-weight: 800; }
.pf-logout:active { transform: scale(.98); }

/* Sub views (rewards, certificates) */
.pf-subhead { display: flex; align-items: center; gap: 12px; padding-top: 18px; }
.pf-subhead h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.4px; line-height: 1.2; }
.pf-subhead p { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.pf-subhead + .spinner, .pf-subhead + .empty { margin-top: 40px; }

.pf-rankcard { position: relative; overflow: hidden; margin-top: 18px; padding: 20px 18px 18px; border-radius: 24px; }
.pf-rankcard::after { content: ""; position: absolute; right: -50px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, 0.3), transparent 70%); }
.pf-rank-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.pf-rank-top small { font-size: 0.7rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.pf-rank-top h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.6px; line-height: 1.1; }
.pf-xp { text-align: right; }
.pf-xp b { font-size: 1.8rem; font-weight: 800; color: var(--gold); line-height: 1; }
.pf-xp small { display: block; }
.pf-rankcard .progress { position: relative; z-index: 1; height: 10px; background: rgba(255, 255, 255, 0.16); }
.pf-rankcard p { position: relative; z-index: 1; margin-top: 8px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.pf-rankcard p b { color: var(--text); }
/* Daily task done: green tick, points dimmed. */
.pf-row.done .pf-bub { background: rgba(34, 197, 94, 0.16); color: var(--green); }
.pf-row.done .pf-pts { opacity: .5; }
:root:root .pf-list .pf-row.done .pf-bub .ico { color: var(--green); } /* beats the light-theme crimson icon rule */
.pf-ladder { position: relative; z-index: 1; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 16px; }
.pf-ladder li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.64rem; font-weight: 800; color: var(--faint); }
.pf-ladder li::before { content: ""; position: absolute; top: 6px; left: -50%; right: 50%; height: 2px; background: rgba(255, 255, 255, 0.18); }
.pf-ladder li:first-child::before { display: none; }
.pf-ladder li i { position: relative; width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.pf-ladder li.on { color: var(--text); }
.pf-ladder li.on::before, .pf-ladder li.on i { background: var(--gold); }
.pf-ladder li.now i { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.3); }

.pf-earn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .pf-earn { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pf-earn-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 0.76rem; font-weight: 700; line-height: 1.3; }
.pf-earn-item .pf-bub { width: 32px; height: 32px; }
.pf-earn-item .pf-bub .ico { width: 16px; height: 16px; }
.pf-earn-item span:nth-child(2) { flex: 1; min-width: 0; }
.pf-earn-item b, .pf-pts { color: var(--green); font-weight: 800; font-size: 0.82rem; white-space: nowrap; }

.pf-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .pf-badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pf-medal { width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--fg-rgb), 0.08); color: var(--faint); border: 2px dashed rgba(var(--fg-rgb), 0.18); }
.pf-medal .ico { width: 24px; height: 24px; }
.pf-badge b { font-size: 0.84rem; font-weight: 800; }
.pf-badge small { font-size: 0.68rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
.pf-badge em { margin-top: 4px; font-style: normal; font-size: 0.66rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pf-badge:not(.on) b { color: var(--muted); }
.pf-badge.on { border-color: rgba(251, 191, 36, 0.4); background: linear-gradient(180deg, rgba(251, 191, 36, 0.1), var(--surface)); }
.pf-badge.on .pf-medal { border: 0; color: #fff; background: linear-gradient(135deg, var(--crimson-2), var(--crimson-deep)); box-shadow: 0 0 0 3px var(--gold), 0 8px 18px rgba(160, 2, 45, 0.35); }
.pf-list .locked { opacity: .55; }
.pf-min { margin-left: 4px; font-size: 0.66rem; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); vertical-align: 1px; }

.pf-cert-list { display: flex; flex-direction: column; gap: 10px; }
.pf-cert { position: relative; width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 52px 12px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: left; transition: background .15s, transform .15s; }
.pf-cert:hover { background: var(--surface-2); }
.pf-cert:active { transform: scale(.99); }
.pf-cert .grow { flex: 1; min-width: 0; }
.pf-cert b { display: block; font-size: 0.92rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-cert small { display: block; font-size: 0.74rem; font-weight: 600; color: var(--muted); }
.pf-cert .pf-go { top: 50%; bottom: auto; transform: translateY(-50%); }
.pf-cert.locked { opacity: .55; }
.pf-cert.locked:hover { background: var(--surface); }
.pf-cert.locked:active { transform: none; }
.pf-cert.locked .pf-cert-art { filter: grayscale(1); }
.pf-cert-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.pf-cert-note .ico { flex: none; width: 18px; height: 18px; color: var(--gold); }
.pf-cert-art { width: 54px; height: 54px; flex: none; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.pf-cert-art.member { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--crimson-2), var(--crimson-deep)); box-shadow: inset 0 0 0 2px rgba(251, 191, 36, 0.6); }
.pf-cert-art.member .ico { width: 26px; height: 26px; color: #fbbf24; }
.pf-cert-sheet { max-width: 720px; }
.pf-cert-preview { display: grid; place-items: center; min-height: 180px; border-radius: 12px; overflow: hidden; background: var(--surface); }
.pf-cert-preview img { width: 100%; height: auto; }
.pf-cert-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pf-cert-tip { margin-top: 10px; font-size: 0.74rem; font-weight: 600; text-align: center; }

/* Light theme: softer bubbles, white tiles get a border */
:root[data-theme="light"] .pf-bub { background: #fde4eb; color: var(--crimson); }
:root[data-theme="light"] .pf-earn-item b, :root[data-theme="light"] .pf-pts { color: #15803d; }
:root[data-theme="light"] .pf-list .pf-row .pf-bub .ico { color: var(--crimson); }
:root[data-theme="light"] .pf-quick, :root[data-theme="light"] .pf-list, :root[data-theme="light"] .pf-badge, :root[data-theme="light"] .pf-cert, :root[data-theme="light"] .pf-earn-item, :root[data-theme="light"] .pf-logout { background: #fff; box-shadow: 0 4px 14px rgba(24, 1, 5, 0.05); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .pf-bub { background: #fde4eb; color: var(--crimson); }
  :root:not([data-theme="dark"]) .pf-earn-item b, :root:not([data-theme="dark"]) .pf-pts { color: #15803d; }
  :root:not([data-theme="dark"]) .pf-list .pf-row .pf-bub .ico { color: var(--crimson); }
  :root:not([data-theme="dark"]) .pf-quick, :root:not([data-theme="dark"]) .pf-list, :root:not([data-theme="dark"]) .pf-badge, :root:not([data-theme="dark"]) .pf-cert, :root:not([data-theme="dark"]) .pf-earn-item, :root:not([data-theme="dark"]) .pf-logout { background: #fff; box-shadow: 0 4px 14px rgba(24, 1, 5, 0.05); }
}
/* Member ID chip (profile hero) and ID card sheet */
.pf-hi .pf-mid, .pf-hi .pf-rank { margin-right: 6px; }
.pf-mid { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px 3px 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 0.72rem; font-weight: 700; vertical-align: middle; }
.pf-mid .ico { width: 14px; height: 14px; color: var(--gold); }
.pf-mid span { opacity: .7; }
.pf-mid b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .5px; }
.pf-hi .pf-rank { vertical-align: middle; }
/* Member ID card: premium credential, same look as the /verify page the QR opens */
.pf-idcard { position: relative; padding: 1px; border-radius: 24px;
  background: linear-gradient(140deg, rgba(246,196,83,.9), rgba(246,196,83,.15) 30%, rgba(255,255,255,.08) 55%, rgba(246,196,83,.7));
  box-shadow: 0 24px 50px -18px rgba(196,8,58,.6), 0 0 0 1px rgba(0,0,0,.35); color: #fff; }
.pf-idcard-in { position: relative; overflow: hidden; border-radius: 23px; padding: 18px;
  background: radial-gradient(120% 60% at 100% 0%, rgba(246,196,83,.18), transparent 60%), linear-gradient(160deg, #c4083a 0%, #a0022d 38%, #3d000f 100%); }
.pf-idcard-in::before { content: ""; position: absolute; inset: -40%; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.16) 48%, rgba(246,196,83,.18) 52%, transparent 58%);
  transform: translateX(-60%); animation: idSheen 5.5s ease-in-out 1s infinite; }
.pf-idcard-in::after { content: ""; position: absolute; left: -80px; bottom: -80px; width: 240px; height: 240px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(255,255,255,.06) 0 1px, transparent 1px 14px); }
@keyframes idSheen { 0%, 60% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.pf-idcard-top, .pf-idcard-who, .pf-idcard-main { position: relative; z-index: 1; }
.pf-idcard-top { display: flex; align-items: center; gap: 10px; }
.pf-idcard-mark { flex: none; height: 34px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.pf-idcard-top span { flex: 1; min-width: 0; font-size: 0.76rem; font-weight: 800; letter-spacing: 2px; line-height: 1.25; }
.pf-idcard-top small { display: block; font-size: 0.58rem; letter-spacing: 2px; color: #f6c453; text-transform: uppercase; }
.pf-idcard-chip { flex: none; width: 36px; height: 27px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
  background: linear-gradient(90deg, transparent 32%, rgba(0,0,0,.22) 33% 35%, transparent 36% 64%, rgba(0,0,0,.22) 65% 67%, transparent 68%),
    linear-gradient(0deg, transparent 45%, rgba(0,0,0,.22) 46% 54%, transparent 55%), linear-gradient(135deg, #f8dc8a, #b9862a 55%, #f6c453); }
.pf-idcard-who { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.pf-idcard-ava { flex: none; width: 64px; height: 64px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 210deg, #f8dc8a, #b9862a, #fff3c4, #f6c453, #f8dc8a); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.pf-idcard-ava > * { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: linear-gradient(160deg, #2a0009, #5c0018); color: #f6c453; font-weight: 800; font-size: 1.3rem; border: 2px solid #3d000f; }
.pf-idcard-info { flex: 1; min-width: 0; }
.pf-idcard-info b { display: block; font-weight: 800; }
.pf-idcard-name { font-size: 1.2rem; line-height: 1.2; letter-spacing: -.2px; overflow-wrap: anywhere; }
.pf-idcard-id { margin-top: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 2px;
  background: linear-gradient(90deg, #fff3c4, #f6c453 50%, #e0a93a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-idcard-main { display: flex; gap: 12px; align-items: stretch; margin-top: 16px; }
.pf-idcard-row { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.12); align-content: stretch; }
.pf-idcard-row span { padding: 8px 10px; background: rgba(20,0,5,.45); min-width: 0; }
.pf-idcard-row small { display: block; font-size: 0.54rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.55); }
.pf-idcard-row b { display: block; margin-top: 2px; font-size: 0.78rem; font-weight: 800; overflow-wrap: anywhere; }
.pf-idcard-row .gold { color: #f6c453; }
.pf-idcard-live { display: inline-flex !important; align-items: center; gap: 5px; }
.pf-idcard-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; animation: idPing 1.8s infinite; }
@keyframes idPing { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.7); } 80%, 100% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } }
.pf-idcard-qrbox { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.pf-idcard-qrbox small { font-size: 0.52rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #f6c453; }
.pf-idcard-qr { width: 96px; height: 96px; padding: 6px; border-radius: 12px; background: #fff; color: #180105; display: grid; place-items: center; font-size: .7rem; font-weight: 800;
  box-shadow: 0 0 0 2px rgba(246,196,83,.8), 0 8px 18px rgba(0,0,0,.3); }
.pf-idcard-qr img, .pf-idcard-qr canvas { width: 100% !important; height: 100% !important; }
@media (max-width: 340px) { .pf-idcard-row { grid-template-columns: 1fr; } .pf-idcard-qr { width: 84px; height: 84px; } }

/* Team edition: members with a club role get black + gold foil, a turning gold edge and a role badge */
@property --id-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.pf-idcard--team { padding: 1.5px;
  background: conic-gradient(from var(--id-ang), #f6c453, #7a5418 20%, #fff3c4 35%, #b9862a 50%, #f6c453 65%, #5e3f10 80%, #f6c453);
  box-shadow: 0 26px 56px -18px rgba(246,196,83,.45), 0 0 0 1px rgba(0,0,0,.5); animation: idEdge 6s linear infinite; }
@keyframes idEdge { to { --id-ang: 360deg; } }
.pf-idcard--team .pf-idcard-in {
  background:
    radial-gradient(90% 55% at 100% 0%, rgba(246,196,83,.26), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(196,8,58,.32), transparent 65%),
    linear-gradient(160deg, #1d1408 0%, #0d0805 45%, #1a0308 100%); }
.pf-idcard--team .pf-idcard-in::before { background: linear-gradient(115deg, transparent 40%, rgba(255,243,196,.22) 47%, rgba(246,196,83,.28) 52%, transparent 60%); animation-duration: 4s; }
.pf-idcard--team .pf-idcard-in::after { background: repeating-radial-gradient(circle, rgba(246,196,83,.1) 0 1px, transparent 1px 14px); }
.pf-idcard--team .pf-idcard-top small { color: #fff3c4; }
.pf-idcard--team .pf-idcard-name { background: linear-gradient(90deg, #fff, #fff3c4 60%, #f6c453); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-idcard--team .pf-idcard-ava { box-shadow: 0 0 0 3px rgba(246,196,83,.18), 0 0 24px rgba(246,196,83,.45); }
.pf-idcard--team .pf-idcard-row { background: rgba(246,196,83,.28); }
.pf-idcard--team .pf-idcard-row span { background: rgba(10,6,3,.78); }
.pf-idcard-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 12px 5px 8px; border-radius: 99px;
  background: linear-gradient(135deg, #fff3c4, #f6c453 50%, #c8902e); color: #1a0e02; box-shadow: 0 6px 16px -4px rgba(246,196,83,.6), inset 0 1px 0 rgba(255,255,255,.6);
  font-size: .66rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; max-width: 100%; }
.pf-idcard-badge .ico { width: 13px; height: 13px; flex: none; stroke-width: 2.6; }
.pf-idcard-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pf-idcard--team { animation: none; } }
@media (prefers-reduced-motion: reduce) { .pf-idcard-in::before, .pf-idcard-live::before { animation: none; } }
