/* Birthday Check-in System — Modern UI
   Framework-free; uses CSS variables + system font stack for fast loads. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  /* Golden Jubilee palette.
     Bright gold (#D4AF37) is only 2.1:1 on white, so it is decorative ONLY —
     it appears on dark surfaces. Anything carrying text uses the deeper golds,
     which clear WCAG AA. Don't swap --primary for a brighter gold without
     re-checking contrast. */
  --primary:        #8c6a00;   /* buttons, links — 5.03:1 on white   */
  --primary-light:  #fbf4df;   /* champagne chip bg — 4.57:1 w/ --primary */
  --primary-dark:   #5c4600;   /* hover — 9.01:1 on white            */
  --primary-50:     #fdfaf0;   /* cream row hover                    */
  --accent:         #b8860b;   /* gradient partner — 3.25:1, large text only */
  --gold:           #d4af37;   /* metallic gold — decorative, dark bg only   */
  --success:        #059669;
  --success-light:  #d1fae5;
  --danger:         #dc2626;
  --danger-light:   #fee2e2;
  --warning:        #d97706;
  --warning-light:  #fef3c7;

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #0f172a;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow:    0 4px 12px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--gray-500); }
.small { font-size: .82rem; }
.hint  { font-size: .82rem; color: var(--gray-500); margin: .5rem 0; }
code   { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--gray-100); padding: 1px 6px; border-radius: 4px; }

/* ============ NAV ============ */
.nav {
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.brand-title { font-weight: 700; font-size: 1rem; line-height: 1.1; color: var(--gray-800); }
.brand-sub   { font-size: .78rem; color: var(--gray-500); margin-top: 2px; }
.nav-links { display: flex; gap: 1.25rem; }
.nav-links a { color: var(--gray-600); font-size: .9rem; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* ============ LAYOUT ============ */
.container       { max-width: 1180px; margin: 0 auto; padding: 1.5rem; }
.container-narrow{ max-width: 720px; }
.page-header     { margin-bottom: 1.5rem; }
.page-header h1  { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }

/* ============ CARDS ============ */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.section { margin-top: 1rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: .75rem; }
.section-head.wrap { flex-wrap: wrap; }
.section-head h2 { font-size: 1rem; font-weight: 700; }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ============ STATS ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.stat-card .label { font-size: .72rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat-card .value { font-size: 2.1rem; font-weight: 800; line-height: 1.1; margin-top: 6px; letter-spacing: -.02em; }
.stat-card.checked .value { color: var(--success); }
.stat-card.pending .value { color: var(--warning); }
.stat-card.total   .value { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ PROGRESS ============ */
.progress-wrap { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.progress-bar { height: 10px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 99px; transition: width .8s cubic-bezier(.22,.61,.36,1);
}
.progress-label { font-size: .82rem; color: var(--gray-600); margin-top: 8px; font-weight: 500; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: .55rem 1rem; border-radius: 10px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-family: inherit; line-height: 1.2;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(140,106,0,.30); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 14px rgba(140,106,0,.28); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-lg { padding: .8rem 1.2rem; font-size: 1rem; width: 100%; margin-top: .5rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--gray-200); background: #fff;
  padding: 4px 8px; border-radius: 6px;
  font-size: .8rem; color: var(--gray-700); cursor: pointer;
  margin-right: 4px; text-decoration: none;
  transition: .12s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ============ FORMS ============ */
input, select, textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
  color: var(--gray-800);
  transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(140,106,0,.15);
}
textarea { resize: vertical; min-height: 90px; }
label {
  font-size: .82rem; font-weight: 600; color: var(--gray-600);
  display: block; margin-bottom: 6px;
}
.req { color: var(--danger); }
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--gray-100); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left; padding: .7rem .85rem;
  background: var(--gray-50);
  font-size: .72rem; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
td { padding: .7rem .85rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }
td.muted { color: var(--gray-500); }
.empty-cell { text-align: center; padding: 2.5rem; color: var(--gray-400); }
.row-actions { white-space: nowrap; }
.row-actions .btn { margin-left: 4px; }
.invite-cell { white-space: nowrap; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  font-size: .72rem; font-weight: 700;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }

/* ============ SEARCH BAR ============ */
.search-bar { display: flex; gap: .75rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 200px; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 100;
  animation: fadeIn .15s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s cubic-bezier(.22,.61,.36,1);
}
.modal h2 { font-size: 1.15rem; margin-bottom: 1rem; font-weight: 700; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; flex-wrap: wrap; }
.confirm-modal { text-align: center; max-width: 380px; }
.qr-modal      { max-width: 420px; text-align: center; }
.qr-modal h2   { margin-bottom: .25rem; }

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--gray-900); color: #fff;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0; transition: .25s; pointer-events: none;
  max-width: calc(100vw - 2rem);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ============ LOGIN ============ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(184,134,11,.16), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(212,175,55,.22), transparent 40%),
    linear-gradient(135deg, var(--primary-50), #fff);
  padding: 2rem 1rem;
}
.login-box {
  background: #fff; border-radius: var(--radius-xl);
  padding: 2.5rem 2rem; width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-box .icon {
  width: 64px; height: 64px; border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 1rem;
}
.login-box h1 { text-align: center; font-size: 1.4rem; margin-bottom: .25rem; font-weight: 800; }
.login-box p  { text-align: center; font-size: .9rem; margin-bottom: 1.5rem; }

/* ============ CHECK-IN PAGE (door) ============ */
.mode-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .5rem; background: var(--gray-100); padding: .25rem;
  border-radius: 12px; margin: 1rem 0 1.25rem;
}
.mode-tab {
  background: transparent; border: 0; padding: .65rem 1rem;
  border-radius: 9px; font-size: .92rem; font-weight: 600;
  color: var(--gray-600); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: .15s;
}
.mode-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.mode-panel { animation: fadeIn .2s ease; }
.search-card { padding: .5rem; }
.search-card input { font-size: 1rem; padding: .9rem 1rem; border: 0; box-shadow: none; }
.search-card input:focus { box-shadow: none; }

.guest-card {
  background: #fff; border-radius: var(--radius);
  padding: 1rem 1.1rem;
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: .5rem; cursor: pointer;
  transition: .15s;
  box-shadow: var(--shadow-sm);
}
.guest-card:hover { border-color: var(--primary); background: var(--primary-50); transform: translateY(-1px); }
.guest-card .gname { font-weight: 700; }
.guest-card .gmeta { font-size: .82rem; color: var(--gray-500); }
.guest-card.done   { opacity: .55; cursor: default; }
.guest-card.done:hover { transform: none; background: #fff; border-color: var(--gray-200); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray-400); }
.empty-state p { margin-top: .35rem; }
.empty-emoji { font-size: 2.4rem; }

/* SCANNER */
.scanner-card { padding: 1rem; }
.scanner-frame {
  position: relative;
  background: #0f172a;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  margin-bottom: 1rem;
}
.scanner-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-reticle {
  position: absolute; inset: 14%;
  border: 3px solid rgba(255,255,255,.85);
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.4);
  pointer-events: none;
}
.scanner-status {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff;
  padding: 6px 14px; border-radius: 99px;
  font-size: .8rem; font-weight: 500;
}
.scanner-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.celebrate-emoji { font-size: 3.5rem; margin-bottom: .5rem; }

/* ============ EVENT PAGES (guest + register) ============ */
.event-page {
  background:
    radial-gradient(circle at 20% 10%, rgba(184,134,11,.16), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(212,175,55,.22), transparent 40%),
    linear-gradient(160deg, var(--primary-50) 0%, #fff 60%);
  min-height: 100vh;
}
.event-shell { max-width: 540px; margin: 0 auto; padding: 1rem; }

.event-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16/10;
  margin-top: .5rem;
  box-shadow: var(--shadow-md);
}
.event-hero-img {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  background-size: cover; background-position: center;
  transition: .3s;
}
.event-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.0) 0%, rgba(15,23,42,.55) 100%);
}
.event-hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.25rem 1.25rem 1.1rem;
  color: #fff;
}
.event-host-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.25) center/cover no-repeat;
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #fff;
  margin-bottom: .65rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}
