/* ============================================================
   PRABHUPAD SHIKSHA — mobile-first visual layer
   ============================================================ */

:root {
  --ink: #17140F;
  --brown: #3A2416;
  --brown-deep: #2C1810;
  --paper: #F7F1E6;
  --paper-deep: #E4D5BE;
  --saffron: #E08A1A;
  --saffron-fg: #F6C86A;
  --saffron-safe: #B35A08;
  --terracotta: #C45C26;
  --maroon: #7A2E1A;
  --gold: #E4B54A;
  --clay: #A0522D;

  --saffron-05: rgb(224 138 26 / .10);
  --saffron-25: rgb(224 138 26 / .30);
  --cream-03: rgb(247 241 230 / .08);
  --cream-22: rgb(247 241 230 / .22);
  --cream-fg: #F7F1E6;
  --ink-18: rgb(23 20 15 / .18);
  --ink-fg: #17140F;
  --accentFg: var(--saffron-fg);

  --step--1: 0.94rem;
  --step-0: 1rem;
  --step-1: 1.28rem;
  --step-2: 1.7rem;
  --step-3: 2.15rem;
  --step-4: clamp(2.35rem, 11vw, 3.1rem);

  --font-display: "Nunito", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-body: "Nunito", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-deva: "Noto Sans Devanagari", "Nunito", sans-serif;

  --nav-h: 92px;
  --pad: max(1rem, env(safe-area-inset-left));
  --max: 72rem;
  --radius: 999px;

  --brass: var(--saffron);
  --brass-bright: var(--saffron-safe);
  --parchment: var(--ink);
  --parchment-dim: #2e2a24;
  --parchment-faint: #4a453c;
  --line: rgb(23 20 15 / .28);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: hidden;
  font-size: 112.5%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, select, textarea, input { font: inherit; }

.wrap {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.micro-label {
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron-safe);
  margin: 0;
}

.hairline {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 1.25rem 0 1.5rem;
  max-width: 8rem;
}

/* -------------------- buttons -------------------- */
.sq-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0 1.15rem;
  border: 1.5px solid var(--sq-stroke, transparent);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--sq-bg);
  color: var(--sq-fg);
  box-shadow: 0 1px 0 rgb(23 20 15 / .12);
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.sq-btn__glow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .sq-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgb(23 20 15 / .16); }
}
.sq-btn:active { transform: translateY(1px); }
.sq-btn:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}
.sq-btn--primary {
  --sq-bg: var(--brown);
  --sq-fg: var(--gold);
  --sq-stroke: var(--brown);
  background-color: var(--brown);
  color: var(--gold);
}
.ask-cta .sq-btn--primary {
  --sq-bg: var(--gold);
  --sq-fg: var(--brown-deep);
  --sq-stroke: var(--gold);
  background-color: var(--gold);
  color: var(--brown-deep);
}
.sq-btn--secondary {
  --sq-bg: var(--clay);
  --sq-fg: #fff8ee;
  --sq-stroke: var(--clay);
  background-color: var(--clay);
  color: #fff8ee;
}
.sq-btn--ghost {
  --sq-bg: var(--paper);
  --sq-fg: var(--ink-fg);
  --sq-stroke: var(--ink);
  background-color: var(--paper);
}
.sq-btn--listen {
  min-height: 48px;
  padding: 0 1.1rem;
  font-size: 1rem;
  margin-top: 0.85rem;
}
.listen-icon { flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .sq-btn, .sq-btn__glow, .hero-wordmark { transition: none; animation: none; }
  .sq-btn:hover, .sq-btn:active { transform: none; }
}

