/* ==============================================
   아키하바라 굿즈샵 완전 공략 — 모바일 특화 모던 다크 UI
   (코난 마을 가이드 디자인 시스템 기반, 레드 테마)
   ============================================== */

:root {
  /* 배경 */
  --bg:          #0d0f0e;
  --bg-card:     #1a1314;
  --bg-card2:    #201618;
  --bg-dark:     #110f0f;
  --bg-overlay:  rgba(13,15,14,.82);

  /* 메인 컬러 — 아키하바라 레드 */
  --red:         #e03a3a;
  --red-dim:     #7a1a1a;
  --red-pale:    rgba(224,58,58,.12);
  --red-glow:    rgba(224,58,58,.18);

  /* 포인트 — 앰버 */
  --amber:       #c8963a;
  --amber-dim:   rgba(200,150,58,.15);

  /* 텍스트 */
  --t1:          #f0ece4;
  --t2:          #a0a090;
  --t3:          #6a6a58;

  /* 선/구분 */
  --line:        rgba(255,255,255,.07);
  --line2:       rgba(255,255,255,.04);

  /* 반지름 */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;

  /* 그림자 */
  --sh-card: 0 2px 16px rgba(0,0,0,.4);
  --sh-pop:  0 8px 32px rgba(0,0,0,.6);
}

/* ─── 리셋 ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--t1);
  line-height: 1.65;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: -.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  word-break: keep-all;
}

@media (min-width: 860px) {
  body { padding-bottom: 0; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--red); color: #fff; }

/* ============================================================
   NAV (상단)
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.02em;
  color: var(--t1);
}
.nav-menu-btn {
  width: 38px; height: 38px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  border-radius: var(--r-sm);
}
.nav-menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: var(--t1);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.nav-drawer.open { max-height: 500px; }
.nav-drawer-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 12px 18px;
  display: flex;
  flex-direction: column;
}
.nav-drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--t1);
  font-weight: 500;
  transition: background .2s, color .2s;
}
.nav-drawer a i { color: var(--red); width: 18px; text-align: center; }
.nav-drawer a:hover { background: var(--red-pale); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 20px 40px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(224,58,58,.20) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(224,58,58,.12) 0%, transparent 55%),
    linear-gradient(135deg,
      rgba(224,58,58,.18) 0%,
      rgba(13,15,14,0) 45%,
      rgba(224,58,58,.12) 100%),
    #0d0f0e;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(224,58,58,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,58,58,.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  z-index: 0;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid var(--red-dim);
  border-radius: 999px;
  background: var(--red-pale);
}
.hero-title {
  font-size: clamp(44px, 12vw, 72px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.04em;
  margin-bottom: 22px;
  color: var(--t1);
}
.hero-title em {
  font-style: normal;
  color: var(--red);
  text-shadow: 0 0 30px var(--red-glow);
}
.hero-sub {
  font-size: 14px;
  color: var(--t2);
  margin-bottom: 36px;
  line-height: 1.7;
  letter-spacing: -.005em;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
@media (min-width: 480px) {
  .hero-cta { flex-direction: row; justify-content: center; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.005em;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
  min-width: 200px;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 24px rgba(224,58,58,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(224,58,58,.5); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  color: var(--t1);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--red-pale); border-color: var(--red-dim); }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--t2);
  font-size: 18px;
  animation: bounce 2s infinite;
  z-index: 2;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   SECTION (공통)
   ============================================================ */
.section {
  padding: 72px 0;
  position: relative;
}
.section-dark { background: var(--bg-dark); }

.section-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-title {
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--t1);
}
.section-lead {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 36px;
}
.subhead {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 36px 0 16px;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.subhead::before {
  content: '';
  display: inline-block;
  width: 4px; height: 18px;
  background: var(--red);
  border-radius: 2px;
}

/* ============================================================
   INFO GRID (OVERVIEW)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .info-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.info-card:hover {
  transform: translateY(-3px);
  border-color: var(--red-dim);
  background: var(--bg-card2);
}
.info-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red-pale);
  color: var(--red);
  border-radius: 12px;
  font-size: 18px;
  margin-bottom: 14px;
}
.info-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--t1);
  letter-spacing: -.01em;
}
.info-desc {
  font-size: 13.5px;
  color: var(--t2);
  line-height: 1.65;
}

.tag-warn {
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--amber-dim);
  border: 1px solid rgba(200,150,58,.3);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 13px;
  color: #e8d4a8;
  line-height: 1.6;
}
.tag-warn i { color: var(--amber); margin-top: 3px; flex-shrink: 0; }
.tag-warn strong { color: var(--t1); font-weight: 600; }

/* ============================================================
   ROUTE (ACCESS)
   ============================================================ */
.route-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.route-step {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
}
.step-badge {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-pale);
  color: var(--red);
  border-radius: var(--r-md);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  border: 1px solid var(--red-dim);
}
.step-badge-arrival {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 20px var(--red-glow);
}
.step-body { flex: 1; min-width: 0; }
.step-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
.step-desc {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.65;
}
.step-desc strong { color: var(--t1); font-weight: 600; }
.route-arrival { border-color: var(--red-dim); background: linear-gradient(135deg, var(--bg-card) 0%, rgba(224,58,58,.05) 100%); }

/* alert cards */
.alert-card {
  display: flex;
  gap: 12px;
  border-radius: var(--r-md);
  padding: 16px;
  margin-top: 12px;
  border: 1px solid var(--line);
}
.alert-card .alert-icon { font-size: 20px; flex-shrink: 0; line-height: 1; padding-top: 2px; }
.alert-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
.alert-card p { font-size: 12.5px; color: var(--t2); line-height: 1.65; }
.alert-card strong { color: var(--t1); font-weight: 600; }

