:root {
  --bg-day: #FAF6F0;
  --bg-day-2: #F7F2E8;
  --ink: #3C322A;
  --ink-soft: #6F6358;
  --ink-muted: #9A8D7F;
  --border-soft: #8C8275;
  --card-bg: #FFFDF8;
  --card-line: #E6DDD0;
  --cocoa: #664232;
  --cocoa-soft: #EFE3D5;
  --red-pin: #B91C1C;
  --gold-pin: #D99B00;
  --serif: 'Noto Serif SC', 'Playfair Display', Georgia, serif;
  --serif-en: 'Cinzel', 'Playfair Display', Georgia, serif;
  --sans: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --night-transition: 0.9s ease-in-out;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-day);
  color: var(--ink);
  font: 15px/1.65 var(--sans);
  transition: background var(--night-transition), color var(--night-transition);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ================= 地图画布与复古经纬网格 ================= */
#map {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1;
}

.leaflet-container {
  background: radial-gradient(circle at 50% 45%, #FAF6F0 0%, #F4ECE0 100%);
  cursor: pointer;
  transition: background var(--night-transition);
}

#map::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 350;
  background-image:
    linear-gradient(rgba(120, 110, 95, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 110, 95, 0.14) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 1;
  transition: opacity var(--night-transition);
}

.map-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 360;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(3, 6, 14, 0.72) 100%);
  transition: opacity var(--night-transition);
}

.ocean-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: rgba(120, 110, 95, 0.45);
  white-space: nowrap;
  pointer-events: none !important;
  user-select: none;
  transition: opacity var(--night-transition);
}

.country-shape {
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: fill var(--night-transition), stroke var(--night-transition), fill-opacity var(--night-transition), stroke-opacity var(--night-transition);
}

.city-border {
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: stroke var(--night-transition), stroke-opacity var(--night-transition);
}

/* 白天彻底关闭夜幕光晕层计算，提升手机端缩放帧率 */
.country-glow {
  display: none;
  pointer-events: none !important;
  opacity: 0;
  transition: opacity var(--night-transition);
}

/* 关灯后的爱心发光弧线 */
.night-route-line {
  display: none;
  pointer-events: none !important;
  stroke: rgba(255, 102, 133, 0.72);
  stroke-width: 1.8px;
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 0 5px rgba(255, 51, 85, 0.85));
}

body.night .night-route-line {
  display: block;
  animation: routeFlow 28s linear infinite;
}

@keyframes routeFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -260; }
}

/* 缩放控件 */
.leaflet-bottom.leaflet-right {
  bottom: 24px;
  right: 22px;
  z-index: 500;
}
.leaflet-control-zoom {
  border: 1px solid rgba(140, 130, 117, 0.35) !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(60, 50, 42, 0.08) !important;
}
.leaflet-control-zoom a {
  background: rgba(255, 253, 248, 0.92) !important;
  color: var(--ink) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-family: var(--serif-en);
  transition: background var(--night-transition), color var(--night-transition);
}

