/* =============================================
   ranking_system_2026/customer/css/style.css
   顧客向け閲覧専用スタイル（スマホ対応）
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

/* ── ヘッダー ── */
.c-header {
    background: #B2DD3E;
    color: #1a3a5c;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.c-header-inner {
    max-width: 800px;
    margin: 0 auto;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 0;
    padding: 8px 0;
}
.c-header .site-title {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
}
.c-header .login-info {
    font-size: 12px;
    color: #1a3a5c;
}
.c-header .logout-btn {
    font-size: 12px;
    color: #1a3a5c;
    text-decoration: none;
    border: 1px solid #1a3a5c;
    padding: 4px 10px;
    border-radius: 4px;
    margin-left: 10px;
}
.c-header .logout-btn:hover { background: rgba(26,58,92,.1); }

/* 画面幅が狭い場合、タイトル行とアカウント情報行を2段に分けて崩れを防ぐ */
@media (max-width: 400px) {
    .c-header .site-title { font-size: 14px; }
    .c-header .login-info { font-size: 11px; }
    .c-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── ナビ ── */
.c-nav {
    position: relative;
    background: #C6E873;
    overflow-x: auto;
    white-space: nowrap;
}
/* 横スクロールで隠れている項目があることを示すフェード */
.c-nav::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(to right, rgba(198,232,115,0), rgba(198,232,115,.95));
    pointer-events: none;
}
.c-nav-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
}
.c-nav a {
    display: inline-block;
    padding: 10px 18px;
    color: #1a3a5c;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 3px solid transparent;
    transition: all .15s;
}
.c-nav a:hover, .c-nav a.active {
    color: #1a3a5c;
    font-weight: bold;
    border-bottom-color: #1a3a5c;
    background: rgba(26,58,92,.08);
}

/* ── メインコンテンツ ── */
.c-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

/* ── カード ── */
.c-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 18px 16px;
    margin-bottom: 16px;
}
.c-card-title {
    font-size: 15px;
    font-weight: bold;
    color: #1a3a5c;
    border-left: 4px solid #2d6a9f;
    padding-left: 10px;
    margin-bottom: 14px;
}

/* ── テーブル ── */
.c-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.c-table th {
    background: #B2DD3E;
    color: #1a3a5c;
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
}
.c-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
}
.c-table tr:nth-child(even) td { background: #f7f9fc; }

/* スクロール可能なテーブルラッパー */
.c-table-wrap { overflow-x: auto; }

/* ── 着順バッジ ── */
.rank-badge {
    display: inline-block;
    width: 26px; height: 26px;
    line-height: 26px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
}
.rank-1 { background: #ffd700; color: #333; }
.rank-2 { background: #c0c0c0; color: #333; }
.rank-3 { background: #cd7f32; color: #fff; }
.rank-4 { background: #e8edf2; color: #555; }

/* ── スコア色 ── */
.score-plus  { color: #28a745; font-weight: bold; }
.score-minus { color: #dc3545; font-weight: bold; }

/* ── フォーム ── */
.c-form-group {
    margin-bottom: 14px;
}
.c-form-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}
.c-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}
.c-form-group input:focus {
    outline: none;
    border-color: #2d6a9f;
    box-shadow: 0 0 0 2px rgba(45,106,159,.15);
}

/* ── ボタン ── */
.c-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #B2DD3E;
    color: #1a3a5c;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity .15s;
}
.c-btn:hover { opacity: .85; }
.c-btn-sm {
    display: inline-block;
    padding: 5px 14px;
    background: #eef3f9;
    color: #2d6a9f;
    border: 1px solid #c5d8ee;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
}

/* ── アラート ── */
.c-alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
}
.c-alert-danger  { background: #fde8ea; color: #842029; border: 1px solid #f5c2c7; }
.c-alert-info    { background: #cff4fc; color: #055160; border: 1px solid #b6effb; }
.c-alert-success { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }

/* ── ログイン画面 ── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #B2DD3E;
}
.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.login-box .login-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #B2DD3E;
    margin-bottom: 6px;
}
.login-box .login-sub {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-bottom: 24px;
}

/* ── プロフィールボックス ── */
.profile-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f7f9fc;
    border-radius: 8px;
    border: 1px solid #e0e8f0;
    margin-bottom: 16px;
}
.profile-icon {
    font-size: 36px;
    flex-shrink: 0;
}
.profile-name {
    font-size: 18px;
    font-weight: bold;
    color: #1a3a5c;
}
.profile-sub { font-size: 12px; color: #999; margin-top: 2px; }

/* ── 統計グリッド ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.stat-box {
    background: #f7f9fc;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid #e0e8f0;
}
.stat-box .s-label { font-size: 11px; color: #888; margin-bottom: 4px; }
.stat-box .s-value { font-size: 20px; font-weight: bold; color: #1a3a5c; }

/* ── フッター ── */
.c-footer {
    text-align: center;
    padding: 20px 16px;
    color: #aaa;
    font-size: 11px;
}

/* ── スマホ向け調整 ── */
@media (max-width: 480px) {
    .c-main { padding: 12px; }
    .c-card { padding: 14px 12px; }
    .c-table th, .c-table td { padding: 7px 8px; font-size: 12px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
