/* ==========================================================
   CON ĐƯỜNG TƠ LỤA — PHONG CÁCH BẢN ĐỒ CỔ ĐIỂN (ANTIQUE ATLAS)
   ========================================================== */

:root {
  --bg-deep: #1d1510;
  --bg-wood: #2a1e15;
  --parchment-light: #fbf4e4;
  --parchment: #f3e4c3;
  --parchment-dark: #dec493;
  --ink-dark: #2c1b10;
  --ink-muted: #644933;
  --gold: #c9922c;
  --gold-bright: #f4c654;
  --land-red: #a92c25;
  --land-red-dark: #7d1d18;
  --sea-blue: #1c5d7d;
  --sea-blue-dark: #134159;
  --emerald: #1f7a4c;
  --amber: #b96e14;
  --danger: #c0392b;
  --shadow-soft: 0 14px 36px rgba(15, 8, 3, 0.45);
  --shadow-card: 0 20px 50px rgba(12, 6, 2, 0.58);
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: radial-gradient(circle at 50% 25%, #3a291d 0%, var(--bg-deep) 78%);
  color: var(--ink-dark);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ==================== APP SHELL ==================== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ==================== TOP HUD BAR ==================== */
.hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #352418 0%, #24180f 100%);
  border-bottom: 2px solid rgba(201, 146, 44, 0.45);
  color: var(--parchment-light);
  z-index: 20;
  flex-wrap: wrap;
}

.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid rgba(244, 198, 84, 0.4);
  background: rgba(251, 244, 228, 0.08);
  color: var(--parchment-light);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.14s ease, border-color 0.18s ease;
}

.btn-icon:hover {
  background: rgba(244, 198, 84, 0.2);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

.btn-sound {
  padding: 7px 10px;
}

.route-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(201, 146, 44, 0.18);
  border: 1px solid rgba(244, 198, 84, 0.45);
  color: #fce8b2;
}

.route-pill.is-land {
  background: rgba(169, 44, 37, 0.35);
  border-color: rgba(240, 118, 108, 0.65);
  color: #ffd7d4;
}

.route-pill.is-sea {
  background: rgba(28, 93, 125, 0.4);
  border-color: rgba(108, 198, 240, 0.65);
  color: #d4f1ff;
}

/* ==================== CHECKPOINT STEPPER ==================== */
.hud-stepper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  justify-content: center;
  min-width: 240px;
}

.step-node {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(251, 244, 228, 0.62);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  transition: all 0.25s ease;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(251, 244, 228, 0.35);
  flex-shrink: 0;
}

.step-line {
  width: 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
}

.step-node.is-start {
  color: #fde3a7;
  border-color: rgba(244, 198, 84, 0.45);
  background: rgba(244, 198, 84, 0.12);
}

.step-node.is-start .step-dot {
  background: var(--gold-bright);
}

.step-node.is-active {
  color: #fff;
  background: rgba(244, 198, 84, 0.22);
  border-color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(244, 198, 84, 0.38);
}

.step-node.is-active .step-dot {
  background: var(--gold-bright);
  box-shadow: 0 0 6px var(--gold-bright);
}

.step-node.is-cleared {
  color: #cffce1;
  background: rgba(31, 122, 76, 0.35);
  border-color: rgba(88, 214, 141, 0.65);
}

.step-node.is-cleared .step-dot {
  background: #58d68d;
}

.step-node.is-damaged {
  color: #ffe2bd;
  background: rgba(185, 110, 20, 0.35);
  border-color: rgba(245, 176, 65, 0.65);
}

.step-node.is-damaged .step-dot {
  background: #f5b041;
}

/* ==================== CARGO & SCORE ==================== */
.cargo-tray {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(201, 146, 44, 0.3);
}

.tray-label {
  font-size: 12px;
  color: rgba(251, 244, 228, 0.72);
  font-weight: 600;
}

.cargo-slots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cargo-slot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: rgba(251, 244, 228, 0.14);
  border: 1px solid rgba(244, 198, 84, 0.45);
  transition: all 0.35s ease;
  position: relative;
}

.cargo-slot.is-lost {
  opacity: 0.3;
  filter: grayscale(1);
  border-color: rgba(220, 70, 60, 0.55);
  animation: cargoShake 0.48s ease;
}

