/* Youish layout.
   Tokens and type are at the top.
   The lo-fi bar and site header follow.
   Logged-out home: hero, How it works, sealed journal, stories, contact.
   Buttons are .btn-primary and .btn-secondary.
   Workshop, practice, and journal come after the marketing pages.
   Signed-in sanctuary and shared onboarding are at the bottom. */

@font-face {
  font-family: "Malvides";
  src: url("fonts/Malvides.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


@font-face {
  font-family: "Dochet Script";
  src: url("fonts/dochet-script.regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fff8f5;
  --bg-2: #e4cfc0;
  --panel: #eee1d4;
  --text: #201a17;
  --muted: #6e6460;
  --accent: #94452c;
  --accent-2: #b35c41;
  --accent-ink: #eee1d4;
  --line: #e3dac9;
  --shadow: 0 8px 28px rgba(67, 59, 56, 0.08);
  --radius: 16px;
  --font: "Maldives", "Plus Jakarta Sans", sans-serif;
  --display: "Epilogue", "Plus Jakarta Sans", sans-serif;
  --cinnabar: #d97e63;
  --sage: #7a9a85;
  --walnut: #3d2b24;
  --ink: #2c2523;
  --paper: #faf6ee;
  --alabaster: #f5efeb;
  --oatmeal: #efe9dc;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  scrollbar-gutter: stable;
}

body {
  margin: 0 auto;
  max-width: 1280px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
}

body {
  padding-top: 96px;
}

.ink-filter {
  position: absolute;
  width: 0;
  height: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-2);
}

[hidden] {
  display: none !important;
}

/* First paint follows the address. The route script clears data-boot once it is ready. */
html[data-boot]:not([data-boot="home"]) #view-home,
html[data-boot]:not([data-boot="home"]) #how-it-works,
html[data-boot]:not([data-boot="home"]) .sealed-journal,
html[data-boot]:not([data-boot="home"]) main > .home-stories,
html[data-boot]:not([data-boot="home"]) main > .home-contact,
html[data-boot]:not([data-boot="stories"]) #view-stories {
  display: none !important;
}

html[data-boot="stories"] #view-stories,
html[data-boot="contact"] #view-contact.view,
html[data-boot="privacy"] #view-privacy,
html[data-boot="terms"] #view-terms,
html[data-boot="alphabet"] #view-alphabet,
html[data-boot="memory"] #view-practice,
html[data-boot="journal"] #view-journal {
  display: block !important;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  z-index: 20;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

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

/* Lo-fi station bar, fixed across the top of every page. */
/* Radiostation */
.station-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 51;
  width: 100%;
  height: 38px;
  background: #e4cfc0;

  .station-inner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2.5rem;
  }

  .radio-controls {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    flex: none;
  }

  .radio-btn {
    flex: none;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c4a48a;
    color: #fffaf4;
    cursor: pointer;
  }

  #radio-toggle {
    width: 22px;
    height: 22px;
    background: #3d2b24;
  }

  .radio-btn .material-symbols-outlined {
    font-size: 12px;
    line-height: 1;
  }

  #radio-toggle .material-symbols-outlined {
    font-size: 16px;
  }

  .radio-volume {
    width: 64px;
    height: 14px;
    margin: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
  }

  .radio-volume::-webkit-slider-runnable-track {
    height: 2px;
    border-radius: 999px;
    background: #c9b09c;
  }

  .radio-volume::-webkit-slider-thumb {
    appearance: none;
    width: 8px;
    height: 8px;
    margin-top: -3px;
    border: 0;
    border-radius: 50%;
    background: #a08068;
  }

  .radio-volume::-moz-range-track {
    height: 2px;
    border: 0;
    border-radius: 999px;
    background: #c9b09c;
  }

  .radio-volume::-moz-range-thumb {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: #a08068;
  }

  .radio-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1;
    color: #1c1a16;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .radio-title-run {
    display: flex;
    width: max-content;
  }

  .radio-title-run span {
    flex: none;
    padding-right: 0.35rem;
    white-space: nowrap;
  }

  .radio-title.is-playing {
    text-overflow: clip;
  }

  .radio-title.is-playing .radio-title-run {
    animation: radio-title-slide 36s linear infinite;
  }

  .radio-time {
    flex: none;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #1c1a16;
  }

  .radio-time #radio-left {
    display: inline-block;
    min-width: 2.4rem;
    font-weight: 700;
    text-align: right;
  }
}

@keyframes radio-title-slide {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .station-bar .radio-title.is-playing .radio-title-run {
    animation: none;
  }
}

/* Site header: logo, page links, and the sign-in buttons. */
.navbar {
  position: fixed;
  top: 38px;
  left: 50%;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1280px;
  height: 64px;
  padding: 0 2.5rem;
  background: rgba(255, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(67, 59, 56, 0.04);
  transform: translateX(-50%);
  transition:
    --nav-active-left 300ms ease,
    --nav-active-right 300ms ease;
}

@property --nav-active-left {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

@property --nav-active-right {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

.navbar::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 1px;
  background: linear-gradient(to right,
      var(--accent-ink) 0 var(--nav-active-left, 0px),
      transparent var(--nav-active-left, 0px) var(--nav-active-right, 0px),
      var(--accent-ink) var(--nav-active-right, 0px) 100%);
  content: "";
  pointer-events: none;
}


.nav-burger {
  display: none;
}

.nav-icon {
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
}

.navbar nav {
  position: relative;
  display: flex;
  align-self: stretch;
  align-items: center;
  z-index: 2;
  gap: 12px;
  padding: 4px;
  border-radius: 10px;
}

.navbar nav a {
  position: relative;
  z-index: 2;
  text-decoration: none;
  color: #55433e;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
}

.nav-indicator {
  position: absolute;
  z-index: 1;
  top: 0;
  right: auto;
  bottom: 10px;
  left: 0;
  width: 0;
  border: 1px solid var(--accent-ink);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  opacity: 0;
  pointer-events: none;
}

.nav-indicator::before,
.nav-indicator::after {
  position: absolute;
  bottom: -10px;
  width: 10px;
  height: 10px;
  border-bottom: 1px solid var(--accent-ink);
  content: "";
}

.nav-indicator::before {
  right: 100%;
  border-right: 1px solid var(--accent-ink);
  border-radius: 0 0 10px 0;
}

.nav-indicator::after {
  left: 100%;
  border-left: 1px solid var(--accent-ink);
  border-radius: 0 0 0 10px;
}

.nav-indicator.has-position {
  transition: left 300ms ease, top 300ms ease, width 300ms ease;
  opacity: 1;
}

.navbar nav a[hidden] {
  display: none !important;
}

.navbar nav a:hover {
  color: #94452c;
}

.navbar nav a[aria-current="page"] {
  color: #94452c;
  background: transparent;
}

.navmenu {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-menu-toggle {
  border: 0;
  background: transparent;
  font: inherit;
  color: #55433e;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.nav-menu-toggle:hover,
.nav-menu-toggle[aria-expanded="true"]:not([aria-current="page"]) {
  color: var(--text);
  background: var(--alabaster);
}


.nav-end {
  position: relative;
  z-index: 3;
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

#login,
#logout {
  flex-shrink: 0;
}

#logout {
  display: none;
}

body.is-signed-in .navbar nav,
body.is-signed-in .site-nav nav {
  display: flex;
}

body.is-signed-in #login {
  display: none;
}

body.is-signed-in #logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-page-head {
  text-align: center;
  justify-items: center;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.auth-page-panel {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.auth-switch {
  margin: 16px 0 0;
}

.auth-switch-btn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent-2);
  cursor: pointer;
  font-size: 0.9rem;
}

.auth-switch-btn:hover {
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
}

#glyphmaker-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  position: fixed;
  top: 90px;
  left: 50%;
  backdrop-filter: blur(48px);
  background-color: var(--accent-2);
  padding: 4px 12px 4px 12px;
  border-radius: 0 0 6px 6px;
  opacity: 100%;
  width: 100%;
  max-width: 1280px;
  z-index: 55;
  transform: translateX(-50%);
  margin-top: 6px;
  border-bottom: 1px solid rgba(255, 248, 245, 0.92);
}

#glyph-banner-text {
  flex: 1;
  margin: 0;
  color: #ffff;
  font-size: 14px;
}

#glyph-banner-text a {
  color: #fca178;
  text-decoration: underline;
}

#glyph-banner-text p {
  color: var(--muted);
}

#glyph-banner-dismiss {
  background-color: transparent;
  color: #fca178;
  font-size: 14px;
  text-decoration: underline;
  border: 0;
  margin-left: auto;
}

/* Logged-out hero. The codex and the drag-to-reveal hint live in this block. */
.hero {
  --fold: 50%;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 820px;
  margin: 0;
  padding: 72px 0px 64px 0px;
  overflow: visible;
  background: var(--bg);
}

.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 18px;
  max-width: 840px;
  margin-bottom: 28px;
}


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 0px;
  padding: 10px 20px 10px 20px;
  border-radius: 999px;
  background: #fffcfa;
  box-shadow: 0 8px 24px rgba(67, 59, 56, 0.06);
  color: #4a403c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  width: fit-content;
}

.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 100%;
  background: #e8a090;
  flex-shrink: 0;
}

.hero h1 {
  margin: 0;
  max-width: none;
  font-size: 72px;
  line-height: 1.08;
  color: var(--ink);
}

.hero h1 span {
  white-space: nowrap;
}

#glyphs {
  display: inline-block;
  transition: opacity 250ms ease, transform 250ms ease;
  color: var(--accent-2);
}

#glyphs.is-changing {
  opacity: 0;
  transform: translateY(0.2em);
}

#glyphs.font-one {
  font-family: "Epilogue", sans-serif;
}

#glyphs.font-two {
  font-family: "Malvides", sans-serif;
}

#glyphs.font-three {
  font-family: "Noto Sans Buginese", sans-serif;
}

.hero-sub {
  margin: 0 0 0;
  padding-bottom: 14px;
  width: max-content;
  max-width: 100%;
  text-align: left;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.hero-quote {
  margin: 0;
  max-width: 40rem;
  color: #b35c41;
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
}

.codex-stage {
  --fold: 50%;
  --fold-n: 0.5;
  --stage-pad-x: 48px;
  --stage-pad-t: 48px;
  --stage-pad-b: 24px;
  position: relative;
  display: flex;
  align-items: right;
  justify-content: right;
  width: min(620px, 100%);
  aspect-ratio: 4 / 3;
  height: auto;
  padding: var(--stage-pad-t) var(--stage-pad-x) var(--stage-pad-b);
  overflow: visible;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  perspective: 1100px;
  perspective-origin: 50% 50%;
  margin-top: 72px;
}

.codex-stage.is-dragging,
.codex-rig.is-dragging {
  cursor: grabbing;
}




@media (prefers-reduced-motion: reduce) {

  .codex-verse-latin {
    clip-path: none;
  }

  .codex-face-cipher {
    display: none;
  }
}

.codex-rig {
  position: relative;
  z-index: 1;
  width: 100%;
  transform-style: preserve-3d;
}

.codex-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  transform-style: preserve-3d;
  transform-origin: var(--fold) 50%;
  background-color: #f7f4ee;
  background-image: url("assets/paper-texture.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(210, 196, 180, 0.7);
  box-shadow:
    0 9px 12px rgba(70, 52, 42, 0.04),
    0 6px 12px rgba(70, 52, 42, 0.05),
    0 16px 32px rgba(70, 52, 42, 0.07),
    0 32px 56px rgba(70, 52, 42, 0.08);
  will-change: transform;
  transition: transform 0.4s ease;
}

.codex-stage.is-dragging .codex-sheet {
  transition: none;
}

.codex-sheet::before {
  content: none;
}

.codex-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to right,
      rgba(48, 32, 24, 0.14) 0%,
      rgba(48, 32, 24, 0.04) calc(var(--fold) - 8%),
      rgba(255, 255, 255, 0.2) var(--fold),
      rgba(48, 32, 24, 0.05) calc(var(--fold) + 8%),
      rgba(48, 32, 24, 0.12) 100%);
  mix-blend-mode: multiply;
}

