/* ==============================================
   play-entry-theme / main.css
   モバイルファースト設計
   ============================================== */

/* リセット・ベース
---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* でるスポ！ブランドカラー */
    --color-primary:   #1B3F8B;   /* ネイビー：メインカラー */
    --color-secondary: #1565C0;   /* ブルー：リンク・アクセント */
    --color-accent:    #F5A623;   /* オレンジ：CTAボタン・ロゴ！ */
    --color-bg:        #F4F6F9;
    --color-white:     #ffffff;
    --color-text:      #1A1A2E;
    --color-muted:     #666680;
    --color-border:    #E0E4EE;
    --radius:          8px;
    --shadow:          0 1px 4px rgba(27,63,139,0.08);
    --shadow-hover:    0 4px 16px rgba(27,63,139,0.18);
    --container:       1100px;
    /* 種目カラー */
    --color-takkyuu:   #1565C0;
    --color-badminton: #2E7D32;
    --color-tennis:    #E65100;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
}

a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* レイアウト
---------------------------------------------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px;
}

/* ヘッダー
---------------------------------------------- */
.site-header {
    background: var(--color-primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.site-logo a {
    display: flex;
    align-items: baseline;
    gap: 2px;
    text-decoration: none;
    line-height: 1;
}
.logo-text {
    font-size: 1.45rem;
    font-weight: 800;
    font-style: italic;
    color: #fff;
    letter-spacing: -0.02em;
}
.logo-accent {
    color: var(--color-accent);
}
/* .logo-en は削除 */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;  /* 絶対に縮まない */
}

/* ボタングループ：常に横並び */
.header-right-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ヘッダー右：大会登録CTAボタン（スマホ〜全サイズ表示） */
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
    line-height: 1;
}
.header-cta:hover { opacity: 0.88; text-decoration: none; }
/* スマホ：テキスト短縮・余白縮小 */
@media (max-width: 480px) {
    .header-cta {
        font-size: 0.65rem;
        padding: 5px 8px;
    }
}
/* タブレット以上は少し大きく */
@media (min-width: 600px) {
    .header-cta {
        font-size: 0.82rem;
        padding: 7px 16px;
    }
}

.site-nav {
    flex: 1;             /* ロゴとheader-rightの間を埋める */
    min-width: 0;        /* flex itemが縮めるよう */
}
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: rgba(255,255,255,0.95);
    font-size: 0.88rem;
    font-weight: 700;      /* 太文字に */
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
    white-space: nowrap;   /* 折り返し防止 */
}

.site-nav a:hover {
    border-color: #fff;
    text-decoration: none;
}

/* ハンバーガーメニュー（モバイル） */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.25s;
    transform-origin: center;
}

/* ハンバーガーメニュー 閉じるボタン（モバイルのみ表示） */
.nav-close {
    display: none;
}

/* ×アニメーション */
.nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* フッター
---------------------------------------------- */
.site-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 32px 16px;
    margin-top: 60px;
    font-size: 0.875rem;
}
.site-footer .footer-logo {
    font-size: 1.2rem;
    font-weight: 800;
    font-style: italic;
    color: #fff;
    margin-bottom: 6px;
}
.site-footer .footer-logo span { color: var(--color-accent); }
.footer-nav { margin-top: 8px; }
.footer-nav a { color: rgba(255,255,255,0.6); font-size: 0.8rem; text-decoration: none; margin: 0 8px; }
.footer-nav a:hover { color: #fff; }

/* セクション見出し
---------------------------------------------- */
.section-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--color-accent);
}

/* 検索フィルター
---------------------------------------------- */
.search-section { margin-bottom: 32px; }

.search-filter-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    background: var(--color-white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-item label {
    font-size: 0.78rem;
    font-weight: bold;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-item input,
.filter-item select {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--color-text);
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
}

.filter-item select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.filter-item input:focus,
.filter-item select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(46,94,158,0.15);
}

