/* KSN Events — shared styles (built from the KSN Events website design) */
:root {
  --red: #C60B22;
  --red-dark: #9A0819;
  --black: #000000;
  --white: #FFFFFF;
  --s1: #111111;
  --s2: #1A1A1A;
  --line: #2A2A2A;
  --line-2: #3A3A3A;
  --muted: #A3A3A3;
  --soft: #CCCCCC;
  --display: 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--black); color: var(--white); font-family: var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }   /* never scroll sideways (clip keeps sticky parts working) */
img { max-width: 100%; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
button, input, select, textarea, optgroup { font: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; border-radius: 12px; transition: background .15s, color .15s, border-color .15s; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); }
.btn-white { background: var(--white); color: var(--black); }
.btn-white:hover { background: #E6E6E6; color: var(--black); }
.btn-ghost { background: transparent; border: 1px solid var(--white); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn-sm { font-size: 12px; padding: 10px 16px; }
.btn-md { font-size: 13px; padding: 0 18px; min-height: 38px; }
.btn-lg { font-size: 14px; min-height: 45px; border-radius: 7px; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Header (liquid glass bar) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 16px 32px; }
.site-header.overlay { margin-bottom: -100px; }
.ksn-glass {
  position: relative; max-width: calc(var(--max) - 64px); margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.05) 55%, rgba(160,235,235,0.10) 100%), rgba(45,48,50,0.62);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.38); border-radius: 18px; padding: 12px 32px;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(150,240,235,0.7), inset 0 0 22px rgba(255,255,255,0.08);
}
.ksn-glass::before { content: ""; position: absolute; top: -3px; left: 12%; width: 90px; height: 8px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,255,255,0.95), rgba(255,255,255,0) 70%); pointer-events: none; }
.ksn-glass::after { content: ""; position: absolute; bottom: -2px; left: 22%; right: 22%; height: 5px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(150,240,235,0.85), rgba(150,240,235,0) 70%); pointer-events: none; }
.brand { display: flex; align-items: center; }
.brand img { height: 32px; width: auto; display: block; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { color: var(--soft); text-decoration: none; }
.nav a:hover { color: var(--white); }
.spacer { flex: 1; }
.menu-btn { display: none; width: 40px; height: 40px; margin-right: -8px; border: none; border-radius: 10px; background: transparent; color: var(--white); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn:hover { background: rgba(255,255,255,0.1); }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline; }
.mobile-menu { flex-basis: 100%; display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 8px; margin-top: -4px; }
.mobile-menu a { color: var(--white); text-decoration: none; font-size: 16px; font-weight: 500; padding: 12px 4px; border-radius: 8px; }
.mobile-menu a + a { border-top: 1px solid rgba(255,255,255,0.08); }
.mobile-menu a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.header-gap { height: 100px; }

/* ---------- Footer ---------- */
.site-footer { padding: 0 32px 48px; }
.foot-card { max-width: calc(var(--max) - 64px); margin: 0 auto; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.foot-in { padding: 40px 56px; display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; }
.foot-in > img { height: 34px; width: auto; display: block; }
.foot-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 24px 32px; }
.foot-grp { display: flex; align-items: center; gap: 16px; }
.foot-grp strong { font-size: 16px; }
.foot-div { width: 1px; height: 29px; background: var(--line-2); }
.icons { display: flex; gap: 10px; }
.icon-btn { width: 29px; height: 29px; border-radius: 4px; background: var(--red); color: var(--white); display: flex; align-items: center; justify-content: center; transition: background .15s; }
.icon-btn:hover { background: var(--red-dark); color: var(--white); }
.foot-copy { border-top: 1px solid var(--line); padding: 16px 56px; color: var(--muted); font-size: 13px; }

/* ---------- Home: banners ---------- */
.feat { padding-top: 24px; }
.banners { display: flex; gap: 20px; align-items: stretch; }
.slider { flex: 1.7655 1 0; min-width: 0; position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1024 / 580; }
.slide { position: absolute; inset: 0; display: block; transition: opacity .6s ease; opacity: 0; pointer-events: none; }
.slide.on { opacity: 1; pointer-events: auto; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.35); background: rgba(0,0,0,0.45); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.slide-arrow.prev { left: 12px; } .slide-arrow.next { right: 12px; }
.dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 4px; z-index: 2; }
.dots button { width: 28px; height: 28px; border: none; background: transparent; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dots span { display: block; height: 8px; width: 8px; border-radius: 4px; background: rgba(255,255,255,0.7); transition: width .3s; }
.dots .on span { width: 22px; background: var(--red); }
.side-banner { flex: 0.7715 1 0; min-width: 0; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.side-banner img { display: block; width: 100%; height: 100%; aspect-ratio: 790 / 1024; object-fit: cover; }

/* ---------- Home: events ---------- */
#events { padding-top: 48px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 28px; scroll-margin-top: 100px; }
.events-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.events-head h2 { margin: 0; font-size: 36px; }
.tabs { display: flex; gap: 4px; background: var(--s2); border-radius: 14px; padding: 4px; }
.tabs button { border: none; font-size: 11px; font-weight: 600; padding: 0 13px; min-height: 35px; border-radius: 12px; cursor: pointer; background: transparent; color: var(--soft); }
.tabs button[aria-selected="true"] { background: var(--white); color: var(--black); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { font-size: 12px; font-weight: 500; padding: 0 14px; min-height: 35px; border-radius: 12px; cursor: pointer; border: 1px solid var(--line-2); background: var(--s1); color: var(--white); }
.pill:hover { border-color: var(--white); }
.pill[aria-pressed="true"] { border-color: var(--red); background: var(--red); }
.empty { border: 1px dashed #555; border-radius: 16px; padding: 48px; text-align: center; color: var(--muted); font-size: 16px; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
/* event card (home page) */
.ec { display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--white); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; min-width: 0; }
.ec:hover { transform: translateY(-3px); border-color: #4A4A4A; box-shadow: 0 12px 28px rgba(0,0,0,0.5); color: var(--white); }
.ec-media { position: relative; aspect-ratio: 1 / 1; background: var(--s2); overflow: hidden; }   /* posters are 3000 × 3000 (square) */
.ec-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ec-fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px 16px; background-image: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(0,0,0,0.35)); }
.ec-fallback span { font-size: 22px; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; text-transform: uppercase; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-date { position: absolute; top: 14px; left: 14px; min-width: 56px; padding: 7px 8px 6px; border-radius: 12px; background: var(--white); color: var(--black); display: flex; flex-direction: column; align-items: center; line-height: 1.05; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.ec-date small { font-size: 13px; font-weight: 500; }
.ec-date b { font-size: 24px; font-weight: 700; margin: 1px 0; }
.ec-cat { position: absolute; top: 14px; right: 14px; padding: 6px 12px; border-radius: 999px; background: var(--white); color: var(--black); font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,0.35); max-width: calc(100% - 100px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px; }
.ec-title { margin: 0 0 4px; font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ec-line { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--soft); min-width: 0; }
.ec-line svg { flex: none; color: var(--muted); }
.ec-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Home: organizer CTA ---------- */
.org { margin-top: 48px; }
.org-box { background: var(--red); border-radius: 24px; padding: 56px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.org-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 18px; }
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.org-copy h2 { margin: 0; font-size: 44px; line-height: 1.05; }
.org-copy p { margin: 0; font-size: 17px; line-height: 1.55; max-width: 480px; }
.org-copy .btn { align-self: flex-start; background: var(--white); color: var(--red); font-size: 13px; padding: 11px 19px; margin-top: 6px; }
.org-copy .btn:hover { background: #F2F2F2; }
.steps { flex: 1 1 360px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: center; background: rgba(255,255,255,0.12); border-radius: 14px; padding: 18px 20px; font-size: 16px; }
.steps b { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--white); color: var(--red); display: flex; align-items: center; justify-content: center; }

/* ---------- Event page ---------- */
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs span:last-child { color: var(--white); }
.hero { background: var(--s2) center / cover no-repeat; border-radius: 24px; min-height: 380px; padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; position: relative; overflow: hidden; }
.hero.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.8)); }
.hero > * { position: relative; }
.hero .chip { align-self: flex-start; background: rgba(255,255,255,0.16); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero h1 { margin: 0; font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: -0.03em; }
.cols { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact small { font-size: 13px; color: var(--muted); }
/* event page: flyer on one side, countdown / name / date / venue / tickets on the other */
.ev-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
.ev-left { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; }
.ev-flyer { aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; background: var(--s2); border: 1px solid var(--line); }
.ev-flyer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-flyer-btn { display: block; width: 100%; padding: 0; position: relative; cursor: zoom-in; font: inherit; color: inherit; }
.ev-flyer-btn:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.ev-zoom { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; color: #fff; transition: background .15s; }
.ev-flyer-btn:hover .ev-zoom { background: var(--red); }
/* flyer full size */
.fv-dlg { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: none; background: transparent; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fv-dlg:not([open]) { display: none; }
.fv-dlg::backdrop { background: rgba(0,0,0,.92); }
.fv-stage { position: fixed; inset: 0; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; padding: 72px 16px 84px; overflow: auto; overscroll-behavior: contain; }
.fv-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); cursor: zoom-in; }
/* zoomed in: the flyer is bigger than the screen and can be moved around */
.fv-dlg.is-zoomed .fv-stage { display: block; padding: 72px 16px 84px; cursor: grab; }
.fv-dlg.is-zoomed .fv-img { max-width: none; max-height: none; height: auto; margin: 0 auto; cursor: zoom-out; border-radius: 0; }
.fv-zoom { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.7); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.fv-zoom:hover { background: var(--red); border-color: var(--red); }
.fv-zoom:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fv-x { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.fv-x:hover { background: var(--red); border-color: var(--red); }
.fv-x:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
html.fv-open { overflow: hidden; }
.ev-flyer.no-img { display: flex; align-items: center; justify-content: center; padding: 32px; text-align: center; }
.ev-flyer.no-img span { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ev-tags { display: flex; align-items: center; gap: 10px; }
.ev-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; }
.ev-share { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ev-share:hover { background: var(--s2); }
.ev-right { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cd-card { border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 20px; text-align: center; background: radial-gradient(120% 140% at 50% 0%, rgba(198,11,34,.18), rgba(255,255,255,.02) 60%); }
.cd-head { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.cd-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.cd-card .cd-nums { display: flex; justify-content: center; align-items: flex-start; gap: 10px; margin-top: 10px; }
.cd-card .cd-u { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0; background: none; border: none; }
.cd-card .cd-u b { font-size: 40px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cd-card .cd-u small { font-size: 13px; font-weight: 600; color: var(--soft); margin-top: 2px; }
.cd-sep { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--soft); }
.cd-card .cd-live { color: #4ADE80; font-size: 15px; }
.cd-card .cd-live i { background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.25); }
.cd-card .cd-ended { font-size: 15px; letter-spacing: .04em; color: var(--muted); }
.ev-title { margin: 0; font-size: 48px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ev-row { display: flex; align-items: center; gap: 14px; }
.ev-cal, .ev-pin { flex: none; width: 50px; height: 52px; border-radius: 10px; border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.ev-cal small { width: 100%; text-align: center; background: var(--s2); font-size: 11px; font-weight: 700; padding: 3px 0; }
.ev-cal b { flex: 1; display: flex; align-items: center; font-size: 18px; font-weight: 700; }
.ev-pin { color: var(--white); }
.ev-row-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-row-t b { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.ev-row-t small { font-size: 14px; color: var(--muted); }
.ev-row-t a { font-size: 14px; color: var(--muted); align-self: flex-start; display: inline-flex; align-items: center; min-height: 32px; margin: -6px 0; }   /* easy to tap on phones */
.ev-row-t a:hover { color: var(--white); }
.ev-right .cal { align-self: flex-start; }
.ev-right .cal-menu { left: 0; right: auto; }
.ev-right .tickets { position: static; flex: none; }
.ev-more { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
/* About / Location / Organizer: long words, links and hashtags wrap instead of running off the screen */
.ev-more .sec { min-width: 0; }
.ev-more .sec p { max-width: 820px; overflow-wrap: anywhere; word-break: break-word; }
.ev-more .sec > span { overflow-wrap: anywhere; }
.ev-more .organizer .who { min-width: 0; }
.ev-more .organizer .who b { overflow-wrap: anywhere; }
.ev-more .map { height: 300px; }
@media (max-width: 640px) {
  .ev-more { gap: 24px; }
  .ev-more .sec h2 { font-size: 22px; }
  .ev-more .sec p { font-size: 15px; line-height: 1.6; }
  .ev-more .map { height: 220px; border-radius: 12px; }
  .ev-more .organizer { padding: 16px; gap: 12px; }
  .ev-more .avatar { width: 44px; height: 44px; }
}
@media (max-width: 900px) {
  .ev-top { grid-template-columns: 1fr; gap: 24px; }
  .ev-left { position: static; max-width: 520px; width: 100%; margin: 0 auto; }
  .ev-title { font-size: 34px; }
}
@media (max-width: 480px) {
  .cd-card { padding: 18px 10px; }
  .cd-card .cd-nums { gap: 6px; }
  .cd-card .cd-u b { font-size: 30px; }
  .cd-sep { font-size: 26px; }
  .ev-title { font-size: 28px; }
  .ev-right .cal, .ev-right .cal-btn { width: 100%; }
  .ev-right .cal-menu { right: 0; }
}
/* event page: "Your event is published" note for its organizer */
.ev-published { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px; background: rgba(22,163,74,.12); border: 1px solid rgba(22,163,74,.5); color: #D1FAE5; font-size: 15px; }
.ev-published svg { flex: none; color: #4ADE80; }
.ev-published b { color: #fff; }
.ev-pub-t { flex: 1; min-width: 180px; }
.ev-pub-links { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-pub-links a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.ev-pub-links a:hover { background: rgba(255,255,255,.08); }
.ev-pub-links a.ev-pub-done { background: #16A34A; border-color: #16A34A; min-width: 88px; justify-content: center; }
.ev-pub-links a.ev-pub-done:hover { background: #15803D; }
/* event page: countdown + add to calendar */
.ev-when { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cd { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; }
.cd-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.cd-units { display: flex; gap: 10px; }
.cd-u { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 8px 10px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line-2); }
.cd-u b { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-u small { font-size: 12px; color: var(--muted); }
.cd-state { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.cd-live { color: #4ADE80; }
.cd-live i { width: 10px; height: 10px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.25); }
.cd-ended { color: var(--muted); }
.cal { position: relative; }
.cal-btn { min-height: 44px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.cal-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: #111; border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.cal-menu[hidden] { display: none; }
.cal-menu a, .cal-menu button { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 8px; background: none; border: none; color: var(--white); font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.cal-menu a:hover, .cal-menu button:hover, .cal-menu a:focus-visible, .cal-menu button:focus-visible { background: var(--s2); }
.done .cal-menu { left: 50%; right: auto; transform: translateX(-50%); }
@media (max-width: 640px) {
  .ev-when { flex-direction: column; align-items: stretch; }
  .cd { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cd-units { width: 100%; }
  .cd-u { flex: 1; min-width: 0; }
  .cal-btn { width: 100%; }
  .cal-menu { left: 0; right: 0; min-width: 0; }
}
.fact b { font-weight: 600; }
.sec { display: flex; flex-direction: column; gap: 12px; }
.sec h2 { margin: 0; font-size: 26px; }
.sec p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--soft); white-space: pre-line; }
.map { border: 0; background: var(--line); border-radius: 16px; height: 240px; width: 100%; display: block; }
.organizer { display: flex; align-items: center; gap: 16px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.organizer .who { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.organizer .who small { font-size: 13px; color: var(--muted); }
.organizer .who b { font-size: 17px; font-weight: 600; }

.tickets { flex: 1 1 360px; background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.tickets h2 { margin: 0; font-size: 24px; }
.tier { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.tier .info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tier .info b { font-weight: 600; font-size: 16px; }
.tier .info small { font-size: 14px; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 35px; height: 35px; border-radius: 25%; font-size: 16px; cursor: pointer; }
.qty .minus { border: 1px solid var(--line-2); background: var(--s1); color: var(--white); }
.qty .plus { border: 1px solid var(--white); background: var(--white); color: var(--black); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty output { min-width: 28px; text-align: center; font-weight: 600; font-size: 17px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; }
.total-row span { font-size: 15px; color: var(--muted); }
.total-row strong { font-family: var(--display); font-size: 28px; font-weight: 700; }
.fine { font-size: 13px; color: var(--muted); text-align: center; }
/* long names, links and words typed by organizers/buyers wrap instead of running off the screen (all pages) */
.tier .info { min-width: 0; }
.tier .info b, .tier .info small { overflow-wrap: anywhere; }
.summary { min-width: 0; }
.sum-event div { min-width: 0; }
.sum-event b, .sum-event small, .summary .lines span:first-child, #lines span:first-child { overflow-wrap: anywhere; }
.ev-name > span { min-width: 0; }
.ev-name b, .ev-name small { overflow-wrap: anywhere; }
.ev-table td { overflow-wrap: anywhere; }
.pf-dl dd > * { min-width: 0; overflow-wrap: anywhere; }
.pf-dl dd > .pf-copy { min-width: 40px; min-height: 40px; flex: none; margin: -10px 0; }   /* copy button keeps a full tap size */
.pv-dl a { display: inline-flex; align-items: center; min-height: 36px; margin: -8px 0; }   /* "See the ticket page" easy to tap */
.pf-bio { overflow-wrap: anywhere; }
.ad-list li > span, .ad-dl dd, .ad-bio { min-width: 0; overflow-wrap: anywhere; }
.ev-title, .ev-row-t b, .ce-in { overflow-wrap: anywhere; }
.bal-row { flex-wrap: wrap; }   /* big balances: the Cash out button moves under the amount on small phones */
.bal-row > div { min-width: 0; }
.pf-dl dd { flex-wrap: wrap; }
@media (max-width: 360px) { .st-tabs { padding: 10px; gap: 8px; } .st-tabs button { padding: 8px 10px; gap: 8px; font-size: 14px; } }
/* organizer dashboard: event preview (after publish / edit) — separate from the public ticket page */
.pv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-btn { min-height: 42px; padding: 0 18px; border-radius: 10px; font-size: 14px; }
.pv-btn[disabled] { opacity: .4; cursor: not-allowed; }
.pv-done { background: #16A34A; color: #fff; min-width: 96px; }
.pv-done:hover { background: #15803D; color: #fff; }
.pv-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: rgba(22,163,74,.12); border: 1px solid rgba(22,163,74,.5); color: #D1FAE5; font-size: 14px; }
.pv-note svg { flex: none; color: #4ADE80; }
.pv-note b { color: #fff; }
.pv-card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; min-width: 0; }
.pv-block { display: block; }
.pv-block h3 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.pv-missing { margin: 0; grid-column: 1 / -1; color: var(--soft); }
.pv-flyer { aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--s2); }
.pv-flyer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-flyer.no-img { display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font-weight: 800; font-size: 20px; overflow-wrap: anywhere; }
.pv-info { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pv-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-st-soldout { background: rgba(245,158,11,.15); color: #FBBF24; }
.pv-title { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.pv-dl { margin: 0; display: grid; gap: 10px; }
.pv-dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; }
.pv-dl dt { color: var(--muted); font-size: 14px; }
.pv-dl dd { margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.pv-dl a { color: var(--white); }
.pv-desc { margin: 0; font-size: 15px; line-height: 1.6; color: var(--soft); white-space: pre-line; overflow-wrap: anywhere; }
.pv-tickets { display: flex; flex-direction: column; gap: 10px; }
.pv-tier { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.pv-tier-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pv-tier-name b, .pv-stat b { overflow-wrap: anywhere; }
.pv-tier-name small, .pv-stat small { font-size: 12px; color: var(--muted); }
.pv-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-stat b { font-size: 15px; font-weight: 600; }
@media (max-width: 760px) {
  .pv-card { grid-template-columns: 1fr; }
  .pv-flyer { max-width: 320px; width: 100%; }
  .pv-title { font-size: 22px; }
  .pv-tier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-tier-name { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .pv-actions { width: 100%; }
  .pv-actions .pv-btn { flex: 1; }
  .pv-dl > div { grid-template-columns: 1fr; gap: 2px; }
}
/* "Create this event?" confirmation (Publish event) */
.pc-dlg { position: relative; width: min(520px, calc(100vw - 24px)); max-width: none; padding: 44px 28px 32px; border: 1px solid var(--line-2); border-radius: 16px; background: #1F1F1F; color: var(--white); text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.7); }
.pc-dlg::backdrop { background: rgba(0,0,0,.7); }
.pc-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: none; border-radius: 10px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pc-x:hover { background: var(--s2); color: var(--white); }
.pc-ic { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; line-height: 1; }
.pc-dlg h2 { margin: 0 0 10px; font-size: 24px; font-weight: 700; }
.pc-dlg p { margin: 0 auto; max-width: 400px; font-size: 15px; line-height: 1.55; color: var(--soft); }
.pc-btns { display: flex; justify-content: center; gap: 12px; margin-top: 26px; }
.pc-btns button { min-width: 110px; min-height: 44px; padding: 0 20px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pc-cancel { background: transparent; border: 1px solid var(--red); color: #FF4D5E; }
.pc-cancel:hover { background: rgba(198,11,34,.12); }
.pc-ok { background: #16A34A; border: 1px solid #16A34A; color: #fff; }
.pc-ok:hover { background: #15803D; }
.pc-btns button:disabled { cursor: progress; }
.pc-ok[aria-busy="true"] { background: var(--s2); border-color: var(--line-2); color: var(--muted); }
.pc-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pcspin .7s linear infinite; }
@keyframes pcspin { to { transform: rotate(360deg); } }
.pc-btns button:focus-visible, .pc-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* after Confirm: EVENT CREATED SUCCESSFUL! */
.pc-ok-ic { background: #16A34A; }
.pc-done-t { color: #4ADE80; letter-spacing: .01em; text-transform: uppercase; }
.pc-view { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin-top: 24px; border-radius: 10px; background: var(--red); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.pc-view:hover { background: var(--red-dark); color: #fff; }
.pc-view:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 420px) { .pc-dlg { padding: 40px 18px 24px; } .pc-dlg h2 { font-size: 21px; } .pc-btns button { flex: 1; min-width: 0; } }
/* Edit event window (organizer dashboard, opens over the event preview page) */
.ed-dlg { width: min(560px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); overflow: auto; padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--s1); color: var(--white); box-shadow: 0 24px 60px rgba(0,0,0,.7); overscroll-behavior: contain; }
.ed-dlg::backdrop { background: rgba(0,0,0,.72); }
.ed-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; background: var(--s1); border-bottom: 1px solid var(--line); }
.ed-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ed-x { width: 40px; height: 40px; border: none; border-radius: 10px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ed-x:hover { background: var(--s2); color: var(--white); }
.ed-form { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 20px; }
.ed-drop { display: block; border: 1px dashed #555; border-radius: 12px; padding: 10px; cursor: pointer; background: var(--black); transition: border-color .15s; }
.ed-drop:hover, .ed-drop.bad { border-color: var(--red); }
.ed-drop:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.ed-drop img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.ed-drop-hint { display: block; text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.ed-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; color: var(--soft); text-align: center; }
.ed-drop-empty b { color: var(--white); font-size: 15px; }
.ed-drop-empty small { font-size: 12px; color: var(--muted); }
.ed-thumbs:empty { display: none; }
.ed-thumb { width: 124px; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--black); }
.ed-thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.ed-thumb-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 6px 6px 8px; }
.ed-default { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.ed-default i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--red); background: #fff; }
.ed-rm { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ed-rm:hover { color: #fff; background: var(--red); border-color: var(--red); }
.ed-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ed-l { font-size: 13px; font-weight: 600; color: var(--soft); }
.ed-l::before { content: "* "; color: var(--red); }
.ed-when { display: grid; grid-template-columns: auto minmax(0, 1fr) 120px; gap: 8px; align-items: center; padding: 10px; border-radius: 10px; background: var(--black); border: 1px solid var(--line); }
.ed-wl { font-size: 14px; font-weight: 600; color: var(--soft); padding: 0 6px; }
.ed-tiers { display: flex; flex-direction: column; gap: 10px; }
.ed-tier { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; }
.ed-tn, .ed-td, .ed-tier-foot { grid-column: 1 / -1; }
.ed-tn { font-weight: 600; }
.ed-sm { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed-sm span { font-size: 12px; color: var(--muted); }
.ed-tier-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ed-tier-foot small { font-size: 12px; color: var(--muted); }
.ed-tier-rm { background: none; border: none; color: #F87171; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 32px; padding: 0 6px; }
.ed-add { align-self: flex-start; margin-top: 4px; background: none; border: 1px dashed var(--line-2); color: var(--white); border-radius: 10px; min-height: 40px; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ed-add:hover { border-color: var(--red); }
.ed-btns { position: sticky; bottom: -20px; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0 0; margin-top: 4px; background: var(--s1); }
.ed-btns button { min-height: 44px; padding: 0 20px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.ed-cancel { background: transparent; border: 1px solid var(--line-2); color: var(--white); }
.ed-cancel:hover { background: var(--s2); }
.ed-save { background: var(--red); border: none; color: #fff; }
.ed-save:hover { filter: brightness(1.1); }
.ed-btns button:focus-visible, .ed-x:focus-visible, .ed-rm:focus-visible, .ed-add:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#editBtn { gap: 8px; }
@media (max-width: 480px) {
  .ed-form { padding: 14px 14px 16px; gap: 14px; }
  .ed-when { grid-template-columns: auto minmax(0, 1fr); }
  .ed-when .ce-in[type="time"] { grid-column: 2; }
  .ed-btns button { flex: 1; }
}
/* event page: organizer box links to their profile */
.org-link { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: 12px; }
.org-link .who { min-width: 0; }
.org-link:hover b { text-decoration: underline; }
.org-link:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.org-more { font-size: 13px; color: var(--muted); }
.org-link:hover .org-more { color: var(--white); }

/* public organizer profile (host.html) */
.hp-head { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }   /* more space under the header */
.hp-cover { height: 220px; border-radius: 16px; background: linear-gradient(135deg, #2a0a10, #0b0b0b 60%) center / cover no-repeat; border: 1px solid var(--line); }
.hp-id { display: flex; align-items: flex-end; gap: 20px; margin-top: -84px; padding: 0 20px; flex-wrap: wrap; }
.hp-av { width: 160px; height: 160px; flex: none; border-radius: 50%; border: 5px solid var(--black); background: var(--red) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: 800; color: #fff; }
.hp-names { flex: 1; min-width: 0; padding-bottom: 8px; }
/* cover / profile photo open full size when clicked */
button.hp-cover { display: block; width: 100%; padding: 0; font: inherit; }
button.hp-av { padding: 0; font: inherit; }
.hp-zoomable { cursor: zoom-in; transition: filter .15s; }
.hp-zoomable:hover { filter: brightness(1.08); }
.hp-zoomable:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.hp-names h1 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.hp-names span { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.hp-acts { display: flex; gap: 10px; padding-bottom: 10px; }
.hp-share { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.hp-share:hover { background: var(--s2); }
.hp-bio { margin: 0; padding: 0 20px; font-size: 15px; line-height: 1.6; color: var(--soft); white-space: pre-line; overflow-wrap: anywhere; max-width: 760px; }
.hp-stats { display: flex; gap: 36px; padding: 16px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hp-stats div { display: flex; flex-direction: column; gap: 2px; }
.hp-stats b { font-size: 22px; font-weight: 800; }
.hp-stats small { font-size: 13px; color: var(--muted); }
.hp-sec { margin-top: 36px; }
.hp-sec h2 { margin: 0 0 18px; font-size: 24px; font-weight: 800; }
.hp-sec h2 span { color: var(--red); }
.hp-sec h2 small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.hp-none { margin: 0; padding: 28px 20px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--muted); text-align: center; }
.hp-card { position: relative; min-width: 0; }
.hp-cd { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--s2); border: 1px solid var(--line-2); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none; }
.hp-cd i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.hp-cd.live i { background: #22C55E; }
.hp-past { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hp-past-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); min-width: 0; }
.hp-past-img { width: 64px; height: 64px; flex: none; border-radius: 8px; overflow: hidden; background: var(--s2); }
.hp-past-img img, .hp-past-img span { display: block; width: 100%; height: 100%; object-fit: cover; }
/* past (ended) events are shown in black and white everywhere they are listed */
.hp-past-img img, .hp-past-img span, .ev-thumb.is-past { filter: grayscale(1); }
.hp-past-item, .hp-card.is-past { filter: grayscale(1); }
.hp-past-item:hover, .hp-card.is-past:hover { filter: grayscale(.6); }
.hp-ended { align-self: flex-start; display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--s2); border: 1px solid var(--line-2); color: var(--soft); font-size: 12px; font-weight: 700; }
.hp-past-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hp-past-t small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.hp-past-t small svg { flex: none; }
.hp-past-t b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.hp-past-t em { align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 600; color: #F87171; background: rgba(198,11,34,.15); border-radius: 6px; padding: 2px 8px; }
@media (max-width: 1000px) { .hp-past { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .hp-cover { height: 150px; }
  .hp-id { margin-top: -60px; padding: 0 8px; gap: 12px; }
  .hp-av { width: 120px; height: 120px; font-size: 36px; border-width: 4px; }
  .hp-names { flex-basis: 100%; }
  .hp-names h1 { font-size: 24px; }
  .hp-acts { padding-bottom: 0; }
  .hp-bio { padding: 0 8px; }
  .hp-stats { padding: 14px 8px; gap: 28px; }
  .hp-past { grid-template-columns: 1fr; }
}
/* tickets left per type */
.t-few { color: #FBBF24; font-weight: 600; }
.t-out { color: #F87171; font-weight: 700; }
.tier.is-soldout .info b { color: var(--muted); }
/* Get tickets after the event ended: greyed out, not clickable */
#buy.is-ended { background: var(--s2); color: var(--muted); border: 1px solid var(--line-2); cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.in { font: inherit; font-size: 16px; color: var(--white); background: var(--s1); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; min-height: 48px; width: 100%; }
.in:focus { outline: 2px solid var(--red); outline-offset: 1px; }
textarea.in { padding: 12px 14px; resize: vertical; }
select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A3A3A3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.in.bad { border-color: var(--red); }
.err { color: #FF5A6E; font-size: 13px; font-weight: 500; min-height: 0; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-box { background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card-box h2 { margin: 0; font-family: var(--body); font-size: 19px; font-weight: 600; letter-spacing: 0; }

/* ---------- Checkout ---------- */
.co { padding-top: 32px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.co h1 { margin: 0; font-size: 40px; }
.back { font-size: 15px; color: var(--soft); align-self: flex-start; }
.co-cols { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.co-form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.method { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 13px; border-radius: 7px; cursor: pointer; background: var(--s1); color: var(--white); border: 2px solid var(--line); }
.method[aria-checked="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(198,11,34,0.15); }
.method .badge { align-self: flex-start; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 4px 8px; background: var(--black); }
.method .badge.red { background: var(--red); }
.method b { font-weight: 600; font-size: 15px; }
.method small { font-size: 13px; color: var(--muted); }
.subpanel { display: flex; flex-direction: column; gap: 12px; background: var(--s1); border-radius: 14px; padding: 18px 0 0; }
.hint { display: flex; gap: 10px; font-size: 14px; color: var(--soft); line-height: 1.5; }
.hint svg { flex: none; margin-top: 2px; }
.summary { flex: 1 1 320px; position: sticky; top: 100px; }
.sum-event { display: flex; gap: 14px; align-items: center; }
.sum-thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--s2) center / cover; flex: none; }
.sum-event div { display: flex; flex-direction: column; gap: 2px; }
.sum-event small { font-size: 14px; color: var(--muted); }
.lines { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 15px; }
.lines div { display: flex; justify-content: space-between; gap: 12px; }
.lines .muted { color: var(--muted); }
.grand { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; }
.grand strong { font-family: var(--display); font-size: 26px; font-weight: 700; }
.done { max-width: 640px; margin: 40px auto; background: var(--s1); border: 1px solid var(--line); border-radius: 24px; padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.done .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; }
.done h1 { font-size: 32px; }
.done p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--soft); }
.ticket-frame { width: 100%; max-width: 576px; aspect-ratio: 1920 / 1080; overflow: hidden; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.18); position: relative; }
.ticket-frame canvas { width: 100%; height: 100%; display: block; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
/* organizer: Scan tickets */
.sc-ev { max-width: 100%; }
.sc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sc-card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sc-cam { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 460px; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line-2); }
.sc-cam video { width: 100%; height: 100%; object-fit: cover; display: none; }
.sc-cam.on video { display: block; }
.sc-frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); display: none; }
.sc-cam.on .sc-frame { display: block; }
.sc-cam-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.sc-cam.on .sc-cam-off { display: none; }
.sc-cam-btns { display: flex; gap: 10px; }
.sc-btn { min-height: 44px; padding: 0 20px; border-radius: 10px; font-size: 14px; }
.sc-cam-btns .sc-btn { flex: 1; }
.sc-hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.sc-manual { display: flex; gap: 10px; }
.sc-manual .in { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.sc-result { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px; border-radius: 14px; text-align: center; border: 2px solid var(--line-2); background: var(--s2); }
.sc-result b { font-size: 24px; font-weight: 800; letter-spacing: .01em; overflow-wrap: anywhere; }
.sc-result small { font-size: 15px; line-height: 1.45; color: var(--soft); overflow-wrap: anywhere; }
.sc-ic { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; background: var(--line-2); color: #fff; margin-bottom: 4px; }
.sc-result.ok { background: rgba(22,163,74,.16); border-color: #16A34A; } .sc-result.ok .sc-ic { background: #16A34A; } .sc-result.ok b { color: #4ADE80; }
.sc-result.used, .sc-result.bad { background: rgba(198,11,34,.16); border-color: var(--red); } .sc-result.used .sc-ic, .sc-result.bad .sc-ic { background: var(--red); } .sc-result.used b, .sc-result.bad b { color: #FF6B7A; }
/* ticket buyer's details under the result */
.sc-info { width: 100%; margin: 10px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(0,0,0,.35); text-align: left; display: grid; gap: 6px; }
.sc-info div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.sc-info dt { font-size: 13px; color: var(--muted); }
.sc-info dd { margin: 0; font-size: 15px; font-weight: 600; color: #fff; overflow-wrap: break-word; min-width: 0; }
@media (max-width: 480px) {
  .sc-info { gap: 9px; padding: 12px; }
  .sc-info div { grid-template-columns: 1fr; gap: 1px; }
  .sc-info dt { font-size: 12px; }
}
.sc-result.wrong { background: rgba(245,158,11,.14); border-color: #F59E0B; } .sc-result.wrong .sc-ic { background: #F59E0B; } .sc-result.wrong b { color: #FBBF24; }
.sc-count { font-size: 15px; color: var(--soft); text-align: center; }
.sc-count b { color: #fff; font-size: 18px; }
.sc-h { margin: 4px 0 0; font-size: 16px; font-weight: 700; }
.sc-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sc-recent li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.sc-recent li > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-recent b { font-size: 13px; } .sc-recent small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sc-recent time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--muted); }
.sc-recent li.ok .sc-dot { background: #22C55E; } .sc-recent li.used .sc-dot, .sc-recent li.bad .sc-dot { background: var(--red); } .sc-recent li.wrong .sc-dot { background: #F59E0B; }
.sc-recent .sc-none { justify-content: center; color: var(--muted); font-size: 14px; border-style: dashed; }
@media (max-width: 900px) { .sc-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .sc-manual { flex-direction: column; } .sc-result b { font-size: 20px; } }
/* checkout: ticket holders (one name per ticket) */
.co-note { margin: -6px 0 0; font-size: 14px; line-height: 1.5; color: var(--soft); }
.holders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.holder span { font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
@media (max-width: 640px) { .holders { grid-template-columns: 1fr; } }
/* after paying: email status, download, each ticket separately */
.mail-status { margin: 0; font-size: 14px; line-height: 1.5; padding: 10px 14px; border-radius: 10px; background: var(--s2); color: var(--soft); width: 100%; }
.mail-status:empty { display: none; }
.mail-status.ok { background: rgba(22,163,74,.12); color: #BBF7D0; border: 1px solid rgba(22,163,74,.45); }
.mail-status.warn { background: rgba(245,158,11,.1); color: #FDE68A; border: 1px solid rgba(245,158,11,.4); }
.tk-list { display: flex; flex-direction: column; gap: 18px; width: 100%; align-items: center; }
.tk-item { width: 100%; max-width: 576px; display: flex; flex-direction: column; gap: 8px; }
.tk-item .ticket-frame { max-width: none; }
.tkd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.tkd-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tkd-row b { font-size: 15px; overflow-wrap: anywhere; }
.tkd-row small { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tk-pdf { flex: none; min-height: 44px; padding: 0 16px; font-size: 14px; border-radius: 10px; gap: 8px; white-space: nowrap; }
.tk-pdf:disabled { opacity: .7; cursor: progress; }
.tk-pdf.is-done, .tk-pdf.is-done:hover { background: #15803D; background-image: none; border-color: #15803D; color: #fff; box-shadow: none; }
@media (max-width: 420px) {
  .tkd-row { flex-direction: column; align-items: stretch; }
  .tk-pdf { width: 100%; justify-content: center; }
}
.processing { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */
.lg-main { display: flex; align-items: center; justify-content: center; padding: 48px 56px; }
.lg { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.lg.lg-wide { max-width: 680px; }
.lg form.lg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.lg form.lg-two .err, .lg form.lg-two .btn-submit { grid-column: 1 / -1; }
.lg form.lg-two .err:empty { display: none; }
.lg.lg-wide .or, .lg.lg-wide .google, .lg.lg-wide .switch { width: 100%; }
@media (max-width: 640px) { .lg form.lg-two { grid-template-columns: 1fr; } }
.lg-head { display: flex; flex-direction: column; gap: 6px; }
.lg-head h2 { margin: 0; font-size: 34px; }
.lg-head span { font-size: 15px; color: var(--muted); }
.lg form { display: flex; flex-direction: column; gap: 14px; }
.lg-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--s1); padding: 0 14px; min-height: 48px; }
.lg-field:focus-within { border-color: var(--red); }
.lg-field.pw { padding-right: 6px; }
.lg-field input { font: inherit; font-size: 15px; color: var(--white); background: transparent; border: none; outline: none; flex: 1; min-width: 0; padding: 0; }
.lg-field input::placeholder { color: #8A8A8A; }
.eye { width: 36px; height: 36px; border: none; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.forgot { align-self: flex-end; font-size: 14px; text-decoration: none; font-weight: 500; }
.lg .btn-submit { min-height: 46px; border-radius: 8px; font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or span { flex: 1; height: 1px; background: var(--line); }
.google { min-height: 46px; border-radius: 8px; font-size: 15px; }
.google i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #000; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.google svg { flex: none; }
.google[aria-busy="true"] { opacity: .6; cursor: progress; }
.lg-gnote { margin: 0; padding: 10px 14px; border-radius: 8px; background: rgba(22, 163, 74, .1); border: 1px solid rgba(22, 163, 74, .45); color: #D1FAE5; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.switch { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.switch button { font-weight: 600; color: var(--red); background: none; border: none; padding: 4px; cursor: pointer; }

/* ---------- Organizer dashboard ---------- */
/* same width as the header bar: max 1140 incl. 32px side gutters */
.dash { flex: 1; display: flex; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.side { flex: 0 0 220px; padding: 24px 16px 24px 0; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); }
.side a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 5px; color: var(--soft); text-decoration: none; font-size: 15px; white-space: nowrap; width: 160px; align-self: flex-start; }
.side a:hover { background: var(--s2); color: var(--white); }
.side a[aria-current="page"] { background: var(--white); color: var(--black); font-weight: 600; }
.side .logout { margin-top: auto; }
.side-title { display: block; font-size: 15px; font-weight: 600; color: var(--soft); padding: 4px 14px 18px; white-space: nowrap; }
.dash-main { flex: 1; min-width: 0; padding: 32px 0 48px 32px; }
/* owner dashboard: every page keeps the same width, whether or not it is tall enough to scroll */
html.ad-page { overflow-y: scroll; scrollbar-gutter: stable; }
.ad-page .ov { width: 100%; }
.dash-inner { max-width: 1040px; display: flex; flex-direction: column; gap: 24px; }
.dash-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.dash-head small { font-size: 14px; color: var(--muted); }
.dash-head h1 { margin: 4px 0 0; font-size: 36px; }
.dash-actions { display: flex; gap: 12px; }
.dash-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.dash-form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.upload { border: 2px dashed var(--line-2); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--soft); cursor: pointer; text-align: center; transition: border-color .15s; }
.upload:hover, .upload.drag { border-color: var(--red); }
.upload small { font-size: 13px; color: var(--muted); }
.upload img { max-height: 160px; border-radius: 10px; }
.tiers-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.tiers-table th { text-align: left; color: var(--muted); font-size: 13px; padding: 10px 8px; font-weight: 600; }
.tiers-table td { padding: 8px; border-top: 1px solid var(--line); }
.tiers-table .in { min-height: 40px; font-size: 15px; border-radius: 10px; }
.rm { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 6px; }
.rm:hover { color: var(--white); }
.add-tier { font-weight: 600; font-size: 11px; background: var(--s1); border: 1px solid var(--line-2); color: var(--white); padding: 0 13px; min-height: 35px; border-radius: 12px; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 12px; }
.checks label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 16px; min-height: 48px; font-size: 15px; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--red); }
.preview { flex: 1 1 300px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 100px; }
.preview > small { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.preview .note { background: #2A0A0E; border-radius: 16px; padding: 16px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.preview .note strong { color: var(--white); word-break: break-all; }
/* ---------- Organizer overview (analytics) ---------- */
.ov { max-width: 1200px; display: flex; flex-direction: column; gap: 20px; }
.ov-bar { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ov-bar h1 { margin: 0 auto 0 0; font-size: 22px; font-weight: 700; }
.ov-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.ov-ctl { font-size: 14px; font-weight: 500; color: var(--white); background: var(--black); border: 1px solid var(--line-2); border-radius: 10px; min-height: 40px; padding: 0 12px; }
.ov-ctl:focus { outline: 2px solid var(--red); outline-offset: 1px; }
select.ov-ctl { appearance: none; padding-right: 32px; cursor: pointer; background: var(--black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A3A3A3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
input.ov-ctl[type="date"] { color-scheme: dark; min-width: 150px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stat small { font-size: 14px; color: var(--soft); }
.stat b { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 26px; font-weight: 600; line-height: 1; min-width: 0; overflow-wrap: anywhere; }
.stat b em { font-style: normal; font-size: 15px; font-weight: 600; color: var(--red); }
.stat b svg { flex: none; align-self: center; color: var(--red); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats .stat:first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .ov-bar { padding: 14px; }
  .ov-bar h1 { flex-basis: 100%; }
  .ov-filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  input.ov-ctl[type="date"] { min-width: 0; width: 100%; }
  .stat { padding: 16px; }
  .stat b { font-size: 22px; }
}

/* ---------- Organizer events list ---------- */
.bar-actions { display: flex; gap: 10px; }
.sq-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--black); color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.sq-btn:hover { border-color: var(--white); color: var(--white); }
.sq-btn.red { background: var(--red); border-color: var(--red); }
.sq-btn.red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.sq-btn.spin svg { animation: spin .5s linear; }
.ev-card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ev-scroll { overflow-x: auto; }
.ev-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.ev-table th { text-align: left; font-size: 14px; font-weight: 600; padding: 16px 14px; background: var(--s2); white-space: nowrap; }
.ev-table th + th { border-left: 1px solid var(--line); }
.ev-table td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; color: var(--soft); }
.ev-table td small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ev-table td.num { color: var(--muted); width: 40px; }
.ev-table td.nowrap { white-space: nowrap; }
.ev-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.ev-name { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.ev-thumb { width: 44px; height: 44px; border-radius: 10px; flex: none; background-size: cover; background-position: center; }
.ev-name b { color: var(--white); font-weight: 600; }
.type-tag { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: var(--s2); border: 1px solid var(--line-2); color: var(--white); white-space: nowrap; }
.row-acts { display: flex; gap: 6px; }
.act { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.act:hover { color: var(--white); border-color: var(--white); }
.act.del:hover { color: var(--white); background: var(--red); border-color: var(--red); }
.act:disabled, .act:disabled:hover { opacity: .35; cursor: not-allowed; color: var(--soft); border-color: var(--line-2); background: transparent; }
.ev-empty { padding: 48px 24px 56px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.pager { display: flex; justify-content: flex-end; gap: 6px; }
.pager button { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: none; background: transparent; color: var(--soft); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pager button:hover:not(:disabled) { color: var(--white); background: var(--s2); }
.pager button[aria-current="page"] { background: var(--s2); color: var(--white); }
.pager button:disabled { opacity: .35; cursor: default; }
.side .side-create { margin-top: 8px; padding: 12px 14px; }
.side .side-create, .side .side-create[aria-current="page"] { background: var(--red); color: var(--white); font-weight: 600; }
.side .side-create:hover { background: var(--red-dark); color: var(--white); }
.side .side-create, .side .side-create[aria-current="page"] { border: none; box-shadow: none; }
@media (max-width: 640px) {
  .ov-bar.ev-bar h1 { flex-basis: auto; font-size: 20px; }
  .pager { justify-content: center; }
  /* table becomes stacked cards on phones */
  .ev-table { min-width: 0; }
  .ev-table thead { display: none; }
  .ev-table, .ev-table tbody { display: block; }
  .ev-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .ev-table tbody tr:first-child { border-top: none; }
  .ev-table td { display: block; padding: 0; border: none; background: none !important; min-width: 0; }
  .ev-table td.num { display: none; }
  .ev-table .ev-name { min-width: 0; margin-bottom: 4px; }
  .ev-table td.ev-type { grid-column: 2; grid-row: 1; align-self: start; }
  .ev-table td[data-l] { grid-column: 1 / -1; display: flex; gap: 8px; font-size: 13px; }
  .ev-table td[data-l]::before { content: attr(data-l); flex: 0 0 72px; color: var(--muted); }
  .ev-table td[data-l] small { display: inline; margin: 0 0 0 6px; font-size: 13px; }
  .ev-table td.ev-acts { grid-column: 1 / -1; margin-top: 8px; }
  .ev-table .act { width: 40px; height: 40px; }
}

/* ---------- Create event (Sinc-style) ---------- */
.ce { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; width: 100%; align-items: stretch; }
/* Ticket options grows so its bottom lines up with the Location row on the left */
.ce > .ce-col:nth-child(2) .ce-tickets { flex: 1; display: flex; flex-direction: column; }
.ce-tickets .ce-tickets-b { flex: 1; }
.ce-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ce-in { font: inherit; font-size: 14px; color: var(--white); background: var(--s2); border: 1px solid transparent; border-radius: 8px; padding: 0 12px; min-height: 40px; width: 100%; }
.ce-in::placeholder { color: #8A8A8A; }
.ce-in:focus { outline: none; border-color: var(--red); }
.ce-in.bad, .tk input.bad { border-color: var(--red); }
textarea.ce-in { padding: 10px 12px; resize: vertical; min-height: 120px; }
select.ce-in { appearance: none; padding-right: 28px; cursor: pointer; background: var(--s2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A3A3A3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
input.ce-in[type="date"], input.ce-in[type="time"] { color-scheme: dark; }
.ce-box { background: var(--s1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; }
.ce-box-h { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; padding: 0 2px; }
.ce-info { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--soft); color: var(--soft); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: help; font-style: italic; }
.ce-drop { border: 1px dashed #555; border-radius: 10px; background: var(--s1); min-height: 280px; display: flex; align-items: center; justify-content: center; cursor: pointer; text-align: center; transition: border-color .15s; overflow: hidden; }
.ce-drop:hover, .ce-drop.drag, .ce-drop.bad { border-color: var(--red); }
.ce-drop.bad { border-style: solid; }
.ce-drop-in { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--soft); padding: 16px; }
.ce-drop-in svg { color: #8A8A8A; }
.ce-drop-in b { font-size: 15px; color: var(--white); }
.ce-drop-in small { font-size: 11px; line-height: 1.8; color: var(--muted); }
.ce-drop.has-img .ce-drop-in { padding: 8px; gap: 6px; }
.ce-drop img { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; }
/* "Edit image" window for the event flyer (square crop, zoom, rotate) */
.ie-dlg { width: min(520px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); overflow: auto; padding: 20px 24px 22px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--s1); color: var(--white); box-shadow: 0 24px 60px rgba(0,0,0,.7); }
.ie-dlg::backdrop { background: rgba(0,0,0,.72); }
.ie-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ie-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ie-x { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.ie-x:hover { background: var(--s2); color: var(--white); }
.ie-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #000; border-radius: 8px; overflow: hidden; cursor: grab; touch-action: none; }
.ie-stage.grabbing { cursor: grabbing; }
.ie-stage:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ie-stage canvas { display: block; }
.ie-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.ie-ctrls { display: flex; flex-direction: column; gap: 6px; margin: 14px auto 0; max-width: 340px; }
.ie-row { display: flex; align-items: center; gap: 12px; }
.ie-i { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--s2); color: var(--white); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; user-select: none; transition: background .15s, border-color .15s; }
.ie-i:hover { background: var(--red); border-color: var(--red); }
.ie-i:active { transform: scale(.94); }
.ie-i:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ie-i:disabled { opacity: .35; cursor: not-allowed; background: var(--s2); border-color: var(--line-2); }
.ie-row input[type=range] { flex: 1; min-width: 0; height: 36px; accent-color: var(--red); cursor: pointer; }
.ie-btns { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 360px) { .ie-btns button { padding: 0 14px; } .ie-btns .ie-cancel, .ie-btns .ie-ok { flex: 1; } }
.ie-sp { flex: 1; }
.ie-btns button { min-height: 44px; padding: 0 20px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.ie-reset { background: none; border: none; color: var(--muted); padding: 0 8px !important; }
.ie-reset:hover { color: var(--white); }
.ie-cancel { background: transparent; border: 1px solid var(--line-2); color: var(--white); }
.ie-cancel:hover { background: var(--s2); }
.ie-ok { background: var(--red); border: none; color: #fff; min-width: 84px; }
.ie-ok:hover { filter: brightness(1.1); }
.ie-btns button:focus-visible, .ie-x:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
@media (max-width: 480px) {
  .ie-dlg { padding: 16px 14px 18px; }
  .ie-stage { aspect-ratio: 1 / 1; }
}
/* flyer not accepted: the reason, right under the flyer box */
.ce-drop-err { display: flex; align-items: flex-start; gap: 10px; margin: -4px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(198, 11, 34, .12); border: 1px solid rgba(198, 11, 34, .6); color: #FECACA; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ce-drop-err[hidden] { display: none; }
.ce-drop-err svg { flex: none; color: #F87171; margin-top: 1px; }
.ce-drop-err b { color: #fff; font-weight: 600; }
.ce-when { display: flex; align-items: center; gap: 8px; }
.ce-cal { width: 32px; flex: none; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; align-items: center; font-size: 8px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.ce-cal b { width: 100%; text-align: center; font-size: 11px; color: var(--white); background: var(--s2); padding: 2px 0; margin-top: 2px; }
.ce-when-t { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.ce-when-t b { font-weight: 600; }
.ce-when-t small { color: var(--muted); }
.ce-dates { display: grid; grid-template-columns: auto minmax(0, 1fr) 110px; align-items: center; gap: 6px; padding: 6px; }
.ce-lbl { font-size: 14px; font-weight: 600; color: var(--soft); padding: 0 8px 0 6px; }
.ce-dates .ce-in { font-size: 12px; padding: 0 6px; }
.ce-loc { display: flex; gap: 6px; }
.ce-pin { width: 40px; height: 40px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); background: var(--s1); display: flex; align-items: center; justify-content: center; color: var(--soft); }
.ce-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; }
.ce-req::before { content: "* "; color: var(--red); }
.ce-count { align-self: flex-end; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: -2px; }
.ce-tickets { background: var(--s1); border: 1px solid var(--line); border-radius: 10px; }
.ce-tickets-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ce-tickets-h h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.ce-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--soft); cursor: pointer; position: relative; }
.ce-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ce-switch span { width: 32px; height: 18px; border-radius: 999px; background: #555; position: relative; transition: background .15s; }
.ce-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); transition: transform .15s; }
.ce-switch input:checked + span { background: var(--red); }
.ce-switch input:checked + span::after { transform: translateX(14px); }
.ce-switch input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.ce-tickets-b { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
#tiers { display: flex; flex-direction: column; gap: 12px; }
.tk { border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.tk-head { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line-2); }
.tk-ic { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--soft); }
.tk-name { flex: 1; min-width: 0; font: inherit; font-size: 15px; font-weight: 500; color: var(--white); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; min-height: 36px; }
.tk-name:focus { outline: none; border-color: var(--red); }
.tk-rm { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 0; min-width: 36px; min-height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tk-rm:hover { color: var(--white); }
.tk-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); border-bottom: 1px solid var(--line-2); font-size: 13px; }
.tk-row > span { padding: 8px 6px; color: var(--soft); display: flex; align-items: center; border-right: 1px solid var(--line-2); }
.tk-row.tall > span { align-items: flex-start; }
.tk-cell { display: flex; align-items: center; background: var(--s2); }
.tk-cell input, .tk-cell select, .tk-cell textarea { flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--white); background: transparent; border: 1px solid transparent; padding: 9px 10px; }
.tk-cell input:focus, .tk-cell select:focus, .tk-cell textarea:focus { outline: none; border-color: var(--red); }
.tk-cell select { appearance: none; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A3A3A3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center; }
.tk-cell select option { background: var(--s1); }
.tk-cell textarea { resize: vertical; min-height: 44px; }
.tk-cell textarea::placeholder { color: #8A8A8A; }
.tk-cell em { font-style: normal; color: var(--red); padding: 0 8px; font-weight: 600; }
.tk-extra summary { list-style: none; cursor: pointer; font-size: 11px; font-weight: 500; padding: 9px 12px; display: flex; align-items: center; gap: 8px; }
.tk-extra summary::-webkit-details-marker { display: none; }
.tk-extra summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.tk-extra[open] summary::before { transform: rotate(45deg); }
.tk-extra .tk-row { border-top: 1px solid var(--line-2); border-bottom: none; }
.tk .tk-row:last-of-type { border-bottom: 1px solid var(--line-2); }
.ce-add { font: inherit; font-size: 13px; font-weight: 600; color: var(--white); background: transparent; border: 1px dashed #555; border-radius: 8px; min-height: 40px; cursor: pointer; }
.ce-add:hover { border-color: var(--white); }
.ce-publish { font-size: 15px; min-height: 48px; border-radius: 8px; width: 100%; }
.ce-foot { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ce .err { margin: 0; }
.ce .err:empty { display: none; }
@media (max-width: 640px) {
  .ce { grid-template-columns: 1fr; }
  .ce-in, .tk-cell input, .tk-cell select, .tk-cell textarea { font-size: 16px; }
  .ce-dates { grid-template-columns: auto minmax(0, 1fr) 96px; }
}

/* ---------- Organizer profile page ---------- */
.pf { display: flex; flex-direction: column; gap: 20px; }
.pf-cover { height: 208px; border-radius: 14px; background: var(--s2) center / cover no-repeat; position: relative; }
.pf-cam { width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,0.75); border: 1px solid rgba(255,255,255,0.2); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; }
.pf-cam:hover { background: var(--red); }
.pf-cam:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.pf-cam-cover { position: absolute; top: 16px; right: 16px; }
/* empty cover (no photo chosen yet) */
.pf-cover.is-empty { background: var(--s1); border: 1px dashed var(--line-2); }
.pf-cover-add { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.6); color: var(--white); font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.pf-cover-add:hover { background: var(--red); border-color: var(--red); }
.pf-cover-add[hidden] { display: none; }
.pf-cover:focus-within .pf-cover-add { outline: 2px solid var(--red); outline-offset: 2px; }
.pf-card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.pf-account { margin: -96px 24px 0; position: relative; }
.pf-balance { margin: 0 24px; }   /* same width as My Account */
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; min-height: 68px; border-bottom: 1px solid var(--line); }
.pf-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0; }
.pf-acc-body { display: flex; gap: 40px; align-items: center; padding: 28px 24px; }
.pf-avatar { width: 128px; height: 128px; flex: none; border-radius: 50%; background: var(--red) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; position: relative; box-shadow: 0 0 0 4px var(--s1), 0 0 0 5px var(--line-2); }
.pf-cam-av { position: absolute; right: -4px; bottom: 2px; }
.pf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pf-info h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0; }
.pf-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; font-size: 15px; }
.pf-dl div { display: flex; gap: 8px; min-width: 0; align-items: center; }
.pf-dl dt { color: var(--muted); flex: none; }
.pf-dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; }
.pf-dl .full { grid-column: 1 / -1; }
.pf-copy { background: none; border: none; color: var(--red); cursor: pointer; padding: 2px; display: flex; }
.pf-copy:hover { color: var(--white); }
.pf-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.pf-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--soft); }
.pf-form .full { grid-column: 1 / -1; }
.pf-form .err:empty { display: none; }
.pf-form-btns { display: flex; justify-content: flex-end; gap: 10px; }
.pf-row { display: grid; gap: 20px; align-items: stretch; }
.pf-row-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pf-about { border-top: 1px solid var(--line); padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.pf-about-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pf-about-h h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0; }
@media (max-width: 640px) {
  .pf-about { padding: 16px; }
  .bal-row { padding: 16px; }
}
.bal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; }
.bal-row + .bal-row { border-top: 1px solid var(--line); }
.bal-row small { display: block; font-size: 14px; color: var(--soft); margin-bottom: 6px; }
.bal-row b { font-size: 22px; font-weight: 700; color: #FF4D5E; white-space: nowrap; }
.bal-row b em { font-style: normal; font-size: 14px; font-weight: 700; }
.bal-out { flex: none; min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 500; background: transparent; color: var(--white); border: 1px solid var(--line-2); }
.bal-out:not(:disabled):hover { border-color: var(--white); }
.bal-out:disabled { color: var(--muted); background: var(--s2); cursor: not-allowed; }
@media (max-width: 900px) { .pf-row-2 { grid-template-columns: 1fr; } }
.pf-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.pf-person { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--white); text-decoration: none; }
.pf-person > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-person b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-person small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pf-ev:hover b { color: var(--red); }
.pf-mini { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--red) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.pf-thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; background-size: cover; background-position: center; }
.pf-bio { margin: 0; font-size: 15px; line-height: 1.6; color: var(--soft); white-space: pre-line; }
.pf-bio.is-empty { font-style: italic; color: var(--muted); }
.pf-bio-form { display: flex; flex-direction: column; gap: 10px; }
.pf-empty { margin: 0; color: var(--muted); font-size: 14px; font-style: italic; }
.pf-cur { min-height: 34px; font-size: 13px; }
.pf-rev { font-size: 30px; font-weight: 700; line-height: 1.1; }
.pf-rev-sub { font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) { .pf-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-row-3 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 900px) { .pf-acc-body { gap: 24px; } .pf-dl { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .pf-cover { height: 150px; }
  .pf-account { margin: -60px 10px 0; }
  .pf-balance { margin: 0 10px; }
  .pf-acc-body { flex-direction: column; align-items: stretch; padding: 20px 16px; }
  .pf-avatar { width: 104px; height: 104px; font-size: 32px; align-self: center; }
  .pf-info h3 { text-align: center; }
  .pf-dl div { flex-wrap: wrap; }
  .pf-form { grid-template-columns: 1fr; }
  .pf-form-btns .btn { flex: 1; }
  .pf-row-2, .pf-row-3 { grid-template-columns: 1fr; }
  .pf-row-3 > :last-child { grid-column: auto; }
  .pf-head { padding: 12px 16px; min-height: 60px; }
  .pf-body { padding: 16px; }
}

/* ---------- Organizer settings ---------- */
.st { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 520px; }
.st-tabs { padding: 24px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.st-tabs button { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; color: var(--soft); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 10px 14px; min-height: 44px; cursor: pointer; text-align: left; }
.st-tabs button:hover { color: var(--white); background: var(--s2); }
.st-tabs button[aria-selected="true"] { color: var(--white); border-color: var(--line-2); background: var(--black); }
.st-tabs button[aria-selected="true"] svg { color: var(--red); }
.st-panel { padding: 24px 22px 28px; min-width: 0; }
.st-title { margin: 0 0 32px; font-size: 32px; font-weight: 600; color: #777; letter-spacing: -0.01em; }
.st-panel h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: 0; }
.st-sub { margin: 0 0 28px; font-size: 14px; color: var(--muted); }
.st-form { display: flex; flex-direction: column; gap: 22px; max-width: 360px; }
.st-field { display: flex; flex-direction: column; gap: 10px; font-size: 15px; font-weight: 500; }
.st-input { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: var(--s1); min-height: 44px; padding: 0 4px 0 12px; transition: border-color .15s; }
.st-input:focus-within { border-color: var(--red); }
.st-input.bad { border-color: var(--red); }
.st-input input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--white); background: transparent; border: none; outline: none; padding: 0; min-height: 42px; }
.st-input input::placeholder { color: #777; }
.st-pre { color: var(--muted); margin-right: 2px; }
.st-eye { width: 38px; height: 38px; flex: none; border: none; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.st-eye:hover { color: var(--white); }
.st-form .err { margin: -8px 0 0; }
.st-form .err:empty { display: none; }
.st-btn { min-height: 44px; border-radius: 8px; font-size: 15px; width: 100%; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.st-row .st-sub { margin-bottom: 0; }
.st-edit { flex: none; min-height: 42px; padding: 0 18px; border-color: var(--line-2); border-radius: 10px; font-size: 15px; font-weight: 500; }
.st-acc-form { margin-top: 24px; max-width: 420px; }
.st-btns { display: flex; gap: 10px; }
.st-btns .st-btn { flex: 1; }
.st-hr { border: none; border-top: 1px solid var(--line-2); margin: 20px 0 28px; }
.st-danger h3 { color: #FF4D5E; }
.st-danger .st-sub { color: #FF4D5E; margin-bottom: 26px; }
.st-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--soft); }
.st-list li { display: flex; align-items: center; gap: 10px; }
.st-list li::before { content: "×"; flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--soft); color: var(--s1); font-size: 13px; font-weight: 700; line-height: 15px; text-align: center; }
.st-check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; font-weight: 600; cursor: pointer; line-height: 1.4; }
.st-check input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--red); cursor: pointer; }
.st-delete { margin-top: 20px; min-height: 42px; padding: 0 18px; border-radius: 8px; font-size: 14px; background: transparent; color: #FF4D5E; border: 1px solid #FF4D5E; }
.st-delete:not(:disabled):hover { background: var(--red); border-color: var(--red); color: var(--white); }
.st-delete:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 900px) {
  .st { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .st-tabs { min-width: 0; }
  .st-tabs { flex-direction: row; border-right: none; border-bottom: 1px solid var(--line); padding: 12px; }
  .st-tabs button { flex: 1; justify-content: center; }
  .st-title { font-size: 26px; margin-bottom: 20px; }
  .st-form { max-width: none; }
}
@media (max-width: 640px) {
  .st-panel { padding: 20px 16px 24px; }
  .st-input input { font-size: 16px; }
  .st-row { flex-direction: column; align-items: stretch; gap: 14px; }
  .st-edit, .st-delete { width: 100%; }
  .st-acc-form { max-width: none; }
}

/* ---------- Owner (admin) dashboard ---------- */
.ad-badge { font-size: 12px; font-weight: 600; color: var(--red); border: 1px solid var(--red); border-radius: 6px; padding: 3px 8px; margin-left: -4px; }
.ad-head-link { color: var(--soft); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; min-height: 40px; }
.ad-head-link:hover { color: var(--white); }
.ad-side a { position: relative; }
.ad-side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.side .ad-plain { display: flex; align-items: center; gap: 12px; width: 160px; padding: 12px 14px; border: none; border-radius: 5px; background: none; color: var(--soft); font: inherit; font-size: 15px; text-decoration: none; text-align: left; cursor: pointer; white-space: nowrap; }
.side .ad-plain:hover { background: var(--s2); color: var(--white); }
.side .ad-logout:hover { color: #FF4D5E; }
.ad-side { position: sticky; top: 0; align-self: flex-start; min-height: 100vh; }
.ad-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
[data-panel] { display: flex; flex-direction: column; gap: 16px; }
[data-panel][hidden] { display: none !important; }
.ad-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ad-stats .stat:first-child { grid-column: auto; }   /* 4 equal cards: 4 across, 2 x 2 on smaller screens */
@media (max-width: 1100px) { .ad-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ad-card { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.ad-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ad-card-h h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0; }
.ad-card-h .sub { font-size: 13px; color: var(--muted); }
.ad-card-h a { font-size: 14px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
.ad-chart { padding: 18px 20px 14px; position: relative; }
.ad-bars { height: 200px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); }
.ad-bar { flex: 1; min-width: 2px; background: var(--red); border-radius: 3px 3px 0 0; transition: opacity .15s; }
.ad-bar[data-zero] { background: var(--line-2); }
.ad-bar:hover { opacity: .75; }
.ad-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding-top: 8px; }
.ad-chart-empty { position: absolute; inset: 0 0 30px; margin: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; pointer-events: none; }
.ad-list { list-style: none; margin: 0; padding: 4px 0; }
.ad-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.ad-list li:first-child { border-top: none; }
.ad-list li > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-list b { font-weight: 600; font-size: 15px; }
.ad-list small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.ad-amt { text-align: right; font-weight: 700; white-space: nowrap; flex: none; }
.ad-groups { display: flex; flex-direction: column; gap: 16px; }
/* All sales: EVENT NAME + Total on top, numbered buyer rows below */
.ad-group { overflow: hidden; }
.ad-group-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #C60B22; color: #fff; }
.ad-group-h h2 { margin: 0; font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; min-width: 0; overflow-wrap: anywhere; }
.ad-group-h b { flex: none; white-space: nowrap; font-size: 16px; font-weight: 700; color: #fff; }
.ad-sales { list-style: none; margin: 0; padding: 0; }
.ad-sales li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; border-top: 1px solid var(--line); min-height: 48px; }
.ad-sales li:first-child { border-top: none; }
.ad-n { align-self: stretch; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14px; }
.ad-who { padding: 12px 16px; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-who small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
[data-panel="overview"] .ad-group { margin-top: 16px; }
.ad-back-row { display: flex; }
.ad-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--line-2); border-radius: 10px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; flex: none; }
.ad-back:hover { background: var(--s2); }
/* Overview "sales by event": number | event name and details | View More on the right */
.ad-more-c { padding: 8px 16px 8px 8px; }
.ad-more { white-space: nowrap; display: inline-flex; width: auto; }
@media (max-width: 640px) { .ad-sales-ov .ad-more { flex: none; } .ad-more-c { padding-right: 12px; } }
.ad-sales li b { padding: 12px 20px 12px 8px; font-size: 15px; font-weight: 700; white-space: nowrap; }
@media (max-width: 640px) {
  .ad-group-h { padding: 14px 16px; }
  .ad-sales li { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .ad-sales li b { padding-right: 16px; }
}
.ad-empty { margin: 0; padding: 32px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.ad-search { min-width: 240px; }
.ad-csv { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14px; border-color: var(--line-2); }
.ad-st { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; border: 1px solid transparent; }
.ad-st-live, .ad-st-paid { background: rgba(46,160,67,0.15); color: #4ADE80; }
.ad-st-hidden, .ad-st-rejected { background: rgba(198,11,34,0.15); color: #FF4D5E; }
.ad-st-ended { background: var(--s2); color: var(--muted); border-color: var(--line-2); }
.ad-warn { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 600; color: #F59E0B; white-space: nowrap; cursor: help; }
.ad-issues { background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .45); border-radius: 10px; padding: 12px 14px; margin-bottom: 6px; }
.ad-issues h3 { color: #F59E0B; margin: 0 0 6px; }
.ad-issues ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; line-height: 1.45; }
.ad-st-requested { background: rgba(234,179,8,0.15); color: #FACC15; }
.ad-st-pay { background: var(--s2); color: var(--white); border-color: var(--line-2); }
.ev-table.ad-table { min-width: 640px; }
.ad-table td small { display: block; }
.ad-table .ev-name { min-width: 0; }
.ad-table .ev-name > span:last-child { min-width: 0; }
.ad-toggle { width: auto; min-width: 32px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.ad-act { min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.ad-done { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ad-av { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--red) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
/* organizer info panel */
.ad-dlg { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--s1); color: var(--white); box-shadow: 0 24px 60px rgba(0,0,0,0.7); overflow: auto; }
.ad-dlg::backdrop { background: rgba(0,0,0,0.7); }
.ad-dlg-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--s1); border-bottom: 1px solid var(--line); }
.ad-dlg-h > div { flex: 1; min-width: 0; }
.ad-dlg-h h2 { margin: 0; font-size: 20px; letter-spacing: 0; overflow-wrap: anywhere; }
.ad-dlg-h small { font-size: 13px; color: var(--muted); }
.ad-dlg-x { width: 40px; height: 40px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: none; color: var(--white); font-size: 22px; line-height: 1; cursor: pointer; }
.ad-dlg-x:hover { border-color: var(--white); }
.ad-dlg-b { padding: 4px 20px 22px; }
.ad-dlg-b h3 { margin: 20px 0 10px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ad-av-lg { width: 52px; height: 52px; font-size: 17px; }
.ad-dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.ad-dl dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.ad-dl dd { margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.ad-bio { margin: 0; font-size: 14px; line-height: 1.6; color: var(--soft); white-space: pre-line; }
.ad-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.ad-mini div { background: var(--s2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ad-mini small { font-size: 12px; color: var(--muted); }
.ad-mini b { font-size: 15px; overflow-wrap: anywhere; }
.ad-red { color: #FF4D5E; }
.ad-muted { color: var(--muted); font-size: 14px; margin: 0; }
.ad-list-sm { border: 1px solid var(--line); border-radius: 10px; padding: 0; }
.ad-list-sm li { padding: 10px 14px; }
.ad-list-sm .ad-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-weight: 500; }
@media (max-width: 640px) {
  .ad-dlg { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: none; }
  .ad-dlg-h { padding: 14px 16px; }
  .ad-dlg-b { padding: 4px 16px 24px; }
  .ad-dl { grid-template-columns: 1fr; }
  .ad-list-sm li { flex-direction: column; align-items: flex-start; }
  .ad-list-sm .ad-amt { align-items: flex-start; }
}
#gate { flex: 1; }
#gate .err:empty { display: none; }

@media (max-width: 1240px) {
  .ad-table th, .ad-table td { padding-left: 10px; padding-right: 10px; }
  .ad-table td.nowrap { white-space: normal; }
  .ad-table .row-acts { flex-wrap: wrap; }
  .ev-table.ad-table { min-width: 0; }
}
@media (max-width: 900px) {
  .ad-side { position: static; min-height: 0; align-self: stretch; }
  .ad-side-foot { display: contents; }
  .side .ad-plain { width: auto; }
}
@media (max-width: 640px) {
  .side .ad-plain { flex: 0 0 calc(50% - 3px); justify-content: center; padding: 10px 8px; font-size: 14px; border: 1px solid var(--line); }
}
/* owner tables become stacked cards on tablets and phones */
@media (max-width: 980px) {
  .ad-table thead { display: none; }
  .ad-table, .ad-table tbody { display: block; }
  .ad-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .ad-table tbody tr:first-child { border-top: none; }
  .ad-table td { display: block; padding: 0 !important; border: none; background: none !important; min-width: 0; }
  .ad-table td.num { display: none; }
  .ad-table td.ev-type { grid-column: 2; grid-row: 1; align-self: start; }
  .ad-table td[data-l] { grid-column: 1 / -1; display: flex; gap: 8px; font-size: 13px; }
  .ad-table td[data-l]::before { content: attr(data-l); flex: 0 0 80px; color: var(--muted); }
  .ad-table td[data-l] small { display: inline; margin-left: 6px; }
  .ad-table td.ev-acts { grid-column: 1 / -1; margin-top: 8px; }
}
@media (max-width: 640px) {
  .ksn-glass.dash-bar { flex-wrap: nowrap; gap: 10px; }
  .ad-head-link, #logout { white-space: nowrap; }
  #logout { padding: 10px 12px; }
  .ev-table.ad-table { min-width: 0; }
  .ad-badge { margin-left: -6px; }
  .ad-search { min-width: 0; grid-column: 1 / -1; }
  .ad-csv { grid-column: 1 / -1; }
  .ad-bars { height: 160px; gap: 1px; }
  .ad-list li { padding: 12px 16px; }
  .ad-act { min-height: 40px; flex: 1; }
  .ev-table td.ev-acts .row-acts { flex-wrap: wrap; }
  .ad-head-link { font-size: 13px; }
}

/* ---------- Organizer notifications (bell next to the profile icon) ---------- */
.ksn-glass.dash-bar { gap: 14px; }
.ntf { position: relative; }
.ntf-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); background: rgba(0,0,0,0.35); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ntf-btn:hover, .ntf-btn[aria-expanded="true"] { border-color: var(--white); background: rgba(0,0,0,0.6); }
.ntf-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: var(--white); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #2D3032; }
.ntf-panel { position: absolute; right: -60px; top: calc(100% + 16px); width: 340px; background: var(--s1); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.6); z-index: 60; overflow: hidden; }
.ntf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ntf-read { background: none; border: none; color: var(--red); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.ntf-read:hover:not(:disabled) { color: var(--white); }
.ntf-read:disabled { color: var(--muted); cursor: default; }
.ntf-list { max-height: min(380px, 60vh); overflow-y: auto; }
.ntf-item { display: flex; gap: 10px; width: 100%; padding: 12px 16px; text-align: left; font: inherit; font-size: 14px; line-height: 1.4; color: var(--soft); background: transparent; border: none; border-bottom: 1px solid var(--line); cursor: default; }
.ntf-item:last-child { border-bottom: none; }
.ntf-item.unread { cursor: pointer; }
.ntf-item.unread:hover { background: var(--s2); }
.ntf-item:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.ntf-item b { color: var(--white); font-weight: 600; }
.ov-sales { margin-top: 16px; }   /* organizer Overview: sales by event under the cards */
.ntf-item { align-items: flex-start; }
.ntf-body { min-width: 0; flex: 1; overflow-wrap: anywhere; }   /* long notification text wraps */
.ntf-thumb { position: relative; flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--s2); border: 1px solid var(--line-2); }
.ntf-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.ntf-thumb img.ntf-logo { object-fit: contain; padding: 8px; background: #000; }
.ntf-thumb .ntf-dot { position: absolute; top: -3px; right: -3px; margin: 0; width: 10px; height: 10px; border: 2px solid var(--s1); }
.ntf-item small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.ntf-dot { width: 8px; height: 8px; flex: none; margin-top: 6px; border-radius: 50%; background: transparent; }
.ntf-item.unread .ntf-dot { background: var(--red); }
.ntf-item.unread { background: rgba(198,11,34,0.06); }
.ntf-empty { margin: 0; padding: 32px 16px; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .ntf-btn { width: 40px; height: 40px; }
  .ntf-read { min-height: 40px; padding: 0 4px; }
  .ntf-panel { position: fixed; top: 84px; right: 16px; left: 16px; width: auto; }
}

/* ---------- Organizer profile menu ---------- */
.prof { position: relative; }
.prof-btn { display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--white); cursor: pointer; padding: 2px; border-radius: 999px; }
.prof-av { width: 34px; height: 34px; border-radius: 50%; background: var(--red) center / cover no-repeat; color: var(--white); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px rgba(255,255,255,0.25); }
.prof-btn:hover .prof-av, .prof-btn[aria-expanded="true"] .prof-av { box-shadow: 0 0 0 2px var(--white); }
.prof-caret { transition: transform .15s; }
.prof-btn[aria-expanded="true"] .prof-caret { transform: rotate(180deg); }
.prof-menu { position: absolute; right: -8px; top: calc(100% + 18px); width: 240px; background: var(--s1); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.6); display: flex; flex-direction: column; gap: 2px; z-index: 60; }
.prof-id { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prof-mail { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; min-width: 0; }
.prof-mail span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-id small { font-size: 13px; color: var(--muted); }
.prof-copy { flex: none; background: none; border: none; padding: 2px; color: var(--red); cursor: pointer; display: flex; }
.prof-copy:hover { color: var(--white); }
.prof-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; color: var(--white); text-decoration: none; font-size: 14px; }
.prof-menu a:hover { background: var(--s2); color: var(--white); }
.prof-menu a svg { color: var(--soft); flex: none; }
.prof-menu hr { border: none; border-top: 1px solid var(--line-2); margin: 8px 0; }
.prof-menu .prof-public { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 8px; border: none; border-radius: 8px; background: none; color: var(--white); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.prof-menu .prof-public:hover { background: var(--s2); }
.prof-menu .prof-public svg { color: var(--red); }
.prof-logout { margin-top: 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--white); background: var(--red); border: none; border-radius: 8px; min-height: 38px; cursor: pointer; }
.prof-logout:hover { background: var(--red-dark); }
@media (max-width: 640px) {
  .prof-menu { position: fixed; top: 84px; right: 16px; left: auto; width: min(260px, calc(100vw - 32px)); }
}

/* ---------- Yes / No confirmation box ---------- */
.cf-dlg { width: min(400px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--s1); color: var(--white); box-shadow: 0 24px 60px rgba(0,0,0,0.7); text-align: center; }
.cf-dlg::backdrop { background: rgba(0,0,0,0.7); }
.cf-msg { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; }
.cf-detail { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--soft); white-space: pre-line; }
.cf-btns { display: flex; gap: 12px; margin-top: 22px; }
.cf-btns button { flex: 1; min-height: 46px; border: none; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 700; color: var(--white); cursor: pointer; transition: filter .15s; }
.cf-yes { background: #16A34A; }
.cf-no { background: var(--red); }
.cf-btns button:hover { filter: brightness(1.12); }
.cf-btns button:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--white); color: var(--black); font-weight: 600; font-size: 14px; padding: 12px 18px; border-radius: 12px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 100; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .foot-in { flex-direction: column; justify-content: center; padding: 40px 28px; }
  .foot-right { justify-content: center; }
  .foot-copy { padding: 16px 28px; text-align: center; }
  .lg-main { padding: 40px 24px; }
  .dash { flex-direction: column; }
  .side { flex: none; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 12px 0; }
  .dash-main { padding: 28px 0 40px; }
  .side .logout { margin-top: 0; }
  .side .side-create { margin-top: 0; }
  .side-title { display: none; }
  .tickets, .summary, .preview { position: static; }
}
@media (max-width: 820px) { .methods { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .banners { flex-direction: column; gap: 14px; }
  .banners > * { flex: none; width: 100%; }
  .feat { padding: 16px 16px 0; }
  .facts, .three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .site-header { padding: 12px 16px; }
  .ksn-glass { padding: 12px 20px; gap: 16px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .ksn-glass { row-gap: 12px; }
  .grid { grid-template-columns: 1fr; }
  #events { padding-top: 32px; padding-bottom: 16px; }
  #events h2 { font-size: 28px; }
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { flex: 1; white-space: nowrap; }
  .org-box { padding: 32px 24px; }
  .org-copy h2 { font-size: 32px; }
  .site-footer { padding: 0 16px 32px; }
  .hero { padding: 24px; min-height: 280px; }
  .hero h1 { font-size: 36px; }
  .two { grid-template-columns: 1fr; }
  .co { padding-top: 20px; padding-bottom: 48px; }
  .co h1 { font-size: 30px; }
  .card-box { padding: 18px; border-radius: 16px; }
  .done { padding: 24px 16px; margin: 16px auto; }
  .dash { padding: 0 16px; }
  .side { flex-wrap: wrap; overflow: visible; gap: 6px; }
  .side a { flex: 0 0 calc(50% - 3px); width: auto; justify-content: center; padding: 10px 8px; font-size: 14px; border: 1px solid var(--line); }
  .side a[aria-current="page"] { border-color: var(--white); }
  .side .side-create, .side .side-create[aria-current="page"] { margin-top: 0; border: none; padding: 11px 8px; }
  .dash-main { padding: 20px 0 32px; }
  .tiers-table, .tiers-table tbody { display: block; min-width: 0; }
  .tiers-table thead { display: none; }
  .tiers-table tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
  .tiers-table td { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; min-width: 0; }
  .tiers-table td[data-l]::before { content: attr(data-l); font-size: 12px; color: var(--muted); font-weight: 600; }
  .tiers-table td:first-child { grid-column: 1 / 3; }
  .tiers-table td:nth-child(2) { grid-column: 1; }
  .tiers-table td:nth-child(3) { grid-column: 2; }
  .tiers-table td:nth-child(4) { grid-column: 1 / 3; }
  .tiers-table td:last-child { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  .dash-head h1 { font-size: 28px; }
}
@media (max-width: 560px) {
  .foot-div { display: none; }
  .foot-right, .foot-grp { flex-direction: column; }
}
@media (max-width: 480px) {
  .lg-main { padding: 28px 16px; }
  .lg-head h2 { font-size: 28px; }
  .lg-field input { font-size: 16px; }
}
/* Bigger touch areas for small text links/controls on phones (min ~40px) */
@media (max-width: 640px) {
  .back, .crumbs a, .forgot { display: inline-flex; align-items: center; min-height: 40px; }
  .crumbs { align-items: center; }
  .ce-switch { min-height: 40px; padding-left: 8px; }
  .pf-copy, .prof-copy { min-width: 40px; min-height: 40px; justify-content: center; align-items: center; margin: -10px -8px -10px 0; }
  .icon-btn { width: 40px; height: 40px; border-radius: 8px; }
  .icon-btn svg { width: 21px; height: 21px; }
  .icons { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .switch button { min-height: 40px; padding: 4px 8px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
