/* ═══════════════════════════════════════════════════════════
   ATAOKA-MAP Design System — ZHC Edition
   Dark:  #080808 × Gold #FFD700 × Red #E8002D  (エガちゃん Premium)
   Light: #F4F6F9 × Navy #1D4ED8 × Coral #DC2626 (Google-Maps Clean)
═══════════════════════════════════════════════════════════ */

/* ── Dark Theme (default) ─────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:           #080808;
  --bg2:          #0E0E0E;
  --bg3:          #181818;
  --card:         #131313;
  --border:       #272727;
  --border2:      #383838;

  /* Accents */
  --yellow:       #FFD700;
  --yellow2:      #E8A800;
  --yellow-rgb:   255, 215, 0;
  --red:          #E8002D;
  --red2:         #B00020;
  --red-rgb:      232, 0, 45;

  /* Text */
  --text:         #F0F0F0;
  --text2:        #8A8A8A;
  --text3:        #484848;

  /* Semantic */
  --on-accent:         #000000;
  --header-bg:         rgba(8, 8, 8, .94);
  --modal-bd:          rgba(0, 0, 0, .82);
  --banner-bg:         rgba(8, 8, 8, .98);
  --card-shadow:       none;
  --card-hover-shadow: 0 8px 32px rgba(0, 0, 0, .75);
  --card-hover-border: rgba(255, 215, 0, .45);
  --shadow:            0 8px 32px rgba(0, 0, 0, .9);
  --focus-ring:        rgba(255, 215, 0, .15);
  --accent-glow:       rgba(255, 215, 0, .25);
  --mark-bg:           rgba(255, 215, 0, .22);
  --brand-tshadow:     0 0 28px rgba(255, 215, 0, .38);
  --chip-glow:         0 2px 14px rgba(255, 215, 0, .28);
  --visited-after-bg:  var(--yellow);
  --visited-after-color: #000;

  /* Shape */
  --radius:       12px;
  --radius-card:  14px;
  --radius-pill:  40px;
}

/* ── Light Theme ──────────────────────────────────────────── */
[data-theme="light"] {
  --bg:           #F4F6F9;
  --bg2:          #FFFFFF;
  --bg3:          #ECEEF2;
  --card:         #FFFFFF;
  --border:       #E2E5EA;
  --border2:      #C5CBD4;

  --yellow:       #1D4ED8;
  --yellow2:      #2563EB;
  --yellow-rgb:   29, 78, 216;
  --red:          #DC2626;
  --red2:         #B91C1C;
  --red-rgb:      220, 38, 38;

  --text:         #111827;
  --text2:        #6B7280;
  --text3:        #9CA3AF;

  --on-accent:         #FFFFFF;
  --header-bg:         rgba(255, 255, 255, .95);
  --modal-bd:          rgba(0, 0, 0, .45);
  --banner-bg:         rgba(244, 246, 249, .97);
  --card-shadow:       0 1px 3px rgba(0,0,0,.06), 0 2px 12px rgba(0,0,0,.04);
  --card-hover-shadow: 0 4px 20px rgba(0, 0, 0, .12);
  --card-hover-border: rgba(29, 78, 216, .40);
  --shadow:            0 4px 24px rgba(0, 0, 0, .12);
  --focus-ring:        rgba(29, 78, 216, .18);
  --accent-glow:       rgba(29, 78, 216, .15);
  --mark-bg:           rgba(29, 78, 216, .10);
  --brand-tshadow:     none;
  --chip-glow:         0 2px 14px rgba(29, 78, 216, .20);
  --visited-after-bg:  var(--yellow);
  --visited-after-color: #fff;
}

/* ── Theme transition animation ──────────────────────────── */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.2s ease,
    box-shadow 0.25s ease,
    text-shadow 0.25s ease !important;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}