.btn-search {
    padding: 12px 24px;
    background: var(--color-secondary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-search:hover { background: var(--color-primary); }
.btn-search:active { transform: scale(0.98); }

/* 大会カード一覧
---------------------------------------------- */
.tournament-list { margin-bottom: 40px; }

.tournament-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tournament-card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.tournament-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.tournament-card a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.card-thumbnail img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-body { padding: 16px; flex: 1; }

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* 種目タグ：塗りつぶし・白文字 */
.tag-sport {
    background: var(--color-primary);
    color: #fff;
}

/* 地域タグ：枠線スタイルでカードに馴染みつつ視認性を確保 */
.tag-region {
    background: #fff;
    color: #1B3F8B;
    border: 1.5px solid #1B3F8B;
    padding: 2px 9px;
}
.tag-region::before {
    content: '📍';
    font-size: 0.68rem;
}

.tag-type   { background: #FFF3E0; color: #E65100; border: 1px solid #FFB74D; }
.tag-level  { background: #F3E5F5; color: #7B1FA2; border: 1px solid #CE93D8; }

/* 締切バッジ */
.badge-deadline {
    display: inline-block;
    background: #FFEBEE;
    color: #C62828;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.badge-full {
    display: inline-block;
    background: #EEEEEE;
    color: #757575;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--color-text);
}

.card-info {
    list-style: none;
    font-size: 0.85rem;
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-info li {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 大会詳細ページ
---------------------------------------------- */
.tournament-single {
    background: var(--color-white);
    padding: 24px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tournament-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 16px;
    line-height: 1.4;
    color: var(--color-primary);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.info-table th,
.info-table td {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    vertical-align: top;
}

.info-table th {
    background: #EEF3FB;
    font-weight: bold;
    color: var(--color-primary);
    white-space: nowrap;
    width: 7em;
}

.tournament-note {
    background: #FFFDE7;
    border-left: 4px solid #F9A825;
    padding: 12px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.tournament-body {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.entry-button-wrap { margin-top: 24px; text-align: center; }

.btn-entry {
    display: inline-block;
    padding: 14px 40px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.05rem;
    width: 100%;
    text-align: center;
    transition: background 0.2s;
}

.btn-entry:hover { background: #BF360C; text-decoration: none; }

/* ページネーション
---------------------------------------------- */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.nav-links a, .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    background: var(--color-white);
}

.nav-links .current {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

/* ========================================
   タブレット（600px〜）
======================================== */
@media (min-width: 600px) {

    .container { padding: 24px; }

    .header-inner { height: 60px; }
    .site-logo a { font-size: 1.3rem; }

    .search-filter-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-search {
        grid-column: span 2;
    }

    .tournament-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tournament-single {
        padding: 32px;
    }

    .tournament-title { font-size: 1.6rem; }

    .info-table th { width: 140px; }

    .btn-entry { width: auto; min-width: 280px; }
}

/* ========================================
   PC（900px〜）
======================================== */
@media (min-width: 900px) {

    .search-filter-form {
        grid-template-columns: 2fr 1fr 1fr 1fr auto;
        align-items: end;
    }

    .btn-search {
        grid-column: auto;
        white-space: nowrap;
    }

    .tournament-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-toggle { display: none; }

    /* PC：ヘッダーが確実に1行に収まるよう */
    .header-inner {
        gap: 24px;
    }
    .logo-text {
        font-size: 1.3rem;  /* PCでは少し大きく */
    }
}

/* ========================================
   モバイルナビゲーション（〜599px）
======================================== */
@media (max-width: 599px) {

    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;           /* 画面全体を覆う */
        background: var(--color-primary);
        padding: 80px 24px 24px;  /* 上部はヘッダー分の余白 */
        box-shadow: none;
        z-index: 9990;
        overflow-y: auto;    /* メニュー項目が多くてもスクロール可能 */
    }

    .site-nav.is-open { display: block; }

    .nav-close {
        display: block;
        position: absolute;
        top: 14px;
        right: 14px;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.35);
        color: #fff;
        font-size: 0.85rem;
        font-weight: 700;
        cursor: pointer;
        padding: 5px 12px;
        border-radius: 20px;
        line-height: 1.4;
        letter-spacing: 0.02em;
    }
    .nav-close:hover {
        background: rgba(255,255,255,0.25);
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .site-nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .site-nav a {
        display: block;
        padding: 14px 8px;
        font-size: 1rem;
    }

    /* テーブルをモバイルで縦並びに */
    .info-table thead { display: none; }
    .info-table tr { display: block; margin-bottom: 8px; }
    .info-table th, .info-table td {
        display: block;
        width: 100%;
    }
    .info-table th {
        background: #EEF3FB;
        border-bottom: none;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .info-table td {
        border-top: none;
        padding: 8px 12px;
    }
}

/* ========================================
   種目別アーカイブページ（taxonomy-sport）
======================================== */

.sport-hero {
    color: #fff;
    padding: 24px 0 20px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}
.sport-hero::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.sport-hero-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sport-icon {
    font-size: 3rem;
    line-height: 1;
    flex-shrink: 0;
}

.sport-hero-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.15);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}

.sport-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.sport-tagline {
    font-size: 0.82rem;
    opacity: 0.88;
    margin: 0;
    line-height: 1.6;
}

.sport-description {
    font-size: 0.9rem;
    color: var(--color-muted);
    padding: 16px 0 8px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
    line-height: 1.7;
}

.result-meta {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 16px;
}

.result-meta strong {
    color: var(--color-primary);
    font-size: 1.1rem;
}

.no-results {
    background: var(--color-white);
    padding: 40px 24px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--color-muted);
    line-height: 2;
}

/* 他の種目リンク */
.other-sports {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.sport-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.sport-link-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--color-text);
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
}

.sport-link-card:hover {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.sport-link-icon { font-size: 1.4rem; }

@media (min-width: 600px) {
    .sport-title { font-size: 2rem; }
    .sport-icon  { font-size: 3.5rem; }
}


/* ========================================
   トップページ ヒーローコピー
======================================== */
.site-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1565C0 100%);
    margin: -16px -16px 24px;
    padding: 28px 20px 24px;
    position: relative;
    overflow: hidden;
}
.site-hero::before {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(245,166,35,0.12);
}
.site-hero::after {
    content: '';
    position: absolute;
    left: 30%;
    bottom: -30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.site-hero-copy {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.site-hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    letter-spacing: -0.02em;
}
.site-hero-title span {
    color: var(--color-accent);
}
.site-hero-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 14px 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 24px;
    padding: 6px 18px;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}
.site-hero-count strong {
    color: var(--color-accent);
    font-size: 1.25em;
    font-weight: 800;
    margin: 0 2px;
}
@media (min-width: 600px) {
    .site-hero {
        margin: -16px -16px 28px;
        padding: 36px 28px 32px;
    }
    .site-hero-title { font-size: 2rem; }
    .site-hero-count { font-size: 1.05rem; }
}

/* ========================================
   トップページ（パターンC）
======================================== */

/* 種目ナビグリッド */
.sport-nav-section { margin-bottom: 32px; }

/* ---- スマホ：横スクロール ---- */
/* ---- スマホ：横スクロール ----
   overflow-x:auto を sport-nav-scroll-wrap に持たせ、
   .container の外に出ないよう position で制御する */
.sport-nav-scroll-wrap {
    /* コンテナのpadding分だけ左右に広げてスクロール領域を確保 */
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* containerのpadding(16px)を打ち消して画面端まで広げる */
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 12px;
    padding-top: 4px;
}
.sport-nav-scroll-wrap::-webkit-scrollbar { display: none; }

.sport-nav-grid {
    display: inline-flex;   /* inline-flexで中身の自然な幅を確保 */
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 100%;        /* 種目が少なくても左端から始まる */
}

.sport-nav-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px 18px 14px;
    min-width: 148px;       /* スワイプで「まだある」感を出す幅 */
    flex-shrink: 0;
    background: var(--sport-color, #1B3F8B);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.18s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.sport-nav-card::after {
    content: '';
    position: absolute;
    right: -12px;
    bottom: -12px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.sport-nav-card:hover  { opacity: 0.88; transform: translateY(-2px); text-decoration: none; }
.sport-nav-card:active { transform: scale(0.97); }

.sport-nav-icon  { font-size: 2rem; line-height: 1; }
.sport-nav-name  { font-size: 0.8rem; font-weight: 700; opacity: 0.85; margin-bottom: 2px; }
.sport-nav-label { font-size: 1rem; font-weight: 800; line-height: 1.3; }
.sport-nav-count { font-size: 0.72rem; opacity: 0.75; margin-top: 4px; }
.sport-nav-arrow { font-size: 0.75rem; opacity: 0.7; margin-top: 6px; }

/* ---- タブレット以上：グリッド表示に切り替え ---- */
@media (min-width: 700px) {
    .sport-nav-scroll-wrap {
        overflow-x: visible;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
    .sport-nav-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        min-width: unset;
    }
    .sport-nav-card {
        min-width: unset;
        flex-shrink: unset;
    }
}
@media (min-width: 1000px) {
    .sport-nav-grid { grid-template-columns: repeat(4, 1fr); }
}

/* もっと見るボタン */
.more-btn-wrap {
    text-align: center;
    margin-top: 32px;
}

.btn-more {
    display: inline-block;
    padding: 12px 40px;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.btn-more:hover {
    background: var(--color-secondary);
    color: #fff;
    text-decoration: none;
}

.no-results-text {
    text-align: center;
    color: var(--color-muted);
    padding: 40px 0;
}

/* タブレット以上で3列→4列 */
@media (min-width: 600px) {
    .sport-nav-grid { grid-template-columns: repeat(3, 1fr); }
    .sport-nav-icon  { font-size: 2.8rem; }
    .sport-nav-label { font-size: 1rem; }
}

@media (min-width: 900px) {
    .sport-nav-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========================================
   絞り込み表示・リセット
======================================== */

.archive-header { margin-bottom: 16px; }

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #FFFDE7;
    border-radius: var(--radius);
    border: 1px solid #FFF176;
    font-size: 0.875rem;
}

.active-filters-label {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.tag-keyword {
    background: #F3E5F5;
    color: #6A1B9A;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.78rem;
}

.filter-reset {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--color-muted);
    text-decoration: none;
    padding: 2px 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: background 0.2s;
}

.filter-reset:hover {
    background: #eee;
    text-decoration: none;
}

.result-meta {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 16px;
}

.result-meta strong {
    color: var(--color-primary);
    font-size: 1rem;
}

/* ========================================
   大会詳細ページ ナビゲーションバー
======================================== */

.single-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    gap: 8px;
    flex-wrap: wrap;
}

.single-nav-left {
    flex-shrink: 0;
}

.single-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--color-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-white);
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.btn-back:hover {
    background: #EEF3FB;
    border-color: var(--color-secondary);
    text-decoration: none;
}

.fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--color-muted);
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-white);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.fav-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fff5f5;
    text-decoration: none;
}

.fav-btn-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fav-view-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid #f0c0c0;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #c0392b;
    background: #fff8f8;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.fav-view-link:hover {
    background: #ffe4e4;
    border-color: #e74c3c;
    text-decoration: none;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--color-muted);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-white);
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-home:hover {
    background: #f5f5f5;
    text-decoration: none;
}

