:root {
  color-scheme: light;
  --ink: #49343a;
  --muted: #8d6970;
  --pink-strong: #e9a6b0;
  --pink: #f4c9cf;
  --pink-soft: #fff2f4;
  --rose: #d78191;
  --cream: #fbf7ef;
  --paper: #fffdf9;
  --oat: #e9dfcd;
  --terracotta: #bc7e58;
  --clay: #a2663f;
  --amber: #e4c496;
  --sage: #95a083;
  --line: rgba(73, 52, 58, 0.12);
  --shadow: 0 24px 70px rgba(139, 86, 94, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 10%, rgba(244, 201, 207, 0.55), transparent 28%),
    linear-gradient(135deg, #fff7f5 0%, #fbf7ef 48%, #f4ddd2 100%);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-fallback-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.app-fallback-card {
  width: min(100%, 360px);
  border: 1px solid rgba(73, 52, 58, 0.1);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 252, 250, 0.92), rgba(255, 244, 247, 0.78)),
    #fff;
  box-shadow: 0 18px 52px rgba(139, 86, 94, 0.12);
}

.app-fallback-card p,
.app-fallback-card h1,
.app-fallback-card span {
  margin: 0;
}

.app-fallback-card p {
  color: var(--rose);
  font-size: 13px;
  font-weight: 900;
}

.app-fallback-card h1 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.18;
}

.app-fallback-card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.app-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 420px) minmax(220px, 0.75fr);
  gap: 28px;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.desktop-story,
.desktop-notes {
  max-width: 360px;
}

.desktop-story h1 {
  margin: 12px 0 10px;
  font-size: 48px;
  line-height: 1.02;
}

.desktop-story p,
.desktop-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.story-visual {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 242, 244, 0.06), rgba(251, 247, 239, 0.52)),
    url("../assets/scenes/anniversary-letter-scene.webp") center / cover;
  box-shadow: var(--shadow);
}

.story-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.story-points span,
.meta-row span,
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 12px;
}

.phone-shell {
  position: relative;
  height: min(860px, calc(100vh - 38px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 248, 248, 0.98), rgba(255, 253, 249, 0.98)),
    var(--paper);
  box-shadow: 0 28px 86px rgba(105, 64, 72, 0.22);
}

.app-topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 14px;
  background: rgba(255, 250, 250, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(73, 52, 58, 0.06);
}

.app-topbar h2,
.modal-head h2,
.desktop-notes h3,
.paper-card h3,
.event-card h3,
.date-card h3,
.month-summary h3,
.memory-note h3,
.couple-card h3,
.home-profile h3,
.member-card h3,
.pet-card h3,
.settings-list h3,
.mood-panel h3 {
  margin: 0;
}

.app-topbar h2 {
  font-size: 20px;
  line-height: 1.1;
}

.eyebrow,
.card-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screen {
  height: calc(100% - 172px);
  overflow: auto;
  padding: 16px 18px 108px;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.tabbar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 66px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(73, 52, 58, 0.08);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: 0 18px 52px rgba(113, 68, 76, 0.16);
  backdrop-filter: blur(18px);
}

.tab-button,
.icon-button,
.soft-action,
.text-button,
.primary-button,
.chip,
.idea-slip,
.mood-chip,
.reset-button {
  border: 0;
}

.tab-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
}

.tab-button span {
  font-size: 17px;
  line-height: 1;
}

.tab-button small {
  font-size: 11px;
  white-space: nowrap;
}

.tab-button.active {
  background: var(--pink-soft);
  color: var(--ink);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-scene {
  min-height: 246px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--pink-soft);
  box-shadow: 0 18px 42px rgba(194, 91, 110, 0.12);
}

.hero-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 238, 242, 0.08), rgba(75, 42, 48, 0.54)),
    url("../assets/scenes/date-sunset-walk.webp") center / cover;
  transform: scale(1.02);
}

.hero-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
  text-shadow: 0 1px 18px rgba(80, 30, 42, 0.28);
}

.day-count {
  font-size: clamp(56px, 18vw, 88px);
  font-weight: 760;
  line-height: 0.92;
}

.hero-content p:last-child {
  max-width: 260px;
  margin: 6px 0 0;
  line-height: 1.5;
}

.action-row,
.button-row,
.chip-row,
.meta-row {
  display: flex;
  align-items: center;
}

.action-row {
  gap: 8px;
  margin: 14px 0;
}

.soft-action,
.text-button,
.primary-button,
.reset-button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 700;
  white-space: nowrap;
}

.soft-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.soft-action.compact {
  flex: 0 0 auto;
}

.primary-button {
  background: var(--ink);
  color: #fff;
}

.primary-button.full {
  width: 100%;
}

.text-button {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.paper-card,
.mood-panel,
.event-card,
.month-summary,
.memory-note,
.couple-card,
.home-profile,
.member-card,
.comfort-console,
.route-card,
.settings-list article,
.pet-card,
.date-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.home-console {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(233, 166, 176, 0.42);
  border-radius: 10px;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.82), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(228, 196, 150, 0.35), transparent 26%),
    linear-gradient(145deg, #f5c7cf 0%, #fff4f5 58%, #fffaf2 100%);
  box-shadow: 0 22px 60px rgba(194, 91, 110, 0.17);
}

.home-sky {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.home-sky h3 {
  margin: 0;
  font-size: 46px;
  line-height: 0.95;
}

.home-sky span,
.comfort-console span,
.member-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.signal-button {
  min-width: 96px;
  min-height: 96px;
  border: 0;
  border-radius: 50%;
  padding: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.18;
  box-shadow: 0 16px 40px rgba(73, 52, 58, 0.25);
}

.family-orbit {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 16px;
}

.couple-orb,
.pet-orb {
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(73, 52, 58, 0.04);
}

.couple-orb {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(73, 52, 58, 0.16)),
    url("../assets/scenes/birthday-card-scene.webp") center / cover;
  color: #fff;
  text-shadow: 0 1px 16px rgba(73, 52, 58, 0.35);
}

.couple-orb span {
  font-size: 12px;
  font-weight: 800;
}

.couple-orb strong {
  font-size: 50px;
  line-height: 0.9;
}

.pet-orb {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.member-card .pet-face {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--clay);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(73, 52, 58, 0.08);
}

.pet-orb::before {
  display: none;
}

.pet-avatar {
  width: 46px;
  height: 46px;
  position: absolute;
  right: 10px;
  top: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(73, 52, 58, 0.12);
}

.pet-avatar img,
.pet-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pet-orb.rose {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 241, 244, 0.9)),
    var(--pet-cover) center 38% / cover;
}

.pet-orb.cream {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 242, 0.92)),
    var(--pet-cover) center 44% / cover;
}

.pet-orb strong {
  font-size: 19px;
  line-height: 1;
}

.pet-orb small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.22;
}

.comfort-console {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.62);
}

.comfort-copy {
  min-width: 0;
  flex: 1;
}

.comfort-scene {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
}

.comfort-console h3 {
  margin: 0;
  font-size: 20px;
}

.comfort-console.active {
  border-color: rgba(73, 52, 58, 0.24);
  background: linear-gradient(135deg, #4d333a, #7d4c59);
  color: #fff;
}

.comfort-console.active .eyebrow,
.comfort-console.active span {
  color: rgba(255, 255, 255, 0.74);
}

.comfort-console.active .primary-button {
  background: #fff;
  color: var(--ink);
}

.comfort-console.active .comfort-scene {
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.launch-milestone {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(233, 166, 176, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 242, 244, 0.72)),
    var(--paper);
  box-shadow: 0 18px 48px rgba(194, 91, 110, 0.13);
}

.screen > .launch-milestone:first-child {
  margin-top: 0;
}

.launch-milestone.anniversary-focus {
  margin: 0 0 12px;
}

.milestone-scene {
  min-height: 178px;
}

.launch-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.launch-copy h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
}

.launch-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.launch-counter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.launch-counter strong {
  color: var(--clay);
  font-size: 42px;
  line-height: 0.9;
}

.launch-counter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.visual-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 10px;
  margin-bottom: 12px;
}

.visual-tile {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.countdown-tile {
  background: linear-gradient(135deg, #fff7f8, #fffaf2);
}

.countdown-tile strong {
  display: block;
  color: var(--clay);
  font-size: 50px;
  line-height: 0.94;
}

.countdown-tile span,
.mood-tile span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.mood-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #fff2f4, #fff);
}

.mood-mark.mini {
  width: 50px;
  height: 50px;
  font-size: 26px;
}

.route-card {
  min-height: 216px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 85% 22%, rgba(255, 255, 255, 0.88), transparent 24%),
    linear-gradient(145deg, #f4c9cf 0%, #fff7f5 56%, #fffaf2 100%);
}

.scene-media {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--pink-soft);
}

.scene-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.scene-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(73, 52, 58, 0.3));
  pointer-events: none;
}

.scene-media span {
  position: absolute;
  left: 10px;
  bottom: 9px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.pet-pair-scene {
  background:
    linear-gradient(135deg, rgba(255, 242, 244, 0.92), rgba(255, 250, 242, 0.92)),
    var(--pink-soft);
}

.pet-pair-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.pet-pair-grid figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 8px;
  background: #fff;
}

.pet-pair-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pet-pair-grid figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.slip-scene .pet-pair-grid {
  gap: 5px;
  padding: 5px;
}

.slip-scene .pet-pair-grid figcaption {
  display: none;
}

.route-scene {
  height: 128px;
  margin: -6px -6px 14px;
}

.route-card h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
}

.route-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.vehicle-dock {
  margin-top: 12px;
}

