/* ═══════════════════════════════════════════════
   홀리데이 메이트 — 디자인 시스템
   컨셉: 따뜻한 인화지 + 필름 스트립. 화면이 아니라 "종이"처럼 느껴지게.
   ═══════════════════════════════════════════════ */

:root {
  --paper: #F5EFE3;
  --paper-warm: #EFE6D3;
  --card: #FBF7EE;
  --ink: #2B2118;
  --ink-soft: #5C4F41;
  --ink-faint: #93866F;
  --line: #E0D5BE;
  --amber: #D89A2B;       /* 코닥 옐로우에서 가져온 포인트 */
  --amber-deep: #B47B14;
  --leak: #C0655B;        /* 라이트 리크 레드 */
  --forest: #4E6E58;
  --film-dark: #1C1712;   /* 필름 스트립 배경 */
  --radius: 18px;
  --serif: 'Noto Serif KR', serif;
  --sans: 'IBM Plex Sans KR', -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(216,154,43,.14), transparent 60%),
    radial-gradient(900px 420px at -10% 100%, rgba(192,101,91,.10), transparent 55%),
    var(--paper);
  color: var(--ink);
  min-height: 100dvh;
  padding-bottom: 92px;
  line-height: 1.55;
}

/* 필름 그레인 오버레이 */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── 상단바 ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px;
  background: linear-gradient(var(--paper) 75%, transparent);
}
.wordmark { display: flex; flex-direction: column; gap: 1px; }
.wordmark-brand {
  font-size: 10px; letter-spacing: .32em; color: var(--ink-faint); font-weight: 600;
}
.wordmark-app {
  font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: -.01em;
}
.roll-chip {
  display: flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .08em;
  padding: 7px 13px; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(43,33,24,.85);
  transition: transform .12s ease, box-shadow .12s ease;
}
.roll-chip:active { transform: translate(2px,2px); box-shadow: 0 0 0 rgba(0,0,0,0); }
.roll-chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--leak);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── 뷰 공통 ── */
.view { max-width: 560px; margin: 0 auto; padding: 8px 20px 24px; }
.section-eyebrow {
  font-size: 11px; letter-spacing: .28em; color: var(--ink-faint);
  font-weight: 600; text-transform: uppercase; margin-bottom: 6px;
}
.section-title {
  font-family: var(--serif); font-size: 24px; font-weight: 700;
  letter-spacing: -.01em; margin-bottom: 4px;
}
.section-sub { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(43,33,24,.05), 0 10px 28px -18px rgba(43,33,24,.35);
}

/* ── "지금" 뷰: 빛 카드 ── */
.light-card {
  position: relative; overflow: hidden;
  padding: 22px 22px 20px; margin-bottom: 22px;
  border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(43,33,24,.85);
}
.light-card::after {
  content: ''; position: absolute; top: -30%; right: -12%;
  width: 55%; height: 160%;
  background: linear-gradient(100deg, transparent 20%, rgba(216,154,43,.22) 50%, rgba(192,101,91,.16) 75%, transparent 95%);
  transform: rotate(8deg); pointer-events: none;
}
.light-time { font-size: 12px; letter-spacing: .22em; color: var(--amber-deep); font-weight: 600; }
.light-name { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 3px 0 7px; }
.light-desc { font-size: 14px; color: var(--ink-soft); max-width: 40ch; }
.light-cam {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; gap: 8px; align-items: baseline; font-size: 13px;
}
.light-cam b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.light-cam span { color: var(--ink-soft); }

/* GPS 상태 라인 */
.gps-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-faint); margin-bottom: 14px;
}
.gps-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
.gps-line.err .dot { background: var(--leak); }
.gps-line button {
  margin-left: auto; border: none; background: none; color: var(--amber-deep);
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--sans);
}

/* ── 스팟 카드 ── */
.spot-list { display: flex; flex-direction: column; gap: 14px; }
.spot-card {
  display: flex; gap: 14px; align-items: stretch;
  padding: 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); width: 100%;
  font-family: var(--sans); color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.spot-card:active { transform: scale(.985); }
