:root {
  color-scheme: light;
  --bg: #e7d9c8;
  --surface: #f6f1e8;
  --surface-strong: #fff8ed;
  --ink: #2f2a28;
  --muted: #756555;
  --line: #cbbca8;
  --accent: #b88a55;
  --accent-dark: #7b5d49;
  --green: #7b8576;
  --warm: #b88a55;
  --shadow: 0 12px 28px rgba(47, 42, 40, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 144px;
  background:
    radial-gradient(circle at top left, rgba(184, 138, 85, 0.18), transparent 32rem),
    linear-gradient(180deg, #f6f1e8 0%, var(--bg) 52%, #d8c6af 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(47, 42, 40, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 42, 40, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.1;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(246, 241, 232, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-logo {
  display: block;
  width: 150px;
  max-width: 46vw;
  height: auto;
  margin-bottom: 8px;
  mix-blend-mode: multiply;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.primary-button,
.icon-button {
  min-height: 42px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.primary-button {
  padding: 0 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  border-radius: 50%;
  background: #eee8dc;
  color: var(--ink);
  font-size: 22px;
}

.primary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

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

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

.hero-actions a {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(47, 42, 40, 0.22);
  border-radius: 8px;
  background: rgba(246, 241, 232, 0.72);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.hero-actions a:first-child {
  background: var(--ink);
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 56px) 64px;
}

.sidebar {
  position: sticky;
  top: 102px;
  align-self: start;
}

.progress-panel,
.panel,
details,
.step-card,
.info-grid > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.progress-panel {
  padding: 18px;
  box-shadow: var(--shadow);
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--muted);
}

.progress-row strong {
  color: var(--ink);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e1d6;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.2s ease;
}

.step-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.step-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.step-nav a:hover,
.step-nav a:focus {
  background: #eee8dc;
  color: var(--ink);
}

.content {
  min-width: 0;
}

.manual-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(22px, 4vw, 40px);
  align-items: stretch;
  min-height: 340px;
  padding: clamp(22px, 4vw, 38px);
  background: rgba(255, 248, 237, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-showcase {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  min-height: 320px;
}

.hero-image,
.step-media {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed #c7bba9;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 116, 109, 0.14), rgba(214, 154, 74, 0.16)),
    #f4efe6;
  color: var(--muted);
  text-align: center;
}

.hero-image {
  align-content: center;
}

.hero-image span,
.step-media span {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
}

.hero-image small {
  display: block;
  margin-top: 4px;
}

.product-shot {
  width: 100%;
  min-height: 320px;
  background: rgba(255, 253, 248, 0.45);
  box-shadow: 0 14px 30px rgba(47, 42, 40, 0.14);
}

.hero-image img,
.step-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
  border-radius: inherit;
}

.step-card .step-media {
  background: transparent;
  border-style: solid;
  cursor: zoom-in;
}

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

.symbol-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.symbol-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.symbol-card strong {
  font-size: 14px;
  line-height: 1.3;
}

.symbol-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.info-grid > div {
  padding: 16px;
}

.info-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.section {
  margin-top: 46px;
}

.quiet-note {
  margin-top: 18px;
  padding: 18px 20px;
  background: rgba(246, 241, 232, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quiet-note p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.section-heading {
  margin-bottom: 18px;
}

#steps {
  perspective: 1200px;
  scroll-margin-top: 86px;
}

#steps .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

#steps .section-heading::after {
  color: var(--muted);
  content: "← / → 切换步骤";
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

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

.panel {
  padding: 20px;
}

.panel label,
.complete-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  color: var(--muted);
}

.check-item {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.step-card {
  position: relative;
  display: none;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 14px;
  padding: 12px;
  overflow: hidden;
  min-height: min(650px, calc(100vh - 244px));
  background:
    linear-gradient(90deg, rgba(47, 42, 40, 0.08), transparent 22px),
    linear-gradient(180deg, #fffdf7 0%, #fbf4e8 100%);
  box-shadow: 0 16px 34px rgba(47, 42, 40, 0.16), inset -10px 0 18px rgba(47, 42, 40, 0.06);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: pageIn 0.22s ease both;
}

.step-card.current {
  display: grid;
}

.step-card > .step-media {
  min-height: min(70vh, 640px);
}

.step-card.current::before,
.step-card.current::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.step-card.current::before {
  top: 12px;
  right: 11px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(47, 42, 40, 0.18), transparent);
}

.step-card.current::after {
  right: 0;
  bottom: 0;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, transparent 48%, rgba(184, 138, 85, 0.16) 50%, rgba(47, 42, 40, 0.12) 100%);
  box-shadow: -8px -8px 18px rgba(47, 42, 40, 0.05);
}

#steps.turn-next .step-card.current {
  transform-origin: left center;
  animation: bookFlipNext 0.48s cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

#steps.turn-prev .step-card.current {
  transform-origin: right center;
  animation: bookFlipPrev 0.48s cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

.step-media.gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  min-height: 220px;
  padding: 8px;
  background: transparent;
  border-style: solid;
}

.step-media.gallery.four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.step-media.gallery img {
  min-height: 0;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: transparent;
  border: 1px solid rgba(47, 42, 40, 0.08);
}

.step-media.pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.step-media.pair img {
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  background: transparent;
  border: 1px solid rgba(47, 42, 40, 0.08);
}

.step-card.done {
  border-color: rgba(47, 116, 109, 0.45);
  background: #fbfff9;
}

.step-card.just-completed {
  animation: completedPulse 0.72s ease both;
}

.step-card.current {
  border-color: rgba(47, 116, 109, 0.7);
}

.step-card.current .step-number {
  background: var(--ink);
  color: #fff;
}

.step-card.done .step-number {
  background: var(--accent);
  color: #fff;
}

.step-body {
  display: none;
  flex-direction: column;
  justify-content: center;
}

.step-body p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.step-feel {
  display: none;
  margin: 6px 0 0;
  padding: 9px 11px;
  background: rgba(184, 138, 85, 0.16);
  border: 1px solid rgba(184, 138, 85, 0.3);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.38;
}

.step-feel::before {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  content: "本步小成就";
  font-size: 12px;
  font-weight: 800;
}

.step-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.step-title h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(184, 138, 85, 0.2);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.complete-row {
  display: none;
  width: fit-content;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

details {
  padding: 16px 18px;
  margin-bottom: 10px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details p {
  margin: 12px 0 0;
  color: var(--muted);
}

.care-list {
  padding-left: 20px;
  color: var(--muted);
}

.image-lightbox,
.completion-toast,
.finale-overlay {
  display: none;
}

.mobile-stepbar {
  position: fixed;
  right: max(18px, calc((100vw - 760px) / 2));
  bottom: 14px;
  left: max(18px, calc((100vw - 760px) / 2));
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.mobile-stepbar button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #eee8dc;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.mobile-stepbar button:disabled {
  cursor: default;
  opacity: 0.45;
}

.mobile-stepbar #completeStep {
  background: var(--ink);
  color: #fff;
}

.mobile-stepbar span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.step-mood-card {
  grid-column: 1 / -1;
  padding: 9px 11px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid rgba(47, 42, 40, 0.12);
  border-radius: 8px;
  text-align: left;
}

.step-mood-card small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.step-mood-card #stepMood {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.42;
}

.next-preview {
  display: none;
}

.mobile-stepbar .sound-toggle {
  grid-column: 1 / -1;
  justify-self: center;
  min-height: 30px;
  padding: 0 12px;
  background: rgba(47, 42, 40, 0.08);
  color: var(--accent-dark);
  font-size: 12px;
}

.mobile-stepbar .sound-toggle[aria-pressed="false"] {
  opacity: 0.62;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  place-items: center;
  padding: 20px;
  background: rgba(20, 18, 16, 0.86);
}

.image-lightbox:not([hidden]) {
  display: grid;
}

.image-lightbox img {
  max-width: min(100%, 980px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--green);
}

.lightbox-close {
  position: fixed;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.completion-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  z-index: 60;
  width: min(340px, calc(100vw - 32px));
  padding: 16px 18px 16px 58px;
  background: rgba(255, 248, 237, 0.96);
  border: 1px solid rgba(184, 138, 85, 0.45);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(47, 42, 40, 0.2);
  transform: translate(-50%, 18px) scale(0.96);
  opacity: 0;
  pointer-events: none;
}

.completion-toast.show {
  display: block;
  animation: toastRise 2.1s ease both;
}

.toast-mark {
  position: absolute;
  left: 16px;
  top: 17px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.completion-toast strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.completion-toast p {
  margin: 0;
  color: var(--accent-dark);
  font-size: 14px;
  line-height: 1.45;
}

.completion-toast i {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}

.completion-toast i:nth-child(1) {
  right: 22px;
}

.completion-toast i:nth-child(2) {
  right: 42px;
  top: 24px;
}

.completion-toast i:nth-child(3) {
  right: 62px;
  top: 13px;
}

.completion-toast.show i {
  animation: sparkleFloat 1.1s ease-out both;
}

.completion-toast.show i:nth-child(2) {
  animation-delay: 0.08s;
}

.completion-toast.show i:nth-child(3) {
  animation-delay: 0.16s;
}

.finale-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 28%, rgba(184, 138, 85, 0.32), transparent 20rem),
    rgba(47, 42, 40, 0.52);
  backdrop-filter: blur(12px);
}

.finale-overlay.show {
  display: grid;
  animation: finaleFade 0.34s ease both;
}

.finale-card {
  position: relative;
  width: min(460px, 100%);
  overflow: hidden;
  padding: 26px 24px 22px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(246, 241, 232, 0.98)),
    var(--surface-strong);
  border: 1px solid rgba(184, 138, 85, 0.42);
  border-radius: 10px;
  box-shadow: 0 28px 70px rgba(20, 18, 16, 0.35);
  text-align: center;
  animation: finalePop 0.56s cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

.finale-card h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 5vw, 38px);
}