/* -------------------- brand lockup (saffron, not red) -------------------- */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
}
.site-logo-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--paper);
  border-radius: 50%;
}
.footer-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}
.brand-deva {
  font-family: var(--font-deva);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--saffron-safe);
}
.brand-latin {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

/* -------------------- nav -------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background-color: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.nav-mantra {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  background-image: url("../assets/images/hare-krishna-mantra-pattern.webp");
  background-repeat: repeat;
  background-size: 36rem 1.15em;
  opacity: 0.42;
}
.nav-inner {
  position: relative;
  z-index: 1;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-inline: var(--pad);
  gap: 0.5rem;
}
html.nav-open .site-nav { z-index: 100; }
html.nav-open .auth-corner { visibility: hidden; }
.notes-nav-item,
.auth-nav-item {
  display: flex;
  align-items: center;
  list-style: none;
  position: relative;
}
.auth-nav-item {
  flex-shrink: 0;
}
.nav-inner .brand {
  grid-column: 2;
  justify-self: center;
  position: relative;
  z-index: 96;
  background: var(--paper);
  padding: 0.12rem 0.65rem 0.12rem 0.12rem;
  border-radius: 999px;
}
.auth-header-slot {
  grid-column: 1;
  justify-self: start;
  align-self: center;
  z-index: 96;
}
.auth-header-signin {
  appearance: none;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0.35rem 0;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.auth-header-signin:disabled {
  opacity: 0.65;
}
.auth-menu-name {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}
.auth-menu-signout { width: 100%; }
.auth-nav-item[hidden],
.auth-corner { display: none !important; }
.nav-toggle {
  grid-column: 3;
  justify-self: end;
  position: relative;
  z-index: 96;
}
.nav-toggle, .nav-close {
  width: 48px;
  height: 48px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 50%;
}
.nav-panel {
  position: fixed;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper);
  padding: 0.75rem var(--pad) calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  transform: translateX(100%);
  visibility: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform .28s ease, visibility .28s;
}
.nav-panel.open {
  transform: none;
  visibility: visible;
}
.nav-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: 1.5rem;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-list li { list-style: none; }
.nav-list .sq-btn { width: 100%; min-height: 48px; }
.nav-list .human-voice-select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 2.2rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2317140F' d='M1.2 1.2L6 6l4.8-4.8' stroke='%2317140F' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.nav-list .lang-select {
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.95rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}
.translate-quick-title {
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--saffron-safe);
  margin-bottom: 0.6rem;
}
.translate-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
}
.translate-quick-btns .sq-btn { width: auto; min-height: 44px; padding: 0 .9rem; font-size: 0.9rem; }
.lang-pill.active { background: var(--paper-deep); }
.translate-select-wrap label { display: block; margin-bottom: 0.4rem; font-size: var(--step--1); }
.translate-dropdown { display: none; padding-top: 0.5rem; }
.translate-dropdown.active { display: block; }
.nav-sentinel { height: 0; }

/* Phone layout is the only layout: logo centered, links in the menu. */

/* -------------------- hero -------------------- */
.hero-block {
  position: relative;
  z-index: 2;
  overflow: visible;
  isolation: isolate;
  background: #000;
  color: var(--cream-fg);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 0 0;
}
.hero-wordmark {
  position: relative;
  z-index: 4;
  margin: 0;
  padding-inline: var(--pad);
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.92;
  text-transform: none;
}
.hero-wordmark__prabhupad,
.hero-wordmark__shiksha { display: block; }
.hero-wordmark__shiksha { color: var(--saffron-fg); }
.hero-kicker {
  position: relative;
  z-index: 4;
  margin: 0.85rem var(--pad) 0;
  color: var(--saffron-fg);
}
.hero-block > picture { display: contents; }
.hero-peek {
  position: relative;
  z-index: 3;
  width: min(92vw, 480px);
  height: auto;
  display: block;
  margin: 1.25rem 0 0 auto;
  margin-right: -1.5rem;
  pointer-events: none;
  user-select: none;
  transform: translateY(10%);
}
.hero-follow {
  position: relative;
  z-index: 1;
  padding: 2rem var(--pad) 2.25rem;
  max-width: 34em;
}
.lede {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  max-width: 34em;
}
.lede strong {
  font-weight: 800;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.35rem;
  width: 100%;
}
.hero-action { width: 100%; }
.hero-action-desc {
  margin: 0.55rem 0.15rem 0;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--parchment-dim);
}
a.body-link {
  color: var(--clay);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}
