/* @import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,100..900&family=Playfair+Display:wght@500;600&family=Inter:wght@400;500;600;700&display=swap"); */

:root {
  --bg: #140f1c;
  --bg-glow: #2a1d3e;
  --surface: #1e1830;
  --surface-2: #271f3d;
  --line: #3a3152;
  --gold: #e8c784;
  --gold-dim: #b99b5e;
  --rose: #e9a0b8;
  --text: #f3eef7;
  --muted: #a79fb8;
  --ok: #8fd9b0;
  --halo: rgba(232, 199, 132, 0.3);
  --halo-2: rgba(233, 160, 184, 0.1);
  --btn-text: #241a0a;
  --radius: 18px;
  --maxw: 440px;
  --font-serif: "Fraunces", "Playfair Display", Georgia, serif;
}

/* ---- Themes ---- */
[data-theme="noir"] {
  --bg: #0c0c10;
  --bg-glow: #1b1b24;
  --surface: #15151c;
  --surface-2: #1d1d26;
  --line: #2e2e3a;
  --gold: #d8dae2;
  --gold-dim: #9ea1ad;
  --rose: #c7cad4;
  --text: #f2f2f5;
  --muted: #9a9ca8;
  --halo: rgba(216, 218, 226, 0.22);
  --halo-2: rgba(216, 218, 226, 0.06);
  --btn-text: #16161c;
}
[data-theme="rouge"] {
  --bg: #1a0c10;
  --bg-glow: #33141c;
  --surface: #241218;
  --surface-2: #2e1720;
  --line: #4a2530;
  --gold: #e8c784;
  --gold-dim: #be9760;
  --rose: #ee6e82;
  --text: #f7eff0;
  --muted: #b49aa1;
  --halo: rgba(238, 110, 130, 0.26);
  --halo-2: rgba(232, 199, 132, 0.1);
  --btn-text: #2b1015;
}
[data-theme="ice"] {
  --bg: #0c121e;
  --bg-glow: #18263e;
  --surface: #131c2c;
  --surface-2: #19253c;
  --line: #2b3a56;
  --gold: #c4dbf4;
  --gold-dim: #8ca9cc;
  --rose: #9fd2ea;
  --text: #eff4fa;
  --muted: #93a3bc;
  --halo: rgba(196, 219, 244, 0.26);
  --halo-2: rgba(159, 210, 234, 0.08);
  --btn-text: #101b2c;
}
[data-theme="neon"] {
  --bg: #0e0917;
  --bg-glow: #221238;
  --surface: #170f26;
  --surface-2: #1f1533;
  --line: #372a55;
  --gold: #c77dff;
  --gold-dim: #9a5cd4;
  --rose: #5fefc4;
  --text: #f4eefb;
  --muted: #a493c2;
  --halo: rgba(199, 125, 255, 0.3);
  --halo-2: rgba(95, 239, 196, 0.1);
  --btn-text: #1d0f30;
}
/* Light themes — the mainstream (encoretap) defaults; selectable by anyone. */
[data-theme="daylight"] {
  --bg: #faf8f3;
  --bg-glow: #f1e9d8;
  --surface: #ffffff;
  --surface-2: #f7f3ea;
  --line: #e5ddca;
  --gold: #d9a63f;
  --gold-dim: #a87d24;
  --rose: #c96f8e;
  --text: #221d12;
  --muted: #79704f;
  --ok: #2e8f5f;
  --halo: rgba(217, 166, 63, 0.4);
  --halo-2: rgba(217, 166, 63, 0.12);
  --btn-text: #241a0a;
}
[data-theme="mint"] {
  --bg: #f5faf7;
  --bg-glow: #dff0e7;
  --surface: #ffffff;
  --surface-2: #eef6f1;
  --line: #d5e5db;
  --gold: #1e9e68;
  --gold-dim: #14724b;
  --rose: #e0705c;
  --text: #12211a;
  --muted: #5f7a6c;
  --ok: #1e9e68;
  --halo: rgba(30, 158, 104, 0.3);
  --halo-2: rgba(30, 158, 104, 0.1);
  --btn-text: #ffffff;
}

/* ---- Brand personality: encoretap (mainstream) ---- */
/* Same components, different voice: geometric display type instead of the
   romantic serif, tighter halo. Applied via data-brand on <html> (server-set). */
[data-brand="encoretap"] {
  --font-serif: "Syne", "SF Pro Display", system-ui, sans-serif;
}
[data-brand="encoretap"] body {
  font-family: "DM Sans", "Inter", system-ui, -apple-system, sans-serif;
}
[data-brand="encoretap"] .name {
  letter-spacing: -0.01em;
  font-weight: 700;
}
[data-brand="encoretap"] h1,
[data-brand="encoretap"] h2,
[data-brand="encoretap"] h3 {
  font-weight: 700;
}
[data-brand="encoretap"] .eyebrow {
  letter-spacing: 0.22em;
}