.codex-face-latin {
  position: relative;
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--fold)) 0 0);
}

.codex-face-cipher {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  clip-path: inset(0 0 0 var(--fold));
}

.codex-type {
  position: relative;
  width: max-content;
  max-width: 100%;
  overflow: hidden;
}

.codex-cipher {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("assets/asemic-cipher.png");
  background-repeat: no-repeat;
  background-size: 118% 118%;
  background-position: center;
  mix-blend-mode: multiply;
  filter: contrast(1.12);
}

.codex-page {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  padding: 36px 40px;
}

.codex-verse {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-family: "Malvides", var(--display);
  font-size: 32px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.28;
  letter-spacing: 0.02em;
  text-align: center;
}

.codex-verse span {
  display: block;
  white-space: nowrap;
}

.codex-verse-sizer {
  visibility: hidden;
}

.codex-aside {
  margin: 0;
  max-width: 28rem;
  color: #6e6460;
  font-family: var(--display);
  font-size: 16px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.codex-caption {
  margin: 8px 0 0;
  color: #9a8d84;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-scan {
  position: absolute;
  top: calc(var(--stage-pad-t) - 16px);
  bottom: calc(var(--stage-pad-b) - 16px);
  left: calc(var(--stage-pad-x) + (100% - 2 * var(--stage-pad-x)) * var(--fold-n));
  z-index: 20;
  width: 16px;
  background: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-scan-stroke {
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: auto;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
}

.codex-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--stage-pad-b) + 8px);
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32spx 0 0 0;
  transform: translate(-50%, -100%);
  color: #b35c41;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  animation: hint-breathe 2.4s ease-in-out infinite;
}



@media (prefers-reduced-motion: reduce) {
  .codex-hint {
    animation: none;
    opacity: 0.8;
  }
}

.hero-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lede,
.process-intro p,
.page-head p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-button,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero .hero-button {
  justify-content: left;
  margin-top: 12px;
}

#home-logout>.hero {
  padding-bottom: 96px;
}

/* Logged-out home, from the hero through the contact form.
   #how-it-works is the section. The demo sits in the .process div inside it. */
#how-it-works {
  scroll-margin-top: 118px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 24px;
  background: #f6eee6;
}

/* The type-a-thought demo inside How it works. */
#how-it-works>.process {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: center;
  margin: 0 -2.5rem 64px;
  padding: 24px;
  border-radius: 20px;
  background: var(--accent-2);
}

.panel .row-actions {
  margin-top: 14px;
}

.composer>.journal-save-row {
  justify-content: space-between;
  margin-bottom: 0;
}

/* Filled action. .btn-secondary, just below, is the outline action. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background-color: #c4654b;
  color: #fffaf9;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  background-color: #d4522e;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 24px;
  border: 1px solid #c4b09d;
  border-radius: 10px;
  background: #fff;
  color: var(--walnut);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(67, 59, 56, 0.05);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent-2);
  color: var(--accent);
  background: #fff8f5;
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.process {
  padding: 24px 2.5rem 72px;
  background: var(--paper);
}

#alphabet-title,
#practice-title,
#stories-title {
  margin: 0;
  padding-top: 16px;
}

#practice-blurb,
#alphabet-blurb {
  line-height: 1.2;
  margin: 0;
  padding-bottom: 16px;
}

#view-practice>.workshop-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  grid-template-areas:
    "title progress"
    "steps steps";
  align-items: start;
  column-gap: 24px;
}

#view-practice .practicetitle {
  grid-area: title;
  margin-bottom: 0;
}

#view-practice .progress-card {
  grid-area: progress;
  justify-self: end;
  width: 100%;
  min-width: 0;
}

#view-practice .path-switch {
  grid-area: steps;
}

@media (max-width: 700px) {
  #view-practice>.workshop-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "progress"
      "steps";
  }

  #view-practice .progress-card {
    justify-self: stretch;
  }
}


.page-head {
  display: grid;
  align-items: center;
  margin-bottom: 24px;
}

.page-head-stack {
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  justify-items: start;
}

/* Sealed journal band, between How it works and the stories. */
section.sealed-journal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 172px;
  padding: 8px 2.5rem;
  overflow-x: clip;
  background: transparent;
}

.sealed-img {
  width: min(100%, 750px);
  text-align: center;
}

.sealed {
  text-align: center;
}

.sealed h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

#sealedorng {
  color: var(--accent);
}

.sealed p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

/* Story cards on the logged-out home. */
.home-stories {
  margin: 96px 0 0;
  padding: 64px 2.5rem 96px;
  background: #f6eee6;
  border-radius: 24px 24px 0 0;
}

.home-stories h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.home-stories-rail {
  display: block;
}

.story-arrow {
  display: none;
}

.home-story-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
}

.home-story-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #e7ddd0;
  border-radius: 18px;
  background: #fffdfb;
  color: inherit;
  text-decoration: none;
}

.home-story-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.home-story-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 18px 20px;
}

.home-story-body h3 {
  margin: 0;
}

.home-story-body p {
  margin: 0;
  color: #6e6560;
  line-height: 1.45;
}

.home-story-body .story-read {
  margin-top: auto;
}

.sealed-img {
  position: relative;
  width: min(100%, 750px);
  margin: 0 auto;
}

.seal-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: calc(32px - 4.23%);
}

.process-intro-center .steps-note {
  margin-top: -14px;
}

.process-foot {
  margin-top: 28px;
}

/* Inner pages: contact, privacy, terms, workshop, practice, journal. */
.page {
  padding: 72px 0 72px 0;
}

.contact-form {
  width: min(28rem, 100%);
  display: grid;
  gap: 12px;
}

.contact-form .field {
  margin-bottom: 12px;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--line);
}

.contact-form .field>span em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  opacity: 0.78;
}

.contact-form textarea {
  width: 100%;
  min-height: 10rem;
}

.contact-form .btn-primary {
  justify-self: end;
  margin-top: 4px;
}

.contact-form h1 {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0;
  width: max-content;
  max-width: calc(100vw - 10vw);
}

.contact-sub {
  margin: 0 0 18px;
  color: var(--muted);
}

.privacy-page {
  padding-top: 72px;
  padding-bottom: 96px;
}

.privacy-copy {
  width: min(40rem, 100%);
}

.privacy-copy h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.85rem, 3.4vw, 2.45rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.privacy-copy h2 {
  margin: 28px 0 8px;
  font-size: 1.05rem;
}

.privacy-copy p,
.privacy-copy li {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.privacy-copy ul {
  margin: 0 0 10px;
  padding-left: 1.2rem;
}

.ref-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.my-fonts-panel {
  margin-bottom: 18px;
}

.my-fonts-panel .panel-heading {
  margin-bottom: 0.35rem;
}

.letter-map-archetypes {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}

.letter-map-archetypes li:not(.letter-map-archetype-empty) {
  border-top: 1px solid #ebe5da;
}

.letter-map-archetypes li:not(.letter-map-archetype-empty):last-child {
  border-bottom: 1px solid #ebe5da;
}

.letter-map-archetype {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.letter-map-archetype.is-current .letter-map-archetype-open,
.letter-map-archetype-open:hover {
  background: rgba(200, 109, 81, 0.04);
}

.letter-map-archetype-open {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.1rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.letter-map-archetype-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2c271f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.letter-map-archetype-marks {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.letter-map-archetype-marks img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: invert(23%) sepia(34%) saturate(1292%) hue-rotate(346deg) brightness(93%) contrast(88%);
}

.letter-map-archetype-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.letter-map-archetype-action {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #8c827d;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.letter-map-archetype-action:hover {
  color: #2c271f;
}

.letter-map-archetypes-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.7rem;
}

.letter-map-archetypes-foot:empty {
  display: none;
  background-color: #0e1820;
}

.letter-map-archetypes-foot .fonts-cap {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;

}

.letter-map-create {
  display: inline-flex;
  align-items: right;
  padding: 0 16px;
  text-decoration: underline;
  color: var(--accent-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 0px;
  background-color: transparent;
}

.letter-map-create:hover {
  color: var(--accent);

}

.letter-map-archetype-empty {
  margin: 0;
  padding: 0.35rem 0 0.15rem;
  border: 0;
  font-size: 0.8125rem;
  color: #8c827d;
}

.ref-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 1px 8px rgba(67, 59, 56, 0.05);
  text-align: left;
  cursor: pointer;
}

.ref-card:hover {
  background: #faf3ea;
}

.ref-card.selected {
  border-color: var(--accent);
  background: rgba(148, 69, 44, 0.08);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ref-card-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--alabaster);
  color: var(--walnut);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ref-card.selected .ref-card-tag {
  background: var(--accent);
  color: var(--accent-ink);
}

.ref-card-letters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ref-letter-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--paper);
}

.ref-glyph {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: brightness(0);
  pointer-events: none;
  user-select: none;
}

.ref-glyph-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: #111;
  font-size: 1.2rem;
  line-height: 1;
}

.ref-actions {
  margin-top: 20px;
  justify-content: flex-end;
}

.make-split {
  display: grid;
  gap: 24px;
  max-width: 720px;
}

.make-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.asemic-guide {
  display: grid;
  gap: 12px;
}

.asemic-guide h2 {
  margin: 2rem 0 0;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  color: var(--text);
}

.asemic-guide h2:first-child {
  margin-top: 0;
}

.asemic-guide p,
.asemic-guide li {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.asemic-guide .guide-lead {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.45;
}

.asemic-guide .guide-aside {
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 1.02rem;
}

.asemic-guide ul {
  margin: 0;
  padding-left: 1.25em;
  list-style: disc;
}

.asemic-guide li {
  display: list-item;
  margin: 0 0 8px;
}

.asemic-guide li:last-child {
  margin-bottom: 0;
}

.asemic-guide .guide-close {
  color: var(--text);
}

.guide-examples {
  margin: 4px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.example-thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4efe6;
  cursor: zoom-in;
  overflow: hidden;
}

.example-thumb:focus-visible {
  outline: 2px solid rgba(148, 69, 44, 0.7);
  outline-offset: 2px;
}

.guide-examples img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.upload-dialog {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.upload-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding-bottom: 16px;
}

.upload-dialog-panel .thumbs {
  margin: 12px 0 0;
}

.upload-dialog-panel .thumbs:empty {
  display: none;
}

.upload-dialog-panel .row-actions {
  margin-top: 12px;
  justify-content: flex-end;
}

.upload-dialog-panel .status {
  margin: 0;
  min-height: 0;
}

.upload-dialog-panel .status:empty {
  display: none;
}

#upload-status:empty {
  display: none;
}

#page-thumbs.thumbs:empty {
  display: none;
}

.upload-dialog-panel .panel-heading {
  align-items: center;
}

.upload-dialog-panel .panel-heading h2 {
  font-size: 18px;
}

.upload-dialog-panel p.howto {
  font-size: 14px;
}

.style-dialog-panel {
  width: min(920px, 100%);
}

.style-dialog-panel .ref-seed-count {
  margin-top: 12px;
}

.style-dialog-panel .ref-card-grid {
  max-height: min(52vh, 520px);
  overflow: auto;
  margin-top: 12px;
  padding-right: 4px;
}

.upload-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.upload-close:hover,
.upload-close:focus-visible {
  background: rgba(148, 69, 44, 0.12);
  color: var(--text);
}

.save-letters-panel {
  width: min(420px, 100%);
}

.pages-archive {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
}

.pages-archive.open {
  display: grid;
  place-items: center;
  padding: 24px;
}

.pages-archive-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.pages-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.pages-archive-item {
  margin: 0;
}

.pages-archive-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.pages-archive-item figcaption {
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(7, 32, 42, 0.84);
  cursor: pointer;
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: min(920px, 100%);
}

.lightbox-figure {
  margin: 0;
}

