/* My Wine Journal — site and journal-book styles.
   Colors are CSS variables so they are easy to change.
   App brown #8B4513 for feature icons and some buttons; logo burgundy
   #681418 and gold #C49C58 for the chrome. Cream paper #FBF7F2 / #FFF3E0.
   No external fonts, scripts, or trackers. */

:root {
  --color-brand: #8B4513;
  --color-brand-dark: #5D2E0C;
  --color-brand-deep: #3D1214;
  --color-burgundy: #681418;
  --color-gold: #C49C58;
  --color-terracotta: #B45130;
  --color-cream: #FFF3E0;
  --color-paper: #FBF7F2;
  --color-bg: #2A0E10;
  --color-bg-alt: #F3EBE2;
  --color-card: #FFFFFF;
  --color-text: #221910;
  --color-muted: #5C4C40;
  --color-line: #E6D9CC;
  --color-on-brand: #FFFFFF;
  --color-tbc-bg: #FFF3BF;
  --color-tbc-border: #C49C58;
  --color-focus: #681418;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --width: 68rem;
  --width-narrow: 42rem;
  --radius: 14px;
  --header-h: 4.25rem;
  --flip-ms: 500ms;
  --fade-ms: 240ms;
  --flip-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; }

a {
  color: var(--color-burgundy);
  text-underline-offset: 0.15em;
}
a:hover { color: var(--color-brand); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--color-brand-deep);
  color: var(--color-on-brand);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

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

.tbc {
  background: var(--color-tbc-bg);
  border: 1px dashed var(--color-tbc-border);
  border-radius: 3px;
  padding: 0 0.25em;
  font-family: var(--font-sans);
  font-weight: 600;
  white-space: nowrap;
}
.tbc-block {
  background: var(--color-tbc-bg);
  border: 2px dashed var(--color-tbc-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}
.tbc-label {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--color-brand-deep);
}

.draft-banner {
  background: var(--color-brand-deep);
  color: var(--color-cream);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.4rem 1rem;
  margin: 0;
}

/* ---- Logo / wordmark ---- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-burgundy);
  line-height: 1.1;
}
.wordmark:hover { color: var(--color-brand-deep); }
.wordmark-logo {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
}
.wordmark-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.8rem 1.35rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.2;
}
.btn-play {
  background: #1a1a1a;
  color: #fff;
  min-width: 15.5rem;
  text-align: left;
  cursor: not-allowed;
  opacity: 0.92;
}
.btn-play:hover { color: #fff; background: #111; }
.btn-play[aria-disabled="true"] { pointer-events: none; }
.btn-play .btn-play-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}
.btn-play .btn-kicker {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.btn-play .btn-store {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-sans);
}
.btn-coming {
  font-size: 0.75rem;
  font-weight: 700;
  background: #3d3d3d;
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.15rem;
}
.play-icon { width: 1.7rem; height: 1.7rem; flex-shrink: 0; }
.price-note { margin: 0.65rem 0 0; color: var(--color-muted); font-size: 0.95rem; }

/* ============================================================
   The journal book
   ============================================================ */

.book-stage {
  padding: 0.75rem 0.75rem 1.25rem;
}

.book {
  width: min(76rem, 100%);
  margin: 0 auto;
  background: var(--color-paper);
  color: var(--color-text);
  border-radius: 6px 14px 14px 6px;
  box-shadow:
    inset 8px 0 12px -8px rgba(61, 18, 20, 0.28),
    0 18px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.leaf {
  background:
    linear-gradient(90deg, rgba(61, 18, 20, 0.06), rgba(61, 18, 20, 0) 14px),
    var(--color-paper);
  padding: 0;
}

.leaf-top,
.leaf-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1.1rem;
  flex-shrink: 0;
}
.leaf-top {
  border-bottom: 1px solid var(--color-line);
  justify-content: space-between;
  background: rgba(255, 243, 224, 0.65);
}
.leaf-folio {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-muted);
  font-size: 0.92rem;
}
.leaf-body {
  padding: 1.25rem 1.35rem 1.75rem;
}
.leaf-body h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--color-brand-deep);
}
.leaf h1:focus,
.leaf h1:focus-visible {
  outline: none;
}
.leaf-lead {
  color: var(--color-muted);
  margin: 0 0 1.4rem;
  max-width: 40rem;
}
.story {
  max-width: 38rem;
}
.story p {
  margin: 0 0 1rem;
}
.story-sign {
  margin: 1.35rem 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-brand-deep);
}

