:root {
  --bg: #0f0f0f;
  --bg-soft: #131313;
  --card: #1a1a1a;
  --card-2: #161616;
  --border: #2a2a2a;
  --text: #f5f0e8;
  --muted: #8a8a8a;
  --gold: #f0c674;
  --gold-soft: rgba(240, 198, 116, 0.14);
  --gold-strong: #e8c874;
  --success: #6a6a6a;
  --memory-stock: #72553f;
  --memory-stock-deep: #241811;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --display-font: "Playfair Display", serif;
  --body-font: "Crimson Text", serif;
  --ui-font: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #0f0f0f;
  color: var(--text);
  font-family: var(--ui-font);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(240, 198, 116, 0.035), transparent 22%),
    radial-gradient(circle at 82% 20%, rgba(240, 198, 116, 0.03), transparent 24%);
}

.site-shell {
  overflow-x: clip;
}

.hero,
.roadmap-section,
.letter-section {
  position: relative;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(240, 198, 116, 0.06), transparent 70%),
    url("/Kimi_app/public/hero-bg.jpg") center / cover no-repeat;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.section-label {
  display: inline-block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: 0.02em;
}

.hero h1 {
  margin-top: 1rem;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
}

.hero p {
  margin: 1rem 0 0;
  font-family: var(--body-font);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-style: italic;
  color: var(--muted);
}

.love-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: min(220px, 100%);
  margin: 1.2rem auto 0;
  pointer-events: none;
}

.love-mark-hero {
  width: min(280px, 100%);
  margin-top: 1.35rem;
}

.love-mark-subtle {
  width: min(180px, 100%);
}

.love-mark-line {
  flex: 1;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(240, 198, 116, 0.95), transparent);
  box-shadow: 0 0 14px rgba(240, 198, 116, 0.32);
  opacity: 0.82;
}

.love-mark-heart {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #ffd19a;
  filter: drop-shadow(0 0 10px rgba(240, 198, 116, 0.42));
  animation: heartGlow 3.6s ease-in-out infinite;
}

.love-mark-hero .love-mark-heart {
  width: 26px;
  height: 26px;
}

.love-mark-heart path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  animation: bounceGentle 2s infinite;
}

.scroll-arrow {
  font-size: 1.25rem;
  color: var(--gold);
  line-height: 1;
}

.roadmap-section {
  padding: 4rem 0 3rem;
}

.memory-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.memory-stage:empty {
  display: none;
}

.memory-stage-hero {
  z-index: 1;
}

.memory-stage-letter {
  z-index: 1;
}

.memory-photo {
  position: absolute;
  left: var(--memory-left, 50%);
  top: var(--memory-top, 50%);
  width: var(--memory-width, 188px);
  transform: translate(var(--memory-shift-x, 0), var(--memory-shift-y, 0)) rotate(var(--memory-rotate, 0deg));
  transform-origin: center top;
  opacity: 0;
  filter:
    drop-shadow(0 18px 30px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 20px rgba(240, 198, 116, 0.06));
  animation: memoryAppear 520ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--memory-delay, 0s);
}

.memory-photo-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.85rem 0.85rem 2.25rem;
  background:
    linear-gradient(180deg, rgba(240, 198, 116, 0.12), transparent 18%),
    linear-gradient(180deg, #7d5d44 0%, var(--memory-stock) 42%, #4a3424 72%, var(--memory-stock-deep) 100%);
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 214, 0.08),
    inset 0 -22px 30px rgba(20, 12, 8, 0.18),
    0 14px 22px rgba(0, 0, 0, 0.24);
}

.memory-photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 24%, rgba(240, 198, 116, 0.1), transparent 48%),
    linear-gradient(180deg, rgba(18, 12, 8, 0.02), rgba(18, 12, 8, 0.18));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.memory-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px rgba(240, 198, 116, 0.16),
    inset 0 -1px 0 rgba(42, 28, 18, 0.42);
}

.memory-photo-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(28, 20, 12, 0.24),
    inset 0 0 28px rgba(0, 0, 0, 0.1);
  background: rgba(24, 24, 24, 0.2);
  filter: saturate(0.72) contrast(0.92) brightness(0.84) sepia(0.18);
}

