:root {
  --paper: #f8f4ec;
  --panel: #fffdf8;
  --ink: #21312e;
  --muted: #65716d;
  --line: #d9d0bf;
  --sea: #0f766e;
  --deep: #174642;
  --coral: #cf604e;
  --mustard: #c99627;
  --leaf: #6a8b55;
  --sky: #e7f4f3;
  --shadow: 0 18px 46px rgba(32, 38, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  background: var(--paper);
}

.home-hero {
  position: relative;
  display: flex;
  min-height: 92vh;
  min-height: 92svh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px 56px 46px;
  background-image:
    linear-gradient(90deg, rgba(13, 24, 22, 0.06) 0%, rgba(13, 24, 22, 0.04) 38%, rgba(13, 24, 22, 0.5) 72%, rgba(13, 24, 22, 0.78) 100%),
    url("assets/magical-bali-storybook-hero.webp");
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(180deg, rgba(248, 244, 236, 0), var(--paper));
  pointer-events: none;
  z-index: 0;
}

.home-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fffdf8;
  font-weight: 900;
  text-shadow: 0 2px 14px rgba(5, 16, 14, 0.45);
}

.nav-brand.dark {
  color: var(--deep);
  text-shadow: none;
}

.nav-brand.dark .brand-mark {
  border-color: rgba(15, 118, 110, 0.22);
  background: var(--sky);
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 253, 248, 0.88);
  background: rgba(255, 253, 248, 0.92);
  border-radius: 8px;
  color: var(--deep);
  box-shadow: 0 10px 28px rgba(5, 16, 14, 0.22);
}

.nav-cta,
.hero-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
}

.nav-cta {
  border: 1px solid rgba(255, 253, 248, 0.44);
  background: rgba(255, 253, 248, 0.14);
  color: #fffdf8;
  padding: 9px 13px;
  text-shadow: 0 1px 12px rgba(5, 16, 14, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 690px);
  margin-left: auto;
  padding: 96px 0 32px;
  color: #fffdf8;
  text-shadow: 0 2px 18px rgba(5, 16, 14, 0.36);
}

.hero-content h1 {
  margin-bottom: 18px;
  font-size: 4.65rem;
  line-height: 0.98;
}

.hero-copy {
  max-width: 610px;
  color: #fff8e6;
  font-size: 1.28rem;
  font-weight: 750;
  line-height: 1.42;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-button {
  border: 1px solid transparent;
  padding: 12px 17px;
}

.hero-button.primary {
  background: #fffdf8;
  color: var(--deep);
  box-shadow: 0 18px 34px rgba(5, 16, 14, 0.28);
}

.hero-button.primary:hover {
  background: #fff4cf;
}

.hero-button.secondary {
  border-color: rgba(255, 253, 248, 0.48);
  background: rgba(255, 253, 248, 0.12);
  color: white;
  backdrop-filter: none;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.hero-notes span {
  border: 1px solid rgba(255, 253, 248, 0.48);
  background: rgba(255, 253, 248, 0.14);
  color: #fff8e6;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.feature-kicker {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: var(--sky);
  color: #24413c;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.home-sample {
  padding: 34px 56px 38px;
  background: var(--paper);
}

.examples-section {
  padding: 20px 56px 44px;
  background: var(--paper);
}

.home-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 20px;
}

.home-section-header h2 {
  max-width: 760px;
  font-size: 2.1rem;
  line-height: 1.14;
}

.home-price {
  min-width: 150px;
  border: 1px solid rgba(201, 150, 39, 0.46);
  background: #fff7df;
  border-radius: 8px;
  padding: 13px;
  color: #523b06;
  text-align: center;
}

.home-price strong,
.home-price span {
  display: block;
}

.home-price strong {
  color: #2f2609;
  font-size: 2rem;
  line-height: 1;
}

.home-price span {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-feature-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-feature {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
}

.home-feature h3 {
  margin: 14px 0 8px;
  font-size: 1.08rem;
}

.home-feature p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.48;
}

.example-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.example-card {
  display: grid;
  min-width: 0;
  gap: 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 13px;
}

.example-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  object-fit: cover;
}

.example-card h3 {
  margin: 11px 0 6px;
}

