/* style.css */
body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
    background-color: #1e3645;
    margin: 0;
    padding-bottom: 80px; /*フッター分の余白*/
    color: #fff;
    overflow-x: hidden;
}
img, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}
.container, .event-page {
    box-sizing: border-box;
    overflow-x: hidden;
}

.site-header {
    background: #1e3645;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    min-height: 56px;
    border-bottom: 1px solid #223e50;
}
.back-btn  {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
}
.back-btn img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    padding: 0 8px;
}
.header-link:hover {
    color: #ffcc00;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-charge {
    background: #ffcc00;
    color: #1e3645;
    border-radius: 20px;
    padding: 6px 18px;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
    margin-right: 8px;
    transition: background 0.2s, color 0.2s;
}
.header-charge:hover {
    background: #fff;
    color: #1e3645;
}
.header-icon-link {
    display: flex;
    align-items: center;
}
.header-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ffcc00;
}
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.event-page {
    background-color: #223e50;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#ranking-banner {
    width: 100%;
    max-width: 720px;
    display: block;
    margin: 0 auto 20px;
    border-radius: 8px;
}

/* ページ内リンク */
.anchor-links {
    overflow-x: auto;
    white-space: nowrap;
    margin: 0 0 20px 0;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.anchor-links::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}
.anchor-links a {
    display: inline-block;
    background: #223e50;
    color: #ffcc00;
    border: 2px solid #ffcc00;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    padding: 8px 20px;
    margin-right: 8px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    outline: none;
}
.anchor-links a:hover,
.anchor-links a:active,
.anchor-links a:focus {
    background-color: #ffcc00;
    color: #1e3645;
}
.anchor-links a:focus,
.anchor-links a:focus-visible {
    background: #223e50 !important;
    color: #ffcc00 !important;
    outline: none !important;
    box-shadow: none !important;
}

