/* ---------------------------------------------------------
   The Unknown — stylesheet
   Palette:
     #14161b  ink (background)
     #e9e4d8  bone (primary text)
     #948a78  taupe (secondary text, dividers)
     #c9a875  dim gold (the one accent — used sparingly)
     #2a2e36  slate (borders, subtle separation)
--------------------------------------------------------- */

:root {
  --ink: #14161b;
  --ink-raised: #181b21;
  --bone: #e9e4d8;
  --taupe: #948a78;
  --taupe-dim: #6b6557;
  --gold: #c9a875;
  --slate: #2a2e36;
  --serif: 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--bone);
  min-height: 100%;
}

body {
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: url("bg-door-open.jpg");
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Darkening overlay between the photo and the grain/content layers.
   Guarantees text stays fully legible regardless of what's in the photo —
   strongest directly behind the content column, slightly lighter at the
   very edges so the image still reads as a real photograph, not just a
   black screen with a logo on it. */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(20, 22, 27, 0.78) 0%, rgba(20, 22, 27, 0.88) 55%, rgba(20, 22, 27, 0.95) 100%),
    linear-gradient(to bottom, rgba(20, 22, 27, 0.55) 0%, rgba(20, 22, 27, 0.25) 30%, rgba(20, 22, 27, 0.35) 70%, rgba(20, 22, 27, 0.7) 100%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* faint grain so the flat dark background doesn't feel like a UI void */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.025;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 1.5rem 6vh;
  position: relative;
  z-index: 2;
}

.mark {
  position: absolute;
  top: 2.5rem;
  left: 0;
  right: 0;
  text-align: center;
}

.mark-text {
  font-family: var(--serif);
  font-weight: 500;
  font-style: normal;
  font-size: 2rem;
  letter-spacing: 0.16em;
  color: var(--bone);
  text-transform: uppercase;
}

.intro {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.intro.is-hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.tagline {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  font-size: 2.1rem;
  letter-spacing: 0.01em;
  color: var(--bone);
  margin: 0 0 2.25rem;
}

.personality-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.75rem;
}

.personality-intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--taupe);
  margin: 0 0 1.1rem;
}

.personality-picker {
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
}

.personality-or {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--taupe-dim);
  padding-bottom: 1.3rem;
}

/* book-tab aesthetic: paper-toned surface, thin gold border, serif type,
   the active tab "lifts" slightly above the others with a soft shadow */
.personality-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(180deg, rgba(232, 222, 199, 0.07) 0%, rgba(232, 222, 199, 0.025) 100%);
  border: 1px solid rgba(201, 168, 117, 0.35);
  border-left: 5px solid rgba(201, 168, 117, 0.55);
  /* spine corner stays sharp, page corner rounds slightly, like a bound
     edge on the left and a fanned page edge on the right */
  border-radius: 1px 6px 7px 1px;
  color: var(--taupe-dim);
  font-family: var(--serif);
  padding: 0.65rem 1.5rem 0.7rem 1.2rem;
  cursor: pointer;
  position: relative;
  transform: translateY(0);
  /* the layered shadows on the right edge fake stacked page thickness */
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.25),
    2px 0 0 0 rgba(232, 222, 199, 0.05),
    4px 0 0 0 rgba(232, 222, 199, 0.035),
    6px 0 0 0 rgba(232, 222, 199, 0.02);
  margin-right: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.25s ease;
}

/* a thin highlight line just inside the spine, suggesting the spine's
   raised binding catching light */
.personality-btn::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 7px;
  width: 1px;
  background: rgba(255, 248, 230, 0.18);
  pointer-events: none;
}

/* faint paper-grain texture, same noise technique as the page grain */
.personality-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.personality-btn-label {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: inherit;
}

.personality-btn-tagline {
  font-style: italic;
  font-size: 0.72rem;
  color: var(--taupe-dim);
  opacity: 0.85;
}

.personality-btn:hover,
.personality-btn:focus-visible {
  border-color: rgba(201, 168, 117, 0.6);
  border-left-color: rgba(201, 168, 117, 0.8);
  color: var(--taupe);
  transform: translateY(-1px);
}

