:root {
  --yellow: #FFE307;
  --ink: #101010;
  --bg: #FDFAFA;
  --card: #FFFFFF;
  --muted: #6B6B6B;
  --line: #E6E2E2;
  --ok: #1E9E4A;
  --warn: #F2B705;
  --err: #D93A2B;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 Helvetica, Arial, sans-serif;
}
a { color: inherit; }
img, svg { max-width: 100%; }

/* Шапка як на webuildukrainefund.org: чорна, лого, жовті акценти */
.top { background: var(--ink); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.logo img { height: 44px; display: block; }
.top nav { display: flex; gap: 18px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; }
.top nav a { text-decoration: none; }
.top nav a:hover, .top nav a.on { color: var(--yellow); }

.wrap { max-width: 880px; margin: 0 auto; padding-inline: 16px; }
main { padding-block: 28px 56px; }

h1, h2, h3 { text-transform: uppercase; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(26px, 5vw, 40px); }
h2 { font-size: 20px; margin-top: 1.6em; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--yellow); color: var(--ink); font: 700 15px/1 Helvetica, Arial, sans-serif;
  text-transform: uppercase; letter-spacing: .02em; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--yellow); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stack > * + * { margin-top: 16px; }

/* Список подій */
.events { display: grid; gap: 16px; }
.event-row { display: grid; grid-template-columns: 92px 1fr; gap: 18px; text-decoration: none; }
.event-row:hover { border-color: var(--ink); }
.datebox { background: var(--ink); color: var(--yellow); text-align: center; padding: 12px 6px; border-radius: var(--radius); align-self: start; }
.datebox b { display: block; font-size: 32px; line-height: 1; }
.datebox span { font-size: 12px; text-transform: uppercase; font-weight: 700; }
.event-row h3 { margin-bottom: 4px; }