.event-summary { line-height: 1.6; }
.line-marker {
    border-bottom: 1px solid #ffcc00;
    background: none;
    font-weight: bold;
    padding-bottom: 2px;
}
.keyword { color: #ffcc00; font-weight: bold; }

h2.section-title {
    font-size: 22px;
    color: #ffcc00;
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 18px;
    letter-spacing: 0.05em;
}
h2 {
    font-size: 20px;
    color: #ffcc00;
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: bold;
    letter-spacing: 0.04em;
}
h3 {
    font-size: 18px;
    color: #ffcc00;
    margin-top: 28px;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 0.03em;
}

ul.info-list.notify {
    list-style-type: none; padding-left: 0; font-size: 14px; color: #ffe066;
}
ul.info-list.notify li {
    padding-left: 1.2em; position: relative;
}
ul.info-list.notify li::before {
    content: '※'; position: absolute; left: 0;
}

figure.aligncenter {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  figure.aligncenter img {
    display: block;
    margin: 0 auto;
  }

/* テーブル */
.table-scroll { overflow-x: auto; }
.info-table { width: 100%; border-collapse: collapse; border: 1px solid #ffcc00; border-radius: 5px; overflow: hidden; }
.info-table th, .info-table td { border: 1px solid #ffcc00; padding: 12px; text-align: center; }
.info-table th { background-color: #ffcc00; color: #1e3645; font-weight: bold; }
.info-table td.left { text-align: left; }

.wp-block-table.aligncenter {
    margin: 24px auto;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    background: #223e50;
    color: #fff;
    font-size: 15px;
    table-layout: fixed;
}

.wp-block-table th,
.wp-block-table td {
    border: 1px solid #fff;
    padding: 10px 12px;
    text-align: center;
}

.wp-block-table th {
    background: #ffcc00;
    color: #1e3645;
    font-weight: bold;
}

.wp-block-table td:first-child {
    font-weight: bold;
    color: #ffcc00;
    background: #1e3645;
}

.wp-block-table tr:nth-child(even) td {
    background: #2a4a5e;
}

/* 1. テーブルの1行目を見出し風に強調 */
.wp-block-table tr:first-child td {
    background: #1e3645;
    color: #ffcc00;
    font-weight: bold;
    font-size: 1.05em;
}

iframe[title="YouTube video player"] {
    height: 500px !important;
}

/* 2. テーブルの縦スクロールバーを消す */
.wp-block-table.aligncenter {
    overflow-x: auto;
    overflow-y: hidden;
}

/* ======== ここからランキングページのスタイル ======== */

/* コンテンツ切り替え用 */
.hidden {
    display: none !important;
}

/* メインのタブ */
.main-tabs {
    display: flex; height: 64px; background-color: #223e50; border-bottom: 1px solid #ffcc00;
    border-radius: 8px 8px 0 0;
}
.main-tabs .tab {
    position: relative; display: flex; align-items: center; padding: 0 28px; font-size: 15px; cursor: pointer; color: #ffcc00; font-weight: bold; height: 64px; transition: color 0.2s;
}
.main-tabs .tab.selected {
    color: #1e3645; background: #ffcc00;
    border-radius: 8px 8px 0 0;
}
.main-tabs .tab.selected::after {
    content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 1px; background-color: #ffcc00;
}

#ranking-content {
    background-color: #1e3645; padding: 4px; margin-top: 5px; border-radius: 5px;
}
.ranking-filters {
    display: flex; justify-content: space-between; align-items: center; padding: 16px 0;
}
.filter-tabs { display: flex; gap: 10px; }
.filter-tab { padding: 8px 16px; border: 2px solid #ffcc00; background-color: #223e50; border-radius: 5px; cursor: pointer; font-weight: bold; color: #ffcc00; transition: background 0.2s, color 0.2s; }
.filter-tab.selected { background-color: #ffcc00; color: #1e3645; border-color: #ffcc00; }
.period-select { padding: 8px 12px; border-radius: 5px; border: 2px solid #ffcc00; background: #223e50; color: #ffcc00; font-weight: bold; }

.sub-filter-buttons { display: flex; gap: 10px; margin-bottom: 20px; }
.sub-filter-button { padding: 6px 14px; border: 2px solid #ffcc00; background-color: #223e50; border-radius: 20px; cursor: pointer; font-weight: bold; color: #ffcc00; transition: background 0.2s, color 0.2s; }
.sub-filter-button.selected { background-color: #ffcc00; color: #1e3645; border-color: #ffcc00; }

.ranking-list {
    background: #fff;
    color: #1e3645;
    border-radius: 10px;
    padding: 16px;
}
.ranking-list p, .ranking-list span, .ranking-list div, .ranking-list li {
    color: #1e3645 !important;
}
.ranking-item { display: flex; align-items: center; background-color: #223e50; padding: 10px; border-radius: 5px; border: 2px solid #ffcc00; color: #fff; }
.rank-info { width: 60px; text-align: center; font-size: 18px; font-weight: bold; color: #ffcc00; }
.rank-unit { font-size: 12px; }
.user-icon { width: 60px; height: 60px; border-radius: 50%; margin: 0 15px; border: 2px solid #ffcc00; }
.user-details { flex-grow: 1; }
.user-name { font-weight: bold; }
.user-score { color: #ffcc00; font-size: 14px; }
.follow-button { padding: 8px 15px; border: 2px solid #ffcc00; background-color: #223e50; color: #ffcc00; border-radius: 20px; cursor: pointer; font-weight: bold; transition: background 0.2s, color 0.2s; }
.follow-button:hover { background-color: #ffcc00; color: #1e3645; }

.ranking-item.ranker { background-color: #2a4a5e; border: 2px solid #ffcc00; }
.ranking-item.ranker .user-icon { width: 80px; height: 80px; }
.ranking-item.first .rank-number { color: #ffcc00; font-size: 22px; }
.ranking-item.second .rank-number { color: #ffe066; font-size: 22px; }

.filter-tab.selected, .sub-filter-button.selected {
    background: #fff;
    color: #1e3645;
    border-color: #ffcc00;
}

/* イベントバナー画像 */
.event-banner {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 16px auto 10px auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ランキングタブのプルダウン右寄せ＆小型化 */
.period-select-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4px;
}
.period-select {
    width: 200px;
    font-size: 0.95em;
    padding: 4px 8px;
    height: 32px;
    border-radius: 6px;
}

/* 横スクロール可能なチップボタン */
.chip-scroll {
    overflow-x: auto;
    white-space: nowrap;
    margin-top: 2px;
    margin-bottom: 2px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.chip-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}
.chip {
    display: inline-block;
    background: #223e50;
    color: #ffcc00;
    border: 2px solid #ffcc00;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    padding: 8px 20px;
    margin-right: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    outline: none;
}
.chip.selected, .chip:active {
    background: #ffcc00;
    color: #1e3645;
}

/* ランキングiframeラッパー */
.ranking-figure {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 50px; /* 15px→24px */
}
.ranking-figure iframe {
    width: 100%;
    min-height: 400px;
    border: none;
    display: block;
}

.header-tabs-area {
  position: sticky;
  top: 0;
  z-index: 300;
  background: #1e3645;
}
@media (max-width: 600px) {
  .header-tabs-area {
    position: sticky;
    top: 0;
    z-index: 300;
    background: #1e3645;
  }
}

/* @media (min-width: 601px) の .main-tabs, .main-tabs .tab, .main-tabs .tab.selected も削除 */

@media (max-width: 600px) {
    .container {
        max-width: 100vw;
        padding: 4px;
    }
    .event-page {
        padding: 8px;
        border-radius: 0;
    }
    .main-tabs {
        display: flex;
        flex-direction: row;
        height: 44px !important;
        background: #1e3645 !important;
        border-radius: 0 !important;
        border-bottom: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .main-tabs .tab {
        flex: 1 1 0;
        min-width: 0;
        font-size: 15px !important;
        height: 44px !important;
        border-radius: 0 !important;
        margin: 0 !important;
        text-align: center;
        white-space: nowrap;
        display: flex;
        justify-content: center;
        align-items: center;
        position: static !important;
        padding: 0 !important;
        color: #ffcc00 !important;
        background: none !important;
        font-weight: bold !important;
        border: none !important;
        transition: color 0.2s, background 0.2s;
    }
    .main-tabs .tab.selected {
        color: #1e3645 !important;
        background: #ffcc00 !important;
        border-radius: 0 0 0 0 !important;
        font-size: 15px !important;
        height: 44px !important;
    }
    .main-tabs .tab.selected::after {
        display: none !important;
    }
    .main-tabs-toggle { display: none !important; }
    .main-tabs.collapsed, .main-tabs.expanded { max-height: none !important; overflow: visible !important; }
    .filter-tabs, .sub-filter-buttons, .ranking-filters, .anchor-links {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .filter-tab,
    .sub-filter-button {
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        height: 44px;
        min-height: 44px;
        padding: 0 0;
    }
    .period-select {
        width: 100%;
        font-size: 15px;
        min-height: 36px;
        padding: 8px 12px;
        margin-top: 20px;
        margin-bottom: 100px;
        text-align: center;
    }
    .ranking-list {
        padding: 6px 0;
        border-radius: 8px;
    }
    .event-gift-list {
        flex-direction: column;
        align-items: center;
    }
    .event-gift-list img {
        width: 100%;
        max-width: 320px;
        margin: 10px auto;
    }
    img {
        max-width: 100%;
        height: auto;
    }
    h2.section-title, h2, h3 {
        font-size: 17px;
        margin-top: 18px;
        margin-bottom: 8px;
        padding-bottom: 2px;
    }
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 8px;
        gap: 0;
        flex-wrap: nowrap;
    }
    .header-link {
        font-size: 14px;
        padding: 0 4px;
    }
    .modal-content {
        min-width: 0;
        width: 90vw;
        padding: 18px 8px 12px 8px;
    }
    .ranking-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 0;
    }
    .filter-tabs {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }
    .filter-tab {
        width: 100%;
        font-size: 16px;
        padding: 10px 0;
        border-radius: 12px;
        margin: 0 0 4px 0;
    }
    .filter-tab.selected {
        font-size: 16px;
        border-radius: 12px;
    }
    .period-select {
        width: 100%;
        font-size: 15px;
        min-height: 36px;
        height: 36px;
        margin-bottom: 8px;
    }
    .sub-filter-buttons {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }
    .sub-filter-button {
        width: 100%;
        font-size: 15px;
        padding: 10px 0;
        border-radius: 12px;
        margin: 0 0 4px 0;
    }
    .sub-filter-button.selected {
        font-size: 15px;
        border-radius: 12px;
    }
    .ranking-list {
        padding: 10px 0;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    .ranking-item {
        padding: 10px 8px;
        border-radius: 10px;
        font-size: 15px;
    }
    .user-icon {
        width: 48px;
        height: 48px;
        margin: 0 10px;
    }
    .user-details {
        font-size: 14px;
    }
    .follow-button {
        padding: 7px 12px;
        font-size: 14px;
        border-radius: 16px;
    }
    .ranking-list p, .ranking-list span, .ranking-list div, .ranking-list li {
        font-size: 15px !important;
    }
    .event-banner {
        max-width: 100vw;
        border-radius: 0;
        margin: 8px 0 10px 0;
    }
    .chip-scroll {
        margin-top: 5px;
        margin-bottom: 2.5px;
    }
    .chip {
        font-size: 14px;
        padding: 7px 16px;
        margin-right: 6px;
        border-radius: 16px;
    }
    .ranking-figure {
        max-width: 100vw;
        border-radius: 0;
        margin-top: 10px; /* 15px→20px */
    }
    .ranking-figure iframe {
        min-height: 320px;
    }
    iframe[title="YouTube video player"]{
        height: 200px !important;
    }
    .event-header {
        gap: 6px;
        padding: 4px 0 2px 0;
        position: sticky;
        top: 0;
        z-index: 300;
        background: #1e3645;
    }
    .main-tabs.sticky-tabs {
        position: sticky;
        top: 44px; /* .event-headerの高さ分 */
        z-index: 250;
        background: #1e3645;
    }
    .event-header h1 {
        font-size: 1.05em;
        margin: 0;
    }
    .back-btn {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        display: flex;
        align-items: center;
    }
    .back-btn img {
      width: 36px;
      height: 36px;
      object-fit: contain;
    }
    .event-header h1 { display: none; }
}

.sticky-tabs {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #1e3645;
}

/* イベント概要のリストも見やすく */
.event-page ul {
    margin-left: 1.2em;
    margin-bottom: 16px;
    color: #fff;
    font-size: 15px;
    line-height: 1.7;
}

@media (max-width: 600px) {
  .period-select-wrapper {
    margin-bottom: 3px;
  }
  .period-select {
    width: 160px;
    font-size: 0.92em;
    padding: 3px 6px;
    height: 28px;
  }
}

footer p.bold {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 18px;
}
.app-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}
.apple-link img {
  height: 48px;
}
.google-link img {
  height: 54px !important;
  width: auto !important;
  object-fit: contain;
}
footer .copyright {
    display: block;
    color: #ffcc00;
    font-size: 1em;
    margin-top: 10px;
}
@media (max-width: 600px) {
    footer p.bold {
        font-size: 1em;
        margin-bottom: 12px;
    }
    footer .apple-link {
        gap: 10px;
        margin-bottom: 10px;
    }
    footer .apple-link img {
        height: 36px;
    }
    footer .google-link {
        gap: 10px;
        margin-bottom: 10px;
    }
    footer .google-link img {
        height: 36px;
    }
    footer .copyright {
        font-size: 0.95em;
        margin-top: 6px;
    }
}

/* テーブル1行目のみ強調、他は白文字 */
.wp-block-table tr:first-child td {
    background: #1e3645;
    color: #ffcc00;
    font-weight: bold;
    font-size: 1.05em;
}
.wp-block-table tr:not(:first-child) td {
    background: #223e50;
    color: #fff;
    font-weight: normal;
}
.wp-block-table th {
    background: #1e3645;
    color: #ffcc00;
    font-weight: bold;
}

/* テーブルの縦スクロールバーを消す */
.wp-block-table.aligncenter {
    overflow-x: auto;
    overflow-y: hidden !important;
    max-height: none !important;
}

/* 表の枠線を細く白色に */
.wp-block-table th,
.wp-block-table td {
    border: 1px solid #fff;
}
/* 列幅を揃える */
.wp-block-table table {
    table-layout: fixed;
    width: 100%;
}
.wp-block-table td:first-child,
.wp-block-table th:first-child {
    width: 50%;
}
.wp-block-table td:nth-child(2),
.wp-block-table th:nth-child(2),
.wp-block-table td:nth-child(3),
.wp-block-table th:nth-child(3) {
    width: 25%;
}
/* 縦スクロールバー対策を強化 */
.wp-block-table.aligncenter {
    overflow-x: auto;
    overflow-y: hidden !important;
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
}
/* AppStoreバナーのみ小さく */

.anchor-links button,
.anchor-links a {
    background: #223e50;
    color: #ffcc00;
    border: 2px solid #ffcc00;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    padding: 8px 20px;
    margin-right: 8px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border-style: solid;
}
.anchor-links button:active,
.anchor-links a:active {
    background-color: #ffcc00;
    color: #1e3645;
}
.anchor-links button:hover,
.anchor-links button:focus,
.anchor-links a:hover,
.anchor-links a:focus {
    background: #223e50;
    color: #ffcc00;
}
.gift-panel.hidden { display: none !important; }

/* フッター6行リンク用（画像のようなレイアウト） */
.footer-links-6row {
  max-width: 420px;         /* お好みで調整可 */
  margin-left: auto;
  margin-right: auto;
  /* もしくは margin: 0 auto; でもOK */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.footer-links-6row li {
  max-width: 420px;
  margin: 0 auto 0.7em auto; /* 下に余白 */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4.0em;
  list-style: none;
  padding: 0;
  line-height: 1.3;
}
.footer-links-6row li:last-child {
  margin-bottom: 0;
}
.footer-links-6row li a {
  display: inline-block;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
  font-size: 1.15em;
  text-align: center;
  transition: color 0.2s;
}
.footer-links-6row li a:hover {
  color: #ffcc00;
}
.footer-links-6row li a {
  text-align: center;
  margin: 0;
}
@media (max-width: 600px) {
  .footer-links-6row,
  .footer-links-6row li {
    max-width: 98vw;
  }
  .footer-links-6row li {
    gap: 2em;
    line-height: 2.0;
  }
  .footer-links-6row li a {
    font-size: 1em;
  }
}

/* フッター全体の上部に余白と区切り線 */
footer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1.5px solid #446178;
  text-align: center;
}

.footer-center {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: block;
}