/* ---- Base ---- */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: radial-gradient(120% 60% at 50% -10%, var(--bg-glow) 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}
body.landing {
  display: block;
}
body.login-page {
  align-items: center;
}

/* ---- Utilities (Replaces Inline Styles) ---- */
.hidden {
  display: none !important;
}
.flex-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.flex-between {
  justify-content: space-between;
}
.flex-actions {
  display: flex;
  gap: 8px;
}
.m-0 {
  margin: 0 !important;
}
.mt-18 {
  margin-top: 18px;
}
.mt-10 {
  margin-top: 10px;
}
.no-pad {
  padding-top: 0 !important;
}
.text-left {
  text-align: left;
}
.no-underline {
  text-decoration: none !important;
}
.label-inline {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.h-note {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

.text-center {
  text-align: center;
}
.text-rose {
  color: var(--rose);
}
.text-strong {
  color: var(--text);
  font-weight: 600;
}

.link-gold {
  color: var(--gold-dim);
  text-decoration: none;
}
.link-gold:hover {
  text-decoration: underline;
}

.flex-end {
  justify-content: flex-end;
}

.mt-0 {
  margin-top: 0 !important;
}
.mt-4 {
  margin-top: 4px;
}
.mt-5 {
  margin-top: 5px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-14 {
  margin-top: 14px;
}
.mt-20 {
  margin-top: 20px;
}

.mb-0 {
  margin-bottom: 0 !important;
}
.mb-6 {
  margin-bottom: 6px;
}
.mb-10 {
  margin-bottom: 10px;
}

/* Element Specifics */
#save {
  max-width: 220px;
}
#book-search {
  margin: 14px 0 4px;
}

/* ---- Typography ---- */
h1,
h2,
h3,
.h-serif {
  font-family: var(--font-serif);
  font-weight: 500;
}
.name {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 44px;
  letter-spacing: 0.01em;
  margin: 0;
  position: relative;
}
.name.dashboard {
  font-size: 32px;
}
.name.login {
  font-size: 34px;
  text-align: center;
  margin: 0 0 6px;
}
.tagline {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 15px;
}

/* ---- Layouts ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  padding: 40px 20px 56px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.wrap-wide {
  max-width: 760px;
}
.box {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  margin: 0 auto;
}

/* ---- Cards & Elements ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h2 {
  font-size: 19px;
  margin: 0 0 16px;
}
.card h3 {
  font-size: 15px;
  color: var(--gold-dim);
  margin: 20px 0 8px;
}
.highlight-card {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 14px;
}
.res-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 6px;
}

/* ---- Forms & Inputs ---- */
input,
select,
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.chip:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  margin-top: 5px;
  font-size: 14px;
  padding: 10px 12px;
}
.custom input {
  border-radius: 12px;
  padding: 14px 14px 14px 30px;
  font-size: 16px;
  margin-top: 5px;
}
.vip input {
  border-radius: 12px;
  padding: 13px 14px;
  margin-top: 5px;
}
/* Tip card's action row: vertical spacing only, so the Continue button
   spans edge-to-edge with the inputs above it. */
#tip-card .step {
  padding-top: 12px;
}

/* ---- Buttons ---- */
.btn {
  appearance: none;
  cursor: pointer;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--btn-text);
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  transition:
    filter 0.15s,
    transform 0.05s;
}
.btn:hover {
  filter: brightness(1.06);
}
.btn:active {
  transform: scale(0.99);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.mini {
  margin-top: 10px;
  background: none;
  border: 1px dashed var(--line);
  color: var(--gold-dim);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.mini.mini-outline {
  border: 1px solid var(--line);
  color: var(--muted);
  margin: 0;
}
.confirm {
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  color: var(--btn-text);
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-weight: 700;
  cursor: pointer;
}

/* ---- Halo Signature ---- */
.crown {
  text-align: center;
  position: relative;
  padding-top: 22px;
}
.halo {
  position: absolute;
  top: 0;
  left: 50%;
  width: 190px;
  height: 190px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo) 0%, var(--halo-2) 45%, transparent 70%);
  filter: blur(6px);
  animation: pulse 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.06);
  }
}