.cargo-slot.is-lost::after {
  content: '✕';
  position: absolute;
  color: #ff6b6b;
  font-size: 14px;
  font-weight: 900;
}

@keyframes cargoShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px) rotate(-8deg); }
  45% { transform: translateX(4px) rotate(8deg); }
  70% { transform: translateX(-3px); }
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(31, 122, 76, 0.28);
  border: 1px solid rgba(88, 214, 141, 0.55);
  color: #d6ffe6;
  font-size: 13px;
}

/* ==================== MAIN MAP STAGE ==================== */
.stage-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 18px 16px;
  gap: 12px;
}

.map-frame {
  position: relative;
  width: min(100%, 1160px);
  max-height: calc(100vh - 150px);
  aspect-ratio: 720 / 393;
  border-radius: 16px;
  overflow: hidden;
  border: 4px solid #b58434;
  box-shadow:
    0 0 0 2px rgba(44, 27, 16, 0.85),
    0 20px 54px rgba(0, 0, 0, 0.62),
    inset 0 0 36px rgba(42, 24, 10, 0.35);
  background: #e9d9b8;
  user-select: none;
}

.map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.map-svg,
.map-markers,
.map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-svg {
  z-index: 2;
}

.map-markers {
  z-index: 3;
}

.map-canvas {
  z-index: 4;
}

/* Route SVG Animations */
.route-dash {
  stroke-dasharray: 1.6 1.1;
  animation: routeFlow 20s linear infinite;
}

@keyframes routeFlow {
  to {
    stroke-dashoffset: -40;
  }
}

/* Map Checkpoint Pins */
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.pin-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--parchment-light);
  border: 3px solid var(--ink-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  transition: all 0.25s ease;
}

.map-pin.is-start .pin-circle {
  width: 22px;
  height: 22px;
  background: var(--gold);
  border-color: #fff5d6;
  box-shadow: 0 0 0 4px rgba(244, 198, 84, 0.38), 0 3px 10px rgba(0, 0, 0, 0.45);
}

.map-pin.is-land .pin-circle {
  border-color: var(--land-red);
}

.map-pin.is-sea .pin-circle {
  border-color: var(--sea-blue);
}

.map-pin.is-target .pin-circle {
  width: 22px;
  height: 22px;
  background: var(--gold-bright);
  border-color: #fff;
  animation: pinPulse 1.4s ease-in-out infinite;
}

.map-pin.is-cleared .pin-circle {
  width: 22px;
  height: 22px;
  background: var(--emerald);
  border-color: #e9fff2;
}

.map-pin.is-damaged .pin-circle {
  width: 22px;
  height: 22px;
  background: var(--amber);
  border-color: #fff3dc;
}

@keyframes pinPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(244, 198, 84, 0.85);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 11px rgba(244, 198, 84, 0);
    transform: scale(1.12);
  }
}

.pin-tag {
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(44, 27, 16, 0.86);
  color: #fff8e8;
  border: 1px solid rgba(244, 198, 84, 0.55);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.map-pin.label-top {
  flex-direction: column-reverse;
}

.map-pin.label-top .pin-tag {
  margin-top: 0;
  margin-bottom: 4px;
}

.map-pin.label-right {
  flex-direction: row;
  gap: 5px;
}

.map-pin.label-right .pin-tag {
  margin-top: 0;
}

.btn-restore-summary {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 12;
  pointer-events: auto;
  padding: 9px 15px;
  border-radius: 999px;
  border: 2px solid var(--gold-bright);
  background: rgba(44, 27, 16, 0.92);
  color: #fff8e1;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s ease, background 0.16s ease;
}

.btn-restore-summary:hover {
  transform: translateY(-2px);
  background: #3d2514;
}

/* ==================== NARRATION BAR ==================== */
.narration-bar {
  width: min(100%, 1160px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(251, 244, 228, 0.96), rgba(241, 225, 191, 0.96));
  border: 1.5px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.narration-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--ink-dark);
  color: var(--gold-bright);
}

.narration-badge.is-danger {
  background: var(--danger);
  color: #fff;
}

.narration-badge.is-success {
  background: var(--emerald);
  color: #fff;
}

