/* ========================================
   マイすぽっつ 共通（ヘッダー・フッター・フローティング検索）
======================================== */

/* Astraの標準ヘッダーを非表示 */
.site-header,
#masthead {
  display: none !important;
}

:root {
  --ms-pink: #E8436A;
  --ms-pink-light: #F06B8A;
  --ms-navy: #1A1F36;
  --ms-gray: #6B7280;
  --ms-gray-light: #F4F5F7;
  --ms-border: #E8EAED;
}

/* コンテンツ上余白リセット */
#content.site-content,
.myspots-content.site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ===== ヘッダー全体 ===== */
.myspots-custom-header {
  background: white;
  border-bottom: 2px solid var(--ms-pink);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ===== 上段 ===== */
.ms-header-top {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== ロゴ ===== */
.ms-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.ms-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.ms-logo-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--ms-pink);
  letter-spacing: -0.5px;
  line-height: 1;
  display: block;
}
.ms-logo-sub {
  font-size: 9px;
  color: var(--ms-gray);
  display: block;
  letter-spacing: 0.05em;
}

/* ===== 検索バー ===== */
.ms-header-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ms-header-search-inner {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ms-border);
  border-radius: 6px;
  background: white;
  transition: border-color 0.2s;
}
.ms-header-search-inner:focus-within {
  border-color: var(--ms-pink);
}
.ms-header-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.ms-header-search input {
  flex: 1;
  padding: 9px 8px 9px 36px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  background: transparent;
}
.ms-header-search-btn {
  flex-shrink: 0;
  align-self: stretch;
  background: var(--ms-pink);
  color: white;
  border: none;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  white-space: nowrap;
}
.ms-header-search-btn:hover { background: var(--ms-pink-light); }

/* ===== ナビ ===== */
.ms-header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.ms-nav-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--ms-gray);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 5px;
  white-space: nowrap;
  transition: background 0.2s;
}
.ms-nav-link:hover { background: var(--ms-gray-light); }

.ms-btn-login {
  font-size: 12px;
  font-weight: 700;
  color: var(--ms-pink);
  text-decoration: none;
  padding: 7px 14px;
  border: 1.5px solid var(--ms-pink);
  border-radius: 5px;
  white-space: nowrap;
  transition: all 0.2s;
}
.ms-btn-login:hover { background: #fff0f3; }

.ms-btn-register {
  font-size: 12px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  padding: 7px 14px;
  background: var(--ms-pink);
  border-radius: 5px;
  white-space: nowrap;
  transition: background 0.2s;
}
.ms-btn-register:hover { background: var(--ms-pink-light); }

.ms-header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ms-pink), var(--ms-pink-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.ms-header-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

/* ===== ジャンルタブバー ===== */
.ms-header-genre-bar {
  background: white;
  border-top: 1px solid var(--ms-border);
}
.ms-header-genre-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.ms-header-genre-bar-inner::-webkit-scrollbar { display: none; }
.ms-header-genre-tab {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ms-gray);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: block;
  flex-shrink: 0;
}
.ms-header-genre-tab:hover,
.ms-header-genre-tab.active {
  color: var(--ms-pink);
  border-bottom-color: var(--ms-pink);
}

