:root {
  /* Flutter app palette */
  --canvas: #1A2858;
  --elevation-1: #1C2F6A;
  --overlay: rgba(0, 0, 0, 0.2);

  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-tertiary: rgba(255, 255, 255, 0.2);
  --text-quaternary: rgba(255, 255, 255, 0.07);

  --accent: #FFD8A3;
  --accent-hover: #FFE1B8;
  --accent-active: #FFD08F;
  --accent-text: #FFDDAD;
  --accent-on-dark: #0B0B0B;

  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.08);

  --card-radius: 12px;
  --button-radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text-primary);
  background: var(--canvas);
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.55;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.brand img {
  width: 180px;
  height: auto;
}

.reading-page {
  margin-top: 32px;
}

.breadcrumb,
.eyebrow {
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--accent-text);
  text-decoration: none;
}

.hero {
  max-width: 780px;
  margin-bottom: 36px;
}

.hero h1 {
  margin: 8px 0 16px;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.1;
  font-weight: 700;
}

.intro {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.spread-card,
.content-body,
.faq,
.related {
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--elevation-1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  margin: 28px 0;
  padding: clamp(20px, 4vw, 40px);
}

.spread-copy h2,
.content-body h2,
.faq h2,
.related h2 {
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 700;
}

.spread-copy p,
.content-body p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.spread-stage {
  position: relative;
  margin: 18px 0 8px;
  touch-action: pan-y;
  user-select: none;
}

.spread-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 20px);
  padding: clamp(16px, 3vw, 28px) clamp(12px, 2.4vw, 24px) clamp(18px, 3vw, 28px);
  margin-bottom: clamp(28px, 4vw, 40px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
}

.slot {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: center;
  transition: transform 160ms ease;
}


.slot-label {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-frame {
  position: relative;
  width: 100%;
  max-width: 200px;
  aspect-ratio: 0.6;
  margin: 0 auto 12px;
  perspective: 1000px;
}

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--card-radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  object-fit: cover;
  transition: transform 600ms ease, opacity 240ms ease;
}

.card-face-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
  border: 1px solid var(--text-tertiary);
  background: transparent;
  border-radius: var(--card-radius);
  transform: rotateY(0deg);
}

.card-face-back {
  transform: rotateY(0deg);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}

.card-face-front {
  transform: rotateY(180deg);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}

.slot.is-landing .card-face-empty {
  opacity: 0;
  border-color: transparent;
}

.slot.is-landing .card-face-back {
  opacity: 1;
}

.slot.is-filled .card-face-empty {
  opacity: 0;
  border-color: transparent;
}

.slot.is-filled .card-face-back {
  opacity: 1;
  transform: rotateY(180deg);
}

.slot.is-filled .card-face-front {
  opacity: 1;
  transform: rotateY(0deg);
}

.slot h3 {
  margin: 14px 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.slot p:last-child {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.deck-strip {
  position: relative;
  margin: 0 auto;
  padding: 14px 0 8px;
}

.deck-strip-track {
  --card-w: 120px;
  --peek: 40px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: calc(var(--card-w) / 0.6);
}

.deck-card {
  --depth: 0;
  position: relative;
  width: var(--card-w);
  aspect-ratio: 0.6;
  margin-left: calc(var(--peek) - var(--card-w));
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  pointer-events: none;
  z-index: calc(50 + var(--depth));
  will-change: transform;
}

.deck-card:first-child {
  margin-left: 0;
}

.deck-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: 0;
}

.deck-card.is-snapping {
  transition: transform 360ms cubic-bezier(0.2, 0.7, 0.3, 1);
  z-index: 999;
}

.deck-card.is-consumed {
  opacity: 0;
}

.deck-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.deck-cta.secondary-button {
  background: rgba(11, 11, 11, 0.78);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  backdrop-filter: blur(4px);
}

.deck-cta.secondary-button:hover {
  background: rgba(11, 11, 11, 0.88);
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--button-radius);
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: var(--accent-on-dark);
}

.primary-button:hover {
  background: var(--accent-hover);
}

.secondary-button {
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ghost-button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
}

.ghost-button:hover {
  color: var(--text-primary);
}

.install-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 26px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 216, 163, 0.08);
  border: 1px solid var(--accent);
  color: var(--text-primary);
}

[hidden] {
  display: none !important;
}

.install-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.install-panel h2 {
  margin: 4px 0 8px;
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.4rem;
}

.content-body {
  display: grid;
  gap: 20px;
}

.faq details {
  border-top: 1px solid var(--card-border);
  padding: 16px 0;
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--card-border);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent-text);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.related-grid a {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  font-weight: 700;
  color: var(--text-primary);
  transition: background 160ms ease;
}

.related-grid a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-footer {
  margin-top: 56px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.7;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 12px;
}

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

.site-footer-links a:hover {
  text-decoration: underline;
}

.site-footer-links span {
  color: var(--text-tertiary);
}

.site-footer-copy {
  margin: 12px 0 0;
  color: var(--text-secondary);
}

@media (max-width: 760px) {
  .site-footer-links {
    gap: 6px 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 760px) {
  .install-panel {
    grid-template-columns: 1fr;
  }

  .spread-table {
    gap: 6px;
    padding: 12px 10px 14px;
  }

  .slot-label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .slot h3 {
    font-size: 0.9rem;
  }

  .slot p:last-child {
    font-size: 0.78rem;
  }

  .deck-cta {
    font-size: 0.85rem;
    padding: 0 16px;
    min-height: 40px;
  }
}
