/* =======================
   ヘッダー全体
======================= */
header {
  border-bottom:1px solid #191970;
  background:#fff;
  z-index: 2500;
}

.header-inner {
  max-width:1100px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  position:relative;
}

.logo {
  font-weight:700;
  font-size:0.8rem;
  color:#191970;
  display:flex;
  align-items:center;
}

.nav {
  display:flex;
  align-items:center;
  gap:14px;
}

.nav a {
  text-decoration:none;
  color:#191970;
  font-size:0.8rem;
}

/* =======================
   アコーディオン
======================= */
.accordion-wrapper {
  position:relative;
  z-index: 2600;
}

.accordion-btn {
  background:none;
  border:none;
  font-size:0.8rem;
  color:#191970;
  cursor:pointer;
  display:flex;
  align-items:center;
}

.accordion-panel {
  display:none;
  position:absolute;
  top:30px;
  left:0;
  background:#f9f9f9;
  border:1px solid #ddd;
  border-radius:4px;
  padding:8px;
  min-width:150px;
}

/* =======================
   登録地点
======================= */
.location-list {
  list-style:none;
  padding:0;
  margin:0;
}

.location-list li {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:3px 0;
  font-size:14px;
}

.delete-btn {
  background:none;
  border:none;
  cursor:pointer;
  color:#c00;
}

.location-none {
  color:#888;
  font-style:italic;
}

/* =======================
   ニュースオーバーレイ
======================= */
#newsOverlay {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.55);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:3000;
}

.news-window {
  position:relative;
  width:85%;
  max-width:900px;
  height:70vh;
  background:#fff;
  border-radius:4px;
  box-shadow:0 10px 30px rgba(0,0,0,0.4);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* =======================
   汎用オーバーレイ（カレンダー用）
   ※既存class維持
======================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6); /* ★これが暗幕 */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* 中身 */
.overlay-content {
  width: 95%;
  height: 90%;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  padding-top: 30px; /* ボタン高さ＋余裕 */
}



/* =======================
   カレンダー本体
======================= */
#calendarWrapper {
  width: 100%;
  height: 100%;
  display: flex;

  overflow-x: auto;
  overflow-y: hidden; /* ★これ追加 */
  background: transparent;

  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.month {
  min-width: 100%;
  scroll-snap-align: start;

  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden; /* ★これ追加 */
}

.month-title {
    text-align: center;
    color: #fff;
}


/* カレンダー全体 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);

  gap: 4px;
  padding: 6px;
  background: transparent;

  overflow: hidden; /* ★保険 */
}

/* セル */
.cell {
  background: #fff;
  border-radius: 4px;
  padding: 6px 4px;
  min-height: 55px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 空白セル */
.cell.empty {
  background: transparent;
  box-shadow: none;
}

/* 曜日ヘッダー */
.week-head {
  background: #f0f4ff;

  display: flex;              /* ★追加 */
  align-items: center;        /* ★縦中央 */
  justify-content: center;    /* ★横中央 */

  font-size: 0.65rem;
  font-weight: 600;

  padding: 2px 0;
  min-height: 20px;

  border-radius: 4px;
}

/* 日付 */
.day {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
}

/* 潮名 */
.tide {
  font-size: 0.7rem;
  text-align: center;
  color: #444;
}

/* 大潮（強調） */
.tide-big {
  color: #e60033;
  font-weight: 700;
}

/* 過去日 */
.past {
  opacity: 0.4;
}

/* 今日 */
.today {
  border: 2px solid #191970;
}


html,
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    background: #fff;
    overflow-x: hidden;
}

/* =========================
   基本UI
========================= */
li,
button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

li:active,
button:active {
    background: transparent;
}

li {
    user-select: none;
    cursor: pointer;
}

/* =========================
   Leaflet
========================= */
.leaflet-control-attribution {
    font-size: 8px;
    background: rgba(255, 255, 255, 0.5);
}

#lf-map {
    width: 100%;
    height: 80vh;
    position: relative;
    z-index: 0;
    touch-action: none;
}

.leaflet-container {
    z-index: 0;
}

/* =========================
   MAP MENU
========================= */
.map-menu {
    display: none;
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1980;
    padding: 2px 5px;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* pointer-events統一 */
#map-menu,
#map-menu ul,
#map-menu li,
#map-menu button {
    pointer-events: auto;
}

/* UL */
.map-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: none;
}

/* LI */
.map-menu li {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 13px;
    color: #fff;

    padding: 4px 8px;
    width: 100%;
    box-sizing: border-box;

    cursor: pointer;

    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    margin: 2px 0;

    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s ease;
}

.map-menu li:last-child {
    border-bottom: none;
    padding-bottom: 3px;
}