a.body-link:hover { color: var(--saffron); }
.cross-links {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
}
.ask-cta .body-link { color: #F3D7A8; }
.ask-cta .body-link:hover { color: #fff8ee; }
.kb-key {
  --key-face: var(--clay);
  --key-ink: #fff8ee;
  --key-edge: #6e3418;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1.5px solid rgb(23 20 15 / .22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgb(255 255 255 / .18) 0%, transparent 42%, rgb(0 0 0 / .12) 100%), var(--key-face);
  color: var(--key-ink);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / .28),
    inset 0 -2px 0 rgb(0 0 0 / .12),
    0 7px 0 var(--key-edge),
    0 12px 18px rgb(23 20 15 / .28);
  transition: transform .08s ease, box-shadow .08s ease;
}
.kb-key--ask {
  min-height: 64px;
  font-size: 1.2rem;
}
.kb-key--timeline {
  --key-face: var(--brown);
  --key-ink: var(--gold);
  --key-edge: #1a100a;
  width: 86%;
  min-height: 50px;
  font-size: 1rem;
}
.kb-key:active {
  transform: translateY(6px);
  box-shadow:
    inset 0 3px 8px rgb(0 0 0 / .28),
    0 1px 0 var(--key-edge),
    0 3px 8px rgb(23 20 15 / .22);
}
.kb-key:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .kb-key, .kb-key:active { transition: none; transform: none; }
}
.hero-portrait {
  margin: 1rem var(--pad) 0;
  padding: 10px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 1.75rem;
  box-shadow: 6px 6px 0 var(--saffron);
  overflow: hidden;
}
.hero-portrait img {
  width: 100%;
  max-height: 88dvh;
  object-fit: contain;
  object-position: center top;
  background: var(--paper);
  border-radius: 1.15rem;
}

@media (min-width: 640px) {
  .hero-peek { width: min(70vw, 480px); }
  .visualizer-sitter { width: min(34vw, 307px); right: 0.85rem; }
  .visualizer-title-group { padding-right: min(36vw, 320px); }
}

@keyframes wordmarkIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-wordmark { animation: wordmarkIn .7s ease both; }
}

/* -------------------- seasons / eras -------------------- */
.section-head { padding-block: 2.5rem 1rem; max-width: 34em; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 0.6rem;
}
.section-head p { margin: 0; color: var(--parchment-dim); }

.era { padding-block: clamp(3rem, 12vw, 7rem); }
.era--paper { background: var(--paper); }
.era--deep {
  background: var(--ink);
  color: var(--cream-fg);
}
.era--deep .era-num { color: var(--saffron-fg); }
.era--deep .micro-label { color: var(--saffron-fg); }
.era--deep .hairline { border-top-color: var(--saffron-fg); }
.era--deep .sq-btn--ghost {
  --sq-bg: var(--ink);
  --sq-fg: var(--saffron-fg);
  --sq-stroke: var(--saffron-fg);
}
.era-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--terracotta);
  margin-bottom: 0.4rem;
}
.era h3 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 0.4rem;
}
.era .years { margin: 0; }
.era p { max-width: 34em; }

/* -------------------- photographs -------------------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 0 var(--pad) 2.5rem;
}
.gallery-item {
  margin: 0;
  padding: 8px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 1.5rem;
  box-shadow: 5px 5px 0 var(--saffron);
  overflow: hidden;
}
.gallery-item picture { display: block; }
.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  background: var(--paper-deep);
  border-radius: 1.05rem;
}

/* -------------------- recognition -------------------- */
.voices { display: grid; gap: 3rem; padding-bottom: 3rem; }
.voice { margin: 0; max-width: 34em; }
.voice .quote {
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-style: normal;
  margin: 0 0 0.75rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--saffron);
}
.voice .who {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron-safe);
}