.section-minihead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

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

.vehicle-name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.vehicle-name-row span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 242, 244, 0.78);
  color: var(--clay);
  font-size: 12px;
  font-weight: 850;
}

.paper-card {
  padding: 18px;
  margin-bottom: 12px;
}

.paper-card h3,
.date-card h3 {
  font-size: 22px;
  line-height: 1.18;
}

.paper-card p,
.event-card p,
.date-card p,
.month-summary p,
.memory-note p,
.couple-card p,
.pet-card p,
.settings-list p,
.mood-panel p,
.section-head p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.large-line {
  color: var(--clay) !important;
  font-size: 28px;
  font-weight: 760;
}

.rose-accent {
  background: linear-gradient(135deg, #fff7f8, #fff);
}

.cream-accent {
  background: linear-gradient(135deg, #fffaf2, #fff);
}

.meta-row {
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.button-row {
  gap: 8px;
  margin-top: 14px;
}

.button-row > * {
  flex: 1;
}

.mood-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  background: linear-gradient(135deg, #fff3f6, #fffaf2);
}

.mood-mark {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  color: var(--pink-strong);
  font-size: 38px;
  box-shadow: inset 0 0 0 1px rgba(233, 166, 176, 0.25);
}

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

.section-head p {
  margin: 0;
  font-size: 14px;
}

.event-stack,
.timeline,
.settings-list,
.mood-list {
  display: grid;
  gap: 10px;
}

.pinned-highlight-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.pinned-highlight-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  padding: 12px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 246, 246, 0.92), rgba(255, 255, 255, 0.96)),
    linear-gradient(145deg, rgba(244, 201, 207, 0.36), rgba(239, 221, 194, 0.24));
}

.pinned-highlight-card h3 {
  margin: 6px 0;
  font-size: 20px;
  line-height: 1.16;
}

.pinned-highlight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.pinned-highlight-scene {
  min-height: 172px;
}

.event-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.event-card.featured {
  min-height: 144px;
  align-items: stretch;
  background: linear-gradient(135deg, #f9d5db, #fffaf2);
}

.event-thumb {
  width: 72px;
  height: 86px;
  flex: 0 0 72px;
  overflow: hidden;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(73, 52, 58, 0.12)),
    var(--pink-soft);
  box-shadow: inset 0 0 0 1px rgba(73, 52, 58, 0.08);
}

.event-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.event-card.featured .event-thumb {
  width: 96px;
  height: 120px;
  flex-basis: 96px;
}

.event-copy {
  min-width: 0;
  flex: 1;
}

.event-card.cream {
  background: #fffaf2;
}

.event-card.sage {
  background: #f8fff6;
}

.event-card.amber {
  background: #fff6e6;
}

.count-pill {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  color: var(--clay);
  box-shadow: inset 0 0 0 1px var(--line);
}

.count-pill strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.count-pill span {
  font-size: 11px;
}

.count-pill.small {
  width: auto;
  height: auto;
  min-width: 58px;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.chip-row {
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  min-height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.chip.active {
  background: var(--ink);
  color: #fff;
}

.date-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(194, 91, 110, 0.18);
}

.date-card-copy {
  padding: 16px;
}

.date-scene {
  height: 218px;
  border-radius: 0;
}

.date-card h3 {
  max-width: none;
  font-size: 30px;
}

.date-prep {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.date-prep span {
  color: var(--clay);
  font-size: 12px;
  font-weight: 800;
}

.date-preference-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.84), rgba(255, 242, 244, 0.72)),
    #fff;
}

.text-button.compact {
  min-height: 32px;
  padding-inline: 12px;
}

.preference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.preference-tags span {
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px var(--line);
}

.restaurant-stack {
  display: grid;
  gap: 8px;
}

.restaurant-chip-card {
  border: 1px solid rgba(73, 52, 58, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.restaurant-chip-card.placeholder {
  border-style: dashed;
}

.restaurant-chip-card strong,
.restaurant-chip-card span,
.restaurant-chip-card p {
  display: block;
}

.restaurant-chip-card span,
.ai-connector-card span,
.connector-note span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.restaurant-chip-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ai-connector-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 12px;
  background: var(--ink);
  color: #fff;
}

.ai-connector-card h3 {
  margin: 0;
  font-size: 18px;
}

.ai-connector-card .eyebrow,
.ai-connector-card span {
  color: rgba(255, 255, 255, 0.72);
}

.ai-connector-card small {
  align-self: flex-start;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.ai-connector-card .soft-action {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.date-request-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(215, 129, 145, 0.2);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 244, 247, 0.96), rgba(255, 253, 249, 0.82)),
    #fff;
  box-shadow: 0 18px 46px rgba(139, 86, 94, 0.12);
}

.template-deck-card .date-request-card {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.date-request-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.date-request-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.date-request-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.date-request-card textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid rgba(215, 129, 145, 0.2);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  line-height: 1.55;
}

.date-request-card textarea:focus {
  border-color: rgba(215, 129, 145, 0.62);
  box-shadow: 0 0 0 3px rgba(244, 201, 207, 0.34);
}

.composer-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.composer-actions span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.composer-privacy-note {
  margin: -4px 0 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.date-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-preset-button {
  min-height: 42px;
  border: 1px solid rgba(194, 107, 126, 0.24);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #6c3947;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: left;
  box-shadow: none;
}

.date-preset-button:hover,
.date-preset-button.selected {
  border-color: rgba(174, 78, 101, 0.52);
  background: #ffe4e9;
  color: #582c38;
}

.date-preset-button:focus-visible,
.date-location-choice-button:focus-visible {
  outline: 3px solid rgba(178, 81, 105, 0.28);
  outline-offset: 2px;
}

.date-location-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(215, 129, 145, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.64);
}

.date-location-summary > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.date-location-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.date-location-summary strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.date-suggestion-nudge {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(202, 116, 136, 0.22);
  border-radius: 10px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 239, 243, 0.96), rgba(255, 252, 247, 0.92)),
    #fff;
}

.date-suggestion-nudge > img {
  width: 72px;
  height: 82px;
  object-fit: contain;
}

.date-suggestion-nudge-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.date-suggestion-nudge-copy .eyebrow,
.date-suggestion-nudge-copy h3,
.date-suggestion-nudge-copy p {
  margin: 0;
}

.date-suggestion-nudge-copy h3 {
  color: #4f2f38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
}

.date-suggestion-nudge-copy p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.date-location-panel {
  scroll-margin-top: 20px;
}

.date-location-intro {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.date-location-intro img {
  width: 64px;
  height: 72px;
  object-fit: contain;
}

.date-location-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.date-location-choice-button {
  min-width: 0;
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(194, 107, 126, 0.26);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.date-location-choice-button:hover {
  border-color: rgba(174, 78, 101, 0.5);
  background: #fff4f5;
}

.date-location-choice-button strong,
.date-location-choice-button span {
  overflow-wrap: anywhere;
}

.date-location-choice-button strong {
  color: #633541;
  font-size: 14px;
}

.date-location-choice-button span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.date-location-manual-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.date-location-manual-form label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.date-location-manual-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(194, 107, 126, 0.26);
  border-radius: 8px;
  padding: 10px 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.date-location-manual-form input:focus {
  border-color: rgba(174, 78, 101, 0.58);
  box-shadow: 0 0 0 3px rgba(244, 201, 207, 0.34);
}

.date-location-error {
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(255, 232, 234, 0.78);
  color: #7b3648 !important;
  font-size: 12px;
}

.image-context-button {
  flex: 0 0 auto;
  border: 1px solid rgba(215, 129, 145, 0.22);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--rose);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.ai-suggestion-card {
  margin-top: 12px;
  border: 1px solid rgba(215, 129, 145, 0.22);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 247, 249, 0.98), rgba(255, 253, 249, 0.92) 58%, rgba(246, 237, 224, 0.68)),
    #fff;
  box-shadow: 0 18px 44px rgba(111, 78, 86, 0.1);
}

.ai-suggestion-card h3 {
  margin: 5px 0 8px;
  font-size: 19px;
  line-height: 1.24;
}

.ai-suggestion-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ai-suggestion-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.ai-suggestion-meta span {
  border: 1px solid rgba(215, 129, 145, 0.18);
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--clay);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.ai-suggestion-card blockquote {
  margin: 12px 0 8px;
  border-left: 3px solid var(--rose);
  padding-left: 10px;
  color: var(--rose-dark);
  font-weight: 850;
}

.ai-suggestion-card small {
  color: var(--muted);
  line-height: 1.55;
}

.ai-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-suggestion-card.loading {
  background:
    linear-gradient(120deg, rgba(255, 246, 248, 0.96), rgba(255, 255, 255, 0.72), rgba(255, 246, 248, 0.96)),
    #fff;
}

.ai-suggestion-card.error {
  border-color: rgba(183, 91, 91, 0.22);
  background: rgba(255, 248, 246, 0.94);
}

.highlight-compose-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(215, 129, 145, 0.2);
  border-radius: 8px;
  padding: 14px;
  background:
    radial-gradient(circle at 96% 0%, rgba(244, 201, 207, 0.4), transparent 28%),
    linear-gradient(145deg, rgba(255, 247, 249, 0.98), rgba(255, 253, 249, 0.9)),
    #fff;
  box-shadow: 0 18px 42px rgba(111, 78, 86, 0.1);
}