.event-host-avatar.has-image span { display: none; }
.event-hero-content h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.event-meta { display: flex; gap: 12px; margin-top: .5rem; font-size: .85rem; opacity: .95; flex-wrap: wrap; }
.event-meta span { background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 99px; backdrop-filter: blur(6px); }

.event-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.25rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15,23,42,.04);
}
.event-card-head h2 { font-size: 1.25rem; font-weight: 800; }
.event-card-head { margin-bottom: 1.1rem; }
.event-closed { text-align: center; color: var(--gray-500); padding: 1rem 0; }

.event-footer { text-align: center; color: var(--gray-400); font-size: .75rem; padding: 1.5rem 0 2rem; }

.profile-block { text-align: center; margin-bottom: 1rem; }
.big-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #fff);
  color: var(--primary);
  font-weight: 800; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .75rem;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
}
.chip {
  display: inline-block;
  background: var(--primary-light); color: var(--primary);
  padding: 3px 12px; border-radius: 99px;
  font-size: .8rem; font-weight: 600;
  margin-top: .25rem;
}
.success-pill {
  background: var(--success-light); color: var(--success);
  padding: .8rem 1rem; border-radius: 12px;
  font-weight: 700; text-align: center;
  margin: 1rem 0;
}
.celebrate { text-align: center; padding: 1rem 0; }
.celebrate h2 { font-size: 1.5rem; font-weight: 800; margin: .25rem 0 .25rem; }

.state-loading { color: var(--gray-400); text-align: center; padding: 1.5rem; }
.state-error   { color: var(--danger);    text-align: center; padding: 1.5rem; }

.qr-frame {
  background: #fff;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  margin: 1rem 0;
}
.qr-frame img { width: 100%; max-width: 240px; height: auto; }
.qr-frame.compact { padding: .75rem; }
.qr-frame.compact img { max-width: 180px; }
.qr-modal .qr-frame img { max-width: 220px; }