/* 预约深黄色星标 & 已打卡深红色标 */
.pin-wish {
  font-size: 26px;
  line-height: 28px;
  text-align: center;
  color: var(--gold-pin);
  text-shadow: 0 0 8px rgba(255, 253, 248, 0.95), 0 3px 8px rgba(217, 155, 0, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, opacity var(--night-transition);
}
.pin-wish:hover { transform: scale(1.2); }

.pin-visited {
  font-size: 26px;
  line-height: 28px;
  text-align: center;
  color: var(--red-pin);
  text-shadow: 0 0 8px rgba(255, 253, 248, 0.95), 0 3px 10px rgba(185, 28, 28, 0.45);
  cursor: pointer;
  transition: transform 0.25s ease, color var(--night-transition), filter var(--night-transition);
}
.pin-visited:hover { transform: scale(1.2); }

.pin-tooltip {
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(140, 130, 117, 0.4);
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 10px;
  font: 600 12px var(--serif);
  box-shadow: 0 4px 12px rgba(60, 50, 42, 0.1);
}

/* ================= 沉浸式“关灯 / 开灯”夜幕模式 ================= */
body.night .leaflet-container {
  background: radial-gradient(circle at 50% 45%, #0D1528 0%, #060A16 100%);
}
body.night #map::after { opacity: 0; }
body.night .map-vignette { opacity: 1; }
body.night .ocean-label { opacity: 0; }
body.night .pin-wish { opacity: 0; pointer-events: none !important; }

body.night .country-shape {
  fill: #0B1021 !important;
  fill-opacity: 0.96 !important;
  stroke: rgba(215, 232, 255, 0.46) !important;
  stroke-width: 0.75px !important;
}
body.night .city-border {
  stroke: rgba(165, 200, 255, 0.16) !important;
  stroke-width: 0.35px !important;
}
body.night .country-glow {
  display: block;
  opacity: 1;
}

body.night .pin-visited {
  color: #FF3355;
  text-shadow: none;
  filter: drop-shadow(0 0 6px rgba(255, 51, 85, 0.9)) drop-shadow(0 0 18px rgba(255, 51, 85, 0.45));
}
body.night .pin-visited .heart-float {
  display: inline-block;
  animation: nightHeartFloat 3.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes nightHeartFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.06); }
}

body.night .leaflet-control-zoom a {
  background: rgba(13, 21, 40, 0.85) !important;
  color: #E2ECFF !important;
  border-color: rgba(165, 200, 255, 0.2) !important;
}

/* ================= 画面1：开始页引导遮罩 ================= */
.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(250, 246, 240, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  will-change: opacity;
  transform: translateZ(0);
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.start-overlay.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.start-kicker {
  font: 500 12px/1 var(--serif-en);
  letter-spacing: 0.28em;
  color: #8C8275;
  margin: 0 0 18px;
}
.start-inner h1 {
  font: 700 clamp(36px, 6.5vw, 62px)/1.24 var(--serif);
  color: #362D25;
  margin: 0 0 22px;
  letter-spacing: 0.02em;
}
.start-hint {
  font: 500 14px/1 var(--serif);
  color: #8C8275;
  letter-spacing: 0.14em;
  animation: gentleBreath 2.6s ease-in-out infinite;
}
@keyframes gentleBreath {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 0.35; }
}