.highlight-compose-card h3 {
  margin: 4px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.highlight-compose-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.highlight-compose-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.highlight-compose-card input,
.highlight-compose-card textarea,
.highlight-compose-card select {
  width: 100%;
  border: 1px solid rgba(215, 129, 145, 0.2);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  outline: 0;
  line-height: 1.45;
}

.highlight-compose-card textarea {
  min-height: 86px;
  resize: vertical;
}

.highlight-compose-card input:focus,
.highlight-compose-card textarea:focus,
.highlight-compose-card select:focus {
  border-color: rgba(215, 129, 145, 0.62);
  box-shadow: 0 0 0 3px rgba(244, 201, 207, 0.34);
}

.highlight-compose-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.live-ai-card {
  margin-top: 10px;
  border: 1px solid rgba(215, 129, 145, 0.2);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 246, 248, 0.96), rgba(255, 253, 249, 0.88)),
    #fff;
  box-shadow: 0 16px 38px rgba(111, 78, 86, 0.08);
}

.live-ai-card h3 {
  margin: 4px 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.live-ai-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.request-echo {
  margin: 0 0 10px;
  border: 1px solid rgba(215, 129, 145, 0.18);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 242, 244, 0.58);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.route-steps {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding: 0;
  color: var(--ink);
  list-style: none;
}

.route-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(73, 52, 58, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.route-steps li span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.route-steps li strong {
  min-width: 0;
  line-height: 1.48;
}

.live-ai-card blockquote {
  margin: 12px 0 8px;
  border-left: 3px solid var(--rose);
  padding-left: 10px;
  color: var(--rose-dark);
  font-weight: 800;
}

.live-ai-card small {
  color: var(--muted);
  line-height: 1.55;
}

.live-ai-card.loading {
  background:
    linear-gradient(120deg, rgba(255, 246, 248, 0.96), rgba(255, 255, 255, 0.72), rgba(255, 246, 248, 0.96)),
    #fff;
}

.live-ai-card.error {
  border-color: rgba(183, 91, 91, 0.22);
  background: rgba(255, 248, 246, 0.94);
}

@media (max-width: 560px) {
  .composer-actions {
    grid-template-columns: 1fr;
  }

  .date-location-summary {
    align-items: flex-start;
  }

  .date-suggestion-nudge {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .date-suggestion-nudge > img {
    width: 56px;
    height: 66px;
  }

  .date-suggestion-nudge > .text-button {
    grid-column: 2;
    justify-self: start;
  }

  .date-location-choices,
  .date-location-manual-form {
    grid-template-columns: 1fr;
  }

  .date-location-choice-button {
    min-height: 82px;
  }
}

.prompt-preview {
  color: var(--muted);
  font-size: 12px;
}

.prompt-preview summary {
  cursor: pointer;
  font-weight: 800;
}

.prompt-preview pre {
  overflow: auto;
  margin: 8px 0 0;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

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

.idea-slip {
  min-height: 150px;
  overflow: hidden;
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--line);
}

.slip-scene {
  height: 72px;
  margin: -12px -12px 10px;
  border-radius: 8px 8px 4px 4px;
}

.idea-slip strong,
.idea-slip span {
  display: block;
}

.idea-slip span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.month-summary {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff8f5, #fff);
}

.summary-scene {
  min-height: 118px;
}

.memory-note {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 12px;
}

.memory-photo {
  width: 78px;
  min-height: 94px;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(73, 52, 58, 0.12)),
    linear-gradient(135deg, var(--pink), var(--cream));
}

.memory-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.travel-memory-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.travel-hero,
.travel-card,
.future-travel-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.78);
}

.travel-hero {
  position: relative;
  min-height: 238px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.travel-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.travel-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(73, 52, 58, 0.02), rgba(73, 52, 58, 0.68)),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.38), transparent 30%);
}

.travel-hero > div {
  position: relative;
  z-index: 1;
  color: #fff;
}

.travel-hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.travel-hero h3 {
  max-width: 320px;
  margin: 4px 0 8px;
  font-size: 24px;
  line-height: 1.16;
}

.travel-hero span {
  display: block;
  max-width: 330px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.55;
}

.travel-split {
  display: grid;
  gap: 10px;
}

.travel-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px;
}

.travel-card img {
  width: 110px;
  height: 148px;
  border-radius: 7px;
  object-fit: cover;
}

.travel-card h3,
.future-travel-card h3 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.12;
}

.travel-card strong,
.future-travel-card strong {
  display: block;
  color: var(--clay);
  font-size: 13px;
  line-height: 1.35;
}

.travel-card p,
.future-travel-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.future-travel-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 242, 244, 0.74), rgba(251, 247, 239, 0.86)),
    var(--paper);
}

.future-travel-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 11px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.64);
}

.future-travel-card img {
  width: 86px;
  height: 112px;
  border-radius: 7px;
  object-fit: cover;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(149, 160, 131, 0.14);
  color: #657052;
  font-size: 11px;
  font-weight: 780;
}

.couple-card,
.pet-card {
  padding: 18px;
  margin-bottom: 12px;
}

.home-profile {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 14% 15%, rgba(255, 255, 255, 0.85), transparent 24%),
    linear-gradient(135deg, #f5c8cf, #fff7f5 58%, #fffaf2);
}

.home-profile h3 {
  font-size: 24px;
  line-height: 1.18;
}

.profile-subline {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.member-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.member-card {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.member-card.rose {
  background:
    linear-gradient(145deg, rgba(255, 242, 244, 0.88), rgba(255, 255, 255, 0.8)),
    var(--pet-cover) center 42% / cover;
}

.member-card.cream {
  background:
    linear-gradient(145deg, rgba(255, 250, 242, 0.88), rgba(255, 255, 255, 0.82)),
    var(--pet-cover) center 44% / cover;
}

.member-card .pet-face {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.member-card h3 {
  font-size: 24px;
  line-height: 1;
}

.pet-folder {
  display: grid;
  gap: 7px;
}

.pet-folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.pet-folder-head small {
  color: var(--clay);
}

.pet-photo-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pet-photo-strip::-webkit-scrollbar {
  display: none;
}

.pet-thumb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(73, 52, 58, 0.1);
}

.pet-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pet-thumb.active {
  box-shadow:
    inset 0 0 0 2px var(--ink),
    0 8px 18px rgba(73, 52, 58, 0.12);
}

.couple-card {
  background: linear-gradient(135deg, #f5c8cf, #fff7f5 62%, #fffaf2);
}

.couple-card .primary-button {
  margin-top: 16px;
}

.settings-list {
  margin-bottom: 12px;
}

.settings-list article,
.pet-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.settings-list span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--pink-soft);
  color: var(--clay);
  font-size: 12px;
  font-weight: 800;
}

.mood-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.mood-list .eyebrow {
  grid-column: 1 / -1;
}

.mood-chip {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.mood-chip span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--pink-strong);
}

.mood-chip.active {
  background: var(--ink);
  color: #fff;
}

.reset-button {
  width: 100%;
  margin-top: 14px;
  color: var(--muted);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.template-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(360px, 500px) minmax(240px, 0.58fr);
  gap: 30px;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.template-brand-panel,
.template-note-panel {
  max-width: 380px;
}

.template-brand-panel h1 {
  margin: 14px 0 12px;
  font-size: 44px;
  line-height: 1.04;
  text-wrap: balance;
}

.template-brand-panel p,
.template-note-panel p,
.template-mini-preview span,
.template-hero-card p,
.template-step-head p,
.template-result-card p,
.template-next-panel p,
.template-upload-control small {
  color: var(--muted);
  line-height: 1.65;
}

.template-brand-visual {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  box-shadow:
    0 26px 76px rgba(139, 86, 94, 0.16),
    0 0 0 8px rgba(255, 255, 255, 0.24);
}

.template-brand-visual img,
.template-result-photo img,
.template-member-mini img,
.template-upload-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.template-privacy-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.template-privacy-strip span,
.template-privacy-note,
.template-mini-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.template-privacy-strip span {
  padding: 7px 10px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 800;
}

.template-shell {
  height: min(860px, calc(100vh - 38px));
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  background:
    radial-gradient(circle at 18% 0%, rgba(244, 201, 207, 0.26), transparent 28%),
    linear-gradient(180deg, rgba(255, 248, 248, 0.98), rgba(255, 253, 249, 0.98)),
    var(--paper);
  box-shadow: 0 28px 86px rgba(105, 64, 72, 0.22);
}

.template-topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px;
  border-bottom: 1px solid rgba(73, 52, 58, 0.06);
  background: rgba(255, 250, 250, 0.88);
  backdrop-filter: blur(18px);
}

.template-topbar h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.template-screen {
  height: calc(100% - 92px);
  overflow: auto;
  padding: 18px 18px 34px;
  scrollbar-width: none;
}

.template-screen::-webkit-scrollbar {
  display: none;
}

.template-hero-card,
.template-form-card,
.template-result-hero,
.template-result-card,
.template-next-panel {
  border: 1px solid rgba(73, 52, 58, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(139, 86, 94, 0.1);
}

.template-hero-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 250, 0.86), rgba(255, 244, 247, 0.66)),
    #fff;
}

.template-hero-copy h3,
.template-step-head h3,
.template-result-hero h3,
.template-next-panel h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.16;
  text-wrap: balance;
}

.template-choice-grid {
  display: grid;
  gap: 10px;
}

.template-mobile-install-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(137, 75, 94, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 247, 248, 0.78);
  color: var(--clay);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.template-mobile-install-shortcut span {
  min-width: 0;
}

.template-mobile-install-shortcut .text-button {
  flex: 0 0 auto;
}

.template-inline-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.template-inline-trust span {
  border: 1px solid rgba(233, 166, 176, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 247, 248, 0.86);
  color: var(--clay);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
}

