:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --red: #e44332;
  --black: #161616;
  --muted: #70706b;
  --line: #dcdcd7;
  --paper: #f7f7f5;
  --white: #fff;
  --text: #161616;
  --surface: #fff;
  --surface-soft: #eeeeea;
  --field-border: #c7c7c2;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --red: #ff5549;
  --black: #f2f2f2;
  --muted: #b5b5b5;
  --line: #454541;
  --paper: #151515;
  --white: #242424;
  --text: #f2f2f2;
  --surface: #242424;
  --surface-soft: #2c2c2c;
  --field-border: #666;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }

.app {
  width: min(100%, 780px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px) max(18px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 28px) max(18px, env(safe-area-inset-left));
}

.hero { padding: 18px 0 30px; }
.brand-home { cursor: pointer; border-radius: 8px; }
.brand-home:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.hero-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--black); font-size: 1.1rem; cursor: pointer; }
.theme-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.login-button { border: 0; border-bottom: 1px dashed currentColor; padding: 4px 0; background: transparent; cursor: pointer; font-size: .82rem; }

.save-compass-button { width: 100%; margin: 18px 0 28px; padding: 14px; border: 1px solid var(--black); background: transparent; cursor: pointer; }
.account-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.42); }
.account-panel { position: relative; width: min(100%, 560px); max-height: 90dvh; overflow: auto; padding: 28px; background: var(--paper); border: 1px solid var(--black); color: var(--black); }
.account-panel h2 { margin: 6px 0 20px; font-size: 2rem; }
.account-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 1.8rem; cursor: pointer; }
.account-auth label { display: grid; gap: 7px; margin: 14px 0; color: var(--muted); font-size: .78rem; }
.account-auth input { height: 48px; padding: 0 12px; border: 1px solid var(--line); background: var(--white); color: var(--black); }
.account-auth .consent { display: flex; grid-template-columns: auto 1fr; align-items: flex-start; }
.primary-button { width: 100%; padding: 13px; border: 1px solid var(--black); background: var(--black); color: var(--paper); cursor: pointer; }
.primary-button:disabled { opacity: .4; cursor: default; }
.account-email,.account-message,.account-local-note { color: var(--muted); font-size: .82rem; }
.saved-list { margin: 22px 0; border-top: 1px solid var(--line); }
.saved-list article { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.saved-list button { border: 0; background: transparent; cursor: pointer; font-size: .75rem; }
.saved-list article>button:first-child { display: grid; gap: 3px; text-align: left; font-size: .9rem; }
.saved-list small { color: var(--muted); }
.saved-preview { padding: 14px 0; border-top: 1px solid var(--line); }
.saved-preview .compass { max-width: 420px; margin: 0 auto; }
.account-danger { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.account-danger button { border: 0; border-bottom: 1px dashed currentColor; padding: 3px 0; background: transparent; cursor: pointer; color: var(--muted); }
.account-local-note { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid var(--black);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}
.brand-mark::before, .brand-mark::after, .brand-mark i {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 1px; height: 21px;
  background: var(--black);
  transform-origin: 50% 50%;
}
.brand-mark::before { transform: translate(-50%, -50%); }
.brand-mark::after { transform: translate(-50%, -50%) rotate(60deg); }
.brand-mark i { transform: translate(-50%, -50%) rotate(-60deg); }
.edition { color: var(--muted); font-size: .68rem; letter-spacing: .16em; }

h1, h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
h1 { font-size: clamp(3rem, 15vw, 6rem); line-height: .94; letter-spacing: -.055em; }
h1 em { display: block; color: var(--red); font-weight: 400; }
.tagline { margin: 16px 0 0; color: var(--muted); font-size: 1rem; letter-spacing: .02em; }

.date-section {
  padding: 22px 0 26px;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--line);
}
.birth-date-field > label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.date-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.date-input-wrap { position: relative; min-width: 0; }
.date-controls input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 52px 0 12px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  font-size: 1rem;
  -webkit-appearance: none;
}
.date-controls input[type="text"]:focus { outline: 2px solid var(--red); outline-offset: -2px; }
.calendar-button {
  position: absolute;
  z-index: 2;
  top: 1px;
  right: 1px;
  width: 50px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--white);
  pointer-events: none;
}
.calendar-button svg { width: 21px; height: 21px; fill: none; stroke: var(--black); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.calendar-button:active svg { stroke: var(--red); }
.calendar-picker {
  position: absolute;
  z-index: 3;
  width: 50px;
  height: 52px;
  right: 1px;
  top: 1px;
  opacity: .001;
  cursor: pointer;
}
.primary-button {
  min-height: 54px;
  padding: 12px 17px;
  border: 1px solid var(--black);
  border-radius: 0;
  background: var(--black);
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
}
.primary-button:active { background: var(--red); border-color: var(--red); }
.field-error { margin: 9px 0 0; color: var(--red); font-size: .8rem; }
.privacy-note { margin: 12px 0 0; color: var(--muted); font-size: .7rem; }

.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--black); }
.tabs button {
  min-height: 52px;
  padding: 12px 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.tabs button.is-active { border-bottom-color: var(--red); color: var(--black); }

.mode-tabs { display: flex; gap: 8px; padding: 18px 0 0; }
.mode-tabs button {
  min-height: 40px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}
.mode-tabs button.is-active { border-color: var(--black); background: var(--black); color: var(--white); }

.compass-section { padding: 34px 0 0; }
.section-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-label-row h2, .portrait-heading h2 { font-size: 1.45rem; letter-spacing: -.02em; }
.section-label-row > span { color: var(--red); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.compass-guidance-block { margin: 10px 0 12px; }
.compass-guidance { max-width: 560px; margin: 0; color: var(--text); font-size: .88rem; line-height: 1.5; }
.interaction-hint { margin: 6px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }

.compass-wrap {
  width: calc(100% + 24px);
  max-width: 560px;
  margin: 0 -12px;
  touch-action: none;
}
.compass { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; }
.compass-disc { fill: #fff; stroke: #1b1b1b; stroke-width: 1; }
.compass.is-interactive .sector { cursor: pointer; }
.sector-outline { fill: #fafaf8; stroke: #cfcfca; stroke-width: .7; }
.sector-fill { fill: #969690; stroke: none; }
.sector.is-target .sector-outline { fill: #f5d5d0; stroke: var(--red); stroke-width: 1.2; }
.sector.is-target .sector-fill { fill: #969690; }
.sector-label { pointer-events: none; }
.sector-label text { fill: #252525; font: 600 9px -apple-system, BlinkMacSystemFont, sans-serif; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: #fafaf8; stroke-width: 2.4px; stroke-linejoin: round; }
.sector-label text.is-target { fill: var(--red); font-weight: 700; }
.purpose-marker { fill: #fff; stroke: #343432; stroke-width: 1.6; pointer-events: none; }
.compass-inner { fill: #f7f7f5; stroke: #c1c1bc; stroke-width: .8; }
.compass-center-kicker { fill: #777772; font: 600 6px -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: 2px; text-anchor: middle; }
.compass-center-title { fill: #222; font: 400 17px Georgia, serif; text-anchor: middle; }
.compass-center-note { fill: #8a8a85; font: 500 6px -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: .6px; text-anchor: middle; }
.trishula { pointer-events: none; }
.trishula-image { image-rendering: auto; }

.results-section { padding-top: 8px; }
.selection-panel { border-top: 1px solid var(--black); }
.selection-primary { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 78px; border-bottom: 1px solid var(--line); }
.selection-primary > span { color: var(--red); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.selection-primary strong { display: flex; align-items: baseline; gap: 8px; text-align: right; font-size: .8rem; }
.selection-primary .state-number { color: var(--red); font-family: Georgia, serif; font-size: 2rem; }
.supports-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.supports-grid div { min-height: 92px; padding: 18px 9px 14px 0; border-bottom: 1px solid var(--line); }
.supports-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.supports-grid div:nth-child(even) { padding-left: 14px; }
.supports-grid dt { color: #81817c; font-size: .66rem; line-height: 1.25; }
.supports-grid dd { display: flex; align-items: flex-start; gap: 8px; min-width: 0; margin: 12px 0 0; font-size: .72rem; line-height: 1.25; }
.supports-grid dd > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.supports-grid .state-number { color: var(--black); font-family: Georgia, serif; font-size: 1.35rem; }

.portrait-section { padding: 38px 0 12px; }
.portrait-heading { margin-bottom: 22px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--red); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.portrait-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--black); }
.portrait-list li { min-height: 68px; display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(92px, auto); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.portrait-list li.is-purpose { background: var(--surface-soft); position: relative; }
.portrait-list li.is-purpose::before { display: none; }
.position-index { color: #92928d; font-size: .66rem; letter-spacing: .1em; }
.position-copy { min-width: 0; display: grid; gap: 3px; }
.position-name { font-size: .82rem; font-weight: 600; }
.position-description { color: var(--muted); font-size: .72rem; line-height: 1.32; }
.position-value { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.position-value .state-number { color: var(--black); font-family: Georgia, serif; font-size: 1.55rem; line-height: 1; }
.position-value small { flex-basis: 100%; color: var(--muted); line-height: 1.3; white-space: normal; text-align: right; }
.position-value:has(small) { min-width: 180px; flex-wrap: wrap; }

footer { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }

.compatibility-page { padding-top: 28px; }
.compatibility-inputs { display: grid; gap: 22px; }
.date-controls.no-button { grid-template-columns: 1fr; }
.compatibility-calculate { width: 100%; margin-top: 2px; }
.comparison-section { padding-top: 48px; }
.comparison-section h2, .personal-comparison h2 { margin-bottom: 20px; font-size: 1.45rem; }
.comparison-table { border-top: 1px solid var(--black); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.comparison-row { min-width: 700px; display: grid; grid-template-columns: 150px 105px 105px minmax(280px, 1fr); border-bottom: 1px solid var(--line); }
.comparison-row > span { min-width: 0; padding: 12px 5px; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.comparison-row > span:last-child { border-right: 0; }
.joint-portrait-cell { display: grid; gap: 3px; }
.joint-portrait-cell em { color: var(--black); font-size: .7rem; font-style: normal; font-weight: 700; }
.joint-portrait-cell i { color: var(--muted); font-size: .65rem; font-style: normal; line-height: 1.3; }
.joint-portrait-cell b { margin-top: 5px; color: var(--red); font-size: .78rem; }
.joint-portrait-cell small { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.comparison-head { color: var(--muted); font-size: .61rem; font-weight: 700; text-transform: uppercase; }
.comparison-row:not(.comparison-head) > span:first-child { font-size: .7rem; font-weight: 600; }
.comparison-row b { display: block; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 400; }
.comparison-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .56rem; line-height: 1.15; }
.comparison-row.is-purpose { background: var(--surface-soft); box-shadow: inset 3px 0 0 var(--muted); }
.personal-comparison { padding-top: 48px; }
.mini-compasses { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-compasses figure { min-width: 0; margin: 0; }
.mini-compasses figcaption { margin-top: 8px; color: var(--muted); font-size: .7rem; text-align: center; }
.mini-compasses .compass { width: 100%; }
.combined-compass-section { padding-top: 52px; }

.collective-page { padding-top: 34px; }
.collective-heading { margin-bottom: 22px; }
.collective-heading h2 { font-size: 1.65rem; }
.collective-participants { display: grid; gap: 16px; }
.collective-participant {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--white);
}
.participant-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.participant-title-row h3 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; font-weight: 400; }
.remove-participant {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.participant-name-field { display: block; margin-bottom: 18px; }
.participant-name-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.participant-name-field input {
  width: 100%;
  height: 52px;
  padding: 0 12px;
  border: 1px solid var(--field-border);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  font-size: 1rem;
  -webkit-appearance: none;
}
.participant-name-field input:focus { outline: 2px solid var(--red); outline-offset: -2px; }
.collective-participant .birth-date-field > label { margin-bottom: 8px; }
.collective-actions { display: grid; gap: 10px; margin-top: 18px; }
.collective-compasses { margin-top: 44px; border-top: 1px solid var(--black); border-bottom: 1px solid var(--line); }
.collective-compasses summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  list-style: none;
}
.collective-compasses summary::-webkit-details-marker { display: none; }
.collective-compasses summary::after { content: '+'; color: var(--red); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 1.25rem; }
.collective-compasses[open] summary::after { content: '−'; }
.collective-compasses summary span { margin-left: auto; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: .72rem; }
.collective-compass-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; padding: 18px 0 28px; }
.collective-compass-grid figure { min-width: 0; margin: 0; }
.collective-compass-grid figcaption { margin-top: 7px; color: var(--muted); font-size: .72rem; text-align: center; overflow-wrap: anywhere; }
.collective-result-compass { padding-top: 52px; }

.current-compass-page { padding-top: 34px; }
.scan-heading h2, .scan-comparison h2 { font-size: 1.65rem; }
.scan-heading > p { margin: 10px 0 20px; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.scan-progress { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--black); border-bottom: 1px solid var(--line); }
.scan-progress span { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.scan-progress strong { color: var(--red); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; }
.scan-list { margin: 0; padding: 0; list-style: none; }
.scan-question { padding: 24px 0; border-bottom: 1px solid var(--line); }
.scan-question-title { display: grid; grid-template-columns: 30px 1fr auto; align-items: baseline; gap: 8px; }
.scan-question-title > span { color: var(--red); font-family: Georgia, serif; font-size: 1rem; }
.scan-question-title > strong { font-size: .9rem; }
.scan-question-title > b { min-width: 28px; color: var(--red); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 400; text-align: right; }
.scan-question > p { min-height: 42px; margin: 10px 0 14px 38px; color: var(--text); font-size: .82rem; line-height: 1.45; }
.score-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.score-scale button {
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 1px solid #cfcfca;
  background: var(--white);
  color: var(--muted);
  font-size: .68rem;
  cursor: pointer;
}
.score-scale button.is-selected { border-color: var(--red); background: var(--red); color: var(--white); font-weight: 700; }
.build-scan-button { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 3; width: 100%; margin-top: 22px; box-shadow: 0 6px 22px rgba(0,0,0,.15); }
.primary-button:disabled { border-color: #c6c6c1; background: #c6c6c1; color: #f4f4f2; cursor: not-allowed; box-shadow: none; }
.current-result { padding-top: 0; }
.secondary-button {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.edit-scan-button { margin-top: 24px; }
.scan-comparison { padding-top: 52px; }
.scan-comparison-grid { display: grid; grid-template-columns: 1fr; gap: 26px; margin-top: 20px; }
.scan-comparison figure { margin: 0; }
.scan-comparison figcaption { margin-top: 8px; color: var(--muted); font-size: .75rem; text-align: center; }
.scan-comparison .compass { width: min(100%, 360px); margin: 0 auto; }

@media (max-width: 370px) {
  .tabs button { padding-left: 2px; padding-right: 2px; font-size: .68rem; }
  .date-section .date-controls { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .comparison-row { grid-template-columns: 140px 100px 100px 280px; }
}

@media (min-width: 700px) {
  .app { padding-left: 44px; padding-right: 44px; }
  .hero { padding-top: 34px; }
  h1 em { display: inline; }
  .date-controls { max-width: 560px; }
  .compass-wrap { margin-left: auto; margin-right: auto; }
  .portrait-list li { padding: 0 18px; }
  .compatibility-inputs { grid-template-columns: 1fr 1fr; }
  .compatibility-calculate { grid-column: 1 / -1; max-width: 560px; }
  .scan-comparison-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .collective-participants { grid-template-columns: 1fr 1fr; }
  .collective-actions { grid-template-columns: 1fr 1fr; }
  .collective-compass-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.portrait-list li.is-purpose { background: var(--surface-soft); border-left: 0 !important; }

.goal-selector { margin: 22px 0 10px; }
.goal-selector label > span { display: block; margin-bottom: 7px; color: var(--red); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.goal-selector select { width: 100%; min-height: 48px; padding: 0 42px 0 13px; border: 1px solid var(--black); border-radius: 0; background: var(--white); color: var(--black); font-size: 1rem; }
.context-supports { margin-top: 12px; border-top: 1px solid var(--line); }
.context-supports p { display: grid; grid-template-columns: 9px 1fr; gap: 9px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .82rem; line-height: 1.4; }
.context-supports i { width: 7px; height: 7px; margin-top: .38em; border-radius: 50%; background: var(--black); }
.context-supports .context-secondary i { background: #8a8a86; }
.context-supports b { display: block; margin-bottom: 2px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }

.compass-legend, .fill-legend { margin: 16px auto 0; max-width: 540px; border-top: 1px solid var(--line); padding-top: 12px; }
.compass-legend p, .fill-legend p { margin: 7px 0; display: grid; grid-template-columns: 10px auto 1fr; gap: 8px; align-items: baseline; font-size: .76rem; }
.compass-legend span, .fill-legend span, .fill-legend small, .fill-note { color: var(--muted); }
.compass-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-red { background: var(--red); } .legend-black { background: var(--black); } .legend-gray { background: #8a8a86; }
.fill-legend i { width: 9px; height: 9px; border: 1px solid #aaa; display: inline-block; }
.fill-full { background: #a8a8a3; } .fill-half { background: linear-gradient(90deg,#a8a8a3 50%,transparent 50%); } .fill-empty { background: transparent; }
.fill-legend small { display: block; margin-top: 9px; font-size: .72rem; line-height: 1.4; }
.fill-note { text-align: center; font-size: .76rem; line-height: 1.45; max-width: 500px; margin: 14px auto 0; }

.archetype-results { margin: 10px 0 38px; border-top: 1px solid var(--line); }
.archetype-result { padding: 24px 0 26px; border-bottom: 1px solid var(--line); }
.archetype-role { display: block; margin-bottom: 8px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.archetype-result h2 { display: flex; align-items: baseline; gap: 10px; font-size: clamp(1.55rem, 7vw, 2.25rem); }
.archetype-result h2 span { color: var(--red); font: 700 .72em -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.archetype-result.is-primary h2 span { color: var(--black); }
.archetype-result.is-secondary h2 span { color: #777773; }
.archetype-direction { margin: 16px 0 7px; font-size: .9rem; line-height: 1.5; }
.archetype-direction b { display: block; margin-bottom: 2px; color: var(--muted); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.archetype-explanation { margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.55; }

.score-slider { display: grid; grid-template-columns: 18px 1fr 22px; gap: 8px; align-items: center; color: var(--muted); font-size: .72rem; }
.score-slider input { width: 100%; accent-color: var(--red); min-height: 32px; }
.scan-explanation { display: block; color: var(--muted); font-size: .76rem; line-height: 1.45; margin: 6px 0 8px; }
.scan-question-title b { color: var(--red); }

.share-control { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.share-control small { color: var(--muted); }
.export-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.export-actions .share-control { margin-top: 0; }
.export-actions .secondary-button { width: 100%; min-height: 48px; }
.scan-timestamp { margin: 9px 0 0; color: var(--muted); font-size: .7rem; text-align: center; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer button { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: .72rem; padding: 0; }
.author-link { min-height: 36px; display: inline-flex; align-items: center; color: var(--black); font-weight: 700; text-decoration-line: underline; text-decoration-style: dashed; text-decoration-color: var(--red); text-underline-offset: 4px; }
.author-link:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

:root[data-theme="dark"] .tagline,
:root[data-theme="dark"] .compass-guidance,
:root[data-theme="dark"] .scan-question > p { color: var(--text); }
:root[data-theme="dark"] .compass-wrap { border-radius: 50%; background: #f7f7f5; }
:root[data-theme="dark"] .brand-mark { background: #242422; }
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] .position-name,
:root[data-theme="dark"] .portrait-list,
:root[data-theme="dark"] .archetype-result,
:root[data-theme="dark"] .comparison-row { color: var(--text); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { color: var(--text); background: var(--surface); border-color: var(--field-border); }

.daily-area { margin: 34px 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.daily-area > h2 { font-size: 2rem; }
.daily-empty { color: var(--muted); }
.daily-card { margin: 18px 0; padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.daily-card time { color: var(--muted); font-size: .72rem; }
.daily-card h3 { margin: 8px 0; font: 400 1.6rem Georgia,serif; }
.daily-card p { line-height: 1.55; }
.daily-card footer { display: grid; gap: 4px; margin-top: 18px; padding-top: 14px; }
.daily-card footer b { color: var(--text); }
.daily-card footer span { letter-spacing: .12em; }
.daily-area details > summary { padding: 14px 0; cursor: pointer; color: var(--text); }
.daily-area details > summary span { color: var(--red); }
.notification-consents { display: grid; gap: 10px; margin: 20px 0; padding: 14px 0; border: 0; border-top: 1px solid var(--line); color: var(--muted); }
.notification-consents label { display: flex; gap: 8px; }
.admin-publisher { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--black); }
.admin-publisher label { display: grid; gap: 6px; margin: 12px 0; color: var(--muted); font-size: .75rem; }
.admin-publisher input,.admin-publisher select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); }
.card-preview { margin: 16px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card-preview p { color: var(--muted); line-height: 1.5; }

@media (max-width: 520px) {
  .compass-legend p, .fill-legend p { grid-template-columns: 10px 1fr; }
  .compass-legend p span { grid-column: 2; }
  .portrait-list li { grid-template-columns: 28px minmax(0, 1fr); }
  .position-value { grid-column: 2; justify-content: flex-start; }
  .position-value small { text-align: left; }
  .position-value:has(small) { min-width: 0; }
  .export-actions { grid-template-columns: 1fr; }
}