/* ================= 顶部交互栏 & 左下角关灯开关 ================= */
.top-bar {
  position: fixed;
  top: 20px;
  left: 22px;
  right: 22px;
  z-index: 550;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.top-left, .top-right { pointer-events: auto; }

.poster-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(140, 130, 117, 0.42);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  font: 600 13px var(--serif);
  box-shadow: 0 8px 24px rgba(60, 50, 42, 0.1);
  transition: transform 0.2s ease, background var(--night-transition), color var(--night-transition);
}
.poster-entry:hover { transform: translateY(-1px); }
.entry-star { color: var(--gold-pin); }
body.night .poster-entry {
  background: rgba(13, 21, 40, 0.85);
  border-color: rgba(165, 200, 255, 0.32);
  color: #EDF3FF;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(140, 130, 117, 0.38);
  border-radius: 999px;
  padding: 8px 16px;
  width: min(290px, 56vw);
  box-shadow: 0 8px 24px rgba(60, 50, 42, 0.08);
  transition: background var(--night-transition), border-color var(--night-transition);
}
.search-icon { color: #8C8275; font-size: 16px; }
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: var(--ink);
}
body.night .search-box {
  background: rgba(13, 21, 40, 0.82);
  border-color: rgba(165, 200, 255, 0.28);
}
body.night .search-box input { color: #EDF3FF; }

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 16px 36px rgba(60, 50, 42, 0.16);
}
.search-results.show { display: block; }
.search-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid #F3ECE1;
  cursor: pointer;
}
.search-item:last-child { border-bottom: 0; }
.search-item:hover { background: #F8F2E7; }

.theme-toggle {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(102, 66, 50, 0.35);
  background: rgba(250, 246, 240, 0.88);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font: 600 13px var(--serif);
  box-shadow: 0 8px 22px rgba(60, 50, 42, 0.1);
  transition: all var(--night-transition);
}
body.night .theme-toggle {
  background: rgba(13, 21, 40, 0.84);
  border-color: rgba(200, 220, 255, 0.35);
  color: #EEF4FF;
  box-shadow: 0 0 18px rgba(130, 170, 255, 0.18);
}

/* ================= 通用高斯模糊层 ================= */
.blur-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(250, 246, 240, 0.48);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  will-change: opacity, transform;
  transform: translateZ(0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}
body.night .blur-overlay { background: rgba(6, 10, 22, 0.62); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ================= 画面2：地点详情页 ================= */
.place-stage {
  position: relative;
  width: min(920px, 100%);
  min-height: 360px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: center;
  padding: 36px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--card-line);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(60, 50, 42, 0.16);
}
.stage-close, .panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #F1E8DC;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
}
.place-left { animation: popLeft 0.38s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes popLeft {
  from { opacity: 0; transform: translateX(-22px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
.place-country {
  font: 600 13px/1.4 var(--serif-en), var(--serif);
  letter-spacing: 0.16em;
  color: #8C8275;
  margin-bottom: 10px;
}
.place-title {
  font: 700 clamp(34px, 5vw, 54px)/1.18 var(--serif);
  color: var(--ink);
  margin: 0;
}

.mini-gallery {
  display: flex;
  align-items: center;
  margin-top: 22px;
  padding-left: 8px;
}
.mini-polaroid {
  width: 68px;
  height: 78px;
  padding: 5px 5px 14px;
  background: #FFFDF8;
  border: 1px solid #E8DFD3;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(60, 50, 42, 0.16);
  margin-left: -14px;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.25s ease, z-index 0.25s;
}
.mini-polaroid:first-child { margin-left: 0; }
.mini-polaroid:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.12);
  z-index: 10;
}
.mini-polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.place-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}
.place-info-card {
  background: #FAF5EC;
  border: 1px solid #EAE0D2;
  border-radius: 20px;
  padding: 20px 22px;
}
.info-label {
  font: 600 11px var(--serif-en);
  letter-spacing: 0.2em;
  color: #9A8D7F;
  margin-bottom: 8px;
}
.place-fact {
  font: 500 15px/1.85 var(--serif);
  color: var(--ink);
  margin: 0;
}
.place-action-box { text-align: right; }
.place-prompt {
  font: 600 15px var(--serif);
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.place-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-primary, .btn-secondary, .btn-danger-soft {
  padding: 11px 24px;
  border-radius: 999px;
  font: 600 14px var(--serif);
  border: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.btn-primary { background: var(--cocoa); color: #FFFDF8; }
.btn-secondary { background: var(--cocoa-soft); color: var(--cocoa); }
.btn-danger-soft { background: #F9E5E3; color: #991B1B; }
.btn-primary:hover, .btn-secondary:hover, .btn-danger-soft:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}
.full { width: 100%; }

/* ================= 画面3：打卡手账面板 ================= */
.checkin-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 28px;
  padding: 24px 28px 26px;
  box-shadow: 0 28px 80px rgba(60, 50, 42, 0.22);
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.42s ease;
}
.checkin-panel.slide-up-out {
  transform: translateY(-75px) scale(0.96);
  opacity: 0;
}
.checkin-panel.slide-up-in {
  animation: slideUpIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideUpIn {
  from { transform: translateY(55px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.history-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-right: 36px;
}
.history-tab {
  border: 1px solid var(--card-line);
  background: #F6EFE5;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 4px 12px;
  font: 600 12px var(--serif);
}
.history-tab.active {
  background: var(--cocoa);
  border-color: var(--cocoa);
  color: #FFFDF8;
}

.date-bar {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px dashed #DFD4C4;
  margin-bottom: 10px;
  cursor: pointer;
}
.date-placeholder {
  font: 500 14px var(--serif);
  color: #A59789;
  letter-spacing: 0.08em;
}
.date-filled {
  font: 700 22px var(--serif-en), var(--serif);
  color: var(--ink);
  letter-spacing: 0.1em;
}
.hidden-date-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.panel-city-sub {
  text-align: center;
  font: 600 13px var(--serif);
  color: #8C8275;
  margin-bottom: 14px;
}

.slide-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: #F4ECE1;
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.slide-tab {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 7px 6px;
  border-radius: 999px;
  font: 600 12px var(--serif);
  transition: all 0.2s ease;
}
.slide-tab.active {
  background: var(--cocoa);
  color: #FFFDF8;
}

.slides-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.slides-track::-webkit-scrollbar { display: none; }

.slide-page {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 4px 2px 10px;
}
.slide-prompt {
  text-align: center;
  font: 600 15px var(--serif);
  color: var(--ink);
  margin: 0 0 14px;
}

.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 20px;
  border: 1.5px dashed #D3C5B3;
  border-radius: 18px;
  background: #FAF5EC;
  cursor: pointer;
}
.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-plus { font-size: 26px; color: var(--cocoa); line-height: 1; }
.upload-zone strong { font-size: 13px; color: var(--ink); }
.upload-zone small { font-size: 12px; color: #9A8D7F; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.photo-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #FFFDF8;
  box-shadow: 0 4px 14px rgba(60, 50, 42, 0.12);
}
.photo-item.is-featured { outline: 2.5px solid var(--red-pin); }
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #FFFDF8;
  background: rgba(60, 50, 42, 0.45);
  color: #FFFDF8;
  display: grid;
  place-items: center;
  font-size: 13px;
  padding: 0;
}
.photo-item.is-featured .photo-check { background: var(--red-pin); }
.photo-tip {
  text-align: center;
  font-size: 12px;
  color: #8C8275;
  margin: 12px 0 0;
}

.mood-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.mood-chip {
  border: 1px solid #DFD3C3;
  background: #FAF4EB;
  color: var(--cocoa);
  border-radius: 999px;
  padding: 7px 14px;
  font: 500 13px var(--serif);
  transition: all 0.2s ease;
}
.mood-chip.selected {
  background: var(--cocoa);
  border-color: var(--cocoa);
  color: #FFFDF8;
}

.emoji-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.emoji-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #E4D9C9;
  background: #FAF5EC;
  font-size: 20px;
  transition: all 0.2s ease;
}
.emoji-btn.selected {
  background: #9E3B33;
  border-color: #9E3B33;
  transform: scale(1.08);
}

.custom-mood-wrap { display: flex; gap: 8px; }
.custom-mood-wrap input {
  flex: 1;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #FFFDF8;
  font-size: 13px;
  outline: 0;
}
.custom-mood-wrap button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--cocoa-soft);
  color: var(--cocoa);
  font: 600 13px var(--serif);
}

.diary-book {
  position: relative;
  background: #F7EFE2;
  border: 1px solid #E2D5C2;
  border-radius: 18px;
  padding: 16px 18px 16px 32px;
  box-shadow: inset 0 0 24px rgba(130, 108, 82, 0.08);
}
.diary-spine {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 14px;
  width: 4px;
  border-left: 2px dashed rgba(138, 114, 90, 0.35);
}
.diary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--serif-en);
  color: var(--cocoa);
  font-weight: 700;
  font-size: 14px;
}
.diary-book textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: vertical;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 27px,
    rgba(138, 118, 96, 0.24) 28px
  );
  line-height: 28px;
  font: 500 14px/28px var(--serif);
  color: var(--ink);
}