/* -------------------- ask cta + footer -------------------- */
.ask-cta {
  background: var(--ink);
  color: var(--cream-fg);
  padding-block: clamp(3rem, 12vw, 7rem);
}
.ask-cta h2 {
  font-family: var(--font-display);
  font-size: var(--step-3);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 1rem;
  max-width: 16ch;
}
.ask-cta p { max-width: 34em; color: rgb(242 239 231 / .78); }
footer {
  background: var(--ink);
  color: var(--cream-fg);
  padding: 2.5rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.brand-mini {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.footer-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
}
.footer-contact-name {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
}
.footer-mail {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-line { margin: 0; color: rgb(247 241 230 / .7); }
footer .body-link { color: #F3D7A8; }
footer .body-link:hover { color: #fff8ee; }
.footer-copy {
  margin: 0.35rem 0 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--gold);
}
footer .brand-deva, footer .brand-latin { color: var(--saffron-fg); }

/* -------------------- ask page -------------------- */
body.ask-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.ask-chat-fullpage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-log-fullpage {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem var(--pad) 9.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.chat-intro-block { max-width: 34em; }
.chat-intro-block p { font-size: 1.05rem; margin: 0.35rem 0 0; color: var(--parchment-dim); }
.clear-chat-btn {
  appearance: none;
  margin: 0.85rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--saffron-safe);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.clear-chat-btn:disabled { opacity: 0.45; cursor: default; }
.chat-intro-block h1 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0.5rem 0 0.75rem;
}
.msg { max-width: 92%; display: flex; flex-direction: column; gap: 0.4rem; }
.msg .label {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron-safe);
}
.msg .bubble {
  padding: 1rem 1.1rem;
  border-radius: 1.25rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-size: 1.05rem;
  line-height: 1.65;
}
.msg.from-visitor { align-self: flex-end; }
.msg.from-visitor .bubble {
  background: var(--ink);
  color: var(--cream-fg);
  border-color: var(--ink);
}
.chat-input-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 0.75rem 0.85rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, var(--paper) 38%);
}
.chat-input-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  background: var(--brown-deep);
  border: 1.5px solid rgb(228 181 74 / .45);
  border-radius: 28px;
  padding: 8px 8px 8px 16px;
  box-shadow: 0 10px 28px rgb(0 0 0 / .22);
}
.ask-search-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--gold);
}
.chat-input-inner textarea {
  flex: 1;
  min-height: 40px;
  max-height: 140px;
  resize: none;
  border: 0;
  border-radius: 0;
  padding: 0.45rem 0.2rem;
  background: transparent;
  color: var(--cream-fg);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  outline: none;
}
.chat-input-inner textarea::placeholder {
  color: rgb(247 241 230 / .55);
}
.send-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--brown-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.mic-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.mic-btn.listening {
  background: var(--saffron);
  color: var(--ink);
  animation: micPulse 1s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 34em;
  color: var(--parchment-dim);
  font-size: 0.98rem;
}
.chat-status p { margin: 0; }
.chat-status--error {
  color: var(--maroon);
}
.chat-status .loader-spinner { width: 28px; height: 28px; flex-shrink: 0; }
.loader-spinner { position: relative; width: 40px; height: 40px; }
.loader-spinner .inner { position: absolute; inset: 0; border-radius: 50%; box-sizing: border-box; }
.loader-spinner .inner.one { animation: ask-rotate-one 1s linear infinite; border-bottom: 3px solid var(--saffron); }
.loader-spinner .inner.two { animation: ask-rotate-two 1s linear infinite; border-right: 3px solid var(--saffron); }
.loader-spinner .inner.three { animation: ask-rotate-three 1s linear infinite; border-top: 3px solid var(--saffron); }
@keyframes ask-rotate-one { to { transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); } }
@keyframes ask-rotate-two { to { transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); } }
@keyframes ask-rotate-three { to { transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); } }