.success-card { text-align: center; }
.success-burst { font-size: 3.5rem; margin-bottom: .25rem; }
.success-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .5rem; margin-top: 1rem;
}
.success-actions .btn { width: 100%; }
.event-help { margin-top: 1.5rem; font-size: .85rem; color: var(--gray-500); }
.event-help summary { cursor: pointer; }

/* ============ RSVP BANNER (admin) ============ */
.rsvp-banner {
  display: flex; align-items: center; gap: 1.25rem;
  background: linear-gradient(135deg, var(--primary-50), #fff);
  border: 1px solid var(--primary-light);
  margin-bottom: 1rem;
  padding: 1.25rem;
}
.rsvp-banner h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.rsvp-banner-text { flex: 1; }
.rsvp-banner-qr img { width: 96px; height: 96px; display: block; border-radius: 8px; }
.rsvp-link { display: flex; align-items: center; gap: 6px; margin-top: .75rem; flex-wrap: wrap; }
.rsvp-link code { font-size: .8rem; padding: 6px 10px; background: #fff; border: 1px solid var(--gray-200); border-radius: 6px; word-break: break-all; }

/* ============ RECENT ROW ============ */
.recent-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.recent-row:last-child { border-bottom: 0; }

/* ============ CONFETTI ============ */
.confetti {
  position: fixed; top: -10px;
  width: 8px; height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fall linear forwards;
  z-index: 1000;
}
@keyframes confetti-fall {
  0%   { transform: translateY(0)   rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn  { from { opacity: 0; }       to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .container { padding: 1rem; }
  .form-row  { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .rsvp-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .rsvp-banner-qr { align-self: center; }
  .success-actions { grid-template-columns: 1fr; }
  .event-shell { padding: .75rem; }
  .event-hero { aspect-ratio: 4/3; }
  .event-hero-content h1 { font-size: 1.4rem; }
}

/* ============ HEALTH BANNER ============ */
.health-banner {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  color: #78350f;
  padding: .9rem 1.1rem;
  margin-bottom: 1.2rem;
}
.health-banner strong { display:block; margin-bottom:.4rem; font-size:1rem; }
.health-banner ul { margin: .3rem 0 .5rem 1.1rem; padding: 0; }
.health-banner li { margin: .2rem 0; }
.health-banner code { background:rgba(0,0,0,.08); padding:1px 5px; border-radius:4px; }

/* ============ BULK WHATSAPP LIST ============ */
.bulk-wa-list {
  max-height: 50vh;
  overflow-y: auto;
  margin: .8rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.bulk-wa-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:.55rem .8rem; border-bottom:1px solid #f1f5f9; gap:.6rem;
}
.bulk-wa-row:last-child { border-bottom:none; }

/* ============ PRINT ============ */
@media print {
  .nav, .toast, .modal-overlay, .actions-row, .search-bar, .row-actions { display: none !important; }
}

/* ============ GOLDEN JUBILEE BADGE ============ */
/* Sits on the hero. Bright gold is decorative here, so the text on top is a
   deep brown (7.56:1 on #d4af37, 4.89:1 on the darker gradient end) rather
   than white, which would only manage 2.1:1. */
.jubilee-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding: .4rem .7rem .45rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #f0d878 0%, var(--gold) 45%, var(--accent) 100%);
  color: #2b2100;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 6px 18px rgba(0,0,0,.30);
}
.jubilee-num {
  font-size: 1.4rem; font-weight: 900; line-height: 1; letter-spacing: -.03em;
}
.jubilee-label {
  font-size: .52rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; margin-top: 3px; white-space: nowrap;
}
@media (max-width: 380px) {
  .jubilee-badge { top: 10px; right: 10px; padding: .3rem .55rem .35rem; }
  .jubilee-num   { font-size: 1.15rem; }
  .jubilee-label { font-size: .46rem; }
}

/* ============ EVENT SETTINGS PANEL ============ */
#settings-panel { padding: 0; }
.settings-summary {
  list-style: none; cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  border-radius: var(--radius);
}
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary::after {
  content: '▾'; color: var(--gray-400); font-size: .9rem; transition: transform .15s ease;
}
#settings-panel[open] .settings-summary::after { transform: rotate(180deg); }
.settings-summary:hover { background: var(--primary-50); }
.settings-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--gray-200); padding-top: 1rem; }
.settings-rule { border: 0; border-top: 1px solid var(--gray-200); margin: 1.25rem 0 1rem; }
.settings-h3 { font-size: .95rem; font-weight: 700; margin-bottom: .25rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: .85rem; }
.photo-slot { display: flex; gap: .85rem; align-items: center; }
.photo-preview {
  width: 96px; height: 60px; flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--gray-100) center/cover no-repeat;
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; color: var(--gray-400);
}
.photo-preview.round { width: 60px; height: 60px; border-radius: 50%; }
.photo-slot .btn { margin-top: .4rem; }