.memory-photo-caption {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  margin-top: 0.6rem;
  padding-top: 0.45rem;
  max-width: 88%;
  overflow: hidden;
  margin-inline: auto;
  border-top: 1px solid rgba(240, 198, 116, 0.18);
  color: rgba(240, 210, 148, 0.9);
  font-family: var(--body-font);
  font-size: 0.82rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 1px 0 rgba(12, 8, 5, 0.4);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.memory-photo-tape {
  position: absolute;
  top: -0.95rem;
  left: 50%;
  width: 4.5rem;
  height: 1.5rem;
  transform: translateX(-50%) rotate(var(--memory-tape-rotate, -4deg));
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(121, 88, 58, 0.64), rgba(63, 42, 26, 0.5)),
    repeating-linear-gradient(
      90deg,
      rgba(240, 198, 116, 0.03) 0,
      rgba(240, 198, 116, 0.03) 4px,
      rgba(28, 17, 8, 0.04) 4px,
      rgba(28, 17, 8, 0.04) 8px
    );
  border: 1px solid rgba(240, 198, 116, 0.08);
  opacity: 0.76;
  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 239, 214, 0.05);
}

.memory-photo-tape::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(240, 198, 116, 0.03), transparent);
  mix-blend-mode: screen;
}

.memory-photo-hero {
  z-index: 1;
}

.memory-photo-letter {
  z-index: 1;
}

.memory-editor-section {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.memory-editor-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.memory-form {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 220px auto;
  gap: 0.9rem;
  align-items: end;
}

.memory-field {
  display: grid;
  gap: 0.4rem;
}

.memory-field span {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.memory-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f0f0f;
  color: var(--text);
  font: inherit;
  padding: 0.72rem 0.82rem;
}

.memory-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 198, 116, 0.08);
}

.memory-submit {
  appearance: none;
  border: 1px solid rgba(240, 198, 116, 0.55);
  background: rgba(240, 198, 116, 0.1);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.memory-submit:hover,
.memory-submit:focus-visible {
  background: rgba(240, 198, 116, 0.16);
  border-color: var(--gold);
  outline: none;
}

.memory-submit:disabled {
  opacity: 0.58;
  cursor: default;
}

.memory-note {
  margin: 0;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.memory-note.is-error {
  color: #f2b0b0;
}

.memory-list {
  display: grid;
  gap: 0.85rem;
}

.memory-empty {
  padding: 1rem 0.2rem 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.memory-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #131313;
}

.memory-item-thumb {
  position: relative;
  width: 94px;
  padding: 0.5rem 0.5rem 1rem;
  background:
    linear-gradient(180deg, rgba(240, 198, 116, 0.1), transparent 18%),
    linear-gradient(180deg, #7d5d44 0%, var(--memory-stock) 42%, #4a3424 72%, var(--memory-stock-deep) 100%);
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 214, 0.06),
    inset 0 -12px 18px rgba(20, 12, 8, 0.14),
    0 8px 16px rgba(0, 0, 0, 0.18);
}

.memory-item-thumb::before {
  content: "";
  position: absolute;
  top: -0.55rem;
  left: 50%;
  width: 2.8rem;
  height: 1rem;
  transform: translateX(-50%) rotate(-5deg);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(121, 88, 58, 0.64), rgba(63, 42, 26, 0.5));
  border: 1px solid rgba(240, 198, 116, 0.08);
  opacity: 0.74;
}

.memory-item-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.72) contrast(0.92) brightness(0.84) sepia(0.18);
}

.memory-item-main {
  display: grid;
  gap: 0.8rem;
}

.memory-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.memory-item-head strong {
  font-family: var(--display-font);
  font-size: 1rem;
  font-weight: 600;
}

.memory-item-badges {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.memory-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 198, 116, 0.22);
  background: rgba(240, 198, 116, 0.08);
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memory-badge-muted {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.memory-item-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 0.75rem;
}

.memory-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head.center,
.letter-section .section-head {
  text-align: center;
}

.section-head.narrow {
  max-width: 720px;
}

.section-head h2 {
  margin-top: 0.85rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 600;
}

.section-head p {
  margin: 0.85rem 0 0;
  font-family: var(--body-font);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--muted);
}

.roadmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: start;
}