.lightbox-figure img {
  display: block;
  max-width: min(78vw, 820px);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e1820;
}

.lightbox-caption {
  margin-top: 10px;
  color: var(--accent-2);
  font-size: 0.88rem;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: -8px;
  right: 44px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.lightbox-nav {
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid rgba(148, 69, 44, 0.7);
  outline-offset: 2px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.choice-card {
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.choice-card:hover {
  border-color: var(--accent);
}

.choice-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.choice-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
}

.choice-card .choice-note {
  color: var(--accent-2);
  font-size: 0.88rem;
}

.choice-cta {
  margin-top: 8px;
  color: var(--accent-2);
  font-weight: 600;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.howto {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.howto li {
  margin-bottom: 8px;
}

p.howto {
  padding-left: 0;
}

.draw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.alphabet-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.9fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.library-stack,
.map-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.library-stack>.glyph-pane {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.library-stack {
  min-height: 0;
  overflow: hidden;
}

.library-stack>#glyph-source-pane,
.map-stack>.slots-panel {
  flex: 1 1 auto;
  min-height: 0;
}

.my-archetypes-panel,
.extract-glyphs-panel {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  margin-bottom: 0;
  min-width: 0;
}

.my-archetypes-panel .panel-heading,
.extract-glyphs-panel .panel-heading {
  align-items: right;
  margin-bottom: 0.35rem;
}

.my-archetypes-panel .panel-heading h2,
.extract-glyphs-panel .panel-heading h2 {
  margin: 0;
}

.my-archetypes-panel .letter-map-archetypes-foot {
  margin-top: auto;
  padding-top: 0.7rem;
}

.panel-fold {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8c827d;
  cursor: pointer;
}

.panel-fold:hover {
  background: rgba(44, 39, 31, 0.06);
  color: #2c271f;
}

.panel-fold .material-symbols-outlined {
  font-size: 22px;
}

.my-archetypes-panel.is-collapsed> :not(.panel-heading),
.extract-glyphs-panel.is-collapsed> :not(.panel-heading) {
  display: none;
}

.my-archetypes-panel.is-collapsed .panel-heading,
.extract-glyphs-panel.is-collapsed .panel-heading {
  margin-bottom: 0;
}

.extract-glyphs-panel .field:last-of-type {
  margin-bottom: 0;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.extract-page-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.field-label-row>span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-learn {
  border: 0;
  padding: 0;
  background: none;
  color: var();
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.field-learn:hover {
  color: #2c271f;
}

.extract-glyphs-panel .extract-create-row,
.glyph-make-archetypes .extract-create-row {
  justify-content: flex-end;
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 14px;
}

.extract-pick {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.extract-pick:focus-visible {
  outline: 2px solid rgba(148, 69, 44, 0.45);
  outline-offset: 1px;
}

.extract-pick-value {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.extract-pick-value.is-empty {
  color: var(--muted);
}

.extract-pick-value img {
  width: 36px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
}

.journal-layout {
  --journal-em: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.journal-layout>.panel,
.composer-shell,
.glyph-composer {
  min-width: 0;
  max-width: 100%;
}

.journal-save-status {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: left;
  color: var(--ink);
}

.journal-head {
  position: sticky;
  top: 100px;
  z-index: 40;
  background: var(--bg);
  padding: 12px 12px 12px 12px;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0px;
}

#view-journal {
  padding-top: 0;
  margin-top: 0;
}

.entries-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.entries-drawer.open {
  pointer-events: auto;
}

.entries-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(6, 14, 20, 0.55);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.entries-drawer.open .entries-backdrop {
  opacity: 1;
}

.entry-list-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 92vw);
  margin: 0;
  border-radius: 0;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.entries-drawer.open .entry-list-panel {
  transform: translateX(0);
}

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.alphabet-menu-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: auto;
  min-height: 46px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--alabaster);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.alphabet-menu-btn:focus-visible {
  outline: 2px solid rgba(148, 69, 44, 0.45);
  outline-offset: 1px;
}

.alphabet-menu-btn .material-symbols-outlined {
  font-size: 20px;
  color: var(--muted);
}

.alphabet-menu-list {
  z-index: 6;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  width: auto;
  margin: 0;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--accent-ink);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 12px 32px rgba(44, 37, 35, 0.12);
}

.alphabet-menu-list button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.alphabet-menu-list button:hover,
.alphabet-menu-list button[aria-selected="true"] {
  background: var(--accent-ink);
}


.hint,
.status {
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  min-height: 1.2em;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 132px;
  border: 1px dashed rgba(148, 69, 44, 0.35);
  border-radius: 12px;
  background: rgba(148, 69, 44, 0.08);
  cursor: pointer;
  text-align: center;
  padding: 18px;
}

.dropzone.dragover {
  border-color: var(--accent);
  border-color: var(--accent);
  background: rgba(148, 69, 44, 0.14);
}

.dropzone span {
  color: var(--muted);
  font-size: 0.88rem;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.thumbs img {
  width: 112px;
  height: 148px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}

.thumb-card {
  position: relative;
}

.thumb-close {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.94);
  color: var(--ink, #2a2118);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(42, 33, 24, 0.18);
}

.thumb-close:hover,
.thumb-close:focus-visible {
  background: #fff;
  color: var(--accent);
}

.draw-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.pen-tools,
.draw-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pen-btn {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--text);
  cursor: pointer;
}

.pen-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: #ffdbd0;
  color: var(--accent);
}

.draw-page {
  --grid-cell: 28px;
  --sq-mid: rgba(70, 80, 90, 0.4);
  width: 100%;
  position: relative;
  background-color: #f3eee3;
  border: 1px solid rgba(16, 34, 44, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

.draw-page.is-square-grid {
  --sq: rgba(120, 130, 140, 0.14);
  background-image:
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--sq-mid) calc(50% - 0.5px), var(--sq-mid) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--sq-mid) calc(50% - 0.5px), var(--sq-mid) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--sq) calc(50% - 0.5px), var(--sq) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--sq) calc(50% - 0.5px), var(--sq) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  background-size: 100% 100%, 100% 100%, var(--grid-cell) var(--grid-cell), var(--grid-cell) var(--grid-cell);
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}

#draw-canvas {
  display: block;
  position: relative;
  z-index: 2;
  width: 100%;
  height: min(68vh, 720px);
  background: transparent;
  cursor: crosshair;
  touch-action: none;
}

.draw-tips summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-2);
}

.draw-tips ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.draw-tips li {
  margin-bottom: 10px;
}

.draw-tips li:last-child {
  margin-bottom: 0;
}

.hoard {
  display: grid;
  gap: 10px;
}

.hoard {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  min-height: 180px;
}

.hoard-empty {
  grid-column: 1 / -1;
  margin: 0;
  white-space: nowrap;
}

.letter-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, 112px);
  row-gap: 16px;
  justify-content: space-between;

}

.letter-slots .slot {
  width: 112px;
  height: 112px;
  max-width: 112px;
  aspect-ratio: 1 / 1;
}

.glyph-card,
.slot {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.glyph-card {
  cursor: pointer;
  aspect-ratio: 1;
  min-height: 92px;
}

.glyph-card.is-bank,
.slot.filled img {
  cursor: grab;
  touch-action: none;
}

.glyph-card.is-bank {
  cursor: grab;
}

body.is-glyph-dragging,
body.is-glyph-dragging * {
  cursor: grabbing;
}

.slot.is-drop,
#glyph-source-pane.is-drop {
  outline: 2px solid var(--cinnabar);
  outline-offset: 2px;
}

.glyph-drag-ghost {
  position: fixed;
  z-index: 80;
  width: 72px;
  height: 72px;
  margin: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(44, 37, 35, 0.16);
}

.glyph-drag-ghost img {
  display: block;
  width: 78%;
  height: 78%;
  margin: 11% auto 0;
  object-fit: contain;
  filter: brightness(0) invert(28%) sepia(48%) saturate(1400%) hue-rotate(346deg) brightness(0.92);
}

body.is-custom-ink .slot img,
body.is-custom-ink .glyph-card img,
body.is-custom-ink .glyph-drag-ghost img,
body.is-custom-ink .letter-map-archetype-marks img {
  filter: var(--glyph-ink-filter);
}

.glyph-card img,
.slot img {
  width: 92%;
  height: calc(100% * 280 / 392);
  margin-bottom: calc(100% * 112 / 392);
  object-fit: contain;
  object-position: bottom center;
  align-self: end;
  transform: translateY(calc(var(--glyph-hang, 0) * 100% * 112 / 280));
  filter: brightness(0) invert(28%) sepia(48%) saturate(1400%) hue-rotate(346deg) brightness(0.92);
}

.slot {
  width: 112px;
  height: 112px;
  min-height: 112px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  justify-items: center;
  padding: 6px 8px 8px;
  box-sizing: border-box;
}

.slot img {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  justify-self: center;
  width: 92%;
  height: calc(100% * 280 / 392);
  min-height: 0;
  max-height: none;
  margin-top: 0;
  margin-bottom: calc(100% * 112 / 392);
  object-position: bottom center;
}

.slot.filled {
  border-color: var(--cinnabar);
}

.slot-key {
  position: static;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--ink);
}

.slot-edit {
  position: static;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  z-index: 1;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.slot-edit:hover {
  color: var(--cinnabar);
}

.slot.editing {
  outline: 2px solid var(--cinnabar);
  outline-offset: 2px;
}

.glyph-swap {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  gap: 0;
  transition: gap 420ms ease;
}

.glyph-swap.is-editing {
  gap: 16px;
  margin-bottom: 18px;
}

.glyph-pane {
  min-height: 0;
}

#glyph-source-pane {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#glyph-source-pane>.panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#glyph-source-pane .panel-heading,
.slots-panel .panel-heading {
  align-items: center;
  margin-top: 0;
}

.slots-panel .panel-heading .hint {
  margin-top: 0;
}

#glyph-source-pane .panel-heading h2,
.slots-panel .panel-heading h2 {
  margin: 0;
  line-height: 1.2;
}

#glyph-source-pane #pair-hint {
  margin: 0 0 12px;
}

#glyph-source-pane .hoard {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(60vh, 560px);
  overflow: auto;
  align-content: start;
  justify-content: start;
  grid-template-columns: repeat(auto-fill, var(--glyph-box-w, 112px));
  grid-auto-rows: var(--glyph-box-h, 112px);
  justify-content: space-between;
  row-gap: 16px;
  padding: 0;
}

.hoard-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#glyph-source-pane .hoard .glyph-card {
  width: var(--glyph-box-w, 112px);
  height: var(--glyph-box-h, 112px);
  min-height: var(--glyph-box-h, 112px);
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  justify-items: center;
  padding: 6px 8px 8px;
}

#glyph-source-pane .hoard .glyph-card img {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  justify-self: center;
  width: 92%;
  height: calc(100% * 280 / 392);
  min-height: 0;
  max-height: none;
  margin-top: 0;
  margin-bottom: calc(100% * 112 / 392);
  object-position: bottom center;
}

#glyph-source-pane .hoard .glyph-remove {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  z-index: 1;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

#glyph-source-pane .hoard .glyph-remove:hover {
  color: var(--cinnabar);
}

#glyph-source-pane .hoard .glyph-card.editing {
  outline: 2px solid var(--cinnabar);
  outline-offset: 2px;
}

#letter-edit-pane {
  flex: 0 0 auto;
  max-height: 1200px;
  opacity: 1;
  overflow: hidden;
  transform: none;
}

#letter-edit-p {
  color: var(--muted);
  font-size: 14px;
}

.letter-edit {
  color: var(--ink);
  padding-bottom: 14px;
}

.letter-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.letter-edit-head h2 {
  margin: 0;
}