.personality-btn.is-selected {
  border-color: var(--gold);
  border-left-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(201, 168, 117, 0.25) inset,
    2px 0 0 0 rgba(232, 222, 199, 0.07),
    4px 0 0 0 rgba(232, 222, 199, 0.05),
    6px 0 0 0 rgba(232, 222, 199, 0.03);
}

.personality-btn.is-selected .personality-btn-tagline {
  color: var(--gold);
  opacity: 0.75;
}

.ask-form {
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 2.5px solid var(--gold);
  padding-bottom: 0.6rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ask-form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 1px 12px 0 rgba(201, 168, 117, 0.35);
}

.ask-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 400;
  padding: 0.25rem 0.1rem;
  transition: opacity 220ms ease;
}

.ask-input.placeholder-swapping {
  opacity: 0;
}

.ask-input::placeholder {
  color: var(--taupe-dim);
  opacity: 0.8;
}

.ask-submit {
  background: transparent;
  border: none;
  color: var(--taupe);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.ask-submit:hover,
.ask-submit:focus-visible {
  color: var(--gold);
  transform: translateX(2px);
}

.ask-submit:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.hint {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--taupe-dim);
  margin-top: 2.25rem;
  letter-spacing: 0.01em;
}

.hint-chip {
  background: none;
  border: none;
  color: var(--taupe-dim);
  font-family: var(--sans);
  font-size: 0.8rem;
  text-decoration: underline;
  text-decoration-color: var(--slate);
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}

.hint-chip:hover,
.hint-chip:focus-visible {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* ---------------- result ---------------- */

.result {
  width: 100%;
  max-width: 620px;
  display: flex;
  justify-content: center;
  padding-top: 3.75rem;
}

.result[hidden] {
  display: none;
}

.result-inner {
  width: 100%;
}

.asked {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--bone);
  text-align: center;
  letter-spacing: 0.005em;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto 2.5rem;
}

.asked::before {
  content: "you asked ";
  color: var(--taupe-dim);
  font-style: italic;
}

.thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: 7rem;
  padding: 1.5rem 0;
}

.thinking[hidden] {
  display: none;
}

.thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
  animation: breathe 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

.thinking-text {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.4;
  color: var(--bone);
  letter-spacing: 0.005em;
  text-align: center;
  max-width: 30ch;
  opacity: 1;
  transition: opacity 0.5s ease;
  animation: thinkingPulse 2.4s ease-in-out infinite;
}

.thinking-text.is-fading {
  opacity: 0;
}

@keyframes breathe {
  0%, 100% { opacity: 0.2; transform: scale(0.85); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes thinkingPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.reflection {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--bone);
  text-align: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.reflection.is-visible {
  opacity: 1;
}

.reflection[hidden] {
  display: none;
}

.reflection p {
  margin: 0 0 1.3rem;
}

.reflection .rule {
  border: none;
  border-top: 1px solid var(--slate);
  width: 64px;
  margin: 2rem auto;
}

.reflection .quote-line {
  font-style: italic;
  color: var(--bone);
}

.reflection .attribution {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--taupe-dim);
  font-style: normal;
  margin-top: -0.7rem;
}

.reflection.crisis {
  text-align: left;
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--bone);
  max-width: 540px;
  margin: 0 auto;
}

.reflection.crisis a {
  color: var(--gold);
  text-decoration: underline;
}

.reflection.crisis strong {
  color: var(--bone);
  font-weight: 500;
}

/* ---------------- pocket note (named-entity reveal) ---------------- */

.pocket {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2.5rem;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.pocket.is-visible {
  opacity: 1;
}

.pocket[hidden] {
  display: none;
}

.pocket-trigger-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--taupe);
  text-align: center;
  margin: 0 0 0.9rem;
}