.map-card,
.checkpoint-panel,
.letter-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.map-card {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  background: var(--card);
}

.map-status,
.map-current,
.map-tools,
.map-preview,
.map-legend {
  position: absolute;
  z-index: 500;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
}

.map-status,
.map-current {
  padding: 0.9rem 1rem;
  border-radius: 16px;
}

.map-status {
  top: 1rem;
  left: 50%;
  min-width: 172px;
  text-align: center;
  transform: translateX(-50%);
}

.map-tools {
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  max-width: min(360px, calc(100% - 2rem));
  padding: 0.65rem 0.75rem;
  border-radius: 18px;
}

.map-current {
  right: 1rem;
  left: auto;
  bottom: 1rem;
  width: min(320px, calc(100% - 2rem));
}

.map-preview {
  top: 5rem;
  right: 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.map-tool-button {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-radius: 999px;
  padding: 0.58rem 0.95rem;
  font: inherit;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.map-tool-button:hover,
.map-tool-button:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.map-tool-button.is-active {
  background: rgba(240, 198, 116, 0.14);
  border-color: var(--gold);
  color: var(--gold);
}

.map-tool-button-secondary {
  color: var(--muted);
}

.map-tool-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.map-tool-note {
  width: 100%;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  text-align: right;
}

.map-time-tester {
  width: 100%;
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.map-time-tester-head,
.map-time-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.map-time-tester-head strong {
  color: var(--gold);
}

.map-time-slider {
  width: 100%;
  accent-color: var(--gold);
}

.map-tool-meta {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.map-status-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.map-status strong,
.map-current strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--text);
  line-height: 1.4;
}

.map-canvas {
  min-height: 500px;
}

.map-legend {
  left: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.legend-dot-past {
  color: var(--success);
  background: rgba(106, 106, 106, 0.22);
}

.legend-dot-current {
  color: var(--gold);
  background: rgba(240, 198, 116, 0.15);
}

.legend-dot-future {
  color: #3a3a3a;
  background: #1a1a1a;
}

.checkpoint-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.panel-head {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.panel-head strong {
  font-family: var(--display-font);
  font-size: 1.25rem;
  font-weight: 600;
}

.panel-head span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}

.checkpoint-list {
  display: grid;
  gap: 0.8rem;
  max-height: 500px;
  overflow: auto;
  padding-right: 0.35rem;
}

.checkpoint-item {
  width: 100%;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #222;
  background: #131313;
  color: inherit;
  text-align: left;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.checkpoint-item:hover {
  border-color: var(--border);
}

.checkpoint-item.is-selected {
  border-color: var(--gold);
  background: var(--card);
}

.checkpoint-item.is-current {
  box-shadow: 0 0 0 1px rgba(240, 198, 116, 0.24), 0 0 24px rgba(240, 198, 116, 0.06);
}

.checkpoint-item-editor {
  cursor: default;
}

.checkpoint-item-editor:focus-within {
  border-color: var(--gold);
  background: var(--card);
}

.checkpoint-item.is-locked {
  cursor: default;
}

.checkpoint-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.checkpoint-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-family: var(--display-font);
  font-size: 0.86rem;
  font-weight: 700;
}

.checkpoint-item.is-past .checkpoint-number {
  color: var(--success);
  background: rgba(106, 106, 106, 0.2);
}

.checkpoint-item.is-current .checkpoint-number {
  color: var(--gold);
  background: rgba(240, 198, 116, 0.15);
}

.checkpoint-item.is-revealed:not(.is-current):not(.is-past) .checkpoint-number {
  color: var(--gold);
  background: rgba(240, 198, 116, 0.08);
}

.checkpoint-item.is-locked .checkpoint-number {
  color: #3a3a3a;
  background: #1a1a1a;
}

.checkpoint-meta {
  flex: 1;
  min-width: 0;
}

.checkpoint-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--gold);
}

.checkpoint-state {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.checkpoint-state::before,
.checkpoint-state::after {
  content: "";
  position: absolute;
}

.checkpoint-item.is-past .checkpoint-state::before {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(106, 106, 106, 0.18);
  border: 1px solid var(--success);
}

.checkpoint-item.is-past .checkpoint-state::after {
  content: "\2713";
  position: relative;
  color: var(--success);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
}

.checkpoint-item.is-current .checkpoint-state::before {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(240, 198, 116, 0.18);
  border: 1px solid var(--gold);
  box-shadow: 0 0 14px rgba(240, 198, 116, 0.24);
  animation: checkpointPulse 1.8s ease-in-out infinite;
}

.checkpoint-item.is-current .checkpoint-state::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(240, 198, 116, 0.45);
}

.checkpoint-item.is-locked .checkpoint-state::before {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
}

.checkpoint-content h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1rem;
  font-weight: 600;
}