.leaf-nav {
  border-top: 1px solid var(--color-line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(255, 243, 224, 0.65);
  flex-wrap: nowrap;
}
.leaf-nav .btn-page:first-child { justify-self: start; }
.leaf-nav .btn-page-contents { justify-self: center; }
.leaf-nav .btn-page:last-of-type { justify-self: end; }
.leaf-copy {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-muted);
}
.btn-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-burgundy);
  color: var(--color-burgundy);
  background: var(--color-cream);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.btn-page:hover {
  background: var(--color-burgundy);
  color: var(--color-cream);
}
.btn-page.is-disabled,
.btn-page[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}
.btn-page-contents { min-width: 7.5rem; }

/* ---- Cover ---- */
.leaf-cover .leaf-top { display: none; }

.cover-spread {
  display: grid;
  grid-template-columns: 1fr;
}
.cover-art {
  background: #14080a;
  min-height: 22rem;
}
.cover-art picture,
.cover-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 30%;
}
html.js-book .cover-art picture,
html.js-book .cover-art img {
  height: 100%;
}
.leaf { scroll-margin-top: 0.5rem; }
.cover-contents {
  padding: 1.4rem 1.4rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cover-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.75rem;
}
.cover-brand img {
  width: 3.25rem;
  height: 3.25rem;
}
.cover-kicker {
  margin: 0 0 1.1rem;
  color: var(--color-muted);
  max-width: 24rem;
}
.cover-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 1.15rem;
  color: var(--color-brand-deep);
}
.toc-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.7rem;
  color: var(--color-burgundy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.toc {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  max-width: 26rem;
}
.toc li { margin: 0; border-bottom: 1px dotted var(--color-line); }
.toc a {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.45rem 0;
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: 1.08rem;
}
.toc a:hover { color: var(--color-burgundy); }
.toc-num {
  flex: 0 0 1.6rem;
  color: var(--color-gold);
  font-style: italic;
  font-weight: 700;
}

/* ---- JS book mode: one screen, 3D page turn ---- */
html.js-book,
html.js-book body {
  height: 100%;
  overflow: hidden;
}
html.js-book body {
  display: flex;
  flex-direction: column;
}
html.js-book .draft-banner { flex-shrink: 0; }
html.js-book .book-stage {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.6rem 0.6rem 0.85rem;
  display: flex;
}
html.js-book .book {
  flex: 1 1 auto;
  width: min(76rem, 100%);
  height: 100%;
  position: relative;
  perspective: 1800px;
  perspective-origin: 50% 50%;
  overflow: hidden;
}
html.js-book .leaf {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transform-origin: left center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
html.js-book .leaf.is-current,
html.js-book .leaf.is-enter,
html.js-book .leaf.is-leave {
  visibility: visible;
}
html.js-book .leaf.is-current {
  pointer-events: auto;
  z-index: 2;
}
html.js-book .leaf.is-enter { z-index: 1; }
html.js-book .leaf.is-leave { z-index: 3; }
html.js-book .leaf-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
html.js-book .leaf-cover {
  display: flex;
  flex-direction: column;
}
html.js-book .leaf-cover .cover-spread {
  flex: 1 1 auto;
  min-height: 0;
}
html.js-book .leaf-cover .cover-art {
  min-height: 0;
}

/* Forward: the current page turns away around the spine, revealing the next. */
html.js-book .leaf.turn-forward.is-leave {
  animation: book-flip-out var(--flip-ms) var(--flip-ease) forwards;
  z-index: 4;
}
html.js-book .leaf.turn-forward.is-enter {
  animation: none;
  z-index: 1;
}
/* Backward: the previous page swings back in over the current one. */
html.js-book .leaf.turn-back.is-enter {
  animation: book-flip-in var(--flip-ms) var(--flip-ease) forwards;
  z-index: 4;
}
html.js-book .leaf.turn-back.is-leave {
  animation: none;
  z-index: 1;
}

@keyframes book-flip-out {
  from { transform: rotateY(0deg); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
  40% { box-shadow: -12px 0 28px rgba(0, 0, 0, 0.25); }
  to { transform: rotateY(-95deg); box-shadow: -8px 0 16px rgba(0, 0, 0, 0.12); }
}
@keyframes book-flip-in {
  from { transform: rotateY(-95deg); box-shadow: -8px 0 16px rgba(0, 0, 0, 0.12); }
  60% { box-shadow: -12px 0 28px rgba(0, 0, 0, 0.25); }
  to { transform: rotateY(0deg); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
}

/* Mid-turn freeze, used only when capturing a preview. */
html.js-book .leaf.is-mid-turn {
  visibility: visible !important;
  pointer-events: none;
  z-index: 5;
  transform-origin: left center;
  transform: rotateY(-48deg);
  box-shadow: -16px 0 32px rgba(0, 0, 0, 0.3);
  animation: none !important;
}

html.js-book .leaf.is-fade.turn-forward.is-leave,
html.js-book .leaf.is-fade.turn-back.is-leave,
html.js-book .leaf.is-fade.turn-forward.is-enter,
html.js-book .leaf.is-fade.turn-back.is-enter {
  animation: none;
  transform: none;
  box-shadow: none;
}
html.js-book .leaf.is-fade.is-leave {
  animation: book-fade-out var(--fade-ms) ease forwards;
  z-index: 4;
}
html.js-book .leaf.is-fade.is-enter {
  animation: book-fade-in var(--fade-ms) ease forwards;
  z-index: 3;
}
@keyframes book-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes book-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Shared content blocks ---- */

.screen-entry {
  display: grid;
  gap: 0.85rem 1.4rem;
  margin: 0 0 1.35rem;
  align-items: start;
}
.screen-entry:last-child { margin-bottom: 0; }
.screen-entry .phone {
  margin: 0;
  max-width: 8.6rem;
}
.screen-copy h1,
.screen-copy h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  color: var(--color-brand-deep);
}
.screen-copy h1 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.screen-entry:only-of-type .phone,
.screen-entry:only-of-type .shot-placeholder {
  max-width: 12.5rem;
}
.shot-placeholder {
  min-height: 22rem;
  border: 1px solid var(--color-line);
  border-radius: 1.4rem;
  background:
    linear-gradient(180deg, var(--color-cream), var(--color-paper));
  color: var(--color-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.4rem 1.1rem;
  gap: 0.7rem;
  box-shadow: 0 10px 24px rgba(58, 28, 8, 0.08);
}
.shot-placeholder img {
  width: 3rem;
  height: 3rem;
  display: block;
}
.shot-placeholder p { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.shot-placeholder strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-brand-deep);
}
.parent-link {
  margin: 0.95rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.4rem;
}
.parent-link a { font-weight: 600; }
.leaf-body > h1 + .leaf-lead + .parent-link { margin-top: 0.35rem; margin-bottom: 0.85rem; }
.feature-copy {
  max-width: 38rem;
}
.feature-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.25;
  margin: 0 0 0.55rem;
  color: var(--color-brand-deep);
}
.feature-copy p {
  margin: 0 0 0.7rem;
}
.feature-copy p:last-child { margin-bottom: 0; }
.hub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 32rem;
}
.hub-list li {
  margin: 0;
  border-bottom: 1px dotted var(--color-line);
  color: var(--color-muted);
  font-size: 0.98rem;
}
.hub-list a,
.hub-list .hub-plain {
  display: inline-block;
  padding: 0.7rem 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}
.hub-list a {
  color: var(--color-burgundy);
  text-decoration: none;
  text-underline-offset: 0.15em;
}
.hub-list a:hover { text-decoration: underline; }
.hub-list .hub-plain { color: var(--color-muted); text-decoration: none; }
.screen-copy p {
  margin: 0 0 0.65rem;
  color: var(--color-text);
}
.screen-copy p:last-child { margin-bottom: 0; }
.screen-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.btn-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}
.btn-list li {
  margin: 0 0 0.28rem;
  padding: 0;
  line-height: 1.45;
}
.btn-list li:last-child { margin-bottom: 0; }
.btn-list strong {
  color: var(--color-brand-deep);
  font-weight: 600;
}