.pocket-trigger-btn {
  background: transparent;
  border: 1px solid var(--slate);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.pocket-trigger-btn:hover,
.pocket-trigger-btn:focus-visible {
  border-color: var(--gold);
  background: rgba(201, 168, 117, 0.08);
}

.pocket-trigger-btn[hidden] {
  display: none;
}

.notebook {
  background: #f4ecd8;
  width: 100%;
  max-width: 320px;
  padding: 2.1rem 1.85rem 2.3rem;
  position: relative;
  transform: rotate(-1deg);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin-top: 1.5rem;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.notebook.is-visible {
  opacity: 1;
  transform: rotate(-1deg) translateY(0);
}

.notebook[hidden] {
  display: none;
}

.notebook::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0px, transparent 27px, rgba(60, 90, 140, 0.16) 28px
  );
  pointer-events: none;
  z-index: 1;
}

.notebook-wrinkle {
  position: absolute;
  top: 58%; left: -10%; width: 130%; height: 26px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(80, 60, 30, 0.10) 45%,
    rgba(255, 255, 255, 0.22) 52%,
    rgba(0, 0, 0, 0) 100%
  );
  transform: rotate(-4deg);
  z-index: 3;
  pointer-events: none;
}

.notebook-ink-dot {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #2a2a35;
  opacity: 0.55;
  top: 32%; left: 78%;
  z-index: 4;
  pointer-events: none;
}

.notebook-ink-flick {
  position: absolute;
  width: 18px; height: 2px;
  background: #2a2a35;
  opacity: 0.4;
  top: 31%; left: 60%;
  transform: rotate(-18deg);
  border-radius: 2px;
  z-index: 4;
  pointer-events: none;
}

.notebook-content {
  position: relative;
  color: #262630;
  font-family: 'Homemade Apple', cursive;
  z-index: 2;
}

.notebook-entry {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.35rem 0.3rem 0.55rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease;
  text-decoration: none;
}

.notebook-entry:hover,
.notebook-entry:focus-visible {
  background: rgba(40, 40, 50, 0.06);
}

.notebook-entry:active {
  background: rgba(40, 40, 50, 0.12);
}

.notebook-entry .notebook-name {
  display: block;
  font-size: 1.26rem;
  line-height: 1.5;
  color: #262630;
}

.notebook-entry:nth-of-type(odd) .notebook-name {
  transform: rotate(-1.2deg);
}

.notebook-entry:nth-of-type(even) .notebook-name {
  transform: rotate(0.7deg);
}

.notebook-detail-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.1rem;
  flex-wrap: wrap;
}

.notebook-detail {
  font-size: 1.1rem;
  opacity: 0.88;
}

.notebook-detail.is-web {
  text-decoration: underline;
  text-decoration-color: rgba(40, 40, 50, 0.3);
}

.notebook-icon {
  font-family: var(--sans);
  font-size: 0.7rem;
  opacity: 0.6;
}

.notebook-tap-hint {
  font-family: var(--sans);
  font-size: 0.62rem;
  color: #8a7350;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  border-bottom: 1px dotted #8a7350;
  padding-bottom: 1px;
}

.notebook-footer {
  position: relative;
  z-index: 2;
  font-family: var(--sans);
  font-size: 0.66rem;
  color: #7a7263;
  text-align: center;
  margin: 0.7rem 0 0;
  font-style: italic;
}

/* ---------------- scientific report (scientist personality's pocket-note equivalent) ---------------- */

.report {
  background: #eef0ec;
  width: 100%;
  max-width: 340px;
  padding: 2rem 1.9rem 2.2rem;
  position: relative;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
  margin-top: 1.5rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  font-family: var(--sans);
}

.report.is-visible {
  opacity: 1;
}

.report[hidden] {
  display: none;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1.5px solid #2a2e30;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.report-title {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a2e30;
  font-weight: 600;
}

.report-id {
  font-size: 0.6rem;
  color: #6b6f6c;
  font-family: 'Courier New', monospace;
}

.report-content {
  color: #1c1f1d;
  font-size: 0.92rem;
  line-height: 1.6;
}