.narration-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-dark);
  line-height: 1.45;
}

/* ==================== OVERLAYS & PARCHMENT CARDS ==================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 12, 6, 0.62);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.parchment-panel {
  position: relative;
  background: linear-gradient(155deg, var(--parchment-light) 0%, var(--parchment) 65%, #ead4a7 100%);
  border: 3px solid var(--gold);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(44, 27, 16, 0.25) inset,
    var(--shadow-card);
  color: var(--ink-dark);
  max-height: 94vh;
  overflow-y: auto;
  animation: panelRise 0.3s cubic-bezier(0.2, 0.85, 0.25, 1);
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==================== MENU CARD ==================== */
.menu-card {
  width: min(940px, 100%);
  padding: 26px 28px 22px;
}

.menu-header {
  text-align: center;
  margin-bottom: 20px;
}

.compass-emblem {
  font-size: 30px;
  margin-bottom: 4px;
}

.menu-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--land-red);
  margin-bottom: 4px;
}

.menu-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--ink-dark);
  margin-bottom: 8px;
}

.menu-subtitle {
  max-width: 660px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.86);
  border: 2px solid rgba(138, 98, 48, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: left;
}

.route-card:hover,
.route-card:focus-visible {
  transform: translateY(-4px);
  outline: none;
}

.route-card--land:hover,
.route-card--land:focus-visible {
  border-color: var(--land-red);
  box-shadow: 0 14px 32px rgba(169, 44, 37, 0.22);
}

.route-card--sea:hover,
.route-card--sea:focus-visible {
  border-color: var(--sea-blue);
  box-shadow: 0 14px 32px rgba(28, 93, 125, 0.22);
}

.route-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.route-art {
  flex-shrink: 0;
  border-radius: 12px;
  padding: 4px;
  background: rgba(243, 228, 195, 0.6);
  border: 1px solid rgba(180, 134, 58, 0.35);
}

.route-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.route-tag--land {
  background: rgba(169, 44, 37, 0.14);
  color: var(--land-red-dark);
}

.route-tag--sea {
  background: rgba(28, 93, 125, 0.14);
  color: var(--sea-blue-dark);
}

.route-card-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-dark);
}

.route-card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.route-stops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(222, 196, 147, 0.32);
  border: 1px dashed rgba(138, 98, 48, 0.35);
}

.stop-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fffaf0;
  border: 1px solid rgba(138, 98, 48, 0.3);
  color: var(--ink-dark);
}

.stop-chip--start {
  background: var(--gold);
  color: #fffdf7;
  border-color: transparent;
}

.stop-arrow {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 700;
}

.route-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: 11px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: filter 0.18s ease;
}

.route-cta--land {
  background: linear-gradient(135deg, var(--land-red) 0%, var(--land-red-dark) 100%);
}

.route-cta--sea {
  background: linear-gradient(135deg, var(--sea-blue) 0%, var(--sea-blue-dark) 100%);
}

.route-card:hover .route-cta {
  filter: brightness(1.08);
}

.menu-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(138, 98, 48, 0.28);
}

.rule-item {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-muted);
  background: rgba(255, 250, 240, 0.65);
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(180, 134, 58, 0.25);
}

.rule-item strong {
  color: var(--ink-dark);
}

/* ==================== QUIZ MODAL ==================== */
.quiz-overlay {
  background: rgba(20, 12, 6, 0.42);
  backdrop-filter: blur(1.5px);
}

.quiz-card {
  width: min(630px, 100%);
  padding: 22px 24px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.quiz-obstacle-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(192, 57, 43, 0.16);
  color: var(--land-red-dark);
  border: 1px solid rgba(192, 57, 43, 0.35);
}

.quiz-checkpoint-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.quiz-obstacle-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(169, 44, 37, 0.11), rgba(201, 146, 44, 0.14));
  border: 1px solid rgba(169, 44, 37, 0.28);
  margin-bottom: 16px;
}

.quiz-obstacle-icon {
  font-size: 28px;
  line-height: 1;
}

.quiz-obstacle-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--land-red-dark);
  margin-bottom: 3px;
}

.quiz-obstacle-sub {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-dark);
}

.quiz-question {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-dark);
  margin-bottom: 14px;
}