/* Сторінка події */
.hero { background: var(--ink); color: #fff; padding-block: 36px 32px; }
.hero .when { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 700; padding: 4px 10px; margin-bottom: 14px; }
.hero p { color: #d9d9d9; margin: 0; }
.cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .cols { grid-template-columns: 1fr 380px; align-items: start; } }
.desc { white-space: pre-line; }

/* Форма */
form.reg label, .field > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field + .field { margin-top: 14px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid #cfcaca; border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--yellow); border-color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.err { font-size: 13px; color: var(--err); margin-top: 4px; font-weight: 700; }
.field.bad input, .field.bad select { border-color: var(--err); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400 !important; margin-top: 14px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.req { color: var(--err); }

.notice { border-left: 4px solid var(--yellow); background: #fffbe0; padding: 12px 14px; }
.notice.err-box { border-color: var(--err); background: #fdecea; }
.notice.ok-box { border-color: var(--ok); background: #edf7ee; }

/* Квиток */
.ticket { max-width: 420px; margin: 0 auto; background: #fff; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.ticket-head { background: var(--ink); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.ticket-head img { height: 34px; }
.ticket-no { font: 700 14px/1 ui-monospace, Menlo, monospace; color: var(--yellow); }
.ticket-body { padding: 20px; }
.ticket .qr { display: flex; justify-content: center; margin: 4px 0 10px; }
.ticket .qr svg { width: 260px; height: auto; }
.ticket-perf { border-top: 2px dashed var(--line); margin: 0 -20px; }
.dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; font-size: 15px; margin: 16px 0 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 700; }
.status { display: block; text-align: center; font-weight: 700; padding: 10px; text-transform: uppercase; font-size: 14px; }
.status.registered { background: var(--yellow); }
.status.attended { background: var(--ok); color: #fff; }
.status.cancelled { background: var(--err); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* Кабінет */
.reg-item { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; }
.pill.registered { background: var(--yellow); }
.pill.attended { background: var(--ok); color: #fff; }
.pill.cancelled, .pill.missed { background: #eee; color: var(--muted); }
.stars { display: flex; gap: 6px; flex-direction: row-reverse; justify-content: flex-end; }
.stars input { display: none; }
.stars label { font-size: 30px; line-height: 1; color: #ccc; cursor: pointer; margin: 0; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--warn); }

footer { border-top: 1px solid var(--line); padding-block: 24px; font-size: 13px; color: var(--muted); }

/* Сканер */
body.scanner { background: var(--ink); color: #fff; }
body.scanner main { padding-top: 12px; }
.scan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.counters div { background: #1f1f1f; padding: 10px; text-align: center; border-radius: var(--radius); }
.counters b { display: block; font-size: 26px; color: var(--yellow); }
.counters span { font-size: 12px; color: #aaa; text-transform: uppercase; }
#reader { width: 100%; max-width: 480px; margin: 0 auto; background: #000; border-radius: 8px; overflow: hidden; min-height: 280px; }
#reader video { border-radius: 8px; }
.result { position: fixed; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px 24px 96px; z-index: 10; overflow-y: auto; }
.result.show { display: flex; }
.result.ok { background: var(--ok); }
.result.warn { background: var(--warn); color: var(--ink); }
.result.error { background: var(--err); }
.result .icon { font-size: 88px; line-height: 1; }
.result .title { font-size: 34px; font-weight: 700; text-transform: uppercase; margin: 12px 0 6px; }
.result .name { font-size: 28px; font-weight: 700; }
.result .detail { font-size: 18px; margin-top: 6px; opacity: .9; }
.result .tap { position: absolute; bottom: 24px; font-size: 14px; opacity: .8; }
body.scanner input { background: #fff; }
.search-results { margin-top: 10px; display: grid; gap: 8px; }
.search-results .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #1f1f1f; padding: 10px 12px; border-radius: var(--radius); }
.search-results .row small { color: #aaa; display: block; }
body.scanner .btn.ghost { border-color: #fff; color: #fff; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: var(--ink); color: #fff; font-weight: 700; }
.table-scroll { overflow-x: auto; }

@media (max-width: 520px) {
  .logo img { height: 36px; }
  .top nav { gap: 12px; font-size: 12px; }
  .event-row { grid-template-columns: 70px 1fr; gap: 12px; }
  .datebox b { font-size: 26px; }
  .card { padding: 18px; }
}
.hero-cta { margin-top: 20px; }
@media (min-width: 820px) { .hero-cta { display: none; } }
.status.pending { background: #F0EDED; }
.status.rejected { background: var(--err); color: #fff; }
.pill.pending { background: #F0EDED; }
.pill.rejected { background: #eee; color: var(--muted); }
.steps { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.steps div { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.steps div:last-child { border-bottom: 0; }
.steps i { width: 26px; height: 26px; flex: none; border-radius: 13px; border: 2px solid var(--ink); box-sizing: border-box; }
.steps i.done { background: var(--ink); }
.steps i.later { border-style: dashed; border-color: #9a9a9a; }
.lang-switch { display: inline-flex; border: 1.5px solid #fff; border-radius: 4px; overflow: hidden; }
.lang-switch a { padding: 5px 8px; color: #fff; }
.lang-switch a.cur { background: var(--yellow); color: var(--ink); }
.invite-banner { background: var(--yellow); padding: 12px 0; font-size: 15px; }
/* Partner Pass — квиток для донорів, партнерів, спікерів, преси */
.ticket.vip { background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 12px; }
.ticket.vip .ticket-head { background: var(--ink); }
.pass-band { display: flex; justify-content: space-between; align-items: center; background: var(--yellow); color: var(--ink);
  padding: 12px 20px; font-size: 20px; font-weight: 800; letter-spacing: .08em; }
.ticket.vip .ticket-body { padding-top: 18px; }
.vip-name { font-size: 28px; font-weight: 800; line-height: 1.1; }
.vip-org { color: #d9d9d9; margin-top: 4px; }
.vip-row { display: flex; gap: 16px; align-items: center; margin: 18px 0 6px; }
.vip-row .qr { background: #fff; padding: 6px; border-radius: 6px; margin: 0; flex: none; }
.vip-row .qr svg { width: 150px; }
.vip-facts { display: grid; gap: 10px; font-size: 14px; line-height: 1.35; }
.vip-facts span { color: #bdbdbd; display: block; }
.vip-facts b.hl { color: var(--yellow); }
.ticket.vip .ticket-perf { border-color: #3a3a3a; }
.ticket.vip .dl dt { color: #bdbdbd; }
.good-to-know { max-width: 420px; margin: 18px auto 0; }
.good-to-know li { margin: 6px 0; }
.result .vip-band { display: none; position: absolute; top: 0; left: 0; right: 0; background: var(--ink); color: var(--yellow);
  padding: 16px; font-size: 22px; font-weight: 800; letter-spacing: .08em; }
.result.vip .vip-band { display: block; }
.result .notes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; width: 100%; max-width: 380px; }
.result .notes li { background: rgba(0,0,0,.22); border-radius: 6px; padding: 10px 12px; font-size: 17px; text-align: left; }

.map-box{margin:18px auto 0;max-width:520px;border:2px solid #101010;background:#fff}
.map-box iframe{display:block;width:100%;height:260px;border:0}

.result .facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; width: 100%; max-width: 380px; margin: 16px 0 0; background: rgba(0,0,0,.18); border-radius: 6px; padding: 12px 14px; text-align: left; font-size: 16px; }
.result .facts:empty { display: none; }
.result .facts dt { opacity: .8; }
.result .facts dd { margin: 0; font-weight: 700; word-break: break-word; }
.result .ok-btn { position: fixed; left: 16px; right: 16px; bottom: 16px; padding: 18px; font-size: 18px; font-weight: 700; text-transform: uppercase; background: #101010; color: #fff; border: 0; border-radius: 6px; }