.report-entry {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px dotted #9a9d98;
  padding: 0.55rem 0.1rem;
  margin-bottom: 0.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.report-entry:last-of-type {
  border-bottom: none;
}

.report-entry:hover,
.report-entry:focus-visible {
  background: rgba(40, 45, 42, 0.04);
}

.report-entry .report-name {
  display: block;
  font-size: 0.92rem;
  color: #1c1f1d;
  font-weight: 500;
}

.report-detail-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.report-detail {
  font-size: 0.85rem;
  color: #3a3d3a;
  font-family: 'Courier New', monospace;
}

.report-icon {
  font-size: 0.68rem;
  color: #6b6f6c;
}

.report-tap-hint {
  font-size: 0.6rem;
  color: #7a7e79;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid #c8cbc5;
}

.report-stamp {
  font-size: 0.6rem;
  color: #6b6f6c;
  letter-spacing: 0.04em;
  font-style: italic;
}

/* the illegible signature: an SVG-like scrawl built from a wavy stroked
   path, rendered as a background shape rather than legible letterforms */
.report-signature {
  width: 92px;
  height: 34px;
  position: relative;
}

.report-signature svg {
  width: 100%;
  height: 100%;
}

/* ---------------- followup reply field ---------------- */

.followup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 360px;
  margin: 2.25rem auto 0;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 0.45rem;
  opacity: 0;
  transition: opacity 0.6s ease, border-color 0.3s ease;
}

.followup.is-visible {
  opacity: 1;
}

.followup[hidden] {
  display: none;
}

.followup:focus-within {
  border-color: var(--gold);
}

.followup-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  padding: 0.15rem 0.05rem;
}

.followup-input::placeholder {
  color: var(--taupe-dim);
  opacity: 0.75;
}

.followup-submit {
  background: transparent;
  border: none;
  color: var(--taupe);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.followup-submit:hover,
.followup-submit:focus-visible {
  color: var(--gold);
  transform: translateX(2px);
}

/* ---------------- deeper question ("may I ask you something?") ---------------- */

.deeper {
  width: 100%;
  max-width: 420px;
  margin: 2.5rem auto 0;
  text-align: center;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.deeper.is-visible {
  opacity: 1;
}

.deeper[hidden] {
  display: none;
}

.deeper-prompt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--bone);
  margin: 0 0 1.1rem;
}

.deeper-consent-row {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
}

.deeper-consent-row[hidden] {
  display: none;
}

.deeper-consent-btn {
  background: transparent;
  border: 1px solid rgba(201, 168, 117, 0.45);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.deeper-consent-btn:hover,
.deeper-consent-btn:focus-visible {
  border-color: var(--gold);
  background: rgba(201, 168, 117, 0.08);
}

.deeper-consent-btn-quiet {
  border-color: var(--slate);
  color: var(--taupe-dim);
}

.deeper-consent-btn-quiet:hover,
.deeper-consent-btn-quiet:focus-visible {
  border-color: var(--taupe);
  color: var(--taupe);
  background: transparent;
}

.deeper-thinking {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

.deeper-thinking[hidden] {
  display: none;
}

.deeper-question {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--bone);
  margin: 0.5rem 0 1.5rem;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.deeper-question.is-visible {
  opacity: 1;
}

.deeper-question[hidden] {
  display: none;
}

.deeper-reply {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 0.45rem;
  opacity: 0;
  transition: opacity 0.6s ease, border-color 0.3s ease;
}

.deeper-reply.is-visible {
  opacity: 1;
}

.deeper-reply[hidden] {
  display: none;
}

.deeper-reply:focus-within {
  border-color: var(--gold);
}

.deeper-reply-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  padding: 0.15rem 0.05rem;
}

.deeper-reply-input::placeholder {
  color: var(--taupe-dim);
  opacity: 0.75;
}

.deeper-reply-submit {
  background: transparent;
  border: none;
  color: var(--taupe);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.deeper-reply-submit:hover,
.deeper-reply-submit:focus-visible {
  color: var(--gold);
  transform: translateX(2px);
}

/* ---------------- share ---------------- */

.share {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2.5rem;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.share.is-visible {
  opacity: 1;
}

.share[hidden] {
  display: none;
}

.share-trigger {
  background: transparent;
  border: none;
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
  cursor: pointer;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.share-trigger:hover,
.share-trigger:focus-visible {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

.share-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.share-options[hidden] {
  display: none;
}

.share-option {
  background: transparent;
  border: 1px solid var(--slate);
  color: var(--taupe);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.share-option:hover,
.share-option:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 168, 117, 0.06);
}

.share-option[hidden] {
  display: none;
}

.share-confirm {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--gold);
  text-align: center;
  line-height: 1.5;
  max-width: 340px;
  margin: 0.7rem auto 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-confirm.is-visible {
  opacity: 0.9;
}

/* ---------------- continue exploring (three paths) ---------------- */

.paths {
  width: 100%;
  max-width: 480px;
  margin: 2.75rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--slate);
  opacity: 0;
  transition: opacity 0.7s ease;
}

.paths.is-visible {
  opacity: 1;
}

.paths[hidden] {
  display: none;
}

.paths-heading {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe-dim);
  text-align: center;
  margin: 0 0 1.1rem;
}

.paths-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--slate);
  text-align: left;
  padding: 0.85rem 0.2rem;
  cursor: pointer;
}