/* ---- Dashboard Specifics (Admin) ---- */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: none;
}
.tab[aria-selected="true"] {
  background: var(--surface-2);
  color: var(--gold);
}
.view {
  display: none;
  flex-direction: column;
  gap: 26px;
}
.view.active {
  display: flex;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.stat .k {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.stat .v {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--gold);
  margin-top: 6px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--gold-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.form-grid .full {
  grid-column: 1 / -1;
}
.form-grid label,
.link-rows label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 4px 0 6px;
}
.check {
  color: var(--text);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}
.link-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.link-row {
  display: grid;
  grid-template-columns: 130px 1fr 1fr 34px;
  gap: 8px;
  align-items: end;
}
.link-row .del {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 10px;
  height: 38px;
  cursor: pointer;
}
.link-row .del:hover {
  color: var(--rose);
  border-color: var(--rose);
}
.save-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 22px;
}
.themes-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.theme-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 6px 10px;
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
}
.theme-card[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.theme-card .dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 8px;
}
.theme-card .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.theme-card .t-name {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.theme-card[aria-pressed="true"] .t-name {
  color: var(--gold);
}
.cust {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
}
.cust:hover {
  border-color: var(--gold-dim);
}
.cust .c-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cust .c-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.cust .c-total {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 18px;
}
.flag {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.flag.green {
  background: #8fd9b0;
}
.flag.yellow {
  background: #e8c784;
}
.flag.red {
  background: #ee6e82;
}
.pending {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.pending .p-amt {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 20px;
}
.pending select {
  width: auto;
  min-width: 140px;
  margin: 0;
}
/* ---- Money tab on phones: no sideways scrolling ---- */
@media (max-width: 600px) {
  /* Pending taps stack: amount + meta on top, controls in a tidy row below. */
  .pending {
    flex-direction: column;
    align-items: stretch;
  }
  .pending > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 4px 10px;
    flex-wrap: wrap;
    min-width: 0;
  }
  .pending .flex-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .pending select {
    width: 100%;
    min-width: 0;
  }

  /* Earnings ledger: each row becomes a small card instead of a wide table. */
  #recent thead {
    display: none;
  }
  #recent,
  #recent tbody {
    display: block;
  }
  #recent tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "amt when"
      "src cust"
      "act act";
    gap: 4px 12px;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
  }
  #recent tbody td {
    display: block;
    border: 0;
    padding: 0;
    min-width: 0;
  }
  #recent tbody td:nth-child(1) {
    grid-area: when;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
  }
  #recent tbody td:nth-child(2) {
    grid-area: amt;
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 18px;
    text-align: left;
  }
  #recent tbody td:nth-child(3) {
    grid-area: src;
    color: var(--muted);
  }
  #recent tbody td:nth-child(4) {
    grid-area: cust;
    text-align: right;
  }
  #recent tbody td:nth-child(5) {
    grid-area: act;
  }
  /* Single-cell rows (empty state, load error) span the whole card. */
  #recent tbody td[colspan] {
    grid-area: 1 / 1 / -1 / -1;
    text-align: left;
  }
  /* Edit mode: the row falls back to a simple stacked form, one field per line. */
  #recent tbody tr:has(.e-when) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }
  #recent tbody tr:has(.e-when) td {
    grid-area: auto;
    text-align: left;
  }
  #recent .e-when,
  #recent .e-cust {
    width: 100%;
    max-width: 100%;
  }
}
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 14, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-bg.show {
  display: flex;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  width: 100%;
  max-width: 440px;
}
.modal h3 {
  margin-top: 0;
}
.flag-pick {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.flag-opt {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}
.flag-opt[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--text);
}
.qr-box {
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  margin: 0 auto;
  width: 150px;
}

/* ---- Tip Page Links ---- */
.amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.chip {
  appearance: none;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.05s;
}
.chip:hover {
  border-color: var(--gold-dim);
}
.chip:active {
  transform: scale(0.97);
}
.chip[aria-pressed="true"] {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--halo), var(--halo-2));
  color: var(--gold);
}
/* Light themes: the accent is darkened for contrast on pale chip fills. */
[data-theme="daylight"] .chip[aria-pressed="true"],
[data-theme="mint"] .chip[aria-pressed="true"] {
  color: var(--gold-dim);
}
.custom {
  margin-top: 12px;
  position: relative;
}
.custom span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.vip {
  margin-top: 16px;
}
.vip label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.15s;
}
.link:hover {
  border-color: var(--rose);
}
.link .l-main {
  font-weight: 600;
}
.link .l-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.link .l-arrow {
  color: var(--gold-dim);
}
.disclose {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.disclose summary {
  cursor: pointer;
  color: var(--gold-dim);
  list-style: none;
  padding: 6px 0;
}
.disclose summary::-webkit-details-marker {
  display: none;
}
.disclose p {
  margin: 8px 0;
}
.disclose .links {
  margin-top: 10px;
}
.status {
  text-align: center;
  font-size: 15px;
  margin-top: 14px;
  min-height: 22px;
}
.status.err {
  color: var(--rose);
}
.status.ok {
  color: var(--ok);
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ---- Login Page Specifics ---- */
.login-sub {
  color: var(--muted);
  text-align: center;
  margin: 0 0 22px;
  font-size: 14px;
}
.login-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--gold-dim);
  font-size: 13px;
  cursor: pointer;
}
.recovery-codes {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.8;
  margin-top: 12px;
  column-count: 2;
}

