/* ==========================================================================
   Brand tokens: Luvant DocuData (teal / red / charcoal, from the logo)
   ========================================================================== */
:root {
  /* Luvant palette: red, teal, black, white (light theme) */
  --brand-primary: #1e8394;        /* teal: primary buttons */
  --brand-primary-dark: #166a78;
  --brand-accent: #d9483f;         /* red: "Add" buttons, highlights */
  --brand-accent-dark: #b4201a;
  --brand-sunny: #3fb3c2;          /* light teal: focus rings */
  --brand-black: #1b1d1f;          /* logo black */
  --brand-bg: #ffffff;             /* white page */
  --brand-surface: #ffffff;        /* cards */
  --brand-text: #1b1d1f;
  --brand-muted: #5c6368;
  --brand-border: #dfe4e7;
  --brand-success: #0e9f6e;
  --brand-success-bg: #def7ec;
  --brand-danger: #c62f26;
  --brand-danger-dark: #a3201a;
  --brand-danger-bg: #fdeceb;
  --brand-info-bg: #e2f2f4;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 14px rgba(43, 47, 50, 0.08);
  --shadow-up: 0 -6px 20px rgba(43, 47, 50, 0.12);
  --tap: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--brand-text);
  background: var(--brand-bg);
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}

h1, h2 { line-height: 1.2; margin: 0 0 0.5rem; }
p { margin: 0 0 0.75rem; }
code { font-size: 0.9em; background: var(--brand-info-bg); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }

.muted { color: var(--brand-muted); }
.small { font-size: 0.875rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

input, select, textarea, button { font: inherit; }
input[type="text"], input[type="search"], input[type="password"] {
  font-size: 16px; /* >= 16px prevents iOS zoom on focus */
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 2px solid var(--brand-border);
  border-radius: var(--radius-sm);
  background: var(--brand-surface);
  color: var(--brand-text);
}
input:focus-visible, button:focus-visible, summary:focus-visible, .segmented input:focus-visible + span {
  outline: 3px solid var(--brand-sunny);
  outline-offset: 2px;
}
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.1s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { min-height: var(--tap); padding: 8px 14px; font-size: 0.95rem; }
.btn-lg { min-height: 52px; padding: 12px 22px; font-size: 1.1rem; }
.btn-xl { min-height: 60px; padding: 14px 24px; font-size: 1.3rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:active:not(:disabled) { background: var(--brand-primary-dark); }
.btn-accent { background: var(--brand-accent); color: #fff; }
.btn-accent:active:not(:disabled) { background: var(--brand-accent-dark); }
.btn-secondary { background: var(--brand-surface); color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-ghost { background: transparent; color: var(--brand-muted); border-color: var(--brand-border); }
.btn-danger { background: var(--brand-danger); color: #fff; }
.btn-danger:active:not(:disabled) { background: var(--brand-danger-dark); }

@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { background: var(--brand-primary-dark); }
  .btn-accent:hover:not(:disabled) { background: var(--brand-accent-dark); }
  .btn-danger:hover:not(:disabled) { background: var(--brand-danger-dark); }
  .btn-secondary:hover:not(:disabled) { background: var(--brand-info-bg); }
}

.badge {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; white-space: nowrap;
}
.badge-success { background: var(--brand-success-bg); color: var(--brand-success); }

.logo { display: block; height: auto; max-width: 100%; }

/* ==========================================================================
   Parent screen
   ========================================================================== */
.parent-page { display: flex; flex-direction: column; }

.parent-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) 24px calc(16px + var(--safe-left));
}

.brand-header { text-align: center; margin-bottom: 16px; }
.brand-header .logo { margin: 4px auto 12px; width: 180px; }
.welcome { font-size: clamp(1.5rem, 6vw, 2rem); color: var(--brand-primary); }

.search-input.search-input {
  font-size: 1.25rem;
  min-height: 60px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow);
}

.status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; min-height: 1.5em; margin: 12px 0; text-align: center; color: var(--brand-muted); }
.status:empty { margin: 4px 0; }
.status-error { color: var(--brand-danger); background: var(--brand-danger-bg); padding: 12px; border-radius: var(--radius-sm); }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card {
  display: flex; align-items: center; gap: 12px;
  background: var(--brand-surface);
  border-radius: var(--radius);
  padding: 14px 14px 14px 18px;
  box-shadow: var(--shadow);
  min-height: 72px;
}
.card-info { flex: 1; min-width: 0; }
.card-name { font-size: 1.2rem; font-weight: 700; }
.card-parent { font-size: 0.95rem; }
.card .btn { flex-shrink: 0; min-width: 88px; }

