[hidden] { display: none !important; }

:root {
  --ink: #0e0d0c;
  --ink-2: #161412;
  --ink-3: #1f1c19;
  --line: rgba(201, 169, 110, 0.18);
  --line-strong: rgba(201, 169, 110, 0.4);
  --ivory: #f2ece1;
  --ivory-dim: #b9b1a4;
  --muted: #847c70;
  --gold: #c9a96e;
  --gold-bright: #e2c78f;
  --rose: #c98a7a;
  --sage: #8fa58a;
  --danger: #d0796a;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --radius: 2px;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 169, 110, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(201, 138, 122, 0.05), transparent 60%),
    var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.01em;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }
::selection { background: var(--gold); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: 0.01em; line-height: 1.15; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
em, .italic { font-family: var(--serif); font-style: italic; }

.eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--gold);
  font-weight: 400;
}
.muted { color: var(--muted); }
.dim { color: var(--ivory-dim); }
.small { font-size: 0.85rem; }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); border: 0; margin: 2.5rem 0; }

/* ---------- Layout ---------- */
/* The sidebar is pinned with position: fixed (not sticky). Bugpatrol found some Chromium builds
   stop painting a sticky sidebar after a page change, leaving the navigation invisible. */
.shell { min-height: 100vh; padding-left: 250px; }
.sidebar {
  border-right: 1px solid var(--line);
  padding: 2.2rem 1.6rem;
  position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 10; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2rem;
  background: linear-gradient(180deg, #161412, #0e0d0c);
}
.brand { font-family: var(--serif); font-size: 1.6rem; letter-spacing: 0.06em; color: var(--ivory); }
.brand small { display: block; font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); margin-top: 0.3rem; }
.nav { display: flex; flex-direction: column; gap: 0.2rem; }
.nav a {
  color: var(--ivory-dim); padding: 0.6rem 0.8rem; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.2em; border-left: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.nav a:hover { color: var(--ivory); }
.nav a.active { color: var(--gold-bright); border-left-color: var(--gold); background: rgba(201, 169, 110, 0.05); }
.nav .count { float: right; color: var(--ink); background: var(--gold); border-radius: 999px; font-size: 0.65rem; padding: 0 0.5rem; letter-spacing: 0; }
.sidebar .who { margin-top: auto; font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 1.2rem; overflow-wrap: anywhere; min-width: 0; }
.sidebar .who .role { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.main { padding: 3rem clamp(1.2rem, 4vw, 4rem) 5rem; max-width: 1240px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.page-head p { margin: 0.6rem 0 0; color: var(--ivory-dim); max-width: 46ch; }

.mobile-bar { display: none; }
@media (max-width: 880px) {
  .shell { padding-left: 0; }
  .sidebar { position: fixed; inset: 0 30% 0 0; z-index: 30; transform: translateX(-105%); transition: transform .3s; height: 100%; }
  .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .mobile-bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
  .main { padding-top: 2rem; }
}

/* ---------- Surfaces ---------- */
.card {
  background: linear-gradient(180deg, rgba(31, 28, 25, 0.7), rgba(22, 20, 18, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.card + .card { margin-top: 1.4rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2rem; }
.stat { background: var(--ink-2); padding: 1.5rem 1.6rem; }
.stat .value { font-family: var(--serif); font-size: 2.4rem; line-height: 1.1; color: var(--ivory); }
.stat .label { font-size: 0.65rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); margin-top: 0.4rem; }
a.stat-link { display: block; color: inherit; transition: background 0.2s, border-color 0.2s; }
a.stat-link:hover, a.stat-link:focus-visible { background: var(--ink-3); color: inherit; }
a.stat-link:hover .label, a.stat-link:focus-visible .label { color: var(--gold); }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 1.2rem; }
label.field > span { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.26em; color: var(--ivory-dim); margin-bottom: 0.5rem; }
input, select, textarea {
  width: 100%;
  background: transparent;
  color: var(--ivory);
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.6rem 0.1rem;
  font: inherit;
  font-size: 1rem;
  border-radius: 0;
  transition: border-color .2s;
  color-scheme: dark;
}
textarea { border: 1px solid var(--line-strong); padding: 0.8rem; min-height: 110px; resize: vertical; }
select { background: var(--ink-2); padding-left: 0.4rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input[type='checkbox'], input[type='radio'] { width: auto; accent-color: var(--gold); }
.check { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 1.2rem; color: var(--ivory-dim); }
.row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.row > .shrink { flex: 0 0 auto; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.7rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.28em;
  padding: 0.95rem 1.8rem;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .25s, color .25s, border-color .25s, transform .1s;
  white-space: nowrap;
}
.btn:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: rgba(201, 169, 110, 0.1); color: var(--gold-bright); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--ivory-dim); }
.btn.quiet:hover { border-color: var(--line-strong); color: var(--ivory); }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(208, 121, 106, 0.5); }
.btn.danger:hover { background: rgba(208, 121, 106, 0.1); }
.btn.sm { padding: 0.55rem 1rem; font-size: 0.62rem; letter-spacing: 0.22em; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.linklike { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; padding: 0; }

.error { color: var(--danger); font-size: 0.9rem; min-height: 1.4em; margin: 0.4rem 0 0.8rem; }

/* ---------- Tables & lists ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-weight: 400; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.24em; color: var(--muted); padding: 0.8rem 0.8rem; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 1rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: rgba(201, 169, 110, 0.03); }

.pill { display: inline-block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.22em; padding: 0.25rem 0.7rem; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; }
.pill.requested { color: var(--gold); }
.pill.confirmed { color: var(--sage); }
.pill.completed { color: var(--ivory-dim); }
.pill.declined, .pill.cancelled, .pill.suspended { color: var(--danger); }
.pill.active { color: var(--sage); }
.pill.owner { color: var(--gold-bright); }
.pill.companion { color: var(--rose); }
.pill.client { color: var(--ivory-dim); }
.pill.free { color: var(--sage); }
.pill.busy { color: var(--muted); }

.list-item { padding: 1.2rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1.2rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.list-item:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.25rem; }

/* ---------- Companion cards ---------- */
.portrait {
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #2a241e, #15120f 70%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); transition: transform 1.2s ease; }
.portrait .monogram { font-family: var(--serif); font-size: 5rem; color: rgba(201, 169, 110, 0.55); font-style: italic; }
.portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(14, 13, 12, 0.85)); pointer-events: none; }
.companion-card { display: block; color: var(--ivory); }
.companion-card:hover { color: var(--ivory); }
.companion-card:hover img { transform: scale(1.04); }
.companion-card .meta { padding: 1.1rem 0.2rem 0; }
.companion-card h3 { font-size: 1.7rem; }
.companion-card .tagline { color: var(--ivory-dim); font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.companion-card .facts { display: flex; justify-content: space-between; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 0.7rem; }
.portrait .badge { position: absolute; top: 1rem; left: 1rem; z-index: 2; background: rgba(14, 13, 12, 0.7); backdrop-filter: blur(6px); }

.profile { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 3rem; }
@media (max-width: 880px) { .profile { grid-template-columns: 1fr; } }
.profile .bio { font-size: 1.05rem; color: var(--ivory-dim); white-space: pre-line; }
.guides { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 600px) { .guides { grid-template-columns: 1fr; } }
.guides ul { list-style: none; padding: 0; margin: 0.8rem 0 0; }
.guides li { padding: 0.45rem 0 0.45rem 1.6rem; position: relative; color: var(--ivory-dim); }
.guides li::before { position: absolute; left: 0; font-family: var(--serif); }
.guides .do li::before { content: '✦'; color: var(--gold); font-size: 0.8rem; top: 0.6rem; }
.guides .dont li::before { content: '—'; color: var(--rose); }

.hours { display: grid; grid-template-columns: 110px 1fr; row-gap: 0.4rem; font-size: 0.9rem; }
.hours dt { color: var(--muted); text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.2em; padding-top: 0.2rem; }
.hours dd { margin: 0; color: var(--ivory-dim); }

/* ---------- Auth / landing ---------- */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
@media (max-width: 900px) { .landing { grid-template-columns: 1fr; } }
.landing .hero {
  padding: clamp(2rem, 6vw, 5rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(14, 13, 12, 0) 0%, rgba(14, 13, 12, 0.9) 100%),
    radial-gradient(800px 500px at 30% 30%, rgba(201, 169, 110, 0.12), transparent 70%);
  position: relative; overflow: hidden;
}
.landing .hero::before {
  content: ''; position: absolute; inset: 2rem; border: 1px solid var(--line); pointer-events: none;
}
.landing .hero h1 { max-width: 12ch; }
.landing .hero h1 em { color: var(--gold); }
.landing .hero p { color: var(--ivory-dim); max-width: 42ch; font-size: 1.05rem; }
.landing .pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 640px; }
.landing .pillars div { border-top: 1px solid var(--line-strong); padding-top: 0.9rem; font-size: 0.85rem; color: var(--ivory-dim); }
.landing .pillars strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--ivory); }
.landing .panel { padding: clamp(2rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: center; max-width: 520px; width: 100%; margin: 0 auto; }
.tabs { display: flex; gap: 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.26em; padding: 0 0 0.9rem; cursor: pointer; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--gold-bright); border-bottom-color: var(--gold); }