.alert-info { background: rgba(58,123,213,.10); border-color: rgba(58,123,213,.25); }
.alert-info .alert-icon { color: #5b9be3; }

.alert-warn { background: var(--amber-dim); border-color: rgba(200,150,58,.30); }
.alert-warn .alert-icon { color: var(--amber); }

/* ============================================================
   MAP
   ============================================================ */
#map {
  height: 420px;
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-pop);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
}
@media (min-width: 600px) {
  #map { height: 500px; }
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--t2);
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-red { background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.legend-amber { background: var(--amber); box-shadow: 0 0 8px rgba(200,150,58,.4); }

/* dist-list */
.dist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 13.5px;
  transition: border-color .2s ease;
}

/* 시간과 버튼을 오른쪽으로 묶어주는 컨테이너 */
.dist-right-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dist-item:hover { border-color: var(--red-dim); }
.dist-name { color: var(--t1); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.dist-name i { color: var(--red); }
.dist-time {
  color: var(--red);
  font-weight: 600;
  font-size: 12.5px;
  background: var(--red-pale);
  padding: 4px 10px;
  border-radius: 999px;
}
.dist-list .dist-item:first-child .dist-time {
  background: var(--red);
  color: #fff;
}
.dist-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--red-pale);
  color: var(--red);
  border: 1px solid var(--red-dim);
  font-size: 13px;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.dist-map-btn:hover {
  background: var(--red);
  color: #fff;
}

/* Google Maps InfoWindow 다크 톤 보정 */
.gm-style .gm-style-iw-c {
  padding: 0 !important;
  background: var(--bg-card2) !important;
  border-radius: var(--r-md) !important;
  box-shadow: var(--sh-pop) !important;
}
.gm-style .gm-style-iw-d { overflow: hidden !important; }
.gm-style .gm-style-iw-tc::after { background: var(--bg-card2) !important; }
.gm-style .gm-ui-hover-effect > span { background-color: var(--t2) !important; }

.iw-card {
  padding: 0px 16px 14px; /* 상단 여백을 0으로 없애서 위로 붙입니다 */
  margin-top: -8px;       /* 카드를 위로 더 끌어올려 X 버튼과의 빈 공간을 줄입니다 */
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--t1);
  min-width: 200px;
  max-width: 240px;
}
.iw-emoji { font-size: 22px; margin-bottom: 4px; }
.iw-name { font-size: 14px; font-weight: 700; color: var(--t1); letter-spacing: -.01em; }
.iw-name-en { font-size: 11px; color: var(--t3); margin-bottom: 8px; letter-spacing: .02em; }
.iw-desc { font-size: 12px; color: var(--t2); line-height: 1.55; }

/* ============================================================
   AREA (SHOPS)
   ============================================================ */
.area-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .area-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.area-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  position: relative;
  transition: transform .25s ease, border-color .25s ease;
}
.area-card:hover { transform: translateY(-3px); border-color: var(--red-dim); }

.area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.area-no {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--t3);
}
.area-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.label-general { color: var(--t1); border-color: var(--line); background: rgba(255,255,255,.04); }
.label-new     { color: var(--red); border-color: var(--red-dim); background: var(--red-pale); }
.label-used    { color: var(--amber); border-color: rgba(200,150,58,.35); background: var(--amber-dim); }
.label-rec     { color: #fff; border-color: var(--red); background: var(--red); }

.area-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
  color: var(--t1);
}
.area-desc {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 14px;
}
.area-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--t3);
  padding-top: 12px;
  border-top: 1px solid var(--line2);
}
.area-meta i { margin-right: 5px; color: var(--red); }

.area-card-hot {
  border-color: var(--red-dim);
  background: linear-gradient(160deg, var(--bg-card) 0%, rgba(224,58,58,.06) 100%);
}
.area-card-hot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--red), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ============================================================
   CHECKLIST
   ============================================================ */
.cl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cl-item label {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.cl-item label:hover { border-color: var(--red-dim); }
.cl-item input { position: absolute; opacity: 0; pointer-events: none; }
.cl-check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: 2px solid var(--t3);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease;
  position: relative;
}
.cl-check::after {
  content: '';
  width: 6px; height: 11px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) scale(0);
  margin-top: -2px;
  transition: transform .15s ease;
}
.cl-item input:checked ~ .cl-check {
  background: var(--red);
  border-color: var(--red);
}
.cl-item input:checked ~ .cl-check::after { transform: rotate(45deg) scale(1); }
.cl-text {
  font-size: 14px;
  color: var(--t1);
  line-height: 1.55;
  letter-spacing: -.005em;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.cl-item input:checked ~ .cl-text {
  color: var(--t3);
  text-decoration: line-through;
  text-decoration-color: var(--t3);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .2s ease;
}
.faq-item[open] { border-color: var(--red-dim); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -.01em;
  flex: 1;
}
.faq-chev {
  color: var(--red);
  font-size: 12px;
  transition: transform .25s ease;
  flex-shrink: 0;
}
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-a {
  padding: 0 18px 18px;
  font-size: 13.5px;
  color: var(--t2);
  line-height: 1.75;
}
.faq-a strong { color: var(--t1); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--line);
  padding: 48px 20px 36px;
}
.footer-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.footer-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 14px;
  letter-spacing: -.02em;
}
.footer-desc {
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.75;
  margin-bottom: 22px;
}
.footer-copy {
  font-size: 11.5px;
  color: var(--t3);
  letter-spacing: .02em;
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 860px) { .bottom-nav { display: none; } }

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--t2);
  letter-spacing: -.01em;
  transition: color .2s ease;
  position: relative;
}
.bn-item i { font-size: 18px; }
.bn-item.active { color: var(--red); }
.bn-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--red);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--red-glow);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (min-width: 768px) {
  .mobile-br { display: none; }
}