@charset "utf-8";

/* =========================================================================
   座王DB  score_style3.css  v4.0  黒×黄テーマ（公式座王カラー）
   ※ 元のオレンジテーマは score_style2.css に保存済み
   ========================================================================= */

/* =========================================
   CSS 変数
   ========================================= */
:root {
    /* メインカラー：黒×黄（公式座王カラー） */
    --primary:        #F5C400;   /* 鮮やかな黄色 */
    --primary-dark:   #C9A000;   /* ホバー・アクティブ用 */
    --primary-light:  #FFFAE0;   /* テーブルヘッダ・メニュー地 */

    /* テキスト */
    --text:           #1A1A1A;   /* ほぼ黒 */
    --text-sub:       #555555;   /* サブ・補足テキスト */

    /* 背景・ボーダー */
    --bg:             #FFFFFF;
    --bg-page:        #FFFDF0;   /* ページ地：ほんのり黄みがかった白 */
    --border:         #C9A000;   /* ゴールドボーダー */
    --border-light:   #E0D080;   /* 薄めのボーダー */

    /* 勝敗カラー：PHPのbgcolorと調和する濃さ */
    --win-bg:         #FFD6D6;   /* 勝ち行：はっきりしたピンク */
    --lose-bg:        #D6E8FF;   /* 負け行：はっきりした水色 */

    --container-width: 800px;
}

/* =========================================
   リセット・基本
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Meiryo", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    font-size: 1.0em;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-page);
    margin: 0;
    padding: 0;
}

a {
    color: #0055AA;
    text-decoration: underline;
}
a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* =========================================
   レイアウト
   ========================================= */
#container {
    max-width: var(--container-width);
    margin: 0 auto;
    background: var(--bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

#main {
    width: 100%;
    padding: 0 10px;
}

/* =========================================
   見出し
   ========================================= */
h1 {
    font-size: 1.2em;
    border-bottom: 3px solid var(--primary-dark);
    padding: 4px 0;
    margin: 12px 0;
    display: inline-block;
}

h2 {
    font-size: 1.2em;
    font-weight: bold;
    background: var(--primary-light);
    border-left: 6px solid var(--primary-dark);
    padding: 6px 10px;
    margin: 18px 0 8px;
}

h3 {
    font-size: 1.05em;
    font-weight: bold;
    border-bottom: 2px solid var(--primary-dark);
    padding-bottom: 3px;
    margin: 14px 0 6px;
}

/* =========================================
   ナビゲーションメニュー（#menu）
   ========================================= */
#menu {
    padding: 6px 0;
    margin-bottom: 8px;
}

#menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

#menu ul li {
    display: block;
}

#menu ul li a {
    display: block;
    background: var(--primary-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 5px 12px;
    font-weight: bold;
    font-size: 0.92em;
    text-decoration: none;
    white-space: nowrap;
}

#menu ul li a:hover {
    background: var(--primary);
    color: #1A1A1A;
    border-color: var(--primary-dark);
}

#menu ul li.present a {
    background: var(--primary);
    color: #1A1A1A;
    border-color: var(--primary-dark);
}

/* =========================================
   テーブル共通
   ========================================= */
table {
    border-collapse: separate;
    border-spacing: 0;
}

/* =========================================
   round_table（全ページ共通の主テーブル）
   ========================================= */
table.round_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* 全行のth:last-childに右ボーダー（角丸は別で制御） */
table.round_table th:last-child {
    border-right: 1px solid var(--border);
}

/* 角丸は最初の行のみ */
table.round_table tr:first-child th:first-child {
    border-radius: 5px 0 0 0;
}
table.round_table tr:first-child th:last-child {
    border-radius: 0 5px 0 0;
}
/* 最初の行にthが1つだけ（colspanで全列スパン）の場合は両上角を丸く */
table.round_table tr:first-child th:only-child {
    border-radius: 5px 5px 0 0;
}

table.round_table th {
    text-align: center;
    background: var(--primary-light);
    color: var(--text);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8px 4px;
    font-weight: bold;
}

table.round_table td {
    text-align: center;
    border-left: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-top: none;
    padding: 8px 4px;
}

table.round_table td:last-child {
    border-right: 1px solid var(--border-light);
}

table.round_table tr:last-child td:first-child {
    border-radius: 0 0 0 5px;
}
table.round_table tr:last-child td:last-child {
    border-radius: 0 0 5px 0;
}
/* 最終行にtdが1つだけ（colspanで全列スパン）の場合は両下角を丸く */
table.round_table tr:last-child td:only-child {
    border-radius: 0 0 5px 5px;
}
/* rowspanで左列を占める場合の左下コーナー */
table.round_table td.rowspan-corner-bl {
    border-radius: 0 0 0 5px;
}
/* rowspanが左列を占めているため最終行の最初のtdは角丸不要 */
table.round_table tr.no-corner-bl td:first-child {
    border-radius: 0;
}
/* rowspanで右列を占める場合の右下コーナー */
/* border-leftは左側tdのright-borderと重複しないよう削除 */
table.round_table td.rowspan-corner-br {
    border-radius: 0 0 5px 0;
    border-left: none;
}
/* rowspanの隣（左側）のtdに右ボーダーを補完 */
table.round_table td.rowspan-left-border {
    border-right: 1px solid var(--border-light);
}
/* rowspanが右列を占める場合、最終行td:only-childの右下角丸は不要 */
table.round_table tr.no-corner-br td:only-child {
    border-radius: 0 0 0 5px;
}

/* アクティブなソートキー列 */
table.round_table th.active {
    background: #FFF0A0;
}

