:root {
  /* Philippines x Kuwait: PH blue, sun yellow, the shared red, Kuwait green and black */
  --ph-blue: #0038A8;
  --ph-red: #CE1126;
  --sun: #FCD116;
  --kw-green: #007A3D;
  --kw-black: #141414;
  --flag-stripe: linear-gradient(90deg, var(--ph-blue) 0 30%, var(--ph-red) 30% 50%, var(--sun) 50% 58%, var(--kw-green) 58% 82%, var(--kw-black) 82% 100%);

  --ink: #0B1F4D;          /* text and dark surfaces: deep Philippine blue */
  --ink-2: #2E3F6B;
  --muted: #55607A;
  --brand: var(--ph-blue); /* main buttons */
  --brand-deep: #002878;
  --line: #DCE3F1;
  --field: #B7C2DC;
  --paper: #F4F6FB;
  --card: #FFFFFF;
  --tint: #E9EFFC;         /* light blue panels */
  --accent: var(--sun);
  --good: var(--kw-green);
  --warn: #B45309;
  --bad: var(--ph-red);
  --radius: 16px;
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); border-top: 6px solid transparent; border-image: var(--flag-stripe) 1; font-size: 16px; line-height: 1.45; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
a { color: var(--ink); }
.en { display: block; color: var(--muted); font-size: 0.85em; font-weight: 500; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
.wrap.wide { max-width: 1100px; }
.topbar { display: flex; align-items: center; gap: 8px; }
.topbar .brand { margin-right: auto; min-width: 0; }
.topbar .tag, .topbar #langBtn { flex: none; }
#langBtn { min-height: 40px; padding: 6px 12px; font-size: 14px; border-radius: 999px; }
@media (max-width: 400px) {
  .brand { font-size: 13px; letter-spacing: 0.02em; gap: 8px; }
  .tag { font-size: 12px; padding: 3px 8px; }
}
.brand { font-weight: 800; font-size: 13px; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.brand .brand-pass { color: var(--brand); }
body.door .brand .brand-pass { color: #FCD116; }
.brand .brand-sub { font-weight: 600; opacity: .8; }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--ink); font-size: 13px; font-weight: 700; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.dark { background: linear-gradient(160deg, var(--brand), var(--ink)); color: #fff; border-color: var(--brand-deep); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid2.dates { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
input[type="datetime-local"] { font-size: 16px; min-width: 0; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
label .hint { font-weight: 500; color: var(--muted); font-size: 14px; }
input, select, textarea {
  font: inherit; font-size: 18px; padding: 12px 14px; min-height: 54px; border-radius: 12px;
  border: 2px solid var(--field); background: #fff; color: var(--ink); width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--brand); }
input.pin { letter-spacing: 0.5em; text-align: center; font-size: 25px; max-width: 220px; }
.check { flex-direction: row; align-items: flex-start; gap: 12px; font-weight: 500; }
.check input { width: 28px; min-height: 28px; height: 28px; flex: none; margin-top: 2px; }

button, .btn {
  font: inherit; font-size: 18px; font-weight: 800; min-height: 58px; padding: 12px 20px; border-radius: 14px;
  border: 2px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-align: center;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button.secondary, .btn.secondary { background: #fff; color: var(--brand); }
button:not(.secondary):not(.link):not(.good):not(.bad):hover:not(:disabled) { background: var(--brand-deep); border-color: var(--brand-deep); }
button.secondary:hover:not(:disabled), .btn.secondary:hover { background: var(--tint); }
button.small, .btn.small { font-size: 14px; min-height: 48px; padding: 8px 14px; border-radius: 12px; }
button.good { background: var(--good); border-color: var(--good); }
button.bad { background: var(--bad); border-color: var(--bad); }
button:disabled { opacity: 0.55; cursor: progress; }
button:active:not(:disabled), .btn:active { transform: scale(0.98); }
button, .btn { transition: transform 80ms ease, background-color 120ms ease; -webkit-tap-highlight-color: transparent; }
button:focus-visible, .btn:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--bad); background: #FFF6F7; }
button.link { background: none; border: none; color: var(--ink); text-decoration: underline; min-height: 48px; padding: 4px; font-weight: 600; font-size: 14px; }

.msg { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.msg.error { background: #FCE8EA; color: var(--bad); }
.msg.ok { background: #E3F3EA; color: var(--good); }
.msg.info { background: var(--tint); color: var(--ink); }

/* ---------- Event Pass ---------- */
.pass { background: linear-gradient(165deg, var(--brand) 0%, var(--ink) 75%); color: #fff; border-radius: 24px; padding: 24px 20px 30px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pass .label { font-size: 14px; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); }
.pass .who { font-size: 26px; font-weight: 800; line-height: 1.1; }
.pass .what { font-size: 16px; color: #D6E0F7; }
.pass::after, .member-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--flag-stripe); }
.pass .qr { background: #fff; padding: 14px; border-radius: 16px; }
.pass .qr img, .pass .qr canvas { display: block; width: 220px; height: 220px; }
.pass .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: 0.08em; }
.pass .live { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pass .dot { width: 18px; height: 18px; border-radius: 50%; background: #3DDC84; animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: 1; transform: scale(1); } to { opacity: 0.35; transform: scale(0.75); } }
.daycolour { width: 100%; border-radius: 12px; padding: 10px; font-weight: 800; font-size: 16px; color: #fff; border: 3px solid rgba(255,255,255,0.9); }
.present { background: var(--good); border-radius: 14px; padding: 12px 16px; font-weight: 800; font-size: 18px; width: 100%; }

.notice { border-left: 0; border-radius: 12px; padding: 14px; background: #fff; border: 2px solid var(--line); }
.notice.warning { border-color: #E0A800; background: #FFF8DC; }
.notice.emergency { border-color: var(--bad); background: #FCE8EA; }
.notice .k { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Staff scan result ---------- */
.result { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; color: #fff; text-align: center; }
.result.good { background: var(--good); }
.result.warn { background: var(--warn); }
.result.bad { background: var(--bad); }
.result .big { font-size: 39px; font-weight: 800; line-height: 1.05; }
.result .name { font-size: 28px; font-weight: 700; }
.result button { background: #fff; color: var(--ink); border-color: #fff; min-width: 220px; }
#reader { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 16px; overflow: hidden; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { background: #fff; color: var(--brand); border-color: var(--line); font-size: 14px; min-height: 46px; }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: inset 0 -4px 0 var(--sun); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat b.small { font-size: 19px; }
.stat span { color: var(--muted); font-size: 14px; font-weight: 600; }
.table-box { overflow-x: auto; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--tint); font-weight: 800; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.chip.sent, .chip.open { background: #E3F3EA; color: var(--good); }
.chip.pending_approval, .chip.scheduled { background: #FFF4D6; color: var(--warn); }
.chip.cancelled { background: var(--tint); color: var(--muted); }
.chip.rejected, .chip.closed { background: #FCE8EA; color: var(--bad); }
.modal { position: fixed; inset: 0; background: rgba(11, 31, 77, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.modal .card { max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; }
.small-print { font-size: 14px; color: var(--muted); }

@media print {
  body * { visibility: hidden; }
  .printable, .printable * { visibility: visible; }
  .printable { position: absolute; inset: 0; border: none; }
  .printable button { display: none; }
}

/* ---------- Member card (credit-card shape, prints at real size) ---------- */
.member-card { background: linear-gradient(150deg, var(--brand) 0%, var(--ink) 80%); color: #fff; position: relative; overflow: hidden; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 420px; width: 100%; margin: 0 auto; aspect-ratio: 85.6 / 54; }
.mc-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); }
.mc-body { display: flex; gap: 14px; align-items: center; flex: 1; }
.mc-qr { background: #fff; padding: 8px; border-radius: 10px; flex: none; }
.mc-qr img, .mc-qr canvas { display: block; width: 120px; height: 120px; }
.mc-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mc-name { font-size: 18px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.mc-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: 0.08em; }
.mc-since { font-size: 12px; color: #D6E0F7; }
.mc-note { font-size: 11px; color: #D6E0F7; line-height: 1.3; }
@media print {
  .member-card.printable { position: absolute; inset: 10mm auto auto 10mm; width: 85.6mm; height: 54mm; max-width: none; aspect-ratio: auto; padding: 4mm; border-radius: 3mm; gap: 2mm;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .member-card .mc-qr img, .member-card .mc-qr canvas { width: 30mm; height: 30mm; }
  .member-card .mc-name { font-size: 12pt; } .member-card .mc-code { font-size: 9pt; }
  .member-card .mc-top, .member-card .mc-since, .member-card .mc-note { font-size: 6.5pt; }
}

/* ---------- Feedback rating ---------- */
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rating button { flex-direction: column; gap: 2px; font-size: 26px; padding: 8px 2px; min-height: 76px; background: #fff; color: var(--ink); border-color: var(--line); }
.rating button span { font-size: 12px; font-weight: 700; }
.rating button[aria-checked="true"] { background: var(--sun); border-color: var(--brand); }

/* ---------- Member page: welcome, register steps, account ---------- */
.steps-intro { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps-intro li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.steps-intro b { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 15px; }
.steps-intro + h2 { padding-top: 14px; border-top: 2px solid var(--line); }

.stepper { display: flex; flex-direction: column; gap: 8px; }
.stepper-label { font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stepper-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stepper-bar i { height: 8px; border-radius: 99px; background: var(--line); }
.stepper-bar i.on { background: var(--brand); }
.stepper-bar i.on:last-child { background: var(--kw-green); }
.step { display: flex; flex-direction: column; gap: 14px; }
#vRegister .notice { font-size: 14px; }
#vRegister .notice ul { line-height: 1.4; }

/* <details> can't be a flex box everywhere, so space its children directly */
details.card { display: block; }
details.card > * + *, details details > * + * { margin-top: 14px; }
details.card > button, details.card > label { width: 100%; }
details.card > button.link { width: auto; }
details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: ""; width: 10px; height: 10px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(45deg); margin-right: 6px; flex: none; transition: transform 150ms ease; }
details[open] > summary::after { transform: rotate(-135deg); }
#vAccount > summary { font-size: 18px; }
#vAccount details { border-top: 2px solid var(--line); padding-top: 4px; }
#vAccount label.check { flex-direction: row; }

/* Pass screen: event details sit under the pass */
#vPass #eventHead { margin-top: -4px; }
#vPass #eventHead > span.small-print:first-child { display: none; }
#vPass #eventHead h1 { font-size: 19px; }

.notice-more > summary { min-height: 44px; }
.notice-more > summary b::after { content: " · tap to read"; font-weight: 600; color: var(--muted); }
.notice-more[open] > summary b::after { content: ""; }
html[lang="fil"] .notice-more > summary b::after { content: " · pindutin para mabasa"; }
html[lang="fil"] .notice-more[open] > summary b::after { content: ""; }
.brand { line-height: 1.2; }
@media (max-width: 400px) { .brand-sub { display: none; } }

/* Flag-colour touches */
.tag { border-color: var(--brand); color: var(--brand); }
h1, h2 { color: var(--ink); }
.card.dark h1, .card.dark h2, .result h1, .result h2 { color: #fff; }
.steps-intro b { background: var(--sun); color: var(--ink); }
.steps-intro li:nth-child(2) b { background: var(--ph-red); color: #fff; }
.steps-intro li:nth-child(3) b { background: var(--kw-green); color: #fff; }
.mc-top { color: var(--sun); }
.pass .label { color: var(--sun); }
@media print { body { border-top: 0; } }

/* ID card photos (sign-up, My account, staff/admin viewer) */
.idshots { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 110px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; cursor: pointer; overflow: hidden; font-weight: 700; color: var(--brand, #0038A8); margin: 0; }
.shot small { font-weight: 500; color: var(--muted); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot.has span { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(19,33,60,.75); color: #fff; font-size: 13px; padding: 3px; }
.shot.has span small, .shot.has span br { display: none; }
.shot.busy { opacity: .6; }
.id-photos { display: flex; flex-direction: column; gap: 10px; }
.id-photos img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
input.filled { background: #EEF7EE; }

/* ================= App look (inspired by event-app references) ================= */
/* Soft, rounded surfaces instead of outlines */
.card { border: 0; border-radius: 24px; box-shadow: 0 1px 2px rgba(11, 31, 77, 0.06), 0 10px 28px rgba(11, 31, 77, 0.08); }
button, .btn { border-radius: 18px; }
button.small, .btn.small { border-radius: 999px; }
h1 { letter-spacing: -0.02em; }
h2 { letter-spacing: -0.015em; }
.pass { border-radius: 28px; box-shadow: 0 14px 34px rgba(0, 40, 120, 0.28); }
input, select, textarea { border-radius: 14px; }

/* Greeting header: only on the home screen */
.hello { display: none; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
body[data-view="vHome"] .hello { display: flex; }
.hello-sub { display: block; font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ph-red); }
.hello h1 { font-size: 30px; line-height: 1.1; margin-top: 4px; overflow-wrap: anywhere; }
.avatar { flex: none; width: 56px; height: 56px; min-height: 0; padding: 0; border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(140deg, var(--sun), #F2A900); color: var(--ink); font-size: 18px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(11, 31, 77, 0.18); }
button.avatar:hover:not(:disabled) { background: linear-gradient(140deg, #FFE04D, var(--sun)); border-color: #fff; }

/* Home */
.home { display: flex; flex-direction: column; gap: 14px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sec-head h2 { font-size: 19px; }

/* Event cards row */
.ev-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 14px; scrollbar-width: none; }
.ev-rail::-webkit-scrollbar { display: none; }
.ev-rail:has(> .ev-card:only-child) { grid-auto-columns: 100%; }
.ev-card { --g1: var(--ph-blue); --g2: var(--ink); --fg: #fff; --sunc: rgba(252, 209, 22, 0.95);
  position: relative; overflow: hidden; isolation: isolate; scroll-snap-align: start; min-height: 300px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 14px;
  border-radius: 28px; color: var(--fg); text-decoration: none;
  background: linear-gradient(160deg, var(--g1) 0%, var(--g2) 100%);
  box-shadow: 0 12px 26px rgba(11, 31, 77, 0.22); transition: transform 120ms ease; }
.ev-card:active { transform: scale(0.98); }
.ev-card:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.ev-card.light { --fg: var(--ink); --sunc: rgba(255, 255, 255, 0.95); }
.ev-card.past { filter: saturate(0.35); opacity: 0.85; }
/* Sunrise motif from the KabayanPass logo */
.ev-sun { position: absolute; z-index: -1; right: -40px; top: 70px; width: 240px; height: 120px;
  background: radial-gradient(circle at 50% 100%, var(--sunc) 0 38%, transparent 39%),
    repeating-conic-gradient(from -90deg at 50% 100%, var(--sunc) 0deg 7deg, transparent 7deg 22.5deg);
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 0 70%, transparent 71%);
  mask: radial-gradient(circle at 50% 100%, #000 0 70%, transparent 71%); opacity: 0.55; }
.ev-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ev-count { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--sun); color: var(--ink); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-card.light .ev-count { background: #fff; }
.ev-count:empty { display: none; }
.ev-count[data-state="live"] { background: #3DDC84; color: #0B2E1A; }
.ev-count[data-state="live"]::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite alternate; }
.ev-count[data-state="ended"] { background: rgba(255, 255, 255, 0.85); color: var(--ink); }
.ev-date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 62px;
  border-radius: 16px; background: rgba(255, 255, 255, 0.95); color: var(--ink); line-height: 1; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); }
.ev-date:empty { display: none; }
.ev-date b { font-size: 23px; font-weight: 800; }
.ev-date span { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; margin-top: 4px; color: var(--ph-red); }
.ev-foot { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 22px;
  background: rgba(6, 16, 40, 0.32); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ev-card.light .ev-foot { background: rgba(255, 255, 255, 0.6); }
.ev-name { font-size: 19px; font-weight: 800; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-foot small { font-size: 14px; font-weight: 600; opacity: 0.9; }
.ev-status { align-self: flex-start; margin-top: 6px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 800;
  background: #fff; color: var(--ink); }
.ev-status.ok { background: #3DDC84; color: #0B2E1A; }
.ev-card.skeleton { background: linear-gradient(100deg, #E3E8F3 30%, #F1F4FA 50%, #E3E8F3 70%); background-size: 300% 100%;
  animation: shimmer 1.2s linear infinite; box-shadow: none; }
@keyframes shimmer { to { background-position: -150% 0; } }

.empty { align-items: center; text-align: center; }
.empty-art { width: 76px; height: 76px; border-radius: 20px; background: url("favicon.svg") center / cover; box-shadow: 0 8px 18px rgba(0, 56, 168, 0.25); }

/* Quick tiles */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 120px; padding: 16px; text-align: left;
  border: 0; border-radius: 24px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none;
  box-shadow: 0 1px 2px rgba(11, 31, 77, 0.06), 0 10px 28px rgba(11, 31, 77, 0.08); }
button.tile:hover:not(:disabled), a.tile:hover { background: var(--tint); border-color: transparent; }
.tile b { display: block; font-size: 15px; font-weight: 800; line-height: 1.2; }
.tile small { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.tile-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tint); color: var(--brand); }
.tile-ico.red { background: #FCE8EA; color: var(--ph-red); }
.tile-ico svg, .tabbar svg { width: 24px; height: 24px; }

/* Bottom tab bar */
.tabbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: min(528px, calc(100% - 24px));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; border-radius: 26px; background: #fff;
  box-shadow: 0 10px 30px rgba(11, 31, 77, 0.2), 0 0 0 1px rgba(11, 31, 77, 0.05); }
.tabbar[hidden] { display: none; }
.tabbar button, .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 58px; padding: 6px 2px; border: 0; border-radius: 18px; background: none; color: var(--muted);
  font-size: 13px; font-weight: 800; text-decoration: none; }
.tabbar button:hover:not(:disabled), .tabbar a:hover { background: var(--tint); border-color: transparent; color: var(--brand); }
.tabbar [aria-current] { background: var(--tint); color: var(--brand); box-shadow: inset 0 -4px 0 var(--sun); }
body.has-tabs .wrap { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
body.has-tabs .help-foot { display: none; }

/* Event header: coloured hero before joining, plain card under the pass */
#eventHead { --g1: var(--ph-blue); --g2: var(--ink); position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--g1), var(--g2)); color: #fff; }
#eventHead.light { color: var(--ink); }
#eventHead h1 { color: inherit; }
#eventHead .small-print { color: inherit; opacity: 0.85; }
#eventHead .ev-kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--sun); }
#eventHead.light .ev-kicker { color: var(--ink); }
.ev-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ev-hero-top:has(.ev-count:empty):has(.ev-date:empty) { display: none; }
#eventHead .btn.secondary, #eventHead button.secondary { border-color: #fff; }
#vPass #eventHead { background: #fff; color: var(--ink); }
#vPass #eventHead .ev-hero-top, #vPass #eventHead .ev-kicker { display: none; }

@media (max-width: 360px) {
  .quick { grid-template-columns: 1fr; }
  .hello h1 { font-size: 25px; }
}
@media print { .tabbar, .hello { display: none !important; } }
.ev-rail.open { grid-auto-columns: 70%; }
.ev-rail.open .ev-card { min-height: 250px; }
.ev-status.join { background: var(--sun); color: var(--ink); }
.ev-card.light .ev-status.join { background: var(--ink); color: #fff; }
.ev-rail[hidden] { display: none; }

/* Welcome hero */
.card.welcome { padding: 0 20px 20px; overflow: hidden; gap: 14px; }
.card.welcome > .welcome-hero { margin: 0 -20px 6px; }
.welcome-hero { --sunc: rgba(252, 209, 22, 0.95); position: relative; isolation: isolate; overflow: hidden;
  padding: 24px 20px 28px; color: #fff; background: linear-gradient(160deg, var(--ph-blue) 0%, var(--ink) 100%); }
.welcome-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--flag-stripe); }
.welcome-hero .ev-sun { right: -90px; top: auto; bottom: 6px; opacity: 0.28; }
.welcome-hero h1, .welcome-hero p, .welcome-hero .hello-sub { position: relative; }
.welcome-hero .hello-sub { color: var(--sun); }
.welcome-hero h1 { color: #fff; font-size: 25px; line-height: 1.15; margin-top: 6px; max-width: 15ch; }
.welcome-hero p { margin-top: 10px; color: #D6E0F7; font-weight: 600; max-width: 24ch; }

/* Narrow phones: keep the brand and the top-bar pills from touching */
@media (max-width: 389px) {
  .topbar { gap: 6px; }
  .brand { font-size: 13px; gap: 6px; }
  .brand img { width: 24px; height: 24px; }
  .topbar .tag { font-size: 11px; padding: 3px 7px; }
  #langBtn { font-size: 13px; padding: 5px 10px; min-height: 38px; }
}

/* DEMO banner (every page) and About line */
.demo-banner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px;
  background: var(--sun); color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center; }
.demo-banner b { padding: 2px 8px; border-radius: 6px; background: var(--ink); color: var(--sun); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.about { margin-top: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.door-wrap .about { color: rgba(255, 255, 255, 0.7); margin: 0; }
@media print { .demo-banner { border: 2px solid #000; } }

/* =====================================================================
   Member app shell (body.app): native-style chrome instead of a web page
   ===================================================================== */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body.app {
  --nav-h: 56px;
  --safe-t: env(safe-area-inset-top, 0px);
  --app-bg: #F2F3F7;
  --hair: rgba(11, 37, 69, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, Roboto, 'Segoe UI', 'Figtree', sans-serif;
  background: var(--app-bg); border-top: 0; border-image: none;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
body.app button, body.app .btn, body.app .navbar, body.app .tabbar, body.app summary, body.app .tile, body.app .ev-card,
body.app h1, body.app h2, body.app .row { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.app .wrap { padding-top: calc(var(--nav-h) + var(--safe-t) + 8px); padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); gap: 16px; }
body.app.has-tabs .wrap { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }

/* ---- Top bar ---- */
.navbar { display: none; }
body.app .navbar { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; height: calc(var(--nav-h) + var(--safe-t)); padding: var(--safe-t) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: rgba(242, 243, 247, 0.82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow 160ms ease; }
body.app .navbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--flag-stripe); opacity: 0.9; }
body.app.nav-shadow .navbar { box-shadow: 0 1px 0 var(--hair); }
.nav-left { display: flex; align-items: center; min-width: 0; }
.nav-brand { font-size: 15px; }
body.app.has-back .nav-brand { display: none; }
.nav-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px 0 0; margin-left: -6px; border: 0; background: none;
  color: var(--brand); font-size: 15px; font-weight: 500; }
.nav-back[hidden] { display: none; }
.nav-back svg { width: 26px; height: 26px; }
button.nav-back:hover:not(:disabled) { background: none; color: var(--brand-deep); }
.nav-title { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: opacity 160ms ease, transform 160ms ease; }
body.app.scrolled .nav-title, body.app.title-fixed .nav-title { opacity: 1; transform: none; }
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
body.app .nav-right .tag { font-size: 12px; }
.demo-pill { min-height: 30px; padding: 3px 10px; border-radius: 999px; border: 0; background: var(--sun); color: var(--ink);
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em; }
button.demo-pill:hover:not(:disabled) { background: #FFE04D; border: 0; }
body.app #langBtn { min-height: 30px; padding: 3px 10px; border: 0; border-radius: 999px; background: rgba(14, 116, 144, 0.1); color: var(--brand);
  font-size: 13px; font-weight: 700; }
body.app.has-tabs #langBtn { display: none; } /* signed in: language lives in Account */
@media (max-width: 380px) { body.app .brand-name { font-size: 13px; } body.app .nav-brand img { width: 26px; height: 26px; } }

/* DEMO note: on sign-up / log-in screens, or when the pill is tapped */
body.app .demo-banner { display: none; border-radius: 16px; justify-content: flex-start; text-align: left; padding: 12px 14px; font-size: 13px; }
body.app[data-view="vRegister"] .demo-banner, body.app[data-view="vLogin"] .demo-banner, body.app.show-demo .demo-banner { display: flex; flex-wrap: nowrap; }

/* ---- Screens: no web "cards" around forms; big titles; slide in ---- */
body.app main > .card:not(#eventHead):not(#vAccount) { background: transparent; box-shadow: none; padding: 0; border-radius: 0; }
body.app main > .card > h2:first-child, body.app .step > h2:first-child, body.app .screen-title {
  font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; margin: 2px 0 2px; }
body.app h1, body.app h2, body.app h3 { font-family: inherit; }
body.app #vAccount > summary { display: none; }
.screen-title { display: none; }
body.app .screen-title { display: block; }
body.app main > .enter { animation: screen-in 240ms cubic-bezier(.2, .8, .2, 1); }
@keyframes screen-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.app main > .enter { animation: none; } }

/* Account is its own tab; it never trails under other screens */
body.app:not([data-view="vAccount"]):not([data-view="vConsent"]) #vAccount { display: none !important; }

/* ---- Native-style controls ---- */
body.app button, body.app .btn { min-height: 54px; border-radius: 14px; font-size: 15px; font-weight: 650; letter-spacing: 0; }
body.app button.secondary, body.app .btn.secondary { background: rgba(14, 116, 144, 0.1); border-color: transparent; color: var(--brand); }
body.app button.secondary:hover:not(:disabled), body.app .btn.secondary:hover { background: rgba(14, 116, 144, 0.16); border-color: transparent; }
body.app button.small, body.app .btn.small { min-height: 40px; font-size: 13px; }
body.app button.link { min-height: 44px; text-decoration: none; color: var(--brand); font-weight: 600; font-size: 14px; }
body.app button.link:hover:not(:disabled) { background: none; }
body.app label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.app select, body.app textarea {
  min-height: 54px; border: 1px solid #DDE2EC; border-radius: 14px; background: #fff; font-size: 16px; font-weight: 500; color: var(--ink);
  box-shadow: none; outline: none; }
body.app input:focus, body.app select:focus, body.app textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.18); outline: none; }
body.app .hint { font-weight: 500; }
body.app .msg { border-radius: 14px; }
body.app .help-foot { display: none; text-align: center; margin: 0; }
body.app[data-view="vWelcome"] .help-foot { display: block; }
body.app .help-foot a { color: var(--brand); font-weight: 600; text-decoration: none; }
body.app > main > .about { display: none; }
body.app[data-view="vWelcome"] > main > .about { display: block; }
body.app.has-tabs .rp-btn { display: none; } /* signed in: "Report a problem" is a row in Account */
body.app #rgBack, body.app #vLogin [data-back], body.app #cBack { display: none; } /* back is in the top bar */

/* Welcome: full-bleed hero */
body.app #vWelcome { gap: 18px; }
body.app #vWelcome .welcome-hero { border-radius: 26px; }
body.app #vWelcome .steps-intro { background: #fff; border-radius: 20px; padding: 16px; }
body.app #vWelcome .steps-intro + h2 { border-top: 0; padding-top: 4px; font-size: 19px; letter-spacing: -0.01em; }

/* Home greeting is the large title */
body.app .hello h1 { font-size: 28px; letter-spacing: -0.025em; }
body.app .avatar { width: 48px; height: 48px; min-height: 0; font-size: 16px; border-radius: 50%; }

/* ---- Tab bar: floating glass ---- */
body.app .tabbar { grid-template-columns: repeat(3, 1fr); width: min(420px, calc(100% - 32px)); padding: 6px; border-radius: 30px;
  background: rgba(255, 255, 255, 0.78); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 8px 28px rgba(11, 37, 69, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 0 0.5px rgba(11, 37, 69, 0.12); }
body.app .tabbar button { min-height: 54px; border-radius: 24px; font-size: 12px; font-weight: 600; gap: 2px; }
body.app .tabbar [aria-current] { box-shadow: none; background: rgba(14, 116, 144, 0.1); }
body.app .tabbar svg { width: 25px; height: 25px; }

/* ---- Account: settings list ---- */
body.app #vAccount { background: transparent; box-shadow: none; padding: 0; border-radius: 0; display: flex; flex-direction: column; gap: 8px; }
body.app #vAccount[hidden] { display: none; }
.acct-profile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 6px; background: #fff; border-radius: 20px; }
.acct-profile .avatar { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: linear-gradient(140deg, var(--sun), #F2A900); color: var(--ink); font-size: 18px; font-weight: 800; box-shadow: none; }
.acct-profile b { display: block; font-size: 17px; }
.acct-profile small { color: var(--muted); font-size: 14px; font-weight: 500; }
.group-label { margin: 14px 16px 0; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.group { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: #fff; border-radius: 20px; }
.group.list { gap: 0; padding: 0 0 0 16px; overflow: hidden; }
.group.list > .row, .group.list > details > summary { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin: 0; padding: 8px 16px 8px 0;
  border: 0; border-radius: 0; background: none; color: var(--ink); font-size: 15px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.group.list > * + * { box-shadow: 0 -0.5px 0 var(--hair); }
.group.list > .row::after, .group.list > details > summary::after { content: ""; margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2.2px solid #B9C0CE; border-bottom: 2.2px solid #B9C0CE; transform: rotate(-45deg); margin-right: 4px; transition: transform 150ms ease; }
.group.list > details[open] > summary::after { transform: rotate(45deg); }
body.app .group.list > .row:hover:not(:disabled), .group.list > a.row:hover { background: none; color: var(--ink); }
.group.list > .row:active, .group.list > details > summary:active { background: rgba(11, 31, 77, 0.05); }
.group.list > details { border-top: 0 !important; padding: 0 !important; }
.group.list > details[open] { padding: 0 16px 16px 0 !important; }
.group.list > details[open] > summary { margin-bottom: 4px; }
.group.list > details > *:not(summary) { margin-top: 12px; }
.group.list > details > button, .group.list > details > label { width: 100%; }
.row-text { flex: 1; min-width: 0; }
.row-val { color: var(--muted); font-size: 14px; }
.row-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; }
.row-ico svg { width: 19px; height: 19px; }
.row-ico.green { background: var(--kw-green); } .row-ico.red { background: var(--ph-red); }
.row-ico.purple { background: #5B4BC4; } .row-ico.orange { background: #E8590C; } .row-ico.gray { background: #8A93A6; }
.group.list > details.danger > summary { color: var(--ph-red); }
body.app #vAccount .about { margin: 10px 0 0; }
body.app #vAccount .check { flex-direction: row; }

/* Member card + pass screens */
body.app #vCard .screen-title { margin-bottom: 4px; }
body.app .pass { border-radius: 30px; }

/* ---- App shell fixes ---- */
/* Small controls in the bar keep their own size (not full button height) */
body.app .demo-pill { min-height: 30px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
body.app .nav-back { min-height: 44px; padding: 0 8px 0 0; border-radius: 10px; font-size: 15px; font-weight: 500; }
body.app.scrolled .nav-brand, body.app.title-fixed .nav-brand { opacity: 0; pointer-events: none; }
.nav-brand { transition: opacity 140ms ease; }
/* Touch screens: no sticky "hover" colours on app controls */
body.app .tabbar button:hover:not(:disabled) { background: none !important; color: var(--muted) !important; border-color: transparent !important; }
body.app .tabbar [aria-current]:hover:not(:disabled), body.app .tabbar [aria-current] { background: rgba(14, 116, 144, 0.1) !important; color: var(--brand) !important; }
body.app .nav-back:hover:not(:disabled) { background: none !important; border-color: transparent !important; color: var(--brand) !important; }
body.app .demo-pill:hover:not(:disabled) { background: var(--sun) !important; color: var(--ink) !important; }
body.app .group.list > .row:hover:not(:disabled) { background: none !important; color: var(--ink) !important; border-color: transparent !important; }
body.app .group.list > .row:active { background: rgba(11, 37, 69, 0.06) !important; }
body.app button.avatar:hover:not(:disabled) { background: linear-gradient(140deg, var(--sun), #F2A900) !important; border-color: #fff !important; color: var(--ink) !important; }
body.app .tile:hover { background: #fff !important; }
body.app button:not(.secondary):not(.link):not(.good):not(.bad):active:not(:disabled) { background: var(--brand-deep); }
/* Welcome hero sits inside the screen margins */
body.app #vWelcome .welcome-hero { margin: 0; padding: 24px 20px 26px; }
/* Jumping to a screen or field never hides it under the top bar */
body.app main > *, body.app input, body.app .step { scroll-margin-top: calc(var(--nav-h) + var(--safe-t) + 16px); }
/* Member card has its own back button when it is not a tab (help-desk device) */
body.app:not(.has-tabs) #cBack { display: block; }
/* Signed out: "Report a problem" is a small round button that doesn't cover forms */
body.app .rp-btn { width: 46px; height: 46px; min-height: 0; padding: 0; border: 0; border-radius: 50%; font-size: 0; overflow: hidden;
  background: rgba(255, 255, 255, 0.9); color: var(--brand); box-shadow: 0 4px 14px rgba(11, 37, 69, 0.2); }
body.app .rp-btn::before { content: ""; display: block; width: 22px; height: 22px; margin: auto; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat; }
body.app .rp-btn:hover:not(:disabled) { background: #fff !important; color: var(--brand) !important; border: 0 !important; }
/* Secondary app pages (Help & hotlines) */
body.app .large-title { font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -0.025em; margin: 2px 0 0; }
body.app a.nav-back { text-decoration: none; }
body.app[data-view="help"] .card { box-shadow: none; border-radius: 20px; }
body.app[data-view="help"] > main > .about { display: block; }
body.app span.demo-pill { display: inline-flex; align-items: center; background: var(--sun); color: var(--ink); }
/* iPhone app runs edge to edge: the top bar covers the status bar area, the tab bar the home-indicator area */
#vNotices:has(#noticeList:empty) { display: none !important; }
/* Top bar: the brand name only, on one line */
body.app .navbar .brand-sub { display: none; }
body.app .navbar .brand { white-space: nowrap; }
/* No empty space when a row has no cards */
.ev-rail:empty { display: none; }

/* =====================================================================
   Look from Chris's mockup canvas ("KabayanPass App Mockup", 2026-11-07)
   ===================================================================== */
body.app {
  --nav-h: 59px;
  --app-bg: #F3F8FA;
  --mk-ink: #0B2545; --mk-muted: #4B5872; --mk-label: #6B7690;
  --mk-tint: #E6ECF8; --mk-field: #E9EDF5; --mk-line: #E1E6F0; --mk-row: #EEF1F6;
  --mk-stripe: linear-gradient(90deg, #0E7490 0 40%, #5BC0EB 40% 55%, #FF8A7A 55% 75%, #16A34A 75%);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--app-bg); color: var(--mk-ink);
}

/* Top bar: flag stripe on top, white bar, logo or back + screen name, pills on the right */
body.app .navbar { display: flex; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 5px) 18px 0;
  background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid var(--mk-line); box-shadow: none; }
body.app .navbar::before { content: ""; position: absolute; left: 0; right: 0; top: var(--safe-t); height: 5px; background: var(--mk-stripe); }
body.app .navbar::after { display: none; }
body.app.nav-shadow .navbar { box-shadow: none; }
body.app .nav-left { flex: 1; gap: 6px; min-width: 0; }
body.app .nav-brand { font-size: 14px; font-weight: 800; gap: 8px; }
body.app .nav-brand img { width: 26px; height: 26px; border-radius: 7px; }
body.app .brand-pass { color: var(--mk-ink); }
body.app.has-title .nav-brand { display: none; }
body.app .nav-back { margin-left: -8px; padding: 0 2px 0 0; min-height: 44px; min-width: 32px; }
body.app .nav-back span { display: none; }
body.app .nav-back svg { width: 24px; height: 24px; }
body.app .nav-title { opacity: 1; transform: none; max-width: none; flex: 1; min-width: 0; font-size: 14px; font-weight: 800; color: var(--mk-ink); }
body.app .nav-title:empty { display: none; }
body.app .nav-right { gap: 6px; }
body.app .demo-pill, body.app #langBtn { min-height: 0; height: auto; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.3; }
body.app #langBtn, body.app.has-tabs #langBtn { display: inline-flex; background: var(--mk-tint); color: #0E7490; font-size: 0; }
body.app #langBtn::after { content: "EN · TL"; font-size: 11px; }
body.app #langBtn:hover:not(:disabled) { background: var(--mk-tint) !important; color: #0E7490 !important; }
body.app .wrap { padding-top: calc(var(--nav-h) + var(--safe-t) + 18px); padding-left: 20px; padding-right: 20px; gap: 14px; }

/* Type, buttons, fields */
body.app main > .card > h2:first-child, body.app .step > h2:first-child, body.app .screen-title, body.app .welcome-title {
  font-size: 25px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; color: var(--mk-ink); margin: 0; }
body.app button, body.app .btn { min-height: 52px; border-radius: 16px; font-size: 14px; font-weight: 700; }
body.app button:not(.secondary):not(.link):not(.good):not(.bad):not(.row):not(.tile):not(.avatar):not(.nav-back):not(.demo-pill):not(#langBtn):not(.rp-btn) { background: #0E7490; border-color: #0E7490; }
body.app button.secondary, body.app .btn.secondary { background: var(--mk-tint); color: #0E7490; border-color: transparent; }
body.app label { font-size: 13px; font-weight: 700; color: var(--mk-muted); }
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.app select, body.app textarea {
  min-height: 50px; border: 0; border-radius: 14px; background: var(--mk-field); font-size: 14px; font-weight: 600; color: var(--mk-ink); }
body.app input:focus, body.app select:focus, body.app textarea:focus { box-shadow: 0 0 0 2px #0E7490; background: #fff; }
body.app .small-print, body.app .hint { color: var(--mk-muted); }

/* Welcome */
body.app .welcome-title { font-size: 26px; margin-top: 10px; }
body.app .welcome-sub { margin: -4px 0 4px; color: var(--mk-muted); font-size: 14px; line-height: 1.4; }
.steps-list { background: #fff; border-radius: 18px; overflow: hidden; }
.step-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-top: 1px solid var(--mk-row); }
.step-row:first-child { border-top: 0; }
.step-row .num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #0038A8; color: #fff; font-weight: 800; }
.step-row .num.green { background: #007A3D; }
.step-row b { display: block; font-size: 13px; }
.step-row small { display: block; color: var(--mk-muted); font-size: 14px; }
body.app #vWelcome > h2 { margin-top: 6px; font-size: 16px; font-weight: 800; }
body.app[data-view="vWelcome"] > main > .about { font-size: 11px; color: var(--mk-label); margin-top: 10px; margin-bottom: 72px; } /* clears the round Report-a-problem button */

/* Register */
body.app .stepper-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.app .stepper-bar i { height: 6px; border-radius: 3px; background: #D3DAE8; }
body.app .stepper-bar i.on, body.app .stepper-bar i.on:last-child { background: #0E7490; }
.stepper-names { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--mk-muted); }
#vRegister[data-step="1"] .stepper-names span:nth-child(1), #vRegister[data-step="2"] .stepper-names span:nth-child(2),
#vRegister[data-step="3"] .stepper-names span:nth-child(3) { color: #0038A8; }
body.app .step > h2:first-child { font-size: 23px; }
body.app .shot { border: 0 !important; background: var(--mk-tint) !important; color: #0E7490; border-radius: 16px !important; font-weight: 700; }

/* Home */
body.app .hello-sub { font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--mk-muted); }
body.app .hello h1 { font-size: 25px; letter-spacing: -0.01em; margin-top: 0; }
body.app .avatar, body.app button.avatar:hover:not(:disabled), .acct-profile .avatar { width: 46px; height: 46px; border: 0 !important; box-shadow: none;
  background: #0E7490 !important; color: #fff !important; font-size: 14px; font-weight: 800; }
body.app .sec-head h2 { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mk-label); margin: 4px 4px -4px; }
body.app #evRailHint { display: none !important; }
body.app .ev-rail { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
.ev-card2 { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 24px;
  background: #0038A8; color: #fff; text-decoration: none; box-shadow: 0 10px 24px rgba(0, 56, 168, 0.3); transition: transform 120ms ease; }
.ev-card2:active { transform: scale(0.98); }
.ev-card2.past { filter: saturate(0.4); opacity: 0.75; }
.ev-blob { position: absolute; z-index: -1; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(252, 209, 22, 0.18); }
.ev-head { display: flex; align-items: center; gap: 12px; }
.ev-date2 { flex: none; width: 58px; padding: 6px 0; border-radius: 14px; background: #fff; color: var(--mk-ink); text-align: center; line-height: 1; }
.ev-date2:empty { display: none; }
.ev-date2 .m { display: block; font-size: 11px; font-weight: 800; color: #CE1126; }
.ev-date2 b { display: block; font-size: 21px; font-weight: 800; margin: 3px 0; }
.ev-date2 .w { display: block; font-size: 11px; font-weight: 700; }
.ev-title { min-width: 0; }
.ev-title b { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
.ev-title small { display: block; margin-top: 2px; font-size: 13px; opacity: 0.9; }
.ev-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-pills .ev-count, .ev-pills .pill { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.ev-pills .pill.soft { background: rgba(255, 255, 255, 0.18); font-weight: 700; }
.ev-pills .pill.ok { background: #007A3D; color: #fff; }
body.app .ev-rail.open { gap: 0; background: #fff; border-radius: 18px; overflow: hidden; }
.open-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--mk-row);
  color: var(--mk-ink); text-decoration: none; }
.open-row:first-child { border-top: 0; }
.open-row:active { background: rgba(11, 31, 77, 0.05); }
.open-text b { display: block; font-size: 13px; }
.open-text small { display: block; color: var(--mk-muted); font-size: 13px; }
.join-pill { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--mk-tint); color: #0038A8; font-size: 13px; font-weight: 800; }
body.app .tile { min-height: 0; padding: 14px; gap: 6px; border-radius: 18px; box-shadow: none; }
body.app .tile small { display: none; }
body.app .tile b { font-size: 14px; }
body.app .tile-ico { width: 24px; height: 24px; background: none !important; border-radius: 0; place-items: start; }
body.app .tile-ico.red { color: #FF8A7A; }
body.app #evEmpty { box-shadow: none; border-radius: 18px; }

/* Tab bar: plain white bar along the bottom */
body.app .tabbar { left: 0; right: 0; bottom: 0; transform: none; width: auto; display: flex; justify-content: space-around; gap: 0;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 12px)); border-radius: 0; background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--mk-line); box-shadow: none; }
body.app .tabbar button { flex: 0 0 auto; min-width: 72px; min-height: 48px; padding: 2px 6px; border-radius: 12px; font-size: 11px; font-weight: 700; color: var(--mk-label); }
body.app .tabbar [aria-current], body.app .tabbar [aria-current]:hover:not(:disabled) { background: none !important; color: #0E7490 !important; }
body.app .tabbar svg { width: 24px; height: 24px; }
body.app.has-tabs .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* Event Pass screen: date line and two calendar buttons under the pass */
body.app .pass { border-radius: 26px; }
body.app #vPass #eventHead { background: transparent; box-shadow: none; padding: 0; gap: 10px; }
body.app #vPass #eventHead h1, body.app #vPass #eventHead #evVenue { display: none; }
body.app #vPass #eventHead #evWhen { text-align: center; color: var(--mk-muted); font-size: 14px; margin: 0; }
body.app #eventHead .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
body.app #vPass #eventHead .row .btn, body.app #vPass #eventHead .row button { min-height: 46px; font-size: 14px; background: var(--mk-tint); color: #0E7490; border: 0; }

/* Member card: details left, QR right */
body.app .mc-body { flex-direction: row-reverse; }
body.app .member-card { border-radius: 20px; box-shadow: 0 10px 24px rgba(14, 116, 144, 0.3); }
body.app #cReissue { width: 100%; }

/* Account */
body.app #vAccount .screen-title { display: none; }
body.app .acct-profile { background: none; padding: 0; margin: 0 0 4px; }
body.app .acct-profile .avatar { width: 52px; height: 52px; font-size: 16px; }
body.app .acct-profile b { font-size: 18px; font-weight: 800; }
body.app .acct-profile small { font-size: 14px; color: var(--mk-muted); }
body.app .group-label { margin: 6px 4px -2px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--mk-label); }
body.app .group { border-radius: 18px; }
body.app .group.list { padding: 0; }
body.app .row-ico { display: none; }
body.app .group.list > .row, body.app .group.list > details > summary { min-height: 0; padding: 13px 16px; font-size: 13px; font-weight: 500; color: var(--mk-ink); }
body.app .group.list > * + * { box-shadow: none; border-top: 1px solid var(--mk-row); }
body.app .group.list > details[open] { padding: 0 16px 16px !important; }
body.app .group.list > details[open] > summary { padding-left: 0; padding-right: 0; }
body.app .row-val { color: var(--mk-label); font-size: 13px; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
body.app .row-val.ok { color: #16A34A; font-weight: 700; }
body.app .group.list > .row::after, body.app .group.list > details > summary::after { width: 7px; height: 7px; margin-left: 8px; border-width: 0 2px 2px 0; border-color: var(--mk-label); }
body.app .switch-row::after, body.app #logout::after, body.app #delSection > summary::after { display: none !important; }
body.app #logout { color: #0E7490; font-weight: 700; }
body.app #delSection > summary { color: #FF8A7A; font-weight: 700; }
body.app .switch-row { cursor: pointer; }
input.switch { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 46px; height: 28px; min-height: 0; margin: 0; border-radius: 999px;
  background: #C9D1E0; transition: background 150ms ease; cursor: pointer; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 150ms ease; }
input.switch:checked { background: #007A3D; }
input.switch:checked::after { transform: translateX(18px); }
.contact-actions { display: flex; flex-direction: column; gap: 10px; }
.contact-actions:not(:has(button:not([hidden]))) { display: none; }
body.app #vAccount .about { font-size: 11px; color: var(--mk-label); }
/* fixes: tab buttons are not primary buttons; switch row lays out in one line */
body.app .tabbar button:not([aria-current]), body.app .tabbar button:not([aria-current]):hover:not(:disabled) { background: none !important; border-color: transparent !important; color: var(--mk-label) !important; }
body.app .group.list > label.switch-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
  font-size: 13px; font-weight: 500; color: var(--mk-ink); }

/* ---- Softer edges (like Chris's reference apps): shadows instead of hairlines ---- */
body.app { --soft: 0 1px 2px rgba(11, 37, 69, 0.04), 0 8px 24px rgba(11, 37, 69, 0.07); }
/* Top bar: no line at rest; a soft shadow once content scrolls under it */
body.app .navbar { border-bottom: 0; transition: box-shadow 160ms ease; }
body.app.nav-shadow .navbar { box-shadow: 0 1px 0 rgba(11, 37, 69, 0.06), 0 6px 18px rgba(11, 37, 69, 0.06); }
/* Tab bar: lifted with a soft upward shadow, no top line */
body.app .tabbar { border-top: 0; box-shadow: 0 -1px 0 rgba(11, 37, 69, 0.04), 0 -8px 24px rgba(11, 37, 69, 0.06); }
/* White surfaces: rounder, with a soft shadow */
body.app .steps-list, body.app .group, body.app #evEmpty, body.app .ev-rail.open, body.app .tile, body.app .notice, body.app #noticeList > * {
  border: 0; border-radius: 22px; box-shadow: var(--soft); }
body.app .ev-rail.open, body.app .group.list, body.app .steps-list { overflow: hidden; }
/* Dividers start at the text, not at the card edge */
body.app .step-row, body.app .open-row, body.app .group.list > * + * { border-top: 0 !important; position: relative; }
body.app .step-row + .step-row::before, body.app .open-row + .open-row::before, body.app .group.list > * + *::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 1px; background: rgba(11, 37, 69, 0.08); }
body.app .step-row + .step-row::before { left: 64px; }
/* Tinted buttons and pills: no outline */
body.app button.secondary, body.app .btn.secondary, body.app .join-pill, body.app .demo-pill, body.app #langBtn { border: 0; }
/* Event cards and pass: same soft depth */
body.app .ev-card2 { box-shadow: 0 2px 4px rgba(14, 116, 144, 0.12), 0 12px 28px rgba(14, 116, 144, 0.22); }
body.app .pass, body.app .member-card { box-shadow: 0 2px 4px rgba(0, 40, 120, 0.12), 0 14px 32px rgba(0, 40, 120, 0.22); }
/* Fields: no border; gentle inner fill */
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.app select, body.app textarea { border: 0 !important; }
body.app .notice.warning { border: 2px solid #E0A800; }
body.app .notice.emergency { border: 2px solid var(--bad); }

/* ----- Time slots and service queue (pass screen) ----- */
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 8px; }
.slot-list button.slot { min-height: 64px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: #fff !important; color: var(--brand) !important; border: 2px solid var(--line) !important; border-radius: 14px; font-size: 15px; }
.slot-list button.slot b { color: var(--ink); }
.slot-list button.slot span { font-size: 13px; font-weight: 700; color: var(--muted); }
.slot-list button.slot.on { border-color: var(--good) !important; background: #E3F3EA !important; color: var(--good) !important; }
.slot-list button.slot:disabled { opacity: .45; cursor: default; }
.slot-mine { margin: 6px 0; }
.q-ticket { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--tint); border-radius: 18px; padding: 14px; margin: 8px 0; }
.q-ticket > b { font-size: 48px; line-height: 1; font-weight: 900; letter-spacing: .02em; }
.q-ticket .q-k { font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.q-ticket.turn { background: var(--sun); color: var(--ink); animation: qpulse 1.2s ease-in-out infinite; }
.q-ticket.turn .q-k { color: var(--ink); }
.q-ticket .q-go { font-size: 21px; font-weight: 900; }
@keyframes qpulse { 50% { transform: scale(1.03); } }
.q-services { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.q-svc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.q-svc button { flex: 0 0 auto; }
.push-card { padding: 12px 16px; }
.push-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; }
.push-row button { flex: 0 0 auto; }

/* ----- Phone field with country picker; cancel sign-up; places left ----- */
.phone-row { display: flex; gap: 8px; align-items: stretch; }
.phone-row .phone-cc { flex: 0 0 auto; width: 128px; text-overflow: ellipsis; padding-left: 10px; padding-right: 6px; }
.phone-row input { flex: 1 1 auto; min-width: 0; }
.leave-box { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.leave-box button.link { color: var(--bad) !important; min-height: 40px; }
.join-pill small { display: block; font-size: 11px; font-weight: 700; opacity: .8; }
.cap-bar { display: flex; flex-direction: column; gap: 6px; }
.cap-bar .bar { height: 10px; background: var(--tint); border-radius: 99px; overflow: hidden; }
.cap-bar .bar i { display: block; height: 100%; border-radius: 99px; }
/* VIP / organizer badge scan result */
.result.vip { background: linear-gradient(160deg, #5B2A86, #0B1F4D); color: #fff; }
.result .r-photo img { width: 140px; height: 140px; object-fit: cover; border-radius: 18px; border: 4px solid #fff; }

/* ----- Admin layout (2026-11-08): compact stats, scrolling tabs, tidy event cards ----- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }
.stats .stat.wide { grid-column: span 2; }
.stats .stat span { font-size: 13px; }
.admin-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { flex: 0 0 auto; white-space: nowrap; }
.ev-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ev-stats .stat b { font-size: 25px; }
.cap-bar .chip { flex: 0 0 auto; }
.cap-bar .row > b { flex: 1 1 auto; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-actions > * { flex: 0 0 auto; }
.ev-more { border-top: 1px solid var(--line); padding-top: 10px; }
.ev-more summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.ev-more summary::-webkit-details-marker { display: none; }
.ev-more summary::after { width: 7px; height: 7px; border-width: 2px; margin: 0 0 4px 2px; }
.ev-more[open] summary::after { margin: 4px 0 0 2px; }
.ev-more[open] summary { margin-bottom: 8px; }
.ev-more .small-print { margin-top: 10px; }
@media (max-width: 600px) {
  #whoami { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stats .stat b { font-size: 23px; }
  .stats .stat b.small { font-size: 16px; }
  .ev-stats .stat b { font-size: 21px; }
  .ev-stats .stat span { font-size: 12px; }
  .ev-actions > * { flex: 1 1 calc(50% - 4px); }
}

/* ----- Staff: VIP check-in (face scan + name list) ----- */
.face-box { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-width: 520px; width: 100%; }
.face-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-box video.mirror { transform: scaleX(-1); }
.face-hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; background: rgba(11, 31, 77, .78); color: #fff; font-weight: 700; text-align: center; }
.vip-list { display: flex; flex-direction: column; gap: 8px; }
.vip-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.vip-row.here { background: var(--tint); }
.vip-ph { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; overflow: hidden; background: #9A7B1C; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 19px; }
.vip-ph img { width: 100%; height: 100%; object-fit: cover; }
.vip-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.vip-who b { overflow: hidden; text-overflow: ellipsis; }
.vip-row > button, .vip-row > .chip { flex: 0 0 auto; }

/* ----- Admin: face check-in setup dialog ----- */
.face-dlg { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 22px; box-shadow: 0 30px 80px rgba(11,31,77,.35); }
.face-dlg::backdrop { background: rgba(11, 31, 77, .55); }
.face-dlg h2 { margin-top: 0; }
.fd-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.fd-stage { position: relative; background: #0B1F4D; border-radius: 14px; overflow: hidden; min-height: 220px; display: grid; place-items: center; }
.fd-stage video { width: 100%; display: block; transform: scaleX(-1); }
.fd-stage canvas { max-width: 100%; display: block; }
.fd-hint { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; background: rgba(11,31,77,.82); color: #fff; font-weight: 700; text-align: center; }
.fd-hint:empty { display: none; }
.face-dlg label.fd-consent { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; margin: 14px 0 10px; font-weight: 600; font-size: 13px; line-height: 1.35; }
.face-dlg label.fd-consent input { width: 22px !important; height: 22px; min-height: 0; flex: 0 0 22px; margin: 1px 0 0; padding: 0; }
.face-dlg { max-height: calc(100vh - 32px); overflow-y: auto; }
.fd-stage { max-height: 52vh; }
.fd-stage canvas, .fd-stage video { max-height: 52vh; object-fit: contain; }
.badge-note { margin-top: 14px; }
.nat-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; } .nat-pick label.check { flex: 1 1 160px; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; } .nat-pick label.check:has(input:checked) { border-color: var(--brand); background: var(--tint); }
fieldset.visa-field { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
fieldset.visa-field legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.visa-pick label.check { align-items: center; }
/* Visa type: a field-like button; tapping it drops the list down (grid rows 0fr → 1fr animates the height) */
.visa-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 54px; padding: 12px 14px;
  border: 2px solid var(--field); border-radius: 12px; background: #fff; color: var(--muted); font: inherit; font-size: 18px; font-weight: 500; text-align: left; cursor: pointer; box-shadow: none; }
/* ids beat the B+ "body.app button:not(...)" gradient-button rule so this keeps the look of a form field */
#vRegister #rgVisaBtn, #vRegister #rgVisaBtn:hover:not(:disabled) { background: #fff; background-image: none; color: var(--muted); border: 2px solid var(--field);
  border-radius: 12px; box-shadow: none; text-shadow: none; min-height: 54px; font-size: 16px; font-weight: 500; line-height: 1.3; }
#vRegister #rgVisaBtn.chosen { color: var(--ink); font-weight: 700; }
#vRegister #rgVisaBtn:focus-visible { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--brand); }
#vRegister .visa-field.open #rgVisaBtn { border-color: var(--brand); }
#vRegister #rgVisaBtn:active:not(:disabled) { transform: none; }
.visa-chev { flex: none; color: var(--brand); transition: transform .28s ease; }
.visa-field.open .visa-chev { transform: rotate(180deg); }
.visa-drop { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(-6px); transition: grid-template-rows .32s ease, opacity .24s ease, transform .32s ease; }
.visa-field.open .visa-drop { grid-template-rows: 1fr; opacity: 1; transform: none; }
.visa-drop-in { overflow: hidden; min-height: 0; }
.visa-drop .visa-pick { flex-direction: column; flex-wrap: nowrap; padding: 8px 0 2px; margin: 0; }
.visa-drop .visa-pick label.check { flex: none; }
@media (prefers-reduced-motion: reduce) { .visa-drop, .visa-chev { transition: none; } }
.vip-pick { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; } .vip-pick label.check { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }

/* ----- VIP arrival alerts (staff page + live dashboard) ----- */
.vip-toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(460px, calc(100vw - 24px)); pointer-events: none; }
.vip-toast { pointer-events: auto; position: relative; background: #0B1F4D; color: #fff; border-left: 6px solid #FCD116; border-radius: 14px; padding: 12px 40px 12px 14px; box-shadow: 0 14px 40px rgba(11,31,77,.35); display: flex; flex-direction: column; gap: 2px; animation: vipIn .25s ease-out; }
.vip-toast b { color: #FCD116; font-size: 13px; letter-spacing: .02em; }
.vip-toast span { font-weight: 700; font-size: 15px; }
.vip-toast small { color: #D6E0F7; }
.vip-toast button { position: absolute; top: 8px; right: 8px; min-height: 0; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.15) !important; color: #fff !important; border: 0 !important; box-shadow: none !important; }
@keyframes vipIn { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.vip-expected li.missing { opacity: .6; }

/* ----- Offline door mode status ----- */
.off-bar { margin-top: 10px; padding: 8px 12px; border-radius: 12px; font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.off-bar.ok { background: #E7F6EE; color: #0B5F33; }
.off-bar.ok span { color: #2E6B4A; }
.off-bar.pending { background: #FFF6D6; color: #6B5200; }
.off-bar.down { background: #FDE8EA; color: #8A0F1D; font-weight: 600; }

/* =====================================================================
   FLAG FLOW (Chris's pick from the Lovable concepts, 2026-11-10)
   Blue gradient headers, flag-gradient hero + pass background, red main
   buttons, blue-outline second buttons, floating navy tab bar, Bricolage.
   ===================================================================== */
body.app {
  --ff-blue: oklch(0.42 0.17 262); --ff-red: oklch(0.5 0.19 25); --ff-red-d: oklch(0.44 0.18 25); --ff-green: oklch(0.45 0.12 152);
  --ff-navy: oklch(0.25 0.09 264); --ff-canvas: oklch(0.97 0.006 265); --ff-hair: oklch(0.91 0.01 265); --ff-soft: oklch(0.5 0.04 264);
  --ff-sun: oklch(0.87 0.17 95); --ff-bar: oklch(0.36 0.17 262);
  --ff-panel: linear-gradient(170deg, oklch(0.36 0.17 262), oklch(0.46 0.19 258));
  --ff-flag: radial-gradient(circle at 0% 0%, oklch(0.45 0.2 262) 0 30%, transparent 60%), radial-gradient(circle at 100% 15%, oklch(0.87 0.17 95) 0 18%, transparent 55%), radial-gradient(circle at 100% 100%, oklch(0.55 0.21 25) 0 22%, transparent 60%), radial-gradient(circle at 0% 100%, oklch(0.51 0.13 152) 0 25%, transparent 60%), linear-gradient(135deg, oklch(0.45 0.2 262), oklch(0.6 0.2 30));
  font-family: 'Bricolage Grotesque', 'Figtree', system-ui, -apple-system, sans-serif;
  background: #fff; color: var(--ff-navy);
}
body.app h1, body.app h2, body.app h3, body.app .welcome-title, body.app .screen-title { color: var(--ff-navy); font-weight: 800; letter-spacing: -0.015em; }

/* Top bar: solid blue, white text */
body.app .navbar { background: var(--ff-bar); color: #fff; box-shadow: none; padding-top: var(--safe-t); }
body.app .navbar::before { display: none; }
body.app .nav-brand, body.app .brand-pass, body.app .nav-title { color: #fff; }
body.app .nav-brand img { border-radius: 8px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
body.app .nav-back, body.app .nav-back:hover:not(:disabled) { color: #fff !important; }
body.app #langBtn, body.app.has-tabs #langBtn, body.app #langBtn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16) !important; color: #fff !important; }
body.app .demo-pill, body.app .demo-pill:hover:not(:disabled) { background: var(--ff-sun) !important; color: var(--ff-navy) !important; }
/* Welcome + Event Pass: bar floats over the flag gradient as dark chips */
body.app[data-view="vWelcome"] .navbar, body.app[data-view="vPass"] .navbar { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.app[data-view="vWelcome"] .nav-left, body.app[data-view="vWelcome"] .nav-right,
body.app[data-view="vPass"] .nav-left, body.app[data-view="vPass"] .nav-right {
  flex: 0 1 auto; background: rgba(20, 30, 70, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 999px; padding: 4px 12px 4px 6px; }
body.app[data-view="vPass"] .nav-left { padding-left: 10px; max-width: 62%; }
body.app[data-view="vWelcome"] .nav-right, body.app[data-view="vPass"] .nav-right { padding: 4px; }
body.app[data-view="vWelcome"] .navbar, body.app[data-view="vPass"] .navbar { align-items: center; }

/* Buttons and fields */
body.app button, body.app .btn { min-height: 56px; border-radius: 18px; font-size: 16px; font-weight: 700; }
body.app button:not(.secondary):not(.link):not(.good):not(.bad):not(.row):not(.tile):not(.avatar):not(.nav-back):not(.demo-pill):not(#langBtn):not(.rp-btn) { background: var(--ff-red); border-color: var(--ff-red); color: #fff; }
body.app button:not(.secondary):not(.link):not(.good):not(.bad):not(.row):not(.tile):not(.avatar):not(.nav-back):not(.demo-pill):not(#langBtn):not(.rp-btn):active:not(:disabled) { background: var(--ff-red-d); }
body.app button.secondary, body.app .btn.secondary, body.app button.secondary:hover:not(:disabled), body.app .btn.secondary:hover {
  background: #fff; color: var(--ff-blue); border: 3px solid var(--ff-blue); }
body.app button.link { color: var(--ff-blue); }
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.app select, body.app textarea {
  min-height: 56px; border: 2px solid var(--ff-hair) !important; border-radius: 18px; background: #fff; font-size: 16px; }
body.app input:focus, body.app select:focus, body.app textarea:focus { border-color: var(--ff-blue) !important; box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15); }
body.app label { font-size: 13px; color: var(--ff-navy); }

/* Surfaces: light canvas cards, no shadows */
body.app .steps-list, body.app .group, body.app #evEmpty, body.app .tile, body.app .notice, body.app #noticeList > *, body.app main > .card:not(#eventHead):not(#vAccount):not(#vWelcome) .card {
  background: var(--ff-canvas); box-shadow: none; border-radius: 18px; }
body.app .group.list > * + *::before { background: rgba(11, 37, 69, 0.1); }
body.app .group-label { font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--ff-navy); margin: 10px 8px 0; }
body.app .sec-head h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; text-transform: none; color: var(--ff-navy); margin: 6px 4px 0; }

/* Blue header panels under the bar (Home greeting, Account profile, My card title) */
body.app .hello, body.app .acct-profile, body.app #vCard .screen-title {
  margin: -18px -20px 2px; padding: 10px 20px 24px; background: var(--ff-panel); border-radius: 0 0 36px 36px; color: #fff; }
body.app .hello { flex-direction: row-reverse; justify-content: flex-end; gap: 12px; }
body.app .hello h1, body.app .acct-profile b, body.app #vCard .screen-title { color: #fff; }
body.app .hello-sub, body.app .acct-profile small { color: rgba(255, 255, 255, 0.88); }
body.app .avatar, body.app button.avatar:hover:not(:disabled), body.app .acct-profile .avatar { background: #fff !important; color: var(--ff-navy) !important; }
body.app .acct-profile .avatar { width: 64px; height: 64px; font-size: 19px; }
body.app .acct-profile b { font-size: 19px; }

/* Welcome: flag hero + white sheet */
body.app[data-view="vWelcome"] .wrap { padding-top: 0; }
body.app #vWelcome { gap: 0; }
.ff-hero { display: none; }
body.app .ff-hero { display: grid; place-items: center; height: calc(300px + var(--safe-t)); margin: 0 -20px; padding-top: calc(var(--safe-t) + 40px); background: var(--ff-flag); }
.ff-hero-logo { display: grid; place-items: center; width: 144px; height: 144px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ff-hero-logo img { border-radius: 20px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
.ff-sheet { display: flex; flex-direction: column; gap: 14px; }
body.app .ff-sheet { position: relative; margin: -40px -20px 0; padding: 28px 24px 8px; background: #fff; border-radius: 36px 36px 0 0; }
body.app .ff-sheet .welcome-title { font-size: 30px; margin: 0; }
body.app .ff-sheet .welcome-sub { font-size: 16px; color: var(--ff-soft); margin: 0; }
body.app .ff-sheet .steps-list { background: none; border-radius: 0; }
body.app .ff-sheet .step-row { padding: 6px 0; }
body.app .ff-sheet .step-row::before { display: none; }
body.app .ff-sheet .step-row .num { background: var(--ff-blue); width: 36px; height: 36px; }
body.app .ff-sheet .step-row b { font-size: 15px; }
body.app .ff-sheet .step-row small { font-size: 13px; color: var(--ff-soft); }
body.app .ff-sheet > h2 { font-size: 18px; margin-top: 6px; }

/* Home: event card (yellow tint, navy countdown bar, red "Show my pass") */
body.app .ev-card2 { gap: 6px; padding: 20px; border-radius: 18px; background: #FEF2C0; color: var(--ff-navy); box-shadow: none; }
body.app .ev-card2.past { background: var(--ff-canvas); }
.ev-card2 .ev-pills { margin-bottom: 6px; }
body.app .ev-pills .pill { padding: 3px 12px; font-size: 13px; font-weight: 700; }
body.app .ev-pills .pill.ok { background: var(--ff-green); color: #fff; }
body.app .ev-pills .pill.soft { background: #fff; color: var(--ff-navy); }
body.app .ev-card2 .ev-name { font-size: 19px; font-weight: 800; line-height: 1.2; }
.ev-line { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.ev-line svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ev-cd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 12px 16px; border-radius: 16px; background: var(--ff-navy); color: #fff; }
.ev-cd-words { font-size: 18px; font-weight: 700; }
body.app .ev-cd .ev-count { padding: 0; background: none !important; color: var(--ff-sun) !important; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.app .ev-cd .ev-count::before { display: none; }
.ev-show { display: grid; place-items: center; min-height: 56px; margin-top: 10px; border-radius: 18px; background: var(--ff-red); color: #fff; font-size: 16px; font-weight: 700; }
/* Open events: tinted cards with a red Join button */
body.app .ev-rail.open { gap: 10px; background: none; border-radius: 0; overflow: visible; box-shadow: none; }
body.app .open-row { padding: 16px; border-radius: 18px; background: rgba(255, 138, 122, 0.08); }
body.app .open-row:nth-child(even) { background: rgba(0, 122, 61, 0.09); }
body.app .open-row::before { display: none; }
body.app .open-text b { font-size: 15px; }
body.app .open-text small { font-size: 13px; color: var(--ff-navy); }
body.app .join-pill { display: grid; place-items: center; min-height: 52px; padding: 0 20px; border-radius: 18px; background: var(--ff-red); color: #fff; font-size: 15px; font-weight: 700; }
/* Shortcut tiles: icon + label in one row */
body.app .tile { flex-direction: row; align-items: center; gap: 8px; min-height: 64px; padding: 0 16px; }
body.app .tile-ico { color: var(--ff-blue); }
body.app .tile b { font-size: 15px; font-weight: 600; }

/* Tab bar: floating navy bar, active tab yellow */
body.app .tabbar { left: 16px; right: 16px; width: auto; bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 4px)); padding: 6px; gap: 0;
  border-radius: 20px; background: var(--ff-navy); border: 0; box-shadow: 0 12px 30px rgba(11, 37, 69, 0.3); }
body.app .tabbar button { flex: 1; min-height: 56px; border-radius: 15px; font-size: 13px; font-weight: 600; }
body.app .tabbar button:not([aria-current]), body.app .tabbar button:not([aria-current]):hover:not(:disabled) { color: #fff !important; background: none !important; }
body.app .tabbar [aria-current], body.app .tabbar [aria-current]:hover:not(:disabled) { background: var(--ff-sun) !important; color: var(--ff-navy) !important; }
body.app.has-tabs .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

/* Event Pass: flag gradient behind a white ticket */
body.app[data-view="vPass"]::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--ff-flag); }
body.app[data-view="vPass"] { background: transparent; }
body.app .pass { padding: 22px 20px 0; border: 6px solid #fff; border-radius: 28px; background: #fff; color: var(--ff-navy); box-shadow: 0 30px 60px -20px rgba(11, 37, 69, 0.5); overflow: hidden; }
body.app .pass::after { display: none; }
body.app .pass .label { color: var(--ff-blue); }
body.app .pass .who { color: var(--ff-navy); }
body.app .pass .what { color: var(--ff-soft); font-size: 13px; }
body.app .pass .code { color: var(--ff-navy); }
body.app .pass .live { color: var(--ff-navy); font-size: 25px; font-weight: 800; }
body.app .pass .dot { background: var(--ff-green); }
body.app .pass .daycolour { margin: 14px -20px 0; width: calc(100% + 40px); border: 0; border-radius: 0; padding: 12px; font-size: 16px; }
body.app .pass .qr { background: #fff; }
/* Everything else on the pass screen sits on white so it stays readable over the gradient */
body.app[data-view="vPass"] #vPass > .small-print, body.app[data-view="vPass"] #vPass > .row, body.app[data-view="vPass"] #vPass > .leave-box {
  background: rgba(255, 255, 255, 0.94); border-radius: 18px; padding: 10px 14px; }
body.app[data-view="vPass"] #vPass > .card { background: #fff; }
body.app #vPass #eventHead { background: #fff; border-radius: 24px; padding: 16px; box-shadow: none; }
body.app #vPass #eventHead #evWhen { color: var(--ff-navy); }
body.app #vPass #eventHead .row .btn, body.app #vPass #eventHead .row button { min-height: 52px; font-size: 13px; background: #fff; color: var(--ff-blue); border: 3px solid var(--ff-blue); }

/* Member card: flag gradient card */
body.app .member-card { background: var(--ff-flag); border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(11, 37, 69, 0.45); }
body.app .member-card, body.app .member-card * { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
body.app .member-card .mc-qr, body.app .member-card .mc-qr * { text-shadow: none; }
body.app .member-card::after { display: none; }
body.app .mc-top { color: #fff; }
/* Welcome hero and sheet run the full screen width */
body.app .ff-hero, body.app .ff-sheet { width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0; box-sizing: border-box; }
body.app .ff-sheet { padding-left: max(24px, calc(50vw - 260px)); padding-right: max(24px, calc(50vw - 260px)); }
body.app[data-view="vWelcome"] { overflow-x: hidden; }
body.app #vWelcome { overflow: visible; }
html:has(body.app[data-view="vWelcome"]) { overflow-x: hidden; }

/* ----- Priority lane ribbon (staff result) + pass chip ----- */
.r-pri { display: inline-block; background: #FCD116; color: #0B1F4D; font-weight: 900; letter-spacing: .08em; padding: 6px 14px; border-radius: 999px; margin-bottom: 8px; font-size: 13px; }
.pri-chip { display: inline-flex; align-items: center; gap: 6px; background: #FFF4C2; color: #5C4600; border: 1px solid #F0D460; font-weight: 800; padding: 6px 12px; border-radius: 999px; font-size: 14px; margin-top: 10px; }

.gate-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; margin: 6px 0; font-weight: 600; }
.gate-row em { display: block; height: 12px; border-radius: 6px; background: var(--brand, #0038A8); }
.gate-row b { text-align: right; }

.vip-pick-row { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.vip-pick-row label.check { border: 0; padding: 0; }
.vip-pick-row .seat-in { min-height: 40px; font-size: 13px; }

/* ---- Embassy & OWWA tab ---- */
.tabbar, body.app .tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tabbar button[hidden] { display: none; }
.tabbar.four button, body.app .tabbar.four button { font-size: 11px; padding-left: 0; padding-right: 0; }
body.app .tabbar.four svg { width: 23px; height: 23px; }
.off-reserved { border: 2px dashed var(--line); background: var(--tint, #EEF3FF); }
.off-reserved b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.off-reserved p { margin: 0; color: var(--muted); font-size: 15px; }
.off-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.off-person { background: #fff; border-radius: 18px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  box-shadow: 0 1px 3px rgba(11, 31, 77, 0.08); }
.off-person img, .off-ph { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin-bottom: 4px; }
.off-ph { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 26px; }
.off-person b { font-size: 15px; line-height: 1.2; color: var(--ink); }
.off-person small { font-size: 13px; color: var(--muted); line-height: 1.25; }
.off-person .chip { margin-top: 4px; background: var(--tint, #EEF3FF); color: var(--brand); }
.off-news { display: flex; flex-direction: column; gap: 8px; }
.off-news img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.off-news h3 { margin: 2px 0 0; font-size: 18px; }
.off-news p { margin: 4px 0 0; font-size: 15px; }
.off-news .off-sub { color: var(--muted); }
.off-news .k { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.off-empty { background: transparent; border: 2px dashed var(--line); box-shadow: none; }
.off-empty .off-ph { background: var(--line); }
.admin-menu { position: fixed; z-index: 40; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 8px 14px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; text-decoration: none; box-shadow: 0 6px 18px rgba(11, 31, 77, 0.25); }
@media print { .admin-menu { display: none; } }
.join-code { font-size: 44px; font-weight: 800; letter-spacing: 0.12em; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink); margin: 6px 0; }
.join-qr { display: grid; place-items: center; margin: 4px 0 10px; }
.app-lock { position: fixed; inset: 0; z-index: 100; background: var(--paper, #F2F3F7); display: grid; place-items: center; text-align: center; padding: 24px; }
.app-lock > div { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* ---- Past events ---- */
.past-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 18px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); text-align: left; font-size: 15px; min-height: 0; }
.past-btn > span:nth-child(2) { flex: 1; }
.past-btn b { display: block; font-size: 16px; }
.past-btn small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
body.app .past-btn { background: #fff !important; color: var(--ink) !important; }
.past-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 18px; background: #fff !important; color: var(--ink) !important;
  border: 1px solid var(--line); text-align: left; min-height: 0; }
.past-card img, .past-noimg { flex: none; width: 76px; height: 76px; border-radius: 14px; object-fit: cover; }
.past-noimg { display: grid; place-items: center; background: var(--tint, #EEF3FF); font-size: 28px; }
.past-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.past-text b { font-size: 16px; line-height: 1.2; }
.past-text small { color: var(--muted); font-size: 13px; font-weight: 600; }
.pe-photos { display: flex; flex-direction: column; gap: 12px; }
.pe-photos figure { margin: 0; background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.pe-photos img { display: block; width: 100%; height: auto; }
.pe-photos figcaption { padding: 10px 14px; font-size: 15px; font-weight: 600; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.ph-grid figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ph-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.ph-grid figcaption { font-size: 13px; color: var(--muted); }
body.app .past-btn, body.app .past-card { border: 1px solid var(--line) !important; box-shadow: 0 1px 3px rgba(11, 37, 69, 0.06); }
.past-card > img, .past-card > .past-noimg { margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--line); }
.seg button { min-height: 40px; border-radius: 11px; border: 0; background: transparent !important; color: var(--ink) !important; font-size: 15px; font-weight: 700; }
.seg button[aria-selected="true"] { background: #fff !important; box-shadow: 0 1px 3px rgba(11, 31, 77, 0.12); }
.seg-h { margin: 8px 0 0; font-size: 17px; }

/* Officials without a photo yet: portrait silhouette in the office colour */
.off-person .off-sil { position: relative; display: block; overflow: hidden; color: rgba(255, 255, 255, 0.88); background: linear-gradient(160deg, #1A4FC4, #0B1F4D); }
.off-person .off-sil.owwa { background: linear-gradient(160deg, #E0303F, #8E0E1C); }
.off-person .off-sil.mwo { background: linear-gradient(160deg, #1E8A4F, #0B4A2A); }
.off-person .off-sil svg { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 92%; }
.off-person .off-sil em { display: none; }
.off-group { grid-column: 1 / -1; margin: 10px 2px 0; font-size: 15px; font-weight: 800; letter-spacing: 0.02em; color: var(--ink); }
.off-group:first-child { margin-top: 0; }

/* Officials: one card per office, with a coloured header */
.off-secs { display: flex; flex-direction: column; gap: 16px; }
.off-sec { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 1px 4px rgba(11, 31, 77, 0.1); }
.off-sec > header { padding: 12px 16px; color: #fff; background: linear-gradient(135deg, #1A4FC4, #0B1F4D); }
.off-sec.mwo > header { background: linear-gradient(135deg, #1E8A4F, #0B4A2A); }
.off-sec.owwa > header { background: linear-gradient(135deg, #E0303F, #8E0E1C); }
.off-sec.other > header, .off-sec.pagibig > header { background: linear-gradient(135deg, #F2B705, #B37A00); color: #1d1500; }
.off-sec.sss > header { background: linear-gradient(135deg, #1F5FBF, #133C80); }
.off-sec > header b { display: block; font-size: 17px; }
.off-sec > header small { display: block; font-size: 13px; opacity: 0.9; margin-top: 2px; }
.off-sec .off-people { padding: 12px; }
.off-sec .off-person { box-shadow: none; border: 1px solid var(--line); }
.off-sec .off-empty { border: 2px dashed var(--line); }

/* Official: tap for contacts */
button.off-person { font: inherit; color: inherit; cursor: pointer; min-height: 0; background: #fff !important; color: var(--ink) !important; }
.off-more { margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--brand); }
.off-sheet { position: fixed; inset: 0; z-index: 90; background: rgba(11, 31, 77, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.off-sheet-card { position: relative; width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--paper, #F2F3F7); border-radius: 24px 24px 0 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.off-sheet-card .hl { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.off-sheet-card .call { flex-direction: column; align-items: flex-start; gap: 2px; }
.off-sheet-card .call b { order: -1; font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.off-sheet-card .call.mail b { font-size: 16px; }
.off-sheet-card .call span { font-size: 13px; font-weight: 600; opacity: 0.85; }
.off-sheet-card h3 { margin: 4px 0 0; font-size: 20px; }
.off-pos { margin: 0; color: var(--muted); }
.off-via { margin: 6px 0 0; font-size: 14px; text-align: left; color: var(--muted); }
.off-addr { margin: 0; font-size: 13px; color: var(--muted); text-align: left; }
.off-big { width: 110px !important; height: 110px !important; border-radius: 50%; margin: 0 auto; object-fit: cover; display: block; }
.off-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line); font-size: 16px; }
.off-sil { position: relative; display: block; overflow: hidden; color: rgba(255, 255, 255, 0.88); background: linear-gradient(160deg, #1A4FC4, #0B1F4D); }
.off-sil.mwo { background: linear-gradient(160deg, #1E8A4F, #0B4A2A); }
.off-sil.owwa { background: linear-gradient(160deg, #E0303F, #8E0E1C); }
.off-sil.other { background: linear-gradient(160deg, #F2B705, #B37A00); }
.off-sil svg { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 92%; }
body.app button.off-person { border: 1px solid var(--line) !important; }
body.app .off-x { border: 1px solid var(--line) !important; }

/* Event header with photos: first photo behind a gradient; tap to open the photos full screen */
#eventHead.has-bg { color: #fff; cursor: pointer; }
#eventHead.has-bg::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--ev-bg) center / cover no-repeat; }
#eventHead.has-bg::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--g1) 35%, transparent) 0%, color-mix(in srgb, var(--g1) 70%, transparent) 40%, color-mix(in srgb, var(--g2) 95%, transparent) 85%); }
#eventHead.has-bg .ev-kicker { color: var(--sun); }
#vPass #eventHead.has-bg, #eventHead.has-bg.light { color: #fff; }
#eventHead.has-bg.light::after, #vPass #eventHead.has-bg::after { background: linear-gradient(180deg, rgba(11, 31, 77, 0.35) 0%, rgba(11, 31, 77, 0.7) 40%, rgba(11, 31, 77, 0.95) 85%); }
#eventHead.has-bg.light .btn.secondary, #eventHead.has-bg.light button.secondary { border-color: #fff; }
#eventHead.has-bg h1, #eventHead.has-bg p { color: #fff !important; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
#eventHead.tappable { cursor: pointer; }
.ph-view { position: fixed; inset: 0; z-index: 1000; background: var(--bg, #F2F3F7); }
.ph-view[hidden] { display: none; }
body.ph-open { overflow: hidden; }
.ph-view { display: flex; flex-direction: column; }
.ph-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ph-gallery { position: relative; background: var(--ink); }
.ph-gallery.empty .ph-track { min-height: calc(64px + env(safe-area-inset-top, 0px)); }
.ph-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ph-track::-webkit-scrollbar { display: none; }
/* Photos fill the top edge to edge; a soft shadow at the top (for ✕ and the counter) and a gradient at the bottom with the caption */
/* Half the screen: the whole photo is shown (nothing cut off), sitting on a blurred copy of itself so the area is filled */
.ph-track figure { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: center; height: calc(56vh + env(safe-area-inset-top, 0px)); min-height: 320px; overflow: hidden; cursor: zoom-in; background: var(--ink); }
.ph-blur { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(28px) saturate(1.2) brightness(0.75); transform: scale(1.1); }
.ph-track img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; box-sizing: border-box;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 16px; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35)); }
.ph-track figure.has-cap img { padding-bottom: max(70px, calc(64px + env(safe-area-inset-top, 0px))); }
.ph-track figure::before { z-index: 1; content: ''; position: absolute; inset: 0 0 auto; height: calc(90px + env(safe-area-inset-top, 0px)); background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent); pointer-events: none; }
.ph-track figure::after { z-index: 0; content: ''; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(11, 31, 77, 0.55) 45%, rgba(11, 31, 77, 0.92)); pointer-events: none; }
.ph-track figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 18px 16px; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.35; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); pointer-events: none; }
.ph-zoom-hint { position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: #fff; backdrop-filter: blur(6px); pointer-events: none; }
.ph-track figcaption { padding-right: 60px !important; }
.ph-zoom-hint { z-index: 3 !important; }

/* Full-screen photo: pinch or double-tap to zoom, drag to look around, swipe for the next one */
.lb { position: fixed; inset: 0; z-index: 1200; background: #000; display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-track.zoomed { overflow: hidden; }
.lb-track figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; overflow: hidden; position: relative; }
.lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: 0 0; touch-action: pan-x; user-select: none; -webkit-user-drag: none; will-change: transform; }
.lb-track.zoomed img { touch-action: none; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent); color: #fff; font-weight: 700; font-size: 15px; pointer-events: none; }
.lb-top > * { pointer-events: auto; }
.lb-top button { width: 44px !important; height: 44px !important; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; border: 0 !important; background: rgba(255, 255, 255, 0.18) !important; color: #fff !important; font-size: 20px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 30px 18px calc(18px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7)); color: #fff; font-size: 15px; font-weight: 600; text-align: center; pointer-events: none; }
.lb-cap:empty { display: none; }
.ph-close { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; width: 44px !important; height: 44px !important; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important;
  border: 0 !important; background: rgba(0, 0, 0, 0.5) !important; color: #fff !important; font-size: 20px; backdrop-filter: blur(6px); }
.ph-count { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 13px; font-weight: 700; }
.ph-count:empty { display: none; }
.ph-body { max-width: 640px; margin: 0 auto; padding: 18px 20px calc(40px + env(safe-area-inset-bottom, 0px)); }
.ph-kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--brand); }
.ph-body h2 { margin: 4px 0 8px; font-size: 24px; color: var(--ink); }
.ph-meta { margin: 2px 0; font-weight: 600; color: var(--ink); }
.ph-meta:empty { display: none; }
.ph-details { margin-top: 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; font-size: 16px; line-height: 1.55; color: var(--ink); }

/* Line icons that replace emojis (icons.js) */
svg.i { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-cc { display: inline-block; padding: 0 0.35em; border: 1.5px solid currentColor; border-radius: 4px; font-size: 0.7em; font-weight: 800; line-height: 1.4; vertical-align: 0.1em; letter-spacing: 0.04em; }
.i-bar { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.i-bar button { width: 34px !important; height: 34px !important; min-height: 0 !important; padding: 0 !important; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line) !important; background: #fff !important; color: var(--ink) !important; font-size: 16px; }
.i-bar button:hover { background: var(--tint, #EEF3FF) !important; }
.i-preview { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--tint, #EEF3FF); color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.5; }
.i-preview-k { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* Pop-up when the app opens: latest events */
.promo { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 20px; background: rgba(11, 31, 77, 0.55); backdrop-filter: blur(3px); animation: promoIn 0.25s ease; }
.promo[hidden] { display: none; }
@keyframes promoIn { from { opacity: 0; } to { opacity: 1; } }
.promo-card { position: relative; width: min(420px, 100%); max-height: calc(100vh - 40px); border-radius: 28px; overflow: hidden; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); animation: promoUp 0.3s ease; }
@keyframes promoUp { from { transform: translateY(24px) scale(0.98); } to { transform: none; } }
.promo-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px !important; height: 40px !important; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important;
  border: 0 !important; background: rgba(0, 0, 0, 0.45) !important; color: #fff !important; font-size: 18px; backdrop-filter: blur(6px); }
.promo-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; }
.promo-hero { position: relative; isolation: isolate; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 20px; color: #fff;
  background: linear-gradient(180deg, rgba(11, 31, 77, 0.05) 0%, rgba(11, 31, 77, 0.35) 45%, rgba(11, 31, 77, 0.95) 100%), var(--bg, linear-gradient(160deg, var(--ph-blue, #0038A8), var(--ink, #0B1F4D))) center / cover; }
.promo-k { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--sun, #FCD116); color: var(--ink, #0B1F4D); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.promo-hero h2 { margin: 6px 0 0; color: #fff !important; font-size: 26px; line-height: 1.15; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4); }
.promo-when { font-size: 16px; font-weight: 700; opacity: 0.95; }
.promo-body { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.promo-venue { margin: 0; font-weight: 700; color: var(--ink); }
.promo-text { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.promo-go { display: flex; justify-content: center; align-items: center; margin-top: 4px; text-decoration: none; }
.promo-hero { text-decoration: none; }
.promo-spots { margin: 0; font-size: 14px; font-weight: 700; color: var(--good, #1B7F3B); }
.promo-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.promo-links a { font-weight: 700; color: var(--brand); font-size: 16px; }
.promo-later { width: auto !important; min-height: 40px !important; background: none !important; border: 0 !important; color: var(--ink) !important; text-decoration: underline; font-size: 16px; font-weight: 600; box-shadow: none !important; }
.promo-dots { position: absolute; left: 20px; top: 26px; display: flex; justify-content: flex-start; gap: 6px; pointer-events: none; }
.promo-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.promo-dots span.on { background: #fff; width: 18px; border-radius: 4px; }

/* Event header: Join / Not going; calendar question after joining */
.ev-actions { margin-top: 6px; }
.ev-actions #evJoin { flex: 2 1 160px; }
.ev-actions #evSkip { flex: 1 1 110px; border-color: #fff; }
#eventHead.light .ev-actions #evSkip:not(.has-bg *) { border-color: var(--ink); }
.ev-spots { margin: 2px 0 0; font-weight: 800; color: var(--sun, #FCD116); }
.cal-ask { padding: 26px 22px 14px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.cal-ask h2 { margin: 0; font-size: 22px; color: var(--ink); }
.cal-ask p { margin: 0 0 6px; }
.cal-ask-ico { margin: 0 auto 4px; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--tint, #EEF3FF); color: var(--brand); font-size: 28px; }
.cal-ask .btn { display: flex; justify-content: center; align-items: center; text-decoration: none; }
.promo-rsvp { display: flex; gap: 10px; }
.promo-rsvp .good { flex: 2 1 0; }
.promo-rsvp .secondary { flex: 1 1 0; white-space: nowrap; padding-left: 10px !important; padding-right: 10px !important; }
.promo-links:has(> :only-child) { justify-content: center; }
.ph-bar { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--line); }
.ph-bar[hidden] { display: none; }
.ph-bar .good { flex: 2 1 0; }
.ph-bar .secondary { flex: 1 1 0; white-space: nowrap; }

/* Home: News */
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 1px 3px rgba(11, 31, 77, 0.06); }
.news-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 200px; padding: 16px; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, rgba(11, 31, 77, 0.05) 0%, rgba(11, 31, 77, 0.4) 45%, rgba(11, 31, 77, 0.95) 100%), var(--bg, linear-gradient(160deg, var(--ph-blue, #0038A8), var(--ink, #0B1F4D))) center / cover; }
.news-hero .promo-k { margin-bottom: 4px; }
.news-hero b { font-size: 21px; line-height: 1.2; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.news-hero small { font-size: 14px; font-weight: 600; opacity: 0.95; }
.news-actions { display: flex; gap: 10px; padding: 12px 16px 14px; }
.news-actions .btn { display: flex; justify-content: center; align-items: center; text-decoration: none; min-height: 46px; font-size: 16px; }
.news-actions .good { flex: 2 1 0; min-height: 46px; font-size: 16px; }
.news-actions .secondary { flex: 1 1 0; white-space: nowrap; }
.news-img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.news-text { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.news-k { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.news-text h3 { margin: 2px 0 0; font-size: 19px; color: var(--ink); }
.news-sub { margin: 0; font-weight: 600; color: var(--muted); font-size: 15px; }
.news-body { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.news-body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { align-self: flex-start; min-height: 0 !important; padding: 4px 0 !important; background: none !important; border: 0 !important; color: var(--brand) !important; font-weight: 700; font-size: 15px; box-shadow: none !important; width: auto !important; }

/* The event header carries Going / Not going now; the old join card stays only for the tab bar and back arrow. */
#vJoin { display: none !important; }
.news-link { text-decoration: none; color: inherit; padding-bottom: 4px; }
.news-link .news-body.clamp { -webkit-line-clamp: 3; color: var(--muted); }
.news-more-link { font-weight: 700; color: var(--brand); font-size: 15px; margin-top: 4px; }
.news-ev, .promo-slide { cursor: pointer; }
.news-actions .good { flex: 1 1 auto; }

/* Event header: one small "Add to calendar" pill (opens the Google / iPhone choice) */
.ev-cal { display: flex; margin-top: 6px; }
.ev-cal-btn { width: auto !important; min-height: 40px !important; padding: 0 16px !important; border-radius: 999px !important; font-size: 15px; font-weight: 700;
  background: rgba(255, 255, 255, 0.16) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, 0.55) !important; backdrop-filter: blur(8px); box-shadow: none !important; }
#eventHead:not(.has-bg).light .ev-cal-btn, #vPass #eventHead:not(.has-bg) .ev-cal-btn { background: var(--tint, #EEF3FF) !important; color: var(--ink) !important; border-color: var(--line) !important; }
#vPass #eventHead .ev-cal { justify-content: center; }

/* Offices & hotlines: office badge, then email / Facebook / X / website chips */
.hl-head { display: flex !important; align-items: center; gap: 10px; }
.hl-badge { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
.hl-badge[data-o="emb"] { background: linear-gradient(135deg, #0038A8, #0B1F4D); }
.hl-badge[data-o="mwo"] { background: linear-gradient(135deg, #1B6EC2, #0B3B7A); font-size: 12px; }
.hl-badge[data-o="owwa"] { background: linear-gradient(135deg, #CE1126, #8E0C1B); font-size: 11px; }
.hl-badge[data-o="sss"] { background: linear-gradient(135deg, #1F5FBF, #133C80); }
.hl-badge[data-o="pagibig"] { background: linear-gradient(135deg, #E0A800, #B07F00); color: #0B1F4D; }
.hl-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; max-width: 100%; }
.hl-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-chip svg.i-b { width: 17px; height: 17px; flex: none; }
.hl-chip:has(svg.i-b[viewBox]) { }
.hl-logo { flex: none; width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; }
.off-sec-head { display: flex !important; align-items: center; gap: 12px; }
.off-sec-head > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.off-logos { display: flex; gap: 6px; flex: none; }
.off-logos img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; box-sizing: border-box; }
.off-sil.sss, .off-person .off-sil.sss { background: linear-gradient(160deg, #1F5FBF, #133C80); }
.news-post { cursor: pointer; }

/* Main tabs: the bar shows the KabayanPass logo; no repeated big title under it */
#vEvents > .screen-title, #vCard > .screen-title, #vOfficials > .screen-title, #vAccount > .screen-title { display: none; }
#vEvents, #vCard, #vOfficials { padding-top: 6px; }
/* News: every post is a short preview (headline + 3 lines); tap for the rest */
.news-card .news-body.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); }

/* Walk-in sign-up + passport status at the door */
.r-pass { background: rgba(255,255,255,.14); border-radius: 14px; padding: 12px; margin: 10px auto; max-width: 420px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.r-pass input { font-size: 18px; text-transform: uppercase; }
fieldset.w-pass { border: 1px solid var(--line, #d7dbe4); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
fieldset.w-pass legend { padding: 0 6px; }
#walkinDone .pill { display: inline-block; align-self: center; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.pill.ok, .ps-pill.verified { background: #E3F6EA; color: #0F6B36; }
.pill.warn, .ps-pill.review, .ps-pill.unchecked { background: #FFF4D6; color: #7A5600; }
.pill.bad, .ps-pill.needed { background: #FDE7E7; color: #A11B1B; }
.ps-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.pass-banner { display: flex; gap: 10px; align-items: center; background: #FFF4D6; color: #5C4100; border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; font-size: 14px; cursor: pointer; border: 0; width: 100%; text-align: left; }
.pass-banner b { display: block; }
.pass-banner.red { background: #FDE7E7; color: #7D1414; }
.verified-badge { display: inline-flex; align-items: center; gap: 4px; background: #E3F6EA; color: #0F6B36; font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.pq-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; border: 1px solid var(--line, #d7dbe4); border-radius: 14px; padding: 12px; }
.pq-item img { width: 100%; border-radius: 10px; cursor: zoom-in; background: #f3f4f7; }
@media (max-width: 640px) { .pq-item { grid-template-columns: 1fr; } }
#psBox { scroll-margin-top: 84px; }

/* KP Admin levels: owner sees everything; admin can't delete/change records or settings; viewer is read-only */
body[data-level="admin"] [data-owner], body[data-level="viewer"] [data-owner], body[data-level="viewer"] [data-write] { display: none !important; }
/* 2026-11-23: a login of an organization sees only its own organization's tools (the server refuses the rest too) */
body[data-org] [data-platform] { display: none !important; }
/* Hidden for platform Viewers only: an organization's own viewer sees its organization's page (2026-11-23, 6b) */
body[data-level="viewer"]:not([data-org]) [data-pview] { display: none !important; }

/* Member face check-in (staff page) */
.mf-match { display: flex; flex-direction: column; gap: 12px; border: 3px solid var(--good, #007A3D); border-radius: 16px; padding: 14px; }
.mf-photo img { width: 100%; max-width: 360px; border-radius: 10px; display: block; }
.mf-who b { font-size: 26px; display: block; }

/* Document scanner (Civil ID / passport): CamScanner-style corner editor */
html.ds-open, html.ds-open body { overflow: hidden; }
.ds-overlay { position: fixed; inset: 0; z-index: 10050; background: #0B1220; color: #fff; display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); gap: 10px; }
.ds-top { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.ds-x { background: transparent; border: 0; color: #fff; font-size: 22px; min-height: 44px; min-width: 44px; padding: 0; }
.ds-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ds-canvas { touch-action: none; max-width: 100%; max-height: 100%; border-radius: 6px; }
.ds-result { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 6px 30px rgba(0,0,0,.5); background: #fff; }
.ds-hint { margin: 0; text-align: center; font-size: 15px; color: #C9D3E6; min-height: 1.4em; }
.ds-hint.good { color: #7BE3A1; font-weight: 700; }
.ds-hint.warn { color: #FFD166; font-weight: 700; }
.ds-bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ds-bar button { flex: 1 1 0; min-width: 0; max-width: 220px; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.ds-bar button.secondary { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.ds-bar [data-a="rotate"] { flex: 0 0 52px; }
.scan-thumb { width: 100%; max-width: 320px; border-radius: 10px; border: 1px solid var(--line, #d7dbe4); display: block; }
.w-scan { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line, #d7dbe4); border-radius: 12px; padding: 10px 12px; }

/* GRO page */
.gro-soon { background: #FFF8E1; border-color: #F5D77A; gap: 8px; }
.gro-slotbar { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line, #d7dbe4); border-radius: 12px; padding: 12px; }
.gro-slots { display: flex; flex-wrap: wrap; gap: 6px; }
@media print {
  body.print-summary main > *:not(#vMain), body.print-summary #vMain > *:not(#gSummary), body.print-summary .demo-banner, body.print-summary .no-print { display: none !important; }
  body.print-summary #gSummary { box-shadow: none; border: 0; }
}

/* ===== KP Admin: dashboard layout for iPad, Android tablets and computers (phones keep the simple layout) ===== */
.side-brand, .side-sep, .nav-ico, .kpi-ico, .dash-charts, .page-head { display: none; }
@media (min-width: 768px) {
  body.has-side { --side: 232px; background: #F3F5FA; }
  body.has-side main.wrap.wide { max-width: none; margin: 0 0 0 var(--side); padding: 18px 28px 48px; gap: 20px; }
  body.has-side .demo-banner { margin-left: var(--side); }
  body.has-side .about { text-align: left; }

  /* Sidebar */
  body.has-side .admin-tabs {
    position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: var(--side);
    flex-direction: column; flex-wrap: nowrap; gap: 4px; overflow-y: auto;
    padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
    background: linear-gradient(180deg, #0B1F4D 0%, #071538 100%); border-top: 6px solid transparent; border-image: var(--flag-stripe) 1;
  }
  body.has-side .side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; }
  body.has-side .side-brand img { border-radius: 9px; background: #fff; padding: 3px; }
  body.has-side .side-brand span { display: flex; flex-direction: column; font-size: 18px; font-weight: 800; line-height: 1.05; }
  body.has-side .side-brand span b { display: contents; color: var(--sun); }
  body.has-side .side-brand small { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9FB0D6; margin-top: 3px; }
  body.has-side .side-sep { display: block; flex: 1 1 auto; min-height: 16px; }
  body.has-side .admin-tabs button {
    display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: left; width: 100%;
    min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #C5D0EA;
    font-size: 15px; font-weight: 600; box-shadow: none;
  }
  body.has-side .admin-tabs button:hover { background: rgba(255,255,255,.07) !important; color: #fff; }
  body.has-side .admin-tabs button[aria-selected="true"], body.has-side .admin-tabs button[aria-selected="true"]:hover { background: #2F6BFF !important; color: #fff; box-shadow: inset 3px 0 0 var(--sun); }
  body.has-side .nav-ico { display: block; width: 20px; height: 20px; flex: none; }

  /* Header */
  body.has-side .topbar { position: sticky; top: 0; z-index: 20; margin: -18px -28px 0; padding: 14px 28px; background: rgba(243,245,250,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #E3E8F3; }
  body.has-side .topbar .brand { display: none; }
  body.has-side .page-head { display: flex; flex-direction: column; margin-right: auto; }
  body.has-side .page-head h1 { font-size: 24px; }
  body.has-side .crumb { font-size: 13px; color: var(--muted); font-weight: 600; }
  body.has-side #whoami { font-weight: 700; color: var(--ink); background: #fff; border: 1px solid #E3E8F3; border-radius: 999px; padding: 7px 14px; }

  /* Cards */
  body.has-side .card { border: 1px solid #E6EBF5; border-radius: 14px; box-shadow: 0 1px 2px rgba(11,31,77,.04), 0 6px 18px rgba(11,31,77,.05); }
  body.has-side .card h2 { font-size: 18px; }

  /* KPI tiles */
  body.has-side .stats-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
  body.has-side #stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
  body.has-side .stat.kpi.wide { grid-column: span 2; }
  body.has-side .stat.kpi {
    position: relative; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; min-height: 104px;
    background: #fff; border: 1px solid #E6EBF5; border-radius: 14px; padding: 16px 70px 16px 18px; box-shadow: 0 1px 2px rgba(11,31,77,.04), 0 6px 18px rgba(11,31,77,.05);
  }
  body.has-side .stat.kpi span { font-size: 13.5px; }
  body.has-side .stat.kpi b { font-size: 28px; }
  body.has-side .stat.kpi b.small { font-size: 18px; }
  body.has-side .kpi-ico { display: grid; place-items: center; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 12px; }
  body.has-side .kpi-ico svg { width: 24px; height: 24px; }
  .tone-blue .kpi-ico { background: #E7EEFF; color: #2F6BFF; }
  .tone-teal .kpi-ico { background: #E2F6F3; color: #0E9F8A; }
  .tone-green .kpi-ico { background: #E3F4EA; color: #007A3D; }
  .tone-amber .kpi-ico { background: #FFF2D9; color: #B45309; }
  .tone-violet .kpi-ico { background: #F0E9FF; color: #6D3FD8; }

  /* Charts */
  body.has-side .dash-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
  body.has-side[data-tab]:not([data-tab="events"]) .stats-card, body.has-side[data-tab]:not([data-tab="events"]) .dash-charts { display: none; }
  .chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .ch-box { position: relative; min-height: 220px; }
  .ch-box svg { display: block; width: 100%; height: auto; overflow: visible; }
  .ch-grid { stroke: #E9EDF5; stroke-width: 1; }
  .ch-ax { fill: #6B7591; font-size: 11px; font-family: inherit; }
  .ch-cross { stroke: #B9C4DD; stroke-width: 1; stroke-dasharray: 3 3; }
  .ch-tip { position: absolute; pointer-events: none; background: #0B1F4D; color: #fff; font-size: 13px; line-height: 1.3; padding: 7px 10px; border-radius: 8px; white-space: nowrap; box-shadow: 0 6px 16px rgba(11,31,77,.25); }
  .ch-tip span { color: #B9C6E6; font-size: 12px; }
  .ch-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
  .ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

  /* Lists and tables */
  body.has-side #eventList { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 18px !important; align-items: start; }
  body.has-side th { background: #F5F7FC; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
  body.has-side .table-box { border-radius: 12px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body.has-side { --side: 76px; }
  body.has-side .admin-tabs { padding-left: calc(10px + env(safe-area-inset-left)); padding-right: 10px; }
  body.has-side .admin-tabs button { justify-content: center; padding: 10px; }
  body.has-side .admin-tabs button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.has-side .side-brand span { display: none; }
  body.has-side .side-brand { justify-content: center; padding: 4px 0 18px; }
  body.has-side main.wrap.wide { padding: 16px 20px 40px; }
  body.has-side .topbar { margin: -16px -20px 0; padding: 12px 20px; }
  body.has-side #eventList { grid-template-columns: 1fr; }
}

/* Door staff page on iPad / Android tablets: same sidebar, tools on the left, event card on the right */
@media (min-width: 768px) {
  body.door-app #vMain { display: grid !important; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
  body.door-app #vMain > section { grid-column: 1; }
  body.door-app .door-side { grid-column: 2; grid-row: 1 / span 20; position: sticky; top: 96px; }
  body.door-app .door-side select { font-size: 16px; }
  body.door-app .admin-tabs .side-brand + button { margin-top: 0; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body.door-app #vMain { grid-template-columns: 1fr; }
  body.door-app .door-side { grid-column: 1; grid-row: auto; position: static; }
}
.side-home { display: none; }
@media (min-width: 768px) {
  body.has-side .side-home { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 10px; color: #C5D0EA; text-decoration: none; font-weight: 600; font-size: 15px; }
  body.has-side .side-home:hover { background: rgba(255,255,255,.07); color: #fff; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body.has-side .side-home { justify-content: center; padding: 10px; }
  body.has-side .side-home span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Android app: "new version" bar */
.app-update { position: fixed; z-index: 10040; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 10px); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #0B1F4D; color: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(11,31,77,.35); max-width: 640px; margin: 0 auto; }
.app-update span { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.app-update small { color: #C5D0EA; font-size: 13px; }
.app-update button { flex: 0 0 auto; min-height: 40px; }
.app-update button.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

/* Admin post composer: image picker */
.post-img { display: flex; flex-direction: column; gap: 8px; }
.post-img-lbl { font-weight: 700; }
.post-drop { display: grid; place-items: center; min-height: 150px; border: 2px dashed #C9D3E8; border-radius: 14px; background: #F7F9FD; cursor: pointer; overflow: hidden; text-align: center; padding: 0; font-weight: 400; }
.post-drop:hover { border-color: #2F6BFF; background: #F0F5FF; }
.post-drop img { width: 100%; max-height: 340px; object-fit: contain; background: #0B1220; display: block; }
.post-drop-txt { padding: 22px; color: var(--muted); font-size: 16px; }
.post-drop-txt b { color: var(--ink); }
.img-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.img-pick:empty { display: none; }
.img-pick-item { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #EEF2F9; border: 1px solid #E1E7F2; }
.img-pick-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-pick-wait { display: grid; place-items: center; height: 100%; color: var(--muted); font-weight: 800; }
.img-pick-cover { position: absolute; left: 6px; bottom: 6px; background: #0B1F4D; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.img-pick-x { position: absolute; top: 5px; right: 5px; min-height: 0; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: rgba(11,18,32,.75) !important; color: #fff; border: 0; font-size: 14px; line-height: 28px; }
.img-pick-add { display: grid; place-items: center; aspect-ratio: 1; border: 2px dashed #C9D3E8; border-radius: 12px; background: #F7F9FD; cursor: pointer; text-align: center; color: var(--muted); font-weight: 400; padding: 6px; }
.img-pick-add:hover { border-color: #2F6BFF; background: #F0F5FF; }
.img-pick-add b { color: var(--ink); }
.post-img-lbl .hint { display: block; font-weight: 400; margin-top: 2px; }

/* Event photos on News cards and the app-open pop-up: the whole photo, centered, on a blurred copy of itself (nothing cut off) */
.news-hero, .promo-hero { background: var(--ink, #0B1F4D); overflow: hidden; }
.news-hero::before, .promo-hero::before { content: ''; position: absolute; inset: -40px; z-index: -1; background: var(--bg, linear-gradient(160deg, var(--ph-blue, #0038A8), var(--ink, #0B1F4D))) center / cover no-repeat; filter: blur(26px) saturate(1.15) brightness(0.7); }
.news-hero::after, .promo-hero::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 31, 77, 0) 0%, rgba(11, 31, 77, 0.1) 50%, rgba(11, 31, 77, 0.9) 100%), var(--bg, none) center / contain no-repeat; }
.news-hero { min-height: 240px; }

/* Serbisyo Caravan: member picks a visit day and agencies */
.cv-k { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.cv-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.cv-svc { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-weight: 700; cursor: pointer; }
.cv-svc input { width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; padding: 0; margin: 0; }
.cv-svc span { flex: 1; color: var(--ink); }
.cv-svc small { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cv-svc:has(input:checked) { border-color: var(--good); background: #E3F3EA; }
.cv-svc.full { opacity: .5; cursor: default; }
#svcBox label:not(.cv-svc) { margin-top: 6px; }

/* Serbisyo Caravan: Front GRO + Internal GRO */
.fg-person { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.fg-person .cv-svc .chip { white-space: nowrap; }
.fl-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.fl-stats span { background: var(--tint); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.fl-stats b { font-size: 20px; margin-right: 4px; }
.fl-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fl-svc { border: 2px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #fff; min-width: 0; }
.fl-svc.closed { opacity: .65; }
.fl-head { display: flex; flex-direction: column; gap: 4px; }
.fl-head > b { font-size: 18px; }
.fl-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; font-size: 14px; }
.fl-tools button { min-height: 36px; padding: 4px 12px; }
.fl-tables { display: flex; flex-direction: column; gap: 8px; }
.fl-table { border-radius: 14px; padding: 10px 12px; background: var(--tint); display: flex; flex-direction: column; gap: 3px; }
.fl-table.busy { background: #E3F3EA; border: 2px solid var(--good); }
.fl-table.busy.late { background: #FFF4D6; border-color: #E0A800; }
.fl-n { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fl-table b { font-size: 17px; overflow-wrap: anywhere; }
.fl-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fl-act button { min-height: 38px; padding: 4px 12px; }
.fl-next summary { font-weight: 800; cursor: pointer; padding: 4px 0; }
.fl-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); }
.fl-row .chip { margin-left: 4px; }
@media (max-width: 420px) { .fl-board { grid-template-columns: 1fr; } }
.fg-person .chip { flex: 0 0 auto; }

/* Full-screen photos: arrows + reliable sideways swipe */
.lb-track { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; min-height: 0; }
.lb-nav { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 46px !important; height: 46px !important; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; border: 0 !important;
  background: rgba(255, 255, 255, 0.22) !important; color: #fff !important; font-size: 30px !important; line-height: 1; display: grid; place-items: center; backdrop-filter: blur(6px); }
.lb-nav.prev { left: max(10px, env(safe-area-inset-left, 0px)); }
.lb-nav.next { right: max(10px, env(safe-area-inset-right, 0px)); }
.lb-track.zoomed ~ .lb-nav { display: none; }

/* Staff app: each role has its own colour so you can tell the stations apart */
.role-chip { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 800; color: #fff; background: var(--role-c, var(--ph-blue, #0038A8)); vertical-align: middle; }
body[data-duty]:not([data-duty="all"]) .page-head { border-left: 6px solid var(--role-c); padding-left: 14px; }
body[data-duty]:not([data-duty="all"]) .side-nav button[aria-selected="true"], body[data-duty]:not([data-duty="all"]) [role="tablist"] button[aria-selected="true"] { box-shadow: inset 4px 0 0 var(--role-c); }

/* ===== Staff app: a screen of its own for each role (Front GRO, Internal GRO, Embassy Services, Door) ===== */
body.role-ui { background: var(--role-t, #F3F5FA); }
body.role-ui main.wrap.wide { max-width: 1100px; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
body.role-ui .topbar { display: none; }
body.role-ui .demo-banner { margin: 0; }
.role-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--role-c); color: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; box-shadow: 0 8px 24px rgba(11, 31, 77, .18); }
.rb-ico { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.rb-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rb-txt small { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-txt b { font-size: 19px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-bar .rb-btn, .role-bar .rb-out { flex: 0 0 auto; min-height: 44px !important; min-width: 44px; padding: 0 12px !important; border-radius: 12px !important; border: 0 !important; background: rgba(255, 255, 255, .18) !important; color: #fff !important; display: grid; place-items: center; font-size: 14px !important; font-weight: 800; }
body.role-settings-open .rb-btn { background: #fff !important; color: var(--role-c) !important; }
/* Switch job / Switch person: own row under the role bar */
.role-switch { display: flex; gap: 8px; margin: 8px 0 0; }
body .role-switch .rs-btn { flex: 1 1 0; min-height: 44px !important; margin: 0 !important; padding: 0 12px !important; border-radius: 12px !important; border: 2px solid var(--role-c) !important; background: var(--role-t, #fff) !important; background-image: none !important; box-shadow: none !important; color: var(--role-c) !important; display: grid !important; place-items: center; font-size: 14px !important; font-weight: 800 !important; text-decoration: none !important; width: auto !important; }
/* event + gate settings fold away under the gear */
body.role-ui .door-side { display: none !important; }
body.role-ui.role-settings-open .door-side { display: flex !important; flex-direction: column; border: 2px solid var(--role-c); }
/* the menu: a bottom bar on phones, a big segmented bar on tablets */
body.role-ui .admin-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 4px; margin: 0;
  padding: 8px max(10px, env(safe-area-inset-left, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-right, 0px));
  background: #fff; border-top: 1px solid #E3E8F3; box-shadow: 0 -6px 20px rgba(11, 31, 77, .08); overflow-x: auto; }
body.role-ui .admin-tabs .side-brand, body.role-ui .admin-tabs .side-sep { display: none !important; }
body.role-ui .admin-tabs button { flex: 1 1 0; min-width: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 58px; padding: 6px 4px; border: 0 !important; border-radius: 14px !important; background: transparent !important; color: #55607A !important; font-size: 12px; font-weight: 800; box-shadow: none !important; }
body.role-ui .admin-tabs button .nav-ico { display: block; width: 24px; height: 24px; }
body.role-ui .admin-tabs button[aria-selected="true"] { background: var(--role-t) !important; color: var(--role-c) !important; }
body.role-ui.role-one-screen .admin-tabs { display: none !important; }
body.role-ui.role-one-screen main.wrap.wide { padding-bottom: 32px; }
@media (min-width: 768px) {
  body.role-ui .admin-tabs { position: static; border-radius: 18px; border: 1px solid #E3E8F3; box-shadow: none; padding: 6px; }
  body.role-ui .admin-tabs button { flex-direction: row; gap: 8px; font-size: 16px; min-height: 52px; }
  body.role-ui main.wrap.wide { padding-bottom: 40px; }
}
/* role-specific screens */
body.role-ui section.card { border-top: 4px solid var(--role-c); }
body[data-duty="door"] #reader { max-width: 560px; }
body[data-duty="door"] #tabScan h2 { font-size: 26px; }
body[data-duty="door"] #camStart, body[data-duty="front_gro"] #fgGo { min-height: 64px; font-size: 20px; }
body[data-duty="internal_gro"] main.wrap.wide { max-width: none; }
body[data-duty="internal_gro"] .fl-board { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
body[data-duty="internal_gro"] .fl-table b { font-size: 20px; }
body[data-duty="internal_gro"] .fl-act button { min-height: 46px; font-size: 15px; }
body[data-duty="front_gro"] #fgId, body[data-duty="embassy_services"] #fgId { font-size: 22px; min-height: 60px; letter-spacing: .04em; }
/* role screens: phone fixes */
.rb-txt b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 17px; }
@media (max-width: 767px) { body.role-ui .rp-btn { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; width: 44px; height: 44px; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; font-size: 0 !important; overflow: hidden; display: grid !important; place-items: center; }
  body.role-ui .rp-btn > * { display: none !important; }
  body.role-ui .rp-btn::before { content: ""; display: block; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat; } }
@media (max-width: 480px) {
  .role-bar { gap: 8px; padding: 10px 12px; border-radius: 16px; }
  .rb-ico { width: 38px; height: 38px; flex-basis: 38px; }
  .role-bar .rb-out { font-size: 12px !important; padding: 0 8px !important; }
}
/* role screens use the full width: no side column */
body.role-ui.door-app #vMain { display: flex !important; flex-direction: column; gap: 18px; }
body.role-ui.door-app .door-side { position: static; }
body.role-ui #vMain > p, body.role-ui #vMain > .row:last-child { align-self: center; }
body.role-ui .admin-tabs { width: 100%; box-sizing: border-box; }
body.role-ui .admin-tabs button svg { width: 24px !important; height: 24px !important; flex: 0 0 24px; display: block; }

/* ===== Staff screens on phones (2026-11-19): layout only, nothing works differently =====
   Big buttons, the main task first (help text moves below it), the main button stays within thumb reach
   above the bottom menu, no sideways scrolling. Tablets and computers (768px and wider) are unchanged. */
@media (max-width: 767px) {
  body.role-ui main.wrap.wide { padding-left: 12px; padding-right: 12px; overflow-x: clip; }
  /* bottom menu: all tabs fit, even five on a small phone (no sideways scrolling in the menu) */
  body.role-ui .admin-tabs { overflow-x: visible; gap: 2px; padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  body.role-ui .admin-tabs button { min-width: 0; padding: 6px 2px; font-size: 11.5px; line-height: 1.15; text-align: center; }
  body.role-ui section.card { padding: 16px 14px; gap: 12px; min-width: 0; }
  body.role-ui section.card h2 { font-size: 22px; line-height: 1.2; }
  /* every button and link-button on a staff screen: at least 52px high, easy to hit */
  body.role-ui #vMain section.card :is(button, .btn) { min-height: 52px; font-size: 17px; }
  body.role-ui #vMain section.card :is(input:not([type="checkbox"]):not([type="radio"]), select) { min-height: 52px; font-size: 18px; }
  body.role-ui #vMain .row > * { min-width: 0; }
  /* forms with one box + one button: the button goes full width under the box */
  body.role-ui :is(#manual, #cardLookup, #fgFind, #lookup, #qWalkin) { flex-direction: column; align-items: stretch; }
  body.role-ui :is(#manual, #cardLookup, #fgFind, #lookup, #qWalkin) > * { flex: 1 1 auto !important; align-self: stretch !important; }
  /* the task first, the explanation after it */
  body.role-ui :is(#tabFront, #tabFace, #tabCard, #tabFloor, #tabVip) > p.small-print { order: 9; }
  body.role-ui #tabVip > a.btn { order: 10; }
  body.role-ui #tabFloor > .row:first-child { flex-direction: column; align-items: stretch !important; }
  body.role-ui #tabFloor > .row:first-child > * { flex: 1 1 auto !important; text-align: left; }
  /* camera buttons: full width */
  body.role-ui :is(#tabScan, #tabFace, #tabFront, #tabVip) > .row { flex-direction: column; align-items: stretch; }
  body.role-ui :is(#tabScan, #tabFace, #tabFront, #tabVip) > .row > button { width: 100%; }
  body.role-ui :is(#camStart, #mfStart, #fgCam, #faceStart) { min-height: 60px !important; font-size: 19px !important; }
  body.role-ui :is(#reader, #fgReader) { max-width: 100% !important; }
  /* the main button sticks just above the bottom menu while the rest scrolls under it */
  body.role-ui :is(#fgGo, #mfMatch, #cardResult .row:has(#cardYes)) { position: sticky; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
  body.role-ui.role-one-screen :is(#fgGo, #mfMatch, #cardResult .row:has(#cardYes)) { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  body.role-ui #fgGo { box-shadow: 0 8px 22px rgba(11, 31, 77, .22); }
  body.role-ui #mfMatch { background: #fff; border-radius: 18px; box-shadow: 0 -6px 22px rgba(11, 31, 77, .14); }
  body.role-ui #cardResult .row:has(#cardYes) { background: var(--card, #fff); padding: 8px 0; flex-direction: column; align-items: stretch; }
  body.role-ui :is(#mfMatch, #cardResult) .row > button { width: 100%; min-height: 60px; font-size: 19px; }
  /* Face match: Yes and Not them side by side would be too narrow; stack them */
  body.role-ui #mfMatch .row { flex-direction: column; align-items: stretch; }

  /* Queue (service counter): what is at my counter and "Call next" first, then the service and counter number */
  body.role-ui #qCurrent { order: 1; } body.role-ui #qCall { order: 2; } body.role-ui #qBox > .row:first-child { order: 3; }
  body.role-ui #qBoard { order: 4; } body.role-ui #qBox > details { order: 5; } body.role-ui #qScreen { order: 6; }
  body.role-ui #qBox > .row:first-child { flex-direction: column; align-items: stretch; }
  body.role-ui #qBox > .row:first-child > label { flex: 1 1 auto !important; }
  body.role-ui #qCurrent .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  body.role-ui #qCurrent .row > button { width: 100%; min-height: 56px; }
  body.role-ui #qCurrent .row > button.good { grid-column: 1 / -1; min-height: 64px; font-size: 20px; }
  body.role-ui #qCall { min-height: 72px; }
  body.role-ui #qBoard > div { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }

  /* Internal GRO tables: one service under the other, big Done, two buttons per row */
  body.role-ui .fl-board { grid-template-columns: 1fr !important; }
  body.role-ui .fl-svc { padding: 12px 10px; }
  body.role-ui .fl-head > b { font-size: 19px; }
  body.role-ui .fl-tools { display: grid; grid-template-columns: 56px auto 56px 1fr; gap: 8px; align-items: center; justify-items: center; }
  body.role-ui .fl-tools button { width: 100%; min-height: 52px !important; font-size: 20px !important; padding: 0 !important; }
  body.role-ui .fl-tools button[data-fl-open] { font-size: 17px !important; }
  body.role-ui .fl-table { padding: 12px; }
  body.role-ui .fl-act { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  body.role-ui .fl-act button { width: 100%; min-height: 52px !important; font-size: 16px !important; padding: 4px 8px !important; }
  body.role-ui .fl-table .fl-act { grid-template-columns: 1fr 1fr; }
  body.role-ui .fl-table .fl-act button.good { grid-column: 1 / -1; min-height: 60px !important; font-size: 19px !important; }
  body.role-ui .fl-next summary { min-height: 48px; display: flex; align-items: center; font-size: 17px; }
  body.role-ui .fl-row { gap: 8px; padding: 10px 0; }

  /* Front GRO: services as big tap rows */
  body.role-ui .fg-person { padding: 14px 12px; }
  body.role-ui .cv-svc { min-height: 56px; }
  body.role-ui #fgOut .fg-person > button { width: 100%; }

  /* Help desk: big rows to open the walk-in and desk forms; PIN boxes side by side stay readable */
  body.role-ui #tabDesk details > summary { min-height: 52px; display: flex; align-items: center; }
  body.role-ui #tabDesk form .row > label { flex: 1 1 0; }
  body.role-ui #tabDesk :is(#deskCard, #walkinDone) .row { flex-direction: column; align-items: stretch; }
  body.role-ui #tabDesk :is(#deskCard, #walkinDone) .row > button { width: 100%; }
  body.role-ui #tabDesk form button[type="submit"] { width: 100%; min-height: 60px; font-size: 19px; }

  /* Scan result: the Next button sits at the bottom, big and white, where the thumb is */
  body.role-ui .result { justify-content: center; overflow-y: auto; padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  body.role-ui .result #rNext, body.role-ui .result #rNext:hover:not(:disabled), body.role-ui .result #rNext:active:not(:disabled) { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: auto; min-width: 0; min-height: 72px; font-size: 24px; background: #fff !important; color: var(--ink, #0B1F4D) !important; border-color: #fff !important; box-shadow: 0 8px 26px rgba(0, 0, 0, .25); }
  body.role-ui .result .r-pass { width: 100%; }
  body.role-ui .result .r-pass button { width: 100%; min-height: 56px; }

  /* "Report a problem": at the end of the page instead of floating over buttons */
  body.role-ui .rp-btn { position: relative !important; right: auto !important; bottom: auto !important; z-index: 1 !important; margin: 0 auto calc(92px + env(safe-area-inset-bottom, 0px)); }
  body.role-ui.role-one-screen .rp-btn { margin-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  body.role-ui main.wrap.wide { padding-bottom: 12px; }
}

/* =====================================================================
   B+ LUMINOUS (Chris's pick, 2026-11-15)
   Pearl background; blue header with a rounded bottom behind the top of
   every screen, cards lift over it; flag-colour halo on the next event,
   the pass and the member card; blue glowing buttons; white tab bar with a
   raised My card button; Manrope. Welcome: retro flag tiles + Rizal.
   ===================================================================== */
body.app {
  --lx-blue: #0E7490; --lx-blue2: #0E7490; --lx-deep: #0E7490; --lx-red: #FF8A7A; --lx-sun: #5BC0EB;
  --lx-ink: #0B2545; --lx-muted: #52646C; --lx-pearl: #F3F8FA; --lx-line: #D7E5EA; --lx-tint: #E0F2F7;
  --lx-panel: radial-gradient(circle at 104% -6%, rgba(91, 192, 235, 0.36), transparent 34%), linear-gradient(175deg, #0E7490, #0E7490 62%, #0E7490);
  --lx-halo: linear-gradient(120deg, #0E7490, #FF8A7A 55%, #5BC0EB);
  --lx-shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 10px 30px rgba(11, 37, 69, 0.08);
  --lx-glow: 0 12px 26px rgba(14, 116, 144, 0.32);
  --lx-ph: 104px;
  font-family: 'Manrope', 'Figtree', system-ui, -apple-system, sans-serif;
  background: var(--lx-pearl); color: var(--lx-ink);
}
body.app .brand-name { font-family: 'Bricolage Grotesque', 'Manrope', sans-serif; }
body.app h1, body.app h2, body.app h3, body.app .welcome-title, body.app .screen-title { color: var(--lx-ink); font-weight: 800; letter-spacing: -0.02em; }
body.app .small-print, body.app .hint { color: var(--lx-muted); }

/* Blue header behind the top of the screen (scrolls with the page) */
body.app .wrap { position: relative; isolation: isolate; }
body.app .wrap::before { content: ""; position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  height: var(--lx-h, calc(var(--nav-h) + var(--safe-t) + var(--lx-ph))); background: var(--lx-panel); border-radius: 0 0 38px 38px; pointer-events: none; }
body.app[data-view="vWelcome"] .wrap::before, body.app[data-view="help"] .wrap::before { display: none; }
body.app[data-view="vHome"] { --lx-ph: 78px; }
body.app[data-view="vEvents"] { --lx-ph: 124px; }
body.app[data-view="vCard"] { --lx-ph: 112px; }
body.app[data-view="vOfficials"] { --lx-ph: 92px; }
body.app[data-view="vAccount"] { --lx-ph: 122px; }
body.app[data-view="vPast"], body.app[data-view="vPastEvent"] { --lx-ph: 60px; }
body.app[data-view="vPass"] { --lx-ph: 110px; }

/* Top bar: see-through over the blue header, solid blue once you scroll */
body.app .navbar { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.app.lx-scrolled:not([data-view="vWelcome"]) .navbar { background: #0E7490; box-shadow: 0 6px 20px rgba(0, 30, 90, 0.25); }
body.app .navbar::after { display: none; }
body.app[data-view="vPass"] .navbar { background: transparent; }
body.app.lx-scrolled[data-view="vPass"] .navbar { background: #0E7490; }
body.app[data-view="vPass"] .nav-left, body.app[data-view="vPass"] .nav-right { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; max-width: none; }
body.app .demo-pill, body.app .demo-pill:hover:not(:disabled) { background: var(--lx-sun) !important; color: #3D2F00 !important; }

/* Titles of the main tabs sit in white on the blue header */
body.app #vEvents > .screen-title, body.app #vCard > .screen-title, body.app #vOfficials > .screen-title, body.app #vAccount > .screen-title,
body.app #vPast > .screen-title, body.app #vPastEvent > .screen-title {
  display: block; margin: 0 4px; padding: 0; background: none; border-radius: 0; color: #fff; font-size: 30px; line-height: 1.1; }
body.app #vPastEvent > #peWhen { color: rgba(255, 255, 255, 0.85); margin: -6px 4px 6px; }
body.app #vCard > .screen-title + .sec-head h2, body.app #vCard > .screen-title + .sec-head .small-print { color: #fff; }

/* Home greeting and Account profile: on the blue header, no panel of their own */
body.app .hello, body.app .acct-profile { margin: 0; padding: 2px 4px 6px; background: none; border-radius: 0; }
body.app .hello-sub, body.app .acct-profile small { color: rgba(255, 255, 255, 0.85); font-weight: 600; }
body.app .hello h1 { color: #fff; font-size: 30px; }
body.app .acct-profile b { color: #fff; }
body.app .avatar, body.app button.avatar:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18) !important; color: #fff !important; border: 2.5px solid var(--lx-sun) !important; box-shadow: 0 0 18px rgba(91, 192, 235, 0.45); }
body.app .acct-profile .avatar { background: rgba(255, 255, 255, 0.18) !important; color: #fff !important; }
body.app #vAccount { background: transparent; box-shadow: none; padding: 0; overflow: visible; }

/* Forms: a white card that lifts over the blue header, with its title on the header */
body.app main > :is(#vLogin, #vVerify, #vConsent, #vDoor, #vFeedback, #vRegister) { position: relative; overflow: visible; margin-top: 62px;
  padding: 22px 18px !important; background: #fff !important; border-radius: 24px !important; box-shadow: var(--lx-shadow) !important; }
body.app[data-view="vLogin"] { --lx-ph: 178px; }
body.app[data-view="vRegister"] { --lx-ph: 196px; }
body.app[data-view="vLogin"] .demo-banner, body.app[data-view="vRegister"] .demo-banner { box-shadow: 0 10px 24px rgba(0, 20, 80, 0.25); }
body.app main > :is(#vLogin, #vVerify, #vConsent, #vDoor, #vFeedback) > h2:first-child { position: absolute; left: 4px; right: 4px; top: auto; bottom: calc(100% + 12px); margin: 0; color: #fff; font-size: 25px; line-height: 1.12; }
body.app main > #vRegister { margin-top: 100px; }
body.app #vRegister > .stepper { position: absolute; left: 4px; right: 4px; top: -84px; margin: 0; color: #fff; }
body.app #vRegister .stepper-label, body.app #vRegister .stepper-names span { color: rgba(255, 255, 255, 0.92); }
body.app #vRegister .stepper-bar i { background: rgba(255, 255, 255, 0.24); }
body.app #vRegister .stepper-bar i.on { background: repeating-linear-gradient(45deg, #5BC0EB 0 8px, #FFE680 8px 16px); box-shadow: 0 0 10px rgba(91, 192, 235, 0.6); }
body.app #vVerify .card { background: var(--lx-pearl); box-shadow: none; }

/* Surfaces: white, rounded, soft shadow */
body.app .card, body.app .steps-list, body.app .group, body.app #evEmpty, body.app .tile, body.app .notice, body.app #noticeList > *,
body.app .news-card, body.app .open-row, body.app .past-btn, body.app .pass-banner {
  background: #fff; border: 0; border-radius: 22px; box-shadow: var(--lx-shadow); }
body.app main > .card:not(#eventHead):not(#vAccount):not(#vWelcome) .card { background: var(--lx-pearl); box-shadow: none; }
body.app .open-row:nth-child(even) { background: #fff; }
body.app .group-label, body.app .sec-head h2 { color: var(--lx-muted); font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
body.app .row-ico { border-radius: 12px; }

/* Flag-colour halo on the things that matter */
body.app .ev-card2:not(.past), body.app .pass, body.app .member-card, body.app .off-reserved {
  border: 2px solid transparent !important; background: linear-gradient(#fff, #fff) padding-box, var(--lx-halo) border-box !important;
  box-shadow: 0 14px 40px rgba(14, 116, 144, 0.2), 0 6px 26px rgba(255, 138, 122, 0.12); }

/* Buttons: blue with a soft glow; second buttons white with a blue edge */
body.app button:not(.secondary):not(.link):not(.bad):not(.row):not(.tile):not(.avatar):not(.nav-back):not(.demo-pill):not(#langBtn):not(.rp-btn):not(.news-more):not(.ev-cal-btn):not(.ph-close):not(.promo-x),
body.app .btn:not(.secondary), body.app .ev-show, body.app .join-pill {
  background: linear-gradient(135deg, var(--lx-blue2), var(--lx-blue)); border-color: transparent; color: #fff; box-shadow: var(--lx-glow); }
body.app button:not(.secondary):not(.link):not(.bad):not(.row):not(.tile):not(.avatar):not(.nav-back):not(.demo-pill):not(#langBtn):not(.rp-btn):not(.news-more):not(.ev-cal-btn):not(.ph-close):not(.promo-x):active:not(:disabled) {
  background: linear-gradient(135deg, #1A4FC4, #00307F); }
body.app #vfWaOpen { background: linear-gradient(135deg, #1FBF6A, #0E9A50) !important; box-shadow: 0 12px 26px rgba(14, 154, 80, 0.32) !important; }
body.app button.secondary, body.app .btn.secondary, body.app button.secondary:hover:not(:disabled), body.app .btn.secondary:hover {
  background: #fff; color: var(--lx-blue); border: 1.5px solid #BFCCEE; box-shadow: none; }
body.app button.link { color: var(--lx-blue); }
body.app .join-pill { min-height: 44px; border-radius: 14px; padding: 0 18px; }

/* Fields */
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.app select, body.app textarea {
  border: 1.5px solid #D5DCEE !important; border-radius: 16px; background: #fff; color: var(--lx-ink); }
body.app input:focus, body.app select:focus, body.app textarea:focus { border-color: var(--lx-blue2) !important; box-shadow: 0 0 0 4px rgba(14, 116, 144, 0.15), 0 6px 18px rgba(14, 116, 144, 0.12); }
body.app label { color: var(--lx-ink); }

/* Home: next event card */
body.app .ev-card2 { color: var(--lx-ink); }
body.app .ev-pills .pill.ok { background: #F0FDF4; color: #00602F; }
body.app .ev-pills .pill.soft { background: var(--lx-tint); color: var(--lx-blue); }
body.app .ev-cd { background: var(--lx-tint); color: var(--lx-ink); }
body.app .ev-cd .ev-count { color: var(--lx-blue) !important; font-weight: 800; }
body.app .ev-show { border-radius: 16px; }
body.app .pass-banner { color: var(--lx-ink); }

/* Events tab: segment switch on the blue header */
body.app #vEvents .seg { background: rgba(255, 255, 255, 0.16); }
body.app #vEvents .seg button { color: #fff !important; }
body.app #vEvents .seg button[aria-selected="true"] { background: #fff !important; color: var(--lx-blue) !important; box-shadow: 0 6px 18px rgba(0, 20, 80, 0.3); }

/* Embassy tab: hotlines card in red */
body.app #vOfficials > a.tile { background: linear-gradient(135deg, #D81B30, #A50E1F); color: #fff; box-shadow: 0 14px 30px rgba(255, 138, 122, 0.3); }
body.app #vOfficials > a.tile small { color: #FFE3E8; }
body.app #vOfficials > a.tile .tile-ico { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* Event Pass: pearl background, white ticket with the flag halo */
body.app[data-view="vPass"]::before { display: none; }
body.app[data-view="vPass"] { background: var(--lx-pearl); }
body.app .pass { color: var(--lx-ink); }
body.app .pass .label { color: var(--lx-blue); }
body.app .pass .live { color: var(--lx-blue); }
body.app .pass .dot { background: #00A35A; box-shadow: 0 0 10px rgba(0, 163, 90, 0.8); }
body.app[data-view="vPass"] #vPass > .small-print, body.app[data-view="vPass"] #vPass > .row, body.app[data-view="vPass"] #vPass > .leave-box { background: none; padding: 0; }

/* Member card: white with the flag halo */
body.app .member-card { color: var(--lx-ink); }
body.app .member-card, body.app .member-card * { text-shadow: none; }
body.app .mc-top { color: var(--lx-blue); font-weight: 800; }
body.app .mc-top span:last-child { color: var(--lx-red); }
body.app .member-card .mc-name { color: var(--lx-ink); }
body.app .member-card .mc-code, body.app .member-card .mc-since, body.app .member-card .mc-note { color: var(--lx-muted); }

/* Feedback faces */
body.app .rating button { background: var(--lx-pearl) !important; border: 0 !important; border-radius: 18px; box-shadow: none !important; color: var(--lx-ink) !important; }
body.app .rating button[aria-checked="true"] { background: #fff !important; color: var(--lx-blue) !important; box-shadow: 0 0 0 2px var(--lx-blue2), 0 8px 20px rgba(14, 116, 144, 0.3) !important; }

/* Tab bar: white, floating, with a raised round My card button */
body.app .tabbar { background: rgba(255, 255, 255, 0.97); border: 1px solid #E4E8F5; border-radius: 26px; overflow: visible; box-shadow: 0 10px 30px rgba(11, 37, 69, 0.14); }
body.app .tabbar button:not([aria-current]), body.app .tabbar button:not([aria-current]):hover:not(:disabled) { color: #5A6688 !important; background: none !important; }
body.app .tabbar [aria-current], body.app .tabbar [aria-current]:hover:not(:disabled) { background: none !important; color: var(--lx-blue) !important; font-weight: 800; }
body.app .tabbar button { position: relative; box-shadow: none !important; }
body.app .tabbar [data-tab="card"] .ti { display: grid; place-items: center; width: 60px; height: 60px; margin-top: -32px; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, #0E7490, #0E7490); box-shadow: 0 12px 26px rgba(14, 116, 144, 0.5), 0 0 0 6px var(--lx-pearl); }
body.app .tabbar [data-tab="card"] .ti svg { width: 28px; height: 28px; }
body.app .tabbar [data-tab="card"][aria-current] .ti { box-shadow: 0 12px 26px rgba(14, 116, 144, 0.5), 0 0 0 6px var(--lx-pearl), 0 0 0 9px var(--lx-sun); }

/* Welcome: retro flag tiles with Rizal, then the text on pearl */
body.app .ff-hero { display: block; position: relative; padding: 0; height: calc(min(470px, 55vh) + var(--safe-t)); background: #0E7490; border-radius: 0 0 44px 44px; overflow: hidden; }
body.app .ff-hero .ff-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
body.app .ff-sheet { margin-top: 0; padding-top: 24px; background: transparent; border-radius: 0; }
body.app .ff-sheet .welcome-title { font-size: 32px; line-height: 1.1; }
body.app .ff-sheet .welcome-sub { color: var(--lx-muted); font-size: 17px; }
body.app .ff-sheet .steps-list { background: #fff; border-radius: 22px; padding: 6px 16px; box-shadow: var(--lx-shadow); }
body.app .ff-sheet .step-row .num { background: var(--lx-tint); color: var(--lx-blue); }
body.app .ff-sheet .step-row .num.green { background: #F0FDF4; color: #16A34A; }
body.app .welcome-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
body.app #vRegister .stepper-label { display: block; color: #fff !important; font-size: 15px; font-weight: 800; }
body.app #vRegister .stepper-names span { color: rgba(255, 255, 255, 0.75) !important; }
body.app[data-view="help"] .navbar { background: #0E7490; }
body.app #vRegister[data-step="1"] .stepper-names span:nth-child(1), body.app #vRegister[data-step="2"] .stepper-names span:nth-child(2), body.app #vRegister[data-step="3"] .stepper-names span:nth-child(3) { color: #fff !important; }
.staff-id { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 800; letter-spacing: .06em; background: #EEF2FA; border-radius: 8px; padding: 1px 7px; }
.staff-id.big { display: block; text-align: center; font-size: 40px; padding: 14px; margin: 6px 0; }
.role-req { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }

/* B+ fixes after the first iPhone test (2026-11-15) */
/* Tab bar docked to the bottom edge (nothing shows under it) and all labels on one line */
body.app .tabbar { left: 0; right: 0; bottom: 0; width: auto; transform: none; border-radius: 26px 26px 0 0; border-bottom: 0;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 24px rgba(11, 37, 69, 0.1); }
body.app .tabbar button { justify-content: flex-end; min-height: 58px; padding-bottom: 6px; }
body.app.has-tabs .wrap { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
/* Date fields never stick out of their card on iPhone */
body.app input[type="date"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left; }
body.app input[type="date"]::-webkit-date-and-time-value { text-align: left; }
/* Content under the blue header starts clearly below it (nothing half on, half off) */
body.app .hello, body.app #vEvents .seg, body.app #vCard > .sec-head, body.app #vOfficials > .screen-title, body.app #vAccount .acct-profile,
body.app #vPast > .screen-title, body.app #vPastEvent > #peWhen { margin-bottom: 26px; }
html:has(body.app) { background: #F3F8FA; }

/* ===== Groups (organizations with weekly sessions, e.g. pickleball) ===== */
.grp-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; border: 1px solid var(--line) !important; border-radius: 20px !important;
  background: #fff !important; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(11, 31, 77, .06); min-height: 0 !important; font-weight: 500; }
.grp-ico { font-size: 30px; width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; background: var(--tint, #EEF2FA); border-radius: 16px; }
.grp-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.grp-txt b { font-size: 18px; }
.grp-txt small { color: var(--muted); font-size: 14px; }
.grp-next { flex: 0 0 auto; text-align: center; display: flex; flex-direction: column; }
.grp-next b { font-size: 20px; color: var(--ph-blue, #0038A8); }
.grp-next small { color: var(--muted); font-size: 12px; }
.grp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grp-head > b { font-size: 24px; flex: 1 1 100%; }
.grp-head p { margin: 0; flex: 1 1 100%; }
.grp-session { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 3px rgba(11, 31, 77, .06); }
.grp-session.cancelled { opacity: .7; }
.grp-session header { display: flex; flex-direction: column; }
.grp-session header b { font-size: 20px; }
.grp-session header span { color: var(--muted); }
.grp-bar { height: 10px; border-radius: 99px; background: #E6EBF5; overflow: hidden; }
.grp-bar i { display: block; height: 100%; background: var(--good, #077A43); border-radius: 99px; }
.grp-count { margin: 0; font-size: 15px; color: var(--muted); }
.grp-count b { color: var(--ink); font-size: 18px; }
.grp-state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.grp-mine { font-weight: 800; font-size: 17px; padding: 8px 12px; border-radius: 12px; }
.grp-mine.ok { background: #E3F3EA; color: #077A43; }
.grp-mine.wait { background: #EEF2FA; color: #0038A8; }
.grp-mine.offer { background: #FFF4D6; color: #8A5A00; }
.grp-note { color: var(--muted); }
.grp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grp-actions button { flex: 1 1 160px; }
.grp-list summary { font-weight: 800; cursor: pointer; padding: 4px 0; }
.grp-roster { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.grp-roster li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; background: #F3F6FC; font-size: 15px; min-width: 0; flex-wrap: wrap; }
.grp-roster li.me { background: #E3F3EA; font-weight: 800; }
.grp-roster li.empty { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.grp-roster .n { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--muted); min-width: 20px; }
.grp-roster .nm { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.grp-roster .here { color: #077A43; font-weight: 800; }
.grp-roster .grp-full { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.grp-nick { display: flex; flex-direction: column; gap: 10px; width: 100%; }
/* Payment dot per player (2026-11-17): red = not paid, orange = confirming, green = paid */
.pay-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; background: #D92D20; box-shadow: 0 0 0 2px rgba(255,255,255,.85); vertical-align: middle; }
.pay-dot.confirming { background: #F79009; }
.pay-dot.paid { background: #12B76A; }
.pay-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.grp-pay { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 6px 10px; border-radius: 12px; font-weight: 700; font-size: 14px; background: #FEECEB; color: #B42318; }
.grp-pay.confirming { background: #FFF4E5; color: #B54708; }
.grp-pay.paid { background: #E3F3EA; color: #077A43; }
.grp-roster .org-act { display: flex; flex-wrap: wrap; gap: 4px 12px; flex: 1 1 100%; }
.grp-roster .org-act button { white-space: nowrap; }
.grp-wl-h { margin: 10px 0 0; font-weight: 800; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.grp-add { display: flex; gap: 8px; margin-top: 10px; }
.grp-add input { flex: 1 1 auto; min-width: 0; }
.grp-rules summary { font-weight: 800; cursor: pointer; }
.grp-rules ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.grp-ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.grp-ico:has(img) { background: transparent; overflow: hidden; }
.grp-logo { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; flex: 0 0 96px; box-shadow: 0 4px 14px rgba(11, 31, 77, .15); }

/* One header height on every main tab (same as Home): Events' Upcoming/Past/Groups switch sits below the blue,
   Account shows the profile (avatar + name) in the header like Home's greeting. */
body.app #vEvents > .screen-title { margin-bottom: 26px; }
body.app #vEvents .seg { grid-template-columns: repeat(3, 1fr); background: #E3E8F3; margin-bottom: 0; }
body.app #vEvents .seg button { color: var(--ink, #0B1D26) !important; }
body.app #vEvents .seg button[aria-selected="true"] { background: #fff !important; color: var(--lx-blue, #0E7490) !important; box-shadow: 0 1px 4px rgba(11, 37, 69, 0.14); }
body.app #vAccount > .screen-title { display: none; }
body.app #vAccount .acct-profile .avatar { width: 52px; height: 52px; font-size: 17px; }
body.app #vAccount .acct-profile b { font-size: 22px; }
body.app #vEvents .seg button { font-size: 14px; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
/* Organization card: the logo fills the card behind the text */
.grp-card.has-logo { position: relative; overflow: hidden; min-height: 210px !important; align-items: flex-end; padding: 18px !important; border: 0 !important;
  background: linear-gradient(90deg, #0B1F4D 0%, #0B1F4D 40%, rgba(11, 31, 77, .78) 50%, rgba(11, 31, 77, .3) 72%, rgba(11, 31, 77, 0) 100%),
    linear-gradient(0deg, rgba(11, 31, 77, .5) 0%, rgba(11, 31, 77, 0) 45%),
    var(--logo) right center / auto 100% no-repeat, #0B1F4D !important; color: #fff !important; isolation: isolate; }
.grp-card.has-logo .grp-shade { display: none !important; }
.grp-card.has-logo .grp-shade { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none;
  background: linear-gradient(90deg, rgba(11, 31, 77, .96) 0%, rgba(11, 31, 77, .82) 38%, rgba(11, 31, 77, .25) 70%, rgba(11, 31, 77, 0) 100%),
    linear-gradient(0deg, rgba(11, 31, 77, .55) 0%, rgba(11, 31, 77, 0) 45%); }
.grp-card.has-logo > .grp-txt { position: relative; z-index: 1; }
.grp-card.has-logo { justify-content: flex-start; text-align: left; }
.grp-card.has-logo .grp-txt { margin: 0; padding: 0; }
.grp-card.has-logo .grp-txt { max-width: 72%; gap: 4px; }
.grp-card.has-logo .grp-txt b { font-size: 21px; line-height: 1.2; color: #fff; }
.grp-card.has-logo .grp-txt small { color: rgba(255, 255, 255, .9); }
.grp-kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #FCD116; }
.grp-card:not(.has-logo) .grp-kicker { color: var(--ph-blue, #0038A8); }
.grp-pill { align-self: flex-start; margin-top: 6px; padding: 5px 10px; border-radius: 99px; background: #fff; color: #0B1F4D; font-size: 13px; font-weight: 700; }
.grp-pill b { font-size: 14px; }
.grp-card.has-logo .grp-pill b { color: #0038A8; }

/* Events tab, layout 12 (like Meetup): Organizations row, event cards with picture, Past as one row. Header height unchanged. */
body.app #vEvents .seg { display: none; }
body.app #vEvents .ev-back { align-self: flex-start; color: var(--lx-blue); font-weight: 800; padding: 4px 2px; min-height: 40px; }
body.app #vEvents .seg-h { margin: 8px 2px 0; font-size: 19px; font-weight: 800; color: var(--lx-ink); letter-spacing: -0.01em; text-transform: none; }
body.app #vEvents .ev-sec { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
body.app #vEvents .ev-sec .seg-h { margin-top: 0; }
body.app #vEvents .ev-sec .link { color: var(--lx-blue); font-weight: 800; min-height: 0; padding: 4px; }
body.app #vEvents .ev-sub { margin: -6px 2px 0; font-size: 14px; color: var(--lx-muted); }
.org-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 4px 20px 14px; scrollbar-width: none; }
.org-row::-webkit-scrollbar { display: none; }
body.app .org-mini { flex: none; width: 168px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; text-align: left;
  background: #fff !important; color: var(--lx-ink) !important; border: 0 !important; border-radius: 20px; box-shadow: var(--lx-shadow) !important; }
.org-mini .om-logo { width: 60px; height: 60px; border-radius: 16px; background: #EAF0FF center / cover no-repeat; display: grid; place-items: center; font-size: 26px; box-shadow: 0 6px 16px rgba(11, 26, 63, 0.15); }
.org-mini b { font-size: 15px; line-height: 1.25; font-weight: 800; }
.org-mini small { font-size: 13px; color: var(--lx-muted); font-weight: 600; line-height: 1.3; }
.org-mini .om-next { color: #00602F; }
.org-mini .om-btn { align-self: stretch; margin-top: auto; text-align: center; padding: 9px 0; border-radius: 12px; font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--lx-blue2, #1F5BE0), var(--lx-blue, #0038A8)); box-shadow: 0 8px 18px rgba(0, 56, 168, 0.3); }
.ev-m { background: #fff; border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--lx-shadow, 0 10px 30px rgba(11, 26, 63, 0.08)); }
.ev-m-top { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.ev-m-img { width: 72px; height: 72px; flex: none; border-radius: 16px; background: #0038A8 var(--bg) center / cover no-repeat; }
.ev-m-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-m-when { font-size: 13px; font-weight: 800; color: #CE1126; letter-spacing: 0.02em; }
.ev-m-txt b { font-size: 17px; line-height: 1.25; color: var(--lx-ink, #0B1A3F); }
.ev-m-txt small { font-size: 14px; color: var(--lx-muted, #4A5778); }
.ev-m-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid #EEF1F8; }
.ev-m-note { font-size: 14px; font-weight: 700; color: var(--lx-muted, #4A5778); }
.ev-m-note.live { color: #00602F; }
/* An event you joined: blue outline and a green "You're going" tag */
.ev-m.mine { box-shadow: inset 0 0 0 2px #0038A8, var(--lx-shadow, 0 10px 30px rgba(11, 26, 63, 0.08)); }
.ev-m-going { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: #E3F6EA; color: #00602F; font-size: 14px; font-weight: 800; }
body.app .ev-m-btn { min-height: 42px; padding: 0 22px; border-radius: 14px; font-size: 15px; }
body.app .ev-past-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; margin-top: 4px;
  background: #fff !important; color: var(--lx-ink) !important; border: 0 !important; border-radius: 20px; box-shadow: var(--lx-shadow) !important; }
.ev-past-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.ev-past-row b { font-size: 16px; }
.ev-past-row small { font-size: 13px; color: var(--lx-muted, #4A5778); }
.ev-past-row .row-ico { width: 40px; height: 40px; border-radius: 12px; background: #F1F4FC; display: grid; place-items: center; }
/* Organizations row: the logo fills the top of each card */
/* Organizations row: logo icons only; tap one to open that organization */
body.app .org-mini.org-icon { width: 64px; height: 64px; min-height: 0; padding: 0; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
  background: #E0F2F7 var(--pic, none) center / cover no-repeat !important; font-size: 28px; box-shadow: 0 2px 8px rgba(11, 37, 69, 0.08) !important; }
/* Events & Activities: Upcoming | Past switch under the heading */
body.app #vEvents .ev-subseg { display: grid; grid-template-columns: 1fr 1fr; background: #E3E8F3; margin: 0; }
body.app #vEvents .ev-subseg button { color: var(--lx-ink, #0B1D26) !important; font-size: 15px; }
body.app #vEvents .ev-subseg button[aria-selected="true"] { background: #fff !important; color: var(--lx-blue, #0E7490) !important; box-shadow: 0 1px 4px rgba(11, 37, 69, .14); }
.ev-sublist { display: flex; flex-direction: column; gap: 10px; }
/* Organization page: date picker */
.gd-days { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 6px; padding: 4px 2px 10px; background: none !important; scrollbar-width: none; scroll-snap-type: x proximity; }
.gd-days::-webkit-scrollbar { display: none; }
body.app .gd-day { flex: none; width: 64px; min-height: 0; padding: 8px 4px 10px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 1px; position: relative;
  scroll-snap-align: start; background: #fff !important; color: var(--ink) !important; border: 1px solid var(--line) !important; box-shadow: none !important; font-weight: 600; }
body.app .gd-day small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
body.app .gd-day b { font-size: 22px; line-height: 1.1; }
body.app .gd-day em { font-style: normal; font-size: 11px; margin-top: 4px; color: #0B7A3B; font-weight: 700; }
body.app .gd-day.full em { color: #C8102E; }
body.app .gd-day i { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #0B7A3B; }
body.app .gd-day[aria-selected="true"] { background: var(--brand, #0E7490) !important; color: #fff !important; border-color: transparent !important; }
body.app .gd-day[aria-selected="true"] small, body.app .gd-day[aria-selected="true"] em { color: rgba(255, 255, 255, .85); }
body.app .gd-day[aria-selected="true"] i { background: #FFD43B; }
.gd-when { margin: 4px 0 10px; font-weight: 700; }
div.grp-card { cursor: default; }
/* Member app: the top bar (logo, DEMO, EN·TL) scrolls away with the page on every tab instead of staying pinned.
   Nothing is drawn behind the clock/battery: the page scrolls up underneath it. */
body.app .navbar { position: absolute !important; }
/* Because it scrolls away, the top bar stays see-through over the blue header: no solid blue band or shadow once you scroll.
   (Selector matches the older lx-scrolled rule's strength so this one wins.) */
body.app.lx-scrolled:not([data-view="vWelcome"]) .navbar, body.app.lx-scrolled[data-view="vPass"] .navbar { background: transparent; box-shadow: none; }
/* Our own light blur under the phone clock, so every iPhone gets it (not only iOS 26 and newer, which add their own).
   Height follows the clock area, so it is 0 in a normal browser tab. */
body.app::after { content: ""; position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: var(--safe-t); pointer-events: none;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); background: linear-gradient(180deg, rgba(246, 248, 253, 0.35), rgba(246, 248, 253, 0));
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent); }
/* Home greeting (News) and Account profile share one header layout:
   same circle, big line on top, small line under it, same sizes and spacing. */
body.app .hello, body.app #vAccount .acct-profile { gap: 14px; align-items: center; }
body.app .hello-text { display: flex; flex-direction: column-reverse; }
body.app .hello h1, body.app #vAccount .acct-profile b { font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
body.app .hello-sub, body.app #vAccount .acct-profile small { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; }
body.app .hello .avatar, body.app #vAccount .acct-profile .avatar { width: 52px; height: 52px; font-size: 17px; }
/* Member card: the member's face (cut from their Civil ID photo) next to the name; initials until a photo is found. */
.mc-id { display: flex; align-items: center; gap: 10px; }
body.app .member-card .mc-code { white-space: nowrap; font-size: 13px; letter-spacing: 0.04em; }
.mc-id-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mc-face { flex: none; display: grid; place-items: center; width: 46px; height: 58px; border-radius: 9px; overflow: hidden;
  background: #E3E8F3; color: var(--lx-blue, #0038A8); font-weight: 800; font-size: 16px; }
.mc-face.has-photo { background: #fff; box-shadow: 0 0 0 1px rgba(11, 31, 77, 0.12); }
.mc-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media print {
  .member-card .mc-face { width: 12mm; height: 15mm; border-radius: 2mm; font-size: 9pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .member-card .mc-id { gap: 3mm; }
}

/* Family on the pass (2026-11-17): who's coming, with their face from the Civil ID */
.fam-pick { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.fam-row { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.fam-face { flex: none; width: 52px; height: 65px; border-radius: 10px; overflow: hidden; background: var(--tint); display: grid; place-items: center; font-weight: 800; color: var(--brand); }
.fam-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fam-who { flex: 1 1 auto; min-width: 0; }
.fam-who > span { display: flex; flex-direction: column; gap: 2px; }
.fam-who small { color: var(--muted); font-weight: 500; }
.fam-who .present { font-size: 15px; }
.fam-acts { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.fam-acts button.link { min-height: 36px; font-size: 13px; padding: 2px 4px; }
.fam-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.fam-form h4 { margin: 0; }

/* Staff scan: holder + family faces (2026-11-17) */
.r-people { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 560px; max-height: 46vh; overflow-y: auto; }
.r-person { margin: 0; width: 120px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.r-person.holder { width: 160px; }
.r-face { width: 96px; height: 120px; border-radius: 14px; border: 4px solid #fff; background: rgba(255, 255, 255, 0.18); overflow: hidden;
  display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; }
.r-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.r-face.card { width: 150px; height: 96px; }
.r-face.card img { object-fit: contain; background: #fff; }
.r-person figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 15px; line-height: 1.2; }
.r-person figcaption small { font-size: 13px; opacity: 0.9; }
.r-person.out .r-face { opacity: 0.45; }
.result .r-person button { min-width: 0; min-height: 40px; padding: 6px 12px; font-size: 14px; margin-top: 4px; }
@media (max-width: 480px) {
  .r-person { width: 100px; } .r-person.holder { width: 136px; }
  .r-face { width: 80px; height: 100px; font-size: 24px; } .r-face.card { width: 128px; height: 82px; }
}

/* Caravan: missed number (2026-11-17) */
.q-ticket.missed { background: #FFF1E0; border: 2px solid var(--warn); }
.q-ticket.missed .q-k { color: #8A4B00; }
.q-ticket.missed > b { font-size: 36px; opacity: 0.7; }

/* Admin attendees: one line per service (2026-11-17) */
.svc-line { white-space: nowrap; font-size: 14px; line-height: 1.5; }

/* The big event banner shows only on that event's own screens, not on the main tabs (2026-11-17) */
#eventHead.off-tab { display: none !important; }
/* Events tab, Today row: big picture cards like the event banner; swipe when there is more than one */
.today-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 4px 20px 14px; scrollbar-width: none; }
.today-row::-webkit-scrollbar { display: none; }
.today-card { flex: 0 0 100%; scroll-snap-align: center; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 6px;
  min-height: 250px; padding: 18px; border-radius: 26px; color: #fff; text-decoration: none; background: #0038A8; box-shadow: var(--lx-shadow, 0 10px 30px rgba(11, 26, 63, 0.08)); }
.today-row.many .today-card { flex-basis: 86%; }
.today-card::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--bg) center / cover no-repeat; }
.today-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 25, 80, 0.35) 0%, rgba(0, 25, 80, 0.7) 45%, rgba(0, 25, 80, 0.92) 100%); }
.today-card .ev-hero-top { margin-bottom: auto; }
.today-card .tc-kicker { margin-top: 14px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--sun, #FCD116); }
.today-card .tc-name { font-size: 22px; line-height: 1.2; font-weight: 800; color: #fff; }
.today-card .tc-when { font-size: 15px; font-weight: 600; }
.today-card .tc-venue { font-size: 14px; opacity: 0.85; }
.today-card .tc-going { align-self: flex-start; margin-top: 4px; padding: 6px 12px; border-radius: 999px; background: #E3F6EA; color: #00602F; font-size: 14px; font-weight: 800; }

/* Events tab: stacked sections (Events, Activities, Organizations), each heading with its own coloured icon (2026-11-17) */
body.app #vEvents .sec-h { display: flex; align-items: center; gap: 10px; }
.sec-i { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; }
.sec-i svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sec-i.blue { background: #E3ECFB; color: #0038A8; }
.sec-i.green { background: #E3F6EA; color: #00602F; }
.sec-i.amber { background: #FDF1D6; color: #8A5A00; }
.act-list { display: flex; flex-direction: column; gap: 10px; }
body.app .act-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: left; border: 0 !important; border-radius: 20px;
  background: #fff !important; color: var(--lx-ink) !important; box-shadow: var(--lx-shadow, 0 10px 30px rgba(11, 37, 69, 0.08)) !important; min-height: 0; }
.act-pic { flex: none; width: 56px; height: 56px; border-radius: 16px; background: #F1F4FC var(--pic) center / cover no-repeat; display: grid; place-items: center; }
.act-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.act-txt b { font-size: 16px; font-weight: 800; }
.act-txt small { font-size: 13px; color: var(--lx-muted, #4A5778); font-weight: 500; }
.act-next { align-self: flex-start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: #E3F6EA; color: #00602F; font-size: 12px; font-weight: 800; }
.act-go { flex: none; font-size: 22px; color: var(--lx-muted, #4A5778); }

/* ===== Redesign (2026-11-17): lessons from the saved UI/UX videos ===== */
/* Events: photo first, text underneath; filter chips; count */
body.app #vEvents .ev-m-top { flex-direction: column; align-items: stretch; gap: 10px; }
body.app #vEvents .ev-m-img { width: 100%; height: 150px; border-radius: 16px; }
body.app #vEvents .ev-count-n { font-weight: 700; color: var(--lx-muted, #52646C); }
.ev-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 2px 0 4px; }
.ev-chips::-webkit-scrollbar { display: none; }
body.app .ev-chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: #fff !important; color: var(--lx-ink, #0B1D26) !important; border: 1px solid #DCE3F2 !important; box-shadow: none !important; }
body.app .ev-chip[aria-pressed="true"] { background: #E3ECFB !important; color: #0E7490 !important; border-color: #0E7490 !important; }
/* News: blue shortcut when an event you joined is on now */
.pass-banner.live { background: #0038A8; color: #fff; }
.pass-banner.live .lb-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; }
.pass-banner.live .lb-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.pass-banner.live > span:nth-child(2) { flex: 1; min-width: 0; }
body.app .pass-banner.live { background: #0E7490 !important; color: #fff !important; }
/* My card: events as compact rows under the card */
body.app #evRail { display: flex; flex-direction: column; gap: 10px; overflow: visible; margin: 0; padding: 0; }
.ev-line-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: #fff; color: var(--lx-ink, #0B1A3F); text-decoration: none;
  box-shadow: var(--lx-shadow, 0 10px 30px rgba(11, 26, 63, 0.08)); }
.ev-line-row.past { opacity: 0.7; }
.ev-line-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #E3ECFB; color: #0038A8; display: grid; place-items: center; }
.ev-line-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ev-line-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ev-line-t b { font-size: 16px; font-weight: 800; line-height: 1.25; }
.ev-line-t small { font-size: 13px; color: var(--lx-muted, #4A5778); }
.ev-line-t .pill { margin-top: 4px; }
.ev-line-go { flex: none; font-size: 22px; color: var(--lx-muted, #4A5778); }
/* Event screen: the ticked family stand out */
.fam-row:has(input:checked) { border-color: #0038A8 !important; background: #EEF3FF !important; box-shadow: inset 0 0 0 1px #0038A8; }
/* Embassy tab: officials as a tidy list, grouped by office */
body.app .off-sec .off-people { display: flex; flex-direction: column; gap: 0; padding: 4px 12px 8px; }
body.app .off-sec .off-person { flex-direction: row; align-items: center; text-align: left; gap: 12px; padding: 10px 2px; border: 0 !important; border-radius: 0;
  border-top: 1px solid #EEF1F8 !important; background: transparent !important; box-shadow: none !important; }
body.app .off-sec .off-person:first-child { border-top: 0 !important; }
body.app .off-sec .off-person img, body.app .off-sec .off-ph { flex: none; width: 52px; height: 52px; margin: 0; font-size: 16px; }
body.app .off-sec .off-person b { font-size: 15px; }
body.app .off-sec .off-person small { font-size: 13px; }
body.app .off-sec .off-person > b, body.app .off-sec .off-person > small { display: block; }
body.app .off-sec .off-person { display: grid; grid-template-columns: 52px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; }
body.app .off-sec .off-person > img, body.app .off-sec .off-person > .off-ph { grid-row: 1 / 3; }
body.app .off-sec .off-person > b { align-self: end; }
body.app .off-sec .off-person > small { grid-column: 2; align-self: start; }
body.app .off-sec .off-person > .off-more { grid-column: 3; grid-row: 1 / 3; align-self: center; margin: 0; }
body.app .off-sec .off-empty { opacity: 0.75; }
body.app .off-sec .off-empty .off-ph { border: 2px dashed #C9D2E6; background: transparent; }
/* Account: show the row icons as soft tinted squares */
body.app #vAccount .row-ico { display: grid; width: 32px; height: 32px; border-radius: 10px; background: #E3ECFB; color: #0E7490; }
body.app #vAccount .row-ico svg, body.app #vAccount .row-ico .i { width: 18px; height: 18px; }
.pass-banner.live small { display: block; font-size: 13px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-line-tag { margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: #E3F6EA; color: #00602F; font-size: 12px; font-weight: 800; }
body.app #vAccount .row-ico.red { background: #FCEBEB; color: #A32D2D; }

/* Event screen: your caravan visit right under the pass, the day highlighted (2026-11-17) */
#svcBox.cv-booked { border: 2px solid #0038A8; }
.cv-day { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: #E3ECFB; color: #0B1A3F; margin-bottom: 12px; }
.cv-day.today { background: #E3F6EA; }
.cv-day-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #0038A8; color: #fff; display: grid; place-items: center; }
.cv-day.today .cv-day-ic { background: #00602F; }
.cv-day-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cv-day small { display: block; font-size: 13px; font-weight: 700; color: #4A5778; }
.cv-day b { display: block; font-size: 19px; font-weight: 800; line-height: 1.2; }
.cv-got { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cv-got li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #F5F8FF; font-size: 15px; font-weight: 700; }
.cv-got li .cv-tick { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #E3F6EA; color: #00602F; display: grid; place-items: center; font-size: 13px; }
/* Your number, now serving and people ahead, per service (2026-11-17) */
.cv-line { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cv-line small { font-size: 13px; font-weight: 600; color: #4A5778; line-height: 1.35; }
.cv-line small b { color: #0B1A3F; font-weight: 800; }
.cv-line small b.cv-go { color: #00602F; }
.cv-num { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px 10px; border-radius: 12px; background: #0038A8; color: #fff; font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cv-num { align-self: center; padding: 8px 12px; }  /* number only, no "Your no." label (2026-11-17) */
.cv-num.missed { background: #8A94AD; }

/* Event screen tidy-up (2026-11-17): the event date sits under the door notes as a plain white card
   (no poster photo behind it), the family card has no empty gap, and "Cancel my sign-up" is last. */
#vPass #eventHead { margin-top: 12px; }
#vPass #eventHead.has-bg { color: var(--ink); cursor: pointer; }
#vPass #eventHead.has-bg::before, #vPass #eventHead.has-bg::after { display: none; }
#vPass #eventHead.has-bg h1, #vPass #eventHead.has-bg p { color: var(--ink) !important; text-shadow: none; }
body.app #vPass #eventHead #evWhen { font-size: 15px; font-weight: 700; color: var(--ff-navy, #0B1D26) !important; }
#vPass #eventHead .ev-cal-btn { background: var(--tint, #EEF3FF) !important; color: #0038A8 !important; border-color: transparent !important; }
.fam-pick:empty { display: none; }
#vPass #pOneQr { text-align: center; margin-top: 12px; }
#vPass #pOneQr:not([hidden]) + #passNote { margin-top: 2px !important; }

/* Activity session card, tidier (2026-11-17): time and "1/20" on one row, status chips side by side,
   "I've paid" as the main button, and only the people going in the list plus one "N spots open" tile. */
.grp-session header { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 12px; }
.grp-when { display: flex; flex-direction: column; min-width: 0; }
.grp-when span { color: var(--muted); font-size: 14px; }
.grp-cap { flex: none; display: flex; align-items: baseline; gap: 1px; padding: 6px 12px; border-radius: 14px; background: #F3F6FC; color: var(--muted); font-weight: 700; font-size: 15px; }
.grp-cap b { color: var(--ink); font-size: 20px; font-weight: 800; }
.grp-cap small { margin-left: 5px; font-size: 12px; font-weight: 600; }
.grp-bar { height: 8px; }
.grp-state { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.grp-state .grp-mine, .grp-state .grp-pay { margin: 0; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 15px; border-radius: 999px; }
.grp-actions button { min-height: 48px; }
.grp-actions .grp-primary { background: #0038A8 !important; color: #fff !important; border: 0 !important; }
.grp-list summary { display: flex; align-items: center; gap: 8px; }
.grp-list summary .grp-n { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #E3ECFB; color: #0038A8; font-size: 13px; display: inline-grid; place-items: center; }
.grp-roster li.grp-open { grid-column: 1 / -1; justify-content: center; font-weight: 700; }
.grp-list summary .grp-n { margin-right: auto; }

/* Finished events and services (2026-11-19): a Completed or No show tag. Everything stays in colour (Chris,
   2026-11-19) except the Serbisyo Caravan services box after the visit day, which is greyed out. */
.done-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.4; white-space: nowrap; filter: none !important; opacity: 1 !important; }
.done-tag.ok { background: #E3F6EA; color: #00602F; }
.done-tag.no { background: #FDECEC; color: #B42318; }
.ev-line-row.past { opacity: 1; }
.ev-line-row.past .done-tag { align-self: flex-start; margin-top: 4px; }
.past-card.is-over .done-tag { margin-right: 2px; }
.pass-over { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px 0 0; padding: 12px; border-radius: 16px; background: #F2F4F7; color: #475467; text-align: center; font-weight: 600; }
.pass-over .done-tag { font-size: 14px; padding: 4px 14px; }
#peStatus .done-tag { margin-right: 6px; }
#svcBox.is-over { background: #F2F4F7 !important; border-color: #D0D5DD; }
#svcBox.is-over > :not(.cv-got), #svcBox.is-over .cv-got .cv-line { filter: grayscale(1); opacity: .65; }
#svcBox.is-over .cv-got li { background: #fff; justify-content: space-between; }
#slotBox.is-over button { display: none; }
/* ===== KP Admin tidy-up (2026-11-19): headline numbers, events first, grouped actions, filter chips,
   the app's own confirm box and "Saved" notes, and tables that become cards on phones. ===== */
/* Headline numbers: label, big number, one quiet line under it */
.kp-admin .stat.kpi { flex-direction: column !important; justify-content: center !important; gap: 2px !important; }
.kp-admin .stat.kpi > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.kp-admin .kpi-sub { color: var(--muted); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-admin .tone-amber.stat.kpi { background: #FFF8E8 !important; border-color: #F6DDA6 !important; }
.kp-admin .tone-amber .kpi-sub, .kp-admin .tone-amber > span { color: #8A4B06; }
.kp-admin .tone-red.stat.kpi { background: #FDEDEF !important; border-color: #F4C2C9 !important; }
.kp-admin .tone-red .kpi-sub, .kp-admin .tone-red > span { color: var(--bad); }
.tone-red .kpi-ico { background: #FCE8EA; color: var(--bad); }
.kpi-more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi-more b { color: var(--ink); font-weight: 800; margin-left: 4px; }

/* Section head: title (with a count) on the left, the "+ Add" button on the right */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list-head h2 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.list-head > button { width: auto; flex: 0 0 auto; min-height: 44px; padding: 8px 18px; }
.count-pill { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--tint); color: var(--brand); font-size: 13px; font-weight: 800; display: inline-grid; place-items: center; }
.count-pill:empty { display: none; }
.form-actions { gap: 10px; }
.form-actions > button { width: auto; flex: 0 0 auto; }
.empty-state { align-items: flex-start; }
.empty-state h2 { margin: 0; }

/* Event cards */
.aev-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aev-title { flex: 1 1 260px; min-width: 0; }
.aev-title h2 { margin: 0 0 2px; }
.aev-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }
.chip.diplo { background: #F0E9FF; color: #5B2A86; }
.ev-main .ev-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.ev-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.ev-group h3 { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.ev-group .ev-actions { flex-direction: column; align-items: stretch; gap: 6px; }
.ev-group .ev-actions { gap: 2px; }
.kp-admin .ev-group .ev-actions > * { flex: 0 0 auto; justify-content: flex-start; text-align: left; width: 100%; min-height: 38px; padding: 6px 10px; border: 0 !important; background: transparent !important; box-shadow: none; border-radius: 10px; font-weight: 600; }
.kp-admin .ev-group .ev-actions > *:hover { background: var(--tint) !important; }
.ev-danger { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 6px; }
.ev-danger .danger-link { color: var(--bad) !important; text-decoration: none; font-weight: 700; padding-left: 0; }

/* Members: status filter chips with counts, and how many are shown */
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-chip { width: auto; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); font-size: 14px; font-weight: 700; }
.f-chip b { margin-left: 6px; color: var(--muted); font-weight: 800; }
.f-chip:hover:not(:disabled) { background: var(--tint) !important; border-color: var(--line) !important; }
.f-chip[aria-pressed="true"], .f-chip[aria-pressed="true"]:hover { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff; }
.f-chip[aria-pressed="true"] b { color: #fff; opacity: .85; }
.f-note { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: 4px; }
.result-count { margin: 0; font-weight: 600; }
td.contact { line-height: 1.5; }

/* The app's own "Are you sure?" box */
.ask-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(11, 31, 77, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ask-wrap[hidden] { display: none; }
.ask-card { background: #fff; border-radius: 16px; padding: 22px; max-width: 440px; width: 100%; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 50px rgba(11, 31, 77, 0.25); animation: kpPop .14s ease-out; }
.ask-card h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.ask-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; white-space: pre-line; }
.ask-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.ask-actions button { width: auto; flex: 0 0 auto; min-height: 44px; padding: 8px 18px; }
@keyframes kpPop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* Short "Saved" note at the bottom */
.kp-toast { position: fixed; z-index: 90; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: #0B1F4D; color: #fff; font-size: 15px; font-weight: 600; line-height: 1.4;
  box-shadow: 0 10px 30px rgba(11, 31, 77, 0.3); transition: opacity .18s, transform .18s; }
.kp-toast.show { opacity: 1; transform: translate(-50%, 0); }
.kp-toast.error { background: var(--bad); }
.kp-toast.info { background: #2E3F6B; }

/* Phones: each table row becomes a small card with the column name beside each value */
@media (max-width: 767px) {
  .kp-admin .table-box { border: 0; background: transparent; overflow: visible; }
  .kp-admin .table-box table, .kp-admin .table-box tbody { display: block; }
  .kp-admin .table-box thead { display: none; }
  .kp-admin .table-box tr { display: block; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; }
  .kp-admin .table-box td { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; white-space: normal; border-bottom: 1px solid #EEF2F9; padding: 8px 0; text-align: right; }
  .kp-admin .table-box td:last-child { border-bottom: 0; }
  .kp-admin .table-box td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; }
  .kp-admin .table-box td:not([data-label])::before, .kp-admin .table-box td[colspan]::before { display: none; }
  .kp-admin .table-box td:not([data-label]) { justify-content: flex-end; flex-wrap: wrap; }
  .kp-admin .table-box td[colspan] { justify-content: flex-start; text-align: left; }
  .kp-admin .list-head > button { flex: 1 1 100%; }
}
.kp-admin form.card, .kp-admin #offFormCard, .kp-admin .list-head { scroll-margin-top: 96px; }
/* Red buttons in lists are outlined, not filled, so one row's Delete doesn't outshout the whole page */
.kp-admin button.small.bad { background: #fff !important; color: var(--bad) !important; border: 1.5px solid #F4C2C9 !important; }
.kp-admin button.small.bad:hover:not(:disabled) { background: #FDEDEF !important; }
.off-row > img, .off-row > span:first-child { flex: 0 0 56px !important; }
.off-row > button { flex: 0 0 auto !important; width: auto; }
@media (max-width: 767px) {
  .kp-admin .table-box td:first-child { justify-content: flex-start; text-align: left; font-weight: 800; font-size: 15px; color: var(--ink); }
  .kp-admin .table-box td:first-child::before { display: none; }
  /* Dashboard numbers belong to the Events tab; other tabs start with their own content */
  body.kp-admin[data-tab]:not([data-tab="events"]) .stats-card, body.kp-admin[data-tab]:not([data-tab="events"]) .dash-charts { display: none; }
}

/* ===== KP Admin round 2 (2026-11-19): Attendees panel, VIP photo cards, week view, report numbers, problem inbox ===== */
/* Attendees: a wide panel with search and chips */
.modal .card.wide { max-width: 1040px; }
.att-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.att-head h2 { margin: 0 0 2px; }
.att-head > button { width: auto; flex: 0 0 auto; }
#peopleQ { width: 100%; }
.q-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--tint); color: var(--brand); white-space: nowrap; }
.q-pill.st-done { background: #E3F4EA; color: #00602F; }
.q-pill.st-skipped { background: #FFF2D9; color: #8A4B06; }
.q-pill.st-called, .q-pill.st-waiting { background: #E7EEFF; color: #1D4ED8; }
.q-pill.st-cancelled { background: #F1F3F7; color: var(--muted); }
.svc-line { margin: 2px 0; white-space: nowrap; }
.in-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #E3F4EA; color: #00602F; white-space: nowrap; }

/* VIP guests: photo cards */
.avip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.avip-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.avip-card.off { opacity: .6; }
.avip-ph { aspect-ratio: 4 / 3; background: #EEF2F9; display: grid; place-items: center; overflow: hidden; }
.avip-ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.avip-ph.none { background: #FFF8E8; border-bottom: 1px dashed #F6DDA6; }
.avip-ph.none span { color: #8A4B06; font-weight: 700; font-size: 14px; }
.avip-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.avip-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.avip-name { font-size: 16px; line-height: 1.3; }
.avip-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; position: relative; }
.avip-acts > button { width: auto; flex: 0 0 auto; }
.avip-more summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 14px; list-style: none; padding: 8px 4px; }
.avip-more summary::-webkit-details-marker { display: none; }
.avip-menu { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 5; display: flex; flex-direction: column; gap: 2px; min-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(11, 31, 77, .16); }
.kp-admin .avip-menu > button { width: 100%; justify-content: flex-start; text-align: left; min-height: 38px; border: 0 !important; background: transparent !important; border-radius: 8px; }
.kp-admin .avip-menu > button:hover { background: var(--tint) !important; }
.kp-admin .avip-menu > button.bad { color: var(--bad) !important; }
.avip-form { margin: 0; }

/* Organizations: the week at a glance */
.ow-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.ow-head h4 { display: flex; align-items: center; gap: 8px; }
.kp-admin .ow-head .link, .kp-admin [data-org-edit].link { width: auto; min-height: 36px; text-decoration: none; color: var(--brand); font-weight: 700; }
.org-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ow-day { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ow-h { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.kp-admin .ow-act { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; min-height: 0; padding: 8px; border-radius: 10px; text-align: left;
  background: var(--tint) !important; color: var(--ink) !important; border: 1px solid transparent !important; font-weight: 600; font-size: 12px; line-height: 1.3; }
.kp-admin .ow-act:hover { border-color: var(--brand) !important; }
.ow-act b { font-size: 12px; color: var(--brand); }
.ow-act span { font-weight: 700; overflow-wrap: anywhere; }
.ow-act small { color: var(--muted); font-size: 11px; }
.kp-admin .ow-act.paused { background: #fff !important; border: 1px dashed #C9D3E8 !important; opacity: .75; }
.kp-admin .org-new { flex: 0 0 auto !important; width: auto; }
@media (max-width: 767px) {
  .org-week { grid-template-columns: 1fr; }
  .ow-day:not(:has(.ow-act)) { display: none; }
  .ow-h { text-align: left; }
}

/* Reports: headline numbers and show-up bars */
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.rp-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rp-kpi span { color: var(--muted); font-size: 13px; font-weight: 700; }
.rp-kpi b { font-size: 26px; font-weight: 800; line-height: 1.15; }
.rp-kpi small { color: var(--muted); font-size: 13px; }
.rate { display: inline-block; width: 90px; height: 8px; border-radius: 99px; background: #EEF2F9; overflow: hidden; vertical-align: middle; }
.rate i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.rate.good i { background: #12A150; } .rate.mid i { background: #E5A00D; } .rate.low i { background: var(--bad); }
.rate-n { font-size: 13px; } .rate-n.good { color: #00602F; } .rate-n.mid { color: #8A4B06; } .rate-n.low { color: var(--bad); }
.rate-cell { white-space: nowrap; }

/* Settings: problem reports inbox */
.pr-list { display: flex; flex-direction: column; }
.pr-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pr-item:last-child { border-bottom: 0; }
.pr-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: transparent; }
.pr-item.new .pr-dot { background: var(--brand); }
.pr-body { flex: 1; min-width: 0; }
.pr-msg { margin: 0 0 2px; white-space: pre-wrap; font-weight: 600; overflow-wrap: anywhere; }
.pr-item.new .pr-msg { font-weight: 800; }
.pr-item > button, .pr-item > .chip { flex: 0 0 auto; width: auto; }
.avip-tags .chip.good { background: #E3F4EA; color: #00602F; }
.kp-admin #vipPrintAll, .kp-admin #stPrintAll { width: auto; flex: 0 0 auto; }
.rp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 767px) { .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .kp-admin .svc-line { white-space: normal; text-align: right; }
  .kp-admin #peopleRows td { flex-wrap: wrap; }
  .kp-admin #peopleRows td > div { flex: 1 1 100%; }
}
/* Community events hosted by members: "Community event · hosted by …" */
.host-tag { display: inline-block; margin: 4px 0 0; padding: 3px 10px; border-radius: 999px; background: #FFF4D6; color: #7A4B00; font-size: 12px; font-weight: 700; line-height: 1.4; }
b + .host-tag, h2 + .host-tag { display: table; }
.host-checks { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.host-checks li { list-style: none; }
.host-checks li.ok span { color: #2E7D32; font-weight: 800; }
.host-checks li.no { color: #6B7280; }
.host-checks li.no span { color: #B91C1C; font-weight: 800; }
.host-rules { padding-left: 20px; margin: 6px 0; }
.host-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.host-ev { border: 1px solid #E3E8F2; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.host-ev p { margin: 0; }
.host-people { display: flex; flex-direction: column; gap: 8px; }

/* Greeting and Account: the member's face (cut from their ID photo) instead of the initials (2026-11-19) */
.avatar.has-photo { overflow: hidden; padding: 0; background: #fff !important; }
.avatar.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; border-radius: 50%; }

/* Profile photo cropper (2026-11-19): a circle guide so the face is framed well */
.pp-crop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px;
  background: rgba(6, 14, 34, 0.72); }
.pp-crop[hidden] { display: none; }
.pp-crop-box { background: #fff; border-radius: 18px; padding: 18px; width: min(360px, 94vw);
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(6, 14, 34, 0.4); }
.pp-crop-stage { position: relative; width: 300px; max-width: 100%; aspect-ratio: 1; margin: 0 auto;
  overflow: hidden; border-radius: 14px; background: #0b1a3f; }
.pp-crop-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.pp-crop-stage canvas:active { cursor: grabbing; }
/* white circle guide + darkened area outside it */
.pp-crop-ring { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 0 0 9999px rgba(8, 16, 36, 0.5); pointer-events: none; }
.pp-zoom { display: flex; align-items: center; gap: 10px; }
.pp-zoom input[type="range"] { flex: 1; }

/* Member card: copy the card number (2026-11-19) */
.mc-info { flex: 1 1 auto; min-width: 0; }   /* keep the number/button clear of the QR */
.mc-code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Small icon button; !important beats the app's global primary-button fill. */
.mc-copy { flex: none; display: inline-grid !important; place-items: center; width: 30px !important; height: 30px !important;
  min-height: 0 !important; padding: 0 !important; border-radius: 9px !important; border: 1px solid rgba(11, 31, 77, 0.18) !important;
  background: #EAF0FD !important; color: #0038A8 !important; box-shadow: none !important; cursor: pointer; }
.mc-copy:hover { background: #DCE6FB !important; }
.mc-copy svg { width: 16px; height: 16px; }
.mc-copy.copied { background: var(--kw-green, #1F9D55) !important; border-color: transparent !important; color: #fff !important; }
@media print { .mc-copy { display: none !important; } }

/* My team (weekend tournaments, member app Account, 2026-11-19) */
#teamBody { display: flex; flex-direction: column; gap: 10px; }
.team-form { display: flex; flex-direction: column; gap: 8px; }
.team-form.row { flex-direction: row; flex-wrap: nowrap; align-items: center; }
.team-form.row input { flex: 1 1 auto; min-width: 0; }
.team-form.row button { flex: 0 0 auto; }
.team-card { border: 1px solid var(--line, #E3E6EA); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.team-btns { gap: 8px; }
.team-head { display: flex; flex-direction: column; gap: 2px; }
.team-head b { font-size: 18px; }
.team-head .host-tag { align-self: flex-start; }
.team-code { display: flex; align-items: center; gap: 10px; background: #F3F7FF; border-radius: 12px; padding: 10px 12px; }
.team-code b { font-size: 22px; letter-spacing: 3px; flex: 1 1 auto; }
.team-h { margin: 6px 0 0; font-size: 15px; }
.team-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.team-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line, #E3E6EA); }
.team-list li.muted > span { opacity: .6; }
.team-acts { display: flex; gap: 4px; flex: 0 0 auto; }
.team-tag { background: #EAF6EE; color: #1E6B3A; border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.team-status { margin: 0; font-weight: 700; }
.team-status.ok { color: #1E6B3A; }
.team-status.wait { color: #7A4B00; }
.team-lineup summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.team-leave { align-self: flex-start; margin-top: 6px; }
.team-pass { display: table; margin: 6px auto 0; padding: 3px 10px; border-radius: 999px; background: #EAF6EE; color: #1E6B3A; font-size: 13px; font-weight: 700; }
button.link.danger { color: #B42318; }

/* Face check-in switch (FACE_CHECKIN in common.js). Off: hide face UI; on: hide the "switched off" notes. */
html.no-face [data-face-ui] { display: none !important; }
html:not(.no-face) [data-face-off] { display: none !important; }
/* Embassy-era features (EMBASSY_FEATURES in embassy.js, off since 2026-11-21): data-embassy-ui shows only while the
   switch is on (it adds .embassy-on to <html>), data-embassy-off only while it is off. The :not(#embassy-x) part
   (matches every element) only raises the weight of these rules, so they win over screen styles such as
   "body.app .tile.ql { display: flex !important }". */
html:not(.embassy-on) [data-embassy-ui]:not(#embassy-x) { display: none !important; }
html.embassy-on [data-embassy-off]:not(#embassy-x) { display: none !important; }
html:not(.embassy-on) body[data-embassy-page] { visibility: hidden; } /* help.html: blank while it opens Home */

/* ---------- Member card v2 (2026-11-19): big photo + big QR, tap for full screen (turns sideways like a real card) ---------- */
.member-card.mc2 { aspect-ratio: auto; padding: 20px 20px 14px; gap: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mc2-body { display: grid; grid-template-columns: auto auto; grid-template-areas: "face qr" "info info"; justify-content: space-between; align-items: center; gap: 16px 12px; }
.mc2 .mc-face { grid-area: face; width: 112px; height: 140px; border-radius: 14px; font-size: 34px; }
.mc2 .mc-qr { grid-area: qr; padding: 0; background: #fff; }
.mc2 .mc-qr img, .mc2 .mc-qr canvas { width: 150px; height: 150px; }
.mc2-info { grid-area: info; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.member-card.mc2 .mc-name { font-size: 22px; line-height: 1.15; overflow-wrap: normal; }
.member-card.mc2 .mc-since { font-size: 13px; }
.mc2-num { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.mc2-lab { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; color: #8A93A8; }
.mc2 .mc-code-row { flex-wrap: nowrap; gap: 6px; }
body.app .member-card.mc2 .mc-code { font-size: 16px; font-weight: 600; letter-spacing: 0.06em; color: var(--lx-ink); }
.mc2 .mc-copy { width: 28px !important; height: 28px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important;
  background: transparent !important; box-shadow: none !important; color: var(--lx-blue, #0038A8) !important; }
.mc2 .mc-copy svg { width: 17px; height: 17px; }
.mc2-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #E6EAF3; padding-top: 10px; }
.member-card.mc2 .mc-note { font-size: 12px; }
.mc2-full, .mc2-close { display: inline-flex !important; align-items: center; gap: 5px; flex: none; width: auto !important; min-height: 0 !important;
  padding: 4px 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
  color: var(--lx-blue, #0038A8) !important; font-size: 13px !important; font-weight: 700; }
.mc2-full svg { width: 15px; height: 15px; }
.mc2-close { display: none !important; }

/* Full screen: dark backdrop, card as big as fits, turned 90° on a phone held upright (iPhone apps can't force landscape). */
.mc2-backdrop { position: fixed; inset: 0; z-index: 1000; background: #0B1F4D; }
html.mc2-open, html.mc2-open body { overflow: hidden; }
html.mc2-open #navbar, html.mc2-open #tabbar, html.mc2-open .demo-banner { visibility: hidden; }
.member-card.mc2.is-full { position: fixed; z-index: 1001; top: 50%; left: 50%; margin: 0; max-width: none; cursor: default;
  aspect-ratio: 85.6 / 54; height: auto; padding: 22px 26px 16px; gap: 10px; container-type: inline-size;
  width: min(640px, calc(100vw - 48px), calc((100vh - 48px) * 1.585)); transform: translate(-50%, -50%); }
@media (orientation: portrait) {
  .member-card.mc2.is-full { width: min(640px, calc(100vh - 96px), calc((100vw - 32px) * 1.585)); transform: translate(-50%, -50%) rotate(90deg); }
}
.mc2.is-full .mc2-body { flex: 1; grid-template-columns: auto 1fr auto; grid-template-areas: "face info qr"; gap: 4cqw; align-items: center; }
.mc2.is-full .mc-face { width: 25cqw; height: 31.25cqw; border-radius: 3cqw; font-size: 8cqw; }
.mc2.is-full .mc-qr img, .mc2.is-full .mc-qr canvas { width: 32cqw; height: 32cqw; }
.mc2.is-full .mc-top { font-size: max(11px, 2.1cqw); }
.member-card.mc2.is-full .mc-name { font-size: 4.8cqw; }
.member-card.mc2.is-full .mc-since { font-size: 2.5cqw; }
.mc2.is-full .mc2-num { margin-top: 2.5cqw; }
.mc2.is-full .mc2-lab { font-size: max(10px, 1.8cqw); }
body.app .member-card.mc2.is-full .mc-code { font-size: 3.3cqw; }
.mc2.is-full .mc-copy, .mc2.is-full .mc2-full { display: none !important; }
.mc2.is-full .mc2-close { display: inline-flex !important; }
.mc2.is-full .mc2-foot { border-top: 0; padding-top: 0; }
.member-card.mc2.is-full .mc-note { font-size: max(11px, 2.2cqw); }

/* Printed card: the same sideways layout at bank-card size. */
@media print {
  .member-card.mc2.printable { padding: 4mm; gap: 1.5mm; }
  .mc2 .mc2-body { flex: 1; grid-template-columns: auto 1fr auto; grid-template-areas: "face info qr"; gap: 3mm; }
  .mc2 .mc-face { width: 16mm; height: 20mm; border-radius: 2mm; font-size: 9pt; }
  .mc2 .mc-qr img, .mc2 .mc-qr canvas { width: 26mm; height: 26mm; }
  .member-card.mc2 .mc-name { font-size: 11pt; }
  .mc2 .mc2-num { margin-top: 1.5mm; } .mc2 .mc2-lab { font-size: 5.5pt; }
  body.app .member-card.mc2 .mc-code { font-size: 8.5pt; }
  .mc2 .mc2-foot { border-top: 0; padding-top: 0; } .mc2-full, .mc2-close, .mc2-backdrop { display: none !important; }
}

/* Open play courts (2026-11-20): shared by the member app and Admin (courts-ui.js). */
.courts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.courts-h { margin: 0; font-size: 15px; }
.courts-next { margin: 0; }
.court-card { border: 1px solid #DCE3F2; border-radius: 14px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.court-card.playing { border-color: #9BD3B0; background: #F4FBF6; }
.court-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.court-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.court-team ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.court-team li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 8px; border-radius: 10px; background: #F3F6FC; font-size: 14px; min-width: 0; }
.court-team li.me { background: #E3F3EA; font-weight: 800; }
.court-team li.bench { opacity: .75; }
.court-team li.empty { background: transparent; color: #8A93A6; }
.court-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.court-ctrl { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 380px) { .court-teams { grid-template-columns: 1fr; } }
.court-note { margin: 0; color: #8A5A00; }
.court-last { margin: 0; }
/* Club stats (open play step 5) */
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.st-tile { background: #fff; border: 1px solid #DCE3F2; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.st-tile b { font-size: 22px; font-weight: 900; color: var(--ink); }
.st-tile small { font-size: 12px; color: #5B6475; }
.st-board ol { margin: 8px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.st-board li span { display: inline-block; margin-right: 8px; }
/* Skill levels (open play step 6) */
.lvl { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #EEF2FA; color: #3A4660; vertical-align: middle; }
.lvl-beginner { background: #E3F3EA; color: #1F6B3A; }
.lvl-intermediate { background: #FFF4D6; color: #8A5A00; }
.lvl-advanced { background: #FCE4E4; color: #9B1C1C; }
.lvl-rows { display: flex; flex-direction: column; gap: 8px; }
.lvl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid #DCE3F2; }
.lvl-row select, .lvl-sel { width: auto; min-width: 0; padding: 4px 8px; font-size: 14px; }

/* App notice on the member home screen (2026-11-20) */
.app-notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #E6EDFB; color: #0B1F4D; border: 1px solid #BFD0F2; margin-bottom: 12px; }
.app-notice.problem { background: #FFF1DB; border-color: #F5C77E; color: #5A3A00; }
.app-notice p { margin: 0; flex: 1 1 auto; font-weight: 600; line-height: 1.4; }
.app-notice .an-ico { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #0038A8; color: #fff; font-weight: 900; font-size: 14px; }
.app-notice.problem .an-ico { background: #B7791F; }
.app-notice .an-x { flex: 0 0 auto; background: none !important; border: 0 !important; box-shadow: none !important; color: inherit !important; font-size: 22px; line-height: 1; padding: 0 4px !important; min-height: 0 !important; width: auto !important; }

/* ===== Admin → Tournaments (2026-11-21): made for event admins on a tablet or laptop; every tap target ≥ 48px ===== */
#tourneyBox { --tb-new: #5B3FC4; --tb-newbg: #F1EDFD; --tb-ok: #127A3E; --tb-okbg: #E7F6EC; --tb-wait: #8A5200; --tb-waitbg: #FFF3D6; }
#tourneyBox h2, #tourneyBox h3, #tourneyBox h4 { margin: 0; }
#tourneyBox button { font-size: 16px; }
.tb-intro { gap: 12px; }
.tb-intro-top, .tb-tour-top { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.tb-intro-top > div, .tb-tour-top > div { flex: 1 1 320px; min-width: 0; }
.tb-intro-top p { margin: 6px 0 0; }
.tb-how { margin: 0; padding: 12px 14px 12px 34px; background: #F4F6FB; border-radius: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.tb-tour { gap: 12px; }
.tb-tour-top p { margin: 4px 0 8px; }
.tb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-sub { font-size: 15px; color: var(--muted); }
.tb-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
#tourneyBox button.tb-week { background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: 14px; min-height: 76px; padding: 12px 40px 12px 14px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; text-align: left; position: relative; font-weight: 600; }
#tourneyBox button.tb-week:hover { background: #F4F7FD; border-color: var(--brand); }
.tb-week-day { font-size: 18px; font-weight: 800; }
.tb-week-day em { font-style: normal; font-size: 13px; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
.tb-week-info { font-size: 14px; color: var(--muted); }
.tb-badge { font-size: 13px; font-weight: 800; color: var(--tb-new); background: var(--tb-newbg); border-radius: 999px; padding: 2px 10px; }
.tb-week-go { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; color: var(--muted); }

.tb-board { display: flex; flex-direction: column; gap: 14px; }
#tourneyBox button.tb-back { align-self: flex-start; background: none; border: none; color: var(--brand); min-height: 44px; padding: 4px 0; font-weight: 800; }
#tourneyBox button.tb-back:hover { background: none; text-decoration: underline; }
.tb-head h2 { font-size: 26px; }
.tb-head p { margin: 4px 0 0; }
.tb-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
#tourneyBox button.tb-tab { background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; min-height: 48px; padding: 8px 18px; font-weight: 800; }
#tourneyBox button.tb-tab:hover { background: #F4F7FD; }
#tourneyBox button.tb-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tb-dot { display: inline-block; min-width: 22px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; }
.tb-note { margin: 0; padding: 10px 14px; border-radius: 12px; background: #F4F6FB; color: var(--muted); font-weight: 600; }
.tb-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tb-sum div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tb-sum b { display: block; font-size: 26px; line-height: 1.2; }
.tb-sum span { color: var(--muted); font-size: 14px; }
.tb-sum .ok b { color: var(--tb-ok); } .tb-sum .warn b { color: var(--tb-wait); } .tb-sum .new b { color: var(--tb-new); }

.tb-reqs { background: var(--tb-newbg); border: 1.5px solid #D6CCF8; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tb-reqs h3 { color: var(--tb-new); font-size: 18px; }
.tb-reqs > p { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.tb-req { background: #fff; border-radius: 14px; padding: 14px; display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; }
.tb-req-who { flex: 1 1 260px; min-width: 0; }
.tb-req-who b { font-size: 17px; }
.tb-put { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tb-put > span { font-size: 14px; font-weight: 700; color: var(--muted); }
#tourneyBox .tb-put button { min-height: 52px; padding: 6px 14px; border-radius: 12px; flex-direction: column; gap: 0; line-height: 1.2; }
#tourneyBox .tb-put button small { font-size: 12px; font-weight: 600; opacity: .9; }
#tourneyBox button.tb-plain { background: none; border-color: transparent; color: var(--muted); }
#tourneyBox button.tb-plain:hover { background: #F4F6FB; }
.tb-warn { margin: 6px 0 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.tb-ok { color: var(--tb-ok); }

.tb-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.tb-group { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tb-gh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tb-gh h3 { font-size: 20px; } .tb-gh span { color: var(--muted); font-size: 14px; font-weight: 700; }
.tb-bar { height: 8px; background: #EEF1F7; border-radius: 999px; overflow: hidden; }
.tb-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.tb-cap { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.tb-cap b { color: var(--bad); }
.tb-team { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tb-team-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tb-team-top b { font-size: 16px; }
.tb-org { display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.tb-req-who .tb-org { display: inline; margin-left: 8px; }
.tb-meta { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.tb-place { font-weight: 800; color: var(--tb-wait); }
.tb-pay { border-radius: 12px; padding: 8px 8px 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tb-pay b { font-size: 15px; } .tb-pay small { display: block; font-size: 13px; font-weight: 500; }
.tb-pay.ok { background: var(--tb-okbg); color: var(--tb-ok); }
.tb-pay.no { background: var(--tb-waitbg); color: var(--tb-wait); }
#tourneyBox .tb-pay button.good { min-height: 48px; padding: 6px 16px; border-radius: 12px; }
#tourneyBox button.tb-link { background: none; border: none; color: inherit; text-decoration: underline; min-height: 44px; padding: 4px 6px; font-size: 14px; font-weight: 700; }
#tourneyBox .tb-meta button.tb-link { min-height: 0; padding: 0; color: var(--brand); }
#tourneyBox button.tb-link:hover { background: none; }
.tb-more { position: relative; flex: 0 0 auto; }
.tb-more summary { list-style: none; cursor: pointer; width: 48px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 22px; color: var(--muted); }
.tb-more summary::-webkit-details-marker { display: none; }
.tb-more summary:hover, .tb-more[open] summary { background: #F4F6FB; color: var(--ink); }
.tb-menu { position: absolute; right: 0; top: 46px; z-index: 20; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(11, 31, 77, .18); padding: 6px; display: flex; flex-direction: column; }
#tourneyBox .tb-menu button { background: none; border: none; color: var(--ink); justify-content: flex-start; text-align: left; min-height: 48px; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
#tourneyBox .tb-menu button:hover { background: #F4F6FB; }
#tourneyBox .tb-menu button.tb-del { color: var(--bad); }
#tourneyBox button.tb-slot { background: #fff; color: var(--brand); border: 2px dashed var(--line); border-radius: 14px; min-height: 56px; font-weight: 800; }
#tourneyBox button.tb-slot:hover { border-color: var(--brand); background: #F4F7FD; }
.tb-wl { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tb-wl h4 { font-size: 15px; } .tb-wl p { margin: -6px 0 0; font-size: 13px; color: var(--muted); }

.tb-undo { position: fixed; z-index: 95; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: min(640px, calc(100vw - 32px)); padding: 8px 8px 8px 16px; border-radius: 12px; background: #0B1F4D; color: #fff;
  font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(11, 31, 77, .3); transition: opacity .18s, transform .18s; }
.tb-undo.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tb-undo button { min-height: 44px; padding: 6px 14px; font-size: 15px; background: none; border: none; color: #9EC1FF; }
.tb-undo button:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }

.tb-plist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.tb-addform { display: flex; flex-direction: column; gap: 12px; }
.tb-pick { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.tb-opt { display: flex; flex-direction: row; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; min-height: 60px; cursor: pointer; font-weight: 400; }
.tb-opt > span:first-of-type { flex: 1 1 auto; min-width: 0; }
.tb-opt small { display: block; color: var(--muted); font-size: 14px; }
.tb-opt input { width: 20px; height: 20px; flex: 0 0 auto; }
.tb-opt:has(input:checked) { border-color: var(--brand); background: #EEF3FD; }
.tb-opt.dis { opacity: .6; cursor: not-allowed; }
.tb-tag { font-size: 13px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.tb-tag.ok { background: #E7F6EC; color: #127A3E; } .tb-tag.bad { background: #FDECEA; color: var(--bad); }
.tb-q { margin: 0; font-weight: 800; }
.tb-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tb-seg label { position: relative; display: block; }
.tb-seg input { position: absolute; opacity: 0; }
.tb-seg span { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 800; cursor: pointer; }
.tb-seg input:checked + span { border-color: #127A3E; background: #E7F6EC; color: #127A3E; }
.tb-seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.tb-explain { margin: 0; background: #F4F6FB; border-radius: 12px; padding: 10px 12px; }

/* Tournaments: the Admin look (admin-redesign.css) forces its own buttons with !important and 40px heights on wide
   screens; on this page, made for tablets too, the id wins: 48px+ targets and the plain/outline buttons stay plain. */
html body.kp-admin main #tourneyBox button { min-height: 48px !important; font-size: 15px !important; padding: 8px 16px !important; }
html body.kp-admin main #tourneyBox button.tb-week { min-height: 76px !important; padding: 12px 40px 12px 14px !important; background: #fff !important; color: var(--ink) !important;
  border: 1.5px solid var(--line) !important; border-radius: 14px !important; box-shadow: none !important; }
html body.kp-admin main #tourneyBox button.tb-week:hover { border-color: var(--brand) !important; background: #F4F7FD !important; }
html body.kp-admin main #tourneyBox button.tb-tab { background: #fff !important; color: var(--ink) !important; border: 1.5px solid var(--line) !important; border-radius: 999px !important; box-shadow: none !important; padding: 8px 18px !important; }
html body.kp-admin main #tourneyBox button.tb-tab.on { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important; }
html body.kp-admin main #tourneyBox button.tb-back, html body.kp-admin main #tourneyBox button.tb-link, html body.kp-admin main #tourneyBox button.tb-plain,
html body.kp-admin main #tourneyBox .tb-menu button { background: none !important; border: 0 !important; box-shadow: none !important; }
html body.kp-admin main #tourneyBox button.tb-back { color: var(--brand) !important; padding: 4px 0 !important; min-height: 44px !important; font-weight: 800; }
html body.kp-admin main #tourneyBox button.tb-link { color: inherit !important; padding: 4px 6px !important; min-height: 44px !important; font-size: 14px !important; }
html body.kp-admin main #tourneyBox .tb-meta button.tb-link { color: var(--brand) !important; min-height: 0 !important; padding: 0 !important; }
html body.kp-admin main #tourneyBox button.tb-plain { color: var(--muted) !important; }
html body.kp-admin main #tourneyBox button.tb-plain:hover, html body.kp-admin main #tourneyBox .tb-menu button:hover { background: #F4F6FB !important; }
html body.kp-admin main #tourneyBox .tb-menu button { color: var(--ink) !important; justify-content: flex-start !important; padding: 8px 12px !important; border-radius: 8px !important; }
html body.kp-admin main #tourneyBox .tb-menu button.tb-del { color: var(--bad) !important; }
html body.kp-admin main #tourneyBox button.tb-slot { background: #fff !important; color: var(--brand) !important; border: 2px dashed var(--line) !important; box-shadow: none !important; border-radius: 14px !important; min-height: 56px !important; }
html body.kp-admin main #tourneyBox button.tb-slot:hover { border-color: var(--brand) !important; background: #F4F7FD !important; }
html body.kp-admin main #tourneyBox .tb-pay button.good { background: var(--good) !important; box-shadow: none !important; }
html body.kp-admin main #tourneyBox .tb-put button { min-height: 52px !important; padding: 6px 14px !important; flex-direction: column; }
.tb-more summary::after { display: none !important; }
html body.kp-admin .tb-addform button[type="submit"] { min-height: 52px !important; font-size: 16px !important; }
html body.kp-admin .tb-opt input { width: 20px !important; min-height: 0 !important; }
/* Scheduled tournaments (2026-11-28, phase 1): a group's matches, table and bracket (tourney-day.js). Colours come from the
   page's own colour names, so light and dark both follow the admin page. */
.td-open { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.td-open small { font-weight: 600; color: var(--muted); font-size: 13px; }
.td-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.td-match { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.td-match.td-done { opacity: 0.85; }
.td-match.td-live { border-color: var(--brand); }
.td-when { display: flex; flex-direction: column; min-width: 92px; font-size: 14px; color: var(--muted); }
.td-when b { color: var(--ink); font-size: 16px; }
.td-when small { font-size: 12px; }
.td-teams { flex: 1 1 260px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; font-size: 16px; min-width: 0; }
.td-teams span:last-child { text-align: right; }
.td-vs { color: var(--muted); font-weight: 700; text-align: center; white-space: nowrap; }
.td-win { font-weight: 800; color: var(--good); }
.td-now { color: var(--brand); }
.td-acts { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; justify-content: flex-end; }
.td-table { display: flex; flex-direction: column; gap: 8px; overflow-x: auto; }
.td-tbox { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }  /* scrolls sideways on a phone */
.td-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.td-table td { border-top: 1px solid var(--line); }
.td-table th, .td-table td { padding: 8px 10px; text-align: left; white-space: nowrap; }
.td-table th { color: var(--muted); font-size: 13px; }
.td-bracket { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.td-round { flex: 1 0 200px; display: flex; flex-direction: column; gap: 10px; justify-content: space-around; }
.td-round h4 { margin: 0; font-size: 14px; color: var(--muted); }
.td-bm { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; background: var(--card); }
.td-bm small { color: var(--muted); font-size: 12px; }
.td-bm div { display: flex; justify-content: space-between; gap: 8px; }
.td-champ { padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 17px; }

/* Organizations → weekly activity tiles (2026-11-21): admin-redesign.css paints every button as a dark blue gradient,
   which hid the dark time and "slots" text. Keep these tiles light (tint, blue time, dark title) as designed. */
html body.kp-admin main #orgRows button.ow-act { background: var(--tint) !important; color: var(--ink) !important; border: 1px solid transparent !important;
  box-shadow: none !important; min-height: 0 !important; padding: 8px !important; font-size: 12px !important; border-radius: 10px !important; }
html body.kp-admin main #orgRows button.ow-act:hover { border-color: var(--brand) !important; background: var(--tint) !important; }
html body.kp-admin main #orgRows button.ow-act.paused { background: #fff !important; border: 1px dashed #C9D3E8 !important; }
/* An organization viewer's tiles (2026-11-23, 6b): the same look, as plain text (they cannot open an activity) */
html body.kp-admin main #orgRows .ow-act.ow-ro { background: var(--tint); color: var(--ink); border: 1px solid transparent; font-size: 12px; }
html body.kp-admin main #orgRows .ow-act.ow-ro.paused { background: #fff; border: 1px dashed #C9D3E8; }
/* Easier team joining (2026-11-21): tournament info card, "Join this team?" card, team QR, invite dot on Account */
.th-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #1B4FBF; }
.tny-info { background: #F3F7FF; border-color: #D6E2FB; }
.tny-info b { font-size: 18px; }
.team-ask { border: 2px solid #1B4FBF; background: #F3F7FF; }
.team-ask .ta-name { font-size: 20px; }
.team-qr-box summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.team-qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 12px; }
.team-qr img, .team-qr canvas { width: 200px; height: 200px; }
.tabbar [data-tab="account"].has-dot .ti { position: relative; }
.tabbar [data-tab="account"].has-dot .ti::after { content: ""; position: absolute; top: -2px; right: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: #E5484D; box-shadow: 0 0 0 2px #fff; }

/* Tournament picture and updates; organizer dialogs (2026-11-21) */
.tny-wrap { display: flex; flex-direction: column; gap: 10px; }
.tny-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: block; }
.tny-by { font-size: 13px; font-weight: 700; color: #1B4FBF; }
.tny-desc { margin: 2px 0; white-space: pre-line; }
.tny-org { flex-wrap: wrap; margin-top: 4px; }
.op-h { margin: 6px 0 0; }
.op-list { display: flex; flex-direction: column; gap: 10px; }
.op-post { border: 1px solid var(--line, #E3E6EA); border-radius: 14px; overflow: hidden; background: #fff; }
.op-img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.op-text { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.op-text h4 { margin: 0; font-size: 16px; }
.op-text p { margin: 0; white-space: pre-line; }
.op-k { font-size: 12px; color: #55607A; font-weight: 600; }
.op-text .danger { align-self: flex-start; }
.op-dlg { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.op-dlg::backdrop { background: rgba(11, 31, 77, 0.45); }
.op-form { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.op-form h3 { margin: 0; }
.op-prev { width: 100%; max-height: 200px; object-fit: cover; border-radius: 12px; }
.op-btns { gap: 8px; }
.org-tny { display: flex; flex-direction: column; gap: 8px; }
