/* Mobile-first styles. Colours are set once here. */
:root { --navy:#0f2347; --navy2:#1b3566; --gold:#b98a2e; --cream:#fbf6ea; --line:#e4d9bf;
        --ok:#1c7c4a; --warn:#a86a00; --bad:#a32d2d; --text:#1d2433; --muted:#667085; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; background:#e9e4d6; color:var(--text); }
#app { max-width:520px; margin:0 auto; min-height:100vh; background:var(--cream); }
/* One slim line: event name on the left, log out on the right */
header { background:var(--navy); color:#fff; padding:7px 12px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
header h1 { margin:0; font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
header p { margin:0; font-size:12px; color:#c9d3e6; white-space:nowrap; }
header a { color:#e7c97a; }
nav { display:flex; background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
nav a { flex:1; text-align:center; padding:9px 2px; font-size:13px; color:var(--muted); text-decoration:none; }
nav a.on { color:var(--navy); font-weight:700; border-bottom:3px solid var(--gold); }
main { padding:16px; }
h2 { font-size:17px; margin:0 0 4px; color:var(--navy); }
h3 { font-size:15px; margin:18px 0 6px; color:var(--navy); }
.sub { font-size:13px; color:var(--muted); margin:0 0 14px; }
label { display:block; font-size:13px; font-weight:600; margin:12px 0 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], select {
  width:100%; padding:11px 12px; font-size:16px; border:1px solid #cfc6ae; border-radius:8px; background:#fff; }
.row { display:flex; gap:10px; } .row > * { flex:1; min-width:0; }
.btn { display:block; width:100%; padding:13px; font-size:16px; font-weight:600; border:0; border-radius:10px;
       background:var(--navy); color:#fff; margin-top:16px; cursor:pointer; text-align:center; text-decoration:none; }
.btn.gold { background:var(--gold); }
.btn.ghost { background:#fff; color:var(--navy); border:1px solid var(--navy); }
.btn.danger { background:#fff; color:var(--bad); border:1px solid var(--bad); }
.btn.small { display:inline-block; width:auto; padding:7px 12px; font-size:13px; margin:0; border-radius:8px; }
.card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px; margin-bottom:10px; }
.person { display:flex; gap:12px; align-items:center; }
.avatar { width:48px; height:48px; border-radius:50%; background:var(--navy2); color:#fff; display:flex;
          align-items:center; justify-content:center; font-weight:600; flex:none; object-fit:cover; }
.person .info { flex:1; min-width:0; } .person .info b { display:block; font-size:15px; }
.person .info span { font-size:12px; color:var(--muted); word-break:break-word; }
.badge { display:inline-block; font-size:11px; padding:2px 8px; border-radius:20px; margin:4px 4px 0 0; font-weight:600; }
.b-ok { background:#dff3e7; color:var(--ok); } .b-warn { background:#fdefd0; color:var(--warn); }
.b-bad { background:#fbe1e1; color:var(--bad); } .b-info { background:#e3e9f5; color:var(--navy); }
.actions { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; } .actions form { margin:0; }
.result { border-radius:12px; padding:14px; margin:0 0 14px; font-size:15px; }
.result.ok { background:#dff3e7; color:var(--ok); } .result.warn { background:#fdefd0; color:var(--warn); }
.result.bad { background:#fbe1e1; color:var(--bad); }
.result .big { font-size:28px; font-weight:700; }
table { width:100%; border-collapse:collapse; font-size:13px; background:#fff; }
th, td { text-align:left; padding:7px 8px; border-bottom:1px solid var(--line); }
th { color:var(--muted); font-weight:600; }
.bar { height:10px; background:#eee5cf; border-radius:6px; overflow:hidden; margin-top:6px; }
.bar i { display:block; height:100%; background:var(--gold); }
video { width:100%; border-radius:12px; background:#000; display:block; }

/* ---- Font for the ID card, stored inside the app (no outside font service is called) ---- */
@font-face { font-family:"Card Sans"; font-weight:500; src:url(fonts/poppins-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family:"Card Sans"; font-weight:700; src:url(fonts/poppins-latin-700-normal.woff2) format("woff2"); }

/* ---- ID card: same markup on the phone and on the print sheet ----
   Every size inside the card is in "em", so the whole card grows or shrinks with ONE number:
   the font-size on .idcard (phone: as wide as the screen allows; print sheet: fixed small size).
   The three card colours are set once here. */
.idcard { --maroon:#7b1528; --cnavy:#14204a; --cgold:#c8962e; font-family:"Card Sans",system-ui,sans-serif; position:relative; width:27em;
          font-size:min(3.5vw, 16px); margin:0 auto 10px; border-radius:1.2em; overflow:hidden; background:#fdf6e8; color:#1d1d1d;
          box-shadow:0 1px 6px rgba(0,0,0,.25); break-inside:avoid; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.idcard .wave { display:block; width:100%; height:3.6em; }
.idcard .face { padding:0 1.5em .2em; text-align:center; }
.idcard .kvlogo { width:14.5em; display:block; margin:-1.2em auto .5em; }
.idcard .rule { border-top:1px solid var(--maroon); margin:0 0 .5em; }
.idcard .reunion { width:17.5em; display:block; margin:0 auto .7em; }
.idcard .who { display:flex; gap:1.1em; align-items:center; text-align:left; }
.idcard .photo { width:8.6em; height:10.2em; flex:none; border-radius:1em; border:.2em solid var(--cgold); background:#e9e9ec; object-fit:cover; display:block; }
.idcard a.photo.add { display:flex; align-items:center; justify-content:center; text-align:center; padding:.6em; font-size:1em; font-weight:500;
                      color:var(--maroon); text-decoration:none; border-style:dashed; background:#fff; line-height:1.3; }
.idcard .who .txt { flex:1; min-width:0; border-left:1px solid var(--cgold); padding-left:1.1em; }
.idcard .lab { font-size:1.15em; font-weight:500; color:var(--cnavy); }
.idcard .val { font-size:1.9em; font-weight:700; color:var(--maroon); line-height:1.15; overflow-wrap:anywhere; }
.idcard .val.city { font-size:1.45em; }
.idcard .gold { border-top:1px solid var(--cgold); margin:.6em 0; }
.idcard .scanrow { display:flex; gap:1.1em; align-items:center; justify-content:center; margin:.8em 0 .7em; text-align:left; }
.idcard .qr { padding:.35em; border:.2em solid var(--cgold); border-radius:.8em; background:#fff; }
.idcard .qr svg { width:8.4em; height:8.4em; display:block; }
.idcard .scantxt { border-left:1px solid var(--cgold); padding-left:1.1em; font-size:1.3em; font-weight:700; color:var(--cnavy); line-height:1.3; }
.idcard .scantxt small { display:block; font-size:.75em; font-weight:500; color:#444; letter-spacing:.06em; }
.idcard .pill { display:inline-block; background:var(--maroon); color:#fff; font-size:1.4em; font-weight:700; padding:.3em 1.2em; border-radius:2em; white-space:nowrap; }
.idcard.back .face { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:37em; }
.idcard.back .emblem { width:21em; margin-bottom:1.5em; }
.sheet .idcard { font-size:10px; box-shadow:none; border:1px solid #bbb; }   /* print sheet: 270px wide cards */

/* My card page: card, then collected boxes, then two small buttons */
.mycard { padding:10px 8px 14px; }
.mycard .note { max-width:432px; margin:0 auto 10px; font-size:13px; padding:9px 12px; }
.got { display:flex; gap:8px; margin:0 auto 10px; max-width:432px; }
.got div { flex:1; border-radius:10px; padding:8px 10px; font-size:13px; font-weight:600; text-align:center; }
.got .yes { background:#dff3e7; color:var(--ok); } .got .no { background:#fff; color:var(--muted); border:1px dashed #cfc6ae; }
.got small { display:block; font-weight:400; font-size:11px; }
.linkrow { display:flex; gap:8px; justify-content:center; }
.hero { width:78%; max-width:300px; display:block; margin:0 auto 10px; }

/* Section-change rows on the details form */
.addrow { display:flex; gap:8px; align-items:center; margin-top:8px; } .addrow span { font-size:13px; color:var(--muted); flex:none; }
.addrow .rm, .plus { border:1px solid var(--navy); background:#fff; color:var(--navy); border-radius:8px; font-size:13px; font-weight:600; padding:8px 10px; cursor:pointer; flex:none; }
.plus { margin-top:8px; padding:6px 10px; }

@media print {
  body, #app { background:#fff; } header, nav, .noprint { display:none !important; }
  #app { max-width:none; } main { padding:0; }
  .sheet { display:grid; grid-template-columns:repeat(3, 1fr); gap:8mm; align-items:start; }
  .idcard { margin:0; }
}
