:root{
  --bg: #0b0c0f;
  --panel: #11131a;
  --card: #141824;
  --text: #e8ebf2;
  --muted: #a8b0c4;
  --line: rgba(255,255,255,0.10);
  --accent: #5cff7a;
  --accent2: #7aa7ff;
  --shadow: 0 18px 50px rgba(0,0,0,0.5);
  --r: 16px;
  --r2: 22px;
  --gap: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  background: radial-gradient(1200px 800px at 20% 10%, rgba(122,167,255,0.15), transparent 60%),
              radial-gradient(1100px 700px at 80% 40%, rgba(92,255,122,0.10), transparent 55%),
              var(--bg);
  color: var(--text);
}

a{ color: inherit; }
.th-container{ width:min(1120px, calc(100% - 32px)); margin:0 auto; }

.th-header{
  position: sticky;
  top:0;
  z-index: 20;
  background: rgba(11,12,15,0.65);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.th-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
}
.th-logo{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.th-logo__mark{
  width:14px; height:14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 5px;
  box-shadow: 0 0 18px rgba(92,255,122,0.25);
}
.th-logo__text{ font-weight: 650; letter-spacing: 0.2px; color: var(--text); font-size: 14px; }

.th-nav__menu{
  display:flex;
  gap:14px;
  list-style:none;
  padding:0;
  margin:0;
}
.th-nav__menu a{
  text-decoration:none;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.th-nav__menu a:hover{
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.04);
}

/* App */
.th-app{
  display:grid;
  grid-template-columns: 460px 1fr;
  min-height: calc(100vh - 64px);
}
.th-app__panel{
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17,19,26,0.95), rgba(17,19,26,0.85));
  backdrop-filter: blur(10px);
  overflow: auto;
}
.th-panel__top{ padding: 18px 18px 12px; }
.th-panel__results{ padding: 0 18px 18px; }

.th-app__map{ position: relative; }
.th-map{ position:absolute; inset:0; border-radius: 0; }

/* Typography */
.th-h1{ font-size: 20px; margin:0 0 8px; }
.th-h2{ font-size: 16px; margin:0 0 6px; }
.th-lead{ color: var(--muted); margin:0 0 14px; font-size: 13px; line-height: 1.5; }
.th-text{ color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }

/* Inputs */
.th-search{
  display:grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
  margin: 12px 0 14px;
}
.th-input{
  width:100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline:none;
}
.th-input::placeholder{ color: rgba(168,176,196,0.65); }

.th-btn{
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px 12px;
  cursor:pointer;
  font-size: 13px;
}
.th-btn:hover{ background: rgba(255,255,255,0.07); }
.th-btn--primary{
  border-color: rgba(92,255,122,0.22);
  background: rgba(92,255,122,0.12);
}
.th-btn--primary:hover{ background: rgba(92,255,122,0.16); }
.th-btn--ghost{ background: transparent; }

.th-filters{ display:grid; gap: 12px; }
.th-filter__label{ font-size: 12px; color: rgba(232,235,242,0.75); margin-bottom: 8px; }

.th-actions{ display:flex; gap: 10px; }

/* Chips */
.th-chips{ display:flex; flex-wrap: wrap; gap: 8px; }
.th-chip{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  cursor:pointer;
}
.th-chip:hover{ background: rgba(255,255,255,0.06); }
.th-chip.is-active{
  border-color: rgba(92,255,122,0.40);
  background: rgba(92,255,122,0.10);
}
.th-chip__count{ opacity: 0.6; margin-left: 6px; }

/* Results */
.th-results__meta{
  display:flex; align-items:center; gap:10px;
  color: rgba(232,235,242,0.78);
  font-size: 12px;
  padding: 10px 0 10px;
}
.th-results__hint{ color: rgba(168,176,196,0.75); }