/* -------------------- timeline page -------------------- */
.travel-hero { padding: 2rem 0 0.75rem; }
.travel-hero .wrap {
  padding-right: min(40vw, 14rem);
}
.travel-hero h1 {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0.5rem 0 1rem;
}
.travel-main-wrap {
  padding-top: clamp(10.5rem, 34vw, 18rem);
  padding-bottom: 4rem;
}
.visualizer-card, .life-timeline-section {
  background: var(--paper-deep);
  padding: 1.25rem var(--pad);
  margin-bottom: 2rem;
}
.visualizer-card {
  position: relative;
  overflow: visible;
}
.visualizer-card > picture { display: contents; }
.map-stage > picture { display: contents; }
.visualizer-sitter {
  position: absolute;
  right: 0.2rem;
  top: 0;
  z-index: 5;
  width: min(60vw, 260px);
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  transform: translateY(-64%);
}
.visualizer-title-group {
  padding-right: min(62vw, 280px);
  max-width: 38em;
}
.visualizer-title-group h2,
.life-timeline-header h2,
.counters-header h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0 0 0.4rem;
}
.active-location-banner {
  padding: 0.75rem var(--pad);
  border-block: 1px solid var(--line);
  margin: 0.75rem calc(var(--pad) * -1);
}
.map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 588;
  max-height: calc(100dvh - 220px);
  background: #d8c9a8;
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  overflow: hidden;
}
.world-img, .travel-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.world-img {
  object-fit: contain;
  object-position: center;
  filter: contrast(1.32) saturate(1.18) brightness(1.14);
}
.travel-canvas { pointer-events: none; }
.time-readout-container {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--ink);
  color: var(--cream-fg);
  padding: 0.5rem 0.7rem;
  font-size: var(--step--1);
}
.time-readout::before { content: attr(data-month); color: var(--saffron-fg); margin-right: 0.4rem; }
.time-readout::after { content: attr(data-year); }
.controls-bar { display: flex; flex-direction: column; gap: 12px; padding-top: 1rem; }
.controls-left { display: flex; flex-wrap: wrap; gap: 8px; }
.scrubber-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1.5px solid var(--brown);
  background: linear-gradient(to right, var(--saffron) var(--scrubber-p, 0%), #efe6d4 var(--scrubber-p, 0%));
  outline: none;
  accent-color: var(--saffron);
  cursor: pointer;
}
.scrubber-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: transparent;
  border: 0;
}
.scrubber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--gold);
  border: 2.5px solid var(--brown);
  box-shadow: 0 1px 4px rgb(58 36 22 / .28);
  cursor: pointer;
}
.scrubber-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: #efe6d4;
  border: 0;
}
.scrubber-slider::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--saffron);
}
.scrubber-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--brown);
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
}
.scrubber-labels { display: flex; justify-content: space-between; font-size: var(--step--1); color: var(--parchment-dim); }
.speed-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 0.25rem; }
.speed-btn { min-height: 44px; padding: 0 .7rem; }
.speed-btn.active, .decade-tab.active { background: var(--ink); color: var(--saffron-fg); --sq-fg: var(--saffron-fg); --sq-bg: var(--ink); }
.counters-section {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 2px solid var(--ink);
}
.counters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.country-counter-card { background: var(--paper); padding: 0.7rem; }
.counter-progress-bar { height: 4px; background: var(--ink-18); margin: 0.4rem 0; }
.counter-progress-fill { height: 100%; background: var(--saffron); width: 0; }
.decade-tabs { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.5rem; }
.decade-tab { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }

.life-year-card { border-top: 1px solid var(--line); }
.life-year-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
}
.year-digit {
  position: sticky;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  color: var(--terracotta);
}
.year-badge { font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--parchment-dim); }
.life-year-body { display: none; padding-bottom: 1.25rem; }
.life-year-card.open .life-year-body { display: block; }
.travel-event-item { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.jump-map-btn {
  margin-top: 0.5rem;
  min-height: 44px;
  padding: 0 .9rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--saffron-fg);
  font-family: var(--font-display);
  cursor: pointer;
}

/* -------------------- audio bar -------------------- */
.audio-playing-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(-80px - env(safe-area-inset-bottom, 0px));
  z-index: 75;
  background: var(--ink);
  color: var(--cream-fg);
  padding: 0.8rem var(--pad) calc(0.8rem + env(safe-area-inset-bottom, 0px));
  transition: bottom .2s ease;
}
.audio-playing-bar.visible { bottom: 0; }
.audio-bar-content { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.audio-bar-stop {
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--saffron-05);
  color: var(--saffron-fg);
  cursor: pointer;
}

/* -------------------- notes / auth / privacy -------------------- */
.auth-corner {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 46px);
  left: var(--pad);
  right: auto;
  z-index: 85;
}
.auth-corner-signin {
  min-height: 48px;
  padding: 0 0.9rem;
  font-size: 1rem;
  gap: 0.4rem;
}
.auth-corner-signin svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.auth-widget-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
}
.auth-avatar-btn {
  min-height: 48px;
  padding: 0 0.9rem 0 0.55rem;
  gap: 0.45rem;
}
.auth-avatar-img,
.auth-avatar-initials {
  width: 22px;
  height: 22px;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.auth-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--saffron-fg);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}
