/* BUILT 2026 · shared styles for register, ticket, check-in and picture pages */
:root {
  --bg: #F2F5F0; --surface: #FFFFFF; --ink: #12301F; --ink-soft: #3E5747; --line: #CBD8CE;
  --grid: rgba(26,77,46,.07); --green: #1A4D2E; --green-mid: #2D7A4F; --gold: #C9933A; --gold-ink: #8A5F17; --on-green: #F2F5F0;
  --ok: #1F7A45; --ok-bg: #E3F4E9; --warn: #9A5B00; --warn-bg: #FFF1D6; --bad: #A12A2A; --bad-bg: #FBE4E4;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif; --body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0C1E14; --surface: #12291C; --ink: #E7EFE9; --ink-soft: #A9BFB0; --line: #24442F; --grid: rgba(201,147,58,.07);
    --green: #1F5C37; --green-mid: #5FB585; --gold: #D9A651; --gold-ink: #E3B865;
    --ok: #7FD6A1; --ok-bg: #133A24; --warn: #F2C26B; --warn-bg: #3A2C10; --bad: #F29C9C; --bad-bg: #3D1717; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); padding: 0 16px; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
.label { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.muted { color: var(--ink-soft); }
.small { font-size: 14.5px; }

.top { max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; flex: none; }
.brand b { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 13px; letter-spacing: .08em; display: block; line-height: 1.2; }
.brand span { font-size: 12.5px; color: var(--ink-soft); }
.top-link { font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.top-link:hover { text-decoration: underline; }

main { max-width: 680px; margin: 0 auto; padding-block: 36px 64px; display: grid; gap: 24px; }
h1 { font-weight: 900; font-stretch: 115%; font-size: clamp(32px, 7vw, 48px); line-height: 1.05; margin-top: 6px; }
.lead { color: var(--ink-soft); font-size: 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; color: var(--ink-soft); }
.facts b { color: var(--ink); font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(20px, 4vw, 30px); display: grid; gap: 18px; }

/* form */
.field { display: grid; gap: 6px; }
.field > label, .field > .flabel { font-weight: 600; font-size: 15.5px; }
.req { color: var(--gold-ink); }
.hint { font-size: 13.5px; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 6px; padding: 12px 14px; min-height: 48px; }
input:focus, select:focus { border-color: var(--green-mid); outline: none; box-shadow: 0 0 0 3px rgba(201,147,58,.35); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad); }
.err { color: var(--bad); font-size: 14px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: inline-block; border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 15px; cursor: pointer; background: var(--bg); }
.chips input:checked + span { background: var(--green); color: var(--on-green); border-color: var(--green); }
.chips input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); }
.consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--green); flex: none; }
.two { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--display); font-weight: 800; font-stretch: 110%; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; border-radius: 6px; padding: 14px 22px; font-size: 15px; border: 2px solid transparent; cursor: pointer; min-height: 48px; }
.btn-gold { background: var(--gold); color: #1A1407; }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-wa { background: #1FA855; color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-block { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.notice { border-radius: 8px; padding: 14px 16px; font-size: 15px; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }

/* ticket */
.tix { background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(18,48,31,.12); }
.tix-head { background: var(--green); color: var(--on-green); padding: 20px 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.tix-head .label { color: #E2B866; }
.tix-head h2 { font-weight: 900; font-stretch: 120%; font-size: 34px; letter-spacing: .06em; line-height: 1; margin-top: 4px; }
.tix-head .tag { font-size: 13px; color: #CFE2D5; text-align: right; }
.tix-body { padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; border-top: 2px dashed var(--line); }
.qr { background: #fff; padding: 10px; border-radius: 8px; width: 200px; height: 200px; display: grid; place-items: center; }
.qr img, .qr svg { width: 100%; height: 100%; image-rendering: pixelated; }
.tix-name { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; }
.tix-id { font-family: var(--mono); font-size: 20px; letter-spacing: .12em; color: var(--gold-ink); margin-top: 4px; }
.tix-meta { margin-top: 12px; font-size: 14.5px; color: var(--ink-soft); display: grid; gap: 2px; }
.tix-meta b { color: var(--ink); }
@media (max-width: 560px) { .tix-body { grid-template-columns: 1fr; justify-items: center; text-align: center; } .qr { width: 230px; height: 230px; } }

.invite { background: var(--green); color: var(--on-green); border-radius: 10px; padding: clamp(20px, 4vw, 28px); display: grid; gap: 14px; }
.invite .label { color: #E2B866; }
.invite h2 { font-weight: 900; font-stretch: 115%; font-size: 26px; line-height: 1.1; }
.invite p { color: #CFE2D5; }
.linkbox { display: flex; gap: 8px; align-items: stretch; }
.linkbox input { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); font-family: var(--mono); font-size: 14.5px; }
.linkbox .btn { padding: 10px 16px; }
@media (max-width: 480px) { .linkbox { flex-direction: column; } }

.foot { max-width: 680px; margin: 0 auto; padding: 20px 0 40px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }

/* check-in */
.status { border-radius: 12px; padding: 26px; text-align: center; display: grid; gap: 6px; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.warn { background: var(--warn-bg); color: var(--warn); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.status .big { font-family: var(--display); font-weight: 900; font-stretch: 115%; font-size: clamp(30px, 8vw, 44px); line-height: 1.05; }
.status .who { font-size: 22px; font-weight: 600; color: var(--ink); }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.count { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.count b { font-family: var(--display); font-weight: 900; font-size: 32px; display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.results li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.results .n { font-weight: 600; }
.results .m { font-size: 13.5px; color: var(--ink-soft); }
.results .btn { padding: 8px 14px; min-height: 40px; font-size: 13px; }
.pill { font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 4px 10px; background: var(--ok-bg); color: var(--ok); white-space: nowrap; }

/* picture maker */
.canvas-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.canvas-wrap canvas { width: 100%; height: auto; display: block; border-radius: 6px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.spinner { width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

@media print {
  body { background: #fff; padding: 0; } body::before, .top, .foot, .invite, .no-print { display: none !important; }
  .tix { box-shadow: none; }
}
