:root{
  --kth-ink: #0b1220;
  --kth-text: #eaf0ff;
  --kth-muted: rgba(234,240,255,.72);
  --kth-accent1: #6d8bff;
  --kth-accent2: #2bc7c7;

  /* heat tuning */
  --kth-heat-min: .06;   /* minimum fill alpha */
  --kth-heat-max: .40;   /* maximum fill alpha */
}

body{ margin:0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

.navigator-wrapper{
  max-width: 980px;
  margin: 54px auto;
  padding: 0 16px;
}

.kth-shell{
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08));
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,.12);
  overflow:hidden;
}

/* ===== Hero / Guide ===== */
.kth-hero{
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(109,139,255,.28), transparent 55%),
    radial-gradient(900px 500px at 90% 30%, rgba(43,199,199,.22), transparent 55%),
    linear-gradient(180deg, rgba(11,18,32,.98), rgba(11,18,32,.94));
  color: var(--kth-text);
  padding: 18px 18px 16px;
}

.kth-hero-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.kth-hero-eyebrow{
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(234,240,255,.70); margin-bottom: 6px;
}
.kth-hero-title{ margin:0; font-size: 22px; line-height: 1.2; font-weight: 900; }
.kth-hero-sub{
  margin: 8px 0 0; font-size: 13px; line-height: 1.55;
  color: rgba(234,240,255,.72);
  max-width: 64ch;
}
.kth-hero-chip{
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: rgba(234,240,255,.88);
  font-size: 12px;
  white-space: nowrap;
}

.kth-steps{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.kth-step{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 12px;
  display:flex;
  gap: 10px;
}
.kth-step-num{
  width: 28px; height: 28px;
  border-radius: 10px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  color: #0b1220;
  background: linear-gradient(135deg, var(--kth-accent1), var(--kth-accent2));
  flex: 0 0 auto;
}
.kth-step-title{ font-weight: 900; font-size: 13px; margin: 0 0 4px; }
.kth-step-desc{
  font-size: 12.5px; line-height: 1.45; color: rgba(234,240,255,.76); margin: 0;
}
.kth-step-desc b{ color: rgba(234,240,255,.95); }

.kth-hero-foot{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  flex-wrap: wrap;
}
.kth-tip{
  display:flex; align-items:center; gap:8px;
  font-size: 12.5px; font-weight: 800; color: rgba(234,240,255,.92);
}
.kth-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--kth-accent2);
  box-shadow: 0 0 0 4px rgba(43,199,199,.18);
}
.kth-note{ font-size: 12.5px; color: rgba(234,240,255,.72); }

/* ===== Controls ===== */
.nav-card{
  background: rgba(255,255,255,.90);
  padding: 16px 18px;
  border-top: 1px solid rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ✅ Tabs (Top-left) */
.kth-type-tabs{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
  margin: 2px 0 12px;
}
.kth-tab{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
  color:#111;
  font-weight: 900;
  font-size: 12.5px;
  padding: 9px 12px;
  border-radius: 999px;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  user-select:none;
}
.kth-tab:hover{ transform: translateY(-1px); }
.kth-tab.is-active{
  border-color: rgba(109,139,255,.28);
  background: linear-gradient(135deg, rgba(109,139,255,.14), rgba(43,199,199,.14));
  box-shadow: 0 12px 26px rgba(109,139,255,.14);
}

.nav-flex{ display:flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.nav-box{ flex:1; min-width: 240px; }
.nav-label{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-weight: 900; margin-bottom: 8px;
  color:#111; font-size: 13px; letter-spacing: .01em;
}
.kth-mini-legend{
  display:flex; align-items:center; gap:8px;
  font-size: 11.5px; font-weight: 900;
  color: rgba(0,0,0,.55);
  user-select:none;
}
.kth-mini-bar{
  width: 64px; height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: linear-gradient(90deg,
    rgba(109,139,255,var(--kth-heat-min)),
    rgba(109,139,255,calc((var(--kth-heat-min) + var(--kth-heat-max))/2)),
    rgba(109,139,255,var(--kth-heat-max))
  );
  overflow:hidden;
}

.nav-select{
  width:100%; height: 46px; padding: 0 14px;
  border-radius: 12px; border: 1px solid rgba(0,0,0,.10);
  background: #fff; outline: none;
  font-weight: 800; color: #111;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
  transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.nav-select:focus{ border-color: rgba(109,139,255,.55); box-shadow: 0 10px 22px rgba(109,139,255,.16); }
.nav-select:hover{ transform: translateY(-1px); }

/* ===== Map ===== */
#seoulMapWrap{
  display:none;
  background: rgba(255,255,255,.92);
  padding: 16px 18px 18px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  position:relative;
}
#seoulMapTitle{
  margin: 0 0 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
#seoulMapTitle .kth-map-title{
  display:flex; flex-direction:column; gap:2px; font-weight: 900; color:#111;
}
#seoulMapTitle .kth-map-title small{
  font-weight: 800; color: rgba(0,0,0,.55); font-size: 12px;
  display:flex; align-items:center; gap:8px;
}
#seoulMapStatus{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(109,139,255,.12);
  border: 1px solid rgba(109,139,255,.22);
  color:#111;
  white-space: nowrap;
}
#kthSeoulMiniMap svg{ width:100%; height:auto; display:block; }
#kthSeoulMiniTip{
  position:absolute; z-index:5;
  padding:8px 10px; border-radius: 12px;
  background: rgba(10,16,28,.92);
  border: 1px solid rgba(255,255,255,.14);
  color: #eaf0ff; font-size: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  transform: translate(10px,10px);
  pointer-events:none;
  display:none;
}