.template-promise-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.template-promise-strip span {
  border: 1px solid rgba(137, 75, 94, 0.11);
  border-radius: 999px;
  padding: 8px 11px;
  background: linear-gradient(135deg, rgba(255, 238, 243, 0.9), rgba(255, 251, 247, 0.9));
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(139, 86, 94, 0.07);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.template-start-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.template-start-path article {
  min-width: 0;
  border: 1px solid rgba(73, 52, 58, 0.09);
  border-radius: 8px;
  padding: 11px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 244, 247, 0.58)),
    #fff;
}

.template-start-path span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
}

.template-start-path strong,
.template-start-path small {
  display: block;
}

.template-start-path strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.template-start-path small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.template-preview-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 8px;
}

.template-preview-strip figure {
  min-height: 112px;
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(73, 52, 58, 0.08);
  border-radius: 8px;
  background: var(--pink-soft);
}

.template-preview-strip figure:first-child {
  min-height: 142px;
}

.template-preview-strip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.template-preview-strip figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.template-mobile-save-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(137, 75, 94, 0.12);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 94% 12%, rgba(244, 201, 207, 0.42), transparent 32%),
    linear-gradient(135deg, rgba(255, 249, 250, 0.96), rgba(255, 253, 247, 0.9)),
    #fff;
  box-shadow: 0 14px 34px rgba(139, 86, 94, 0.07);
}

.template-mobile-save-card span,
.template-mobile-save-card strong,
.template-mobile-save-card small {
  display: block;
}

.template-mobile-save-card > div:first-child > span {
  margin-bottom: 4px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
}

.template-mobile-save-card strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.template-mobile-save-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.template-mobile-save-steps {
  display: grid;
  gap: 6px;
  min-width: 172px;
}

.template-mobile-save-steps span {
  border-radius: 999px;
  padding: 7px 9px;
  background: rgba(255, 238, 243, 0.78);
  color: var(--clay);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

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

.template-seed-grid span {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(73, 52, 58, 0.09);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 248, 249, 0.78);
  color: var(--clay);
  font-size: 12px;
  font-weight: 850;
}

.template-choice-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.template-choice-card span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  grid-row: span 2;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--rose);
  font-weight: 900;
}

.template-choice-card small {
  color: var(--muted);
}

.template-choice-card.active {
  background: linear-gradient(135deg, #fff7f5, #fff, #f7efe2);
  border-color: rgba(215, 129, 145, 0.34);
}

.template-choice-card.sample {
  background:
    linear-gradient(135deg, rgba(73, 52, 58, 0.96), rgba(126, 76, 89, 0.94)),
    var(--ink);
  color: #fff;
  box-shadow: 0 16px 38px rgba(73, 52, 58, 0.18);
}

.template-choice-card.sample span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.template-choice-card.sample small {
  color: rgba(255, 255, 255, 0.72);
}

.template-form-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.template-step-card .template-step-head {
  grid-template-columns: 1fr;
  gap: 8px;
}

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

.template-create-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.template-create-progress span {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.template-create-progress b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
}

.template-create-progress span.active b,
.template-create-progress span.done b {
  border-color: transparent;
  background: var(--ink);
  color: #fff;
}

.template-create-progress span.active {
  color: var(--ink);
}

.template-step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.template-step-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.template-step-head > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.template-form-card label,
.template-upload-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.template-form-card input,
.template-form-card select {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.template-form-card input[type='file'] {
  padding: 10px;
}

.template-photo-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.template-form-actions {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1.3fr;
  gap: 8px;
  align-items: center;
}

.template-privacy-note {
  margin: 0;
  padding: 11px 12px;
  font-size: 12px;
}

.template-upload-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.template-upload-preview {
  width: 96px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(73, 52, 58, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244, 201, 207, 0.55), rgba(255, 255, 255, 0.85)),
    var(--pink-soft);
  color: var(--rose);
  font-weight: 900;
}

.template-result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 96% 12%, rgba(228, 196, 150, 0.34), transparent 24%),
    linear-gradient(135deg, rgba(255, 242, 244, 0.96), rgba(255, 253, 249, 0.86)),
    #fff;
}

.template-sample-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(215, 129, 145, 0.28);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 238, 243, 0.96), rgba(255, 252, 248, 0.94)),
    #fff;
  box-shadow: 0 14px 34px rgba(139, 86, 94, 0.1);
}

.template-sample-welcome h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.template-sample-welcome p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.template-result-hero > div {
  min-width: 0;
}

.template-result-hero p,
.template-result-hero h3 {
  overflow-wrap: anywhere;
}

.template-result-page-anchor {
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
  scroll-margin-top: 64px;
}

.template-result-photo {
  min-width: 0;
  min-height: 150px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--pink-soft);
}

.template-trial-status,
.template-trial-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(215, 129, 145, 0.2);
  border-radius: 8px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(255, 247, 248, 0.94), rgba(255, 253, 249, 0.9)),
    #fff;
  box-shadow: 0 14px 34px rgba(139, 86, 94, 0.08);
}

.template-trial-status {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.template-trial-panel.danger {
  border-color: rgba(159, 79, 89, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 242, 243, 0.96), rgba(255, 250, 246, 0.92)),
    #fff;
  box-shadow: 0 16px 34px rgba(123, 54, 66, 0.12);
}

.template-trial-status h3,
.template-trial-panel h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.template-trial-status p,
.template-trial-panel p,
.template-data-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.template-activation-checklist {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(215, 129, 145, 0.18);
  border-radius: 8px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(255, 252, 250, 0.94), rgba(255, 244, 247, 0.86)),
    #fff;
  box-shadow: 0 14px 34px rgba(139, 86, 94, 0.07);
}

.template-activation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-activation-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.template-activation-head > span {
  min-width: 46px;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--pink-soft);
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

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

.template-activation-item {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
  border: 1px solid rgba(73, 52, 58, 0.09);
  border-radius: 8px;
  padding: 11px 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-align: left;
}

.template-activation-item span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(244, 201, 207, 0.72);
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.template-activation-item strong {
  font-size: 13px;
  line-height: 1.28;
}

.template-activation-item small,
.template-activation-checklist p {
  color: var(--muted);
  line-height: 1.55;
}

.template-activation-item small {
  font-size: 11px;
}

.template-activation-item.done {
  background:
    linear-gradient(135deg, rgba(255, 249, 242, 0.9), rgba(255, 255, 255, 0.86)),
    #fff;
  border-color: rgba(228, 196, 150, 0.34);
}

.template-activation-item.done span {
  background: rgba(228, 196, 150, 0.35);
  color: var(--clay);
}

.template-activation-checklist p {
  margin: 0;
  font-size: 12px;
}

.template-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-feedback-form {
  display: grid;
  gap: 12px;
}

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

.template-feedback-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid rgba(73, 52, 58, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.template-feedback-form textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.share-link-box textarea {
  width: 100%;
  min-height: 96px;
  margin-top: 8px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
  outline: 0;
}

.template-data-list {
  display: grid;
  gap: 8px;
}

.template-data-list p {
  border: 1px solid rgba(73, 52, 58, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.64);
}

.template-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.template-result-actions button {
  min-width: 118px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
}

.template-section-stack {
  display: grid;
  gap: 10px;
}

.template-result-tabs {
  display: flex;
  gap: 7px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.template-result-tabs::-webkit-scrollbar {
  display: none;
}

.template-result-tabs button {
  min-height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(73, 52, 58, 0.1);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  box-shadow: none;
}

.template-result-tabs button.active {
  border-color: rgba(215, 129, 145, 0.3);
  background: var(--ink);
  color: #fff;
}

.template-result-card {
  padding: 14px;
}

.template-result-card h3 {
  margin: 0 0 7px;
  font-size: 21px;
  line-height: 1.2;
}

.template-result-card.today {
  background: linear-gradient(135deg, #fff, #fff2f4 55%, #f9efe2);
}

.template-result-card.outing {
  border-color: rgba(149, 160, 131, 0.25);
}

.template-deck-card {
  display: grid;
  gap: 12px;
}

.template-deck-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-deck-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--pink-soft);
  color: var(--clay);
  font-size: 11px;
  font-weight: 900;
}

.template-anniversary-list,
.template-outing-list,
.template-highlight-list,
.template-pillar-grid {
  display: grid;
  gap: 8px;
}

.template-anniversary-list article,
.template-outing-list article,
.template-highlight-list article,
.template-pillar-grid article {
  border: 1px solid rgba(73, 52, 58, 0.08);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 253, 249, 0.78);
}

.template-anniversary-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-anniversary-list strong,
.template-outing-list strong,
.template-highlight-list strong,
.template-pillar-grid strong {
  display: block;
  line-height: 1.25;
}

.template-anniversary-list span,
.template-outing-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.template-outing-list p,
.template-highlight-list p,
.template-pillar-grid p {
  margin: 6px 0 0;
  font-size: 13px;
}

.template-pillar-card {
  background:
    linear-gradient(135deg, rgba(255, 248, 249, 0.94), rgba(255, 253, 249, 0.82)),
    #fff;
}

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

.template-pillar-grid article {
  min-height: 132px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 246, 248, 0.68)),
    rgba(255, 253, 249, 0.86);
}

.template-pillar-grid article > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

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

.template-dashboard-grid article {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(73, 52, 58, 0.09);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 248, 0.68));
}