.paths-item:first-of-type {
  border-top: none;
}

.paths-item[hidden] {
  display: none;
}

.paths-item-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
  margin-bottom: 0.3rem;
  transition: opacity 0.25s ease;
}

.paths-item-question {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--bone);
  transition: color 0.25s ease;
}

.paths-item-preview {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--taupe-dim);
  margin-top: 0.4rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.35s ease, max-height 0.35s ease;
}

.paths-item:hover .paths-item-label,
.paths-item:focus-visible .paths-item-label {
  opacity: 1;
}

.paths-item:hover .paths-item-question,
.paths-item:focus-visible .paths-item-question {
  color: var(--gold);
}

.paths-item:hover .paths-item-preview,
.paths-item:focus-visible .paths-item-preview {
  opacity: 1;
  max-height: 3rem;
}

@media (max-width: 540px) {
  .paths-item-question { font-size: 1.02rem; }
}

.again {
  display: block;
  margin: 3rem auto 0;
  background: transparent;
  border: none;
  color: var(--taupe-dim);
  font-family: var(--sans);
  font-size: 0.85rem;
  text-decoration: underline;
  text-decoration-color: var(--slate);
  text-underline-offset: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.6s ease, color 0.25s ease;
}

.again.is-visible {
  opacity: 1;
}

.again:hover,
.again:focus-visible {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* top variant sits before the question, smaller margin, visible immediately
   (no fade-in wait, since it should be usable the instant a result appears) */
.again-top {
  margin: 0 auto 1rem;
  font-size: 0.7rem;
  opacity: 0.5;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.again-top.is-visible {
  opacity: 0.5;
}

.again-top:hover,
.again-top:focus-visible {
  opacity: 0.9;
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* ---------------- back to top ---------------- */

.back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink-raised);
  border: 1px solid var(--slate);
  color: var(--taupe);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.25s ease, color 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 0.85;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  opacity: 1;
  border-color: var(--gold);
  color: var(--gold);
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top-glyph {
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 540px) {
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
  }
}

/* ---------------- footer ---------------- */

.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem 1.5rem 2rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--taupe-dim);
  line-height: 1.6;
}

.site-footer a {
  color: var(--taupe-dim);
  text-decoration: underline;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--gold);
}

.footer-sub {
  opacity: 0.7;
  margin-top: 0.3rem;
}

/* ---------------- responsive ---------------- */

@media (max-width: 540px) {
  .ask-input { font-size: 1.15rem; }
  .reflection { font-size: 1.12rem; }
  .thinking-text { font-size: 1.5rem; max-width: 22ch; }
  .mark-text { font-size: 1rem; letter-spacing: 0.14em; }
  .tagline { font-size: 1.55rem; margin-bottom: 2.25rem; }
  .asked { font-size: 1.05rem; max-width: 320px; }
  .share-trigger { font-size: 1.3rem; }
  .hint { margin-top: 1.75rem; }

  .personality-picker {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .personality-or {
    padding-bottom: 0;
  }

  .personality-btn {
    width: 200px;
  }

  .personality-btn.is-selected {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reflection { transition: none; }
  .thinking-dot { animation: none; opacity: 0.5; }
  .thinking-text { animation: none; opacity: 1; }
  .intro, .again, .again-top, .back-to-top { transition: none; }
}