.checkpoint-content p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.checkpoint-editor-grid {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 0.75rem;
}

.checkpoint-field {
  display: grid;
  gap: 0.4rem;
}

.checkpoint-field-wide {
  grid-column: 1 / -1;
}

.checkpoint-field span {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.checkpoint-input,
.checkpoint-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f0f0f;
  color: var(--text);
  font: inherit;
  padding: 0.68rem 0.78rem;
}

.checkpoint-textarea {
  min-height: 82px;
  resize: vertical;
}

.checkpoint-input:focus,
.checkpoint-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 198, 116, 0.08);
}

.checkpoint-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.checkpoint-editor-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.checkpoint-coordinates {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.checkpoint-focus {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.checkpoint-focus:hover,
.checkpoint-focus:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  outline: none;
}

.checkpoint-focus:disabled {
  opacity: 0.45;
  cursor: default;
}

.checkpoint-focus-secondary {
  color: var(--muted);
}

.checkpoint-focus-danger {
  color: #da8e8e;
  border-color: rgba(218, 142, 142, 0.3);
}

.checkpoint-focus-danger:hover,
.checkpoint-focus-danger:focus-visible {
  color: #f2b0b0;
  border-color: #f2b0b0;
}

.checkpoint-empty {
  padding: 1.2rem;
}

.checkpoint-empty h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 1rem;
}

.checkpoint-empty p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.checkpoint-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #3a3a3a;
}

.checkpoint-locked strong {
  font-family: var(--display-font);
  font-size: 1rem;
}

.checkpoint-locked span {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.letter-section {
  padding: 5rem 0 6rem;
}

.section-divider {
  width: 60px;
  height: 1px;
  margin: 1rem auto 0;
  background: rgba(240, 198, 116, 0.4);
}

.letter-card {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 2.25rem;
  background: var(--card-2);
  box-shadow: 0 0 60px rgba(240, 198, 116, 0.06);
}

.letter-card p {
  margin: 0;
  font-family: var(--body-font);
  font-size: 1.18rem;
  line-height: 1.95;
}

.letter-opening {
  margin-bottom: 1.25rem !important;
  font-family: var(--display-font) !important;
  font-size: 1.9rem !important;
  font-weight: 600;
}

.letter-break {
  margin-top: 1.4rem !important;
}

.letter-closing {
  margin-top: 1.8rem !important;
  font-family: var(--display-font) !important;
  font-size: 1.55rem !important;
  font-style: italic;
  color: var(--gold-strong);
}

.leaflet-container {
  background: #0f0f0f;
}

.leaflet-popup-content-wrapper {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-content {
  margin: 14px 16px !important;
  min-width: 220px;
}

.leaflet-popup-tip {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.leaflet-container a.leaflet-popup-close-button {
  display: none !important;
}

.leaflet-control-zoom a {
  background: var(--card) !important;
  color: var(--gold) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: #222 !important;
}

.leaflet-control-attribution {
  background: rgba(15, 15, 15, 0.82) !important;
  color: var(--muted) !important;
  border-top-left-radius: 10px;
  padding: 0.15rem 0.45rem !important;
}

.leaflet-control-attribution a {
  color: var(--gold) !important;
}

.popup-time {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-family: var(--ui-font);
}

.popup-title {
  margin: 0.45rem 0 0;
  font-family: var(--display-font);
  font-size: 1.1rem;
}

.popup-address {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.popup-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.78rem;
}

.popup-link:hover,
.popup-link:focus-visible {
  text-decoration: underline;
}

.marker-shell {
  display: grid;
  place-items: center;
}

.marker-core {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--display-font);
  font-weight: 700;
}

.marker-core-past {
  width: 32px;
  height: 32px;
  background: rgba(106, 106, 106, 0.2);
  border: 2px solid var(--success);
  color: var(--success);
}

.marker-core-current {
  position: relative;
  width: 40px;
  height: 40px;
  background: rgba(240, 198, 116, 0.15);
  border: 2px solid var(--gold);
  color: var(--gold);
  box-shadow: 0 0 20px rgba(240, 198, 116, 0.4), 0 2px 8px rgba(0, 0, 0, 0.45);
  animation: pulseGold 2s infinite;
}

.marker-core-current::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(240, 198, 116, 0.8);
}

.marker-core-revealed {
  width: 36px;
  height: 36px;
  background: rgba(240, 198, 116, 0.1);
  border: 2px solid var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(240, 198, 116, 0.2);
}

.marker-time {
  margin-top: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.92);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.68rem;
  font-family: var(--ui-font);
  letter-spacing: 0.08em;
}