/* Home-screen button icons: white circle, black glyph, as in the app. */
.home-btns > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.7rem;
  align-items: start;
  margin: 0 0 0.7rem;
}
.home-btns > li:last-child { margin-bottom: 0; }
.home-icon {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #111;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.75rem;
  box-sizing: border-box;
}
.home-icon svg {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}
.home-btns .sub-links {
  list-style: none;
  margin: 0.12rem 0 0;
  padding: 0;
}
.home-btns .sub-links li {
  margin: 0;
  padding: 0;
  line-height: 1.45;
}
.screen-copy .hub-list {
  margin: 0.15rem 0 0;
}
.screen-copy .hub-list a,
.screen-copy .hub-list .hub-plain {
  padding: 0.45rem 0;
  font-size: 1.08rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
}
.feature {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.95rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem 0.85rem;
  align-items: start;
}
.feature svg {
  width: 1.45rem;
  height: 1.45rem;
  color: var(--color-brand);
  margin-top: 0.15rem;
}
.feature h2,
.feature h3 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
  font-family: var(--font-serif);
  color: var(--color-brand-deep);
}
.feature p { margin: 0; color: var(--color-muted); font-size: 0.96rem; }

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1rem;
}
.shot { margin: 0; text-align: center; }
.phone {
  background: var(--color-brand-deep);
  border-radius: 1.4rem;
  padding: 0.55rem 0.45rem 0.7rem;
  box-shadow: 0 12px 28px rgba(58, 28, 8, 0.18);
  margin: 0 auto 0.7rem;
  max-width: 12.5rem;
}
.phone picture { display: block; width: 100%; }
.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1520;
  object-fit: cover;
  object-position: top center;
  border-radius: 0.9rem;
  background: var(--color-cream);
}
.shot figcaption {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  max-width: 15rem;
  margin-inline: auto;
  line-height: 1.35;
}
.shot-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.2rem;
}
.swipe-hint {
  display: none;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.88rem;
  margin: 0 0 0.8rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 42rem;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0 0 1.25rem 3.2rem;
  counter-increment: step;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--color-burgundy);
  color: var(--color-on-brand);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.steps strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--color-brand-deep);
  margin-bottom: 0.15rem;
}
.steps p { margin: 0; color: var(--color-muted); }