/* ═══════════════════════════════
   HEADER
═══════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 54px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 3px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-ega {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--yellow);
  text-shadow: var(--brand-tshadow);
}
.brand-db {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text2);
}
.brand-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 3px;
  letter-spacing: 0;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-stats { display: flex; align-items: center; gap: 5px; }
.stat-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow);
}
.stat-sep { color: var(--text3); font-size: 12px; }
.stat-visit {
  font-size: 11px;
  color: var(--text2);
  background: var(--bg3);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.stat-visit.complete {
  color: var(--on-accent);
  background: var(--yellow);
  border-color: var(--yellow);
}

/* Theme toggle button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, background .2s, box-shadow .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--yellow);
  background: var(--bg3);
  box-shadow: 0 0 10px var(--accent-glow);
}
.theme-toggle:active { transform: scale(.9); }

/* Language switcher */
.lang-switcher-wrap { display: flex; align-items: center; }
.lang-select {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 20px;
  cursor: pointer;
  outline: none;
  letter-spacing: .3px;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  max-width: 80px;
  transition: border-color .15s, color .15s;
}
.lang-select:hover  { border-color: var(--text3); color: var(--text); }
.lang-select:focus  { border-color: var(--yellow); }
.lang-select option { background: var(--bg2); color: var(--text); }

/* Back link (spot pages) */
.spot-back-link {
  font-size: 12px;
  color: var(--text3);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
  margin-left: auto;
}
.spot-back-link:hover { color: var(--yellow); }

/* ═══════════════════════════════
   SEARCH HERO
═══════════════════════════════ */
.search-hero {
  padding: 14px 14px 10px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 13px;
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
  opacity: .65;
}
.search-input {
  width: 100%;
  height: 46px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  padding: 0 42px 0 40px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.search-input::-webkit-search-cancel-button { display: none; }

.search-clear {
  position: absolute;
  right: 10px;
  width: 28px; height: 28px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text2);
  font-size: 11px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.search-clear:active { background: var(--bg3); transform: scale(.9); }

.search-hint {
  margin-top: 7px;
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  letter-spacing: .3px;
}
.search-hint.active { color: var(--yellow); font-weight: 600; }

.kbd-hint {
  position: absolute;
  right: 44px;
  font-size: 11px;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  pointer-events: none;
  letter-spacing: .5px;
}
.search-input:focus ~ .kbd-hint { display: none; }

/* ═══════════════════════════════
   RECENT SEARCHES
═══════════════════════════════ */
.recent-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn .2s ease both;
}
.recent-bar::-webkit-scrollbar { display: none; }
.recent-bar.hidden { display: none; }
.recent-label {
  font-size: 10px;
  color: var(--text3);
  white-space: nowrap;
  flex-shrink: 0;
}
.chip-recent {
  flex-shrink: 0;
  height: 26px;
  padding: 0 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text3);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.chip-recent:hover { color: var(--text2); border-color: var(--text3); }
.chip-recent:active { transform: scale(.94); }