.template-dashboard-grid article > span {
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.template-dashboard-grid strong {
  line-height: 1.3;
}

.template-dashboard-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.template-dashboard-grid .text-button {
  justify-self: start;
  margin-top: auto;
}

.template-outing-list article.agent {
  background:
    linear-gradient(135deg, rgba(255, 242, 244, 0.92), rgba(251, 247, 239, 0.92)),
    #fff;
  border-color: rgba(215, 129, 145, 0.22);
}

.template-outing-list article {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: stretch;
}

.template-outing-list article img {
  width: 82px;
  height: 100%;
  min-height: 82px;
  border-radius: 8px;
  object-fit: cover;
}

.template-highlight-list article {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: stretch;
}

.template-highlight-media {
  min-height: 82px;
  position: relative;
  display: grid;
  place-items: end start;
  overflow: hidden;
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(150deg, rgba(244, 201, 207, 0.78), rgba(255, 255, 255, 0.72)),
    var(--pink-soft);
}

.template-highlight-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-highlight-media span {
  position: relative;
  z-index: 1;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--rose);
  font-size: 11px;
  font-weight: 900;
}

.template-highlight-list article.media-video .template-highlight-media {
  background:
    linear-gradient(150deg, rgba(138, 119, 128, 0.78), rgba(255, 238, 231, 0.82)),
    var(--clay);
}

.template-highlight-list article.media-letter .template-highlight-media {
  background:
    linear-gradient(150deg, rgba(251, 247, 239, 0.95), rgba(244, 201, 207, 0.5)),
    var(--paper);
}

.template-member-mini {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.template-member-mini img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
}

.template-next-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  background: rgba(251, 247, 239, 0.8);
}

.template-mini-preview {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.template-mini-preview strong {
  line-height: 1.25;
}

.note-block {
  border-left: 2px solid var(--pink-strong);
  padding: 0 0 0 16px;
  margin-bottom: 18px;
}

.template-assist-list {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.template-assist-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  border: 1px solid rgba(73, 52, 58, 0.08);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.5);
}

.template-assist-list span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  grid-row: span 2;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--rose);
  font-size: 10px;
  font-weight: 900;
}

.template-assist-list strong {
  line-height: 1.25;
}

.template-assist-list p {
  margin: 0;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(53, 35, 39, 0.24);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.modal-card input,
.modal-card textarea,
.modal-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.modal-card textarea {
  resize: vertical;
}

.date-settings-modal {
  max-height: calc(100vh - 36px);
  overflow: auto;
}

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

.connector-note {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(73, 52, 58, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 242, 244, 0.72);
}

.ritual-modal {
  max-height: calc(100vh - 36px);
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 242, 244, 0.94), rgba(255, 253, 249, 0.98)),
    var(--paper);
}

.ritual-modal .modal-head h2 {
  font-size: 26px;
  line-height: 1.18;
  text-wrap: balance;
}

.ritual-hero {
  height: 220px;
}

.ritual-entry {
  justify-self: start;
}

.event-card.clickable {
  cursor: pointer;
}

.event-card.clickable:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.music-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.music-panel.reserved {
  grid-template-columns: auto 1fr;
}

.music-panel.reserved .music-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

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

.music-provider {
  border: 1px solid rgba(74, 48, 58, 0.16);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.music-provider:hover {
  border-color: rgba(74, 48, 58, 0.34);
  background: rgba(255, 247, 249, 0.92);
}

.music-panel strong,
.letter-paper strong {
  display: block;
  color: var(--ink);
}

.music-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.music-mark {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  border-radius: 50%;
  background: var(--ink);
}

.music-mark span {
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  opacity: 0.82;
}

.music-panel.playing .music-mark span {
  animation: musicPulse 0.82s ease-in-out infinite;
}

.music-panel.playing .music-mark span:nth-child(2) {
  animation-delay: 0.14s;
}

.music-panel.playing .music-mark span:nth-child(3) {
  animation-delay: 0.28s;
}

.letter-paper {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(233, 166, 176, 0.38);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 242, 0.82)),
    #fff;
}

.letter-status {
  display: grid;
  gap: 8px;
}

.letter-status span {
  width: fit-content;
  border: 1px solid rgba(233, 166, 176, 0.42);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--rose);
  font-size: 12px;
  background: rgba(255, 244, 246, 0.92);
}

.letter-status h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 650;
}

.letter-paper p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.letter-draft-grid {
  display: grid;
  gap: 8px;
}

.letter-draft-grid span {
  display: block;
  border: 1px solid rgba(116, 94, 90, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.62);
}

.letter-process-note {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(233, 166, 176, 0.28);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 244, 246, 0.9), rgba(255, 253, 249, 0.92)),
    rgba(255, 255, 255, 0.82);
}

.letter-process-note span {
  justify-self: start;
  border: 1px solid rgba(233, 166, 176, 0.3);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 850;
}

.letter-process-note h4 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.letter-process-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.68;
}

.letter-framework {
  display: grid;
  gap: 10px;
}

.letter-body-flow {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(116, 94, 90, 0.1);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.74), rgba(255, 247, 249, 0.64)),
    rgba(255, 255, 255, 0.62);
}

.letter-flow-section {
  display: grid;
  gap: 10px;
  padding: 8px 0 14px;
  border-bottom: 1px solid rgba(116, 94, 90, 0.08);
}

.letter-flow-section:last-child {
  padding-bottom: 4px;
  border-bottom: 0;
}

.letter-flow-symbol {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(233, 166, 176, 0.26);
  border-radius: 999px;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1;
}

.letter-flow-copy {
  display: grid;
  gap: 10px;
}

.letter-flow-copy p,
.letter-body-flow p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.78;
}

.letter-visual {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  overflow: hidden;
  border: 1px solid rgba(116, 94, 90, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 244, 246, 0.58)),
    rgba(255, 255, 255, 0.72);
}

.letter-visual-images {
  display: grid;
  gap: 4px;
  min-height: 154px;
}

.letter-visual-images.image-count-1 {
  grid-template-columns: 1fr;
}

.letter-visual-images.image-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.letter-visual-images.image-count-3 {
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.letter-visual-images.image-count-3 img:first-child {
  grid-row: 1 / -1;
}

.letter-visual img {
  width: 100%;
  height: 100%;
  min-height: 154px;
  object-fit: cover;
}

.letter-visual-images.image-count-3 img {
  min-height: 92px;
}

.letter-visual figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  align-items: center;
  padding: 0 11px 11px;
}

.letter-visual figcaption span {
  color: var(--rose);
  font-size: 12px;
}

.letter-visual figcaption strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.letter-visual figcaption small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.letter-framework-note {
  border: 1px solid rgba(233, 166, 176, 0.26);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 244, 246, 0.58);
  color: var(--ink);
  font-weight: 650;
}