.coming-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  max-width: 36rem;
}
.coming-list li {
  margin: 0;
  padding: 0.85rem 0;
  border-bottom: 1px dotted var(--color-line);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--color-brand-deep);
}
.coming-list li:first-child { padding-top: 0.2rem; }
.coming-list li:last-child { border-bottom: none; }

.faq-list {
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.faq-list details {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 0.1rem 0.15rem;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 1rem;
  color: var(--color-brand-deep);
}
.faq-list details p {
  margin: 0;
  padding: 0 1rem 0.9rem;
  color: var(--color-muted);
}

.support-card {
  max-width: 36rem;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
}
.support-card p { margin: 0 0 0.75rem; }
.support-email { font-size: 1.15rem; font-weight: 700; word-break: break-word; }

.legal-body {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.6rem;
}
.legal-body h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-brand-deep);
  margin: 1.7rem 0 0.5rem;
  text-align: left;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.02rem; margin: 1.15rem 0 0.35rem; }
.legal-body .meta { color: var(--color-muted); }
.legal-note {
  font-size: 0.95rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-line);
  margin-top: 1.6rem;
  padding-top: 0.9rem;
}
.standalone-note {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0 auto 1.1rem;
}

/* ============================================================
   Standalone privacy / terms pages (Play Store and print)
   ============================================================ */
body.legal-doc { background: var(--color-paper); }

.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-line);
}
.header-inner,
.footer-inner,
.wrap {
  width: min(var(--width), calc(100% - 2rem));
  margin-inline: auto;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.7rem 0;
  min-height: var(--header-h);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-burgundy);
  text-decoration: underline;
}
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav-toggle-label { display: none; }

.legal-header { padding: 2.3rem 0 1.1rem; }
.legal-header-inner,
body.legal-doc .legal-body {
  width: min(var(--width-narrow), calc(100% - 2rem));
  margin-inline: auto;
}
.legal-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  color: var(--color-brand-deep);
  margin: 0 0 0.3rem;
}
.legal-lede { margin: 0; color: var(--color-muted); }
body.legal-doc .legal-body { margin-bottom: 2.5rem; }