.auth-user-name {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-chevron {
  flex-shrink: 0;
  transition: transform .16s ease;
}
.auth-widget-wrap:has(.auth-dropdown.open) .auth-chevron {
  transform: rotate(180deg);
}
.auth-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 95;
  box-sizing: border-box;
  min-width: 15.5rem;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: 0.9rem 0.95rem 0.85rem;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 14px 32px rgb(23 20 15 / .18);
  text-align: left;
}
.auth-dropdown.open { display: block; }
.auth-dropdown-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}
.auth-dropdown-email {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brown);
  word-break: break-word;
}
.auth-dropdown-divider {
  height: 1px;
  margin: 0.75rem 0 0.7rem;
  background: var(--ink-18);
}
.auth-dropdown-btn {
  width: 100%;
  min-height: 48px;
}
.nav-panel .notes-nav-item,
.nav-panel .auth-nav-item {
  width: 100%;
}
.nav-panel .auth-widget-wrap,
.nav-panel .auth-corner-signin,
.nav-panel .auth-avatar-btn {
  width: 100%;
}
.nav-panel .auth-dropdown {
  left: 0;
  right: 0;
  min-width: 0;
  max-width: none;
  width: 100%;
}
.auth-dropdown-name { font-size: 1.05rem; }
.auth-dropdown-email { font-size: 0.94rem; }
.notes-tab {
  position: fixed;
  right: 12px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 3px 12px 3px 3px;
  border-radius: var(--radius);
  border: 1px solid rgb(23 20 15 / .12);
  background: rgb(247 241 230 / .92);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgb(23 20 15 / .12);
  backdrop-filter: blur(12px);
}
.notes-tab-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--saffron-05);
  color: var(--saffron-safe);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.notes-tab-icon svg { width: 18px; height: 18px; display: block; }
.notes-empty-icon svg { width: 44px; height: 44px; }
.notes-tab-label { line-height: 1; }
.notes-tab-badge {
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--saffron-fg);
  color: var(--ink);
  font-size: 0.68rem;
  display: none;
  align-items: center;
  justify-content: center;
}
.notes-tab.panel-open { display: none; }
.notes-tab.pulse-hint {
  animation: notesTabPulse 1.4s ease-in-out infinite;
}
@keyframes notesTabPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgb(23 20 15 / .12); }
  50% { transform: scale(1.03); box-shadow: 0 10px 22px rgb(224 138 26 / .22); }
}
.notes-backdrop {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgb(23 20 15 / .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.notes-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.notes-onboard {
  position: fixed;
  inset: 0;
  z-index: 98;
  pointer-events: none;
}
.notes-onboard[hidden] { display: none; }
.notes-onboard-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(23 20 15 / .35);
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}
.notes-onboard.visible { pointer-events: auto; }
.notes-onboard.visible .notes-onboard-backdrop {
  opacity: 1;
  pointer-events: auto;
}
.notes-onboard-card {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  width: min(22rem, calc(100vw - 2rem));
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 16px 36px rgb(23 20 15 / .28);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
}
.notes-onboard.visible .notes-onboard-card {
  opacity: 1;
  transform: none;
}
.notes-onboard-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.notes-onboard-kicker {
  margin: 0 2rem 0.35rem 0;
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron-safe);
}
.notes-onboard-title {
  margin: 0 2rem 0.55rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.notes-onboard-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}
.notes-onboard-done {
  width: auto;
  min-height: 40px;
  box-shadow: none;
}
.notes-panel {
  position: fixed;
  inset: auto 0 0 0;
  height: min(86dvh, 42rem);
  z-index: 95;
  background: var(--paper);
  border-top: 1px solid rgb(23 20 15 / .1);
  border-radius: 1.15rem 1.15rem 0 0;
  transform: translateY(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 40px rgb(23 20 15 / .16);
}
.notes-panel.open { transform: none; }
.notes-sheet-handle {
  width: 36px;
  height: 4px;
  margin: 0.55rem auto 0;
  border-radius: 999px;
  background: rgb(23 20 15 / .18);
  flex-shrink: 0;
}
.notes-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem var(--pad) 0.7rem;
  background: transparent;
  color: var(--ink);
  border-bottom: 1px solid rgb(23 20 15 / .08);
}
.notes-header-titles {
  min-width: 0;
  flex: 1;
}
.notes-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.notes-header-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.28rem;
  min-width: 0;
}
.notes-folder {
  display: block;
  min-width: 0;
  max-width: 12rem;
}
.notes-session-select {
  display: block;
  width: 100%;
  max-width: 12rem;
  min-width: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--saffron-safe);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.notes-header-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}