/* ═══════════════════════════════
   FILTER CHIPS
═══════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 54px;
  z-index: 190;
}
.filter-bar::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  height: 32px;
  padding: 0 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.chip:active { transform: scale(.95); }
.chip.active {
  background: var(--yellow);
  color: var(--on-accent);
  border-color: var(--yellow);
  box-shadow: var(--chip-glow);
}

/* ═══════════════════════════════
   CARD GRID
═══════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px 10px 80px;
}
@media (min-width: 480px)  { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .card-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 960px)  { .card-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .card-grid { grid-template-columns: repeat(6, 1fr); } }

/* ═══════════════════════════════
   CARD
═══════════════════════════════ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 10px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .15s, border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 0 180px;
  box-shadow: var(--card-shadow);
  animation: cardEnter 0.22s ease both;
}
.card:active { transform: scale(.97); }
.card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}
.card.visited { opacity: .55; }
.card.visited::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  background: var(--visited-after-bg);
  color: var(--visited-after-color);
  font-size: 11px;
  font-weight: 900;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 20px;
  text-align: center;
}

.card-emoji {
  font-size: 32px;
  text-align: center;
  line-height: 1;
  margin-bottom: 2px;
}
.card.visited .card-emoji { filter: grayscale(1); }

.card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.card-category {
  font-size: 10px;
  color: var(--red);
  font-weight: 600;
  background: rgba(var(--red-rgb), .08);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(var(--red-rgb), .18);
}
.card-sub {
  font-size: 10px;
  color: var(--text3);
  padding: 2px 6px;
  background: var(--bg3);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.card-video {
  font-size: 10px;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  padding: 4px 0 2px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.card-aff-count {
  font-size: 9px;
  color: var(--yellow2);
  font-weight: 600;
  text-align: center;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════
   EMPTY STATE
═══════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px 20px;
  text-align: center;
}
.empty-state.hidden { display: none; }
.empty-icon { font-size: 48px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); }
.empty-sub { font-size: 13px; color: var(--text3); }
.empty-reset {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.empty-reset:active { transform: scale(.97); }

/* ═══════════════════════════════
   MODAL
═══════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-bd);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  max-height: 88dvh;
  background: var(--bg2);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--border);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: sheetUp .28s cubic-bezier(.4,0,.2,1);
}
@keyframes sheetUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-bar {
  width: 40px; height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 10px auto 0;
}

/* ── YouTube thumbnail ── */
.modal-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg3);
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}
.modal-thumb-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: thumbSkeleton 1.4s ease infinite;
  z-index: 0;
}
.modal-thumb-wrap.loaded::before,
.modal-thumb-wrap.no-thumb::before { display: none; }
@keyframes thumbSkeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.modal-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  position: relative; z-index: 1;
  opacity: 0;
  transition: opacity .35s ease;
}
.modal-thumb-wrap.loaded .modal-thumb { opacity: 1; }
.modal-thumb-wrap.no-thumb .modal-thumb { display: none; }
.modal-thumb-wrap.no-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
}

.modal-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,.88) 0%,
    rgba(0,0,0,.30) 55%,
    transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  z-index: 2;
  pointer-events: none;
}
.modal-thumb-emoji { font-size: 20px; line-height: 1; margin-bottom: 4px; }
.modal-thumb-name {
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
  line-height: 1.2;
}
.modal-thumb-sub {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  margin-top: 2px;
  font-weight: 600;
}

.modal-thumb-yt {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 3;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background .15s;
  pointer-events: all;
  backdrop-filter: blur(4px);
}
.modal-thumb-yt:hover  { background: rgba(232,0,45,.82); border-color: transparent; }
.modal-thumb-yt:active { transform: scale(.95); }

.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  width: 30px; height: 30px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background .15s, border-color .15s;
}
.modal-close:hover { background: var(--bg2); border-color: var(--border2); }

.modal-body { padding: 0 0 env(safe-area-inset-bottom, 16px); }

/* No-thumb fallback hero */
.modal-hero { padding: 20px 20px 0; text-align: center; }
.modal-emoji-lg { font-size: 52px; line-height: 1; }
.modal-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--yellow);
  margin-top: 8px;
  line-height: 1.2;
}
.modal-subtitle {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}

/* Section headers (app.js modal) */
.modal-section { padding: 14px 18px 0; }
.modal-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 7px;
  display: block;
}
.modal-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}

/* Spot page detail rows (build.js) */
.modal-category { padding: 16px 20px 0; }
.modal-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: rgba(var(--red-rgb), .08);
  border: 1px solid rgba(var(--red-rgb), .22);
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: .5px;
}
.modal-details {
  margin: 12px 18px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
}
.modal-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.modal-row:last-child { border-bottom: none; }
.modal-row .modal-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  min-width: 60px;
  flex-shrink: 0;
}
.modal-val {
  color: var(--text2);
  line-height: 1.4;
  flex: 1;
}

/* Video link */
.video-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background .15s;
  margin-bottom: 6px;
}
.video-link:active { transform: scale(.98); border-color: var(--red); }
.video-link .vl-icon { font-size: 20px; flex-shrink: 0; }
.video-link .vl-title { font-size: 13px; font-weight: 600; flex: 1; }
.video-link .vl-arrow { color: var(--text3); flex-shrink: 0; }