/* Sticky tray: part of the normal flow, so it doesn't jump when the keyboard opens. */
.tray {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--brand-surface);
  box-shadow: var(--shadow-up);
  border-radius: 20px 20px 0 0;
  padding: 14px calc(16px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(16px + var(--safe-left));
}
.tray-inner { max-width: 640px; margin: 0 auto; }
.tray-title { font-size: 1.1rem; margin-bottom: 8px; }
.tray-list {
  list-style: none; margin: 0 0 12px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 30vh; overflow-y: auto; overscroll-behavior: contain;
}
.chip {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--brand-info-bg); color: var(--brand-primary-dark);
  border-radius: 999px; padding: 0 0 0 14px; font-weight: 600; max-width: 100%;
}
.chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-remove {
  width: var(--tap); height: var(--tap); flex-shrink: 0;
  border: 0; background: transparent; color: inherit; font-size: 1.5rem; line-height: 1;
  border-radius: 999px; cursor: pointer; touch-action: manipulation;
}
.tray .btn-xl { width: 100%; }
.tray-error { color: var(--brand-danger); background: var(--brand-danger-bg); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; }

/* Celebration overlay */
.celebration {
  position: fixed;
  inset: 0;
  z-index: 100;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(24px + var(--safe-top)) calc(20px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(20px + var(--safe-left));
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, var(--brand-bg) 55%, #e2f2f4 100%);
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}
.celebrate-content { position: relative; z-index: 2; max-width: 560px; }
.check-svg { width: min(40vw, 160px); height: auto; display: block; margin: 0 auto 16px; }
.check-circle { fill: var(--brand-success); }
.check-mark {
  fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 80; stroke-dashoffset: 0;
}
.celebration.play .check-circle { transform-origin: 60px 60px; animation: pop 0.45s cubic-bezier(.2,1.6,.4,1) both; }
.celebration.play .check-mark { stroke-dashoffset: 80; animation: draw 0.5s 0.35s ease-out forwards; }
.celebrate-names { font-size: clamp(1.25rem, 5.5vw, 1.75rem); font-weight: 700; color: var(--brand-primary); margin-bottom: 8px; }
.celebrate-title { font-size: clamp(2.2rem, 11vw, 4rem); color: var(--brand-text); margin-bottom: 12px; }
.celebrate-note { font-size: 1.05rem; color: var(--brand-muted); }
.celebrate-hint { font-size: 0.9rem; color: var(--brand-muted); margin-top: 20px; }
.celebration.play .celebrate-names,
.celebration.play .celebrate-title { animation: rise 0.5s 0.5s ease-out both; }

.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.confetti span {
  position: absolute; left: 50%; top: 42%;
  width: 10px; height: 16px; margin: -8px 0 0 -5px;
  background: var(--c, var(--brand-accent));
  border-radius: 2px;
  opacity: 0;
  will-change: transform, opacity;
}
.confetti span.round { width: 12px; height: 12px; border-radius: 50%; }
.celebration.play .confetti span { animation: burst var(--t, 2s) var(--d, 0s) cubic-bezier(.15,.7,.3,1) forwards; }

@keyframes burst {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(0.6); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Admin
   ========================================================================== */
.login-view {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left));
}
.login-card {
  width: 100%; max-width: 380px; background: var(--brand-surface);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
  display: grid; gap: 12px;
}
.login-card .logo { width: 160px; margin: 0 auto; }
.login-card h1 { text-align: center; font-size: 1.4rem; }
.login-card label { font-weight: 600; }
.form-error { color: var(--brand-danger); background: var(--brand-danger-bg); border-radius: var(--radius-sm); padding: 10px 12px; }