.letter-edit .letter-edit-fold,
.letter-edit .letter-edit-fold[aria-expanded="true"] {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.letter-edit-fold .fold-down {
  display: none;
}

.letter-edit.is-collapsed .letter-edit-fold .fold-up {
  display: none;
}

.letter-edit.is-collapsed .letter-edit-fold .fold-down {
  display: block;
}

.letter-edit.is-collapsed .letter-edit-work,
.letter-edit.is-collapsed .letter-edit-toolbar,
.letter-edit.is-collapsed .letter-edit-stage,
.letter-edit.is-collapsed #strokes-slide,
.letter-edit.is-collapsed .row-actions,
.letter-edit.is-collapsed .status {
  display: none;
}

.letter-edit.is-collapsed {
  padding-bottom: 4px;
}

.letter-edit.is-collapsed .letter-edit-head {
  margin-bottom: 0;
}

.letter-edit .row-actions {

  justify-content: flex-end;
  gap: 8px;
}

.letter-edit #letter-edit-save {
  box-sizing: border-box;
  width: auto;
  margin: 5px 0 5px auto;
  text-align: center;
}

.letter-edit .status {
  margin: 0;
}

.letter-edit .status:empty {
  display: none;
}

.letter-edit-work {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.letter-edit-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 8px;
  margin: 0;
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
}

.letter-edit-tools {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.letter-edit .tool-submenu {
  top: 0;
  left: calc(100% + 6px);
}

.tool-pop {
  position: relative;
}

.tool-submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 4;
  display: grid;
  gap: 2px;
  min-width: 108px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  box-shadow: 0 8px 22px rgba(40, 24, 16, 0.14);
}

.thickness-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  padding: 7px 8px;
  cursor: pointer;
}

.thickness-opt[aria-pressed="true"] {
  background: #ffdbd0;
  color: var(--cinnabar);
}

#brush-list,
#pencil-list {
  min-width: 220px;
  max-height: 228px;
  overflow: auto;
  align-content: start;
}

.brush-group-label {
  margin: 8px 4px 2px;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.04em;
  color: #7a6558;
}

.brush-group-label:first-child {
  margin-top: 2px;
}

.brush-grid {
  display: grid;
  grid-template-columns: repeat(4, 46px);
  gap: 4px;
}

.brush-opt {
  width: 46px;
  height: 46px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.brush-opt img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.brush-opt[aria-pressed="true"] {
  background: #ffdbd0;
}

.thickness-mark {
  width: 42px;
  border-radius: 999px;
  background: currentColor;
}

.eraser-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.eraser-mark span {
  border-radius: 50%;
  background: currentColor;
}

.shape-list {
  grid-template-columns: 1fr 1fr;
  min-width: 0;
  gap: 4px;
}

.shape-opt {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.shape-opt svg {
  width: 18px;
  height: 18px;
  display: block;
}

.shape-opt[aria-pressed="true"] {
  border-color: var(--cinnabar);
  background: #ffdbd0;
  color: var(--cinnabar);
}

.tool-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.tool-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.color-swatch,
.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #94452c;
  box-shadow: inset 0 0 0 1px rgba(40, 24, 16, 0.28);
}

.color-custom {
  cursor: pointer;
}

.color-custom input[type="color"] {
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tool-pen-icon {
  width: 18px;
  height: 18px;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("assets/pen-tool.png?v=1") center / contain no-repeat;
  mask: url("assets/pen-tool.png?v=1") center / contain no-repeat;
}

.tool-rotate-icon {
  width: 18px;
  height: 18px;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("assets/rotate-right.png?v=1") center / contain no-repeat;
  mask: url("assets/rotate-right.png?v=1") center / contain no-repeat;
}

.tool-expand-icon {
  width: 18px;
  height: 18px;
  display: block;
  background-color: currentColor;
  -webkit-mask: url("assets/expand.png") center / contain no-repeat;
  mask: url("assets/expand.png") center / contain no-repeat;
}

.tool-btn[aria-pressed="true"],
.tool-btn[aria-expanded="true"] {
  border-color: var(--cinnabar);
  background: #ffdbd0;
  color: var(--cinnabar);
}

.tool-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.tool-btn-sep {
  width: 22px;
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.letter-edit-stage[data-tool="brush"] #letter-edit-canvas {
  cursor: crosshair;
}

.letter-edit-stage[data-tool="eraser"] #letter-edit-canvas {
  cursor: none;
}

.eraser-cursor {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 1.5px solid var(--cinnabar);
  border-radius: 50%;
  background: rgba(148, 69, 44, 0.16);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
}

.letter-edit-stage[data-tool="eraser"] .eraser-cursor.is-on {
  display: block;
}

.letter-edit-stage[data-tool="cursor"] #letter-edit-canvas {
  cursor: default;
}

.rotate-readout {
  position: absolute;
  z-index: 4;
  top: 6px;
  left: 10px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 560;
  line-height: 1;
  color: #94452c;
  pointer-events: none;
}

.letter-edit-stage[data-tool="pen"] #letter-edit-canvas,
.letter-edit-stage[data-tool="shape"] #letter-edit-canvas {
  cursor: crosshair;
}

@media (prefers-reduced-motion: reduce) {

  .glyph-swap,
  #letter-edit-pane {
    transition: none;
  }
}

.draw-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

#layers-slide {
  align-self: stretch;
  flex: 0 0 168px;
  width: 168px;
}

#strokes-slide {
  margin-top: 10px;
}

.draw-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 42px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.draw-panel-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0;
}

.draw-panel-body {
  min-height: 0;
  overflow: auto;
}

#layers-slide .draw-panel-body {
  flex: 1 1 auto;
}

#strokes-slide .draw-panel-body {
  max-height: 210px;
}

.stroke-menu {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 10px 0;
}

.stroke-menu button {
  flex: 0 0 auto;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  line-height: 1.3;
  cursor: pointer;
}

.stroke-menu button[aria-pressed="true"] {
  background: #ffdbd0;
  border-color: transparent;
  color: var(--cinnabar);
}

.stroke-examples {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 10px;
}

.stroke-example {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.stroke-example canvas {
  display: block;
  width: 56px;
  height: 56px;
}

.stroke-example:hover {
  border-color: var(--cinnabar);
}

#letter-layer-add {
  width: 26px;
  height: 26px;
}

.layer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 42px;
  padding: 0 8px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}

.draw-slide-empty {
  margin: 0;
  padding: 8px 12px 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.layer-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 8px;
}

.layer-row {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.layer-list {
  user-select: none;
}

.layer-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.layer-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.layer-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-rename {
  flex: 0 0 auto;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.layer-rename svg {
  width: 14px;
  height: 14px;
}

.layer-rename:hover {
  background: rgba(44, 37, 35, 0.08);
}

.layer-name-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  user-select: text;
}

.layer-preview {
  display: block;
  width: 100%;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.layer-row.is-selected {
  background: #ffdbd0;
  color: var(--cinnabar);
}

.letter-edit-stage {
  --grid-cell: 28px;
  --sq-mid: rgba(90, 70, 55, 0.42);
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  overflow: hidden;
  z-index: 1;
}

.stage-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 42px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: relative;
  z-index: 4;
}

.stage-sheet {
  --line-top: 6%;
  --line-bottom: 96%;
  --line-x2: 26%;
  --line-x3: 74%;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: #e4dcd0;
}

.sheet-field {
  position: absolute;
  z-index: 0;
  left: var(--line-x2);
  top: var(--line-top);
  width: calc(var(--line-x3) - var(--line-x2));
  height: calc(var(--line-bottom) - var(--line-top));
  background: #fff;
  pointer-events: none;
}

.letter-edit-stage.is-square-grid .sheet-field {
  --sq: oklch(from var(--bg) 0.84 0.028 h / 22%);
  background-color: #fff;
  background-image:
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--sq-mid) calc(50% - 0.5px), var(--sq-mid) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--sq-mid) calc(50% - 0.5px), var(--sq-mid) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--sq) calc(50% - 0.5px), var(--sq) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--sq) calc(50% - 0.5px), var(--sq) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  background-size: 100% 100%, 100% 100%, var(--grid-cell) var(--grid-cell), var(--grid-cell) var(--grid-cell);
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}

.inline-grid {
  --line-top: 6%;
  --line-mean: 31%;
  --line-base: 69%;
  --line-bottom: 96%;
  --line-x1: 11%;
  --line-x2: 26%;
  --line-x3: 74%;
  --line-x4: 89%;
  --ink-line: var(--sq-mid);
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--ink-line), var(--ink-line)),
    linear-gradient(var(--ink-line), var(--ink-line)),
    linear-gradient(var(--ink-line), var(--ink-line)),
    linear-gradient(var(--ink-line), var(--ink-line)),
    linear-gradient(var(--ink-line), var(--ink-line)),
    linear-gradient(var(--ink-line), var(--ink-line));
  background-size:
    100% 1px,
    100% 1px,
    100% 1px,
    100% 1px,
    1px 100%,
    1px 100%;
  background-position:
    0 calc(var(--line-top) - 0.5px),
    0 calc(var(--line-mean) - 0.5px),
    0 calc(var(--line-base) - 0.5px),
    0 calc(var(--line-bottom) - 0.5px),
    calc(var(--line-x2) - 0.5px) 0,
    calc(var(--line-x3) - 0.5px) 0;
}

.inline-grid[hidden] {
  display: none;
}

.band-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.band-label {
  position: absolute;
  left: 0;
  width: 28px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  cursor: default;
}

.band-label::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1600px;
  background: rgba(217, 126, 99, 0.13);
  opacity: 0;
  pointer-events: none;
}

.band-label:hover::before {
  opacity: 1;
}

.band-name {
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  text-decoration: underline;
}

.band-label:hover .band-name {
  color: var(--ink);
}

.band-ascender {
  top: var(--line-top);
  height: calc(var(--line-mean) - var(--line-top));
}

.band-body {
  top: var(--line-mean);
  height: calc(var(--line-base) - var(--line-mean));
}

.band-descender {
  top: var(--line-base);
  height: calc(var(--line-bottom) - var(--line-base));
}

.band-preview {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: flex-end;
  gap: 4px;
  padding: 4px 10px 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(40, 24, 16, 0.12);
  pointer-events: none;
}

.band-label:hover .band-preview {
  display: flex;
}

.part-letter {
  position: relative;
  display: block;
  font-family: var(--display);
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
  color: rgba(44, 37, 35, 0.22);
}

.part-letter::after {
  content: attr(data-char);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cinnabar);
}

.band-ascender .part-letter::after {
  clip-path: inset(0 0 77% 0);
}

.band-descender .part-letter::after {
  clip-path: inset(77% 0 0 0);
}

#letter-edit-canvas {
  display: block;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 440px;
  touch-action: none;
  cursor: crosshair;
  clip-path: inset(var(--line-top) calc(100% - var(--line-x3)) calc(100% - var(--line-bottom)) var(--line-x2));
}

.upload-only {
  max-width: 640px;
}

.slots-panel {
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.slots-panel #letter-slots {
  flex: 1 1 auto;
}

.slots-panel #seal-status {
  margin: 8px 0 0;
}

.slots-panel #seal-status:empty {
  display: none;
}

.slots-panel .seal-row {
  margin-top: auto;
  justify-content: flex-end;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  background: var(--panel);
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.entries-latin {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
}

.entries-latin input {
  appearance: none;
  width: 36px;
  height: 22px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}

.entries-latin input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.entries-latin input:checked {
  background: var(--accent);
}

.entries-latin input:checked::after {
  transform: translateX(14px);
}

.entries-latin input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.entry-list button {
  width: 100%;
  text-align: left;
  background: var(--alabaster);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.entry-list button.active {
  border-color: var(--accent);
}

.entry-title-script {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
}

.entry-title-script.is-latin {
  display: block;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-title-script img {
  height: 1.2em;
  width: auto;
  max-width: 1.6em;
  object-fit: contain;
  filter: brightness(0) invert(28%) sepia(48%) saturate(1400%) hue-rotate(346deg) brightness(0.92);
}

.entry-list small {
  display: block;
  color: var(--muted);
  margin-top: 0;
}

.entry-search {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 14px;
  position: relative;
  z-index: 2;
}

.entry-search-pick {
  position: relative;
  flex: 0 0 auto;
}

.entry-search-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0 10px 10px 0;
  background: var(--alabaster);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.entry-search-mode:hover,
.entry-search-pick.is-open .entry-search-mode {
  border-color: var(--accent-2);
}

.entry-search-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  width: 100%;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(40, 24, 16, 0.1);
}

.entry-search-menu button {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.entry-search-menu button:hover,
.entry-search-menu button[aria-selected="true"] {
  background: rgba(148, 69, 44, 0.12);
}

.entry-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 42px;
  background: var(--alabaster);
  border: 1px solid var(--line);
  border-radius: 10px 0 0 10px;
  padding: 0 12px;
  font: inherit;
  color: var(--text);
}

.entry-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--oatmeal);
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.4;
}