#kthSeoulMiniMap .gu{
  cursor:pointer;
  transition: fill .18s ease, stroke .18s ease, filter .18s ease;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}
#kthSeoulMiniMap .gu:hover{ filter: brightness(1.02); }
#kthSeoulMiniMap .gu.is-selected{ stroke-width: 1.35; filter: saturate(1.04); }

/* ===== Results ===== */
#resultArea{
  background: #f6f7fb;
  padding: 18px;
}

/* ✅ Results Header / Breadcrumb */
.kth-results-head{
  background:#fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,.07);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.kth-breadcrumb{
  font-size: 12px;
  color: rgba(0,0,0,.55);
  font-weight: 700;
  letter-spacing: .01em;
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap: wrap;
}
.kth-breadcrumb .sep{ opacity:.55; }
.kth-results-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.kth-results-title{
  margin:0;
  font-size: 18px;
  font-weight: 900;
  color:#111;
  line-height: 1.2;
}
.kth-results-sub{
  margin: 6px 0 0;
  font-size: 12.5px;
  color: rgba(0,0,0,.60);
  font-weight: 700;
}
.kth-badges{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
}
.kth-badge{
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
  color:#111;
  white-space: nowrap;
}
.kth-badge.accent{
  border-color: rgba(109,139,255,.28);
  background: linear-gradient(135deg, rgba(109,139,255,.14), rgba(43,199,199,.14));
}

.result-group{ margin-top: 18px; }
.group-title{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  font-size: 16px; font-weight: 900; color:#111; margin: 0 0 12px;
}
.group-title::after{
  content:""; height:1px; flex:1; margin-left:12px;
  background: rgba(0,0,0,.08); border-radius: 999px;
}
.group-cards{ display:flex; flex-wrap:wrap; gap: 14px; }