/* ── Action buttons ── */
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
}

.action-btn {
  flex: 1 1 72px;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 11px 8px;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
  cursor: pointer;
  min-height: 64px;
}
.action-btn:active { transform: scale(.93); }

.action-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.action-label {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  color: inherit;
}

/* Google Maps — blue */
.action-map { border-color: rgba(66,133,244,.28); color: #5b9cf6; }
.action-map:hover { background: rgba(66,133,244,.08); border-color: #4285F4; }

/* Tabelog — warm red */
.action-tabelog { border-color: rgba(220,72,52,.28); color: #f07060; }
.action-tabelog:hover { background: rgba(220,72,52,.08); border-color: #DC4834; }

/* Rakuten Travel — rakuten red */
.action-travel { border-color: rgba(191,0,0,.28); color: #ff6b6b; }
.action-travel:hover { background: rgba(191,0,0,.08); border-color: #BF0000; }

/* Travel sub (car/bus) */
.action-travel-sub { border-color: rgba(191,0,0,.22); color: #ff9090; }
.action-travel-sub:hover { background: rgba(191,0,0,.06); border-color: #CC3333; }

/* Amazon — orange accent */
.action-amazon { border-color: rgba(255,153,0,.32); color: #FF9900; }
.action-amazon:hover { background: rgba(255,153,0,.07); border-color: #FF9900; }
.action-amazon .action-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

/* Hotpepper */
.action-hotpepper { border-color: rgba(228,0,43,.28); color: #e4002b; }
.action-hotpepper:hover { background: rgba(228,0,43,.07); border-color: #e4002b; }

/* Rakuten shop */
.action-rakuten { border-color: rgba(191,0,0,.28); color: #cc0000; }
.action-rakuten:hover { background: rgba(191,0,0,.07); border-color: #bf0000; }

/* Amazon reason tip */
.amazon-reason {
  font-size: 11px;
  color: var(--text3);
  padding: 8px 13px;
  margin: -4px 18px 8px;
  background: var(--bg3);
  border-radius: 8px;
  border-left: 3px solid var(--yellow2);
  line-height: 1.5;
}

/* ── Affiliate links ── */
.aff-list { display: flex; flex-direction: column; gap: 7px; }
.aff-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform .15s, border-color .15s, background .15s;
  font-size: 13px;
}
.aff-link:active { transform: scale(.98); }
.aff-amazon  { background: rgba(255,153,0,.06); border-color: rgba(255,153,0,.22); }
.aff-rakuten { background: rgba(191,0,0,.05);   border-color: rgba(191,0,0,.22); }
.aff-amazon:hover  { border-color: #FF9900; }
.aff-rakuten:hover { border-color: #BF0000; }
.aff-store { font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.aff-amazon  .aff-store { color: #FF9900; }
.aff-rakuten .aff-store { color: #FF4444; }
.aff-label { flex: 1; font-size: 12px; color: var(--text); line-height: 1.3; }
.aff-arrow { color: var(--text3); font-size: 14px; flex-shrink: 0; }
.aff-note {
  font-size: 10px;
  color: var(--text3);
  margin-top: 5px;
  text-align: center;
}

/* ── Visit button ── */
.visit-btn {
  display: block;
  width: calc(100% - 36px);
  margin: 16px 18px 4px;
  padding: 15px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  border: none;
  letter-spacing: .8px;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.visit-btn.unvisited {
  background: linear-gradient(135deg, var(--red2), var(--red));
  color: #fff;
  box-shadow: 0 4px 18px rgba(var(--red-rgb), .38);
}
.visit-btn.unvisited:active { transform: scale(.97); box-shadow: none; }
.visit-btn.done {
  background: var(--bg3);
  color: var(--text3);
  border: 1px solid var(--border);
}
.visit-btn.done:active { transform: scale(.97); }

/* ═══════════════════════════════
   COMPLETE BANNER
═══════════════════════════════ */
.complete-banner {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--banner-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s ease;
}
.complete-banner.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.complete-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  text-align: center;
}
.complete-fireworks { font-size: 44px; animation: bounce 1s ease infinite alternate; }
@keyframes bounce { to { transform: translateY(-8px); } }
.complete-title {
  font-size: 34px;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: var(--brand-tshadow);
  line-height: 1.2;
}
.complete-sub { font-size: 15px; color: var(--text2); line-height: 1.6; }
.complete-close {
  margin-top: 6px;
  padding: 14px 44px;
  background: var(--yellow);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}
.complete-close:active { transform: scale(.97); }

/* ═══════════════════════════════
   TOAST
═══════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  white-space: nowrap;
  box-shadow: var(--shadow);
  pointer-events: none;
  animation: toastIn .25s ease;
}
.toast.hidden { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════
   PWA INSTALL
═══════════════════════════════ */
.install-prompt {
  position: fixed;
  bottom: 16px;
  left: 12px; right: 12px;
  background: var(--bg3);
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  padding: 12px 14px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: fadeIn .3s ease;
}
.install-prompt.hidden { display: none; }
.install-text { flex: 1; font-size: 12px; color: var(--text); }
.install-text strong { color: var(--yellow); display: block; font-size: 13px; margin-bottom: 2px; }
.install-btn {
  padding: 8px 14px;
  background: var(--yellow);
  color: var(--on-accent);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.install-x {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
}

/* ═══════════════════════════════
   SEARCH HIGHLIGHT
═══════════════════════════════ */
mark {
  background: var(--mark-bg);
  color: var(--yellow);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}

/* ═══════════════════════════════
   UTILITY
═══════════════════════════════ */
.hidden { display: none !important; }

/* ═══════════════════════════════
   SPOT INDIVIDUAL PAGES
═══════════════════════════════ */
.spot-emoji-hero {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.spot-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.spot-h1 {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.5px;
  margin: 10px 0 4px;
  line-height: 1.2;
}

.spot-sub {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 16px;
}

.spot-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin: 16px 0 20px;
}

.modal-yt-link {
  color: var(--yellow);
  text-decoration: none;
  font-size: 13px;
}
.modal-yt-link:hover { text-decoration: underline; }

/* Related spots */
.spot-related { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.spot-related-title {
  font-size: 12px;
  color: var(--text3);
  font-weight: 700;
  letter-spacing: .8px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.spot-related-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.spot-related-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  text-decoration: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  box-shadow: var(--card-shadow);
}
.spot-related-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}
.spot-related-emoji { font-size: 18px; flex-shrink: 0; }
.spot-related-name {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* CTA */
.spot-cta { margin-top: 28px; text-align: center; }
.spot-cta-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--yellow), var(--yellow2));
  color: var(--on-accent);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius-pill);
  letter-spacing: .5px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.spot-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.spot-cta-btn:active { transform: scale(.97); }

/* Footer */
.spot-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text3);
}
.spot-footer a { color: var(--text3); text-decoration: none; }
.spot-footer a:hover { color: var(--yellow); }
.spot-footer-sub { margin-top: 4px; }

/* Site-wide footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text3);
}
.site-footer a { color: var(--text3); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.site-footer-copy { margin-top: 6px; }

/* ═══════════════════════════════
   LIGHT-MODE SPECIFIC OVERRIDES
═══════════════════════════════ */
[data-theme="light"] .modal-thumb-overlay {
  background: linear-gradient(to top,
    rgba(0,0,0,.80) 0%,
    rgba(0,0,0,.20) 60%,
    transparent 100%);
}

[data-theme="light"] .complete-title {
  text-shadow: none;
}

[data-theme="light"] .card:hover {
  border-color: var(--card-hover-border);
}

/* Bump contrast for action-travel in light mode */
[data-theme="light"] .action-travel { color: #c40000; }
[data-theme="light"] .action-travel-sub { color: #d44; }