body.is-edit-route .checkpoint-list {
  max-height: 680px;
}

body.is-edit-route .editable-copy {
  border-radius: 10px;
  outline: none;
  transition: box-shadow 180ms ease, background 180ms ease;
}

body.is-edit-route .editable-copy:hover {
  background: rgba(240, 198, 116, 0.04);
  box-shadow: 0 0 0 1px rgba(240, 198, 116, 0.16);
}

body.is-edit-route .editable-copy:focus {
  background: rgba(240, 198, 116, 0.08);
  box-shadow: 0 0 0 1px rgba(240, 198, 116, 0.32), 0 0 0 6px rgba(240, 198, 116, 0.08);
}

@keyframes pulseGold {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

@keyframes heartGlow {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes checkpointPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(240, 198, 116, 0.18), 0 0 14px rgba(240, 198, 116, 0.24);
  }
  55% {
    transform: scale(1.08);
    box-shadow: 0 0 0 6px rgba(240, 198, 116, 0), 0 0 20px rgba(240, 198, 116, 0.34);
  }
}

@keyframes bounceGentle {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}

@keyframes memoryAppear {
  0% {
    opacity: 0;
    transform:
      translate(var(--memory-shift-x, 0), calc(var(--memory-shift-y, 0) + 18px))
      rotate(calc(var(--memory-rotate, 0deg) - 3deg))
      scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translate(var(--memory-shift-x, 0), var(--memory-shift-y, 0)) rotate(var(--memory-rotate, 0deg)) scale(1);
  }
}

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

  .checkpoint-panel {
    min-height: 0;
  }

  .checkpoint-list {
    max-height: none;
  }

  .checkpoint-editor-grid {
    grid-template-columns: 1fr;
  }

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

  .memory-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero,
  .roadmap-section,
  .letter-section {
    width: calc(100% - 1rem);
  }

  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 4.2rem);
  }

  .love-mark {
    gap: 0.7rem;
  }

  .love-mark-hero {
    width: min(230px, 100%);
  }

  .map-card,
  .checkpoint-panel,
  .letter-card,
  .memory-editor-card {
    border-radius: 20px;
  }

  .map-canvas {
    min-height: 460px;
  }

  .map-status,
  .map-current,
  .map-tools,
  .map-preview,
  .map-legend {
    position: absolute;
  }

  .map-status {
    max-width: calc(100% - 10rem);
  }

  .map-current {
    width: calc(100% - 2rem);
  }

  .map-tools {
    max-width: calc(100% - 2rem);
  }

  .map-preview {
    top: 5.5rem;
  }

  .map-time-tester-head,
  .map-time-actions,
  .checkpoint-editor-actions,
  .checkpoint-editor-buttons,
  .memory-item-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .checkpoint-focus,
  .memory-submit {
    width: 100%;
  }

  .memory-stage {
    inset: 0.75rem;
  }

  .memory-photo {
    width: min(112px, 28vw);
  }

  .memory-editor-section {
    width: calc(100% - 1rem);
  }

  .memory-editor-card {
    padding: 1.15rem;
  }

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

  .memory-item {
    grid-template-columns: 1fr;
  }

  .memory-item-thumb {
    width: 96px;
  }

  .letter-card {
    padding: 1.4rem 1.25rem;
  }

  .letter-card p {
    font-size: 1.06rem;
    line-height: 1.85;
  }
}