.journal-tags {
  margin-top: 4px;
}

.tag-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  background: var(--alabaster);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.tag-editor:focus-within {
  outline: 2px solid rgba(148, 69, 44, 0.4);
  outline-offset: 1px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag-list:empty {
  display: none;
}

.tag-list li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--oatmeal);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.2;
}

.tag-remove {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 4px;
  font: inherit;
  line-height: 1;
}

.field .tag-input {
  flex: 1 1 140px;
  min-width: 140px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 6px 4px;
  outline: none;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field>span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input:not(.glyph-composer-src),
.field textarea:not(.glyph-composer-src) {
  border-radius: 10px;
  padding: 12px 14px;
}


.field textarea:not(.glyph-composer-src) {
  font-size: 1.02rem;
  line-height: 1.55;

}

.composer-shell {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.composer-shell:focus-within {
  outline: none;
}

.composer-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #faf6f1;
  border-radius: 10px;
  margin-bottom: 22px;
}

.composer-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.composer-menu svg {
  stroke-width: 1.05;
}

.composer-tool svg {
  width: 22px;
  height: 22px;
}

.composer-tool svg.icon-numbers {
  width: 28px;
  height: 28px;
}

.composer-tool:hover,
.composer-pick.is-open .composer-tool {
  border-color: var(--accent-2);
  color: var(--accent);
}

.composer-pick-btn.composer-tool {
  max-width: none;
  padding: 0;
}

.composer-pick {
  position: relative;
}

.composer-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  max-width: 220px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.composer-pick-btn:hover,
.composer-pick.is-open .composer-pick-btn {
  border-color: var(--accent-2);
}

.composer-pick-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-pick-caret {
  width: 10px;
  height: 7px;
  flex: 0 0 auto;
}

.composer-pick-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 8;
  min-width: 100%;
  max-height: 240px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(40, 24, 16, 0.1);
}

.composer-pick-list button {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.composer-pick-list button:hover,
.composer-pick-list button[aria-selected="true"] {
  background: #fff8f5;
  color: var(--accent);
}

.paper-swatch {
  display: block;
  width: 16px;
  height: 22px;
  border-radius: 1px;
  background-color: #f7f5f2;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(40, 24, 16, 0.22);
}

#journal-paper-menu {
  display: flex;
  gap: 6px;
  min-width: max-content;
  padding: 8px;
}

#journal-paper-menu button,
#journal-paper-menu button:hover,
#journal-paper-menu button[aria-selected="true"] {
  width: 28px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(40, 24, 16, 0.2);
}

#journal-paper-menu button[aria-selected="true"] {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.journal-color-swatch {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #94452c;
  box-shadow: inset 0 0 0 1px rgba(40, 24, 16, 0.25);
}

#journal-color-menu {
  width: 292px;
  padding: 10px;
  overflow: visible;
}

.journal-rgb-panel {
  display: grid;
  gap: 9px;
}

.journal-palette {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 8px;
  height: 160px;
}

.journal-color-field {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(40, 24, 16, 0.18);
  border-radius: 12px;
  background-color: hsl(var(--journal-color-hue, 14) 100% 50%);
  background-image:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, transparent);
  cursor: crosshair;
  touch-action: none;
}

.journal-color-marker {
  position: absolute;
  left: 100%;
  top: 0;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.journal-color-hue {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  position: relative;
  height: 160px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(40, 24, 16, 0.18);
  border-radius: 4px;
  background: linear-gradient(to bottom, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  cursor: pointer;
  touch-action: none;
}

.journal-color-hue::after {
  position: absolute;
  top: var(--journal-hue-position, 4%);
  left: 50%;
  width: 14px;
  height: 7px;
  border: 1px solid #fff;
  border-radius: 2px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.journal-rgb-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.journal-rgb-inputs label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.journal-rgb-inputs input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

#journal-size-menu,
#journal-align-menu,
#journal-leading-menu,
#journal-tracking-menu {
  left: 50%;
  transform: translateX(-50%);
}

#journal-size-menu button,
#journal-align-menu button,
#journal-leading-menu button,
#journal-tracking-menu button {
  text-align: center;
}

.glyph-composer {
  position: relative;
  min-height: 280px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.journal-layout .field:has(#title-label) {
  display: none;
}

.composer-shell .glyph-composer {
  width: 100%;
  aspect-ratio: 210 / 297;
  margin: 0;
  min-height: 0;
  border: 0;
  border-radius: 1px;
  overflow: auto;
  box-shadow:
    0 1px 2px rgba(40, 24, 16, 0.08),
    0 16px 36px rgba(40, 24, 16, 0.16);
  background-color: #f7f5f2;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.composer-shell .glyph-composer-face {
  min-height: 100%;
  padding: 9% 10% 12%;
  box-sizing: border-box;
}

.journal-layout.is-latin .composer-shell .glyph-composer-src {
  min-height: 100%;
  height: auto;
  padding: 9% 10% 12%;
  box-sizing: border-box;
  background: transparent;
}

#entry-composer[data-ink="light"] .glyph-composer-face .glyph.is-upper img,
#entry-composer[data-ink="light"] .glyph-composer-face .glyph.is-lower img {
  filter: brightness(0) invert(1);
}

.journal-layout.is-latin #entry-composer[data-ink="light"] .glyph-composer-src {
  color: #f4f1ea;
}

#entry-composer[data-color="custom"] .glyph-composer-face .glyph img,
#entry-composer[data-color="custom"] .glyph-composer-face .glyph.is-upper img,
#entry-composer[data-color="custom"] .glyph-composer-face .glyph.is-lower img {
  filter: var(--journal-ink-filter);
}

#entry-composer[data-color="custom"] .glyph-composer-face,
#entry-composer[data-color="custom"] .list-mark {
  color: var(--journal-ink);
}

.journal-layout.is-latin #entry-composer[data-color="custom"] .glyph-composer-src {
  color: var(--journal-ink);
}

.glyph-composer-title {
  min-height: 0;
}

.glyph-composer-title .glyph-composer-face {
  min-height: calc(1.35em + 16px);
  padding: 8px 14px;
  text-align: left;
}

.glyph-composer:focus-within {
  outline: 2px solid rgba(148, 69, 44, 0.4);
  outline-offset: 1px;
}

.composer-shell .glyph-composer:focus-within {
  outline: none;
}

.glyph-composer-src {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.journal-layout.is-latin .glyph-composer-face {
  display: none;
}

.journal-layout.is-latin .glyph-composer-src {
  position: static;
  width: 100%;
  height: 100%;
  min-height: inherit;
  opacity: 1;
  overflow: auto;
  pointer-events: auto;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.55;
  letter-spacing: calc((var(--journal-tracking, 0.5) - 0.5) * 0.22em);
  padding: 14px 16px;
  resize: none;
}

.journal-layout.is-latin .glyph-composer-title .glyph-composer-src {
  min-height: calc(1.35em + 16px);
  height: auto;
  padding: 8px 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: calc(1.15em + (var(--journal-leading, 1) - 0.5) * 0.4em);
}

.btn-secondary[aria-pressed="true"] {
  border-color: var(--accent-2);
  color: var(--accent);
  background: #fff8f5;
}

.glyph-composer-face {
  min-height: 280px;
  padding: 10px 16px 28px;
  display: block;
  line-height: 2.4em;
  cursor: text;
  overflow: visible;
  user-select: none;
}

.glyph-composer-title .glyph-composer-face {
  min-height: calc(1.35em + 16px);
  padding: 8px 14px;
  line-height: 1;
}

.glyph-composer-face .word {
  display: inline;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  margin: 0;
}

#entry-composer .glyph-composer-face .word {
  display: contents;
}

.glyph-composer-face .break {
  display: block;
  height: 2.4em;
}

.glyph-composer-title .glyph-composer-face .break {
  height: calc((var(--journal-leading, 1) - 0.5) * 0.4em);
}

.glyph-composer-face .glyph {
  display: inline-block;
  position: relative;
  width: auto;
  height: 1.42em;
  vertical-align: baseline;
  overflow: visible;
}

.glyph-composer-face .glyph.is-lower {
  height: 0.96em;
}

.glyph-composer-face .glyph img {
  display: block;
  width: auto;
  max-width: 1.7em;
  object-fit: contain;
  pointer-events: none;
  filter: brightness(0) invert(28%) sepia(48%) saturate(1400%) hue-rotate(346deg) brightness(0.92);
}

.glyph-composer-face .is-selected {
  background: rgba(148, 69, 44, 0.22);
  border-radius: 3px;
}

.glyph-composer-face .glyph.is-upper img {
  height: 1.42em;
  object-position: bottom center;
}

.glyph-composer-face .glyph.is-lower img {
  height: 0.96em;
  object-position: bottom center;
}

.glyph-composer-title .glyph-composer-face .glyph,
.glyph-composer-title .glyph-composer-face .glyph-caret,
.glyph-composer-title .glyph-composer-face .glyph-space {
  vertical-align: middle;
}

.glyph-composer-title .glyph-composer-face .glyph {
  height: 1.24em;
}

.glyph-composer-title .glyph-composer-face .glyph.is-lower {
  height: 0.84em;
}

.glyph-composer-title .glyph-composer-face .glyph.is-upper img {
  height: 1.24em;
}

.glyph-composer-title .glyph-composer-face .glyph.is-lower img {
  height: 0.84em;
  object-position: bottom center;
}

.glyph-space {
  display: inline-block;
  width: 0.42em;
  min-width: 18px;
  height: 1em;
  vertical-align: baseline;
}

.glyph-caret {
  display: inline-block;
  width: 2px;
  height: 1.35em;
  margin: 0 1px;
  vertical-align: baseline;
  background: var(--accent);
  border-radius: 1px;
  animation: glyph-caret 1s step-end infinite;
}

@keyframes glyph-caret {
  50% {
    opacity: 0;
  }
}

.composer-placeholder {
  margin: 0;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.pillars {
  padding: 24px 2.5rem 64px;
  background: var(--paper);
}

.pillars-intro {
  margin: 0 0 28px;
  text-align: center;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-kicker-sage {
  color: var(--sage);
}

.pillars h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto auto;
  gap: 10px 18px;
}

.pillar-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  justify-items: center;
  align-content: start;
  text-align: center;
  padding: 24px;
  border-radius: 20px;
  background: var(--alabaster);
  box-shadow: 0 1px 8px rgba(67, 59, 56, 0.05);
}

.pillar-card-alt {
  background: var(--oatmeal);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--paper);
  color: var(--accent);
  font-size: 26px;
}

.pillar-index {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pillar-card h3 {
  margin: 0;
}

.pillar-card p {
  margin: 0;
  color: #433b38;
}

.process-intro-center,
header.home-intro {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}


.home-intro-p {
  margin: 0;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h5.home-intro {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.5;
}



.cipher-bg,
.seal-bg {
  --spin: 0deg;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118%;
  height: auto;
  transform: translate(-50%, -50%) rotate(var(--spin));
  pointer-events: none;
  z-index: 0;
}


.seal-bg-b {
  width: 132%;
}


.process>.homedemo {
  margin-top: 0;
  margin-bottom: 0;
}

.process>.seal-row {
  padding-right: 0;
  padding-left: 0;
  background: transparent;
}

#home-logout>.cipher-block {
  padding: 8px 2.5rem 64px;
}

.homedemo {
  margin: 0;
  color: #433b38;
}

.homedemo h3 {
  margin: 0 0 8px;
}

.homedemo p {
  margin: 0;
  color: #fffefd;
}

.demoinput {
  display: grid;
  gap: 10px;
}

.demoinput input {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--paper);
  box-shadow: 0 1px 6px rgba(67, 59, 56, 0.06);
  font: inherit;
  color: inherit;
}