.result-card{
  flex: 1 1 calc((100% - 28px)/3);
  max-width: calc((100% - 28px)/3);
  background:#fff;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition: transform .18s ease, box-shadow .18s ease;
  border: 1px solid rgba(0,0,0,.05);
}
.result-card:hover{ transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.12); }
.card-thumb{ width:100%; height: 160px; overflow:hidden; display:block; }
.card-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.card-content{ padding: 12px 14px 14px; }
.card-title{
  font-weight: 900; margin-bottom: 7px; color:#111;
  text-decoration:none; display:block; line-height: 1.25;
}
.card-title:hover{ text-decoration: underline; }
.card-desc{
  font-size: 13px; color: rgba(0,0,0,.64); line-height: 1.5;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.notice{
  margin: 12px 0 4px;
  padding: 11px 12px;
  background: #fff8e1;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  color: #5a4b00;
  font-size: 13px;
  line-height: 1.45;
}

/* =========================
   ✅ Loading Overlay (CENTER + APP CARD)
========================= */
#kthLoadingOverlay{
  position:fixed;
  inset: 0;
  z-index: 9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  pointer-events:none;
}
#kthLoadingOverlay::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(10,16,28,.22);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#kthLoadingOverlay .kth-load-panel{
  position:relative;
  width: min(420px, calc(100vw - 36px));
  max-width: 420px;
  margin-top: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(900px 380px at 20% 0%, rgba(109,139,255,.22), transparent 55%),
    radial-gradient(700px 320px at 90% 20%, rgba(43,199,199,.18), transparent 55%),
    rgba(10,16,28,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  overflow:hidden;
}
#kthLoadingOverlay .kth-load-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: rgba(234,240,255,.92);
}
#kthLoadingOverlay .kth-load-left{
  display:flex;
  align-items:center;
  gap: 10px;
}
#kthLoadingOverlay .kth-spinner{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(234,240,255,.25);
  border-top-color: rgba(43,199,199,.95);
  animation: kthSpin .8s linear infinite;
}
@keyframes kthSpin{ to{ transform: rotate(360deg);} }
#kthLoadingOverlay .kth-load-title{
  font-weight: 900;
  font-size: 13px;
}
#kthLoadingOverlay .kth-load-chip{
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  white-space: nowrap;
}
#kthLoadingOverlay .kth-load-body{
  padding: 12px 14px 14px;
  color: rgba(234,240,255,.78);
  font-size: 12.5px;
  line-height: 1.45;
}
#kthLoadingOverlay .kth-load-bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
  margin-top: 10px;
}
#kthLoadingOverlay .kth-load-bar i{
  display:block;
  height:100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(109,139,255,.95), rgba(43,199,199,.95));
  animation: kthIndeterminate 1.15s ease-in-out infinite;
}
@keyframes kthIndeterminate{
  0%{ transform: translateX(-60%); }
  50%{ transform: translateX(120%); }
  100%{ transform: translateX(240%); }
}

/* =========================
   ✅ Scroll Hint Arrow (FIXED)
========================= */
#kthScrollHint{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 9998;
  display:none;
  justify-content:center;
  pointer-events:none;
}
#kthScrollHint .kth-hint-pill{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  font-weight: 900;
  color:#111;
  font-size: 12.5px;
}
#kthScrollHint .kth-hint-arrow{
  width: 10px; height: 10px;
  border-right: 3px solid rgba(0,0,0,.65);
  border-bottom: 3px solid rgba(0,0,0,.65);
  transform: rotate(45deg);
  animation: kthBounce 1.1s ease-in-out infinite;
  margin-top: -2px;
}
@keyframes kthBounce{
  0%,100%{ transform: translateY(0) rotate(45deg); opacity: .75; }
  50%{ transform: translateY(6px) rotate(45deg); opacity: 1; }
}

@media (max-width: 980px){
  .result-card{ flex:1 1 calc((100% - 14px)/2); max-width: calc((100% - 14px)/2); }
}
@media (max-width: 860px){
  .kth-steps{ grid-template-columns: 1fr; }
}

/* ✅ 모바일 */
@media (max-width: 768px){
  .navigator-wrapper{
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .kth-shell{
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .nav-flex{ flex-direction: column; align-items: stretch; }
  .nav-box{ min-width: unset; }
  .result-card{ flex:1 1 100%; max-width: 100%; }
  .card-thumb{ height: 135px; }

  .kth-type-tabs{ justify-content:center; }

  .kth-hero{ padding: 14px 14px 12px; }
  .kth-hero-top{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  .kth-hero-title{ font-size: 19px; }
  .kth-hero-chip{ align-self: center; padding: 7px 10px; }

  .kth-hero-sub{
    margin-left:auto; margin-right:auto;
    display:block;
    overflow:visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    max-width: 68ch;
  }

  .kth-steps{ gap: 8px; margin-top: 10px; }
  .kth-step{ padding: 8px 10px; gap: 9px; border-radius: 14px; }
  .kth-step-num{ width: 22px; height: 22px; border-radius: 8px; font-size: 12px; }
  .kth-step-title{ font-size: 12.5px; margin: 0 0 2px; }
  .kth-step-desc{ font-size: 11.8px; line-height: 1.35; }

  .kth-breadcrumb{ justify-content:center; }
  .kth-results-row{ justify-content:center; }
  .kth-results-row > div{ text-align:center; }
  .kth-badges{ justify-content:center; }
  .group-title{ justify-content:center; }
  .group-title::after{ display:none; }

  #resultArea{ padding: 14px; }

  .nav-label{ justify-content:center; }
}
