:root {
  --bg: #FFFDF8;          /* warm white */
  --cream: #FFF4D2;       /* soft butter yellow */
  --gold-soft: #E5C25A;   /* soft gold (focus borders, decor) */
  --gold-deep: #94700F;   /* deep gold (text accents — readable on white) */
  --yellow: #FFD93D;
  --gold: #D4AF37;
  --ink: #111111;
  --muted: #5C5446;
  --line: #EFE3C2;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }
html { background: var(--cream); }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 65% 50% at 50% -8%, #FFE9A3 0%, rgba(255, 233, 163, 0) 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--cream) 100%);
  overflow-x: hidden;
}

/* ---------- header ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
}
.brand { display: inline-flex; }
.brand img { height: 66px; width: auto; display: block; }
.account { display: flex; align-items: center; gap: 10px; }
a.btn { text-decoration: none; color: var(--ink); display: inline-block; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px 96px;
  overflow: hidden;
}
.hero > :not(.float) { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}
.welcome {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(44px, 9vw, 108px);
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.welcome em {
  font-style: italic;
  color: var(--gold-deep);
  background: linear-gradient(180deg, #D9A93A 0%, #A47A12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.08em; /* keeps the italic's last letter from clipping */
}
.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 24px;
  color: var(--yellow);
  font-size: 18px;
  text-shadow: 0 0 1px var(--gold);
}
.rule span { width: 72px; height: 1px; background: var(--gold); }
.lede {
  max-width: 34ch;
  margin: 0 0 30px;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: balance;
}

/* the welcome fades in once we know who's here */
.welcome, .rule, .lede, #cta { transition: opacity 0.5s ease; }
body.loading .welcome, body.loading .lede, body.loading #cta { opacity: 0; }