.demo-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(250, 246, 238, 0.9);
}

.demo-ribbon>p,
.demo-ribbon>h4 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#output-in-glyphs {
  display: block;
  min-width: 0;
  text-align: right;
  color: var(--accent);
  font-family: "Dochet Script", var(--display);
  font-size: 1.45rem;
  font-style: normal;
  line-height: 1.35;
  letter-spacing: 0.02em;
  word-break: break-word;
}

#output-in-glyphs img {
  width: auto;
  height: 22px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

#output-in-glyphs.is-mapped {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.cipher-space {
  width: 0.45em;
  min-width: 16px;
  display: inline-block;
}

.atelier-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.atelier-path .material-symbols-outlined {
  font-size: 18px;
  color: var(--accent);
}

.atelier-flow {
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
  font-family: var(--display);
  font-style: italic;
}

.path-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f8ebe5;
}

.path-chip {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

#alphabet-map .glyph-swap,
#alphabet-map .glyph-make-archetypes,
#alphabet-map #glyph-make-extract {
  display: none;
}

#alphabet-map.is-make-draw .glyph-swap {
  display: flex;
}

#alphabet-map.is-make-extract #glyph-make-extract,
#alphabet-map.is-make-archetypes .glyph-make-archetypes {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.path-chip .path-lock {
  font-size: 14px;
  display: none;
}

.path-chip.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.path-chip.is-locked .path-lock {
  display: inline-block;
}

.path-chip.is-current {
  background: var(--accent);
  color: var(--accent-ink);
}

#step-lock-hint {
  min-height: 1.2em;
  margin: 4px 0 0;
}

.ref-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.ref-seed-count {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--alabaster);
  color: var(--muted);
  font-size: 0.85rem;
}

.ref-seed-count strong {
  color: var(--accent);
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}

.icon-btn .material-symbols-outlined {
  font-size: 18px;
}

.studio-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.8rem;
  color: var(--muted);
}

.step-now {
  color: var(--ink);
  font-weight: 600;
}

.step-next {
  color: var(--accent);
}

.memory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.memory-layout.key-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.memory-layout>.panel {
  height: 100%;
}

#match-layout>.panel:first-child>.panel-heading {
  justify-content: flex-end;
}

.btn-show-match-key {
  background-color: transparent;
  color: var(--accent-2);
  text-decoration: underline;
  border: 0;
  font-size: 16px;
}

.btn-show-match-key:hover {
  color: var(--text);
  cursor: pointer;
}

.match-key {
  min-height: 100%;
}

.match-key-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 12px;
}

.match-key-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-key .match-latin {
  cursor: default;
}

.progress-card {
  min-width: 240px;
  align-items: right;
  padding: 14px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 1px 8px rgba(67, 59, 56, 0.05);
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.progress-bar {
  margin: 10px 0 6px;
  height: 8px;
  border-radius: 999px;
  background: #f3e6e0;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent-2);
  border-radius: inherit;
}

.workshop-head .progress-card {
  max-width: 320px;
  margin-top: 8px;
}

.match-board {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 140px;
  justify-content: start;
  align-items: start;
  margin: 20px 0;
}

.match-target-pair {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 6px;
}

.match-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.match-slot.is-over {
  border-color: var(--accent);
  background: rgba(148, 69, 44, 0.1);
}

.match-tile,
.match-slot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.match-latin {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: grab;
}

.match-latin.is-dragging {
  opacity: 0.4;
}

.match-slot {
  border-style: dashed;
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
}

.match-slot.is-filled {
  border-style: solid;
  background: rgba(148, 69, 44, 0.08);
}

.match-glyph img {
  width: auto;
  height: 26px;
  object-fit: contain;
  filter: brightness(0);
}

.draw-prompt {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.draw-prompt strong {
  font-size: 1.8rem;
}

.recall-word {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 80px;
  margin: 8px 0 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--paper);
}

.recall-word img {
  width: auto;
  height: 42px;
  object-fit: contain;
  filter: brightness(0);
}

.flashcard {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 16px;
  background: #fdfbf7;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(67, 59, 56, 0.05);
  padding: 28px 20px;
}

.flash-latin {
  display: block;
  font-family: var(--display);
  font-size: 3.4rem;
  font-weight: 600;
  color: var(--ink);
}

.flash-hint {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

#card-glyph {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  object-fit: contain;
}

.memory-roster {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.roster-tile {
  position: relative;
  min-height: 64px;
  border: 0;
  border-radius: 10px;
  background: var(--alabaster);
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.roster-tile span {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
}

.roster-tile img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.roster-tile.is-current {
  background: #ffdbd0;
  outline: 2px solid var(--accent);
}

.roster-tile.is-empty {
  opacity: 0.45;
  cursor: not-allowed;
}

.roster-tile.is-mastered span {
  color: var(--sage);
}

.trace-wrap {
  position: relative;
  height: 200px;
  border-radius: 14px;
  background: #fdfbf7;
  overflow: hidden;
}

#strokeCanvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.ghost-guide {
  position: absolute;
  inset: 20%;
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.18;
  pointer-events: none;
}

.blindfold-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.blindfold-label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.88rem;
}

.journal-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.journal-layout .glyph-composer-face,
.journal-layout.is-latin .glyph-composer-src {
  font-size: var(--journal-em, 16px);
}

.journal-layout .glyph-composer-face .glyph {
  margin-right: calc((var(--journal-tracking, 0.5) - 0.5) * 0.42em);
}

#entry-composer .glyph-composer-face {
  line-height: 1;
  text-align: var(--journal-align, left);
}

.journal-layout.is-latin #entry-body {
  line-height: calc(1.15em + (var(--journal-leading, 1) - 0.5) * 0.4em);
  text-align: var(--journal-align, left);
}

#entry-composer .glyph-composer-face .break {
  height: calc((var(--journal-leading, 1) - 0.5) * 0.4em);
}

#entry-composer .script-line,
.glyph-composer-title .script-line {
  line-height: 1;
}

.script-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
  white-space: normal;
}

#entry-composer {
  --glyph-rise: 1.56em;
  --glyph-drop: calc(var(--glyph-rise) * 112 / 280);
}

#entry-composer .script-line {
  align-items: flex-end;
  justify-content: var(--journal-align, left);
  row-gap: calc(var(--glyph-drop) + (var(--journal-leading, 1) - 0.5) * 0.4em);
  padding-bottom: var(--glyph-drop);
}

#entry-composer .glyph-composer-face .glyph,
#entry-composer .glyph-composer-face .glyph.is-lower {
  height: var(--glyph-rise);
}

#entry-composer .glyph-composer-face .glyph.is-upper img,
#entry-composer .glyph-composer-face .glyph.is-lower img {
  height: var(--glyph-rise);
  object-position: bottom center;
  transform: translateY(calc(var(--glyph-hang, 0) * var(--glyph-drop)));
}

.glyph-composer-title {
  --glyph-rise: 1.24em;
  --glyph-drop: calc(var(--glyph-rise) * 112 / 280);
}

.glyph-composer-title .script-line {
  align-items: flex-end;
  padding-bottom: var(--glyph-drop);
}

.glyph-composer-title .glyph-composer-face .glyph,
.glyph-composer-title .glyph-composer-face .glyph.is-lower,
.glyph-composer-title .glyph-composer-face .glyph-caret,
.glyph-composer-title .glyph-composer-face .glyph-space {
  vertical-align: baseline;
}

.glyph-composer-title .glyph-composer-face .glyph,
.glyph-composer-title .glyph-composer-face .glyph.is-lower {
  height: var(--glyph-rise);
}

.glyph-composer-title .glyph-composer-face .glyph.is-upper img,
.glyph-composer-title .glyph-composer-face .glyph.is-lower img {
  height: var(--glyph-rise);
  object-position: bottom center;
  transform: translateY(calc(var(--glyph-hang, 0) * var(--glyph-drop)));
}

.list-mark {
  display: inline-flex;
  align-items: center;
  margin-right: 0.35em;
  color: var(--text);
  font-size: 0.9em;
  line-height: 1;
  white-space: nowrap;
}

.list-mark-check {
  cursor: pointer;
}

.script-line.is-checked {
  opacity: 0.45;
}

.journal-layout .glyph-composer-face {
  color: var(--accent);
}

.sage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 2.5rem 40px;
  background: var(--paper);
  box-shadow: 0 -1px 12px rgba(67, 59, 56, 0.03);
  border-top: 1px solid var(--accent-ink);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-brand strong {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a[hidden] {
  display: none;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}



.stories-page {
  margin-top: 72px;
  padding-bottom: 88px;
}

.stories-head {
  margin: 0 0 22px;
}

.stories-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: var(--text);
}

.stories-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(220px, 0.92fr);
  align-items: stretch;
  margin: 0 0 40px;
  overflow: hidden;
  border: 1px solid #e7ddd0;
  border-radius: 18px;
  background: #fffdfb;
}

.story-feature-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 32px 26px;
}

.story-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: #f6ebe4;
  color: #c17b64;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}

.story-feature-copy h2 {
  margin: 16px 0 12px;
  max-width: 14em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: var(--text);
}

.story-feature-copy p {
  margin: 0 0 18px;
  max-width: 34rem;
  color: #6e6560;
  font-size: 0.98rem;
  line-height: 1.55;
}

.story-read {
  color: #b4533a;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.story-read:hover {
  color: var(--accent);
}

.story-feature-media {
  position: relative;
  min-height: 260px;
  background: #e8c4b0;
}

.story-feature-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
}

.story-feature-marks img {
  object-position: center;
}

.stories-more h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: #2c241f;
}

.story-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 32px;
  align-items: center;
  padding: 16px 2px;
  border-top: 1px solid #eadfd2;
}

.story-row:last-child {
  border-bottom: 1px solid #eadfd2;
}

.story-row h3 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: var(--text);
}

.story-row p {
  margin: 0;
  color: #6e6560;
  font-size: 0.94rem;
  line-height: 1.45;
}

.story-row .story-tag,
.story-row .story-read {
  justify-self: end;
}

.story-row .story-read {
  white-space: nowrap;
}

.story-article {
  max-width: 40rem;
  padding-bottom: 12px;
}

.story-back {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.story-back:hover {
  text-decoration: underline;
}

.story-article h1 {
  margin: 8px 0 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: var(--text);
}

.story-article .story-tag {
  display: flex;
  width: max-content;
  margin-bottom: 14px;
}

.story-article .story-lede {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.22rem;
  line-height: 1.45;
  color: var(--accent);
}

.story-figure {
  width: 100%;
  height: auto;
  margin: 8px 0 28px;
  border-radius: 16px;
}

.story-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 8px;
}

.story-examples img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.story-article p {
  margin: 0 0 14px;
  color: #4e4642;
  font-size: 1.02rem;
  line-height: 1.65;
}

.story-article h2 {
  margin: 30px 0 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #2c241f;
}