.example-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.mini-puzzle-sheet {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 9px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
  padding: 13px;
}

.mini-puzzle-title {
  color: var(--deep);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
}

.word-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
}

.word-grid span,
.word-search-grid span {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #1d2523;
  background: white;
  color: #1d2523;
  font-weight: 900;
}

.mini-puzzle-sheet p {
  margin: 0;
  color: #3d4c49;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.order-section {
  padding: 42px 56px 48px;
  background: #e7f4f3;
}

.order-inner {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 26px;
  align-items: center;
}

.order-copy h2 {
  max-width: 740px;
  font-size: 2.2rem;
  line-height: 1.12;
}

.order-copy p {
  max-width: 660px;
  color: #4d5e5b;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.55;
}

.access-code-field {
  max-width: 320px;
  margin-top: 18px;
  color: #34504b;
}

.access-code-field input {
  background: rgba(255, 253, 248, 0.84);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.order-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 15px;
  font-weight: 900;
  cursor: pointer;
}

.order-button.primary {
  background: var(--deep);
  color: white;
  box-shadow: 0 16px 30px rgba(23, 70, 66, 0.22);
}

.order-button.primary:hover {
  background: #0f352f;
}

.order-button.secondary {
  border-color: rgba(23, 70, 66, 0.22);
  background: rgba(255, 253, 248, 0.72);
  color: var(--deep);
}

.order-panel {
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: var(--panel);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.order-price {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.order-price span,
.order-price small,
.order-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.order-price strong {
  color: var(--deep);
  font-size: 2.45rem;
  line-height: 1;
}

.order-price small {
  grid-column: 1 / -1;
}

.order-steps {
  display: grid;
  gap: 11px;
  margin: 0;
  padding-left: 22px;
}

.order-steps li {
  padding-left: 3px;
}

.order-steps strong,
.order-steps span {
  display: block;
}

.order-steps strong {
  margin-bottom: 3px;
  color: #233431;
}

.order-steps span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

.order-note {
  margin: 16px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  line-height: 1.45;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  min-height: 100vh;
}

.control-pane {
  border-right: 1px solid var(--line);
  background: #f4eadc;
  padding: 24px;
  overflow-y: auto;
}

.preview-pane {
  padding: 28px;
  overflow-y: auto;
}

.brand-row,
.preview-toolbar,
.section-heading,
.stop-card-header,
.page-meta,
.prompt-top,
.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-row {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--sea);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.55rem;
  line-height: 1.12;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.builder-brand-title {
  font-size: 1.55rem;
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.price-pill,
.section-heading span,
.page-chip {
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: var(--sky);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 9px;
  border-radius: 8px;
  white-space: nowrap;
}

.section-block {
  border-top: 1px solid rgba(33, 49, 46, 0.14);
  padding-top: 18px;
  margin-top: 18px;
}

.field-grid {
  display: grid;
  gap: 10px;
}

.field-grid.two {
  grid-template-columns: 1fr 112px;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.optional-label {
  color: #7d8782;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffaf2;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.helper-text {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 10px 0 14px;
}

.stop-list {
  display: grid;
  gap: 12px;
}

.stop-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
}

.stop-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 0.95rem;
}

.stop-title input {
  width: auto;
}

.order-buttons {
  display: flex;
  gap: 6px;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fffaf2;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}

.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.stop-details {
  display: none;
  margin-top: 12px;
}

.stop-card.selected .stop-details {
  display: block;
}

.activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 12px;
}

.activity-choice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(217, 208, 191, 0.8);
  background: #fffaf2;
  border-radius: 8px;
  padding: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
}

.activity-choice input {
  width: auto;
  margin-top: 2px;
}

.activity-choice.disabled {
  opacity: 0.45;
}

.preview-toolbar {
  margin-bottom: 18px;
}

.preview-toolbar h2 {
  font-size: 1.8rem;
}

.toolbar-actions button,
.tab-button,
.copy-prompt {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 800;
  cursor: pointer;
}