.finale-card p:not(.eyebrow) {
  margin: 0 auto 16px;
  max-width: 34em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.finale-progress {
  display: grid;
  gap: 2px;
  margin: 18px 0;
  padding: 14px;
  background: rgba(184, 138, 85, 0.14);
  border: 1px solid rgba(184, 138, 85, 0.28);
  border-radius: 8px;
}

.finale-progress strong {
  color: var(--accent-dark);
  font-size: 30px;
  line-height: 1;
}

.finale-progress span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finale-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.finale-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #eee8dc;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.finale-actions button:first-child {
  background: var(--ink);
  color: #fff;
}

.finale-burst span {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: finaleSpark 1.4s ease-out infinite;
}

.finale-burst span:nth-child(1) {
  --x: -128px;
  --y: -58px;
}

.finale-burst span:nth-child(2) {
  --x: 118px;
  --y: -36px;
  animation-delay: 0.12s;
}

.finale-burst span:nth-child(3) {
  --x: -92px;
  --y: 52px;
  animation-delay: 0.22s;
}

.finale-burst span:nth-child(4) {
  --x: 88px;
  --y: 62px;
  animation-delay: 0.32s;
}

.finale-burst span:nth-child(5) {
  --x: 0;
  --y: -92px;
  animation-delay: 0.42s;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .step-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .step-nav a {
    text-align: center;
  }

  .manual-hero,
  .step-card,
  .two-column {
    grid-template-columns: 1fr;
  }

  .step-card {
    gap: 8px;
  }

  .step-card > .step-media {
    min-height: min(70vh, 640px);
  }

  .step-body {
    display: none;
  }

  .step-title {
    gap: 8px;
  }

  .step-title h3 {
    margin-bottom: 2px;
    font-size: 16px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .step-body p {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.38;
  }

  .step-feel {
    margin-top: 4px;
    padding: 7px 9px;
    font-size: 12px;
    line-height: 1.32;
  }

  .step-feel::before {
    margin-bottom: 1px;
    font-size: 10px;
  }

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

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  body {
    padding-bottom: 0;
  }

  .topbar {
    display: none;
  }

  .sidebar,
  .manual-hero,
  .compact-info,
  .quiet-note,
  #symbols,
  #parts,
  #troubleshooting,
  #care {
    display: none;
  }

  .layout {
    display: block;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    padding: 0 10px;
  }

  .section {
    margin-top: 0;
  }

  #steps .section-heading {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    margin: 0 -10px 8px;
    padding: 10px 12px;
    background: rgba(246, 241, 232, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  #steps .section-heading .eyebrow {
    display: none;
  }

  #steps .section-heading h2 {
    margin: 0;
    font-size: 18px;
  }

  #steps .section-heading::after {
    color: var(--muted);
    content: "左右翻页";
    font-size: 12px;
    font-weight: 700;
  }

  #steps {
    perspective: 1200px;
    scroll-margin-top: 10px;
  }

  .step-card {
    position: relative;
    scroll-margin-top: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 7px;
    height: calc(100svh - 58px - 218px - 18px);
    min-height: 0;
    padding: 8px;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(47, 42, 40, 0.08), transparent 20px),
      linear-gradient(180deg, #fffdf7 0%, #fbf4e8 100%);
    border: 1px solid rgba(47, 42, 40, 0.12);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(47, 42, 40, 0.16), inset -10px 0 18px rgba(47, 42, 40, 0.06);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    animation: pageIn 0.22s ease both;
    grid-template-rows: minmax(0, 1fr);
  }

  .step-card.current {
    display: grid;
    align-items: stretch;
  }

  .step-card.current::before,
  .step-card.current::after {
    position: absolute;
    pointer-events: none;
    content: "";
  }

  .step-card.current::before {
    top: 12px;
    right: 11px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(47, 42, 40, 0.18), transparent);
  }

  .step-card.current::after {
    right: 0;
    bottom: 0;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, transparent 48%, rgba(184, 138, 85, 0.16) 50%, rgba(47, 42, 40, 0.12) 100%);
    box-shadow: -8px -8px 18px rgba(47, 42, 40, 0.05);
  }

  #steps.turn-next .step-card.current {
    transform-origin: left center;
    animation: bookFlipNext 0.48s cubic-bezier(0.2, 0.72, 0.18, 1) both;
  }

  #steps.turn-prev .step-card.current {
    transform-origin: right center;
    animation: bookFlipPrev 0.48s cubic-bezier(0.2, 0.72, 0.18, 1) both;
  }

  .step-card > .step-media,
  .step-media {
    min-height: 0;
    height: calc(100svh - 58px - 218px - 18px - 16px);
    max-height: calc(100svh - 58px - 218px - 18px - 16px);
    align-self: stretch;
    overflow: hidden;
    touch-action: pan-y;
  }

  .step-media.pair {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .step-media.gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(0, 1fr);
  }

  .step-media img,
  .step-media.pair img,
  .step-media.gallery img {
    min-height: 0;
    max-height: 100%;
    object-fit: contain;
  }

  .step-title {
    align-items: flex-start;
    gap: 8px;
  }

  .step-body {
    display: none;
  }

  .step-title h3 {
    font-size: 16px;
    margin-bottom: 2px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .step-body p {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.38;
  }

  .step-feel {
    margin-top: 4px;
    padding: 7px 9px;
    font-size: 12px;
    line-height: 1.32;
  }

  .step-feel::before {
    margin-bottom: 1px;
    font-size: 10px;
  }

  .step-card.current .step-feel {
    background: rgba(184, 138, 85, 0.22);
    box-shadow: inset 0 0 0 1px rgba(184, 138, 85, 0.28);
  }

  .mobile-stepbar {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 7px;
    min-height: 208px;
    padding: 8px 10px;
    background: rgba(255, 253, 248, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }

  .mobile-stepbar button {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: #eee8dc;
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
  }

  .mobile-stepbar button:disabled {
    cursor: default;
    opacity: 0.45;
  }

  .mobile-stepbar #completeStep {
    background: var(--ink);
    color: #fff;
  }

  .mobile-stepbar span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
  }

  .step-mood-card {
    grid-column: 1 / -1;
    padding: 8px 10px;
    background: rgba(255, 253, 248, 0.7);
    border: 1px solid rgba(47, 42, 40, 0.12);
    border-radius: 8px;
    text-align: left;
  }

  .step-mood-card small {
    display: block;
    margin-bottom: 1px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .step-mood-card #stepMood {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.34;
  }

  .next-preview {
    display: none;
  }

  .mobile-stepbar .sound-toggle {
    grid-column: 1 / -1;
    justify-self: center;
    min-height: 28px;
    padding: 0 12px;
    background: rgba(47, 42, 40, 0.08);
    color: var(--accent-dark);
    font-size: 12px;
  }

  .mobile-stepbar .sound-toggle[aria-pressed="false"] {
    opacity: 0.62;
  }

  .mobile-stepbar button {
    min-height: 38px;
  }

  .completion-toast {
    bottom: 244px;
  }

  .finale-overlay {
    padding: 14px;
  }

  .finale-card {
    padding: 22px 18px 18px;
  }

  .finale-card h2 {
    font-size: 28px;
  }

  .finale-card p:not(.eyebrow) {
    font-size: 14px;
  }

  .finale-actions {
    grid-template-columns: 1fr;
  }

  #steps .section-heading {
    margin-bottom: 12px;
  }
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bookFlipNext {
  0% {
    opacity: 0.28;
    transform: translateX(24px) rotateY(-24deg) scale(0.98);
    filter: brightness(0.94);
  }

  58% {
    opacity: 1;
    filter: brightness(1.02);
  }

  100% {
    opacity: 1;
    transform: translateX(0) rotateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes bookFlipPrev {
  0% {
    opacity: 0.28;
    transform: translateX(-24px) rotateY(24deg) scale(0.98);
    filter: brightness(0.94);
  }

  58% {
    opacity: 1;
    filter: brightness(1.02);
  }

  100% {
    opacity: 1;
    transform: translateX(0) rotateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes toastRise {
  0% {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.96);
  }

  16%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.98);
  }
}

@keyframes completedPulse {
  0% {
    box-shadow: 0 0 0 rgba(184, 138, 85, 0);
    transform: scale(1);
  }

  35% {
    box-shadow: 0 0 0 5px rgba(184, 138, 85, 0.18);
    transform: scale(1.006);
  }

  100% {
    box-shadow: var(--shadow);
    transform: scale(1);
  }
}

@keyframes sparkleFloat {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.5);
  }

  35% {
    opacity: 0.8;
  }

  100% {
    opacity: 0;
    transform: translateY(-20px) scale(1);
  }
}

@keyframes finaleFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes finalePop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }

  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.012);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes finaleSpark {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.45);
  }

  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.2);
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .sidebar,
  .complete-row,
  .mobile-stepbar,
  .image-lightbox,
  .completion-toast,
  .finale-overlay {
    display: none;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .manual-hero,
  .step-card,
  .panel,
  details,
  .info-grid > div {
    box-shadow: none;
    break-inside: avoid;
  }
}