/* ---------- decoration ---------- */
.float { position: absolute; pointer-events: none; }
.float-kite {
  bottom: 12%;
  right: 8%;
  width: clamp(80px, 12vw, 160px);
  opacity: 0.85;
  transform: rotate(14deg);
  animation: drift 9s ease-in-out infinite;
}
.sparkle { fill: var(--yellow); }
.s1 { width: 22px; top: 18%; left: 12%; animation: twinkle 3.2s ease-in-out infinite; }
.s2 { width: 14px; bottom: 22%; left: 20%; animation: twinkle 4s ease-in-out 1s infinite; }
.s3 { width: 16px; bottom: 30%; right: 16%; animation: twinkle 3.6s ease-in-out 0.5s infinite; }

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(14deg); }
  50% { transform: translateY(-14px) rotate(9deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .float-kite, .sparkle { animation: none; }
}

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  padding: 13px 30px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 5px 0 var(--yellow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--yellow); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--yellow); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost {
  padding: 9px 20px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover { background: #fff; }
.btn:focus-visible, input:focus-visible, .link:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
.full { width: 100%; margin-top: 6px; }

/* ---------- footer ---------- */
.footer {
  padding: 20px 16px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- sign-in dialog ---------- */
dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 34px 30px 28px;
  border: none;
  border-top: 4px solid var(--gold);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(120, 90, 20, 0.18);
}
dialog::backdrop { background: rgba(40, 30, 10, 0.28); backdrop-filter: blur(3px); }
dialog h2 {
  margin: 0 0 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 30px;
}
.close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.panel { display: flex; flex-direction: column; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
input {
  font: inherit;
  font-weight: 400;
  font-size: 16px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  width: 100%;
}
input:focus { border-color: var(--gold-soft); background: #fff; outline: none; }
.error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #FDEDEA;
  color: #A3203F;
  font-size: 14px;
}
.note { margin: 0; color: var(--muted); line-height: 1.5; }
.captcha { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.captcha-note { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.switch { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.link {
  font: inherit;
  font-weight: 600;
  color: var(--gold-deep);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 560px) {
  .brand img { height: 44px; }
  .row { grid-template-columns: 1fr; }
  .hero { padding-top: 24px; }
}

/* ---------- my account page ---------- */
.account-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px 72px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  border-top: 4px solid var(--gold);
  box-shadow: 0 14px 40px rgba(120, 90, 20, 0.08);
}
.avatar {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--cream);
  border: 3px solid var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 38px;
  color: var(--gold-deep);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.1;
}
.profile-title { margin: 4px 0 0; color: var(--gold-deep); font-weight: 600; }
.profile-meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.account-form {
  margin-top: 26px;
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(120, 90, 20, 0.08);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.account-form h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 28px;
}
.account-form .sub { margin: 4px 0 0; color: var(--muted); }
.account-form fieldset { border: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.account-form legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.readonly {
  font-size: 16px;
  font-weight: 400;
  padding: 11px 14px;
  border-radius: 12px;
  background: #F6F1E4;
  color: var(--muted);
}
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
.saved { margin: 0; color: #2F7A4F; font-weight: 600; font-size: 14px; }
.gate { text-align: center; padding: 72px 16px; }
.gate h1 { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: clamp(32px, 6vw, 48px); margin: 0 0 12px; }
.gate p { color: var(--muted); margin: 0 0 24px; }
.skeleton { height: 140px; border-radius: 22px; background: rgba(255, 255, 255, 0.6); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

@media (max-width: 560px) {
  .profile-card { flex-direction: column; text-align: center; padding: 24px 18px; }
  .account-form { padding: 22px 18px; }
  .account-form fieldset { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1; }
}

/* =========================================================
   App pages: PNM Data, Active Data, profiles, Round Readiness
   ========================================================= */
body.gated .app-main { visibility: hidden; }
body:not(.is-admin) .admin-only { display: none !important; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--gold-deep); }
textarea {
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  width: 100%;
  resize: vertical;
}
textarea:focus, select:focus { border-color: var(--gold-soft); outline: none; }
select {
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.note.small { font-size: 13px; }
.error-text { color: #A3203F; }
.link.small { font-size: 13px; }

/* header with navigation */
.topbar { flex-wrap: wrap; }
.sitenav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.sitenav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.sitenav a:hover { background: rgba(255, 255, 255, 0.7); }
.sitenav a[aria-current="page"] { background: var(--ink); color: #fff; }
.app-header .brand img { height: 54px; }

/* page frame */
.app-main { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 8px clamp(16px, 3vw, 32px) 64px; }
.page-head { margin: 8px 0 18px; }
.page-head h1, .h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: clamp(32px, 5vw, 46px);
}
.h2 { font-size: 26px; margin: 28px 0 12px; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h2 { font-family: "Playfair Display", Georgia, serif; font-style: italic; color: var(--ink); margin: 0 0 8px; }

/* toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 24px rgba(120, 90, 20, 0.07);
}
.toolbar .search { flex: 1 1 260px; min-width: 0; padding: 10px 14px; }
.toolbar .spacer { flex: 1 1 0; }
.toolbar-extra { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .btn-primary { padding: 9px 20px; font-size: 14px; box-shadow: 0 4px 0 var(--yellow); }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border: none; background: #fff; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sortby { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; }
.btn-icon { font: inherit; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 10px; cursor: pointer; }
details.menu { position: relative; }
details.menu > summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: " ▾"; color: var(--muted); }
.menu-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(60, 45, 10, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; }
.btn.small { padding: 8px 16px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--gold-soft);
  font-size: 13px;
  font-weight: 600;
}
.chip button { border: none; background: none; font-size: 16px; cursor: pointer; line-height: 1; padding: 0 4px; }
.count { margin: 12px 2px 8px; font-size: 13px; color: var(--muted); }

/* table */
.table-wrap {
  overflow: auto;
  max-height: 72vh;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(120, 90, 20, 0.07);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #FFF8E4;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--line);
}
.data-table th button {
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 11px 12px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid #F3ECDA; vertical-align: top; max-width: 320px; }
.data-table tbody tr:hover { background: #FFFBEF; cursor: pointer; }
.data-table td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.data-table td a:hover { text-decoration: underline; }
.data-table.compact td { cursor: default; }
.data-table.compact tbody tr:hover { cursor: default; }
.is-released { opacity: 0.55; }
.col-star { width: 44px; text-align: center; }
.data-table th.col-star button { padding: 11px 8px; }
.star { border: none; background: none; font-size: 20px; line-height: 1; color: #E3DCCB; cursor: default; padding: 2px; }
button.star { cursor: pointer; }
.star.on { color: var(--gold); text-shadow: 0 0 1px var(--gold-deep); }
.thumb { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.person-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 14px 18px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  box-shadow: 0 8px 24px rgba(120, 90, 20, 0.08);
  border-top: 3px solid var(--gold);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.person-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(120, 90, 20, 0.14); }
.person-photo, .profile-photo, .mini-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  color: var(--gold-deep);
  flex: none;
}
.person-photo { width: 104px; height: 104px; font-size: 34px; }
.profile-photo { width: 120px; height: 120px; font-size: 42px; }
.mini-photo { width: 44px; height: 44px; font-size: 16px; border-width: 2px; }
.person-photo img, .profile-photo img, .mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-name { font-weight: 600; font-size: 16px; margin-top: 6px; }
.person-num { font-size: 13px; color: var(--muted); }
.person-card .star { position: absolute; top: 10px; right: 10px; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #F4EEDD;
  color: var(--muted);
}
.badge.in { background: #E6F2E9; color: #2F6B45; }
.badge.released { background: #F6E6E6; color: #8A3A3A; }
.badge.ref { background: var(--cream); color: var(--gold-deep); border: 1px solid var(--gold-soft); }

/* modal dialogs (import / export / round update) */
dialog.modal.wide { width: min(860px, calc(100vw - 32px)); }
dialog.modal { max-height: calc(100vh - 48px); overflow: auto; }
dialog.modal h2 { margin-right: 28px; }
dialog.modal .step { display: flex; flex-direction: column; gap: 14px; }
dialog.modal .step[hidden] { display: none; }
.drop {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 2px dashed var(--gold-soft);
  border-radius: 16px;
  background: #FFFCF2;
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
}
.drop input { width: auto; max-width: 220px; }
.or { text-align: center; color: var(--muted); font-size: 13px; }
.row-inline { display: flex; gap: 8px; }
.row-inline input { flex: 1; min-width: 0; }
.inline-field { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; }
.map-table td { cursor: default; }
.map-table select { width: 100%; min-width: 180px; }
.export-cols {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 14px;
}
.export-cols legend, .export-rows legend { font-weight: 600; margin-bottom: 8px; }
.export-rows { border: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  z-index: 100;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* profile pages */
.back { display: inline-block; margin: 4px 0 14px; color: var(--muted); font-weight: 600; text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.hero-card { flex-wrap: wrap; }
.profile-head { flex: 1 1 280px; min-width: 0; }
.eyebrow-sm { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.panel {
  margin-top: 20px;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(120, 90, 20, 0.07);
}
.profile-cols .panel:first-child { margin-top: 0; }
.panel.soft { background: rgba(255, 255, 255, 0.55); box-shadow: none; border: 1.5px dashed var(--line); }
.panel h2 { margin: 0 0 14px; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 26px; }
.panel h3 { margin: 22px 0 10px; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 20px; margin: 0; }
.info-grid dt { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.info-grid dd { margin: 4px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--cream); font-size: 13px; }
.tag a { color: var(--gold-deep); font-weight: 600; }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pics img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.perma-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.perma-card {
  display: grid;
  grid-template-columns: auto 1fr 64px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #FFFCF3;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.perma-card:hover { border-color: var(--gold-soft); }
.perma-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.perma-body .muted { font-size: 13px; }
.reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reasons .tag { font-size: 12px; background: #fff; border: 1px solid var(--line); }
.meter { height: 6px; border-radius: 999px; background: #F3ECDA; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 6px; }
.stat {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border-radius: 14px;
  background: #FFFCF3;
  border: 1px solid var(--line);
}
.stat-num { font-family: "Playfair Display", Georgia, serif; font-size: 30px; color: var(--gold-deep); }
.stat-label { font-size: 13px; color: var(--muted); }

/* round readiness */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.tabs a[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
#rounds .stats { margin-bottom: 16px; }
.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #FFF8E1;
  border: 1.5px solid var(--gold-soft);
}
.callout > div { flex: 1 1 320px; }
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.party-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(120, 90, 20, 0.07);
}
.party-card:hover { box-shadow: 0 10px 24px rgba(120, 90, 20, 0.14); }
.party-num { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 30px; color: var(--gold-deep); line-height: 1; }
.released-box { margin-top: 24px; padding: 14px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.6); }
.released-box summary { cursor: pointer; font-weight: 600; }
.people { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.person-row:hover { background: #FFFBEF; }
.row-stat { margin-left: auto; font-size: 13px; color: var(--muted); }

/* home quick links */
.quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  width: min(900px, 100%);
  margin-top: 10px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border-top: 3px solid var(--gold);
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  box-shadow: 0 8px 24px rgba(120, 90, 20, 0.08);
}
.quick-card:hover { transform: translateY(-2px); }
.quick-title { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 22px; }
.quick-sub { font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  .profile-cols { grid-template-columns: 1fr; }
  .sitenav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  .sitenav a { white-space: nowrap; }
}
@media (max-width: 560px) {
  .app-header .brand img { height: 42px; }
  .toolbar .search { flex-basis: 100%; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .person-photo { width: 84px; height: 84px; }
  .perma-card { grid-template-columns: auto 1fr; }
  .perma-card .meter { grid-column: 1 / -1; }
  .menu-panel { position: fixed; left: 16px; right: 16px; top: auto; min-width: 0; }
}
.data-table.compact th { padding: 10px 12px; font-size: 13px; }
@media (max-width: 560px) {
  .topbar .account { gap: 6px; }
  .topbar .account .btn-ghost { padding: 7px 12px; font-size: 13px; }
  .app-header { gap: 10px; }
}

.account-form .span-2 { grid-column: 1 / -1; }
/* the sign-in popup's panels are plain sections, not profile cards */
dialog .panel { margin: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; border: none; }