/* Cards */
.th-cards{ display:grid; gap: 12px; }
.th-card{
  background: rgba(20,24,36,0.70);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.th-card__link{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  text-decoration:none;
}
.th-card__img{
  width:110px; height:110px;
  object-fit: cover;
  display:block;
  background: rgba(255,255,255,0.04);
}
.th-card__img--empty{ }
.th-card__body{ padding: 12px 12px 12px 0; }
.th-card__title{ font-weight: 680; font-size: 14px; margin-bottom: 6px; }
.th-card__excerpt{ margin:0 0 10px; color: rgba(168,176,196,0.88); font-size: 12px; line-height: 1.5; }
.th-card__meta{ display:flex; flex-wrap: wrap; gap: 6px; }
.th-mini{
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(232,235,242,0.85);
  background: rgba(255,255,255,0.03);
}
.th-mini--ghost{ border-color: rgba(122,167,255,0.30); background: rgba(122,167,255,0.10); }

.th-error{
  border: 1px solid rgba(255,100,150,0.35);
  background: rgba(255,100,150,0.12);
  padding: 12px;
  border-radius: 14px;
  color: rgba(232,235,242,0.90);
}

/* Leaflet polish */
.leaflet-container{
  background: #0c0e13;
}
.leaflet-control-zoom a{
  background: rgba(17,19,26,0.80) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip{
  background: rgba(17,19,26,0.92);
  color: var(--text);
  border: 1px solid var(--line);
}
.th-popup__t{ font-weight: 700; margin-bottom: 6px; }
.th-popup__a{ color: var(--accent); text-decoration:none; }

/* Pages */
.th-page{ padding: 24px 0 40px; }
.th-page__header{ margin: 18px 0 18px; }

.th-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.th-card2{
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow:hidden;
  background: rgba(20,24,36,0.60);
}
.th-card2__link{ text-decoration:none; display:block; }
.th-card2__thumb img{ width:100%; height: 200px; object-fit: cover; display:block; }
.th-card2__body{ padding: 12px; }

.th-posts{ display:grid; gap: 12px; }
.th-post{
  border: 1px solid var(--line);
  background: rgba(20,24,36,0.55);
  border-radius: var(--r2);
  padding: 14px;
}
.th-post__link{ text-decoration:none; display:block; }
.th-post__meta{ color: rgba(168,176,196,0.75); font-size: 12px; margin: 6px 0 10px; }

.th-catbar ul{ list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:10px; }
.th-catbar a{
  text-decoration:none;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.03);
  padding: 7px 10px;
  border-radius: 999px;
  color: rgba(232,235,242,0.85);
  font-size: 12px;
}

/* Spot viewer */
.th-spot{ padding: 10px 0 0; }
.th-spot__kicker{ color: rgba(168,176,196,0.85); font-size: 12px; }
.th-viewer{
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow:hidden;
  background: rgba(20,24,36,0.65);
  box-shadow: var(--shadow);
}
.th-viewer__media{ position: relative; }
.th-viewer__thumb img{ width:100%; display:block; height:auto; }
.th-viewer__thumb--empty{ padding: 40px; color: rgba(168,176,196,0.75); text-align:center; }
.th-viewer__btn{
  position:absolute;
  left: 16px;
  bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(92,255,122,0.25);
  background: rgba(92,255,122,0.12);
  color: var(--text);
  padding: 10px 14px;
  cursor:pointer;
}
.th-viewer__btn:hover{ background: rgba(92,255,122,0.16); }

.th-viewer__frame{ width:100%; }
.th-iframe{ width:100%; height: 70vh; border:0; display:block; background:#000; }
.th-viewer__note{ padding: 10px 12px; color: rgba(168,176,196,0.85); font-size: 12px; border-top: 1px solid var(--line); }

.th-link{ color: var(--accent); text-decoration:none; }

/* Footer */
.th-footer{
  border-top: 1px solid var(--line);
  background: rgba(11,12,15,0.65);
  backdrop-filter: blur(12px);
}
.th-footer__inner{
  padding: 18px 0;
  display:flex;
  justify-content:space-between;
  gap: 14px;
  align-items:flex-start;
}
.th-footer__title{ font-weight: 700; }
.th-footer__sub{ color: rgba(168,176,196,0.85); font-size: 12px; margin-top: 6px; }
.th-footer__links{ display:flex; gap: 12px; }
.th-footer__links a{ color: rgba(168,176,196,0.90); text-decoration:none; }
.th-footer__links a:hover{ color: var(--text); }

/* Responsive */
@media (max-width: 980px){
  .th-app{ grid-template-columns: 1fr; }
  .th-app__panel{ border-right:none; border-bottom: 1px solid var(--line); }
  .th-app__map{ height: 62vh; }
  .th-map{ position:relative; height: 62vh; }
  .th-grid{ grid-template-columns: 1fr; }
  .th-nav__menu{ gap: 8px; }
  .th-nav__menu a{ padding: 6px 8px; }
}
.th-media{ margin: 18px 0 22px; }
.th-video{ border:1px solid var(--line); border-radius: var(--r2); overflow:hidden; background: rgba(0,0,0,0.35); }
.th-video__iframe{ width:100%; height: 56.25vw; max-height: 520px; border:0; display:block; }

.th-gallery{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.th-gallery__item{
  border:1px solid var(--line);
  border-radius: 14px;
  overflow:hidden;
  display:block;
  background: rgba(255,255,255,0.03);
}
.th-gallery__item img{ width:100%; height: 180px; object-fit: cover; display:block; }

@media (max-width: 980px){
  .th-gallery{ grid-template-columns: repeat(2, 1fr); }
  .th-gallery__item img{ height: 160px; }
}

/* === Map bubbles (marker labels with thumbnail) === */
.th-marker-transparent{
  background: transparent;
  border: 0;
}

/* Remove Leaflet tooltip default chrome for our bubble */
.th-bubble-tooltip,
.th-bubble-tooltip.leaflet-tooltip{
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* Bubble card (compact) */
.th-bubble{
  display: grid;
  grid-template-columns: 32px 1fr; /* smaller thumbnail */
  gap: 6px;
  align-items: center;

  background: rgba(17,19,26,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 6px 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.40);

  max-width: 200px;
  cursor: pointer;
}

.th-bubble__thumb{
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,0.06);
}
.th-bubble__thumb--empty{
  background: rgba(255,255,255,0.08);
}

.th-bubble__title{
  font-size: 11px; /* smaller text */
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  word-break: break-word;
}

/* Tail (black) */
.th-bubble-tooltip:before{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(17,19,26,0.95); /* black */
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.40));
}


/* === Force tooltip tail color (override Leaflet default) === */
.th-bubble-tooltip.leaflet-tooltip-top:before{
  border-top-color: rgba(17,19,26,0.95) !important;
}
.th-bubble-tooltip.leaflet-tooltip-bottom:before{
  border-bottom-color: rgba(17,19,26,0.95) !important;
}
.th-bubble-tooltip.leaflet-tooltip-left:before{
  border-left-color: rgba(17,19,26,0.95) !important;
}
.th-bubble-tooltip.leaflet-tooltip-right:before{
  border-right-color: rgba(17,19,26,0.95) !important;
}

/* === Mobile: bubble title only (hide thumbnail) === */
@media (max-width: 782px){
  /* サムネを消す */
  .th-bubble__thumb{
    display: none !important;
  }

  /* 1カラム化（タイトルのみ） */
  .th-bubble{
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    max-width: 240px;      /* 好みで調整可 */
    padding: 7px 10px;     /* 視認性優先で少しだけ余白 */
  }

  /* 文字を少し読みやすく（必要なら） */
  .th-bubble__title{
    font-size: 12px !important;  /* 現状11pxなら、スマホだけ12pxにして視認性UP */
    font-weight: 700 !important;
    line-height: 1.25 !important;
  }
}

/* === Flight route labels (tooltip) === */
.thm-route-label,
.thm-route-label.leaflet-tooltip{
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.thm-route-label:before{
  border-top-color: rgba(0,0,0,0.75);
}
.th-route-map{
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
}


/**
 * ロゴスタイル
 * assets/css/app.css に追加または、新規ファイルとして作成
 */

/* ロゴ画像のスタイル */
.th-logo__image {
  height: 40px; /* ロゴの高さを調整 */
  width: auto;
  display: block;
  transition: opacity 0.2s;
}

.th-logo:hover .th-logo__image {
  opacity: 0.8;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .th-logo__image {
    height: 32px; /* モバイルでは少し小さく */
  }
}

/* ダークモード対応（必要に応じて） */
@media (prefers-color-scheme: dark) {
  .th-logo__image {
    /* 背景が暗い場合の調整 */
    /* filter: brightness(1.2); */
  }
}