.notes-toolbar-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--saffron-safe);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.notes-toolbar-btn:hover,
.notes-toolbar-btn:focus-visible {
  background: rgb(23 20 15 / .06);
}
.notes-panel-count {
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--parchment-faint);
  font-size: 0.82rem;
  font-weight: 600;
}
.notes-panel-body {
  padding: 0;
  overflow: auto;
  flex: 1;
}
.notes-drop-zone {
  display: none;
  margin: 0 var(--pad) 0.5rem;
  padding: 0.7rem;
  border: 1px dashed rgb(23 20 15 / .18);
  border-radius: 0.85rem;
  color: var(--parchment-faint);
  font-size: 0.88rem;
  text-align: center;
}
.notes-panel.drop-hover .notes-drop-zone { display: block; }
.notes-drop-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.notes-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 1.75rem 2rem;
  color: var(--parchment-dim);
}
.notes-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--saffron-05);
  color: var(--saffron-safe);
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
}
.notes-empty-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.notes-empty-text {
  margin: 0;
  max-width: 18rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.notes-empty-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--parchment-faint);
}
.notes-list {
  display: flex;
  flex-direction: column;
}
.note-card {
  padding: 0.95rem var(--pad);
  border-bottom: 1px solid rgb(23 20 15 / .08);
  background: transparent;
}
.note-card-text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
}
.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
}
.note-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  color: var(--parchment-faint);
  font-size: 0.78rem;
}
.note-show-more,
.note-delete-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--saffron-safe);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.note-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--parchment-faint);
}
.note-delete-btn:hover { background: rgb(23 20 15 / .06); color: var(--maroon); }
.note-card--entering { opacity: 0; transform: translateY(8px); }
.note-card--landed { transition: opacity .25s ease, transform .25s ease; }
.note-card--highlight { background: var(--saffron-05); }
.note-card--removing { opacity: 0; transform: translateX(12px); transition: .2s ease; }
.notes-icon-btn, .notes-close-btn, .notes-nav-btn, .auth-google-btn {
  min-height: 48px;
  padding: 0 0.9rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper-deep);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}
.auth-modal-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgb(23 20 15 / .45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.auth-modal-overlay.visible { display: flex; }
.auth-modal {
  background: var(--paper);
  padding: 1.5rem;
  max-width: 22rem;
  width: 100%;
}
.privacy-toast, .auth-error-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 130;
  background: var(--ink);
  color: var(--cream-fg);
  padding: 0.7rem 1rem;
  max-width: 20rem;
  opacity: 0;
  pointer-events: none;
}
.privacy-toast.visible, .auth-error-toast.visible { opacity: 1; }
.privacy-curtain {
  position: fixed; inset: 0; z-index: 200;
  background: var(--paper);
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.privacy-curtain.active { display: flex; }

.notes-pill {
  position: fixed;
  z-index: 110;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: var(--radius);
  background: var(--brown);
  color: var(--gold);
  display: none;
  align-items: center;
  gap: 0.3rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 8px 20px rgb(58 36 22 / .3);
}
html.nav-open { overflow: hidden; }

/* -------------------- scroll reveal -------------------- */
html.js-ready .reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.96);
  filter: blur(6px);
}
html.js-ready .reveal.is-in {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    opacity 0.85s ease var(--reveal-delay, 0ms),
    transform 0.85s cubic-bezier(0.16, 0.84, 0.32, 1) var(--reveal-delay, 0ms),
    filter 0.85s ease var(--reveal-delay, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  html.js-ready .reveal,
  html.js-ready .reveal.is-in {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}