/* ---- Login Page Specifics ---- */
.login-page .box {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  margin: 0 auto;
}
.name.login {
  font-size: 34px;
  text-align: center;
  margin: 0 0 6px;
}
.login-sub {
  color: var(--muted);
  text-align: center;
  margin: 0 0 22px;
  font-size: 14px;
}
.login-page .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.login-page input {
  margin: 6px 0 14px;
}
.login-page label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.login-page .btn {
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
}
/* The status line only takes space when it has something to say — an empty
   one otherwise leaves a weird dead zone under the Sign in button. */
.login-page .status {
  margin-top: 16px;
  min-height: 0;
  font-size: 14px;
}
.login-page .status:empty {
  display: none;
}
/* Neutral progress messages ("Waiting for passkey…") breathe gently;
   err/ok keep their own colors and stay still. */
.login-page .status:not(.err):not(.ok) {
  color: var(--muted);
  animation: status-pulse 1.8s ease-in-out infinite;
}
@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
/* Anything fetching: "Loading…" placeholders breathe so waiting reads as
   working, not as an (incorrect) empty result. */
.loading {
  color: var(--muted);
  animation: status-pulse 1.4s ease-in-out infinite;
}
.login-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--gold-dim);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.codes {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.8;
  margin-top: 12px;
  column-count: 2;
  text-align: center;
}

/* ---- Landing Page Specifics ---- */
.lp {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 22px;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}
.logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav a.cta {
  text-decoration: none;
}
.btn-solid {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
  color: var(--btn-text);
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 15px;
  transition: filter 0.15s;
}
.btn-solid:hover {
  filter: brightness(1.06);
}
.btn-ghost {
  display: inline-block;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 13px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 15px;
}
.btn-ghost:hover {
  border-color: var(--gold-dim);
}
.hero {
  text-align: center;
  padding: 60px 0 40px;
  position: relative;
}
.hero .halo {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo) 0%, var(--halo-2) 45%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  margin: 0 0 18px;
  position: relative;
}
.hero p.sub {
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 20px);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.5;
}
.hero .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.whisper {
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 30px 0;
}
.feat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.feat .ic {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 26px;
  margin-bottom: 10px;
}
.feat h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 8px;
}
.feat p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.section {
  padding: 44px 0;
}
.section h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(24px, 4vw, 34px);
  text-align: center;
  margin: 0 0 8px;
}
.section .lede {
  color: var(--muted);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 34px;
  line-height: 1.6;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.steps .step {
  text-align: center;
  padding: 10px;
}
.step .n {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.step h4 {
  font-size: 16px;
  margin: 0 0 6px;
}
.step p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}
.safety {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px;
}
.safety ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.safety li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
}
.safety li::before {
  content: "✦";
  color: var(--gold);
  position: absolute;
  left: 0;
}
.price {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}
.plan.featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.plan .pname {
  font-family: var(--font-serif);
  font-size: 20px;
}
.plan .cost {
  font-family: var(--font-serif);
  font-size: 34px;
  color: var(--gold);
  margin: 8px 0 4px;
}
.plan .per {
  color: var(--muted);
  font-size: 13px;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.plan li {
  color: var(--muted);
  font-size: 14px;
  padding: 6px 0 6px 20px;
  position: relative;
}
.plan li::before {
  content: "✓";
  color: var(--gold);
  position: absolute;
  left: 0;
}
.final {
  text-align: center;
  padding: 56px 0;
}
.final h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 16px;
}
footer.lp-foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 30px 0 50px;
  border-top: 1px solid var(--line);
}
/* "Who it's for" chip cloud on the encoretap landing */
.verts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto;
}
.verts span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
}

/* ---- Media Queries ---- */
@media (max-width: 720px) {
  .strip,
  .steps,
  .price {
    grid-template-columns: 1fr;
  }
  .safety ul {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .qr-box {
    width: 42vw;
    max-width: 260px;
  }
  .form-grid,
  .link-row {
    grid-template-columns: 1fr;
  }
  .link-row .del {
    height: 34px;
  }
  .themes-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .halo {
    animation: none;
  }
}