.site-footer {
  background: var(--color-brand-deep);
  color: #E8D6C4;
  padding: 1.6rem 0;
  font-size: 0.92rem;
}
.site-footer a { color: #FFF3E0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.15rem; }
.footer-note {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  opacity: 0.9;
}
.footer-logo {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (min-width: 860px) {
  .cover-spread {
    grid-template-columns: 1.12fr 0.88fr;
    min-height: 32rem;
  }
  /* Reserve a stable cover height so no-JS #hash links still land correctly
     after the cover image loads. */
  .cover-art {
    height: min(70vh, 40rem);
    overflow: hidden;
  }
  .cover-art img { height: 100%; }
  html.js-book .cover-art { height: auto; min-height: 0; }
  html.js-book .leaf-cover .cover-spread { min-height: 0; height: 100%; }
  html.js-book .cover-art img { object-fit: cover; height: 100%; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .screen-entry {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
  .screen-entry .phone { max-width: 7.2rem; }
  .screen-entry { margin-bottom: 0.7rem; }
  .screen-copy h2 { margin-top: 0.15rem; }
  .screen-entry:only-of-type .phone,
  .screen-entry:only-of-type .shot-placeholder { max-width: 13.5rem; }
  .screen-copy h1 { margin-top: 0.1rem; }
  .shot-grid { grid-template-columns: repeat(3, 1fr); }
  .shot-grid > .shot:last-child { grid-column: 2; }
  .leaf-body { padding: 1.5rem 2rem 2rem; }
  .cover-contents { padding: 2rem 2.1rem 1rem; }
  .wordmark-logo { width: 3rem; height: 3rem; }
}

@media (min-width: 1100px) {
  .shot-grid { grid-template-columns: repeat(4, 1fr); }
  .shot-grid > .shot:last-child { grid-column: auto; }
  .phone { max-width: 11.5rem; }
}

@media (max-width: 859px) {
  .shot-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.85rem;
    padding: 0.2rem 0 0.8rem;
    -webkit-overflow-scrolling: touch;
  }
  .shot { flex: 0 0 11.5rem; scroll-snap-align: start; }
  .phone { max-width: none; }
  .swipe-hint { display: block; }
  .screen-entry .phone { max-width: 7.6rem; margin-inline: auto; }
  .screen-entry:only-of-type .phone,
  .screen-entry:only-of-type .shot-placeholder {
    max-width: 10.5rem;
    margin-inline: auto;
  }
  /* Keep Home and hub screenshots smaller so the link lists stay reachable. */
  .screen-entry:has(.btn-list) .phone,
  .screen-entry:has(.hub-list) .phone { max-width: 6rem; }
  .screen-copy h1,
  .screen-copy h2,
  .screen-copy .screen-kicker,
  .screen-copy .parent-link { text-align: center; justify-content: center; }
  .screen-copy p, .btn-list { font-size: 0.95rem; }
  .cover-art { max-height: 42vh; }
  html.js-book .leaf-cover .cover-spread {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  html.js-book .cover-art {
    max-height: none;
    flex: 0 0 28%;
    height: 28%;
  }
  html.js-book .cover-contents {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    justify-content: flex-start;
    padding: 0.7rem 1rem 0.6rem;
  }
  .cover-brand { margin: 0 0 0.4rem; }
  .cover-brand img { width: 2.5rem; height: 2.5rem; }
  .cover-kicker { margin: 0 0 0.55rem; font-size: 0.92rem; }
  .cover-tagline { margin: 0 0 0.45rem; font-size: 1.2rem; }
  .toc-title { margin: 0 0 0.35rem; font-size: 1rem; }
  .toc { margin: 0 0 0.75rem; }
  .toc a { padding: 0.28rem 0; font-size: 1rem; }
  .btn-play { min-width: 0; width: 100%; padding: 0.55rem 1rem; }
  .price-note { margin: 0.3rem 0 0; font-size: 0.8rem; line-height: 1.35; }
  .leaf-nav { padding: 0.4rem 0.7rem 0.35rem; }
  .btn-page { min-width: 0; padding: 0.4rem 0.65rem; font-size: 0.88rem; }
  .leaf-copy { margin: 0.15rem 0 0; font-size: 0.72rem; }
}

@media (max-width: 960px) {
  body.legal-doc .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border: 1.5px solid var(--color-burgundy);
    color: var(--color-burgundy);
    background: var(--color-card);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
  }
  body.legal-doc .nav-toggle-label:hover,
  body.legal-doc .nav-toggle:focus-visible + .nav-toggle-label {
    background: var(--color-cream);
  }
  body.legal-doc .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.25rem 0 0.6rem;
  }
  body.legal-doc .site-nav a { padding: 0.45rem 0; }
  body.legal-doc .nav-toggle:checked ~ .site-nav { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-book .leaf.turn-forward.is-leave:not(.is-fade),
  html.js-book .leaf.turn-back.is-enter:not(.is-fade) {
    animation: none;
  }
}

@media print {
  .draft-banner, .leaf-nav, .btn-play { display: none; }
  body, .book { background: #fff; box-shadow: none; }
  .leaf { break-after: page; }
  .tbc, .tbc-block { border: 1px solid #666; background: #fff; }
}