.letter-section {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  border: 1px solid rgba(116, 94, 90, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.letter-section-index {
  color: var(--rose);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.letter-section h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.letter-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.letter-section-body {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.letter-section-body p {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.72;
}

.letter-placeholder {
  margin-top: 10px;
  border: 1px dashed rgba(74, 48, 58, 0.2);
  border-radius: 8px;
  padding: 10px 11px;
  color: rgba(74, 48, 58, 0.58);
  font-size: 13px;
  line-height: 1.55;
  background: rgba(255, 250, 247, 0.78);
}

@keyframes musicPulse {
  0%,
  100% {
    height: 10px;
  }
  50% {
    height: 24px;
  }
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(73, 52, 58, 0.92);
  color: #fff;
  box-shadow: 0 18px 48px rgba(73, 52, 58, 0.25);
}

@media (max-width: 1020px) {
  .app-stage,
  .template-stage {
    grid-template-columns: minmax(320px, 420px);
    padding: 18px;
  }

  .desktop-story,
  .desktop-notes,
  .template-brand-panel,
  .template-note-panel {
    display: none;
  }
}

@media (max-width: 520px) {
  .app-stage,
  .template-stage {
    min-height: 100vh;
    padding: 0;
  }

  .phone-shell,
  .template-shell {
    width: 100%;
    height: 100vh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .screen {
    height: calc(100% - 168px);
    padding-inline: 14px;
    padding-bottom: 108px;
  }

  .app-topbar {
    padding-inline: 18px;
  }

  .template-topbar {
    min-height: 86px;
    padding: 18px;
  }

  .template-topbar h2 {
    font-size: 20px;
  }

  .template-screen {
    height: calc(100% - 86px);
    padding: 14px 14px 28px;
  }

  .template-hero-copy h3,
  .template-step-head h3,
  .template-result-hero h3,
  .template-next-panel h3 {
    font-size: 24px;
  }

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

  .template-form-grid {
    grid-template-columns: 1fr;
  }

  .template-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .template-upload-row,
  .template-result-hero,
  .template-member-mini,
  .template-trial-status,
  .template-sample-welcome {
    grid-template-columns: minmax(0, 1fr);
  }

  .template-result-hero figure {
    max-height: 240px;
    min-height: 0;
    overflow: hidden;
    border-radius: 8px;
  }

  .template-result-hero figure img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
  }

  .template-trial-actions,
  .template-panel-head {
    justify-content: stretch;
  }

  .template-trial-actions,
  .template-panel-head,
  .template-feedback-options {
    grid-template-columns: 1fr;
  }

  .template-activation-grid {
    grid-template-columns: 1fr;
  }

  .template-trial-actions,
  .template-panel-head {
    display: grid;
  }

  .template-seed-grid {
    grid-template-columns: 1fr;
  }

  .template-choice-grid {
    gap: 7px;
  }

  .template-choice-card {
    padding: 10px;
  }

  .template-choice-card span {
    width: 28px;
    height: 28px;
    grid-row: span 1;
    font-size: 12px;
  }

  .template-choice-card small {
    display: none;
  }

  .template-mobile-install-shortcut {
    padding: 8px 10px;
  }

  .template-start-path {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .template-start-path article {
    padding: 8px 7px;
  }

  .template-start-path span {
    width: 22px;
    height: 22px;
    margin-bottom: 6px;
    font-size: 11px;
  }

  .template-start-path strong {
    font-size: 11px;
    line-height: 1.24;
  }

  .template-start-path small {
    display: none;
  }

  .template-preview-strip {
    grid-template-columns: repeat(3, minmax(124px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .template-preview-strip::-webkit-scrollbar {
    display: none;
  }

  .template-preview-strip figure,
  .template-preview-strip figure:first-child {
    min-height: 124px;
  }

  .template-mobile-save-card {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .template-mobile-save-steps {
    display: none;
    min-width: 0;
  }

  .template-result-tabs {
    margin-inline: -2px;
  }

  .template-pillar-grid {
    grid-template-columns: 1fr;
  }

  .template-deck-head,
  .template-anniversary-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-upload-preview {
    width: 100%;
    max-height: 210px;
  }

  .template-result-photo {
    min-height: 188px;
  }

  .template-member-mini img {
    width: 100%;
    height: 160px;
  }

  .template-outing-list article,
  .template-highlight-list article {
    grid-template-columns: 74px 1fr;
  }

  .template-outing-list article img,
  .template-highlight-media {
    width: 74px;
    min-height: 74px;
  }

  .template-result-actions {
    display: grid;
  }

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

  .action-row {
    overflow-x: auto;
  }

  .action-row .soft-action {
    flex: 0 0 auto;
  }

  .date-scene {
    height: 174px;
  }

  .date-card-copy {
    padding: 14px;
  }

  .date-card h3 {
    font-size: 26px;
  }

  .date-prep {
    margin-top: 12px;
    padding: 10px;
  }

  .launch-milestone {
    grid-template-columns: 1fr;
  }

  .milestone-scene {
    min-height: 142px;
  }

  .launch-copy h3 {
    font-size: 22px;
  }

  .pinned-highlight-card {
    grid-template-columns: 1fr;
  }

  .pinned-highlight-scene {
    min-height: 148px;
  }

  .event-card {
    gap: 10px;
  }

  .event-thumb {
    width: 64px;
    height: 80px;
    flex-basis: 64px;
  }

  .event-card.featured .event-thumb {
    width: 82px;
    height: 108px;
    flex-basis: 82px;
  }

  .count-pill {
    width: 52px;
    height: 52px;
  }

  .ritual-hero {
    height: 178px;
  }

  .ritual-modal .modal-head {
    align-items: flex-start;
    gap: 10px;
  }

  .ritual-modal .modal-head h2 {
    font-size: 23px;
  }

  .music-panel {
    grid-template-columns: auto 1fr;
  }

  .music-panel .text-button,
  .music-actions {
    grid-column: 1 / -1;
  }

  .music-provider {
    flex: 1;
  }

  .letter-section {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Pink film journal: the public template uses its own product shell and visual rhythm. */
.template-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  position: relative;
  isolation: isolate;
  border-radius: 8px;
  background: #fffaf9;
  box-shadow: 0 28px 80px rgba(98, 48, 61, 0.2);
}

.template-phone {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(rgba(98, 48, 61, 0.025) 1px, transparent 1px) 0 0 / 100% 28px,
    #fffaf9;
}

.template-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px 40px;
  scrollbar-width: none;
}

.template-scroll::-webkit-scrollbar {
  display: none;
}

.template-topbar {
  min-height: 50px;
  padding: 9px 18px;
  background: rgba(255, 250, 249, 0.9);
  border-color: rgba(98, 48, 61, 0.08);
}

.template-topbar > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.template-topbar span,
.template-topbar strong {
  display: block;
}

.template-topbar span {
  margin: 0;
  color: #a25f70;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

.template-topbar strong {
  overflow: hidden;
  color: #462d34;
  color: #9a7a80;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-hero-card {
  gap: 14px;
  padding: 0 0 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.template-film-cover {
  height: 500px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #d99aa6;
  color: #fff;
  animation: templateFilmReveal 700ms ease both;
}

.template-film-cover > img,
.template-cinematic-hero > figure img,
.template-anniversary-hero > img,
.template-film-feature > img,
.template-film-frame > img,
.template-highlight-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.template-film-cover > img {
  object-position: center 42%;
  transform: scale(1.015);
}

.template-film-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(42, 23, 29, 0.08), rgba(42, 23, 29, 0.12) 44%, rgba(42, 23, 29, 0.72));
}

.template-film-wordmark {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(45, 22, 28, 0.35);
}

.template-film-wordmark span {
  max-width: 170px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
}

.template-film-wordmark strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 0.95;
}

.template-film-wordmark.compact {
  position: static;
}

.template-film-wordmark.compact strong {
  font-size: 34px;
}

.template-film-cover-copy {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 22px;
  display: grid;
  gap: 14px;
  justify-items: start;
}

.template-film-cover-copy p {
  max-width: 320px;
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.42;
  text-shadow: 0 2px 22px rgba(45, 22, 28, 0.45);
}

.template-film-primary,
.template-film-link {
  border: 0;
  color: inherit;
  font: inherit;
}

.template-film-primary {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 251, 247, 0.92);
  color: #462d34;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(45, 22, 28, 0.2);
  backdrop-filter: blur(14px);
}

.template-hero-copy,
.template-inline-trust,
.template-promise-strip,
.template-preview-strip,
.template-mobile-install-shortcut,
.template-choice-grid,
.template-mobile-save-card {
  margin-inline: 4px;
}

.template-cinematic-hero {
  min-height: 420px;
  position: relative;
  display: block;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #dba1aa;
  color: #fff;
  box-shadow: 0 22px 54px rgba(88, 39, 53, 0.2);
}

.template-cinematic-hero > figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.template-cinematic-hero > figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 22, 28, 0.12), rgba(45, 22, 28, 0.12) 38%, rgba(45, 22, 28, 0.82));
}

.template-brand-hero > figure img {
  object-position: 56% center;
  filter: saturate(0.96) contrast(1.01);
}

.template-brand-hero > figure::after {
  background:
    linear-gradient(90deg, rgba(62, 27, 37, 0.5) 0%, rgba(62, 27, 37, 0.2) 50%, rgba(62, 27, 37, 0.02) 76%),
    linear-gradient(180deg, rgba(47, 20, 29, 0.05), rgba(47, 20, 29, 0.12) 46%, rgba(47, 20, 29, 0.86));
}

.template-cinematic-hero > figure img {
  object-position: center 38%;
}

.template-cinematic-copy {
  min-width: 0;
  min-height: 420px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.template-cinematic-copy > div:last-child {
  max-width: 390px;
}

.template-cinematic-copy .eyebrow,
.template-cinematic-copy p {
  color: rgba(255, 255, 255, 0.84);
}

.template-cinematic-copy h3 {
  max-width: 360px;
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.template-cinematic-copy p:not(.eyebrow) {
  max-width: 360px;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.65;
}

.template-cinematic-copy .primary-button {
  background: rgba(255, 251, 247, 0.94);
  color: #462d34;
}

.template-cinematic-copy .text-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(45, 22, 28, 0.22);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.template-create-ribbon {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 6px;
  padding: 2px 4px 10px;
  border-bottom: 1px solid rgba(98, 48, 61, 0.1);
  color: #8d6970;
  font-size: 12px;
}

.template-create-ribbon button {
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #663844;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.template-create-ribbon button::after {
  content: "  →";
}

.template-result-tabs {
  position: sticky;
  z-index: 8;
  top: -1px;
  gap: 4px;
  margin: 0 -4px 12px;
  padding: 8px 4px;
  overflow-x: hidden;
  background: rgba(255, 250, 249, 0.92);
  backdrop-filter: blur(16px);
}

.template-result-tabs button {
  min-width: 0;
  min-height: 35px;
  flex: 1 1 0;
  border: 0;
  border-radius: 999px;
  padding: 7px 4px;
  background: transparent;
  font-size: 12px;
}

.template-result-tabs button.active {
  background: #663844;
  color: #fff;
}

.template-result-section {
  display: grid;
  gap: 12px;
  animation: templateFilmReveal 480ms ease both;
}

.template-result-section > .eyebrow,
.template-result-section > h3 {
  margin: 0 4px;
}

.template-result-section > h3 {
  color: #462d34;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
}

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

.template-focus-card {
  min-width: 0;
  min-height: 176px;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #6b424d;
  color: #fff;
  text-align: left;
  box-shadow: none;
}

.template-focus-card.primary {
  min-height: 260px;
  grid-column: 1 / -1;
}

.template-focus-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(41, 22, 28, 0.03) 30%, rgba(41, 22, 28, 0.76));
}

.template-focus-card img {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 360ms ease;
}

.template-focus-card > div {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  gap: 4px;
}

.template-focus-card span,
.template-focus-card small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.template-focus-card strong {
  display: block;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.template-focus-card.primary strong {
  font-size: 28px;
}

.template-result-section .date-request-card {
  gap: 10px;
  margin-top: 0;
  padding: 14px;
  background: #fff5f5;
  box-shadow: none;
}

.template-result-section .date-request-head,
.template-result-section .date-request-head p {
  margin: 0;
}

.template-result-section .date-request-card textarea {
  min-height: 110px;
  background: rgba(255, 255, 255, 0.72);
}

.template-result-section .composer-actions span {
  font-size: 10px;
  line-height: 1.4;
}

.template-result-section .composer-privacy-note {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 10px;
  text-align: right;
}

@media (hover: hover) {
  .template-focus-card:hover img {
    transform: scale(1.025);
  }
}

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

.template-film-feature,
.template-film-frame {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #5b3942;
  color: #fff;
}

.template-film-feature {
  min-height: 330px;
  grid-column: 1 / -1;
}

.template-film-frame {
  min-height: 270px;
}

.template-film-feature::after,
.template-film-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 22, 28, 0.02), rgba(45, 22, 28, 0.72));
}

.template-film-feature > img,
.template-film-frame > img {
  position: absolute;
  inset: 0;
}

.template-film-feature > div,
.template-film-frame > div {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 16px;
}

.template-film-feature span,
.template-film-frame span {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 900;
}

.template-film-feature strong,
.template-film-frame strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.15;
}

.template-film-feature strong {
  font-size: 30px;
}

.template-film-feature p,
.template-film-frame p {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 11px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-film-link {
  padding: 0 0 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.template-anniversary-hero {
  min-height: 390px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #8c5965;
  color: #fff;
}

.template-anniversary-hero > img {
  position: absolute;
  inset: 0;
  object-position: center 44%;
}

.template-anniversary-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 22, 28, 0.08), rgba(45, 22, 28, 0.78));
}

