/* ================================================================
   Eagle Rank brand tokens — Teal (primary) · Coral (accent) · Black · White
   Shades chosen by WCAG contrast: every text pair >= 4.5:1 (most >= 7:1).
   Rules: white text only on --teal-700 or darker; coral backgrounds take BLACK text.
   ================================================================ */
:root {
  --teal: #46818F;        /* brand primary: identity, borders, accents (black text on it: 4.8:1) */
  --teal-300: #7FB3C0;    /* teal text/accents on black (9.1:1) */
  --teal-200: #B5D6DD;    /* light borders / dividers */
  --teal-100: #DCEDF0;    /* light fills */
  --teal-50:  #EFF7F8;    /* subtle light fills */
  --teal-700: #2F5F6A;    /* headers & bars with white text (7.1:1), teal text on white */
  --teal-800: #234A53;    /* deeper bars, dark borders */
  --teal-900: #14313A;    /* dark surfaces */
  --teal-950: #0A1E23;    /* dark cards on black */
  --coral: #FF6F61;       /* brand accent: CTAs, highlights (black text on it: 7.7:1) */
  --coral-700: #B83A2E;   /* coral text on white (5.7:1) */
  --coral-100: #FFE3E0;   /* coral tint */
  --black: #000000;
  --white: #FFFFFF;
  --muted-dark: #B9D0D5;  /* secondary text on dark (10.7:1) */
  --muted-light: #3A565D; /* secondary text on light (7.9:1) */
  --ok-dark: #7EE2B8; --ok-light: #1E6B45;
  --warn-dark: #FFC266; --warn-light: #8A5300;
  --err-dark: #FF8A80; --err-light: #B3261E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100vh; background: var(--black); color: var(--white); font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.light { background: var(--white); color: var(--black); }
body.light .app-wrapper { background: var(--white); }
body.light .app-header  { border-bottom-color: var(--teal-200); }
body.light .theme-toggle { background: var(--teal-50); border-color: var(--teal-200); color: var(--black); }
body.light .form-section { background: #ffffff; border-color: var(--teal-200); }
body.light .field-input  { background: var(--teal-50); border-color: var(--teal-200); color: var(--black); }
body.light .field-label  { color: var(--muted-light); }
body.light .section-title { color: var(--black); }
body.light .preview-section { background: var(--teal-50); }
body.light .preview-chip { background: #ffffff; border-color: var(--teal-200); }
body.light .chip-label { color: var(--muted-light); }
body.light .chip-val { color: var(--coral-700); }
body.light .y-note { color: var(--muted-light); }
body.light .app-footer { color: var(--muted-light); border-top-color: var(--teal-200); }
body.light .init-num { color: var(--muted-light); }
body.light .field-hint { color: var(--muted-light); }
.app-wrapper { min-height: 100vh; display: flex; flex-direction: column; background: var(--black); }
/* Google Translate suppression */
.goog-te-banner-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd { display:none !important; }
body { top:0px !important; }
.goog-te-gadget { font-size:0 !important; }
.goog-te-gadget .goog-te-combo { font-size:13px !important; }
/* Language selector */
.lang-wrap { position:absolute; top:16px; left:16px; display:flex; align-items:center; gap:6px; background:var(--teal-950); border:1px solid var(--teal-800); border-radius:50px; padding:6px 12px; max-width:200px; z-index:10; }
.lang-globe { font-size:14px; color:var(--coral); flex-shrink:0; }
#google_translate_element select { background:transparent; border:none; color:var(--white); font-size:12px; outline:none; cursor:pointer; max-width:140px; padding:0; -webkit-appearance:none; appearance:none; }
#google_translate_element .goog-te-gadget-simple { background:transparent !important; border:none !important; }
body.light .lang-wrap { background:var(--teal-50); border-color:var(--teal-200); }
body.light #google_translate_element select { color:var(--black); }
.theme-toggle { position:absolute; top:20px; right:20px; background:var(--teal-950); border:1px solid var(--teal-800); border-radius:50px; padding:7px 14px; cursor:pointer; font-size:16px; color:var(--white); z-index:10; }
.theme-toggle:hover { background:var(--teal-900); border-color:var(--coral); }
.app-header { padding: 48px 24px 32px; text-align: center; border-bottom: 1px solid var(--teal-800); position: relative; }
.logo-mark { font-size: 28px; color: var(--coral); margin-bottom: 12px; display: block; }
.app-title { font-family: 'Cinzel', serif; font-size: 36px; font-weight: 700; letter-spacing: .08em; color: var(--coral); margin-bottom: 8px; }
.app-sub { color: var(--muted-dark); font-size: 14px; }
.form-container { flex: 1; max-width: 860px; width: 100%; margin: 0 auto; padding: 32px 20px 48px; }
.form-section { background: var(--teal-900); border: 1px solid var(--teal-800); border-radius: 16px; padding: 28px; margin-bottom: 20px; }
.form-section:focus-within { border-color: var(--teal); }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.section-num { font-family: 'Cinzel', serif; font-size: 11px; color: var(--coral); letter-spacing: .1em; background: rgba(255,111,97,0.08); border: 1px solid var(--coral); border-radius: 4px; padding: 2px 8px; }
.section-title { font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: .1em; color: var(--white); font-weight: 600; text-transform: uppercase; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.three-col .field-group { flex: 1; min-width: 160px; }
.dob-row .field-group { flex: 1; min-width: 130px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dark); }
.field-input { background: var(--teal-950); border: 1px solid var(--teal-800); border-radius: 10px; color: var(--white); font-family: 'Inter', sans-serif; font-size: 15px; padding: 11px 14px; outline: none; width: 100%; -webkit-appearance: none; }
.field-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(70,129,143,0.12); }
.field-select { cursor: pointer; }
.field-select option { background: var(--teal-950); color: var(--white); }
.initials-input { font-family: 'Cinzel', serif; font-size: 16px; letter-spacing: .12em; }
.initials-preview { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.init-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.init-chip { border-radius: 6px; padding: 6px 0; font-family: 'Cinzel', serif; font-size: 18px; font-weight: 600; width: 40px; min-width: 40px; text-align: center; }
.init-nums { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.init-num  { font-size: 13px; font-weight: 600; color: var(--muted-dark); width: 40px; min-width: 40px; text-align: center; }
.gold-tag  { color: var(--coral); font-family: 'Cinzel', serif; font-size: 13px; }
.y-note { margin-top: 16px; background: rgba(255,111,97,0.06); border: 1px solid var(--coral); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--muted-dark); line-height: 1.5; }
.y-note-icon { color: var(--coral); margin-right: 4px; }
.preview-section { background: var(--teal-950); }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px; }
.preview-chip { background: var(--teal-900); border: 1px solid var(--teal-800); border-radius: 10px; padding: 12px 14px; }
.chip-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 4px; }
.chip-val   { font-size: 15px; font-weight: 500; color: var(--coral); font-family: 'Cinzel', serif; }
.form-actions { text-align: center; margin: 28px 0 20px; }
.btn-primary { background: linear-gradient(135deg,var(--teal-700),var(--teal)); color: #fff; border: none; border-radius: 10px; font-family: 'Cinzel', serif; font-size: 14px; font-weight: 600; letter-spacing: .1em; padding: 14px 40px; cursor: pointer; box-shadow: 0 4px 20px rgba(70,129,143,0.25); }
.btn-primary:hover { opacity: .9; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-icon { margin-right: 6px; color: var(--coral); }
.spinner-wrap { text-align: center; padding: 32px 20px; }
.spinner { width: 48px; height: 48px; border: 4px solid var(--teal-800); border-top-color: var(--teal); border-radius: 50%; margin: 0 auto 16px; }
.spinner-label { font-size: 14px; color: var(--muted-dark); }
.status-msg { text-align: center; padding: 12px 20px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; }
.status-msg.error   { background: rgba(255,138,128,0.09); border: 1px solid rgba(255,138,128,0.4); color: var(--err-dark); }
.status-msg.success { background: rgba(126,226,184,0.09); border: 1px solid rgba(126,226,184,0.4); color: var(--ok-dark); }
.status-msg.loading { background: rgba(70,129,143,0.09); border: 1px solid rgba(70,129,143,0.4); color: var(--teal); }
.session-bar { text-align: center; padding: 10px 20px; font-size: 12px; color: var(--muted-dark); border-bottom: 1px solid var(--teal-800); display: none; }
.session-bar a { color: var(--coral); cursor: pointer; text-decoration: underline; }
.app-footer { text-align: center; padding: 20px; border-top: 1px solid var(--teal-800); font-size: 12px; color: var(--muted-dark); }
/* REPORT SECTIONS */
.report-section { margin-top: 32px; border-radius: 16px; overflow: hidden; border: 2px solid var(--teal-700); background: #fff; color: var(--teal-950); font-family: 'Inter', sans-serif; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
/* S1: Chart Header */
.chart-header { display: flex; align-items: stretch; border-bottom: 2px solid var(--teal-700); min-height: 160px; }
.chart-photo-wrap { flex: 0 0 160px; background: var(--teal-700); display: flex; align-items: center; justify-content: center; padding: 16px; }
.chart-photo { width: 120px; height: 120px; border-radius: 8px; background: var(--teal-900); border: 2px solid var(--teal-800); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.photo-initials { font-family: 'Cinzel', serif; font-size: 28px; font-weight: 700; color: var(--coral); }
.photo-img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.photo-badge { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.5); color: var(--teal-200); font-size: 10px; text-align: center; padding: 3px; }
.chart-identity { flex: 1; border-right: 2px solid var(--teal-700); display: flex; flex-direction: column; }
.chart-title-bar { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .08em; padding: 8px 16px; }
.chart-id-table { border-collapse: collapse; width: 100%; padding: 12px 16px; }
.chart-id-table tr { vertical-align: top; }
.id-label { font-weight: 700; font-size: 13px; color: var(--teal-700); white-space: nowrap; padding: 5px 12px 5px 0; width: 140px; }
.id-val   { font-size: 14px; color: var(--teal-900); padding: 5px 0; }
.chart-right { flex: 0 0 210px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 12px; gap: 10px; }
.num-ref-grid { width: 100%; }
.ref-row { display: grid; grid-template-columns: repeat(9,1fr); gap: 2px; margin-bottom: 2px; }
.ref-row span { background: #fff; color: var(--teal-700); font-size: 11px; font-weight: 600; text-align: center; padding: 4px 0; border-radius: 4px; border: 1px solid var(--teal-200); display: block; }
.ref-row.header-row span { background: var(--teal-700); color: #fff; border-color: var(--teal-700); font-size: 12px; }
.ref-row span.used { background: var(--teal-200); color: var(--teal-700); border-color: var(--teal-200); }
.ref-row span.empty-cell { background: transparent; border-color: transparent; }
.chart-logo { width: 100%; display: flex; justify-content: center; padding: 6px; border: 1px solid var(--teal-200); border-radius: 6px; background: #fff; }
.logo-img { max-width: 130px; max-height: 60px; object-fit: contain; }
/* S2: Name Grids */
.name-grid-block { padding: 20px 24px 24px; border-bottom: 1px solid var(--teal-200); }
.name-grid-block:last-child { border-bottom: none; }
.name-grid-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-700); margin-bottom: 14px; }
.name-grid-wrap  { display: flex; flex-direction: column; gap: 12px; }
.ng-line { display: flex; flex-direction: column; }
.ng-top-row, .ng-mid-row, .ng-bot-row { display: flex; flex-direction: row; align-items: center; }
.ng-gap  { width: 12px; flex-shrink: 0; }
.ng-col  { width: 22px; flex-shrink: 0; text-align: center; }
.ng-num  { font-size: 9px; font-weight: 700; color: var(--teal-700); height: 14px; line-height: 14px; display: block; text-align: center; }
.ng-num.blank { visibility: hidden; }
.ng-tile { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; font-size: 10px; font-weight: 700; border-radius: 3px; background: var(--teal-700); color: #fff; }
/* S3: Core Numbers Table */
.core-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-align: center; padding: 10px 16px; text-transform: uppercase; }
.core-table { width: 100%; border-collapse: collapse; }
.core-row { border-bottom: 1px solid var(--teal-200); }
.core-row:last-child { border-bottom: none; }
.core-label-cell { width: 220px; min-width: 200px; padding: 14px 14px 14px 16px; background: var(--teal-50); border-right: 2px solid var(--teal-700); vertical-align: top; }
.core-num-tag { font-size: 10px; font-weight: 700; color: #fff; background: var(--teal-700); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; padding: 6px 10px; border-radius: 4px; line-height: 1.4; word-break: break-word; }
.core-num-val { font-size: 56px; font-weight: 700; font-family: 'Cinzel', serif; line-height: 1; letter-spacing: .02em; float: left; margin: 0 10px 4px 0; }
.core-num-def { font-size: 11px; color: var(--muted-light); line-height: 1.5; overflow: hidden; }
.core-label-clearfix { clear: both; }
.core-interp-cell { padding: 14px 16px; vertical-align: top; font-size: 13px; color: var(--black); line-height: 1.7; background: #fff; }
.core-interp-cell p { margin-bottom: 10px; }
.core-interp-cell p:last-child { margin-bottom: 0; }
.core-loading { color: var(--muted-light); font-style: italic; font-size: 12px; }
.interp-ref { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--teal-200); }
.interp-main-lesson { font-size: 13px; font-weight: 600; color: var(--teal-700); margin-bottom: 10px; line-height: 1.5; }
.interp-cols { display: flex; gap: 16px; margin-bottom: 10px; }
.interp-col { flex: 1; }
.interp-col-head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-700); margin-bottom: 4px; }
.interp-col-body { font-size: 12px; color: var(--muted-light); line-height: 1.5; }
.interp-themes { font-size: 11px; color: var(--muted-light); font-style: italic; margin-bottom: 0; }
/* Career line inside right cell, after themes */
.interp-careers { font-size: 11px; color: var(--teal-700); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--teal-200); line-height: 1.6; }
.interp-careers-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal-700); display: block; margin-bottom: 2px; }
.interp-ai p { margin-bottom: 8px; font-size: 13px; color: var(--black); line-height: 1.7; }
.interp-ai p:last-child { margin-bottom: 0; }
.career-block { border-top: 2px solid var(--teal-700); }
.career-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .1em; text-align: center; padding: 8px 16px; text-transform: uppercase; }
.career-text { padding: 16px 20px; font-size: 13px; color: var(--black); line-height: 1.7; background: #fff; }
/* S4: Bridges */
/* S6: Periods */
.period-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-align: center; padding: 10px 16px; text-transform: uppercase; }
.period-table { width: 100%; border-collapse: collapse; }
.period-row { border-bottom: 1px solid var(--teal-200); }
.period-row:last-child { border-bottom: none; }
.period-label-cell { width: 220px; min-width: 200px; padding: 14px 14px 14px 16px; background: var(--teal-50); border-right: 2px solid var(--teal-700); vertical-align: top; }
.period-num-tag { font-size: 11px; font-weight: 700; color: #fff; background: var(--teal-700); border-radius: 4px; padding: 5px 10px; margin-bottom: 8px; display: inline-block; }
.period-num-def { font-size: 11px; color: var(--muted-light); line-height: 1.5; }
.period-interp-cell { padding: 14px 16px; vertical-align: top; font-size: 13px; color: var(--black); line-height: 1.7; background: #fff; }
/* S7: Challenges */
.chall-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-align: center; padding: 10px 16px; text-transform: uppercase; }
.chall-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-bottom: 2px solid var(--teal-700); }
.chall-card { text-align: center; border-right: 1px solid var(--teal-200); padding: 10px 8px; }
.chall-card:last-child { border-right: none; }
.chall-card-title { font-size: 11px; font-weight: 700; color: #fff; background: var(--teal-700); padding: 6px; margin-bottom: 6px; }
.chall-card-age { font-size: 11px; color: var(--muted-light); margin-bottom: 8px; }
.chall-card-num { font-size: 28px; font-weight: 700; font-family: 'Cinzel', serif; padding: 6px 0; border-radius: 4px; }
.chall-meanings-header { background: var(--muted-light); color: #fff; font-size: 11px; font-weight: 700; padding: 7px 14px; }
.chall-meaning-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--teal-200); }
.chall-meaning-row:last-child { border-bottom: none; }
.chall-meaning-num { min-width: 44px; width: 44px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; font-family: 'Cinzel', serif; color: #fff; }
.chall-meaning-text { padding: 12px 14px; font-size: 12px; color: var(--black); line-height: 1.6; flex: 1; background: #fff; }
@media (max-width: 560px) { .chall-cards { grid-template-columns: repeat(2,1fr); } }
/* S14: Personal Year/Month/Day */
.py-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-align: center; padding: 8px 14px; text-transform: uppercase; }
/* Row 1: PY + Months */
.py-row1 { display: flex; gap: 0; align-items: stretch; background: #fff; border-bottom: 2px solid var(--teal-700); }
.py-col-year { flex: 0 0 auto; padding: 10px; border-right: 2px solid var(--teal-700); }
.py-col-months { flex: 1; min-width: 0; padding: 10px; border-right: 2px solid var(--teal-700); }
/* Row 2: Personal Days full width */
.py-row2 { padding: 10px; background: #fff; border-bottom: 2px solid var(--teal-700); }
/* Row 3: # Meanings 3x3 grid */
.py-row3 { padding: 10px; background: var(--teal-50); }
.py-block-title { font-size: 11px; font-weight: 700; color: #fff; background: var(--teal-800); padding: 5px 10px; margin-bottom: 6px; border-radius: 3px; text-align: center; }
.py-table { border-collapse: collapse; font-size: 11px; }
.py-table td, .py-table th { border: 1px solid var(--teal-200); text-align: center; padding: 3px 4px; }
.py-table th { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 10px; }
.py-th-month { background: var(--teal-800); color: #fff; font-weight: 700; font-size: 9px; }
.py-row-label { background: var(--teal-800); color: #fff; font-weight: 700; font-size: 10px; }
.py-cell { background: var(--teal-50); color: var(--black); }
/* Days table: auto layout, no min-width so it fits the full page width */
.py-days-table { width: 100%; table-layout: fixed; }
.py-days-table td, .py-days-table th { padding: 2px 1px; font-size: 10px; }
/* 3-col 3-row meanings grid */
.py-meanings-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.py-meaning-row { display: flex; gap: 6px; align-items: flex-start; background: #fff; border-radius: 4px; padding: 6px; border: 1px solid var(--teal-200); }
.py-meaning-num { min-width: 24px; width: 24px; height: 24px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; font-family: 'Cinzel', serif; flex-shrink: 0; margin-top: 1px; }
.py-meaning-text { font-size: 9px; color: var(--black); line-height: 1.4; }
/* S13: Transits & Essences */
.te-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-align: center; padding: 8px 14px; text-transform: uppercase; }
.te-table-wrap { overflow: hidden; margin-bottom: 2px; }
.te-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.te-row-label { font-size: 7px; font-weight: 700; color: #fff; background: var(--teal-800); padding: 2px 4px; white-space: nowrap; width: 72px; min-width: 72px; border: 1px solid var(--muted-light); vertical-align: middle; }
.te-cell { font-size: 7px; font-weight: 700; text-align: center; padding: 1px 0; border: 1px solid var(--teal-200); vertical-align: middle; overflow: hidden; line-height: 1.2; }
.te-cell-year { writing-mode: vertical-rl; transform: rotate(180deg); height: 30px; line-height: 1; font-size: 6px; background: var(--teal-800); color: #fff; }
.te-cell-age  { font-size: 7px; font-weight: 700; background: var(--teal-800); color: #fff; }
/* Transit/number colors — consistent root number system */
.te-v1  { background: #cc2222; color: #FFFFFF; }
.te-v2  { background: #e07820; color: #000000; }
.te-v3  { background: #d4c010; color: #000000; }
.te-v4  { background: #7abf7a; color: #000000; }
.te-v5  { background: #1a5fa8; color: #FFFFFF; }
.te-v6  { background: #1a4a8a; color: #FFFFFF; }
.te-v7  { background: #7b2d9e; color: #FFFFFF; }
.te-v8  { background: #e070a0; color: #000000; }
.te-v9  { background: #2a8a6a; color: #000000; }
.te-v11 { background: #e07820; color: #000000; }
.te-v22 { background: #7abf7a; color: #000000; }
/* Essence / cycle rows use valClass coloring */
/* S12: Planes of Expression */
.pl-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-align: center; padding: 10px 16px; text-transform: uppercase; }
.pl-main { overflow-x: auto; }
.pl-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.pl-th { background: var(--teal-700); color: #fff; font-size: 10px; font-weight: 700; padding: 5px 6px; text-align: center; border: 1px solid var(--teal-800); }
.pl-group-hdr { background: var(--teal-800); }
.pl-sub-th { background: var(--teal-700); color: #fff; font-size: 9px; padding: 4px 5px; text-align: center; border: 1px solid var(--teal-800); }
.pl-td { border: 1px solid var(--teal-200); padding: 5px 6px; text-align: center; vertical-align: middle; font-size: 11px; background: #fff; }
.pl-td-label { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; }
.pl-td-area { background: var(--teal-50); font-size: 11px; color: var(--black); text-align: left; }
.pl-letter-cell { background: #337941; color: #fff; font-weight: 700; border-radius: 2px; padding: 2px 4px; display: inline-block; margin: 1px; font-size: 10px; }
.pl-foot-td { border: 1px solid var(--teal-200); padding: 5px 6px; text-align: center; font-weight: 700; font-size: 11px; background: var(--teal-50); }
.pl-compound { font-weight: 700; color: var(--teal-700); }
.pl-meanings-header { background: var(--teal-700); color: #fff; font-size: 11px; font-style: italic; text-align: center; padding: 7px 14px; }
.pl-meaning-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--teal-200); }
.pl-meaning-row:last-child { border-bottom: none; }
.pl-meaning-label { min-width: 80px; background: var(--teal-700); color: #fff; font-size: 10px; font-weight: 700; padding: 8px 10px; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.4; }
.pl-meaning-text { padding: 10px 14px; font-size: 12px; color: var(--black); line-height: 1.6; flex: 1; background: #fff; }
/* S11: Karmic Lessons + Hidden Passions */
.kh-wrap { display: flex; align-items: stretch; border-bottom: 2px solid var(--teal-700); }
.kh-panel { flex: 1; border-right: 2px solid var(--teal-700); display: flex; flex-direction: column; }
.kh-panel:last-child { border-right: none; }
.kh-header { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-align: center; padding: 10px 16px; text-transform: uppercase; color: #fff; }
.kh-header-karmic { background: var(--muted-light); }
.kh-header-passion { background: var(--muted-light); }
.kh-sub { font-size: 11px; font-style: italic; padding: 8px 12px; line-height: 1.5; }
.kh-sub-karmic { background: #C73A3A; color: #fff; }
.kh-sub-passion { background: #337941; color: #fff; }
.kh-list { flex: 1; }
.kh-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--teal-200); min-height: 40px; }
.kh-row:last-child { border-bottom: none; }
.kh-row-num { min-width: 36px; width: 36px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; font-family: 'Cinzel', serif; border-right: 1px solid var(--teal-200); }
.kh-row-text { padding: 8px 10px; font-size: 11px; color: var(--black); line-height: 1.5; flex: 1; background: var(--teal-50); }
.kh-empty-row { min-height: 36px; border-bottom: 1px solid var(--teal-200); background: var(--teal-50); }
.kh-grid-wrap { padding: 12px; display: flex; justify-content: center; background: #fff; }
.kh-grid { display: inline-grid; grid-template-rows: auto auto; gap: 2px; }
.kh-grid-cell { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; font-family: 'Cinzel', serif; border-radius: 3px; }
.kh-grid-hdr { background: var(--teal-700); color: #fff; }
.kh-grid-val { background: var(--teal-50); color: var(--teal-700); }
.kh-grid-val.karmic  { background: #C73A3A; color: #fff; }
.kh-grid-val.passion { background: #337941; color: #fff; }
/* S10: Cornerstone / First Vowel / Capstone */
.cs-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-align: center; padding: 10px 16px; text-transform: uppercase; line-height: 1.4; }
.cs-table { width: 100%; border-collapse: collapse; }
.cs-th { background: var(--teal-700); color: #fff; font-size: 11px; font-weight: 700; padding: 8px 12px; text-align: left; border-right: 1px solid var(--teal-800); width: 33.33%; }
.cs-th:last-child { border-right: none; }
.cs-desc { font-size: 11px; color: var(--black); padding: 8px 12px; background: var(--teal-50); border-right: 1px solid var(--teal-200); border-bottom: 2px solid var(--teal-700); vertical-align: top; }
.cs-desc:last-child { border-right: none; }
.cs-body { font-size: 12px; color: var(--black); padding: 14px 12px; vertical-align: top; border-right: 1px solid var(--teal-200); background: var(--teal-50); line-height: 1.6; min-height: 100px; }
.cs-body:last-child { border-right: none; }
/* S9: Special Numbers */
.sp-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-align: center; padding: 10px 16px; text-transform: uppercase; }
.sp-table { width: 100%; border-collapse: collapse; }
.sp-th { background: var(--teal-700); color: #fff; font-size: 11px; font-weight: 700; padding: 8px 12px; text-align: left; border-right: 1px solid var(--teal-800); vertical-align: top; width: 25%; }
.sp-th:last-child { border-right: none; }
.sp-desc { font-size: 11px; color: var(--muted-light); font-style: italic; padding: 8px 12px; background: var(--teal-50); border-right: 1px solid var(--teal-200); border-bottom: 2px solid var(--teal-700); vertical-align: top; }
.sp-desc:last-child { border-right: none; }
.sp-body { font-size: 12px; color: var(--black); padding: 14px 12px; vertical-align: top; border-right: 1px solid var(--teal-200); background: #fff; line-height: 1.6; }
.sp-body:last-child { border-right: none; }
/* S8: Pinnacles */
.pin-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-align: center; padding: 10px 16px; text-transform: uppercase; line-height: 1.4; }
.pin-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-bottom: 2px solid var(--teal-700); }
.pin-card { text-align: center; border-right: 1px solid var(--teal-200); }
.pin-card:last-child { border-right: none; }
.pin-card-title { font-size: 11px; font-weight: 700; color: #fff; background: var(--teal-700); padding: 7px 8px; }
.pin-card-age { font-size: 11px; color: var(--muted-light); padding: 6px 8px 4px; }
.pin-card-num { font-size: 28px; font-weight: 700; font-family: 'Cinzel', serif; padding: 6px 0; margin: 0 8px; border-radius: 4px; }
.pin-card-desc { font-size: 11px; color: var(--muted-light); padding: 8px 10px; text-align: left; line-height: 1.5; min-height: 70px; }
.pin-desc-bg1 { background: var(--coral-100); }
.pin-desc-bg2 { background: var(--teal-50); }
.pin-desc-bg3 { background: var(--teal-50); }
.pin-desc-bg4 { background: var(--teal-100); }
.pin-meanings-header { background: var(--muted-light); color: #fff; font-size: 11px; font-weight: 700; padding: 7px 14px; }
.pin-meaning-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--teal-200); }
.pin-meaning-row:last-child { border-bottom: none; }
.pin-meaning-num { min-width: 44px; width: 44px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; font-family: 'Cinzel', serif; color: #fff; }
.pin-meaning-text { padding: 12px 14px; font-size: 12px; color: var(--black); line-height: 1.6; flex: 1; background: #fff; }
@media (max-width: 560px) { .pin-cards { grid-template-columns: repeat(2,1fr); } }
.minor-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-align: center; padding: 10px 16px; text-transform: uppercase; }
.minor-table { width: 100%; border-collapse: collapse; }
.minor-row { border-bottom: 1px solid var(--teal-200); }
.minor-row:last-child { border-bottom: none; }
.minor-label-cell { width: 220px; min-width: 200px; padding: 14px 14px 14px 16px; background: var(--teal-50); border-right: 2px solid var(--teal-700); vertical-align: top; }
.minor-num-tag { font-size: 10px; font-weight: 700; color: #fff; background: var(--teal-700); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; padding: 6px 10px; border-radius: 4px; line-height: 1.4; word-break: break-word; }
.minor-num-def { font-size: 11px; color: var(--muted-light); line-height: 1.5; overflow: hidden; }
.minor-num-val { font-size: 56px; font-weight: 700; color: var(--teal-700); font-family: 'Cinzel', serif; line-height: 1; float: left; margin: 0 10px 4px 0; }
.minor-interp-cell { padding: 14px 16px; vertical-align: top; font-size: 13px; color: var(--black); line-height: 1.7; background: #fff; }
.minor-career-block { border-top: 1px solid var(--teal-200); }
.minor-career-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .1em; text-align: center; padding: 8px 16px; text-transform: uppercase; }
.minor-career-text { padding: 14px 20px; font-size: 13px; color: var(--black); line-height: 1.7; background: #fff; }
.bridge-header { background: var(--teal-700); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-align: center; padding: 10px 16px; text-transform: uppercase; }
.bridge-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; }
.bridge-card { border-right: 1px solid var(--teal-200); }
.bridge-card:last-child { border-right: none; }
.bridge-card-title { background: var(--teal-700); color: #fff; font-size: 11px; font-weight: 700; padding: 7px 14px; letter-spacing: .04em; }
.bridge-card-body { padding: 14px; font-size: 13px; color: var(--black); line-height: 1.6; min-height: 60px; background: #fff; }
@media (max-width: 560px) { .bridge-grid { grid-template-columns: 1fr; } .bridge-card { border-right: none; border-bottom: 1px solid var(--teal-200); } }
/* Responsive */
@media (max-width: 640px) {
  .chart-header { flex-direction: column; }
  .chart-photo-wrap { flex: none; width: 100%; }
  .chart-right { flex: none; flex-direction: row; flex-wrap: wrap; }
  .core-label-cell { width: 100%; border-right: none; border-bottom: 1px solid var(--teal-200); display: block; }
  .core-interp-cell { display: block; }
  .core-table, .core-table tbody, .core-row, .core-label-cell, .core-interp-cell { display: block; width: 100%; }
}
@media (max-width: 560px) {
  .three-col .field-group { min-width: 100%; }
  .dob-row .field-group { min-width: 45%; }
  .theme-toggle { top: 12px; right: 12px; }
  .ng-col { width: 18px; }
  .ng-tile { width: 16px; height: 16px; line-height: 16px; font-size: 9px; }
  .ng-gap { width: 8px; }
}

/* ================================================================
   Django port additions — classes replacing the original inline JS styles
   ================================================================ */
/* Number-family colours (generated from engine.constants.NUM_COLORS) */
.nc-1 { background:#cc2222; color:#FFFFFF; --nc:#cc2222; --nc-fg:#FFFFFF; } .nct-1 { color:#CC2222; }
.nc-2 { background:#e07820; color:#000000; --nc:#e07820; --nc-fg:#000000; } .nct-2 { color:#A15617; }
.nc-3 { background:#d4c010; color:#000000; --nc:#d4c010; --nc-fg:#000000; } .nct-3 { color:#766B08; }
.nc-4 { background:#7abf7a; color:#000000; --nc:#7abf7a; --nc-fg:#000000; } .nct-4 { color:#497249; }
.nc-5 { background:#1a5fa8; color:#FFFFFF; --nc:#1a5fa8; --nc-fg:#FFFFFF; } .nct-5 { color:#1A5FA8; }
.nc-6 { background:#1a4a8a; color:#FFFFFF; --nc:#1a4a8a; --nc-fg:#FFFFFF; } .nct-6 { color:#1A4A8A; }
.nc-7 { background:#7b2d9e; color:#FFFFFF; --nc:#7b2d9e; --nc-fg:#FFFFFF; } .nct-7 { color:#7B2D9E; }
.nc-8 { background:#e070a0; color:#000000; --nc:#e070a0; --nc-fg:#000000; } .nct-8 { color:#A15073; }
.nc-9 { background:#2a8a6a; color:#000000; --nc:#2a8a6a; --nc-fg:#000000; } .nct-9 { color:#24795D; }
.nc-11 { background:#e07820; color:#000000; --nc:#e07820; --nc-fg:#000000; } .nct-11 { color:#A15617; }
.nc-22 { background:#7abf7a; color:#000000; --nc:#7abf7a; --nc-fg:#000000; } .nct-22 { color:#497249; }
.nc-0 { background:var(--muted-light); color:#FFFFFF; --nc:var(--muted-light); --nc-fg:#FFFFFF; } .nct-0 { color:var(--teal-700); }
.nc-33 { background:#1a4a8a; color:#FFFFFF; --nc:#1a4a8a; --nc-fg:#FFFFFF; } .nct-33 { color:#1A4A8A; }   /* 33 = 6 family */
.te-v0 { background:var(--teal-50); color:var(--black); } .te-v33 { background:#1a4a8a; color:#FFFFFF; }
.te-small { font-size:6px; }
.te-ky-none { background:var(--teal-50); }
.te-ky-lp, .te-ky-bd, .te-ky-both { color:#fff; font-size:6px; font-weight:700; }
.te-ky-lp { background:#2E7D3A; } .te-ky-bd { background:#7b2d9e; } .te-ky-both { background:#1a5fa8; }

/* Name grids: words wrap naturally instead of JS width measuring */
.ng-words { display:flex; flex-wrap:wrap; column-gap:12px; row-gap:10px; }
.ng-word { display:flex; flex-direction:column; }

/* Section 11 grid */
.kh-grid { grid-template-columns: repeat(9, 36px); }

/* Section 12 superscript counts */
.pl-letter-cell sup { font-size:7px; vertical-align:super; }

/* Section 14 personal year / month / day states */
.py-year-cell { background:var(--teal-800); color:#fff; padding:5px 14px !important; }
.py-year-cell.is-current { font-weight:700; font-size:13px; }
.py-th-month.is-today, .py-days-table th.is-today { background:var(--coral); color:var(--black); font-weight:900; }
.cell-focus { outline:3px solid var(--black); outline-offset:-3px; font-weight:900; font-size:13px; }
/* Non-current cells: neutral + colour stripe (no opacity fading: keeps text >= 7:1) */
.cell-dim, .cell-col { background:var(--white) !important; color:var(--black) !important; box-shadow: inset 0 -4px 0 var(--nc, var(--teal)); }
.cell-col { background:var(--teal-50) !important; }
.py-days-table td, .py-days-table th { font-size:9px; }
.py-meaning-row { margin-bottom:10px; align-items:flex-start; }
.py-meaning-num.is-current { box-shadow:0 0 0 2px #000; font-size:13px; }
.py-meaning-text .lesson { font-size:10px; } .py-meaning-text .plus { color:#2E7D3A; font-size:9px; } .py-meaning-text .minus { color:#C73A3A; font-size:9px; }

/* Misc */
.birthday-text { font-size:12px; color:var(--muted-light); line-height:1.6; margin-top:8px; }
.session-bar.is-visible { display:block; }
.errorlist { list-style:none; color:var(--err-dark); font-size:12px; margin-top:4px; }
.form-actions .btn-secondary { margin-left:10px; background:transparent; border:1px solid var(--teal-800); color:var(--coral); padding:12px 20px; border-radius:10px; cursor:pointer; text-decoration:none; font-size:14px; }
.ai-error { font-size:12px; color:var(--muted-dark); font-style:italic; }
.ai-meta { font-size:10px; color:var(--muted-light); margin-top:6px; }

/* ── In-app alerts (static/js/alerts.js) — browser alerts are forbidden ── */
.lpc-alert { position:absolute; z-index:1000; max-width:340px; display:flex; align-items:flex-start; gap:10px;
  padding:10px 12px; border-radius:10px; font-size:13px; line-height:1.4; box-shadow:0 8px 24px rgba(0,0,0,.35);
  background:var(--teal-950); color:var(--white); border:1px solid var(--teal-800); border-left-width:4px; animation:lpcIn .18s ease-out; }
.lpc-alert-success { border-left-color:#337941; }
.lpc-alert-info    { border-left-color:var(--teal); }
.lpc-alert-warning { border-left-color:var(--warn-dark); }
.lpc-alert-error   { border-left-color:var(--err-dark); }
.lpc-alert-critical { box-shadow:0 0 0 2px rgba(255,138,128,.35), 0 8px 24px rgba(0,0,0,.35); }
.lpc-alert-text { flex:1; }
.lpc-alert-close { background:none; border:none; color:inherit; font-size:18px; line-height:1; cursor:pointer; opacity:.7; padding:0 2px; }
.lpc-alert-close:hover { opacity:1; }
.lpc-alert-leaving { opacity:0; transform:translateY(-4px); transition:opacity .2s, transform .2s; }
@keyframes lpcIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
body.light .lpc-alert { background:#ffffff; color:var(--black); border-color:var(--teal-200); box-shadow:0 8px 24px rgba(0,0,0,.12); }

/* ── Footer: pinned to the bottom of the page (end of content), never floating ── */
.app-footer { position:static; margin-top:auto; flex-shrink:0; }
.app-footer .footer-link { color:var(--coral); text-decoration:none; }
.app-footer .footer-link:hover { text-decoration:underline; }

/* ── Logo link & misc ── */
.logo-link { text-decoration:none; color:var(--coral); }
.chart-logo a { display:inline-block; }
.link-button { background:none; border:none; padding:0; color:var(--coral); text-decoration:underline; cursor:pointer; font:inherit; }

/* ================================================================
   Brand contrast overrides (Eagle Rank) — keep at end of file
   ================================================================ */
.btn-primary { background: var(--coral); color: var(--black); font-weight: 700; }
.btn-primary:hover { background: #FF8A7F; opacity: 1; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .theme-toggle:focus-visible, a:focus-visible,
button:focus-visible, .field-input:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.btn-primary:disabled { background: var(--teal-800); color: var(--muted-dark); opacity: 1; }
.form-actions .btn-secondary { border-color: var(--teal); color: var(--white); background: transparent; }
.form-actions .btn-secondary:hover { background: var(--teal-900); }
.field-input { border-color: var(--teal); color: var(--white); }
.field-input::placeholder { color: var(--muted-dark); opacity: 1; }
.field-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,111,97,0.25); }
.field-select option { background: var(--teal-950); color: var(--white); }
body.light .field-input { border-color: var(--teal-700); color: var(--black); }
body.light .field-input::placeholder { color: var(--muted-light); }
body.light .field-select option { background: var(--white); color: var(--black); }
.section-num { color: var(--coral); border-color: var(--coral); }
body.light .section-num, body.light .gold-tag, body.light .logo-mark, body.light .chip-val { color: var(--coral-700); border-color: var(--coral-700); }
.app-title { color: var(--white); }
body.light .app-title { color: var(--teal-700); }
.app-sub { color: var(--muted-dark); }
body.light .app-sub { color: var(--muted-light); }
.spinner { border-color: var(--teal-800); border-top-color: var(--coral); }
.app-footer { color: var(--muted-dark); border-top-color: var(--teal-800); }
.app-footer .footer-link, .session-bar a, .link-button { color: var(--coral); }
body.light .app-footer { color: var(--muted-light); border-top-color: var(--teal-200); }
body.light .app-footer .footer-link, body.light .session-bar a, body.light .link-button { color: var(--coral-700); }
body.light .theme-toggle { color: var(--black); }
body.light .errorlist { color: var(--err-light); }
.report-section .errorlist { color: var(--err-light); }
body.light .form-actions .btn-secondary { color:var(--teal-700); border-color:var(--teal-700); }
body.light .form-actions .btn-secondary:hover { background:var(--teal-50); }

/* Current Personal Year shows its number colour (beats the generic year-cell style) */
.py-year-cell.is-current { background:var(--nc); color:var(--nc-fg); outline:3px solid var(--black); outline-offset:-3px; }
/* Readability floor: no text below 8px in dense tables, 11px+ for reading text */
.te-cell { font-size:8px; } .te-small, .te-ky-lp, .te-ky-bd, .te-ky-both { font-size:7px; } .te-cell-year { font-size:7px; }
.py-meaning-text .lesson { font-size:12px; } .py-meaning-text .plus, .py-meaning-text .minus { font-size:11px; }
.py-days-table td, .py-days-table th { font-size:10px; }

/* ================================================================
   Readability pass (Eagle Rank) - coral is a FILL colour only
   (primary button, focus ring, today/highlight cells, logo mark).
   Text is white / teal on dark, black / dark-teal on light.
   ================================================================ */
html, body { overflow-x: clip; }
.app-title { color: var(--white); }
.section-num { font-family:'Inter',sans-serif; font-weight:700; font-size:11px; color:var(--white);
  background:var(--teal-700); border:1px solid var(--teal); letter-spacing:.06em; }
.gold-tag { color:var(--teal-300); font-family:'Inter',sans-serif; font-weight:800; font-size:14px; }
.y-note { background:var(--teal-900); border:1px solid var(--teal); color:var(--white); }
.y-note-icon { color:var(--teal-300); }
.chip-val { color:var(--white); font-family:'Inter',sans-serif; font-weight:600; font-size:15px; word-break:break-word; }
.chip-label { color:var(--muted-dark); }
.btn-icon { color:inherit; }
.photo-initials { color:var(--teal-700); }
.lang-globe { color:var(--teal-300); }
.theme-toggle { color:var(--white); border-color:var(--teal); }
.theme-toggle:hover { border-color:var(--teal-300); }
.app-footer .footer-link, .session-bar a, .link-button, .logo-link { color:var(--teal-300); }
.form-actions .btn-secondary { color:var(--white); border-color:var(--teal); }

/* Primary call to action: solid coral, black bold Inter (7.7:1), no small caps */
.btn-primary { background:var(--coral); color:var(--black); font-family:'Inter',sans-serif; font-size:16px;
  font-weight:700; letter-spacing:.02em; text-transform:none; font-variant:normal; padding:14px 36px;
  box-shadow:0 4px 18px rgba(255,111,97,.25); }
.btn-primary:hover { background:#FF8A7F; }

/* Chrome/Edge autofill: keep dark field + white text (was a white box) */
.field-input:-webkit-autofill, .field-input:-webkit-autofill:hover, .field-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--white); caret-color: var(--white);
  -webkit-box-shadow: 0 0 0 1000px var(--teal-950) inset; box-shadow: 0 0 0 1000px var(--teal-950) inset;
  transition: background-color 9999s ease-in-out 0s; }
body.light .field-input:-webkit-autofill { -webkit-text-fill-color: var(--black); -webkit-box-shadow: 0 0 0 1000px var(--white) inset; }

/* Language selector: native <select>, full contrast in both themes */
.lang-wrap { background:var(--teal-900); border:1px solid var(--teal); max-width:230px; padding:4px 10px; }
#google_translate_element .goog-te-gadget { font-size:0 !important; color:transparent !important; line-height:0; }
#google_translate_element .goog-te-gadget > span, #google_translate_element .goog-logo-link { display:none !important; }
#google_translate_element select.goog-te-combo { font-family:'Inter',sans-serif; font-size:13px !important; font-weight:600;
  color:var(--white) !important; background:transparent !important; border:none; padding:4px 2px; margin:0 !important;
  max-width:180px; cursor:pointer; -webkit-appearance:auto; appearance:auto; }
#google_translate_element select.goog-te-combo option { background:var(--teal-950); color:var(--white); }
#google_translate_element select.goog-te-combo:focus-visible { outline:3px solid var(--coral); outline-offset:2px; }
.goog-te-gadget-icon, .goog-te-gadget-simple { display:none !important; }

/* Light theme counterparts */
body.light .section-num { color:var(--white); background:var(--teal-700); border-color:var(--teal-700); }
body.light .gold-tag, body.light .y-note-icon, body.light .lang-globe { color:var(--teal-700); }
body.light .y-note { background:var(--teal-50); border-color:var(--teal-700); color:var(--black); }
body.light .chip-val { color:var(--black); }
body.light .chip-label { color:var(--muted-light); }
body.light .app-footer .footer-link, body.light .session-bar a, body.light .link-button, body.light .logo-link { color:var(--teal-700); }
body.light .lang-wrap { background:var(--white); border-color:var(--teal-700); }
body.light #google_translate_element select.goog-te-combo { color:var(--black) !important; }
body.light #google_translate_element select.goog-te-combo option { background:var(--white); color:var(--black); }
body.light .theme-toggle { background:var(--white); border-color:var(--teal-700); color:var(--black); }
.photo-initials { color:var(--white); }

/* ================================================================
   Personal Year / Months / Days — full-width grids, solid cells,
   centred numbers, real calendar with blocked non-dates
   ================================================================ */
.py-row1 { display:grid; grid-template-columns: 120px 1fr; gap:0; align-items:start; }
.py-col-months, .py-row2 { min-width:0; }
.pyx-table { width:100%; border-collapse:separate; border-spacing:2px; table-layout:fixed; }
.pyx-table td, .pyx-table th { text-align:center; vertical-align:middle; padding:0; height:30px;
  font-family:'Inter',sans-serif; font-weight:700; font-size:13px; border-radius:3px; line-height:1.1; }
.pyx-table td { font-size:14px; }
.pyx-head { background:var(--teal-700); color:#fff; font-size:12px; }
.pyx-head.is-today { background:var(--coral); color:#000; }
.pyx-sub { display:block; font-size:10px; font-weight:600; opacity:1; }
.pyx-corner { background:var(--teal-900); color:#fff; font-size:10px; width:56px; }
.pyx-label { width:56px; font-size:13px; }
.pyx-year td { height:36px; font-size:16px; }
.pyx-year td.is-other { background:var(--teal-800); color:#fff; }
.pyx-year td.is-current { outline:3px solid var(--black); outline-offset:-3px; font-size:18px; }
.pyx-table td.is-focus { outline:3px solid var(--black); outline-offset:-3px; box-shadow: inset 0 0 0 5px #fff; }
.pyx-table tr.is-current-row th.pyx-label { outline:3px solid var(--black); outline-offset:-3px; }
.pyx-days td, .pyx-days th { height:28px; font-size:12px; }
.pyx-days .pyx-corner, .pyx-days .pyx-month-label { width:70px; }
.pyx-month-label { background:var(--teal-700); color:#fff; text-align:left !important; padding-left:6px !important; white-space:nowrap; }
.pyx-pm { display:inline-block; min-width:20px; padding:1px 4px; border-radius:3px; margin-left:4px; font-size:11px; text-align:center; }
.pyx-blocked { background: repeating-linear-gradient(45deg, var(--teal-900) 0 6px, #0a2228 6px 12px); }
.pyx-scroll { overflow-x:auto; }
.pyx-days td, .pyx-days th.pyx-head { font-size:11px; }
@media (max-width: 760px) { .pyx-days { min-width:720px; } }
.py-calc { font-size:12px; color:var(--muted-light); margin-top:8px; font-weight:600; }

/* Bridges & special-number calculations */
.bridge-card-calc { font-size:12px; font-weight:700; color:var(--teal-700); background:var(--teal-50);
  padding:6px 14px; border-bottom:1px solid var(--teal-200); }
.sp-calc { font-size:12px; font-weight:700; color:var(--teal-700); background:var(--teal-50);
  padding:8px 12px; border-right:1px solid var(--teal-200); border-bottom:1px solid var(--teal-200); vertical-align:top; }
.sp-calc:last-child { border-right:none; }
@media (max-width: 640px) { .py-row1 { grid-template-columns: 1fr; } }
.py-calc-wide { padding:8px 14px; background:var(--teal-50); border-bottom:2px solid var(--teal-700); font-size:13px; font-weight:700; color:var(--teal-700); }

/* ── Personal Year column aligned row-for-row with Personal Months ── */
.pyx-months thead th, .pyx-year thead th { height:38px; }
.pyx-months tbody td, .pyx-months tbody th, .pyx-year tbody td { height:32px; }
.pyx-year td { font-size:16px; }
.pyx-year-head { background:var(--teal-900) !important; }
/* ── Personal Days: month labels in fixed columns (no zig-zag) ── */
.pyx-month-label { display:table-cell; }
.pyx-month-label .pyx-month-name { display:inline-block; width:30px; text-align:left; }
.pyx-month-label .pyx-pm { display:inline-block; width:22px; min-width:22px; margin-left:6px; padding:1px 0; text-align:center; }
.pyx-days td { font-variant-numeric: tabular-nums; }

/* ── Name grids (mock-up layout) ── */
.ng-words { display:flex; flex-wrap:wrap; column-gap:28px; row-gap:18px; align-items:flex-start; }
.ng-word { display:flex; flex-direction:column; align-items:stretch; }
.ng-col { width:24px; }
.ng-tile { width:22px; height:22px; line-height:22px; font-size:11px; border-radius:4px; font-weight:800; }
.ng-num { color:var(--teal-900); font-size:10px; }
.ng-totals { border-top:1px dashed var(--teal-300); margin-top:6px; padding-top:5px; text-align:center;
  font-size:12px; font-weight:700; color:var(--teal-900); white-space:nowrap; }
.ng-total.is-special { color:var(--coral-700); }
.ng-sep { color:var(--coral-700); margin:0 5px; font-weight:400; }
.ng-summary { display:grid; grid-template-columns:repeat(3, 1fr); margin-top:20px; border:1px solid var(--teal-200);
  border-radius:10px; background:var(--teal-50); overflow:hidden; }
.ng-sum { padding:12px 16px; border-right:1px solid var(--teal-200); font-size:15px; font-weight:800; color:var(--black); }
.ng-sum:last-child { border-right:none; }
.ng-sum-label { font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--teal-900); margin-right:6px; }
.ng-op { color:var(--black); font-weight:600; margin:0 4px; }
.ng-legend { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:14px 20px; border-top:1px solid var(--teal-200);
  font-size:12px; color:var(--black); }
.ng-legend-label { font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--teal-900); }
.ng-legend-chip { width:24px; height:24px; line-height:24px; text-align:center; border-radius:4px; font-weight:800; }
.ng-legend-text { color:var(--muted-light); margin-left:6px; }
@media (max-width: 640px) { .ng-summary { grid-template-columns:1fr; } .ng-sum { border-right:none; border-bottom:1px solid var(--teal-200); } }

/* ── Number tooltips (screen only) ── */
.report-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:24px 0 12px; }
.tips-toggle { background:var(--teal-700); color:#fff; border:1px solid var(--teal); border-radius:20px; padding:6px 14px;
  font-family:'Inter',sans-serif; font-weight:700; font-size:13px; cursor:pointer; }
.tips-toggle[aria-pressed="false"] { background:transparent; color:var(--white); }
.report-toolbar-hint { font-size:12px; color:var(--muted-dark); }
body.light .tips-toggle[aria-pressed="false"] { color:var(--black); border-color:var(--teal-700); }
body.light .report-toolbar-hint { color:var(--muted-light); }
.lpc-tip { position:absolute; z-index:1100; max-width:300px; background:var(--teal-950); color:#fff; border:1px solid var(--teal);
  border-radius:8px; padding:8px 10px; font-size:12px; line-height:1.45; box-shadow:0 8px 24px rgba(0,0,0,.4); pointer-events:none; }
.lpc-tip-title { font-weight:800; margin-bottom:3px; color:var(--teal-300); }
body:not(.tips-off) .report-section [data-num], body:not(.tips-off) .report-section [class*="nc-"],
body:not(.tips-off) .report-section [class*="te-v"] { cursor:help; }

/* ── Paper version ── */
@media print {
  .lpc-tip, .report-toolbar, .lpc-alert, .lang-wrap, .theme-toggle, #readingForm, .session-bar { display:none !important; }
  body, .app-wrapper { background:#fff !important; color:#000 !important; }
  .report-section { break-inside:avoid-page; box-shadow:none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Same digit size in every row (no jumping); current row marked by its outlined label only */
.pyx-days td { font-size:12px !important; }
.pyx-months tbody td { font-size:14px; }
.ng-sum { white-space:nowrap; font-size:14px; }
@media (max-width: 900px) { .ng-sum { white-space:normal; } }

/* ── Sections 15-20 (extras) ─────────────────────────────────────── */
.xt-h2 { border-top: 2px solid #fff; }
.xt-body { padding: 16px 18px; color: var(--black); }
.xt-body + .xt-body { padding-top: 0; }
.xt-p { font-size: 13px; line-height: 1.7; margin: 8px 0; color: var(--black); }
.xt-sub { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700);
  margin: 16px 0 8px; border-bottom: 1px solid var(--teal-200); padding-bottom: 4px; }
.xt-note { font-size: 12px; color: #333; margin: 8px 0; }
.xt-ai { margin-top: 14px; padding: 12px 14px; background: var(--teal-50); border-left: 4px solid var(--teal-700); border-radius: 6px; }
.xt-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.xt-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--teal-200); border-radius: 10px; padding: 8px 10px; background: #fff; }
.xt-chip-n { flex: 0 0 auto; min-width: 42px; height: 42px; padding: 0 6px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 800; }
.xt-chip-t { display: flex; flex-direction: column; font-size: 12px; color: #222; line-height: 1.35; }
.xt-chip-t strong { font-size: 13px; color: var(--black); }
.xt-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px;
  border-radius: 15px; font-weight: 800; font-size: 14px; }
.xt-pill.sm { min-width: 24px; height: 24px; font-size: 12px; border-radius: 12px; vertical-align: middle; }
.xt-rel { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.xt-rel-i { border: 1px solid var(--teal-200); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.xt-rel-pair { font-weight: 700; line-height: 1.9; }
.xt-rel-kind { font-weight: 800; color: var(--teal-700); margin-top: 4px; }
.xt-rel-hint { font-size: 12px; color: #333; }
/* Focus-day calendar */
.xt-ctl { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 6px; }
.xt-ctl label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--black); }
.xt-ctl select, .xt-ctl input { border: 1px solid var(--teal-700); border-radius: 6px; padding: 5px 8px; font: inherit; font-weight: 600;
  background: #fff; color: var(--black); }
.xt-ctl input { width: 90px; }
.xt-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 560px; }
.xt-cal-h { text-align: center; font-size: 11px; font-weight: 800; color: var(--teal-700); padding: 4px 0; }
.xt-cal-d { position: relative; min-height: 50px; border-radius: 6px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; border: 2px solid transparent; }
.xt-cal-d .dn { position: absolute; top: 2px; left: 5px; font-size: 10px; font-weight: 700; }
.xt-cal-d .pv { font-size: 18px; font-weight: 800; }
.xt-cal-e { background: transparent; }
.xt-cal-d.muted { background: #EEF0F1 !important; color: #3A3A3A !important; }
.xt-cal-d.hit { border-color: var(--black); box-shadow: 0 0 0 2px #fff inset; }
.xt-cal-d.today { border-color: var(--black); border-style: dashed; }
/* Duality */
.xt-dual { border: 1px solid var(--teal-200); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.xt-dual-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center; }
.xt-dual-d { font-weight: 800; font-size: 13px; }
.xt-dual-c { font-size: 12px; font-weight: 600; }
.xt-dual-k { margin-left: 6px; font-weight: 800; color: var(--teal-700); }
.xt-dual-ai { margin-top: 8px; }
.xt-dual-b, .xt-dual-all { background: var(--teal-700); color: #fff; border: 1px solid var(--teal-700); border-radius: 18px;
  padding: 6px 14px; font: 700 12px 'Inter', sans-serif; cursor: pointer; margin-top: 6px; }
.xt-dual-b:hover, .xt-dual-all:hover { background: var(--black); border-color: var(--black); }
.xt-dual-b:disabled, .xt-dual-all:disabled { background: #fff; color: var(--black); border-color: var(--black); cursor: progress; }
.xt-dual-b:focus-visible, .xt-dual-all:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
/* Glossary + number meanings */
.xt-gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px 18px; font-size: 13px; }
.xt-gloss dt { display: inline; font-weight: 800; }
.xt-gloss dd { display: inline; margin: 0; }
.xt-wrap { overflow-x: auto; }
.xt-tbl { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--black); }
.xt-tbl th { background: var(--teal-700); color: #fff; text-align: left; padding: 7px 8px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.xt-tbl td { border-bottom: 1px solid var(--teal-200); padding: 8px; vertical-align: top; line-height: 1.5; }
.xt-tbl .c { text-align: center; width: 150px; }
.xt-fam-n { font-size: 11px; color: #333; margin-top: 4px; }
.xt-fam { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.xt-fam-l { width: 100%; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--black); }
.xt-fc { display: inline-block; min-width: 24px; padding: 1px 3px; border-radius: 4px; border: 1px solid #9AA5A8; background: #fff;
  color: var(--black); font-size: 11px; font-weight: 700; }
.xt-fc.karmic { border: 2px solid var(--black); font-weight: 800; }
.xt-fc.master { border-color: transparent; background: var(--nc); color: var(--nc-fg); }
@media (max-width: 640px) { .xt-cal-d { min-height: 42px; } .xt-cal-d .pv { font-size: 15px; } .xt-tbl .c { width: 110px; } }
@media print { .no-print { display: none !important; } .xt-dual-ai[hidden] { display: none !important; } }

/* ── Readability fixes: identity padding, name summary wrap, timeline label rows ── */
.chart-id-table { margin: 10px 0; }
.chart-id-table td:first-child { padding-left: 18px; }
.chart-id-table td:last-child { padding-right: 18px; }
.id-label { font-size: 12px; width: 128px; }
.id-val { font-size: 13px; }
.ng-sum { white-space: normal; font-size: 14px; padding: 12px 14px; }
.ng-sum-label { display: block; margin: 0 0 4px; font-size: 11px; }
.ng-sum .ng-part, .ng-sum .ng-result, .ng-sum .ng-op { white-space: nowrap; }
/* Long labels (e.g. "Essence Compound") wrap to two lines; every row keeps the same height, numbers centred */
.te-row-label { white-space: normal; line-height: 1.15; padding: 2px 5px; }
.te-table tr:not(:first-child) > td { height: 24px; vertical-align: middle; text-align: center; }
.te-table tr:not(:first-child) > td.te-row-label { text-align: left; }

/* ── Focus calendar: full width + insight panel; pair advice (compatibility table) ── */
.xt-cal-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 18px; align-items: start; margin-top: 8px; }
.xt-cal { max-width: none; gap: 6px; }
.xt-cal-d { min-height: 64px; cursor: pointer; }
.xt-cal-d .dn { font-size: 11px; top: 3px; left: 6px; }
.xt-cal-d .pv { font-size: 22px; }
.xt-cal-d:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.xt-cal-d.selected { outline: 3px solid var(--black); outline-offset: 2px; }
.xt-cal-e { cursor: default; }
.xt-ins { display: flex; flex-direction: column; gap: 10px; }
.xt-ins-date { font-size: 13px; font-weight: 800; color: var(--teal-700); text-transform: uppercase; letter-spacing: .05em; }
.xt-ins-card { border: 1px solid var(--teal-200); border-left: 4px solid var(--teal-700); border-radius: 8px; padding: 10px 12px; background: #fff; }
.xt-ins-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.xt-ins-text { font-size: 12.5px; line-height: 1.6; margin: 6px 0 0; color: var(--black); }
.xt-ins-pair { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--teal-200); font-size: 12px; }
.xt-ins-pair-t { display: block; margin-bottom: 4px; color: var(--black); }
.pair-adv { font-size: 12px; line-height: 1.55; color: var(--black); margin-top: 6px; }
.pair-tone { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 10px; padding: 2px 9px; margin-bottom: 4px; }
.pair-tone.tone-F { background: var(--teal-700); color: #fff; }
.pair-tone.tone-M { background: var(--black); color: #fff; }
.pair-tone.tone-C { background: var(--coral); color: var(--black); }
.pair-line { margin-top: 2px; }
@media (max-width: 900px) { .xt-cal-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .xt-cal-d { min-height: 46px; } .xt-cal-d .pv { font-size: 16px; } }
.ai-key { font-weight: 800; color: var(--black); }

/* Focus calendar: calendar on its own full row; insights below (Year | Month), then Day full width */
.xt-cal-layout { grid-template-columns: 1fr; gap: 16px; }
.xt-cal-d { min-height: 58px; }
.xt-ins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.xt-ins-date { grid-column: 1 / -1; }
.xt-ins-card { display: flex; flex-direction: column; }
.xt-ins-card[data-part="day"] { grid-column: 1 / -1; }
@media (max-width: 760px) { .xt-ins { grid-template-columns: 1fr; } }
.xt-ins-card .xt-ins-pair { margin-top: auto; } .xt-ins-card .xt-ins-text { margin-bottom: 8px; }

/* PDF download (coral fill = primary action, black text 7.7:1) */
.pdf-btn { background: var(--coral); color: var(--black); border: 2px solid var(--coral); border-radius: 20px; padding: 6px 16px;
  font: 800 13px 'Inter', sans-serif; cursor: pointer; }
.pdf-btn:hover { background: #fff; border-color: var(--coral); }
.pdf-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
body.light .pdf-btn:focus-visible { outline-color: var(--black); }
.pdf-btn:disabled { background: #fff; color: var(--black); cursor: progress; }
/* While html2canvas renders a section: no shadows (they print as grey smears) */
.pdf-render .report-section { box-shadow: none !important; }

/* Progress panel (LPC.progress): percentage + rotating tips while the user waits */
.lpc-progress { position: fixed; right: 18px; bottom: 18px; z-index: 9000; width: 360px; max-width: calc(100vw - 24px);
  background: #fff; color: var(--black); border: 2px solid var(--teal-700); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); font-family: 'Inter', sans-serif; }
.lpc-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.lpc-progress-pct { font-weight: 800; font-size: 15px; color: var(--teal-700); font-variant-numeric: tabular-nums; }
.lpc-progress-track { height: 10px; border-radius: 6px; background: var(--teal-50); border: 1px solid var(--teal-200); margin: 8px 0 6px; overflow: hidden; }
.lpc-progress-fill { height: 100%; width: 0; background: var(--teal-700); transition: width .35s ease; }
.lpc-progress-step { font-size: 12px; font-weight: 600; color: #222; min-height: 16px; }
.lpc-progress-tip { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--teal-200); font-size: 12px; line-height: 1.5; color: #222; }
@media (max-width: 640px) { .lpc-progress { right: 12px; left: 12px; bottom: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .lpc-progress-fill { transition: none; } }
@media print { .lpc-progress { display: none !important; } }

/* ── Accounts: header links, sign-in/up and account pages (django-allauth) ── */
.account-nav { position: absolute; top: 18px; right: 76px; display: flex; align-items: center; gap: 6px; z-index: 10; font-size: 13px; }
.account-nav a, .account-nav .link-button { color: var(--white); text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 16px; }
.account-nav a:hover, .account-nav .link-button:hover { text-decoration: underline; }
.account-nav form { display: inline; margin: 0; }
.account-nav .account-nav-cta { background: var(--coral); color: var(--black); }
body.light .account-nav a, body.light .account-nav .link-button { color: var(--black); }
body.light .account-nav .account-nav-cta { color: var(--black); }
@media (max-width: 720px) { .account-nav { position: static; justify-content: center; flex-wrap: wrap; margin: 30px 0 -6px; } }

.auth-wrap { display: flex; justify-content: center; padding: 8px 0 24px; }
.auth-card { width: 100%; max-width: 720px; background: var(--teal-900); border: 1px solid var(--teal-800); border-radius: 16px; padding: 28px; color: var(--white); }
body.light .auth-card { background: #fff; border-color: var(--teal-200); color: var(--black); }
.auth-title { font-family: 'Cinzel', serif; font-size: 22px; letter-spacing: .06em; color: var(--white); margin: 0 0 12px; }
body.light .auth-title { color: var(--teal-700); }
.auth-subtitle { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dark); margin: 22px 0 10px; }
body.light .auth-subtitle { color: var(--muted-light); }
.auth-p { font-size: 14px; line-height: 1.6; margin: 8px 0; color: inherit; }
.auth-card a:not(.auth-btn) { color: var(--white); text-decoration: underline; }
body.light .auth-card a:not(.auth-btn) { color: var(--teal-700); }
.auth-hr { border: none; border-top: 1px solid var(--teal-800); margin: 20px 0; }
body.light .auth-hr { border-top-color: var(--teal-200); }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .auth-card select, .auth-card textarea {
  background: var(--teal-950); border: 1px solid var(--teal); border-radius: 10px; color: var(--white);
  font: 15px 'Inter', sans-serif; padding: 11px 14px; width: 100%; }
body.light .auth-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]), body.light .auth-card select,
body.light .auth-card textarea { background: var(--teal-50); color: var(--black); border-color: var(--teal-700); }
.auth-card input:focus-visible, .auth-card textarea:focus-visible { outline: 3px solid var(--coral); outline-offset: 1px; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; accent-color: var(--teal); }
.auth-help { font-size: 12px; color: var(--muted-dark); line-height: 1.5; }
.auth-help ul { margin: 4px 0 0 18px; }
body.light .auth-help { color: var(--muted-light); }
.auth-errors, .auth-field.has-error .errorlist { color: var(--err-dark); font-size: 13px; font-weight: 600; }
body.light .auth-errors, body.light .auth-field.has-error .errorlist { color: var(--err-light); }
.auth-errors .errorlist { margin: 0; }
.auth-actions, .auth-btn-group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.auth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; padding: 10px 18px;
  font: 700 14px 'Inter', sans-serif; cursor: pointer; text-decoration: none; border: 2px solid var(--teal); background: var(--teal-700); color: #fff; }
.auth-btn.is-primary { background: var(--coral); border-color: var(--coral); color: var(--black); }
.auth-btn.is-primary:hover { background: #FF8A7F; }
.auth-btn.is-outline { background: transparent; color: var(--white); border-color: var(--teal); }
body.light .auth-btn.is-outline { color: var(--black); border-color: var(--teal-700); }
.auth-btn.is-danger { background: var(--err-light); border-color: var(--err-light); color: #fff; }
.auth-btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.auth-providers { display: flex; flex-direction: column; gap: 8px; }
.auth-provider { justify-content: center; }
.auth-note { border-left: 4px solid var(--teal); background: rgba(70,129,143,.18); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 10px 0; }
body.light .auth-note { background: var(--teal-50); border-left-color: var(--teal-700); }
.auth-panel { margin-top: 16px; }
.auth-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.auth-card th, .auth-card td { padding: 8px; border-bottom: 1px solid var(--teal-800); text-align: left; }
body.light .auth-card th, body.light .auth-card td { border-bottom-color: var(--teal-200); }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--teal-800); font-size: 13px; }
body.light .auth-links { border-top-color: var(--teal-200); }
/* Account facts */
.acct-facts { display: grid; gap: 8px; margin: 8px 0 4px; font-size: 14px; }
.acct-facts div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.acct-facts dt { font-weight: 700; color: var(--muted-dark); }
body.light .acct-facts dt { color: var(--muted-light); }
.acct-facts dd { margin: 0; }
.acct-ok { font-weight: 800; color: #8FE0A0; }
body.light .acct-ok { color: #1E6B30; }
.acct-warn { font-weight: 800; color: var(--err-dark); }
body.light .acct-warn { color: var(--err-light); }
@media (max-width: 560px) { .acct-facts div { grid-template-columns: 1fr; gap: 2px; } }
/* My readings */
.rd-item { border: 1px solid var(--teal-800); border-radius: 12px; padding: 14px; margin-top: 12px; }
body.light .rd-item { border-color: var(--teal-200); }
.rd-nums { display: grid; grid-template-columns: repeat(2, 28px); gap: 4px; flex: 0 0 auto; }
.rd-pill { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.rd-main { flex: 1; min-width: 0; }
.rd-title { font-size: 16px; font-weight: 800; }
.rd-meta { font-size: 12px; color: var(--muted-dark); margin-top: 2px; }
body.light .rd-meta { color: var(--muted-light); }
.rd-note { font-size: 13px; margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--teal); }
.rd-open { flex: 0 0 auto; }
.rd-edit { margin-top: 10px; }
.rd-edit summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.rd-delete { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--teal-800); }
body.light .rd-delete { border-top-color: var(--teal-200); }
/* Email PDF button (report toolbar) */
.pdf-mail-btn { background: transparent; color: var(--white); border: 2px solid var(--coral); border-radius: 20px; padding: 5px 14px;
  font: 700 13px 'Inter', sans-serif; cursor: pointer; }
body.light .pdf-mail-btn { color: var(--black); }
.pdf-mail-btn:disabled { cursor: progress; }
.account-hello { color: var(--muted-dark); font-size: 13px; padding: 6px 4px; }
.account-hello strong { color: var(--white); }
body.light .account-hello { color: var(--muted-light); }
body.light .account-hello strong { color: var(--black); }
.acct-username { max-width: 420px; }

/* ── One-time code page: expiry notice, countdown, masked input ── */
.code-notice { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; align-items: center;
  border-left: 4px solid var(--coral); background: rgba(255,111,97,.12); padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 10px 0 4px; }
body.light .code-notice { background: var(--coral-100); }
.code-timer b { font-variant-numeric: tabular-nums; font-size: 16px; }
.code-page.is-urgent .code-timer b { color: var(--err-dark); }
body.light .code-page.is-urgent .code-timer b { color: var(--err-light); }

.code-input-wrap .code-input { flex: 1; font: 700 20px/1 ui-monospace, 'Consolas', monospace !important; letter-spacing: .18em; text-transform: uppercase; }
.auth-btn:disabled { background: transparent !important; color: var(--muted-dark) !important; border-color: var(--teal-800) !important; cursor: not-allowed; }
body.light .auth-btn:disabled { color: var(--muted-light) !important; border-color: var(--teal-200) !important; }
.code-expired-msg { font-weight: 700; color: var(--err-dark); margin: 6px 0 0; }
body.light .code-expired-msg { color: var(--err-light); }
.code-change { margin-top: 18px; font-size: 14px; }
.code-change summary { cursor: pointer; font-weight: 700; }
/* Eye toggle inside the code field (replaces the Show button) */
.code-input-wrap { position: relative; display: block; }
.code-input-wrap .code-input { padding-right: 52px !important; }
.code-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; border: none; border-radius: 8px;
  background: transparent; color: var(--muted-dark); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.code-eye:hover { color: var(--white); background: rgba(70,129,143,.25); }
body.light .code-eye { color: var(--muted-light); }
body.light .code-eye:hover { color: var(--black); background: var(--teal-50); }
.code-eye:focus-visible { outline: 3px solid var(--coral); outline-offset: 1px; }
.code-eye .eye-closed { display: none; }
.code-eye[aria-pressed="true"] .eye-open { display: none; }
.code-eye[aria-pressed="true"] .eye-closed { display: block; }
/* Tooltip */
.code-eye::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); right: 0; white-space: nowrap; pointer-events: none;
  background: var(--black); color: #fff; border: 1px solid var(--teal); font: 600 12px 'Inter', sans-serif; padding: 5px 9px; border-radius: 6px;
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.code-eye:hover::after, .code-eye:focus-visible::after { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .code-eye::after { transition: none; } }

/* Progress as a modal: centred, page blurred and inactive until done (or "Read while it loads") */
.lpc-progress-backdrop { position: fixed; inset: 0; z-index: 8999; background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lpc-progress.is-modal { right: auto; bottom: auto; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px)); padding: 20px 22px; border-width: 3px; }
.lpc-progress.is-modal .lpc-progress-title { font-size: 17px; }
.lpc-progress.is-modal .lpc-progress-track { height: 14px; }
.lpc-progress:focus { outline: none; }
.lpc-progress:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.lpc-progress-mini { margin-top: 14px; width: 100%; background: #fff; color: var(--black); border: 2px solid var(--teal-700);
  border-radius: 10px; padding: 9px 14px; font: 700 14px 'Inter', sans-serif; cursor: pointer; }
.lpc-progress-mini:hover { background: var(--teal-50); }
.lpc-progress-mini:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
body.lpc-modal-open { overflow: hidden; }
@media (max-width: 640px) { .lpc-progress.is-modal { left: 50%; right: auto; width: calc(100vw - 24px); } }
/* Y toggle (form, section 01) */
.y-toggle { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; cursor: pointer; color: inherit; }
.y-toggle input { width: 18px; height: 18px; accent-color: var(--coral); }
.y-note-sub { display: block; margin-top: 6px; }

/* ================================================================
   Free preview: banner, locked sections (placeholder bars only) and the unlock card
   ================================================================ */
.preview-banner { margin-top: 24px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--coral);
  background: var(--coral-100); color: var(--black); font-size: 14px; line-height: 1.5; }
.lk-form { margin: 0; }
.unlock-btn:focus-visible { outline: 3px solid var(--teal-700); outline-offset: 2px; }
.unlock-card { margin-top: 32px; padding: 32px 24px; border-radius: 16px; border: 2px solid var(--coral); text-align: center;
  background: var(--teal-950); color: var(--white); }
body.light .unlock-card { background: var(--teal-50); color: var(--black); }
.unlock-star { font-size: 30px; color: var(--coral); }
.unlock-title { font-family: 'Cinzel', serif; font-size: 26px; line-height: 1.25; margin: 10px 0 12px; }
.unlock-text { max-width: 640px; margin: 0 auto 20px; font-size: 15px; line-height: 1.65; color: var(--muted-dark); }
body.light .unlock-text, body.light .unlock-sub { color: var(--muted-light); }
.unlock-feats { list-style: none; max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 20px; text-align: left; }
.unlock-feats li { position: relative; padding-left: 24px; }
.unlock-feats li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok-dark); font-weight: 700; }
body.light .unlock-feats li::before { color: var(--ok-light); }
.unlock-feats li b { display: block; font-weight: 800; }
.unlock-feats li span { display: block; font-size: 12.5px; opacity: .85; line-height: 1.4; }
.unlock-btn { margin-top: 22px; }
.unlock-sub { margin-top: 12px; font-size: 13px; color: var(--muted-dark); }
.unlock-link { color: var(--coral); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
body.light .unlock-link { color: var(--coral-700); }
.preview-banner .unlock-link { color: var(--coral-700); }
.unlock-teasers { max-width: 760px; gap: 14px 24px; }
.unlock-teasers li::before { content: ""; }
.unlock-teasers li { padding-left: 0; border-left: 3px solid var(--coral); padding: 4px 0 4px 12px; }
.sample-box { margin: 26px auto 0; max-width: 640px; padding: 16px; border-radius: 12px; border: 1px dashed var(--teal-300); }
body.light .sample-box { border-color: var(--teal-700); }
.sample-title { font-weight: 800; font-size: 15px; }
.sample-text { font-size: 13px; margin: 4px 0 12px; color: var(--muted-dark); }
body.light .sample-text { color: var(--muted-light); }
.sample-row { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.sample-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.sample-name { font-weight: 700; font-size: 14px; min-width: 200px; }
.sample-link { display: inline-block; padding: 8px 16px; border-radius: 20px; border: 2px solid var(--teal-300); color: var(--white);
  text-decoration: none; font-weight: 700; font-size: 13px; }
.sample-link:hover { background: var(--teal-800); }
body.light .sample-link { color: var(--teal-700); border-color: var(--teal-700); }
body.light .sample-link:hover { background: var(--teal-100); }
@media print { .unlock-card, .preview-banner { display: none !important; } }

/* ================================================================
   Plans page (billing)
   ================================================================ */
a.unlock-btn { display: inline-block; text-decoration: none; }
.plan-acct { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--teal-300); }
body.light .plan-acct { border-color: var(--teal-700); background: var(--teal-50); }
.plan-inline { display: inline; margin-left: 8px; }
.plan-card { margin: 0 0 20px; padding: 20px; border-radius: 14px; border: 2px solid var(--coral); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan-name { font-family: 'Cinzel', serif; font-size: 20px; margin: 0; }
.plan-price { font-size: 22px; font-weight: 800; color: var(--coral); }
body.light .plan-price { color: var(--coral-700); }
.plan-tag { margin: 4px 0 10px; color: var(--muted-dark); }
body.light .plan-tag, body.light .plan-note { color: var(--muted-light); }
.plan-feats { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.plan-feats li { position: relative; padding-left: 22px; }
.plan-feats li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok-dark); font-weight: 700; }
body.light .plan-feats li::before { color: var(--ok-light); }
.plan-qty { border: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.plan-qty-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--teal-800); cursor: pointer; flex-wrap: wrap; }
body.light .plan-qty-opt { border-color: var(--teal-200); }
.plan-qty-opt:has(input:checked) { border-color: var(--coral); }
.plan-qty-opt b { margin-left: auto; }
.plan-qty-opt em { width: 100%; font-size: 12px; font-style: normal; color: var(--ok-dark); }
body.light .plan-qty-opt em { color: var(--ok-light); }
.plan-buy { width: 100%; text-align: center; }
.plan-note { font-size: 13px; margin-top: 8px; color: var(--muted-dark); }
.plan-terms { margin: 0 0 16px 18px; display: grid; gap: 6px; font-size: 14px; }
.plan-tabs { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.plan-tab { flex: 1 1 200px; text-align: center; padding: 11px 10px; border-radius: 10px; border: 2px solid var(--teal-700);
  font-weight: 700; text-decoration: none; }
.auth-card a.plan-tab { text-decoration: none; }
.plan-tab.is-on { background: var(--coral); border-color: var(--coral); }
.auth-card a.plan-tab.is-on { color: var(--black); }
.plan-price small { font-size: 13px; font-weight: 600; }
.plan-current { border-color: var(--teal-300); }
.plan-mine { border-style: dashed; }
.plan-status { font-weight: 700; font-size: 14px; }
.plan-warn { margin-top: 8px; color: var(--err-dark); font-weight: 700; }
body.light .plan-warn { color: var(--err-light); }


/* ================================================================
   Report chat
   ================================================================ */
.inline-form { display: inline; margin: 0; }
.chat-top { margin-bottom: 14px; }
.chat-back { font-size: 13px; }
.chat-title { margin-top: 6px; }
.chat-rename { width: 100%; font: inherit; }
.chat-meta { font-size: 13px; margin-bottom: 10px; }
.chat-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chat-del-form { display: inline; margin: 0; }
.chat-log { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.chat-empty { font-size: 14px; opacity: .85; }
.chat-msg { padding: 12px 14px; border-radius: 12px; line-height: 1.6; }
.chat-msg.is-user { align-self: flex-end; max-width: 88%; background: var(--teal-800); border: 1px solid var(--teal-700); }
.chat-msg.is-assistant { align-self: flex-start; max-width: 96%; background: var(--teal-950); border: 1px solid var(--teal-800); }
body.light .chat-msg.is-user { background: var(--teal-100); border-color: var(--teal-200); }
body.light .chat-msg.is-assistant { background: #fff; border-color: var(--teal-200); }
.chat-who { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; color: var(--teal-300); }
body.light .chat-who { color: var(--teal-700); }
.chat-body p { margin: 0 0 8px; word-break: break-word; }
.chat-body p:last-child { margin-bottom: 0; }
.chat-msg-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chat-tool { background: none; border: 1px solid currentColor; border-radius: 14px; padding: 3px 10px; font: 600 12px 'Inter', sans-serif;
  color: inherit; cursor: pointer; opacity: .85; }
.chat-tool:hover, .chat-tool:focus-visible { opacity: 1; }
.chat-typing { font-style: italic; opacity: .8; }
.chat-edit { width: 100%; font: inherit; }
.chat-note { font-size: 12px; margin-top: 6px; opacity: .85; }
.chat-form textarea { width: 100%; resize: vertical; }
.chat-form-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; }
.chat-count { font-size: 12px; opacity: .8; }
@media print { .chat-tools, .chat-form, .chat-msg-tools { display: none !important; } .chat-log { max-height: none; overflow: visible; } }


/* ================================================================
   Full Compatibility Report
   ================================================================ */
.cmp-sec .cmp-body { padding: 16px 18px 20px; }
.cmp-sec p { margin: 0 0 10px; line-height: 1.6; }
.cmp-people { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 16px; flex-wrap: wrap; }
.cmp-person { text-align: center; }
.cmp-pname { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: var(--teal-700); }
.cmp-pdob { font-size: 12px; color: var(--muted-light); }
.cmp-amp { font-family: 'Cinzel', serif; font-size: 28px; color: var(--coral-700); }
.cmp-tbl td { vertical-align: middle; }
.cmp-desc { font-size: 11px; color: var(--muted-light); }
.cmp-chain { display: block; font-size: 10px; color: var(--muted-light); margin-top: 2px; }
.cmp-flag { font-size: 11px; color: var(--coral-700); margin-top: 4px; font-weight: 700; }
.cmp-legend { display: grid; gap: 6px; padding: 10px 16px; font-size: 12px; }
.cmp-note { font-size: 12.5px; color: var(--muted-light); }
.cmp-sub { font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-700); margin: 16px 0 6px; }
.cmp-sub:first-child { margin-top: 0; }
.cmp-pair { border: 1px solid var(--teal-200); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.cmp-pair-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.cmp-line { font-size: 13px; line-height: 1.55; margin: 2px 0; }
.cmp-ul { margin: 0 0 6px 18px; display: grid; gap: 4px; font-size: 13px; }
.cmp-shared { display: grid; gap: 6px; font-size: 13px; margin-bottom: 8px; }
.cmp-now { display: block; font-size: 10px; font-weight: 800; color: var(--coral-700); font-style: normal; text-transform: uppercase; }
.cmp-ins { margin-bottom: 12px; }
.cmp-ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .cmp-ins-grid { grid-template-columns: 1fr; } }
.cmp-ins-col { border: 1px solid var(--teal-200); border-radius: 10px; padding: 10px 12px; }
.cmp-ins-h { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.cmp-ins-t { font-size: 12px; margin-top: 6px; }
.cmp-cyc th { white-space: nowrap; }
.cmp-cyc td.c { width: auto; min-width: 54px; }
.cmp-mine td { background: var(--teal-50); font-weight: 600; }
.cmp-ai-block { margin-bottom: 14px; }

.biz-names { border: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.biz-names input { width: 100%; }
.biz-del { font-size: 12px; display: inline-flex; gap: 4px; align-items: center; margin-right: 4px; }
.biz-owner { padding: 8px 16px; }

/* ================================================================
   Landing page (Eagle Rank: teal, coral, black, white)
   ================================================================ */
.lp { margin-top: 8px; }
.lp-hero { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center; padding: 18px 0 26px; }
@media (min-width: 900px) { .lp-hero { grid-template-columns: 1.1fr .9fr; gap: 36px; } }
.lp-kicker { color: var(--teal-300); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
body.light .lp-kicker { color: var(--teal-700); }
.lp-h1 { font-family: 'Cinzel', serif; font-size: clamp(24px, 4.4vw, 38px); line-height: 1.2; margin: 0 0 12px; }
.lp-hl { color: var(--coral); }
body.light .lp-hl { color: var(--coral-700); }
.lp-sub, .lp-lead { font-size: 16px; line-height: 1.6; color: var(--muted-dark); margin: 0 0 16px; }
body.light .lp-sub, body.light .lp-lead { color: var(--muted-light); }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0; }
.lp-cta { display: inline-block; text-decoration: none; }
.lp-cta2 { color: inherit; font-weight: 700; }
.lp-cost { font-size: 14px; margin: 6px 0; }
.lp-trust { font-size: 12px; color: var(--muted-dark); }
body.light .lp-trust { color: var(--muted-light); }
.lp-mock { display: block; text-decoration: none; color: var(--black); background: #fff; border: 2px solid var(--teal-700);
  border-radius: 16px; padding: 16px; box-shadow: 0 10px 34px rgba(0,0,0,.3); }
.lp-mock:hover { border-color: var(--coral); }
.lpm-bar { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--teal-700); }
.lpm-chip { background: var(--coral); color: var(--black); border-radius: 10px; padding: 2px 10px; }
.lpm-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 18px; margin-top: 10px; }
.lpm-born { font-size: 12px; color: var(--muted-light); }
.lpm-nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0; text-align: center; }
.lpm-nums i { display: inline-flex; width: 34px; height: 34px; border-radius: 17px; align-items: center; justify-content: center; font-style: normal; font-weight: 800; }
.lpm-nums span { display: block; font-size: 10px; margin-top: 3px; }
.lpm-read { font-size: 13px; border-top: 1px solid var(--teal-200); padding-top: 8px; }
.lpm-read p { margin: 4px 0 0; color: var(--muted-light); }
.lpm-lock { margin-top: 10px; font-size: 12px; font-weight: 700; background: var(--coral-100); border-radius: 8px; padding: 8px 10px; }
.lp-sec { padding: 34px 0 10px; border-top: 1px solid var(--teal-800); }
body.light .lp-sec { border-color: var(--teal-200); }
.lp-h2 { font-family: 'Cinzel', serif; font-size: clamp(20px, 3.2vw, 28px); margin: 0 0 14px; text-align: center; }
.lp-lead { text-align: center; }
.lp-steps, .lp-grid, .lp-prices { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lp-step, .lp-card, .lp-price { background: var(--teal-950); border: 1px solid var(--teal-800); border-radius: 14px; padding: 16px; }
body.light .lp-step, body.light .lp-card, body.light .lp-price { background: #fff; border-color: var(--teal-200); }
.lp-step b, .lp-card b { display: block; margin-bottom: 4px; }
.lp-step p, .lp-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted-dark); }
body.light .lp-step p, body.light .lp-card p { color: var(--muted-light); }
.lp-n { display: inline-flex; width: 30px; height: 30px; border-radius: 15px; background: var(--coral); color: var(--black);
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: 8px; }
.lp-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.lp-chip { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.lp-chip i { display: inline-flex; min-width: 34px; height: 34px; border-radius: 17px; align-items: center; justify-content: center; font-style: normal; font-weight: 800; }
.lp-price { position: relative; display: flex; flex-direction: column; gap: 8px; }
.lp-price ul { margin: 0 0 6px 18px; font-size: 14px; display: grid; gap: 4px; }
.lp-price .btn-primary { margin-top: auto; text-align: center; text-decoration: none; }
.lp-pop { border: 2px solid var(--coral); }
.lp-badge { position: absolute; top: -11px; right: 14px; background: var(--coral); color: var(--black); font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 10px; }
.lp-pname { font-family: 'Cinzel', serif; font-weight: 700; font-size: 18px; }
.lp-pamt { font-size: 24px; font-weight: 800; color: var(--coral); }
body.light .lp-pamt { color: var(--coral-700); }
.lp-per { font-size: 14px; font-weight: 600; }
.lp-local { display: block; font-size: 12px; font-weight: 600; color: var(--muted-dark); }
body.light .lp-local { color: var(--muted-light); }
.lp-sel { display: grid; gap: 4px; font-size: 13px; }
.lp-sel select { padding: 8px; border-radius: 8px; }
.lp-note { font-size: 12px; color: var(--muted-dark); }
body.light .lp-note { color: var(--muted-light); }
.lp-disc { font-size: 12px; text-align: center; margin-top: 14px; color: var(--muted-dark); }
body.light .lp-disc { color: var(--muted-light); }
.lp-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 8px; }
.lp-faq details { background: var(--teal-950); border: 1px solid var(--teal-800); border-radius: 12px; padding: 12px 14px; }
body.light .lp-faq details { background: #fff; border-color: var(--teal-200); }
.lp-faq summary { cursor: pointer; font-weight: 700; }
.lp-faq p { margin: 8px 0 0; font-size: 14px; line-height: 1.55; }
.lp-final { text-align: center; padding: 40px 0 20px; border-top: 1px solid var(--teal-800); }
.lp-notice { position: fixed; left: 16px; bottom: 16px; z-index: 8000; max-width: min(360px, calc(100vw - 32px));
  background: #fff; color: var(--black); border-left: 4px solid var(--coral); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s; }
.lp-notice.is-on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lp-notice { transition: none; } }
.plan-share { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; margin: 0 0 10px; }

.footer-legal { margin-top: 4px; font-size: 12px; }
.footer-legal a { color: inherit; }
.form-legal { font-size: 12px; margin-top: 8px; opacity: .85; }
.form-legal a { color: inherit; }
.legal-body h2 { font-size: 16px; margin: 18px 0 6px; }
.legal-body p, .legal-body li { font-size: 14px; line-height: 1.65; margin: 0 0 8px; }
.legal-body ul { margin: 0 0 8px 20px; }

/* ================================================================
   Staff dashboard
   ================================================================ */
.staff { max-width: 1200px; margin: 0 auto; }
.staff-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.staff-nav a { padding: 7px 12px; border-radius: 16px; border: 1px solid var(--teal-700); color: inherit; text-decoration: none; font-size: 13px; font-weight: 600; }
.staff-nav a[aria-current="page"] { background: var(--coral); border-color: var(--coral); color: var(--black); }
.staff-h1 { font-family: 'Cinzel', serif; font-size: 24px; margin: 0 0 12px; }
.staff-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.staff-card { background: var(--teal-950); border: 1px solid var(--teal-800); border-radius: 12px; padding: 12px; }
body.light .staff-card { background: #fff; border-color: var(--teal-200); }
.staff-card span { display: block; font-size: 12px; color: var(--muted-dark); }
body.light .staff-card span { color: var(--muted-light); }
.staff-card b { font-size: 20px; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.staff-sec { background: var(--teal-950); border: 1px solid var(--teal-800); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
body.light .staff-sec { background: #fff; border-color: var(--teal-200); }
.staff-sec h2 { font-size: 15px; margin: 0 0 8px; }
.staff-sec h3 { font-size: 13px; margin: 10px 0 4px; }
.staff-note { font-size: 13px; margin: 0 0 10px; color: var(--muted-dark); }
body.light .staff-note { color: var(--muted-light); }
.staff-wrap { overflow-x: auto; }
.staff-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.staff-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; border-bottom: 2px solid var(--teal-700); }
.staff-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--teal-800); vertical-align: top; }
body.light .staff-tbl td { border-color: var(--teal-200); }
.staff-inline, .staff-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.staff-form label, .staff-inline label { display: grid; gap: 4px; font-size: 13px; }
.staff-inline input, .staff-form input[type=email], .staff-form input[type=text], .staff-form input[type=number] { padding: 7px; border-radius: 8px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.staff-btn { background: none; border: 1px solid currentColor; color: inherit; border-radius: 14px; padding: 3px 10px; font: 600 12px 'Inter', sans-serif; cursor: pointer; }
.staff-btn.is-danger { border-color: var(--err-dark); color: var(--err-dark); }
body.light .staff-btn.is-danger { border-color: var(--err-light); color: var(--err-light); }
.staff-gift input { width: 56px; padding: 3px; }
.staff-purge summary { cursor: pointer; font-size: 12px; }
.staff-purge input { margin: 4px 0; padding: 4px; }
.staff-st { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--teal-800); color: #fff; }
.staff-st.st-suspended, .staff-st.st-pending_delete { background: var(--coral); color: var(--black); }
.staff-pre { white-space: pre-wrap; font-size: 12px; }

/* ================================================================
   Navigation bar, back-to-top, guide (Eagle Rank: teal, coral, black, white)
   ================================================================ */
.topbar { position: sticky; top: 0; z-index: 950; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 16px; background: rgba(0,0,0,.92); border-bottom: 1px solid var(--teal-800);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
body.light .topbar { background: rgba(255,255,255,.95); border-color: var(--teal-200); }
.tb-brand { font-family: 'Cinzel', serif; font-weight: 700; font-size: 17px; color: inherit; text-decoration: none; white-space: nowrap; }
.tb-star { color: var(--coral); }
body.light .tb-star { color: var(--coral-700); }
.tb-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; }
.tb-links a, .tb-link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 16px; color: inherit;
  text-decoration: none; font: 600 13px 'Inter', sans-serif; background: none; border: none; cursor: pointer; }
.tb-links a:hover, .tb-link-btn:hover { background: var(--teal-900); }
body.light .tb-links a:hover, body.light .tb-link-btn:hover { background: var(--teal-50); }
.tb-links a[aria-current="page"] { background: var(--teal-700); color: #fff; }
.tb-links .tb-cta { background: var(--coral); color: var(--black); }
.tb-links .tb-cta:hover { background: #FF8A7F; }
.tb-form { display: inline; margin: 0; }
.tb-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar .theme-toggle { position: static; padding: 5px 11px; }
.topbar .lang-wrap { position: static; display: inline-flex; align-items: center; gap: 4px; }
.tb-tool { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 16px; border: 1px solid var(--teal);
  background: none; color: inherit; font: 600 12px 'Inter', sans-serif; cursor: pointer; }
.tb-tool.is-on { background: var(--coral); color: var(--black); border-color: var(--coral); }
.tb-jump { max-width: 190px; padding: 6px 8px; border-radius: 10px; font-size: 13px; }
.tb-menu { display: none; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 16px; border: 1px solid var(--teal);
  background: none; color: inherit; font: 700 13px 'Inter', sans-serif; cursor: pointer; }
.tb-menu i { font-size: 18px; }
.topbar a:focus-visible, .topbar button:focus-visible, .topbar select:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
@media (max-width: 980px) {
  .tb-menu { display: inline-flex; }
  .tb-links { display: none; order: 10; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 6px 0; }
  .tb-links.is-open { display: flex; }
  .tb-links a, .tb-link-btn { padding: 10px 12px; font-size: 15px; }
  .tb-jump { max-width: 140px; }
}
@media (max-width: 520px) { .tb-tool span { display: none; } .tb-brand { font-size: 15px; } }
/* the old absolutely positioned header controls now live in the bar */
.app-header { padding-top: 26px; }

.btt { position: fixed; right: 18px; bottom: 22px; z-index: 930; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--black); background: var(--coral); color: var(--black); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.btt[hidden] { display: none; }
.btt:hover { transform: translateY(-2px); }
.btt:focus-visible { outline: 3px solid var(--teal-300); outline-offset: 2px; }

.guide-card { position: fixed; left: 16px; bottom: 16px; z-index: 960; width: min(340px, calc(100vw - 96px));
  background: #fff; color: var(--black); border-radius: 14px; border-top: 4px solid var(--coral); padding: 12px 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.guide-card[hidden] { display: none; }
.gc-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: var(--teal-700); }
.gc-x { background: none; border: none; cursor: pointer; color: var(--muted-light); font-size: 14px; padding: 4px; }
.guide-card p { margin: 6px 0 10px; font-size: 14px; line-height: 1.5; }
.gc-row { display: flex; justify-content: space-between; gap: 8px; }
.gc-btn { border: 1px solid var(--teal-700); background: #fff; color: var(--teal-700); border-radius: 14px; padding: 5px 14px;
  font: 700 13px 'Inter', sans-serif; cursor: pointer; }
.gc-btn.is-primary { background: var(--coral); border-color: var(--coral); color: var(--black); }
.guide-hl { outline: 3px solid var(--coral) !important; outline-offset: 4px; border-radius: 10px; transition: outline-color .2s; }
@media print { .topbar, .btt, .guide-card { display: none !important; } }

/* Icons */
.bi { line-height: 1; vertical-align: -0.125em; }
.lp-card .bi, .lp-step .bi { font-size: 22px; color: var(--coral); display: block; margin-bottom: 6px; }
body.light .lp-card .bi { color: var(--coral-700); }