.toolbar-actions button:hover,
.tab-button:hover,
.copy-prompt:hover,
.icon-button:hover {
  border-color: var(--sea);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.summary-item {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
}

.summary-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.summary-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab-button.active {
  border-color: var(--sea);
  background: var(--deep);
  color: white;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.page-stack {
  display: grid;
  gap: 12px;
}

.book-page,
.prompt-card,
.puzzle-card,
.json-box {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.book-page.cover-page {
  border-color: rgba(207, 96, 78, 0.36);
  background: #fff7ef;
}

.page-meta {
  margin-bottom: 12px;
}

.page-body {
  color: #2b3b38;
  line-height: 1.58;
  white-space: pre-line;
}

.activity-note {
  margin: 14px 0 0;
  border-left: 4px solid var(--mustard);
  background: #fff7df;
  padding: 10px 12px;
  color: #4c3a12;
  font-weight: 750;
  line-height: 1.45;
}

.colouring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.line-art {
  position: relative;
  min-height: 180px;
  border: 2px solid #1d2523;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 22%, transparent 0 18px, #1d2523 19px 20px, transparent 21px),
    radial-gradient(circle at 77% 18%, transparent 0 24px, #1d2523 25px 26px, transparent 27px),
    linear-gradient(150deg, transparent 0 58%, #1d2523 58.5% 59.5%, transparent 60%),
    linear-gradient(14deg, transparent 0 62%, #1d2523 62.5% 63.5%, transparent 64%),
    #ffffff;
  overflow: hidden;
}

.colouring-example-image {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  object-fit: cover;
}

.line-art::before,
.line-art::after {
  content: "";
  position: absolute;
  border: 2px solid #1d2523;
  border-radius: 50%;
}

.line-art::before {
  width: 78px;
  height: 78px;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
}

.line-art::after {
  width: 220px;
  height: 58px;
  left: -18px;
  bottom: -30px;
}

.prompt-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.puzzle-card ul,
.puzzle-card ol {
  margin-bottom: 0;
  padding-left: 22px;
  line-height: 1.55;
}

.puzzle-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.puzzle-sheet {
  background: #fffefb;
}

.word-search-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 10px 0 12px;
}

.puzzle-word-bank {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.4;
}

.route-puzzle {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.route-stop {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 2px 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: white;
}

.route-stop span {
  grid-row: span 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky);
  color: var(--deep);
  font-weight: 900;
}

.route-stop strong {
  font-size: 0.9rem;
}

.route-stop small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.3;
}

.quiz-example {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.quiz-example li {
  border-bottom: 1px dashed rgba(33, 49, 46, 0.28);
  padding-bottom: 7px;
}

.json-box {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.brief-box {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: #253533;
}

.pack-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  background: #eef8f5;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
}

.pack-hero h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.pack-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 750;
}

.price-card {
  min-width: 136px;
  border: 1px solid rgba(201, 150, 39, 0.46);
  background: #fff7df;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.price-card strong,
.price-card span {
  display: block;
}

.price-card strong {
  font-size: 1.8rem;
  line-height: 1;
}

.price-card span {
  margin-top: 5px;
  color: #674b0b;
  font-size: 0.78rem;
  font-weight: 850;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pack-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
}

.pack-card ul {
  margin: 0;
  padding-left: 20px;
  color: #30413e;
  line-height: 1.55;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  min-width: 180px;
  border-radius: 8px;
  background: var(--deep);
  color: white;
  padding: 10px 14px;
  text-align: center;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

#toast.visible {
  opacity: 1;
}

.download-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(231, 244, 243, 0.95), rgba(248, 244, 236, 0.96)),
    url("assets/magical-bali-storybook-hero.webp") center / cover;
}

.download-panel {
  display: grid;
  width: min(100%, 560px);
  gap: 38px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  padding: 24px;
  box-shadow: var(--shadow);
}

.download-state h1 {
  margin-bottom: 10px;
  font-size: 2.35rem;
  line-height: 1.05;
}

.download-state p {
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.5;
}

.download-reference {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: var(--sky);
  color: var(--deep);
  padding: 7px 9px;
  font-size: 0.78rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.download-progress {
  display: none;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e0d7c8;
}

.download-progress.active {
  display: block;
}

.download-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--sea);
  animation: loading-slide 1.2s ease-in-out infinite;
}

.download-steps {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.download-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.download-steps span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e0d7c8;
  color: #4d5e5b;
  font-size: 0.78rem;
}

.download-steps li.active,
.download-steps li.complete {
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--deep);
}

.download-steps li.active span,
.download-steps li.complete span {
  background: var(--sea);
  color: white;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.download-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(23, 70, 66, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--deep);
  padding: 11px 15px;
  font-weight: 900;
}

.download-button.primary {
  border-color: transparent;
  background: var(--deep);
  color: white;
}

.download-footnote {
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.42;
}

@keyframes loading-slide {
  0% {
    transform: translateX(-110%);
  }
  50% {
    transform: translateX(75%);
  }
  100% {
    transform: translateX(245%);
  }
}

@media (max-width: 980px) {
  .home-hero {
    min-height: 86vh;
    min-height: 86svh;
    padding: 22px 28px 46px;
    background-image:
      linear-gradient(90deg, rgba(13, 24, 22, 0.08) 0%, rgba(13, 24, 22, 0.18) 42%, rgba(13, 24, 22, 0.72) 100%),
      url("assets/magical-bali-storybook-hero.webp");
  }

  .hero-content h1 {
    font-size: 3.8rem;
  }

  .home-sample {
    padding: 30px 28px 34px;
  }

  .examples-section {
    padding: 18px 28px 34px;
  }

  .order-section {
    padding: 34px 28px 38px;
  }

  .order-inner {
    grid-template-columns: 1fr;
  }

  .home-feature-grid,
  .example-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .control-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip,
  .colouring-grid,
  .puzzle-example-grid,
  .pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .home-hero {
    min-height: 90vh;
    min-height: 90svh;
    padding: 18px 18px 38px;
    background-image:
      linear-gradient(180deg, rgba(13, 24, 22, 0.02) 0%, rgba(13, 24, 22, 0.2) 34%, rgba(13, 24, 22, 0.84) 82%),
      url("assets/magical-bali-storybook-hero.webp");
    background-position: 37% center;
  }

  .home-nav {
    align-items: flex-start;
  }

  .nav-brand {
    align-items: flex-start;
  }

  .nav-brand span:last-child {
    max-width: 142px;
    line-height: 1.08;
  }

  .nav-cta {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .hero-content {
    padding-top: 120px;
  }

  .hero-content h1 {
    font-size: 2.72rem;
  }

  .hero-copy {
    font-size: 1.06rem;
  }

  .hero-button {
    width: 100%;
  }

  .home-sample {
    padding: 24px 18px 28px;
  }

  .examples-section {
    padding: 18px 18px 30px;
  }

  .order-section {
    padding: 28px 18px 32px;
  }

  .order-copy h2 {
    font-size: 1.52rem;
  }

  .order-copy p {
    font-size: 0.96rem;
  }

  .order-actions,
  .order-button {
    width: 100%;
  }

  .order-price {
    grid-template-columns: 1fr;
  }

  .home-section-header {
    flex-direction: column;
    margin-bottom: 16px;
  }

  .home-section-header h2 {
    font-size: 1.45rem;
  }

  .home-price {
    width: 100%;
  }

  .home-feature-grid,
  .example-grid {
    grid-template-columns: 1fr;
  }

  .control-pane,
  .preview-pane {
    padding: 18px;
  }

  .brand-row,
  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-grid.two,
  .summary-strip,
  .colouring-grid,
  .puzzle-example-grid,
  .pack-grid {
    grid-template-columns: 1fr;
  }

  .pack-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-toolbar h2 {
    font-size: 1.35rem;
  }

  .download-shell {
    padding: 18px;
  }

  .download-panel {
    gap: 30px;
    padding: 18px;
  }

  .download-state h1 {
    font-size: 1.85rem;
  }

  .download-actions,
  .download-button {
    width: 100%;
  }
}

@media print {
  body {
    background: white;
  }

  .control-pane,
  .preview-toolbar,
  .summary-strip,
  .tab-row,
  #toast {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .preview-pane {
    padding: 0;
  }

  .tab-panel {
    display: none;
  }

  .tab-panel.active {
    display: block;
  }

  .book-page {
    break-inside: avoid;
    box-shadow: none;
    margin-bottom: 12px;
  }
}