.dash-view {
  max-width: 1200px; margin: 0 auto;
  padding: 0 calc(12px + var(--safe-right)) 0 calc(12px + var(--safe-left));
}
.admin-header {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 0 10px;
}
.admin-header .logo-sm { width: 110px; }
.admin-title { flex: 1; font-weight: 700; color: var(--brand-muted); min-width: 0; }

.banner { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; font-weight: 600; }
.banner-info { background: var(--brand-info-bg); color: var(--brand-primary-dark); }
.banner-success { background: var(--brand-success-bg); color: var(--brand-success); }
.banner-error { background: var(--brand-danger-bg); color: var(--brand-danger); }

.admin-tools { display: grid; gap: 8px; margin-bottom: 12px; }
.panel { background: var(--brand-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel > summary {
  min-height: 52px; display: flex; align-items: center; padding: 12px 16px;
  font-weight: 700; cursor: pointer; list-style: none; touch-action: manipulation; border-radius: var(--radius);
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::after { content: "▾"; margin-left: auto; transition: transform 0.2s; color: var(--brand-muted); }
.panel[open] > summary::after { transform: rotate(180deg); }
.panel-danger > summary { color: var(--brand-danger); }
.panel-body { padding: 0 16px 16px; display: grid; gap: 12px; justify-items: start; }
.panel-body > * { max-width: 100%; }
.panel-body label[for] { font-weight: 600; }
input[type="file"] { font-size: 16px; max-width: 100%; min-height: var(--tap); }

.radio-group { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; width: 100%; }
.radio-group legend { font-weight: 600; margin-bottom: 4px; }
.radio { display: flex; gap: 10px; align-items: flex-start; min-height: var(--tap); padding: 8px 0; cursor: pointer; }
.radio input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--brand-primary); }

.upload-result { width: 100%; background: var(--brand-success-bg); border-radius: var(--radius-sm); padding: 12px; }
.upload-result.upload-error { background: var(--brand-danger-bg); color: var(--brand-danger); }
.upload-result p { margin: 0 0 6px; }
.upload-result summary { cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; }
.skipped-list { margin: 4px 0 0; padding-left: 20px; max-height: 240px; overflow-y: auto; font-size: 0.95rem; }

.qr-body { justify-items: center; }
.qr-print { text-align: center; display: grid; justify-items: center; gap: 8px; }
.qr-logo { width: 160px; }
.qr { background: #fff; padding: 12px; border-radius: var(--radius-sm); line-height: 0; }
.qr img, .qr canvas { max-width: min(256px, 70vw); height: auto; }
.qr-error { line-height: 1.4; color: var(--brand-danger); max-width: 260px; }
.qr-caption { font-size: 1.3rem; font-weight: 700; margin: 0; }
.qr-url { margin: 0; }

/* Sticky stats + toolbar */
.sticky-top {
  position: sticky; top: 0; z-index: 20;
  background: var(--brand-bg);
  padding: calc(6px + var(--safe-top)) 0 8px;
  margin: 0 -2px;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.stat {
  background: var(--brand-surface); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 8px 6px; text-align: center; display: flex; flex-direction: column; min-width: 0;
}
.stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.78rem; color: var(--brand-muted); }
.stat-in .stat-num { color: var(--brand-success); }
.stat-out .stat-num { color: var(--brand-accent-dark); }

.toolbar { display: grid; gap: 8px; }
.toolbar-search { min-height: 48px !important; }
.segmented {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--brand-surface); border: 2px solid var(--brand-border); border-radius: 999px; padding: 3px;
}
.segmented label { position: relative; display: block; cursor: pointer; touch-action: manipulation; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 4px 6px;
  border-radius: 999px; font-weight: 600; font-size: 0.95rem; text-align: center; color: var(--brand-muted);
}
.segmented input:checked + span { background: var(--brand-primary); color: #fff; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }

/* Guest table (tablet / desktop) */
.table-wrap {
  background: var(--brand-surface); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  max-width: 100%;
}
.guest-table { width: 100%; border-collapse: collapse; }
.guest-table th, .guest-table td { padding: 8px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--brand-border); }
.guest-table th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-muted); white-space: nowrap; }
.guest-table tbody tr { height: 52px; }
.guest-table tbody tr.is-in { background: #f7fdfa; }
.col-check { width: 56px; }
.col-time, .col-by { white-space: nowrap; }
.col-action { text-align: right; width: 1%; white-space: nowrap; }
.check-hit { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); cursor: pointer; }
.guest-table input[type="checkbox"] { width: 24px; height: 24px; margin: 0; accent-color: var(--brand-primary); cursor: pointer; }
#select-all { margin: 10px; }
.btn-undo { min-height: var(--tap); padding: 8px 16px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.pill-in { background: var(--brand-success-bg); color: var(--brand-success); }
.pill-out { background: #fff1e0; color: #a65a00; }
.table-empty { text-align: center; padding: 24px 16px; margin: 0; }

.bulk-bar {
  position: sticky; bottom: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--brand-bg);
  padding: 10px 0 calc(10px + var(--safe-bottom));
  margin-top: 8px;
}

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 200;
  height: 100vh; height: 100dvh;
  background: rgba(43, 47, 50, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 var(--safe-right) 0 var(--safe-left);
}
.modal-card {
  width: 100%; max-width: 480px; background: var(--brand-surface);
  border-radius: 20px 20px 0 0;
  padding: 22px 20px calc(20px + var(--safe-bottom));
  display: grid; gap: 12px; max-height: 100%; overflow-y: auto;
}
.modal-card h2 { font-size: 1.3rem; margin: 0; }
.modal-card p { margin: 0; color: var(--brand-muted); }
#modal-type-wrap { display: grid; gap: 6px; }
#modal-type-wrap label { font-weight: 600; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.modal-actions .btn { width: 100%; }
body.modal-open { overflow: hidden; }

/* ---- Phones: guest rows become stacked cards ---- */
@media (max-width: 639.98px) {
  .table-wrap { background: transparent; box-shadow: none; overflow: visible; }
  .guest-table, .guest-table tbody { display: block; }
  .guest-table thead { display: block; }
  .guest-table thead tr { display: flex; align-items: center; }
  .guest-table thead th { display: none; border: 0; padding: 0; }
  .guest-table thead th.col-check { display: flex; align-items: center; width: auto; text-transform: none; letter-spacing: 0; font-size: 0.95rem; font-weight: 600; }
  .guest-table thead th.col-check::after { content: "Select all shown"; }

  .guest-table tbody tr {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas:
      "check child  status"
      "check parent parent"
      "check meta   action";
    align-items: center;
    column-gap: 8px; row-gap: 2px;
    height: auto;
    background: var(--brand-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 12px 10px 6px;
    margin-bottom: 10px;
  }
  .guest-table tbody tr.is-in { background: #f7fdfa; }
  .guest-table td { display: block; padding: 0; border: 0; }
  .guest-table .col-check { grid-area: check; width: auto; align-self: center; }
  .guest-table .col-child { grid-area: child; font-weight: 700; font-size: 1.1rem; }
  .guest-table .col-status { grid-area: status; justify-self: end; }
  .guest-table .col-parent { grid-area: parent; color: var(--brand-muted); font-size: 0.95rem; }
  .guest-table .col-parent:not(:empty)::before { content: "Parent: "; }
  .guest-table .col-time { grid-area: meta; color: var(--brand-muted); font-size: 0.9rem; white-space: normal; }
  .guest-table .col-by { display: none; }
  .guest-table .col-action { grid-area: action; width: auto; }
  .guest-table .col-time:empty, .guest-table .col-action:empty { min-height: 0; }
  .btn-undo { min-height: 48px; padding: 10px 22px; }
  .check-hit { width: 48px; height: 48px; }
  .guest-table input[type="checkbox"] { width: 28px; height: 28px; }

  .bulk-bar { margin: 0 calc(-12px - var(--safe-right)) 0 calc(-12px - var(--safe-left)); padding-left: calc(12px + var(--safe-left)); padding-right: calc(12px + var(--safe-right)); box-shadow: var(--shadow-up); background: var(--brand-surface); }
  .bulk-bar .btn { flex: 1; }
  .bulk-bar #shown-count { display: none; }
}

/* ---- Tablet and up ---- */
@media (min-width: 640px) {
  .dash-view { padding: 0 calc(20px + var(--safe-right)) 0 calc(20px + var(--safe-left)); }
  .stat-num { font-size: 1.9rem; }
  .stat-label { font-size: 0.9rem; }
  .toolbar { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .segmented { min-width: 300px; }
  .modal { align-items: center; padding: 20px; }
  .modal-card { border-radius: var(--radius); padding: 24px; }
  .admin-header .logo-sm { width: 120px; }
}
@media (min-width: 900px) {
  .admin-tools { grid-template-columns: repeat(3, 1fr); align-items: start; }
}
@media (min-width: 640px) and (max-width: 899.98px) {
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar-search { grid-column: 1 / -1; }
  .toolbar-actions { justify-content: flex-end; }
}

/* ==========================================================================
   Reduced motion: show the end state with no movement
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .celebration.play .check-circle,
  .celebration.play .celebrate-names,
  .celebration.play .celebrate-title { animation: none; }
  .celebration.play .check-mark { animation: none; stroke-dashoffset: 0; }
  .confetti { display: none; }
  .btn:active:not(:disabled) { transform: none; }
}

/* ==========================================================================
   Print: only the QR, the logo and "Scan to check in"
   ========================================================================== */
@media print {
  @page { margin: 15mm; }
  body { background: #fff !important; min-height: 0; }
  body.admin-page .admin-header, body.admin-page #global-msg, body.admin-page #upload-panel,
  body.admin-page #danger-panel, body.admin-page .guests, body.admin-page #qr-panel > summary,
  body.admin-page #print-btn, body.admin-page .login-view, body.admin-page .modal { display: none !important; }
  body.admin-page .panel { box-shadow: none; }
  body.admin-page .admin-tools { display: block; }
  .qr-print { gap: 16px; padding-top: 10mm; }
  .qr-logo { width: 70mm; }
  .qr { padding: 0; }
  .qr img, .qr canvas { width: 110mm !important; height: 110mm !important; max-width: none; }
  .qr-caption { font-size: 28pt; color: #000; }
  .qr-url { display: none; }
}

/* ==========================================================================
   Party name + "Powered by Luvant"
   ========================================================================== */
.welcome { color: var(--brand-black); }
.party-summary { color: var(--brand-primary); font-weight: 700; }
.qr-party { font-size: 1.25rem; font-weight: 800; margin: 4px 0 0; text-align: center; color: var(--brand-black); }

.site-footer {
  display: flex; justify-content: center;
  padding: 24px 16px calc(24px + var(--safe-bottom));
}
.powered {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 6px 12px;
  color: var(--brand-muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; border-radius: 999px;
}
.powered img { width: 92px; height: auto; display: block; }
.site-footer .powered { margin: 0; }

.powered-static { display: flex; width: max-content; margin: 16px auto 0; justify-content: center; }
.celebration .powered-static { opacity: 0.85; }
@media print {
  .site-footer { display: none !important; }
  .qr-print .powered-static img { width: 40mm; }
}