.spot-frame {
  flex-shrink: 0; width: 62px; height: 78px;
  background: var(--film-dark); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; position: relative;
}
.spot-frame::before, .spot-frame::after {
  content: '· · · ·'; position: absolute; left: 0; right: 0;
  color: rgba(245,239,227,.55); font-size: 9px; letter-spacing: 4px;
  text-align: center; line-height: 1;
}
.spot-frame::before { top: 4px; }
.spot-frame::after { bottom: 4px; }
.spot-body { flex: 1; min-width: 0; }
.spot-meta { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--ink-faint); letter-spacing: .06em; }
.spot-meta .city { color: var(--amber-deep); font-weight: 600; }
.spot-name { font-family: var(--serif); font-size: 17px; font-weight: 700; margin: 2px 0 3px; }
.spot-golden { font-size: 12.5px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-side {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  flex-shrink: 0;
}
.spot-dist { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.spot-arrow {
  width: 30px; height: 30px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; background: var(--paper-warm);
}

/* ── 스팟 상세 ── */
.detail-back {
  border: none; background: none; color: var(--ink-soft); cursor: pointer;
  font-family: var(--sans); font-size: 14px; padding: 6px 0 14px; display: block;
}
.detail-hero {
  position: relative; overflow: hidden;
  background: var(--film-dark); color: var(--paper);
  border-radius: var(--radius); padding: 26px 22px 22px; margin-bottom: 16px;
}
.detail-hero::before, .detail-hero::after {
  content: '▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪'; position: absolute; left: 0; right: 0;
  color: rgba(245,239,227,.28); font-size: 8px; letter-spacing: 12px;
  text-align: center;
}
.detail-hero::before { top: 8px; }
.detail-hero::after { bottom: 8px; }
.detail-city { font-size: 11px; letter-spacing: .3em; color: var(--amber); font-weight: 600; }
.detail-name { font-family: var(--serif); font-size: 28px; font-weight: 700; margin: 4px 0 8px; }
.detail-desc { font-size: 13.5px; color: rgba(245,239,227,.82); max-width: 42ch; }
.detail-moods { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.detail-moods span {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(245,239,227,.35); color: rgba(245,239,227,.85);
}

.info-block { padding: 16px 18px; margin-bottom: 12px; }
.info-block h4 {
  font-size: 12px; letter-spacing: .18em; color: var(--amber-deep);
  font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.info-block p { font-size: 14px; color: var(--ink-soft); }
.info-block .cam-name { color: var(--ink); font-weight: 600; }

/* 오디오 가이드 플레이어 */
.guide-player {
  border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 rgba(43,33,24,.85);
  padding: 18px; margin: 18px 0 12px;
}
.guide-player-top { display: flex; align-items: center; gap: 12px; }
.persona-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; border: 1.5px solid var(--ink); background: var(--paper-warm);
}
.guide-player-info { flex: 1; min-width: 0; }
.guide-player-name { font-family: var(--serif); font-weight: 700; font-size: 15px; }
.guide-player-sub { font-size: 12px; color: var(--ink-faint); }
.play-btn {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  border: none; cursor: pointer;
  background: var(--ink); color: var(--paper);
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease;
}
.play-btn:active { transform: scale(.92); }
.play-btn.loading { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.guide-script {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-family: var(--serif); font-size: 14.5px; line-height: 1.8; color: var(--ink-soft);
  white-space: pre-wrap;
}
.guide-status { margin-top: 10px; font-size: 12px; color: var(--ink-faint); }

.detail-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ── 필름 롤 뷰 ── */
.roll-strip {
  background: var(--film-dark); border-radius: var(--radius);
  padding: 26px 18px; margin-bottom: 18px; position: relative; overflow: hidden;
}
.roll-strip::before, .roll-strip::after {
  content: '▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪'; position: absolute; left: 0; right: 0;
  color: rgba(245,239,227,.28); font-size: 8px; letter-spacing: 11px; text-align: center;
}
.roll-strip::before { top: 8px; }
.roll-strip::after { bottom: 8px; }
.roll-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px;
}
.roll-cell {
  aspect-ratio: 3/4; border-radius: 4px;
  background: rgba(245,239,227,.07);
  border: 1px solid rgba(245,239,227,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--paper);
}
.roll-cell.used {
  background: linear-gradient(145deg, rgba(216,154,43,.35), rgba(192,101,91,.3));
  border-color: rgba(216,154,43,.5);
}
.roll-count-line {
  text-align: center; margin-top: 16px;
  font-size: 12px; letter-spacing: .24em; color: rgba(245,239,227,.6);
}
.roll-count-line b { color: var(--amber); font-size: 15px; letter-spacing: .1em; }

.shot-log { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.shot-item { padding: 13px 16px; display: flex; gap: 12px; align-items: baseline; }
.shot-no {
  font-family: var(--serif); font-weight: 700; font-size: 15px;
  color: var(--amber-deep); flex-shrink: 0; width: 34px;
}
.shot-body { flex: 1; min-width: 0; }
.shot-place { font-weight: 600; font-size: 14px; }
.shot-note-text { font-size: 13px; color: var(--ink-soft); font-family: var(--serif); }
.shot-time { font-size: 11px; color: var(--ink-faint); flex-shrink: 0; }

/* ── 여정 뷰 ── */
.journey-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat-tile { padding: 16px 8px; text-align: center; }
.stat-num { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--ink); }
.stat-label { font-size: 11px; letter-spacing: .12em; color: var(--ink-faint); margin-top: 2px; }

.cta-card {
  position: relative; overflow: hidden;
  background: var(--film-dark); color: var(--paper);
  border-radius: var(--radius); padding: 24px 22px; margin-top: 20px;
}
.cta-card::after {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 60%; height: 180%;
  background: linear-gradient(100deg, transparent 25%, rgba(216,154,43,.3) 55%, rgba(192,101,91,.22) 80%, transparent 95%);
  transform: rotate(10deg); pointer-events: none;
}
.cta-eyebrow { font-size: 10px; letter-spacing: .3em; color: var(--amber); font-weight: 600; }
.cta-title { font-family: var(--serif); font-size: 21px; font-weight: 700; margin: 5px 0 7px; }
.cta-desc { font-size: 13px; color: rgba(245,239,227,.78); max-width: 38ch; }
.cta-card a {
  display: inline-block; margin-top: 14px;
  background: var(--amber); color: var(--film-dark);
  font-weight: 600; font-size: 13.5px; text-decoration: none;
  padding: 11px 20px; border-radius: 999px;
}

/* ── 하단 내비 ── */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--paper) 30%);
}
.bottomnav button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 84px; padding: 9px 0 7px;
  border: 1.5px solid transparent; border-radius: 14px;
  background: none; color: var(--ink-faint); cursor: pointer;
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  transition: all .15s ease;
}
.bottomnav button .nav-ico { font-size: 17px; }
.bottomnav button.active {
  color: var(--ink); background: var(--card);
  border-color: var(--ink); box-shadow: 2px 2px 0 rgba(43,33,24,.85);
}