/* 申込ボタン上部 */
.entry-button-top {
    margin-bottom: 24px;
    text-align: center;
}

.deadline-note {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 6px;
    text-align: center;
}

/* テーブル内サブテキスト */
.info-sub {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* 地図リンク */
.map-link {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #1a73e8;
    border-radius: 6px;
    color: #1a73e8;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.map-link:hover {
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
}

/* PDF */
.pdf-download {
    margin: 20px 0;
}

.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px solid var(--color-secondary);
    border-radius: 6px;
    color: var(--color-secondary);
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

.btn-pdf:hover {
    background: var(--color-secondary);
    color: #fff;
    text-decoration: none;
}

/* 関連大会 */
.related-tournaments {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

/* モバイルでナビを調整 */
@media (max-width: 599px) {
    .single-nav {
        gap: 6px;
    }
    .btn-back {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .btn-home {
        display: none; /* スマホではハンバーガーメニューで代替 */
    }
    .fav-btn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .fav-view-link {
        font-size: 0.72rem;
        padding: 4px 9px;
    }
}

/* ========================================
   大会詳細ページ 検索窓
======================================== */

.single-search-bar {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    transition: box-shadow 0.2s;
}

/* sticky時はカスタマイザーのCSSで上書き */

.single-search-bar-inner {
    padding: 12px 16px;
}

/* single.phpのトグル検索バー */
.single-search-bar .search-bar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
}
.single-search-bar .search-filter-panel {
    display: none;
    padding: 12px 16px;
}
.single-search-bar .search-filter-panel.is-open {
    display: block;
}
.single-search-label {
    font-size: 0.78rem;
    font-weight: bold;
    color: var(--color-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.single-search-label {
    display: block;
    font-size: 0.78rem;
    font-weight: bold;
    color: var(--color-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 検索窓内のフォームをコンパクトに */
.single-search-bar .search-filter-form {
    box-shadow: none;
    padding: 0;
    background: transparent;
    margin-bottom: 0;
    gap: 8px;
}

@media (min-width: 600px) {
    .single-search-bar .search-filter-form {
        grid-template-columns: 2fr 1fr 1fr auto;
    }
    .single-search-bar .btn-search {
        grid-column: auto;
    }
}

/* ========================================
   件数バー + 検索折りたたみ
======================================== */

.result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
}

.result-bar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.875rem;
}

.result-count-label {
    color: var(--color-muted);
    font-size: 0.875rem;
}

.result-count-label strong {
    color: var(--color-primary);
    font-size: 1rem;
}

/* 絞り込みトグルボタン */
.search-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--color-secondary);
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.search-toggle-btn:hover {
    background: #EEF3FB;
    border-color: var(--color-secondary);
}

.search-toggle-btn[aria-expanded="true"] {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.search-toggle-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

/* 検索パネル（折りたたみ） */
.search-filter-panel {
    display: none;
    margin-bottom: 16px;
}

.search-filter-panel.is-open {
    display: block;
}

.search-filter-panel .search-filter-form {
    margin-bottom: 0;
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* 絞り込み中ボタンの状態 */
.search-toggle-btn.is-active {
    background: #FFF3E0;
    border-color: #E65100;
    color: #E65100;
}

/* ========================================
   大会詳細：タグリスト（チェックボックス系）
======================================== */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.tag-inline {
    display: inline-block;
    background: #F0F4FA;
    color: var(--color-secondary);
    border: 1px solid #C5D5EA;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: bold;
}

/* ========================================
   大会カード：ステータスバッジ・拡張情報
======================================== */

/* ステータスバー */
.card-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.82rem;
}

.card-date { color: var(--color-muted); }

/* ステータスバッジ */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: bold;
}

.badge-open     { background: #E8F5E9; color: #2E7D32; }
.badge-deadline { background: #FFF3E0; color: #E65100; }
.badge-closed   { background: #EEEEEE; color: #757575; }
.badge-ended    { background: #EEEEEE; color: #9E9E9E; }

/* 終了した大会カードを薄く */
.tournament-card.status-ended {
    opacity: 0.6;
}
.tournament-card.status-ended .card-title {
    color: var(--color-muted);
}

/* 試合形式バッジ */
.format-list { display: inline-flex; gap: 4px; }
.format-badge {
    display: inline-block;
    background: #E8EAF6;
    color: #3949AB;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* テキストカラー */
.text-danger { color: #C62828; font-weight: bold; }
.text-muted  { color: var(--color-muted); }

/* 検索フォーム：グリッド調整（項目が増えたので） */
@media (min-width: 600px) {
    .search-filter-form {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-item--keyword { grid-column: span 2; }
    .filter-item--btn     { grid-column: span 2; }
}

@media (min-width: 900px) {
    .search-filter-form {
        grid-template-columns: repeat(4, 1fr);
    }
    .filter-item--keyword { grid-column: span 2; }
    .filter-item--btn     { grid-column: span 4; }
    .btn-search           { width: auto; justify-self: start; padding: 10px 32px; }
}

/* ========================================
   大会登録フォーム
======================================== */
.reg-page-wrap    { max-width: 760px; margin: 0 auto; padding-bottom: 60px; }
.reg-page-header  { text-align: center; margin: 24px 0 28px; }
.reg-page-title   { font-size: 1.6rem; font-weight: 800; color: var(--color-primary); margin-bottom: 8px; }
.reg-page-lead    { color: var(--color-muted); line-height: 1.8; }

/* AIバナー */
.reg-ai-banner {
    display: flex; align-items: center; gap: 14px;
    background: #EEF2FF; border: 1.5px solid #C7D2FE;
    border-radius: 10px; padding: 14px 18px; margin-bottom: 24px;
}
.reg-ai-banner__icon { font-size: 1.8rem; flex-shrink: 0; }
.reg-ai-banner p  { margin: 4px 0 0; font-size: 0.82rem; color: var(--color-muted); }
.reg-ai-banner strong { color: var(--color-primary); font-size: 0.9rem; }

/* フォームセクション */
.pe-reg-form      { display: flex; flex-direction: column; gap: 0; }
.pe-reg-section   { background: #fff; border: 1px solid var(--color-border); border-radius: 10px; padding: 22px 24px; margin-bottom: 16px; }
.pe-reg-section__title { font-size: 1rem; font-weight: 700; color: var(--color-primary); margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid #F0F4FF; }

/* フィールド */
.pe-reg-field     { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.pe-reg-field:last-child { margin-bottom: 0; }
.pe-reg-field label { font-size: 0.85rem; font-weight: 600; color: var(--color-text); }
.pe-reg-field--required label::after { content: ' *'; color: #E53935; }
.pe-reg-field input[type="text"],
.pe-reg-field input[type="email"],
.pe-reg-field input[type="tel"],
.pe-reg-field input[type="url"],
.pe-reg-field input[type="number"],
.pe-reg-field input[type="date"],
.pe-reg-field select,
.pe-reg-field textarea {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: 6px; font-size: 0.9rem;
    background: #FAFBFF; color: var(--color-text);
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.pe-reg-field input:focus,
.pe-reg-field select:focus,
.pe-reg-field textarea:focus { border-color: var(--color-primary); outline: none; background: #fff; }
.pe-reg-field textarea { resize: vertical; }
.pe-field-note { font-size: 0.75rem; color: var(--color-muted); margin: 2px 0 0; }

/* 2カラム */
.pe-reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .pe-reg-row { grid-template-columns: 1fr; } }

/* サフィックス付き入力 */
.pe-input-suffix { display: flex; align-items: center; gap: 8px; }
.pe-input-suffix input { flex: 1; }
.pe-input-suffix span  { font-size: 0.85rem; color: var(--color-muted); white-space: nowrap; }

/* チェックボックスグループ */
.pe-check-group   { display: flex; flex-wrap: wrap; gap: 8px; }
.pe-check-hint    { font-size: 0.8rem; color: var(--color-muted); }
.pe-check-item    { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; padding: 6px 12px; background: #F4F6FB; border: 1px solid var(--color-border); border-radius: 20px; transition: background 0.15s; }
.pe-check-item:hover { background: #E8EEFF; }
.pe-check-item input { width: 14px; height: 14px; }
.pe-check-item--large { border-radius: 6px; padding: 10px 14px; }

/* エラー */
.pe-reg-errors { background: #FFF3F3; border: 1.5px solid #FFCDD2; border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; }
.pe-reg-errors ul { margin: 8px 0 0 16px; }
.pe-reg-errors li { font-size: 0.88rem; color: #C62828; margin-bottom: 4px; }

/* 送信ボタン */
.pe-reg-submit    { text-align: center; margin-top: 8px; }
.btn-reg-submit   {
    display: inline-block; padding: 16px 48px;
    background: var(--color-primary); color: #fff;
    font-size: 1rem; font-weight: 700; border: none;
    border-radius: 8px; cursor: pointer; transition: opacity 0.15s;
}
.btn-reg-submit:hover { opacity: 0.88; }
.pe-reg-note { font-size: 0.78rem; color: var(--color-muted); margin-top: 10px; }

/* 結果画面 */
.pe-reg-result    { text-align: center; padding: 60px 20px; }
.pe-reg-result__icon { font-size: 3rem; margin-bottom: 16px; }
.pe-reg-result h2 { font-size: 1.4rem; color: var(--color-primary); margin-bottom: 12px; }
.pe-reg-result p  { color: var(--color-muted); line-height: 1.8; margin-bottom: 24px; }
.pe-reg-result--rejected h2 { color: #C62828; }

/* 複数選択可ヒント */
.pe-multi-hint {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--color-muted);
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

/* ========================================
   主催者会員システム
======================================== */
.organizer-wrap { max-width:720px; margin:0 auto; padding-bottom:60px; }
.organizer-wrap--wide { max-width:900px; }

.organizer-card {
    background:#fff; border:1px solid var(--color-border);
    border-radius:12px; padding:32px; margin:24px 0;
    text-align:center;
}
.organizer-card h1 { font-size:1.5rem; color:var(--color-primary); margin-bottom:12px; }
.organizer-card--success { border-color:#4caf50; background:#f1f8e9; }
.organizer-card__icon { font-size:3rem; margin-bottom:16px; }
.organizer-lead { color:var(--color-muted); margin-bottom:20px; }

/* フォームフィールド */
.organizer-field { display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.organizer-field label { font-size:0.85rem; font-weight:600; }
.organizer-field--required label::after { content:' *'; color:#E53935; }
.organizer-field input[type="text"],
.organizer-field input[type="email"],
.organizer-field input[type="password"],
.organizer-field input[type="tel"] {
    padding:10px 12px; border:1.5px solid var(--color-border);
    border-radius:6px; font-size:0.9rem; width:100%; box-sizing:border-box;
    background:#FAFBFF; transition:border-color .15s;
}
.organizer-field input:focus { border-color:var(--color-primary); outline:none; }
.organizer-field-note { font-size:0.75rem; color:var(--color-muted); margin:2px 0 0; }
.organizer-check-item { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:0.85rem; }

.organizer-errors { background:#fff3f3; border:1.5px solid #ffcdd2; border-radius:8px; padding:12px 16px; margin-bottom:16px; }
.organizer-errors p { color:#c62828; margin:4px 0; }

.organizer-notice { border-radius:8px; padding:14px 16px; margin:16px 0; font-size:0.88rem; line-height:1.7; }
.organizer-notice--info    { background:#e8f0fe; border:1px solid #c5d8fb; }
.organizer-notice--success { background:#e8f5e9; border:1px solid #a5d6a7; }

.organizer-benefits { text-align:left; margin:20px 0; }
.organizer-benefits h3 { font-size:0.95rem; margin-bottom:10px; color:var(--color-primary); }
.organizer-benefits ul { list-style:none; padding:0; }
.organizer-benefits li { padding:4px 0; font-size:0.88rem; }

.organizer-submit { text-align:center; margin-top:20px; }
.organizer-login-link { text-align:center; margin-top:20px; font-size:0.85rem; color:var(--color-muted); }
.organizer-login-link a { color:var(--color-primary); font-weight:600; }

/* ダッシュボード */
.organizer-dash-header {
    display:flex; align-items:center; justify-content:space-between;
    gap:16px; background:#fff; border-radius:12px;
    padding:20px 24px; margin:24px 0; border:1px solid var(--color-border);
    flex-wrap:wrap;
}
.organizer-dash-profile { display:flex; align-items:center; gap:14px; }
.organizer-dash-avatar {
    width:52px; height:52px; border-radius:50%;
    background:var(--color-primary); color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-size:1.4rem; font-weight:700; flex-shrink:0;
}
.organizer-dash-profile h1 { font-size:1.3rem; margin:0 0 4px; }
.organizer-rank-badge { font-size:0.85rem; font-weight:600; }
.organizer-dash-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

.organizer-stats {
    display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:24px;
}
@media (max-width:600px) { .organizer-stats { grid-template-columns:repeat(2,1fr); } }
.organizer-stat { background:#fff; border-radius:10px; padding:16px; text-align:center; border:1px solid var(--color-border); }
.organizer-stat__num { font-size:1.8rem; font-weight:700; color:var(--color-primary); }
.organizer-stat__label { font-size:0.75rem; color:var(--color-muted); margin-top:4px; }

.organizer-section { background:#fff; border-radius:12px; padding:20px 24px; margin-bottom:16px; border:1px solid var(--color-border); }
.organizer-section h2 { font-size:1.05rem; font-weight:700; color:var(--color-primary); margin:0 0 16px; border-bottom:2px solid #f0f0f0; padding-bottom:10px; }

.organizer-tournament-list { display:flex; flex-direction:column; gap:8px; }
.organizer-tournament-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden; /* はみ出し防止 */
}
/* 上段：ステータスバッジ＋タイトル */
.organizer-tournament-item-top {
    display: flex;
    align-items: flex-start; /* 長いタイトルで上揃え */
    gap: 10px;
}
.organizer-tournament-status {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;        /* バッジ幅を固定 */
    margin-top: 2px;       /* タイトルと高さを合わせる */
}
.organizer-tournament-body {
    flex: 1;
    min-width: 0;          /* flexboxでoverflowを効かせる */
}
.organizer-tournament-title {
    font-size: 0.9rem;
    font-weight: 600;
    /* 折り返し表示（最大3行） */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-all;  /* 長い単語も折り返す */
    line-height: 1.5;
}
.organizer-tournament-title a { color:var(--color-text); text-decoration:none; }
.organizer-tournament-title a:hover { color:var(--color-primary); }
.organizer-tournament-meta {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 4px;
    word-break: break-all;
}
/* 下段：警告・スコア・アクションボタン */
.organizer-tournament-note {
    font-size: 0.78rem;
    color: var(--color-muted);
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    word-break: break-all;
}
.organizer-tournament-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.organizer-dup-warn { color:#e65100; margin-left:4px; cursor:help; }

.organizer-empty { text-align:center; padding:32px; color:var(--color-muted); }
.organizer-info-table { width:100%; border-collapse:collapse; }
.organizer-info-table th, .organizer-info-table td { padding:10px 12px; border-bottom:1px solid #f0f0f0; font-size:0.88rem; text-align:left; }
.organizer-info-table th { font-weight:600; color:var(--color-muted); width:30%; }

/* 会員登録促進UI */
.pe-choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:600px) { .pe-choice-grid { grid-template-columns:1fr; } }

.pe-choice-card {
    border:2px solid var(--color-border); border-radius:10px;
    padding:16px; cursor:pointer; transition:all .15s; position:relative;
    background:var(--color-background-primary);
}
.pe-choice-card:hover { border-color:var(--color-primary); }
.pe-choice-card.is-selected { border-color:var(--color-primary); background:#EEF2FF; }
.pe-choice-card--recommended { border-color:#F5A623; }
.pe-choice-card--recommended.is-selected { background:#FFF8E8; }
.pe-choice-card__badge {
    position:absolute; top:-10px; left:50%; transform:translateX(-50%);
    background:#F5A623; color:#1B3F8B; font-size:0.7rem; font-weight:700;
    padding:2px 12px; border-radius:20px;
}
.pe-choice-card__title { font-size:0.95rem; font-weight:700; margin-bottom:10px; }
.pe-choice-card__list { list-style:none; padding:0; margin:0; }
.pe-choice-card__list li { font-size:0.82rem; padding:3px 0; }
.pe-choice-radio { position:absolute; opacity:0; }

.pe-reg-section--choice { border-color:var(--color-primary); }

.pe-organizer-logged-in {
    display:flex; align-items:center; gap:10px;
    background:#EEF2FF; border-radius:8px; padding:12px 16px;
    font-size:0.88rem;
}
.pe-organizer-rank-badge { font-weight:700; color:var(--color-primary); }
.pe-dash-link { margin-left:auto; font-size:0.82rem; color:var(--color-primary); }

/* 主催者情報自動入力表示 */
.pe-organizer-auto-fill {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #E8F5E9;
    border: 1.5px solid #A5D6A7;
    border-radius: 8px;
    padding: 14px 16px;
}
.pe-organizer-auto-fill__icon { font-size: 1.4rem; flex-shrink: 0; }
.pe-organizer-auto-fill__name  { font-weight: 700; font-size: 0.95rem; }
.pe-organizer-auto-fill__email { font-size: 0.85rem; color: var(--color-muted); }
.pe-organizer-auto-fill__phone { font-size: 0.85rem; color: var(--color-muted); }

/* ========================================
   確認モーダル
======================================== */
.pe-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;  /* 上寄せにしてスクロール余白を確保 */
    justify-content: center;
    padding: 60px 16px 24px;  /* 上部に余白（管理バー分も考慮） */
    overflow-y: auto;          /* モーダル全体がスクロール可能 */
    -webkit-overflow-scrolling: touch;
}
.pe-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: -1;              /* モーダルより後ろ */
}
.pe-modal-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    animation: modalIn .2s ease;
    margin: auto;              /* 縦中央寄せ */
    /* 内部スクロール不要：モーダル全体がスクロールする */
}
@keyframes modalIn {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}
.pe-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.pe-modal-header h2 { margin:0; font-size:1.1rem; color:var(--color-primary); }
.pe-modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.1rem; color: var(--color-muted);
    padding: 4px 8px; border-radius: 4px;
    transition: background .15s;
}
.pe-modal-close:hover { background: #f0f0f0; }
.pe-modal-body {
    padding: 16px 22px;
    flex: 1;
    /* スクロールはpe-modal全体で行うため不要 */
}
.pe-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 22px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* 確認テーブル */
.pe-confirm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 16px;
}
.pe-confirm-table th,
.pe-confirm-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: top;
}
.pe-confirm-table th {
    width: 35%;
    font-weight: 600;
    color: var(--color-muted);
    white-space: nowrap;
}
.pe-confirm-desc {
    background: #F8F9FF;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
    font-size: 0.88rem;
}
.pe-confirm-desc strong { display:block; margin-bottom:4px; }
.pe-confirm-desc p { margin:0; line-height:1.6; }

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text);
    transition: background .15s;
}
.btn-secondary:hover { background: #f5f5f5; }

/* 編集ページ・アクションボタン */
.organizer-edit-nav { margin:20px 0 0; }
.organizer-edit-nav a { color:var(--color-primary); font-size:0.88rem; }

.organizer-tournament-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.organizer-action-btn {
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text);
    transition: background .15s;
}
.organizer-action-btn:hover { background: #f5f5f5; text-decoration: none; }
.organizer-action-btn--delete { color: #c62828; border-color: #ffcdd2; }
.organizer-action-btn--delete:hover { background: #fff3f3; }

/* ヘッダー：ログイン状態 */
.header-login-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    color: var(--color-primary);
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 700;
    background: #fff;
    border: none;
    line-height: 1;
    transition: opacity .15s;
}
.header-login-link:hover {
    opacity: 0.85;
    text-decoration: none;
    color: var(--color-primary);
}
@media (min-width: 600px) {
    .header-login-link {
        font-size: 0.82rem;
        padding: 7px 14px;
    }
}
.header-organizer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #fff;
    padding: 5px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.5);
    transition: background .15s;
    white-space: nowrap;
    line-height: 1;
}
.header-organizer-link:hover {
    background: rgba(255,255,255,0.25);
    text-decoration: none;
    color: #fff;
}
.header-organizer-avatar {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}
.header-organizer-name {
    font-size: 0.65rem;
    font-weight: 600;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (min-width: 600px) {
    .header-organizer-link { padding: 7px 12px; }
    .header-organizer-avatar { width: 22px; height: 22px; font-size: 0.78rem; }
    .header-organizer-name { font-size: 0.78rem; max-width: 100px; }
}

/* CTA テキスト切り替え */
.cta-short { display: none; }
.cta-long  { display: inline; }
@media (max-width: 480px) {
    .cta-short { display: inline; }
    .cta-long  { display: none; }
}

/* スマホでロゴを少し小さく */
@media (max-width: 480px) {
    .logo-text { font-size: 1.1rem; }
}

/* ========================================
   登録完了画面
======================================== */
.pe-complete {
    max-width: 640px;
    margin: 0 auto;
    padding: 8px 0 40px;
}

.pe-complete-header {
    text-align: center;
    padding: 32px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.pe-complete-header--published { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); border: 2px solid #81C784; }
.pe-complete-header--pending   { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); border: 2px solid #64B5F6; }
.pe-complete-header--rejected  { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border: 2px solid #FFB74D; }

.pe-complete-icon { font-size: 3rem; margin-bottom: 12px; }
.pe-complete-header h2 { font-size: 1.4rem; margin: 0 0 8px; color: var(--color-primary); }
.pe-complete-header p  { margin: 0 0 14px; color: #555; font-size: 0.92rem; line-height: 1.7; }

.pe-complete-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}
.pe-complete-status--published { background: #2E7D32; color: #fff; }
.pe-complete-status--pending   { background: #1565C0; color: #fff; }
.pe-complete-status__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 登録内容カード */
.pe-complete-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.pe-complete-card h3 {
    font-size: 0.95rem;
    margin: 0 0 12px;
    color: var(--color-primary);
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}
.pe-complete-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.pe-complete-table th,
.pe-complete-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
    vertical-align: top;
}
.pe-complete-table th {
    width: 30%;
    color: var(--color-muted);
    font-weight: 600;
    white-space: nowrap;
}
.pe-complete-table td a { color: var(--color-primary); word-break: break-all; }

/* アクションカード */
.pe-complete-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.pe-complete-action-card {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    align-items: flex-start;
}
.pe-complete-action-card--primary {
    border-color: var(--color-primary);
    background: #F0F4FF;
}
.pe-complete-action-card--recommend {
    border-color: var(--color-accent);
    background: #FFFBF0;
}
.pe-complete-action-icon { font-size: 1.6rem; flex-shrink: 0; }
.pe-complete-action-card strong { display: block; font-size: 0.95rem; margin-bottom: 4px; color: var(--color-primary); }
.pe-complete-action-card p { margin: 0; font-size: 0.85rem; color: #555; line-height: 1.6; }

/* 注意事項 */
.pe-complete-note {
    background: #F8F9FF;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.8;
}
.pe-complete-note p { margin: 0 0 4px; }
.pe-complete-note p:last-child { margin: 0; }
.pe-complete-note a { color: var(--color-primary); }

/* 地域ドロップダウンフィルター */
.filter-item--regions { position: relative; }

.filter-region-dropdown { position: relative; }

.filter-region-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text);
    text-align: left;
    transition: border-color .15s;
}
.filter-region-trigger:hover { border-color: var(--color-primary); }
.filter-region-trigger[aria-expanded="true"] {
    border-color: var(--color-primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.filter-region-arrow { transition: transform .2s; font-size: 0.7rem; }
.filter-region-trigger[aria-expanded="true"] .filter-region-arrow { transform: rotate(180deg); }

.filter-region-panel {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid var(--color-primary);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 12px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.filter-region-panel[hidden] { display: none; }

.filter-region-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-height: 240px;
    overflow-y: auto;
}
@media (max-width: 600px) {
    .filter-region-grid { grid-template-columns: repeat(3, 1fr); }
}

.filter-region-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all .12s;
    background: #fafafa;
    user-select: none;
}
.filter-region-item input[type="checkbox"] { display: none; }
.filter-region-item.is-checked {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.filter-region-item:hover { border-color: var(--color-primary); }
.filter-region-item.is-checked:hover { opacity: 0.85; }

.filter-region-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.filter-region-clear {
    font-size: 0.78rem;
    color: var(--color-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
}
.filter-region-clear:hover { color: var(--color-primary); }
.filter-region-apply {
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
}
.filter-region-apply:hover { opacity: 0.85; }

/* ================================================
   電話番号 公開設定ノート
   ================================================ */
.organizer-phone-note {
    margin-top: 8px;
    padding: 8px 12px;
    background: #E3F2FD;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #1565C0;
    line-height: 1.5;
}

/* ================================================
   重複警告（詳細版）
   ================================================ */
.organizer-dup-warning {
    background: #FFF3E0;
    border: 1.5px solid #FF8F00;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.organizer-dup-warning__head {
    font-weight: 700;
    color: #E65100;
    font-size: 0.88rem;
    margin-bottom: 6px;
}
.organizer-dup-warning__detail {
    background: #fff;
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 6px;
}
.organizer-dup-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f5e0c0;
    font-size: 0.82rem;
}
.organizer-dup-item:last-child { border-bottom: none; }
.organizer-dup-item__title {
    font-weight: 600;
    color: #4e342e;
}
.organizer-dup-item__meta {
    color: #7c4a00;
}
.organizer-dup-item__link {
    margin-left: auto;
    font-size: 0.78rem;
    color: #1B3F8B;
    text-decoration: underline;
}

/* ================================================
   スコアブロック・スコア履歴
   ================================================ */
.organizer-score-block {
    background: #F9F9F9;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 6px;
}
.organizer-score-history {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.organizer-score-chip {
    font-weight: 700;
    font-size: 0.85rem;
}
.organizer-score-arrow {
    color: #aaa;
    font-size: 0.85rem;
}

/* ================================================
   スコア改善ガイド
   ================================================ */
.organizer-score-guide {
    background: #EDE7F6;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
}
.organizer-score-guide__head {
    font-size: 0.82rem;
    font-weight: 700;
    color: #4527A0;
    margin-bottom: 6px;
}
.organizer-score-guide__list {
    margin: 0;
    padding-left: 18px;
    font-size: 0.8rem;
    color: #4527A0;
    line-height: 1.7;
}

/* ================================================
   登録却下後のインライン通知（フォーム上部）
   ================================================ */
.pe-reg-rejected-notice {
    background: #FFF8E1;
    border: 1.5px solid #FFB300;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.pe-reg-rejected-notice__head {
    font-weight: 700;
    color: #E65100;
    font-size: 1rem;
    margin-bottom: 6px;
}

/* ================================================
   Googleカレンダー追加ボタン
   ================================================ */
.gcal-wrap {
    margin: 8px 0 16px;
}
.btn-gcal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #fff;
    border: 1.5px solid #4285F4;
    color: #4285F4;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.btn-gcal:hover {
    background: #4285F4;
    color: #fff;
    text-decoration: none;
}

/* ================================================
   SNSシェアボタン
   ================================================ */
.sns-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 24px;
    flex-wrap: wrap;
}
.sns-share-label {
    font-size: 0.82rem;
    color: #999;
    white-space: nowrap;
}
.sns-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}
.sns-btn:hover { opacity: 0.82; text-decoration: none; }
.sns-btn--x    { background: #000; color: #fff; }
.sns-btn--line { background: #06C755; color: #fff; }

/* ================================================
   問い合わせフォーム
   ================================================ */
.tournament-contact {
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}
.tournament-contact h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}
.contact-form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.contact-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.88rem;
    background: #fff;
}
.contact-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.88rem;
    resize: vertical;
    margin-bottom: 8px;
    display: block;
    background: #fff;
}
@media (max-width: 599px) {
    .contact-form-row { flex-direction: column; }
}

/* ================================================
   主催者バッジ（認定・プレミアム）
   ================================================ */
.org-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 4px;
    white-space: nowrap;
}
.org-badge--certified {
    background: #e8f4fd;
    color: #1565C0;
    border: 1px solid #90CAF9;
}
.org-badge--premium {
    background: #fff8e1;
    color: #E65100;
    border: 1px solid #FFB74D;
}

/* ==============================================
   新着通知バナー（トップ・一覧ページ）
   ============================================== */
.notify-banner {
    background: linear-gradient(135deg, #1B3F8B 0%, #1565C0 60%, #0D47A1 100%);
    color: #fff;
    padding: 48px 0;
    margin-top: 48px;
}
.notify-banner__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.notify-banner__text {
    flex: 1 1 280px;
}
.notify-banner__lead {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 8px;
}
.notify-banner__title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
}
.notify-banner__note {
    font-size: 0.82rem;
    opacity: 0.8;
    line-height: 1.5;
}
.notify-banner__form-wrap {
    flex: 1 1 320px;
}
.notify-form__row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.notify-form__select {
    flex: 1 1 120px;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    outline: none;
    cursor: pointer;
    min-width: 0;
}
.notify-form__select option {
    background: #1B3F8B;
    color: #fff;
}
.notify-form__row--submit {
    flex-wrap: nowrap;
}
.notify-form__email {
    flex: 1 1 0;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    outline: none;
    color: #1A1A2E;
    min-width: 0;
}
.notify-form__btn {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.notify-form__btn:hover { background: #d4891a; }
.notify-success {
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
@media (max-width: 599px) {
    .notify-banner { padding: 32px 0; }
    .notify-banner__title { font-size: 1.2rem; }
    .notify-banner__inner { gap: 24px; }
    .notify-form__row--submit { flex-wrap: wrap; }
    .notify-form__email { width: 100%; }
    .notify-form__btn { width: 100%; justify-content: center; }
}
.sp-only { display: none; }
@media (max-width: 599px) { .sp-only { display: inline; } }

/* ========================================
   姉妹サイトバナー（ぐぐスポ！）
======================================== */
.sister-banner {
    background: linear-gradient(135deg, #0d2137 0%, #1a3a6b 100%);
    padding: 28px 16px;
    margin-top: 8px;
}
.sister-banner__inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.sister-banner__text { flex: 1; min-width: 200px; }
.sister-banner__label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 4px;
}
.sister-banner__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
}
.sister-banner__desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin: 0;
}
.sister-banner__btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--color-accent, #f5a623);
    color: #1a2a4a;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 24px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s;
    flex-shrink: 0;
}
.sister-banner__btn:hover { opacity: .85; color: #1a2a4a; }
@media (max-width: 599px) {
    .sister-banner__inner { flex-direction: column; align-items: flex-start; }
    .sister-banner__btn { align-self: flex-end; }
}