.panel-footer { margin-top: 14px; }

/* ================= 纪念卡片与加载弹窗 ================= */
.loading-box, .love-date-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  border-radius: 24px;
  padding: 32px 30px;
  text-align: center;
  width: min(380px, 100%);
  box-shadow: 0 24px 64px rgba(60, 50, 42, 0.2);
}
.loading-orbit {
  font-size: 40px;
  color: var(--gold-pin);
  margin-bottom: 12px;
  animation: spinOrbit 2.4s linear infinite;
}
@keyframes spinOrbit { to { transform: rotate(360deg); } }
.loading-box p { font: 600 15px var(--serif); color: var(--ink); margin: 0; }
.love-date-card h3 { font: 700 22px var(--serif); margin: 6px 0 8px; }
.love-date-card p { font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; }
.love-date-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: #FAF5EC;
  margin-bottom: 18px;
}
.love-date-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.poster-wrap {
  position: relative;
  width: min(390px, 92vw);
}

.poster-card {
  position: relative;
  background: #FBF7F0;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 26px 70px rgba(45, 34, 26, 0.28);
  border: 1px solid #E8DFD1;
}

.poster-exit {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #E4DACB;
  background: rgba(255, 253, 248, 0.9);
  color: #6F6358;
  font-size: 18px;
  line-height: 1;
}