.story-bullets {
  list-style: disc;
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.story-bullets li {
  display: list-item;
  margin: 0 0 8px;
  color: #4e4642;
  font-size: 1.02rem;
  line-height: 1.55;
}

.story-bullets li:last-child {
  margin-bottom: 0;
}

.story-points {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.story-points li {
  margin: 0;
  padding: 11px 0;
  border-top: 1px solid #eadfd2;
  color: #4e4642;
  font-size: 1.02rem;
  line-height: 1.5;
}

.story-points li:last-child {
  border-bottom: 1px solid #eadfd2;
}

.story-points strong {
  font-weight: 600;
  color: #2c241f;
}

body:not(.is-signed-in) #home-studio {
  display: none;
}

body.is-signed-in #home-logout,
body.is-signed-in #how-it-works,
body.is-signed-in .sealed-journal,
body.is-signed-in .home-stories,
body.is-signed-in .home-contact {
  display: none;
}

/* How it works, the sealed journal, stories, contact, and the sanctuary
   sit outside #view-home, so they show only while the home view is open. */
body:not(:has(#view-home:not([hidden]))) #how-it-works,
body:not(:has(#view-home:not([hidden]))) .sealed-journal,
body:not(:has(#view-home:not([hidden]))) main>.home-stories,
body:not(:has(#view-home:not([hidden]))) main>.home-contact,
body:not(:has(#view-home:not([hidden]))) section#home-studio {
  display: none;
}

.journal-unlock {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 118px 24px 24px;
  background: rgba(255, 248, 245, 0.28);
  backdrop-filter: blur(8px);
}

.journal-unlock[hidden] {
  display: none;
}

body.is-journal-locked .navbar,
body.is-journal-locked .site-nav,
body.is-journal-locked.entries-open .navbar,
body.is-journal-locked.entries-open .site-nav {
  z-index: 80;
}

.journal-unlock-card {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow);
}

.journal-unlock-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
}

.journal-unlock-card .hint {
  margin: 0;
  white-space: pre-line;
}

.journal-unlock-card>.btn-primary {
  align-self: flex-end;
  margin-top: 5px;
  margin-bottom: 0;
}

.journal-unlock-card .status:empty {
  display: none;
}

.glyph-notice {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 48px));
  margin: 0;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.glyph-notice[hidden] {
  display: none;
}

.journal-unlock input {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.recovery-code {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  user-select: all;
  margin: 0;
}


/* Signed-in sanctuary (#home-studio) and the three-path onboarding.
   The same card layout is shared with #how-it-works on the logged-out home.
   Those actions use .btn-primary and .btn-secondary, defined with the other buttons. */


#home-studio.studio-home {
  padding: 0 0 1rem;
  margin-top: 72px;
}

#home-studio .sanctuary-hero {
  position: relative;
}

#home-studio.is-onboarding .sanctuary-hero {
  padding-bottom: 0.35rem;
}

#home-studio .home-settings {
  display: inline-flex;
  position: absolute;
  right: 0;
  align-items: center;
  gap: 0.35rem;
  color: #1c1a16;
  font-size: 0.95rem;
  text-decoration: none;
}

#home-studio .home-settings .home-setting-label {
  border-bottom: 1px solid currentColor;
  line-height: 1.15;
  align-items: center;
  text-decoration: none;
}

#home-studio .home-settings:hover {
  color: #c86d51;
}

#home-studio .home-settings .material-symbols-outlined,
#home-studio .home-settings .material-symbol-outlined {
  font-family: "Material Symbols Outlined";
  font-size: 1.15rem;
  font-weight: normal;
  font-style: normal;
  align-items: center;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  text-decoration: none;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.eyebrow {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c86d51;
  margin: 0 0 0.65rem;
}

#home-studio .sanctuary-hero h1,
#home-studio .sanctuary-hero .h1like {
  font-weight: 500;
  font-size: 56px;
  letter-spacing: -0.03em;
  color: #1c1a16;
  line-height: 1.2;
  margin: 0 0 0.2rem;
}

#home-studio .lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 72px;
}

#home-studio .home-onboarding h1 {
  margin: 0 0 0.55rem;
  max-width: calc(100% - 7.5rem);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.5vw, 2.125rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #1c1a16;
}

#home-studio .onboard-lead {
  margin: 0 0 1.25rem;
  color: #4a4338;
  font-size: 1rem;
}

/* Signed-in cards */

#home-studio .sanc-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

#home-studio .sanc-row-utility {
  grid-template-columns: 1fr 1.15fr;
  align-items: stretch;
}

#home-studio .sanc-row-bottom {
  grid-template-columns: 1fr 1.15fr;
  align-items: stretch;
}

#home-studio .sanc-row-bottom>.sanc-card {
  max-height: 200px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem 0.95rem;
}

#home-studio .sanc-row-bottom .sanc-entry-list {
  overflow: auto;
  min-height: 0;
}

#home-studio .sanc-row-bottom .sanc-entry {
  padding: 0.45rem 0.1rem;
}

#home-studio .sanc-card {
  background: #fcf9f3;
  border: 1px solid #e4ddd2;
  border-radius: 12px;
  padding: 1.35rem 1.4rem 1.4rem;
  box-shadow: 0 1px 2px rgba(44, 39, 31, 0.04);
}

#home-studio .sanc-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

#home-studio .sanc-card-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #1c1a16;
  white-space: nowrap;
}

#home-studio .sanc-btn {
  font-size: 0.8125rem;
  text-decoration: underline;
  font-weight: 500;
  color: #8c827d;
}

#home-studio .sanc-btn:hover {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#home-studio .practice-slim {
  padding: 0.85rem 1.1rem;
  background: #fffefb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

#home-studio .practice-slim-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  min-width: 0;
}

#home-studio .practice-slim .sanc-card-title {
  font-size: 0.9375rem;
}

#home-studio .sanc-progress {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

#home-studio .sanc-progress-bar {
  width: 56px;
  height: 3px;
  border-radius: 999px;
  background: #ebe5da;
  overflow: hidden;
}

#home-studio .sanc-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: #c86d51;
  border-radius: inherit;
}

#home-studio .sanc-progress-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8c827d;
  white-space: nowrap;
}

#home-studio .tip-slim {
  background: #c86d51;
  border-color: transparent;
  color: #fff;
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
}

#home-studio .tip-kicker {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

#home-studio .tip-body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  opacity: 0.95;
  font-weight: 500;
}

#home-studio .sanc-entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

#home-studio .sanc-entry-list li {
  border-top: 1px solid #ebe5da;
}

#home-studio .sanc-entry-list li:last-child {
  border-bottom: 1px solid #ebe5da;
}

#home-studio .sanc-entry {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.95rem 0.15rem;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
}

#home-studio .sanc-entry:hover {
  background: rgba(200, 109, 81, 0.04);
}

#home-studio .sanc-entry-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8c827d;
  white-space: nowrap;
}

#home-studio .sanc-entry-preview {
  font-size: 0.9375rem;
  color: #2c271f;
  line-height: 1.45;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1px;
}

#home-studio .sanc-entry-preview img {
  height: 1.15em;
  width: auto;
  max-width: 1.5em;
  object-fit: contain;
  flex: 0 0 auto;
  filter: invert(23%) sepia(34%) saturate(1292%) hue-rotate(346deg) brightness(93%) contrast(88%);
}

#home-studio .asemic-pages {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  flex: 1;
  min-height: 0;
}

#home-studio #studio-upload {
  margin-left: auto;
}

#home-studio .asemic-thumb {
  display: block;
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e4ddd2;
  background: #fcf9f3;
}

#home-studio .asemic-thumb:hover {
  border-color: rgba(200, 109, 81, 0.45);
}

#home-studio .asemic-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 96px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

#home-studio .asemic-empty,
#home-studio .font-empty {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: #8c827d;
}

#home-studio .font-list .sanc-entry-date {
  min-width: 0;
  width: auto;
  color: #2c271f;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  font-size: 0.8125rem;

}

#home-studio .font-row {
  grid-template-columns: 12rem 1fr auto;
  align-items: center;
}

#home-studio .font-delete {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #8c827d;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#home-studio .font-delete:hover {
  color: #2c271f;
}

#home-studio .fonts-foot {
  margin-top: 0.7rem;
  flex-shrink: 0;
}

#home-studio .fonts-cap {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #8c827d;
}

#home-studio .font-sample {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: #c86d51;
  line-height: 1.3;
  overflow: hidden;
  min-width: 0;
}

#home-studio .font-sample img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(23%) sepia(34%) saturate(1292%) hue-rotate(346deg) brightness(93%) contrast(88%);
}

/* Three options */

#home-studio .onboarding-options,
#how-it-works .onboarding-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: stretch;
}

#home-studio .onboarding-options>li,
#how-it-works .onboarding-options>li {
  display: flex;
  flex-direction: column;
  background: #f6eee6;
  border: 1px solid #e4ddd2;
  border-radius: 12px;
  padding: 1.15rem 16px 0;
}

#how-it-works .onboarding-options>li {
  padding-bottom: 1.2rem;
}

#home-studio .onboarding-options>li:nth-child(2),
#how-it-works .onboarding-options>li:nth-child(2) {
  background: #f7f0e8;
  border-color: #e6d4c8;
}

#home-studio .onboarding-options>li:nth-child(3),
#how-it-works .onboarding-options>li:nth-child(3) {
  background: #f2e6dc;
  border-color: #d4bfb0;
}

#home-studio .onboardingoption-title,
#how-it-works .onboardingoption-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  gap: 2rem;
}

#home-studio .onboardingoption-title img,
#how-it-works .onboardingoption-title img {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;

  align-items: center;
}

#home-studio .onboarding-options>li h2,
#how-it-works .onboarding-options>li h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-align: center;
  color: #1c1a16;
}

#home-studio .onboarding-text,
#how-it-works .onboarding-text {
  flex: 1;
  text-align: center;
}

#home-studio .onboarding-options>li p,
#how-it-works .onboarding-options>li p {
  margin: 0;
  color: #4a4338;
  font-size: 0.95rem;
  line-height: 1.55;
}

#home-studio .onboard-learn,
#how-it-works .onboard-learn {
  display: inline-block;
  margin-top: 0.7rem;
  color: #c86d51;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#home-studio .onboard-learn:hover,
#how-it-works .onboard-learn:hover {
  color: #a8563e;
}

#home-studio .onboarding-button,
#how-it-works .onboarding-button {
  display: flex;
  width: 100%;
  margin-top: 36px;
  margin-bottom: 16px;
}



/* What's next */

#home-studio .onboard-next {
  margin-top: 112px;
}

#how-it-works .onboarding-practice {
  margin-top: 112px;
}

#home-studio .onboard-next,
#how-it-works .onboarding-practice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
  max-height: 500px;
}

#home-studio .onboard-next h3,
#how-it-works .onboarding-practice-txt h2 {
  margin: 0 0 0;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.5;
}

#home-studio .onboard-next p,
#how-it-works .onboarding-practice-txt h4 {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

#home-studio .onboard-next-copy,
#how-it-works .onboarding-practice-txt {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  margin-top: 0;
  width: 100%;
  max-width: 450px;
  min-width: 0;
}

#home-studio .onboard-next .onboard-next-copy h3,
#how-it-works .onboarding-practice-txt h2,
#home-studio .onboard-next .onboard-next-copy p,
#how-it-works .onboarding-practice-txt h4 {
  text-align: left;
}

#home-studio .onboard-next-copy p,
#how-it-works .onboarding-practice-txt h4 {
  margin-bottom: 0;
}

#home-studio .onboard-practice-card,
#how-it-works .onboarding-practice>figure {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  width: 100%;
  max-width: 450px;
  padding: 1rem;
  background: #e6d4c8;
  border: 1px solid #e6d4c8;
  border-radius: 12px;
}

#home-studio .onboard-practice-match,
#how-it-works .onboarding-practice>figure:nth-child(3) {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 100%;
  max-width: 450px;
  min-width: 0;
  margin-top: 86px;
}

#home-studio .onboard-practice-read,
#how-it-works .onboarding-practice>figure:nth-child(4) {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  width: 100%;
  max-width: 450px;
  min-width: 0;
  margin-top: 0;
}

#home-studio .onboard-practice-draw,
#how-it-works .onboarding-practice>figure:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: 100%;
  max-width: 450px;
  min-width: 0;
  margin-top: 72px;
}

#home-studio .onboard-practice-card h4,
#how-it-works .onboarding-practice>figure h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