/* ===== ハンバーガー ===== */
.ms-header-hamburger { display: none; margin-left: auto; }
.ms-hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  transition: background 0.2s;
  position: relative;
}
.ms-hamburger-btn:hover { background: rgba(232,67,106,0.08); }
.ms-hamburger-btn span {
  width: 22px; height: 2px; background: #333; border-radius: 2px;
  transition: all 0.3s; display: block; position: absolute;
}
.ms-hamburger-btn span:nth-child(1) { top: 12px; }
.ms-hamburger-btn span:nth-child(2) { top: 19px; }
.ms-hamburger-btn span:nth-child(3) { top: 26px; }
.ms-hamburger-btn.active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.ms-hamburger-btn.active span:nth-child(2) { opacity: 0; }
.ms-hamburger-btn.active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ===== モバイルメニュー ===== */
.ms-mobile-menu {
  display: none;
  background: white;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-top: 1px solid var(--ms-border);
  z-index: 999;
}
.ms-mobile-menu.active { display: block; }
.ms-mobile-menu-list { list-style: none; margin: 0; padding: 8px 0; }
.ms-mobile-menu-list li { margin: 0; }
.ms-mobile-menu-list a {
  display: block; padding: 14px 20px; color: #333;
  text-decoration: none; font-size: 15px; font-weight: 500;
  transition: all 0.2s; border-left: 3px solid transparent;
}
.ms-mobile-menu-list a:hover {
  background: #fff0f3; border-left-color: var(--ms-pink); color: var(--ms-pink);
}
.ms-mobile-menu-user {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--ms-border);
  border-left: 3px solid var(--ms-pink); background: #fff8f9;
}
.ms-mobile-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ms-pink), var(--ms-pink-light));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px; flex-shrink: 0; overflow: hidden;
}
.ms-mobile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ms-mobile-username { font-size: 14px; font-weight: 600; color: #333; }

/* ===== ヘッダー レスポンシブ ===== */
@media (max-width: 768px) {
  .ms-header-search,
  .ms-header-nav { display: none; }
  .ms-header-hamburger { display: block; }
  .ms-header-top { padding: 8px 16px; }
  .ms-logo-text { font-size: 18px; }
  .ms-logo-mark { width: 30px; height: 30px; font-size: 16px; }
}

/* ===== ヘッダー直後の余白削除 ===== */
body.home .myspots-custom-header + * { margin-top: 0 !important; padding-top: 0 !important; }
body.home #content,
body.home .site-content { padding-top: 0 !important; margin-top: 0 !important; }
body.home .ast-container { margin-top: 0 !important; }
body.home article,
body.home .ast-article-single,
body.home main,
body.home .entry-content { margin-top: 0 !important; padding-top: 0 !important; }
.myspots-hero { margin-top: -63px !important; }
@media (max-width: 768px) {
  .myspots-hero { margin-top: -60px !important; }
}

/* ========================================
   カスタムフッター
======================================== */
.myspots-footer {
    background: linear-gradient(135deg, #1f1235 0%, #2d1b4e 100%);
    color: #ccc;
    margin-top: 0;
}

.myspots-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 40px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

.myspots-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.footer-logo-image {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.footer-site-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.footer-tagline {
    font-size: 13px;
    color: #aaa;
    line-height: 1.8;
    margin: 0;
}

.myspots-footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-nav-title {
    font-size: 13px;
    font-weight: bold;
    color: #f472b6;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(244, 114, 182, 0.3);
}

.footer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-list li a {
    font-size: 13px;
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav-list li a:hover {
    color: #f472b6;
}

.myspots-footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    padding: 18px 20px;
}

.myspots-footer-copy p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

@media (max-width: 768px) {
    .myspots-footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 20px 30px;
    }

    .myspots-footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .myspots-footer-nav {
        grid-template-columns: 1fr;
    }
}

/* フッター上広告 */
.myspots-footer-ad {
    background: #fff;
    text-align: center;
    padding: 12px 0;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}
.admax-footer-pc { display: block; max-width: 100%; overflow: hidden; }
.admax-footer-sp { display: none; max-width: 100%; overflow: hidden; }
.admax-footer-pc iframe,
.admax-footer-sp iframe { max-width: 100% !important; }
@media (max-width: 768px) {
    .admax-footer-pc { display: none; }
    .admax-footer-sp { display: block; }
}

/* ========================================
   フローティング検索（スマホ）
======================================== */
.ms-float-search { display: none; }
@media (max-width: 768px) {
    .ms-float-search { display: block; position: fixed; bottom: 20px; right: 16px; z-index: 9999; }
    .ms-float-btn {
        width: 56px; height: 56px; border-radius: 50%;
        background: #E8436A; border: none; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        transition: transform 0.2s, background 0.2s;
    }
    .ms-float-icon-svg {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        stroke-width: 2.2 !important;
        display: block !important;
        flex-shrink: 0 !important;
    }
    .ms-float-btn:hover { background: #F06B8A; transform: scale(1.06); }
    .ms-float-btn.is-open { background: #555; }
    .ms-float-panel {
        position: absolute; bottom: 68px; right: 0;
        width: 272px; background: white;
        border-radius: 14px; border: 1px solid #E8EAED;
        box-shadow: 0 8px 24px rgba(0,0,0,0.13);
        overflow: hidden;
        opacity: 0; transform: translateY(10px) scale(0.97);
        pointer-events: none;
        transition: opacity 0.2s, transform 0.2s;
    }
    .ms-float-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
    .ms-float-panel-inner { padding: 14px; }
    .ms-float-label { font-size: 11px; font-weight: 700; color: #6B7280; margin: 0 0 8px; }
    .ms-float-form { display: flex; flex-direction: column; gap: 8px; }
    .ms-float-input-wrap {
        display: flex; align-items: center; gap: 8px;
        background: #F4F5F7; border-radius: 8px; padding: 9px 12px;
        border: 1px solid #E8EAED;
    }
    .ms-float-input {
        border: none; background: transparent; outline: none;
        font-size: 13px; color: #1A1F36; flex: 1; min-width: 0;
    }
    .ms-float-input::placeholder { color: #9CA3AF; }
    .ms-float-search-btn {
        background: #E8436A; color: white; border: none;
        padding: 10px; border-radius: 8px;
        font-size: 13px; font-weight: 700; cursor: pointer;
        transition: background 0.2s;
    }
    .ms-float-search-btn:hover { background: #F06B8A; }
    .ms-float-detail-link { display: none; }
    .ms-float-quick-links { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
    .ms-float-quick-btn {
        display: block; text-align: center; padding: 8px 12px;
        border-radius: 8px; font-size: 12px; font-weight: 700;
        text-decoration: none; transition: opacity 0.18s;
        background: #f4f5f7; color: #1a2744; border: 1px solid #e8eaed;
    }
    .ms-float-quick-btn--pink {
        background: #fde8ee; color: #E8436A; border-color: #f5b8c8;
    }
    .ms-float-quick-btn:hover { opacity: 0.8; }
}
