:root{
  --bg:#0b0f14; --fg:#eef3f7; --sub:#9fb3c8;
  --card:#141a22; --accent:#2b74ff; --muted:#223044;
}

/* 공통 */
html,body{
  margin:0; padding:0;
  background:var(--bg);
  color:var(--fg);
  font-family:"Segoe UI",Roboto,"Noto Sans KR",sans-serif;
  overflow-x:hidden;           /* ✅ 가로 스크롤 완전 차단 */
  width:100%; max-width:100%;
  box-sizing:border-box;
}
*, *::before, *::after{ box-sizing:inherit; }  /* ✅ 전체 박스모델 통일 */
a{ text-decoration:none; color:inherit }

/* 상단부 헤더 */
.header{
  height:100px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 20px; border-bottom:1px solid var(--muted);
}
.logo{ width:80px; height:80px; border-radius:50%; object-fit:cover; }
.menu-btn{
  width:42px; height:42px; border-radius:10px;
  background:var(--card); display:flex; align-items:center; justify-content:center;
  border:1px solid var(--muted); cursor:pointer; z-index:1100;
  transition:opacity .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.menu-btn.hidden{ display:none; }
.menu-btn:hover{ border-color:#365a9c; box-shadow:0 0 0 3px rgba(54,90,156,.15); }
.menu-icon,.menu-icon::before,.menu-icon::after{
  content:""; display:block; width:20px; height:2px; background:var(--fg); position:relative;
}
.menu-icon::before{ top:-6px; position:absolute; }
.menu-icon::after{ top:6px; position:absolute; }

/* 오프캔버스 메뉴 */
.offcanvas{
  position:fixed; top:0; right:0; width:320px; max-width:88vw; height:100vh;
  background:#0e1520; border-left:1px solid var(--muted);
  transform:translateX(100%); transition:transform .25s ease; z-index:1000;
  padding:18px; box-shadow:-12px 0 24px rgba(0,0,0,.35);
  pointer-events:none; visibility:hidden;
}
.offcanvas.open{ transform:translateX(0); pointer-events:auto; visibility:visible; }
.offcanvas h2{ margin:4px 0 12px; font-size:1.05rem }
.nav-list{ list-style:none; padding:0; margin:12px 0 }
.nav-list li a{
  display:block; padding:12px; border-radius:10px;
  border:1px solid var(--muted); margin-bottom:8px; background:#0b1220;
  transition:border-color .2s ease, background-color .2s ease, color .2s ease;
}
.nav-list li a:hover{ border-color:#365a9c; background:#0e1626; color:#dfe9ff; }
.lang{ display:flex; gap:8px; margin-top:10px }
.chip{
  padding:8px 12px; border:1px solid var(--muted);
  border-radius:999px; background:#0b1220;
  transition:border-color .2s ease, color .2s ease, background-color .2s ease;
}
.chip:hover{ border-color:#365a9c; color:#dfe9ff; background:#0e1626; }
.close-btn{
  display:inline-block; margin-left:auto; border:1px solid var(--muted);
  background:#0b1220; padding:8px 10px; border-radius:10px; cursor:pointer; color:var(--fg);
  transition:border-color .2s ease, background-color .2s ease, color .2s ease;
}
.close-btn:hover{ border-color:#365a9c; background:#0e1626; color:#dfe9ff; }

/* 본문 레이아웃 */
.main{
  max-width:850px;
  margin:0 auto;
  padding:20px;
  box-sizing:border-box;
  overflow-x:hidden;          /* ✅ 내부 카드 hover 시 가로 확장 방지 */
}

/* 카드(섹션) – 다크테마 고정 */
.hero{
  display:flex; flex-direction:column; gap:15px;
  background:var(--card); border-radius:15px; padding:18px;
  border:1px solid var(--muted); margin-bottom:16px;
  transition:background-color .25s ease, border-color .25s ease, box-shadow .25s ease, border-width .25s ease;
  cursor:pointer;
  box-sizing:border-box;
}
.hero-top{ display:flex; gap:15px; align-items:center; }
.hero-top img{ width:130px; height:74px; border-radius:10px; object-fit:cover; }

/* 텍스트 */
.hero-top h1{ margin:0; font-size:0.5rem; color:var(--fg); transition:color .25s ease; }
.hero-top h2{ margin:0; font-size:0.5rem; color:var(--fg); transition:color .25s ease; }
.hero-top p { margin:4px 0 0; color:var(--sub); font-size:0.9rem; transition:color .25s ease; }

/* 아이콘 */
.hero-icon{
  width:64px; height:64px; color:var(--sub);
  display:inline-block; margin-right:12px; vertical-align:middle;
  filter:drop-shadow(0 0 4px rgba(0,0,0,.25));
}
.hero-icon, .hero-icon *{
  fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round;
}

/* ✅ hover 시 가로 확장 제거 (border-width 축소) */
.hero:hover, .hero:focus-within{
  background-color:#0f1622;
  border-color:#ffffff;
  border-width:3px; /* 기존 9px → 3px */
  box-shadow:0 0 20px rgba(255,255,255,0.25);
}
.hero:hover .hero-icon, .hero:focus-within .hero-icon{ color:#ffffff; }
.hero:hover h1, .hero:focus-within h1{ color:#ffffff; }
.hero:hover h2, .hero:focus-within h2{ color:#ffffff; }
.hero:hover p, .hero:focus-within p{ color:#dfefff; }

.load-msg{ margin-top:12px; color:var(--sub); }

/* 🔍 검색 UI */
.search-box{
  width:80%; max-width:640px; margin:30px auto 20px;
  display:flex; align-items:center; background:#141a22;
  border:2px solid var(--muted); border-radius:50px; padding:10px 20px;
  box-shadow:0 0 10px rgba(0,0,0,0.4);
}
.search-box input{
  flex:1; background:transparent; border:none; outline:none;
  color:var(--fg); font-size:1rem; padding:5px 10px;
}
.search-box svg{ width:22px; height:22px; color:var(--sub); }

/* 🎞 YouTube 리스트 */
.video-list{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:20px; margin-top:20px;
}
.video-card{
  background:var(--card); border:3px solid var(--muted);
  border-radius:12px; overflow:hidden;
  transition:border-color .25s ease, box-shadow .25s ease;
}
.video-card:hover{ border-color:#ffffff; box-shadow:0 0 15px rgba(255,255,255,0.3); }
.video-thumb{ width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.video-title{ padding:10px 12px; font-size:.95rem; color:var(--fg); line-height:1.3em; }
.video-title:hover{ color:#ffffff; }

/* 공통 컨테이너 */
.container{ display:flex; flex-direction:column; gap:16px; }

/* 지도/Card */
.map-wrap{
  margin:16px; background:var(--card); border-radius:16px; overflow:hidden;
  box-shadow:0 2px 10px rgba(0,0,0,.06); border:1px solid var(--muted);
}
#map{ width:100%; height:calc(100vh - 220px); min-height:480px; }

/* POI 목록 */
.poi-list{ display:flex; flex-wrap:wrap; gap:8px; padding:0 16px 16px; }
.poi{
  font-size:12px; color:#c9d6e5; background:#0b1220;
  border:1px solid var(--muted); border-radius:999px; padding:6px 10px;
}
a.clean{ color:inherit; text-decoration:none; }
a.link{ color:var(--accent); text-decoration:underline; }

/* 구글 맵 InfoWindow */
.gm-iw .iw-title{ font-weight:700; font-size:15px; line-height:1.2; color:#111; margin:0 0 6px 0; }
.gm-iw .iw-link{ color:#2b74ff; text-decoration:underline; }
.gm-iw .iw-meta{ font-size:12px; color:#6b7280; margin-top:4px; }

.gm-iw{
  display:flex; flex-direction:column; box-sizing:border-box;
  padding:4px 6px !important; margin:0 !important;
  min-width:220px; max-width:260px;
}
.gm-style-iw, .gm-style-iw-c, .gm-style-iw-d{
  padding:0 !important; max-width:none !important;
}

/* ⬆⬇ 좌측 하단 스크롤 버튼 */
.ak-scroll-btns{
  position:fixed; left:20px; bottom:20px;
  display:flex; flex-direction:column; gap:10px;
  z-index:1200;
  pointer-events:auto;
}
.ak-btn{
  width:46px; height:46px; border-radius:50%;
  display:grid; place-items:center;
  background:var(--card); color:var(--fg);
  border:1px solid var(--muted);
  box-shadow:0 6px 18px rgba(0,0,0,.35);
  cursor:pointer;
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s;
}
.ak-btn.ak-show{ opacity:1; visibility:visible; transform:translateY(0); }
.ak-btn:hover{ border-color:var(--accent); color:#ffffff; }
.ak-btn svg{ width:22px; height:22px; color:inherit; }

/* 🔵 우측 하단 Arnold x GPT 플로팅 버튼 */
.axg-fab{
  position:fixed;
  right:20px;
  bottom:calc(20px + env(safe-area-inset-bottom, 0));
  z-index:1300;
  filter:drop-shadow(0 6px 18px rgba(0,0,0,.35));
  pointer-events:auto;
  opacity:1; visibility:visible;
}
.axg-fab a{
  display:flex; align-items:center; gap:10px;
  padding:10px 14px; border-radius:999px;
  background:var(--card); color:var(--fg);
  border:1px solid var(--muted);
  text-decoration:none; font-weight:600;
  transition:transform .15s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.axg-fab a:hover{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(43,116,255,.15);
  color:#ffffff;
  transform:translateY(-1px);
}
.axg-fab img{
  width:28px; height:28px; border-radius:50%;
  display:block; object-fit:cover;
}


/* ✅ 플로팅 이미지 강제 크기/위치 */
.axg-fab{ position:fixed; right:20px; bottom:calc(24px + env(safe-area-inset-bottom,0)); z-index:10000; }
.axg-fab a{ display:flex; align-items:center; gap:10px; padding:10px 14px;
  background:var(--card); color:var(--fg); border:1px solid var(--muted); border-radius:999px; }
.axg-fab .axg-logo{ width:28px !important; height:28px !important; border-radius:50% !important; object-fit:cover; display:block; }

/* ✅ 혹시 .axg-fab 밖으로 빠진 arnoldxagi 이미지가 있으면 전부 축소 */
img[src*="arnoldxagi"]{ max-width:64px !important; height:auto !important; border-radius:8px; }

/* ✅ 전역 오버플로 방지 보강 */
html,body{ overflow-x:hidden !important; }
img, video, canvas, iframe{ max-width:100% !important; height:auto; display:block; }



/* 모바일: 라벨 최소화 */
@media (max-width: 480px){
  .axg-fab a{ padding:10px; }
  .axg-fab .axg-label{ display:none; }
}

/* 모션 민감 */
@media (prefers-reduced-motion: reduce){
  .menu-btn, .offcanvas, .nav-list li a, .chip, .close-btn,
  .hero, .hero-top h1, .hero-top p,
  .ak-btn, .axg-fab a{ transition:none; }
}