/* グループ分け用の強調ボーダー */
table.round_table th.border_f {
    border-right: 2px solid var(--border);
}
table.round_table th.border_b {
    border-bottom: 3px solid var(--border);
}
table.round_table td.border_f {
    border-right: 2px solid var(--border);
}
table.round_table td.players {
    text-align: left;
    padding-left: 6px;
}
table.round_table tr.border_top td {
    border-top: 2px solid var(--border);
}
table.round_table tr.border_btm th {
    border-bottom: 3px solid var(--border);
}

/* ---- 勝敗の行カラー ---- */
table.round_table tr.bg_win td {
    background: var(--win-bg);
}
table.round_table tr.bg_lose td {
    background: var(--lose-bg);
}

/* =========================================
   折りたたみセレクター（details/summary）
   ========================================= */
.selector-details {
    margin: 8px 0;
    border: 3px solid #C9A000;
    border-radius: 4px;
    overflow: hidden;
}

.selector-details summary {
    padding: 10px 14px;
    cursor: pointer;
    background: #F5C400;
    color: #1A1A1A;
    font-size: 0.95em;
    font-weight: bold;
    user-select: none;
    list-style: none;
}

.selector-details summary::-webkit-details-marker {
    display: none;
}

.selector-details summary::after {
    content: "　▼";
    font-size: 0.9em;
}

.selector-details[open] summary::after {
    content: "　▲";
}

.selector-details[open] summary {
    border-bottom: 2px solid #C9A000;
}

.selector-details .select-btns {
    padding: 8px;
    background: #fff;
}

/* =========================================
   セレクトボタン群（ランキング種別・ジャンル選択）
   ========================================= */
.select-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
}

.select-btn {
    display: inline-block;
    background: var(--primary-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 0.92em;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.select-btn:hover {
    background: var(--primary);
    color: #1A1A1A;
    border-color: var(--primary-dark);
}

.select-btn--active {
    background: var(--primary);
    color: #1A1A1A;
    border-color: var(--primary-dark);
}

/* =========================================
   ボタンリンク
   ========================================= */
a.buttonLink {
    display: inline-block;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 14px;
    color: var(--text);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}
a.buttonLink:hover {
    background: var(--primary);
    color: #1A1A1A;
    border-color: var(--primary-dark);
}

/* =========================================
   ユーティリティ
   ========================================= */
.num_area {
    text-align: right;
}

.EntryRow p {
    float: left;
    margin-left: 10px;
}

.clearFloat {
    clear: both;
}

.hideArea {
    display: none;
}

.recordlist,
.summarylist,
.resultlist {
    margin-top: 32px;
}

/* =========================================
   管理画面（entry / update）
   ========================================= */
#entryslip {
    margin-top: 20px;
}

#entryslip td:nth-child(5),
#entry    td:nth-child(5) { text-align: right; width: 50px; }
#entryslip td:nth-child(6),
#entry    td:nth-child(6) { text-align: right; width: 50px; }
#entryslip td:nth-child(7),
#entry    td:nth-child(7) { text-align: right; width: 80px; }

#entry, #update {
    border: 1px solid var(--border);
    padding: 20px 5px;
}

#entry {
    background: #FFFFF0;
}

#update {
    background: #EEF5EE;
}

#entry label, #update label {
    display: inline-block;
}

#entry h2, #update h2 {
    padding: 0;
    margin: 0 0 10px;
    font-weight: normal;
}

.entrylabel {
    display: inline-block;
}

/* =========================================
   放送回別一覧：1放送ごとのラッパー
   ========================================= */
.broad-item {
    margin-bottom: 0.6em;   /* テーブル間の隙間（約0.2行分） */
}

/* =========================================
   個人別一覧：かな行ごとのセクション
   ========================================= */
.kana-section {
    margin-bottom: 0.6em;   /* テーブル間の隙間 */
}

/* =========================================
   PR表示エリア
   ========================================= */
.pr-area {
    display: block;
    line-height: 1.0;
    margin: 4px 0;
}

.pr-area a {
    display: block;
    margin-bottom: 0.35em;   /* リンク間の隙間（約0.2行分） */
}

.pr-area br {
    display: none;   /* BRタグを消す */
}

.pr-area img {
    display: block;
    width: 0;
    height: 0;   /* トラッキングピクセルの行ボックスを消す */
}

/* =========================================
   レスポンシブ（スマホ）
   ========================================= */
/* Radar table row height control (desktop only) */
.radar-stat-cell {
    height: 3em;
    vertical-align: middle;
}

@media (min-width: 601px) {
    table.round_table.radar-table tr.radar-axis-label-row > th {
        height: 3.2em;
        line-height: 1.2;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    table.round_table.radar-table tr.radar-axis-value-row > td.radar-stat-cell {
        height: 6.4em;
        line-height: 1.3;
        white-space: normal;
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/* Animation controls */
.anim-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 2px;
    flex-wrap: wrap;
}
.anim-controls button {
    background: var(--primary);
    color: #1A1A1A;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
.anim-controls button:hover {
    background: var(--primary-dark);
}
.anim-controls input[type=range] {
    flex: 1;
    min-width: 80px;
    accent-color: var(--primary);
}
.anim-controls span {
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-sub);
}
@media (max-width: 600px) {
    table.round_table th,
    table.round_table td {
        padding: 5px 2px;
        font-size: 0.87em;
    }

    #menu ul li a {
        padding: 4px 8px;
        font-size: 0.85em;
    }

    .selector-details summary {
        padding: 12px 12px;   /* モバイル: タップ領域を大きく */
    }

    .radar-stat-cell {
        height: 4em;
    }
}