.template-anniversary-hero-copy {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.template-anniversary-hero-copy > span {
  font-size: 12px;
  font-weight: 900;
}

.template-anniversary-hero-copy > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0;
}

.template-anniversary-count {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 86px;
  font-weight: 500;
  line-height: 0.92;
}

.template-anniversary-hero-copy small {
  font-size: 18px;
}

.template-anniversary-hero-copy p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.anniversary-compose-card,
.highlight-compose-card {
  border-color: rgba(98, 48, 61, 0.12);
  background: #fffdf9;
  box-shadow: none;
}

.template-film-tickets {
  display: grid;
  gap: 8px;
}

.template-film-tickets article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(98, 48, 61, 0.1);
  border-radius: 8px;
  background: #f8e8e8;
}

.template-film-tickets article > span {
  color: #b06d7d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.template-film-tickets strong,
.template-film-tickets small {
  display: block;
}

.template-film-tickets small {
  margin-top: 3px;
  color: #8d6970;
  font-size: 11px;
}

.template-film-tickets em {
  color: #a2663f;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

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

.template-highlight-frame {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(98, 48, 61, 0.1);
  border-radius: 8px;
  background: #fffdf9;
}

.template-highlight-frame:nth-child(3n + 1) {
  grid-column: 1 / -1;
}

.template-highlight-frame figure {
  height: 230px;
  position: relative;
  margin: 0;
  overflow: hidden;
}

.template-highlight-frame:nth-child(3n + 1) figure {
  height: 310px;
}

.template-highlight-frame figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(45, 22, 28, 0.48));
}

.template-highlight-frame figure span {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 251, 247, 0.9);
  color: #663844;
  font-size: 10px;
  font-weight: 900;
}

.template-highlight-frame > div {
  padding: 13px;
}

.template-highlight-frame small,
.template-highlight-frame strong {
  display: block;
}

.template-highlight-frame small {
  color: #a25f70;
  font-size: 10px;
  font-weight: 900;
}

.template-highlight-frame strong {
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.template-highlight-frame p {
  margin: 7px 0 0;
  color: #8d6970;
  font-size: 12px;
  line-height: 1.55;
}

.template-list,
.template-card-grid {
  display: grid;
  gap: 8px;
}

.template-list article,
.template-card-grid article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(98, 48, 61, 0.1);
  border-radius: 8px;
  background: #fffdf9;
}

.template-list article strong,
.template-card-grid article strong {
  color: #462d34;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.template-list article p,
.template-card-grid article small {
  margin: 0;
  color: #8d6970;
  font-size: 12px;
  line-height: 1.55;
}

@keyframes templateFilmReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .template-shell {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }

  .template-scroll {
    padding: 10px 10px 28px;
  }

  .template-topbar {
    min-height: 50px;
    padding: 9px 14px;
  }

  .template-film-cover {
    height: 470px;
  }

  .template-film-cover-copy p {
    font-size: 23px;
  }

  .template-cinematic-hero,
  .template-cinematic-copy {
    min-height: 390px;
  }

  .template-cinematic-hero figure {
    min-height: 390px;
    max-height: none;
    border-radius: 0;
  }

  .template-cinematic-copy h3 {
    font-size: 28px;
  }

  .template-film-dashboard {
    grid-template-columns: 1fr;
  }

  .template-film-feature,
  .template-film-frame {
    grid-column: 1;
  }

  .template-film-feature {
    min-height: 310px;
  }

  .template-film-frame {
    min-height: 240px;
  }

  .template-highlight-gallery {
    grid-template-columns: 1fr;
  }

  .template-highlight-frame,
  .template-highlight-frame:nth-child(3n + 1) {
    grid-column: 1;
  }

  .template-highlight-frame figure,
  .template-highlight-frame:nth-child(3n + 1) figure {
    height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-film-cover,
  .template-result-section {
    animation: none;
  }
}

/* Research-driven responsive journal shell.
   Sources and translation decisions live in .design/design-direction.md. */
.template-shell-v2 {
  --qiwei-ink: #442b32;
  --qiwei-ink-soft: #76545d;
  --qiwei-rose: #ad6274;
  --qiwei-blush: #f6d9dd;
  --qiwei-paper: #fffaf7;
  --qiwei-line: rgba(68, 43, 50, 0.13);
  width: min(calc(100% - 40px), 980px);
  height: min(880px, calc(100svh - 40px));
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(360px, 520px);
  gap: 28px;
  align-items: stretch;
  margin: 20px auto;
  border-radius: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(145deg, #f7dfe2 0%, #fdf2ef 48%, #efe0d4 100%);
  box-shadow: 0 34px 100px rgba(86, 48, 58, 0.2);
}

.template-shell-v2 .template-phone {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: var(--qiwei-paper);
  box-shadow: 0 24px 70px rgba(91, 50, 61, 0.18);
}

.template-desktop-story {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 4px 8px;
  color: var(--qiwei-ink);
}

.template-desktop-story-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--qiwei-line);
}