/* ── 버튼 ── */
.btn-primary {
  width: 100%; padding: 15px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  box-shadow: 3px 3px 0 rgba(216,154,43,.9);
  transition: transform .12s ease, box-shadow .12s ease, opacity .15s;
}
.btn-primary:active { transform: translate(3px,3px); box-shadow: 0 0 0 transparent; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost {
  flex: 1; padding: 14px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: none; color: var(--ink-soft);
  font-family: var(--sans); font-size: 14px; font-weight: 600;
}
.btn-shot {
  flex: 2; padding: 14px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--amber); color: var(--ink);
  font-family: var(--sans); font-size: 14.5px; font-weight: 700;
  box-shadow: 3px 3px 0 rgba(43,33,24,.85);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-shot:active { transform: translate(3px,3px); box-shadow: 0 0 0 transparent; }
.btn-map {
  flex: 1; padding: 14px; border-radius: 14px; cursor: pointer; text-align: center;
  border: 1.5px solid var(--ink); background: var(--card); color: var(--ink);
  font-family: var(--sans); font-size: 14px; font-weight: 600; text-decoration: none;
}

/* ── 시트 ── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(43,33,24,.45); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 560px;
  background: var(--paper); border-radius: 24px 24px 0 0;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  animation: sheetUp .3s cubic-bezier(.2,.9,.3,1);
  max-height: 88dvh; overflow-y: auto;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-eyebrow { font-size: 10px; letter-spacing: .3em; color: var(--amber-deep); font-weight: 600; }
.sheet-title { font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 5px 0 6px; line-height: 1.3; }
.sheet-sub { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 18px; }
.sheet-label { font-size: 12px; letter-spacing: .14em; color: var(--ink-faint); font-weight: 600; margin: 18px 0 8px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pick-card {
  padding: 13px 14px; border-radius: 13px; cursor: pointer; text-align: left;
  border: 1.5px solid var(--line); background: var(--card);
  font-family: var(--sans); color: var(--ink);
  transition: all .12s ease;
}
.pick-card.selected {
  border-color: var(--ink); box-shadow: 2px 2px 0 rgba(43,33,24,.85);
  background: var(--paper-warm);
}
.pick-card b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.pick-card span { font-size: 11.5px; color: var(--ink-faint); display: block; line-height: 1.4; }

.persona-row { display: flex; gap: 9px; }
.persona-card {
  flex: 1; padding: 13px 8px; border-radius: 13px; cursor: pointer; text-align: center;
  border: 1.5px solid var(--line); background: var(--card);
  font-family: var(--sans); color: var(--ink);
  transition: all .12s ease;
}
.persona-card.selected {
  border-color: var(--ink); box-shadow: 2px 2px 0 rgba(43,33,24,.85);
  background: var(--paper-warm);
}
.persona-card .p-emoji { font-size: 22px; display: block; margin-bottom: 4px; }
.persona-card b { font-size: 13.5px; display: block; }
.persona-card span { font-size: 10.5px; color: var(--ink-faint); }

.shot-note {
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--card); color: var(--ink); resize: none;
  font-family: var(--serif); font-size: 14.5px; padding: 13px 14px; line-height: 1.6;
}
.shot-note:focus { outline: none; border-color: var(--ink); }

.empty-note {
  text-align: center; padding: 34px 20px; color: var(--ink-faint); font-size: 13.5px;
  font-family: var(--serif); line-height: 1.8;
}

.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }

/* ── 여행 스탬프 ── */
.stamp-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px;
  margin: 10px 0 22px;
}
.stamp {
  text-align: center; padding: 13px 4px 11px; border-radius: 14px;
  border: 1.5px dashed var(--line); color: var(--ink-faint);
  background: rgba(251,247,238,.5);
}
.stamp.earned {
  border: 1.5px solid var(--ink); background: var(--card);
  box-shadow: 2px 2px 0 rgba(43,33,24,.85); color: var(--ink);
  animation: stampIn .4s cubic-bezier(.2,1.4,.4,1);
}
@keyframes stampIn { from { transform: scale(.7) rotate(-8deg); opacity: 0; } }
.stamp-emoji { display: block; font-size: 21px; margin-bottom: 4px; }
.stamp-name { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }

/* 스탬프 획득 토스트 */
.stamp-toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; align-items: center; gap: 12px;
  background: var(--film-dark); color: var(--paper);
  border: 1.5px solid var(--amber); border-radius: 16px;
  padding: 13px 18px; width: min(90vw, 380px);
  box-shadow: 0 16px 40px rgba(28,23,18,.45);
  animation: toastIn .35s cubic-bezier(.2,1.2,.4,1);
}
.stamp-toast.leaving { animation: toastOut .5s ease forwards; }
@keyframes toastIn { from { transform: translate(-50%,-16px); opacity: 0; } }
@keyframes toastOut { to { transform: translate(-50%,-16px); opacity: 0; } }
.stamp-toast-emoji { font-size: 26px; }
.stamp-toast-title { display: block; font-size: 11px; letter-spacing: .18em; color: var(--amber); font-weight: 700; }
.stamp-toast-name { display: block; font-size: 13px; color: rgba(245,239,227,.9); }