/* ---------- Schedule editor ---------- */
.day-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 1rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.day-row .windows { display: flex; flex-direction: column; gap: 0.5rem; }
.window { display: flex; gap: 0.6rem; align-items: center; }
.window input { max-width: 130px; padding: 0.3rem 0.1rem; }
.day-row .day { font-family: var(--serif); font-size: 1.2rem; }
@media (max-width: 600px) { .day-row { grid-template-columns: 1fr; } }

.guide-edit { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.5rem; }
.guide-edit select { flex: 0 0 110px; }

/* ---------- Activity ---------- */
.log-item { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.log-item time { color: var(--muted); font-size: 0.78rem; }
.log-item .action { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
.log-item details { color: var(--muted); font-size: 0.8rem; margin-top: 0.3rem; }
.log-item pre { white-space: pre-wrap; word-break: break-word; background: var(--ink); border: 1px solid var(--line); padding: 0.7rem; margin: 0.4rem 0 0; font-size: 0.75rem; color: var(--ivory-dim); }
@media (max-width: 600px) { .log-item { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ---------- Rules ---------- */
.rule-card { border-left: 1px solid var(--gold); padding: 0.4rem 0 0.4rem 1.4rem; margin-bottom: 2rem; }
.rule-card .body { color: var(--ivory-dim); white-space: pre-line; margin: 0.6rem 0 0.9rem; }

/* ---------- Modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 5, 4, 0.75); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; animation: fade .2s ease; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; background: var(--ink-2); border: 1px solid var(--line-strong); padding: 2.2rem; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 1.4rem; }
.secret { font-family: ui-monospace, Menlo, monospace; background: var(--ink); border: 1px dashed var(--gold); padding: 0.9rem; font-size: 1.1rem; color: var(--gold-bright); letter-spacing: 0.08em; text-align: center; user-select: all; }
#toast { position: fixed; bottom: 2rem; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--ivory); color: var(--ink); padding: 0.85rem 1.6rem; font-size: 0.78rem; letter-spacing: 0.12em; transition: all .3s; pointer-events: none; z-index: 60; max-width: calc(100% - 2rem); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--danger); color: #fff; }

.fade-in { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.loading { padding: 4rem; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.3rem; }

/* ---------- Avatars, attributes ---------- */
.avatar { border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); background: var(--ink-3); display: block; flex: 0 0 auto; }
.avatar-mono { display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.1rem; }
.companion-card .attrs { font-size: 0.78rem; color: var(--ivory-dim); margin-top: 0.35rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-size: 0.72rem; letter-spacing: 0.08em; padding: 0.3rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ivory-dim); }
.list-item > .shrink { flex: 0 0 auto; }

/* ---------- Calendar ---------- */
.cal-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-title { font-size: 1.5rem; flex: 1; min-width: 200px; }
.cal-toolbar select { width: auto; min-width: 200px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; color: var(--ivory-dim); margin-bottom: 1.2rem; }
.cal-legend .sw { display: inline-block; width: 10px; height: 10px; margin-right: 0.45rem; border-radius: 2px; vertical-align: -1px; }
.sw.confirmed { background: var(--sage); }
.sw.requested { background: var(--gold); }
.sw.off { background: repeating-linear-gradient(45deg, var(--rose) 0 2px, transparent 2px 5px); border: 1px solid var(--rose); }
.sw.avail { background: rgba(201, 169, 110, 0.18); border: 1px solid var(--line-strong); }

.cal-grid { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--ink-2); }
.cal-corner, .cal-dayhead { border-bottom: 1px solid var(--line-strong); position: sticky; top: 0; background: var(--ink-2); z-index: 3; }
.cal-dayhead { padding: 0.6rem 0.4rem; text-align: center; border-left: 1px solid var(--line); }
.cal-dayhead span { display: block; font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.cal-dayhead b { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.cal-dayhead.today b { color: var(--gold-bright); }
.cal-hours div { font-size: 0.65rem; color: var(--muted); text-align: right; padding-right: 0.5rem; transform: translateY(-0.45em); }
.cal-col {
  position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 46px);
}
.cal-col.today { background-color: rgba(201, 169, 110, 0.035); }
.cal-col.editable { cursor: copy; }
.cal-avail { position: absolute; left: 0; right: 0; background: rgba(201, 169, 110, 0.1); border-left: 2px solid rgba(201, 169, 110, 0.45); pointer-events: none; }
.cal-ev {
  position: absolute; z-index: 2; overflow: hidden; text-align: left; cursor: pointer;
  font: inherit; font-size: 0.7rem; line-height: 1.3; padding: 0.25rem 0.4rem; border-radius: 2px;
  color: var(--ink); border: 0; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.cal-ev b { font-weight: 500; }
.cal-ev:hover { filter: brightness(1.12); z-index: 4; }
.cal-ev.confirmed { background: var(--sage); }
.cal-ev.requested { background: var(--gold); }
.cal-ev.completed { background: #6e6a62; color: var(--ivory); }
.cal-ev.cancelled, .cal-ev.declined { background: transparent; color: var(--muted); border: 1px dashed var(--muted); text-decoration: line-through; }
.cal-ev.off { background: repeating-linear-gradient(45deg, rgba(201, 138, 122, 0.35) 0 4px, rgba(201, 138, 122, 0.12) 4px 9px); color: var(--ivory); border: 1px solid var(--rose); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.cal-agenda { display: flex; flex-direction: column; gap: 1rem; }
.ag-day { border: 1px solid var(--line); background: var(--ink-2); padding: 1rem; }
.ag-day.today { border-color: var(--line-strong); box-shadow: inset 2px 0 0 var(--gold); }
.ag-day header { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.ag-day header b { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }
.ag-ev { display: grid; grid-template-columns: 92px 1fr auto; gap: 0.6rem; align-items: center; width: 100%; text-align: left; margin-top: 0.5rem;
  background: var(--ink-3); border: 0; border-left: 3px solid var(--gold); color: var(--ivory); font: inherit; font-size: 0.9rem; padding: 0.7rem 0.8rem; cursor: pointer; }
.ag-ev .t { color: var(--ivory-dim); font-size: 0.8rem; }
.ag-ev.confirmed { border-left-color: var(--sage); }
.ag-ev.completed { border-left-color: #6e6a62; }
.ag-ev.cancelled, .ag-ev.declined { border-left-color: var(--muted); color: var(--muted); }
.ag-ev.off { border-left-color: var(--rose); background: repeating-linear-gradient(45deg, rgba(201, 138, 122, 0.08) 0 6px, transparent 6px 12px), var(--ink-3); }
.ag-empty { margin-top: 0.4rem; }

/* ---------- Mobile ---------- */
.shell > div, .main, .page-head > * { min-width: 0; }
.window input { min-width: 0; }
.nav-scrim { display: none; }
@media (max-width: 880px) {
  .mobile-bar { position: sticky; top: 0; z-index: 20; background: rgba(14, 13, 12, 0.94); backdrop-filter: blur(8px); }
  .shell.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 25; }
  .sidebar { inset: 0 auto 0 0; width: min(290px, 82vw); overflow-y: auto; background: var(--ink-2); z-index: 40; }
  .shell.nav-open .nav-scrim { z-index: 35; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .main { padding: 1.5rem 1rem 4rem; }
  .page-head { margin-bottom: 1.6rem; }
  .card { padding: 1.2rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.1rem; }
  .stat .value { font-size: 1.8rem; }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .row > * { min-width: 0; flex-basis: 100%; }
  .row > .shrink { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
  .btn { padding: 0.85rem 1.3rem; }
  .tabs { gap: 1.2rem; overflow-x: auto; scrollbar-width: none; }
  .tabs button { white-space: nowrap; }
  .list-item { gap: 0.8rem; }
  .list-item > div[style*='text-align:right'] { text-align: left !important; width: 100%; }
  .list-item .btn-row { justify-content: flex-start !important; }
  .profile { gap: 1.6rem; }
  .profile .portrait { max-width: 320px; margin: 0 auto; }
  .landing .hero { padding: 2rem 1.4rem; min-height: auto; gap: 2rem; }
  .landing .hero::before { inset: 0.8rem; }
  .landing .pillars { display: none; }
  .landing .hero h1 { font-size: 2.5rem; margin: 0.8rem 0 1rem !important; }
  .landing .hero p { font-size: 0.95rem; }
  #refine { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  #filter .field { margin-bottom: 0.4rem !important; }
  .landing .panel { padding: 2rem 1.4rem 3rem; }
  .modal { padding: 1.4rem; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-bottom: 0; }
  .cal-toolbar select { width: 100%; }
  .ag-ev { grid-template-columns: 1fr auto; }
  .ag-ev .t { grid-column: 1 / -1; }
  input, select, textarea { font-size: 16px; } /* stops iOS zooming into fields */

  /* Tables become stacked cards. */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 0.25rem 0; display: flex; justify-content: space-between; gap: 1rem; }
  table.stack td[data-label]::before { content: attr(data-label); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); padding-top: 0.2rem; }
  table.stack td .btn-row { justify-content: flex-start !important; }
}

/* ---------- Client notes ---------- */
.note { padding: 1rem 0; border-top: 1px solid var(--line); }
.note.pinned { border-left: 2px solid var(--gold); padding-left: 1rem; }
.note-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); margin-bottom: 0.4rem; }
.note-body { white-space: pre-line; color: var(--ivory-dim); }
input[type='file'] { border: 1px dashed var(--line-strong); padding: 0.9rem; font-size: 0.85rem; }
input[type='file']::file-selector-button { background: transparent; color: var(--gold); border: 1px solid var(--gold); padding: 0.4rem 0.9rem; margin-right: 0.8rem; font: inherit; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer; }

/* Stat tiles draw their own borders so a wrapped row leaves no filled gap. */
.stats { background: none; border: 0; gap: 0; }
.stat { border: 1px solid var(--line); margin: 0 -1px -1px 0; }

/* ---------- Tiers ---------- */
.pill.tier-vip { color: var(--ink); background: linear-gradient(135deg, var(--gold-bright), var(--gold)); border-color: var(--gold); }
.pill.tier-preferred { color: var(--gold-bright); border-color: var(--gold); background: rgba(14, 13, 12, 0.6); }
.portrait .badge-right { left: auto; right: 1rem; }
.pill.tier-lg { font-family: var(--sans); font-size: 0.62rem; vertical-align: middle; }
.pill.pill-xs { font-size: 0.5rem; }

/* ---------- Membership ---------- */
.tier-card { display: flex; flex-direction: column; gap: 0.6rem; }
.tier-card.current { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(201, 169, 110, 0.35), var(--shadow); }
.tier-price { font-family: var(--serif); font-size: 2.2rem; line-height: 1.1; }
.tiers .card + .card { margin-top: 0; }
.dues-row { border-top: 1px solid var(--line); padding-top: 1rem; margin-bottom: 0.4rem; }

/* ---------- Booking details & agreements ---------- */
.bk-details { display: grid; grid-template-columns: 84px 1fr; gap: 0.15rem 0.8rem; margin: 0.6rem 0 0; font-size: 0.85rem; }
.bk-details dt { color: var(--muted); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; padding-top: 0.2rem; }
.bk-details dd { margin: 0; color: var(--ivory-dim); white-space: pre-line; }
.agreement-panel { max-width: 760px !important; }
.agreement-doc { white-space: pre-wrap; background: var(--ink-2); border: 1px solid var(--line); padding: 1.4rem; margin: 1.2rem 0 0.6rem; max-height: 60vh; overflow-y: auto; font-size: 0.92rem; color: var(--ivory-dim); line-height: 1.7; }

/* Wider breakpoint for dense tables inside cards. */
@media (max-width: 1100px) {
  table.stack-md thead { display: none; }
  table.stack-md, table.stack-md tbody, table.stack-md tr, table.stack-md td { display: block; width: 100%; }
  table.stack-md tr { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  table.stack-md td { border: 0; padding: 0.25rem 0; display: flex; justify-content: space-between; gap: 1rem; }
  table.stack-md td[data-label]::before { content: attr(data-label); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); padding-top: 0.2rem; }
  table.stack-md td > div:not(.btn-row), table.stack-md td .muted { text-align: right; }
}

/* ---------- Portrait editor ---------- */
.portrait-edit { display: grid; grid-template-columns: 120px 1fr; gap: 1.4rem; align-items: center; margin-bottom: 1.4rem; }
.portrait-thumb .portrait .monogram { font-size: 2.6rem; }
.portrait-thumb .portrait .badge { display: none; }

/* ---------- Fixes from Bugpatrol ---------- */
/* Cards side by side in a grid line up; the stacking gap is only for cards on top of each other. */
.grid > .card + .card { margin-top: 0; }
/* Locked fields look locked. */
input:disabled, select:disabled, textarea:disabled { color: var(--muted); border-bottom-style: dashed; border-color: var(--line); cursor: not-allowed; opacity: 0.75; }
.locked-note { display: block; margin-top: 0.35rem; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
/* Calendar legend swatches for finished engagements, and the per-day "+" button. */
.sw.completed { background: #6e6a62; }
.sw.cancelled { background: transparent; border: 1px dashed var(--muted); }
.cal-dayhead { position: relative; }
.cal-add { position: absolute; top: 0.35rem; right: 0.35rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--gold); font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; }
.cal-add:hover, .cal-add:focus-visible { background: rgba(201, 169, 110, 0.15); outline: 1px solid var(--gold); }

.nowrap { white-space: nowrap; }
.note-meta .pill { margin-right: 0.6rem; }

/* ---------- Group engagements ---------- */
.companion-cell .pick { margin-top: 0.9rem; width: 100%; }
.group-bar {
  position: sticky; bottom: 1rem; z-index: 15; margin-top: 1.6rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.2rem; background: var(--ink-3); border: 1px solid var(--gold); box-shadow: var(--shadow);
}
.group-pill { color: var(--gold-bright); border-color: var(--gold); }
.group-members { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.7rem; }
.group-member { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.7rem 0.35rem 0.35rem; border: 1px solid var(--line); border-radius: 22px; font-size: 0.85rem; flex-wrap: wrap; }
.group-member .btn { padding: 0.3rem 0.6rem; font-size: 0.55rem; }

.group-member.dropped span:not(.pill) { text-decoration: line-through; color: var(--muted); }
.group-note { margin-top: 0.6rem; padding: 0.5rem 0.8rem; border-left: 2px solid var(--rose); color: var(--ivory-dim); background: rgba(201, 138, 122, 0.06); }

/* ---------- Photo gallery ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.photo-tile { margin: 0; position: relative; border: 1px solid var(--line); background: var(--ink-2); }
.photo-tile.cover { border-color: var(--gold); }
.photo-tile img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.photo-tile .badge { position: absolute; top: 0.5rem; left: 0.5rem; background: rgba(14, 13, 12, 0.75); color: var(--gold-bright); border-color: var(--gold); }
.photo-tile figcaption { padding: 0.5rem; display: grid; grid-template-columns: auto auto 1fr; gap: 0.35rem; }
.photo-tile figcaption [data-cover] { grid-column: 1 / -1; }
.photo-tile figcaption .btn { padding: 0.35rem 0.55rem; font-size: 0.55rem; letter-spacing: 0.12em; }
.gallery-main { position: relative; }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; width: 58px; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--gold); outline: 1px solid var(--gold); }
.gallery-thumbs img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 760px) { .photo-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; } }

/* ---------- Release notes ---------- */
/* "## 0.12.0 — date" is rendered as h3 (the release title); "### New / Fixed …" as h4. */
.md h3 { font-size: 1.7rem; margin: 0 0 0.6rem; padding-right: 9rem; }
.md h4 { color: var(--gold); margin: 1.4rem 0 0.5rem; font-family: var(--sans); font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.72rem; }
.md h5 { font-size: 1rem; margin: 1rem 0 0.4rem; }
@media (max-width: 760px) { .md h3 { padding-right: 0; font-size: 1.4rem; } }
.md p, .md li { color: var(--ivory-dim); }
.md ul { margin: 0.4rem 0 0.8rem; padding-left: 1.3rem; }
.md li { margin: 0.25rem 0; }
.md li::marker { color: var(--gold); }
.md strong { color: var(--ivory); font-weight: 500; }
.md code { font-family: ui-monospace, Menlo, monospace; font-size: 0.82em; background: var(--ink); border: 1px solid var(--line); padding: 0.05rem 0.35rem; color: var(--gold-bright); overflow-wrap: anywhere; }
.md table { margin: 0.6rem 0 1rem; }
.release { position: relative; }
.release.current { border-color: var(--gold); }
.release-current { position: absolute; top: 1.6rem; right: 1.6rem; }
.release-toc { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 1.4rem; }
.release-toc a { border-bottom: 1px solid var(--line-strong); }
@media (max-width: 760px) { .release-current { position: static; display: inline-block; margin-bottom: 0.6rem; } }

/* Booking rules in the profile editor */
fieldset.rules { border: 1px solid var(--line); padding: 1rem 1.2rem 0.2rem; margin: 0 0 1.2rem; }
fieldset.rules legend { padding: 0 0.4rem; }

/* ---------- safety ---------- */
.help-btn { background: #8e2b2b; border-color: #b23a3a; color: #fff; }
.help-btn:hover { background: #a83434; border-color: #d04848; color: #fff; }
.help-title { color: #e06a6a; }
.help-status { border-color: #b23a3a; margin-bottom: 1.4rem; }
.help-banner { position: sticky; top: 0; z-index: 40; background: #8e2b2b; color: #fff; padding: 0.8rem 1.5rem; text-align: center; animation: help-pulse 2s ease-in-out infinite; }
.help-banner a { color: #fff; text-decoration: underline; margin-left: 0.6rem; }
@keyframes help-pulse { 50% { background: #a83434; } }
@media (prefers-reduced-motion: reduce) { .help-banner { animation: none; } }
.nav-badge { display: inline-block; min-width: 1.3rem; margin-left: 0.5rem; padding: 0 0.35rem; border-radius: 999px; background: var(--gold); color: #111; font-size: 0.65rem; line-height: 1.3rem; text-align: center; letter-spacing: 0; vertical-align: middle; }
.nav-badge.urgent { background: #c43c3c; color: #fff; }
.alert-item.urgent { border-left: 3px solid #c43c3c; padding-left: 1rem; }
.safety-line { margin-top: 0.4rem; color: var(--ivory-dim); }
.safety-line.ok { color: var(--sage); }
.safety-line.warn { color: var(--gold); }
.pill.sev-low { color: var(--ivory-dim); }
.pill.sev-medium { color: var(--gold); }
.pill.sev-high { color: var(--danger); }
.incident-body { margin-top: 0.6rem; white-space: pre-wrap; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ' +'; color: var(--gold); }
details.card[open] > summary::after { content: ' −'; }
@media (max-width: 880px) { .help-banner { position: static; padding: 0.7rem 1.2rem; } }

/* ---------- feedback ---------- */
.stars { color: var(--gold); letter-spacing: 0.1em; white-space: nowrap; }
.stars .off { color: var(--line-strong); }
.feedback-line { margin-top: 0.5rem; padding-top: 0.4rem; border-top: 1px dashed var(--line); }
.feedback-done { align-self: center; }
.star-input { border: 0; padding: 0; margin: 0 0 1.2rem; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.3rem; }
.star-input legend { width: 100%; margin-bottom: 0.5rem; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2.1rem; line-height: 1; color: var(--line-strong); cursor: pointer; transition: color .15s; padding: 0 0.1rem; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 1px solid var(--gold); outline-offset: 2px; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th { text-align: left; font-weight: 400; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-dim); padding: 0.5rem 0.45rem; border-bottom: 1px solid var(--line); }
table.data td { padding: 0.65rem 0.45rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.warn { color: var(--danger); }
.table-wrap { overflow-x: auto; }

/* ---------- earnings ---------- */
.amount { font-family: var(--serif); font-size: 1.3rem; }
.voided .amount, .voided > div:first-child > div:first-child { text-decoration: line-through; opacity: .6; }
table.data td.owed { color: var(--gold-bright); }
table.data tr.sub td { color: var(--ivory-dim); font-style: italic; }
table.data tr.total td { border-top: 1px solid var(--line-strong); color: var(--ivory); font-style: normal; font-weight: 500; }

@media print {
  @page { margin: 16mm; }
  body { background: #fff !important; color: #111 !important; }
  .sidebar, .mobile-bar, .nav-scrim, .help-banner, .no-print, #toast { display: none !important; }
  .shell { display: block !important; padding: 0 !important; }
  .main { padding: 0 !important; max-width: none !important; }
  .card { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .statement h2, .statement .eyebrow, .statement p, table.data td, table.data th, .dim, .muted { color: #111 !important; }
  table.data td, table.data th { border-color: #bbb !important; }
  .fade-in { animation: none !important; opacity: 1 !important; }
}

/* ---------- reports ---------- */
/* One chart color, checked against the card surface (lightness, chroma, contrast); hover lifts to the brand gold. */
:root { --chart: #b98a3a; --chart-hover: #c9a96e; --grid: rgba(242, 236, 225, 0.08); }
.filter-row { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-bottom: 1.4rem; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.colchart { margin: .4rem 0 0; }
.colchart-plot { position: relative; height: 220px; margin-left: 3.2rem; }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid); }
.gridline span { position: absolute; right: calc(100% + .6rem); transform: translateY(-50%); font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cols { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.col:hover, .col:focus-visible { background: rgba(242, 236, 225, 0.03); }
.col:focus-visible { box-shadow: inset 0 0 0 1px var(--line-strong); }
.col-bar { position: relative; width: min(24px, 60%); background: var(--chart); border-radius: 4px 4px 0 0; transition: background .15s; }
.col-bar[style="height:0%"] { background: none; }
.col:hover .col-bar, .col:focus-visible .col-bar { background: var(--chart-hover); }
.col-value { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: .72rem; color: var(--ivory); white-space: nowrap; }
.cols-x { display: flex; margin-left: 3.2rem; border-top: 1px solid var(--line-strong); padding-top: .4rem; }
.cols-x span { flex: 1; text-align: center; font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: visible; }
.hbars { display: grid; gap: 2px; margin-top: .4rem; }
.hbar { display: grid; grid-template-columns: minmax(6rem, 34%) 1fr; align-items: center; gap: .8rem; padding: .3rem .2rem; outline: none; border-radius: 2px; }
.hbar:hover, .hbar:focus-visible { background: rgba(242, 236, 225, 0.03); }
.hbar:focus-visible { box-shadow: inset 0 0 0 1px var(--line-strong); }
.hbar-name { font-size: .85rem; color: var(--ivory-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.hbar-fill { height: 14px; background: var(--chart); border-radius: 0 4px 4px 0; min-width: 0; flex: 0 0 auto; transition: background .15s; }
.hbar:hover .hbar-fill, .hbar:focus-visible .hbar-fill { background: var(--chart-hover); }
.hbar-value { font-size: .78rem; color: var(--ivory); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Every bar is scaled to the same width, leaving room for the value at its tip. */
.hbar-track .hbar-fill { width: calc((100% - 4.5rem) * var(--f)); }
.table-view { margin-top: 1rem; }
.table-view summary { cursor: pointer; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .6rem; }
.chart-tip { position: absolute; z-index: 60; pointer-events: none; background: #0b0a09; border: 1px solid var(--line-strong); padding: .55rem .75rem; font-size: .8rem; color: var(--ivory-dim); box-shadow: var(--shadow); min-width: 9rem; }
.chart-tip .tip-head { color: var(--muted); font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; margin-bottom: .3rem; }
.chart-tip strong { color: var(--ivory); font-weight: 500; font-variant-numeric: tabular-nums; }
.report-pair { align-items: start; }
@media (max-width: 880px) { .colchart-plot, .cols-x { margin-left: 2.6rem; } .colchart-plot { height: 180px; } }
.report-pair > *, .grid > .card { min-width: 0; }
@media (max-width: 880px) { .cols-x span.minor { visibility: hidden; } }
.card.notice { border-color: var(--gold); }

/* ---------- language switch ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.lang-switch button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .62rem; letter-spacing: .18em; padding: .3rem .6rem; cursor: pointer; }
.lang-switch button.on { background: var(--gold); color: var(--ink); }
.lang-switch button:focus-visible { outline: 1px solid var(--gold); outline-offset: -2px; }
.lang-switch, .who .row > .linklike { flex: 0 0 auto; }
.row > .lang-switch, .who .row > .linklike { min-width: 0; }

/* ---------- payments (money in) ---------- */
.pill.pay-expected { color: var(--ivory-dim); }
.pill.pay-with_companion { color: var(--gold-bright); }
.pill.pay-received { color: var(--sage); }
.pill.pay-refunded { color: var(--rose); }
.pill.pay-voided { color: var(--danger); }
.method { display: inline-block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: .1rem .5rem; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--ivory-dim); }
.pay-line { margin-top: .4rem; color: var(--ivory-dim); }
.pay-line .pay-ok { color: var(--sage); }
.pay-line .pay-part, .pay-line .pay-held, .pay-line.held { color: var(--gold-bright); }
.pay-line .pay-none { color: var(--muted); }
.pay-history { display: grid; gap: .35rem; max-height: 220px; overflow: auto; }
fieldset.where { border: 0; padding: 0; margin: 0 0 1rem; }
fieldset.where legend { margin-bottom: .6rem; }
fieldset.where .check { margin-bottom: .5rem; }
fieldset.where .check { justify-content: flex-start; text-align: left; }
fieldset.where input[type=radio] { width: auto; flex: 0 0 auto; margin: 0; padding: 0; border: 0; accent-color: var(--gold); }

/* ---------- cash settlements ---------- */
.settle-list { display: grid; gap: .2rem; max-height: 220px; overflow: auto; margin-bottom: 1rem; }
.settle-list .check { margin: 0; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.amount-sm { font-family: var(--serif); font-size: 1.05rem; }
.settle-sum { display: grid; gap: .35rem; padding: .9rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line-strong); }
.settle-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--ivory-dim); }
.settle-row b { font-weight: 500; color: var(--ivory); font-variant-numeric: tabular-nums; }
.settle-row.strong span { color: var(--ivory); }

/* ---------- membership renewals ---------- */
.pill.member-current { color: var(--sage); }
.pill.member-due_soon { color: var(--gold-bright); }
.pill.member-overdue { color: var(--rose); }
.pill.member-lapsed { color: var(--danger); }
.pill.member-untracked { color: var(--muted); }
.card.notice.renewal-overdue, .card.notice.renewal-lapsed { border-color: var(--rose); }
.row-actions { display: grid; justify-items: end; gap: .3rem; }
.again-note { color: var(--gold-bright); margin: -.6rem 0 1.2rem; }

/* Two-step sign-in: the QR code stays dark on white (scanners need it) and the recovery codes sit in two columns. */
.qr { background: #fff; padding: 0.4rem; width: min(220px, 100%); margin: 0.4rem auto 0.8rem; }
.qr svg { display: block; width: 100%; height: auto; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 1rem; font-size: 0.95rem; }

/* Alternatives: companions free at the same time (#27). */
.alt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.alt-card { display: flex; gap: .8rem; align-items: center; padding: .8rem; border: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.alt-card:hover, .alt-card:focus-visible { border-color: var(--gold); }
.alt-card > div { min-width: 0; overflow-wrap: anywhere; }