.template-desktop-story-brand span {
  max-width: 150px;
  color: var(--qiwei-ink-soft);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

.template-desktop-story-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.template-desktop-story-copy {
  margin: auto 0;
  padding: 34px 0;
}

.template-desktop-story-copy .eyebrow {
  margin-bottom: 12px;
  color: var(--qiwei-rose);
  letter-spacing: 0.1em;
}

.template-desktop-story-copy h1 {
  max-width: 360px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.template-desktop-story-copy > p:last-child {
  max-width: 340px;
  margin: 20px 0 0;
  color: var(--qiwei-ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.template-desktop-story-list {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--qiwei-line);
}

.template-desktop-story-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 2px;
  border-bottom: 1px solid var(--qiwei-line);
}

.template-desktop-story-list article > span {
  color: var(--qiwei-rose);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.template-desktop-story-list strong,
.template-desktop-story-list small {
  display: block;
}

.template-desktop-story-list strong {
  font-size: 13px;
}

.template-desktop-story-list small {
  margin-top: 4px;
  color: var(--qiwei-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.template-desktop-story-note {
  margin: 16px 0 0;
  color: var(--qiwei-ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.template-shell-v2 .template-topbar {
  min-height: 52px;
  padding: 10px 16px;
  background: rgba(255, 250, 247, 0.88);
  backdrop-filter: blur(18px);
}

.template-shell-v2 .template-scroll {
  padding: 12px 12px 32px;
}

.template-shell-v2 .template-cinematic-hero {
  min-height: clamp(470px, 66svh, 580px);
  border-radius: 14px;
}

.template-shell-v2 .template-cinematic-copy {
  min-height: clamp(470px, 66svh, 580px);
}

.template-shell-v2 .template-cinematic-hero > figure img {
  opacity: 1;
  object-position: center 38%;
}

.template-shell-v2 .template-brand-hero > figure img {
  object-position: 56% 36%;
}

.template-shell-v2 .template-result-tabs {
  margin-inline: 0;
  padding: 7px;
  border: 1px solid var(--qiwei-line);
  border-radius: 16px;
  background: rgba(255, 250, 247, 0.94);
  box-shadow: 0 9px 24px rgba(88, 45, 57, 0.08);
}

.template-shell-v2 .template-result-tabs button {
  min-height: 44px;
  border-radius: 11px;
}

.template-shell-v2 .template-result-tabs button.active {
  background: var(--qiwei-ink);
  box-shadow: 0 7px 18px rgba(68, 43, 50, 0.2);
}

.template-shell-v2 button,
.template-shell-v2 input,
.template-shell-v2 select,
.template-shell-v2 textarea,
.template-shell-v2 [tabindex="0"] {
  outline: none;
}

.template-shell-v2 button:focus-visible,
.template-shell-v2 input:focus-visible,
.template-shell-v2 select:focus-visible,
.template-shell-v2 textarea:focus-visible,
.template-shell-v2 [tabindex="0"]:focus-visible {
  outline: 3px solid rgba(173, 98, 116, 0.42);
  outline-offset: 3px;
}

.template-shell-v2 .template-story-card,
.template-shell-v2 .template-anniversary-hero,
.template-shell-v2 .template-highlight-frame,
.template-shell-v2 .template-list article,
.template-shell-v2 .template-card-grid article,
.template-shell-v2 .template-form-card {
  border-radius: 14px;
}

@media (max-width: 820px) {
  .template-shell-v2 {
    width: min(calc(100% - 24px), 540px);
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 12px auto;
    padding: 0;
    border-radius: 22px;
    background: transparent;
    box-shadow: none;
  }

  .template-desktop-story {
    display: none;
  }
}

@media (max-width: 520px) {
  .template-shell-v2 {
    width: 100%;
    height: 100svh;
    min-height: 0;
    margin: 0;
    border-radius: 0;
  }

  .template-shell-v2 .template-phone {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .template-shell-v2 .template-scroll {
    padding: 10px 10px 28px;
  }

  .template-shell-v2 .template-cinematic-hero,
  .template-shell-v2 .template-cinematic-copy {
    min-height: min(66svh, 552px);
  }

  .template-shell-v2 .template-result-tabs {
    margin-inline: -2px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-shell-v2 *,
  .template-shell-v2 *::before,
  .template-shell-v2 *::after {
    scroll-behavior: auto;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .template-shell-v2 .template-cinematic-hero > figure img,
  .template-shell-v2 .template-story-card img {
    opacity: 1;
    transform: none;
  }
}

/* Interactive film journal: motion supports the four core product actions. */
.template-phone {
  background: #fff7f8;
}

.template-scroll {
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
}

.template-cinematic-hero {
  min-height: clamp(470px, 68svh, 600px);
  isolation: isolate;
  background: #8b5966;
  box-shadow: 0 26px 60px rgba(91, 43, 57, 0.24);
}

.template-cinematic-hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 64px, rgba(255, 255, 255, 0.045) 64px 65px),
    linear-gradient(115deg, rgba(255, 194, 207, 0.08), transparent 38%);
  mix-blend-mode: screen;
}

.template-cinematic-hero > figure {
  overflow: hidden;
}

.template-cinematic-hero > figure img {
  width: 100%;
  height: 100%;
}

.template-cinematic-hero > figure::after {
  background:
    linear-gradient(180deg, rgba(47, 20, 29, 0.08), rgba(47, 20, 29, 0.14) 40%, rgba(47, 20, 29, 0.9)),
    linear-gradient(90deg, rgba(116, 55, 71, 0.25), transparent 58%);
}

.template-cinematic-copy {
  min-height: clamp(470px, 68svh, 600px);
  padding: 20px 18px 16px;
}

.template-cinematic-main {
  display: grid;
  gap: 14px;
}

.template-split-title {
  overflow: hidden;
  margin: 0;
  letter-spacing: 0;
}

.template-split-title > span {
  display: block;
  opacity: 1;
  transform: none;
}

.template-intro-motion > figure img {
  animation: templateHeroSettle 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.template-intro-motion .template-split-title > span {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  animation: templateTitleReveal 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(90ms + var(--title-line, 0) * 55ms);
}

.template-guardian-seal {
  width: 62px;
  height: 78px;
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 7px;
  background: #eebbc2;
  box-shadow: 0 12px 30px rgba(53, 24, 32, 0.18);
}

.template-guardian-seal img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center 28%;
}

.template-guardian-seal .guardian-idle {
  opacity: 0;
}

.template-intro-motion .template-guardian-seal {
  animation: templateGuardianArrive 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.template-intro-motion .template-guardian-seal .guardian-idle {
  opacity: 1;
  animation: templateGuardianSmile 420ms ease 1150ms forwards;
}

.template-guardian-feedback {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.template-guardian-feedback figure {
  width: 64px;
  height: 76px;
  overflow: hidden;
  border: 1px solid rgba(190, 119, 136, 0.2);
  border-radius: 7px;
  background: #efbdc5;
}

.template-guardian-feedback figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 27%;
}

.template-guardian-feedback h3,
.template-guardian-feedback p {
  margin-right: 0;
}

.template-guardian-feedback.thinking {
  position: relative;
  padding-right: 34px;
}

.template-guardian-feedback.thinking figure img {
  animation: templateGuardianThink 1800ms ease-in-out infinite;
}

.template-guardian-feedback.comforting {
  flex: 1;
}

.template-guardian-dots {
  position: absolute;
  top: 8px;
  right: 0;
  display: flex;
  gap: 3px;
}

.template-guardian-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c77b8c;
  animation: templateGuardianDot 1200ms ease-in-out infinite;
}

.template-guardian-dots i:nth-child(2) {
  animation-delay: 140ms;
}

.template-guardian-dots i:nth-child(3) {
  animation-delay: 280ms;
}

.template-action-spark {
  width: 0;
  height: 0;
  position: fixed;
  z-index: 10000;
  top: var(--spark-y);
  left: var(--spark-x);
  pointer-events: none;
}

.template-action-spark i {
  width: 2px;
  height: 14px;
  position: absolute;
  top: -7px;
  left: -1px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff5f1, #cf7188);
  transform-origin: 50% 7px;
  animation: templateActionSparkRay 520ms cubic-bezier(0.22, 1, 0.36, 1) var(--spark-delay) both;
}

.template-action-spark i:nth-child(even) {
  background: linear-gradient(180deg, #fff8e9, #d5a064);
}

.template-glass-dock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  padding: 6px;
  background: rgba(79, 38, 50, 0.26);
  box-shadow: 0 18px 42px rgba(40, 18, 25, 0.22);
  backdrop-filter: blur(18px) saturate(1.15);
}

.template-glass-dock button {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 6px;
  padding: 9px 11px;
  background: rgba(255, 250, 248, 0.92);
  color: #4c2d36;
  text-align: left;
  box-shadow: none;
  transition: transform 180ms ease, background 180ms ease;
}

.template-glass-dock button + button {
  background: rgba(255, 244, 246, 0.2);
  color: #fff;
}

.template-glass-dock small,
.template-glass-dock strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-glass-dock small {
  color: inherit;
  opacity: 0.66;
  font-size: 9px;
  font-weight: 850;
}

.template-glass-dock strong {
  font-size: 13px;
}

.template-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 800;
}

.template-scroll-cue i {
  width: 42px;
  height: 1px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.34);
}

.template-scroll-cue i::after {
  content: "";
  width: 18px;
  height: 1px;
  position: absolute;
  inset: 0 auto 0 0;
  background: #fff;
  animation: templateCueTravel 1700ms ease-in-out infinite;
}

.template-today-chapter {
  gap: 10px;
  padding-top: 4px;
}

.template-chapter-head {
  display: grid;
  gap: 5px;
  padding: 8px 4px 2px;
}

.template-chapter-head span {
  color: #b36b7c;
  font-size: 9px;
  font-weight: 900;
}

.template-chapter-head h3 {
  max-width: 360px;
  margin: 0;
  color: #4c2d36;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: 0;
}

.template-story-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 28px 8px 2px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.template-story-rail::-webkit-scrollbar {
  display: none;
}

.template-story-card {
  width: min(82%, 330px);
  min-width: min(82%, 330px);
  height: 330px;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  padding: 0;
  scroll-snap-align: start;
  background: #7a4a57;
  color: #fff;
  text-align: left;
  box-shadow: 0 18px 40px rgba(92, 43, 56, 0.16);
}

.template-story-card:nth-child(even) {
  height: 292px;
  margin-top: 38px;
}

.template-story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(45, 22, 28, 0.02) 36%, rgba(45, 22, 28, 0.84));
}

.template-story-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.template-story-card > div {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  gap: 5px;
}

.template-story-card span,
.template-story-card small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 9px;
  font-weight: 850;
}

.template-story-card strong {
  display: block;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.template-rail-cue {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: #a37983;
  font-size: 9px;
  font-weight: 850;
}

.template-rail-cue i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, #cf8093 0 26%, rgba(158, 111, 122, 0.18) 26% 100%);
}

.template-motion-ready [data-template-reveal] {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 260ms ease-out, transform 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.template-motion-ready [data-template-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* The opening image must read instantly; its title already supplies the entrance motion. */
.template-motion-ready .template-cinematic-hero[data-template-reveal] {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .template-glass-dock button:hover {
    transform: translateY(-1px);
  }

  .template-story-card:hover img {
    filter: saturate(1.04) contrast(1.02);
    transform: scale(1.018);
  }
}

@keyframes templateTitleReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes templateHeroSettle {
  from {
    opacity: 0.88;
    transform: scale(1.018);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes templateGuardianArrive {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes templateGuardianSmile {
  to {
    opacity: 0;
  }
}

@keyframes templateGuardianThink {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes templateGuardianDot {
  0%,
  70%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes templateActionSparkRay {
  0% {
    opacity: 0;
    transform: rotate(var(--spark-angle)) translateY(-3px) scaleY(0.3);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--spark-angle)) translateY(-27px) scaleY(0.65);
  }
}

@keyframes templateCueTravel {
  0% {
    transform: translateX(-18px);
  }
  55%,
  100% {
    transform: translateX(42px);
  }
}

@media (max-width: 520px) {
  .template-cinematic-hero,
  .template-cinematic-copy {
    min-height: min(68svh, 560px);
  }

  .template-cinematic-copy h3 {
    font-size: clamp(29px, 8.5vw, 38px);
  }

  .template-story-card {
    width: 82vw;
    min-width: 82vw;
  }

  .template-guardian-seal {
    width: 56px;
    height: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-split-title > span,
  .template-intro-motion > figure img,
  .template-guardian-seal,
  .template-guardian-seal .guardian-idle,
  .template-guardian-feedback.thinking figure img,
  .template-guardian-dots i,
  .template-action-spark,
  .template-scroll-cue i::after {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .template-motion-ready [data-template-reveal],
  .template-cinematic-hero > figure img,
  .template-story-card img,
  .template-glass-dock button {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