/* アニメーション */
.map-menu li.new-item {
    opacity: 0;
    transform: translateY(6px);
}

.map-menu li.new-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* phase lock */
#map-menu.phase2-lock li {
    pointer-events: none;
}

#map-menu.phase2-lock li .spot-text {
    pointer-events: auto;
    cursor: pointer;
}

/* ボタン */
#map-menu button {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    text-align: left;
}

/* =========================
   AD
========================= */
.map-ad {
    display: none;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    pointer-events: none;
}

.map-ad .ad-box {
    width: 320px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    color: #333;

    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* =========================
   BACK BUTTON
========================= */
.map-back-btn {
    position: absolute;
    bottom: 40px;
    right: 20px;
    z-index: 2000;
    background: none;
    border: none;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.back-icon {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
    -webkit-mask-image: linear-gradient(
        to right,
        black 40%,
        rgba(0, 0, 0, 0.5) 70%,
        transparent
    );
    mask-image: linear-gradient(
        to right,
        black 60%,
        transparent
    );
}

/* =========================
   SPOT LABEL
========================= */
.spot-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;

    padding: 1px 4px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;

    border-radius: 2px;
    background: #191970;
    color: #fff;

    border: none;
    box-shadow: none;
}

.spot-label svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* spot default */
.spot-label.spot {
    background: #191970;
}

/* fish colors */
.spot-label.fish1 { background: #6495ED; }
.spot-label.fish2 { background: #2E8B57; }
.spot-label.fish3 { background: #FF8C00; }
.spot-label.fish4 { background: #4B0082; }
.spot-label.fish6 { background: #008000; }

/* =========================
   PREF DOT
========================= */
.pref-dot {
    width: 5px;
    height: 5px;
}

.pref-dot.spot {
    background: #191970;
}

.marker-status {
    font-size: 10px;
    color: yellow;
    text-shadow: 0 0 2px black;
    margin-top: 2px;
}

/* fish */
.pref-dot.fish1 { background: #6495ED; }
.pref-dot.fish2 { background: #2E8B57; }
.pref-dot.fish3 { background: #FF8C00; }
.pref-dot.fish4 { background: #4B0082; }
.pref-dot.fish6 { background: #008000; }

/* =========================
   SHOP MARKER
========================= */
.shop-marker {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border: 2px solid #191970;
    border-radius: 50%;
    background: #fff;

    font-size: 12px;
    color: #191970;

    box-sizing: border-box;
}

.shop-marker.no-circle {
    border: 0;
    background: none;
}

.shop-marker.no-circle .shop-icon {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
}

.shop-icon {
    width: 14px;
    height: 14px;
    fill: #191970;
    pointer-events: none;
}

/* =========================
   POPUP
========================= */
.shop-popup {
    font-size: 13px;
    line-height: 1.4;
}

.shop-popup-title {
    font-weight: bold;
    margin-bottom: 4px;
    padding-right: 20px;
}

.shop-popup-address {
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
}

.shop-popup-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.shop-popup-btn {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
}

.shop-popup-address.dummy {
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
    padding-right: 20px;
}

.shop-popup-btn::after {
    content: none !important;
}

/* =========================
   LEAFLET POPUP FIX
========================= */
.leaflet-popup-content-wrapper {
    padding: 4px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.leaflet-popup-content {
    margin: 6px 8px;
}

.leaflet-popup-tip,
.leaflet-popup-tip-container {
    display: none;
}

/* =========================
   CLOSE BUTTON
========================= */
.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;

    z-index: 10000;

    background: rgba(0, 0, 0, 0.6);
    color: #fff;

    border: none;
    border-radius: 50%;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    cursor: pointer;
}


/* =========================
   フッター
========================= */

.site-footer {
  text-align: center;
  padding: 10px 10px;
  font-size: 12px;
  color: #191970;
  cursor: pointer;
  user-select: none;
}

.site-footer:active {
  background: #f0f0f0;
}
/* =========================

   モーダル（サイトポリシー）

========================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
 overflow: hidden;
}

.modal-content {

  width: min(90vw, 700px);

  margin: 5vh auto;

  padding: 10px;

  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  overflow-wrap: anywhere;

}
/* =========================

   ポリシー本文

========================= */

.modal-content h1 {
      text-align: center;
  font-size: 12px;
  margin-bottom: 16px;

}

.modal-content h2 {

  font-size:12px;

  margin-top: 16px;

  margin-bottom: 6px;

}

.modal-content p {

  font-size: 12px;

  margin-bottom: 10px;

  color: #444;

}

/* =========================

   レスポンシブ

========================= */

@media (max-width: 600px) {

  .modal-content {

    margin: 5vh 5vw;

    padding: 16px;

  }

  .policy-link {

    padding: 10px 16px;

    font-size: 14px;

  }

}