.poster-inner-frame {
  border: 1.5px double #DDD1C0;
  border-radius: 12px;
  padding: 26px 22px 22px;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(226, 212, 193, 0.22), transparent 36%),
    radial-gradient(circle at bottom right, rgba(226, 212, 193, 0.22), transparent 36%),
    #FCF9F3;
}

.poster-script-title {
  font-family: 'Great Vibes', 'Playfair Display', cursive;
  font-size: 40px;
  line-height: 1.1;
  color: #2B241E;
  margin-bottom: 4px;
}

.poster-sub-title {
  font: 600 14px/1.4 var(--serif);
  color: #3C322A;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.poster-sub-title span { color: #7A2428; }

.poster-persona {
  font: 700 30px/1.25 var(--serif);
  color: #6E1F23;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}

.poster-subtitle {
  font: 500 13px/1.5 var(--serif);
  color: #6D5B4E;
  margin: 0 0 16px;
}

.poster-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
  width: 82%;
  color: #9A8876;
}
.orn-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #B8A795, transparent);
}
.orn-floral { font-size: 13px; }
.orn-heart { color: #7A2428; font-size: 13px; }

.poster-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  color: #2E2620;
  font-family: var(--serif);
}

.metric-days { font-size: 16px; font-weight: 600; }
.metric-num-script {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 32px;
  color: #241D18;
  margin: 0 4px;
}
.metric-heart { color: #A6262C; font-size: 13px; margin-left: 3px; }

.metric-places { font-size: 16px; font-weight: 600; }
.metric-places b,
.metric-wish b {
  font-family: 'Playfair Display', var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 3px;
  color: #241D18;
}

.metric-beat { font-size: 13px; color: #5C5046; }
.metric-wish { font-size: 15px; font-weight: 600; margin-top: 2px; }
.metric-star { color: #E5A910; font-size: 13px; margin-left: 3px; }

.poster-message {
  font: 500 13px/1.85 var(--serif);
  color: #3C322A;
  text-align: left;
  margin: 0 4px 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(154, 136, 118, 0.35);
}

.poster-quote-block { text-align: right; padding: 0 4px; }
.quote-tag {
  font: 600 11px var(--serif);
  color: #7D6D5E;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.poster-quote-text {
  font: 500 12px/1.7 var(--serif);
  color: #5C5046;
  margin: 0 0 4px;
}
.poster-quote-author {
  display: block;
  font: 600 11px var(--serif);
  color: #7D6D5E;
}

.poster-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.poster-btn-save,
.poster-btn-share {
  height: 44px;
  border-radius: 999px;
  border: 0;
  font: 600 14px var(--serif);
  letter-spacing: 0.06em;
  box-shadow: 0 10px 24px rgba(45, 34, 26, 0.18);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.poster-btn-save { background: #F6F0E6; color: #3C322A; }
.poster-btn-share { background: #762A2A; color: #FFFDF8; }
.poster-btn-save:hover,
.poster-btn-share:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* ================= Toast ================= */
.toast {
  position: fixed;
  top: 26px;
  left: 50%;
  z-index: 3000;
  transform: translate(-50%, -18px);
  opacity: 0;
  background: rgba(60, 50, 42, 0.92);
  color: #FFFDF8;
  padding: 10px 22px;
  border-radius: 999px;
  font: 500 13px var(--serif);
  pointer-events: none;
  transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .place-stage { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px; }
  .place-action-box { text-align: left; }
  .place-buttons { justify-content: flex-start; }
  .checkin-panel { padding: 20px 18px 22px; }
}