#home-studio .onboard-practice-card h4::after,
#how-it-works .onboarding-practice>figure h4::after {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  margin-top: 14px;
  background: #df7e64;
  border-radius: 12px;
}

#home-studio .onboard-practice-card img,
#how-it-works .onboarding-practice>figure img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 24px;
  border-radius: 10px;
}

/* That's okay */

#home-studio .onboard-note {
  margin-top: 112px;
}

#how-it-works .onboard-notpractice {
  margin-top: 32px;
}

#home-studio .onboard-note h3,
#how-it-works .onboard-notpractice h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.5;
  text-align: center;
}

#home-studio .onboard-note p,
#how-it-works .onboard-notpractice p {
  margin: 0 0 1rem;
  color: #4a4338;
  font-size: 1rem;
  text-align: center;
}

#home-studio .onboard-reveal,
#how-it-works .onboard-reveal {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 8px auto 0;
  border: 1px solid #e4ddd2;
  border-radius: 12px;
}

/* Logged-out home: the three ways flip into What's next while this track scrolls. */
#how-it-works .way-flip {
  position: relative;
  height: 320vh;
}

#how-it-works .way-flip-sticky {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  height: calc(100vh - 124px);
}

#how-it-works .way-flip-copy {
  position: relative;
  min-height: 8.5rem;
  text-align: center;
}

#how-it-works .way-flip-copy-front,
#how-it-works .way-flip-copy-back {
  display: grid;
  justify-items: center;
  gap: 8px;
}

#how-it-works .way-flip-copy-back {
  position: absolute;
  inset: 0;
  opacity: 0;
}

#how-it-works .way-flip-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.35;
  margin-bottom: 0;
}

#how-it-works .way-flip-copy h5.home-intro {
  max-width: 38rem;
  margin-top: 0;
}

#how-it-works .way-flip-stage {
  perspective: 1400px;
}

#how-it-works .way-flip-stage,
#how-it-works .way-flip-row {
  transform-style: preserve-3d;
}

#how-it-works .way-flip-row {
  height: min(380px, 52vh);
  align-items: stretch;
}

#how-it-works .way-flip .onboarding-options>li,
#how-it-works .way-flip .onboarding-options>li:nth-child(2),
#how-it-works .way-flip .onboarding-options>li:nth-child(3) {
  display: grid;
  padding: 0;
  background: transparent;
  border: 0;
  min-height: 0;
  height: 100%;
  transform-style: preserve-3d;
}

#how-it-works .way-face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.15rem 16px 1.2rem;
  border: 1px solid #e4ddd2;
  border-radius: 12px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#how-it-works .way-flip .onboarding-options>li:nth-child(1) .way-face-front {
  background: #f6eee6;
}

#how-it-works .way-flip .onboarding-options>li:nth-child(2) .way-face-front {
  background: #f7f0e8;
  border-color: #e6d4c8;
}

#how-it-works .way-flip .onboarding-options>li:nth-child(3) .way-face-front {
  background: #f2e6dc;
  border-color: #d4bfb0;
}

#how-it-works .way-face-back {
  background: var(--accent-2);
  border-color: #e6d4c8;
  transform: rotateY(180deg);
  pointer-events: none;
}

#how-it-works .way-face-back h4 {
  margin-top: 21px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  gap: 2rem;
  
}

#how-it-works .way-face-back h4::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: #df7e64;
  border-radius: 12px;
}

#how-it-works .way-face-back img {
  display: block;
  width: 100%;
  min-height: 0;
  margin-top: 18px;
  object-fit: fill;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  #how-it-works .way-flip {
    height: auto;
  }

  #how-it-works .way-flip-sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  #how-it-works .way-flip-copy-back {
    position: static;
    opacity: 1;
    margin-top: 32px;
  }

  #how-it-works .way-flip-row {
    height: auto;
  }

  #how-it-works .way-flip .onboarding-options>li {
    height: auto;
    transform: none;
  }

  #how-it-works .way-face,
  #how-it-works .way-face-back {
    position: static;
    transform: none;
    pointer-events: auto;
    height: auto;
  }

  #how-it-works .way-face-back {
    margin-top: 16px;
  }

  #how-it-works .way-face-back img {
    height: 180px;
  }
}

@media (max-width: 760px) {
  body {
    padding-top: 102px;
  }

  .station-bar .station-inner,
  .navbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .station-bar .radio-volume {
    width: 48px;
  }

  .navbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 12px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .nav-icon {
    height: 36px;
    font-size: 1.25rem;
  }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: #3d2b24;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .navbar.is-menu-open .nav-burger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .navbar.is-menu-open .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .navbar.is-menu-open .nav-burger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-end {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 8px 16px 16px;
    background: rgba(255, 248, 245, 0.98);
    box-shadow: 0 12px 24px rgba(67, 59, 56, 0.08);
  }

  .navbar.is-menu-open .nav-end {
    display: flex;
  }

  .navbar nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .navbar nav a {
    padding: 12px 4px;
    font-size: 1rem;
  }

  .nav-indicator {
    display: none;
  }

  #login,
  body.is-signed-in #logout {
    width: 100%;
    height: 40px;
    justify-content: center;
    margin-top: 8px;
  }

  #glyphmaker-banner {
    top: 102px;
  }

  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding: 20px 0 40px;
  }

  .hero-intro {
    align-items: center;
    max-width: none;
    margin-bottom: 8px;
    text-align: center;
  }

  .hero-badge {
    padding: 8px 14px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .hero-button {
    justify-content: center;
  }

  .hero h1 span,
  .hero-sub {
    white-space: normal;
  }

  .hero-sub {
    width: auto;
    font-size: 0.95rem;
    text-align: center;
  }

  .hero {
    text-align: center;
  }

  .hero-intro {
    display: contents;
  }

  .hero-badge {
    order: 1;
  }

  .codex-stage {
    order: 2;
    align-self: center;
    width: min(250px, 78%);
    margin-top: 4px;
    margin-bottom: 8px;
    --stage-pad-x: 10px;
    --stage-pad-t: 8px;
    --stage-pad-b: 4px;
  }

  .hero h1 {
    order: 3;
  }

  .hero-sub {
    order: 4;
  }

  .hero .hero-button {
    order: 5;
  }

  .codex-page {
    min-height: 0;
    padding: 14px 16px 32px;
  }

  .codex-verse {
    font-size: 14px;
    line-height: 1.25;
  }

  .codex-verse span {
    white-space: normal;
  }

  .hero-scan {
    top: var(--stage-pad-t);
    bottom: var(--stage-pad-b);
    overflow: hidden;
  }

  .hero-scan-stroke {
    height: 100%;
    object-fit: fill;
  }

  .codex-hint {
    bottom: 36px;
    gap: 6px;
    margin: 0;
    font-size: 9px;
    letter-spacing: 0.14em;
    white-space: nowrap;
    transform: translateX(-50%);
  }

  #how-it-works > .process,
  .process,
  section.sealed-journal,
  .home-stories,
  #home-logout > .cipher-block,
  .pillars,
  .site-footer {
    padding-left: 0;
    padding-right: 0;
  }

  #how-it-works > .process {
    grid-template-columns: 1fr;
    margin: 0 0 40px;
    padding: 24px 20px;
  }

  .homedemo p,
  #how-it-works .onboarding-options > li p,
  h5.home-intro {
    font-size: 0.92rem;
  }

  #how-it-works .way-flip-copy h2,
  .sealed h2,
  .home-stories h2,
  .home-story-body h3 {
    font-size: 1.2rem;
  }

  #how-it-works .onboarding-options > li h2,
  #home-studio .onboarding-options > li h2,
  #how-it-works .way-face-back h4,
  #home-studio .onboard-practice-card h4 {
    font-size: 0.95rem;
  }

  #home-studio .sanctuary-hero h1,
  #home-studio .sanctuary-hero .h1like {
    font-size: 2.15rem;
  }

  #home-studio .lede {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  section.sealed-journal {
    margin-top: 64px;
    padding-left: 12px;
    padding-right: 12px;
  }

  #sealedorng {
    display: block;
  }

  .home-stories {
    margin-top: 48px;
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .home-stories-rail {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
  }

  .story-arrow {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e4ddd2;
    border-radius: 50%;
    background: #fffdfb;
    color: #94452c;
    cursor: pointer;
  }

  .story-arrow .material-symbols-outlined {
    font-size: 20px;
  }

  .story-arrow:disabled {
    opacity: 0.35;
    cursor: default;
  }

  .home-story-list {
    display: flex;
    gap: 12px;
    margin: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .home-story-list::-webkit-scrollbar {
    display: none;
  }

  .home-story-list > li {
    flex: 0 0 78%;
    min-width: 0;
    scroll-snap-align: start;
  }

  .pillar-grid,
  .guide-examples,
  .stories-feature,
  .memory-layout,
  .alphabet-layout,
  #home-studio .sanc-row-utility,
  #home-studio .sanc-row-bottom,
  #home-studio .onboarding-options,
  #how-it-works .onboarding-options,
  #home-studio .onboard-next,
  #how-it-works .onboarding-practice {
    grid-template-columns: 1fr;
  }

  .pillar-card {
    display: flex;
    flex-direction: column;
    grid-row: auto;
  }

  #home-studio .onboard-next,
  #how-it-works .onboarding-practice {
    max-height: none;
    row-gap: 20px;
  }

  #home-studio .onboardingoption-title,
  #how-it-works .onboardingoption-title,
  #how-it-works .way-face-back h4 {
    gap: 0.75rem;
  }

  #how-it-works .way-flip {
    height: auto;
  }

  #how-it-works .way-flip-sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  #how-it-works .way-flip-sticky {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  #how-it-works .way-flip-copy,
  #how-it-works .way-flip-stage,
  #how-it-works .way-flip-row,
  #how-it-works .way-flip .onboarding-options > li,
  #how-it-works .way-flip .onboarding-options > li:nth-child(2),
  #how-it-works .way-flip .onboarding-options > li:nth-child(3) {
    display: contents;
  }

  #how-it-works .way-flip-copy-front,
  #how-it-works .way-flip-copy-back,
  #how-it-works .way-face {
    width: 100%;
  }

  #how-it-works .way-flip-copy-front {
    order: 1;
  }

  #how-it-works .way-face-front {
    order: 2;
    width: auto;
    align-self: stretch;
    margin-left: 8px;
    margin-right: 8px;
    padding-left: 24px;
    padding-right: 24px;
  }

  #how-it-works .way-flip-copy-back {
    order: 3;
    margin-top: 20px;
  }

  #how-it-works .way-face-back {
    order: 4;
    align-self: center;
    width: min(430px, 100%);
    margin-top: 0;
  }

  #how-it-works .way-flip-copy-front,
  #how-it-works .way-flip-copy-back {
    position: static;
    opacity: 1 !important;
  }

  #how-it-works .way-flip-row,
  #how-it-works .way-flip .onboarding-options > li {
    height: auto;
    transform: none !important;
  }

  #how-it-works .way-face,
  #how-it-works .way-face-back {
    position: static;
    grid-area: auto;
    height: auto;
    transform: none !important;
    pointer-events: auto;
  }

  #how-it-works .way-face-back {
    padding: 0.85rem 22px 0.95rem;
  }

  #how-it-works .way-face-back img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 192px;
    margin: 10px auto 0;
    object-fit: contain;
  }

  .story-feature-media {
    min-height: 200px;
  }

  .story-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .story-row .story-tag,
  .story-row .story-read {
    justify-self: start;
  }

  .ref-card-grid {
    grid-template-columns: 1fr;
  }

  .progress-card {
    min-width: 0;
  }

  #home-studio.studio-home {
    margin-top: 28px;
  }

  #home-studio .sanc-row-bottom > .sanc-card {
    max-height: none;
  }

  #home-studio .font-row {
    grid-template-columns: 1fr auto;
  }

  .journal-head {
    position: static;
    flex-wrap: wrap;
    gap: 8px;
  }

  .journal-unlock-card {
    width: min(100%, 420px);
  }
}