.quiz-options {
  display: grid;
  gap: 9px;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid rgba(138, 98, 48, 0.32);
  background: rgba(255, 252, 245, 0.92);
  color: var(--ink-dark);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: #fff9ea;
  transform: translateX(3px);
}

.quiz-option-btn:disabled {
  cursor: default;
}

.opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  background: rgba(201, 146, 44, 0.22);
  color: var(--ink-dark);
}

.quiz-option-btn.is-correct {
  border-color: var(--emerald);
  background: #e6f9ee;
  color: #124d2f;
}

.quiz-option-btn.is-correct .opt-letter {
  background: var(--emerald);
  color: #fff;
}

.quiz-option-btn.is-wrong {
  border-color: var(--danger);
  background: #fdecec;
  color: #7a1c14;
}

.quiz-option-btn.is-wrong .opt-letter {
  background: var(--danger);
  color: #fff;
}

.quiz-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 13px;
  background: rgba(255, 251, 242, 0.92);
  border: 2px solid var(--gold);
  animation: fadeIn 0.22s ease;
}

.quiz-feedback.is-correct {
  border-color: var(--emerald);
  background: #eefbf3;
}

.quiz-feedback.is-wrong {
  border-color: var(--danger);
  background: #fff1f0;
}

.feedback-status {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}

.quiz-feedback.is-correct .feedback-status {
  color: var(--emerald);
}

.quiz-feedback.is-wrong .feedback-status {
  color: var(--danger);
}

.feedback-fact {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-dark);
  margin-bottom: 12px;
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 11px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #c98a24 0%, #9b5d12 100%);
  color: #fffdf8;
  box-shadow: 0 6px 18px rgba(155, 93, 18, 0.34);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--sea-blue) 0%, var(--sea-blue-dark) 100%);
  color: #fff;
}

.btn-secondary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(44, 27, 16, 0.1);
  color: var(--ink-dark);
  border: 1.5px solid rgba(44, 27, 16, 0.24);
}

.btn-ghost:hover {
  background: rgba(44, 27, 16, 0.18);
}

/* ==================== ENDING SUMMARY MODAL ==================== */
.summary-overlay {
  background: rgba(16, 10, 5, 0.42);
  backdrop-filter: blur(1.5px);
}

.summary-card {
  width: min(560px, 100%);
  padding: 24px 26px 22px;
  text-align: center;
}

.summary-card.is-sad {
  background: linear-gradient(160deg, #eceef1 0%, #dce1e8 65%, #ced6e0 100%);
  border-color: #6b7f99;
}

.btn-peek-map {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(44, 27, 16, 0.25);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-dark);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-peek-map:hover {
  background: #fff;
}

.summary-mascot {
  width: 128px;
  height: 112px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-bounce {
  animation: mascotCelebrate 1.1s ease-in-out infinite;
}

@keyframes mascotCelebrate {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}

.mascot-sad {
  animation: mascotSigh 2.2s ease-in-out infinite;
}

@keyframes mascotSigh {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.summary-mood-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.summary-mood-badge.is-celebrate {
  background: linear-gradient(135deg, #27ae60, #1e8449);
  color: #fff;
  box-shadow: 0 4px 14px rgba(39, 174, 96, 0.35);
}

.summary-mood-badge.is-sad {
  background: linear-gradient(135deg, #566573, #34495e);
  color: #ebf5fb;
}

.summary-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.summary-subtitle {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(138, 98, 48, 0.28);
}

.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-dark);
}

.summary-log {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-bottom: 18px;
  text-align: left;
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(138, 98, 48, 0.22);
}

.log-item.is-ok {
  border-left: 4px solid var(--emerald);
}

.log-item.is-fail {
  border-left: 4px solid var(--danger);
}

.summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 9px;
}

.summary-actions .btn-primary {
  width: auto;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 860px) {
  .route-grid {
    grid-template-columns: 1fr;
  }
  .menu-rules {
    grid-template-columns: repeat(2, 1fr);
  }
  .hud-stepper {
    order: 3;
    width: 100%;
    justify-content: center;
    row-gap: 6px;
  }
  .step-line {
    width: 8px;
  }
  .summary-actions {
    grid-template-columns: 1fr;
  }
}
