@charset "UTF-8";

/* =========================================
   ベーススタイル
   ========================================= */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    margin: 0;
    padding-bottom: 50px;
    -webkit-font-smoothing: antialiased;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
a {
    color: #333;
    text-decoration: none;
    transition: 0.3s;
}
a:hover {
    text-decoration: none;
}

/* =========================================
   ナビゲーションメニュー
   ========================================= */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 10px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    background: #f8f9fa;
    border: 1px solid transparent;
    color: #555;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 64px;
    box-sizing: border-box; 
}
.nav-link:hover {
    transform: translateY(-2px);
    background: #e9eff5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.nav-link.ranking { color: #e91e63; background: #fff0f5; border: 1px solid #ffc1e3; }
.nav-link.ranking:hover { background: #e91e63; color: white; border-color:#e91e63; }
.nav-link.mypage { color: #ff9800; background: #fff8e1; border: 1px solid #ffecb3; }
.nav-link.mypage:hover { background: #ff9800; color: white; border-color:#ff9800; }
.nav-link.request { color: #009688; background: #e0f2f1; border: 1px solid #b2dfdb; }
.nav-link.request:hover { background: #009688; color: white; border-color:#009688; }

/* =========================================
   検索エリア & タブ
   ========================================= */
.search-area {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    position: -webkit-sticky;
    position: sticky;
    top: 10px;
    z-index: 90;
    border: 1px solid #f0f0f0;
}
.search-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tab-btn { 
    padding: 6px 14px; 
    background: #f0f0f0; 
    border: none; 
    border-radius: 20px; 
    cursor: pointer; 
    color: #666; 
    font-size: 13px;
    transition: 0.2s;
}
.tab-btn:hover { background: #e0e0e0; }
.tab-btn.active { background: #333; color: white; }

.input-group { 
    display: flex; 
    gap: 8px; 
    flex-wrap: nowrap;
    align-items: center; 
}
.sort-select { 
    padding: 12px 30px 12px 10px;
    font-size: 14px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    background: #fff; 
    color: #555; 
    cursor: pointer;
    max-width: 140px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    appearance: none; 
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}
.search-input { 
    flex-grow: 1; 
    min-width: 0;
    padding: 12px; 
    font-size: 16px; 
    border: 2px solid #eee; 
    border-radius: 8px; 
    outline: none; 
    transition: 0.3s;
}
.search-input:focus { border-color: #e91e63; }
.search-btn { 
    padding: 0 20px; 
    background-color: #e91e63; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-size: 15px; 
    cursor: pointer; 
    font-weight: bold; 
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
}
.search-btn:hover { background-color: #c2185b; }

/* =========================================
   カード共通 (ランキング・ピックアップ)
   ========================================= */
.today-pickup, .daily-ranking, .weekly-ranking {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
    border: 2px solid #ffeb3b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
}
.daily-ranking, .weekly-ranking { border-color: #ff9800; background: #fff8e1; }
.pickup-title-row { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 10px; }
.pickup-text { font-size: 18px; font-weight: bold; color: #e91e63; line-height: 1.3; }
.pickup-subtext { font-size: 12px; color: #888; display: block; font-weight: normal; margin-top: 4px; }
.pickup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.pickup-item { background: #fff9f9; border: 1px solid #ffc1d6; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: 0.2s; position: relative; }
.pickup-item:hover { background: #fff0f5; transform: scale(1.02); }
.p-name { font-weight: bold; font-size: 14px; color: #333; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-work { font-size: 11px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal-wrapper { position: relative; cursor: pointer; transition: 0.2s; }
.cal-icon { background: #fff; border: 2px solid #e91e63; border-radius: 8px; width: 60px; height: 65px; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.cal-month { background: #e91e63; color: white; width: 100%; font-size: 12px; font-weight: bold; padding: 2px 0; }
.cal-day { font-size: 28px; font-weight: bold; color: #333; line-height: 1.2; }
.cal-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; }
.rank-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: #fff; border-radius: 50%; border: 2px solid #ff9800; box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.p-rank { position: absolute; top: -5px; right: -5px; width: 24px; height: 24px; background: #9e9e9e; color: white; border-radius: 50%; font-size: 12px; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

.rank-1 { background: #e6b422; color: #fff !important; transform: scale(1.1); z-index: 2; } 
.rank-2 { background: #b0c4de; color: #fff !important; }
.rank-3 { background: #cd7f32; color: #fff !important; }

/* =========================================
   キャラクター一覧 (カード型)
   ========================================= */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.char-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid #eee; transition: 0.2s; position: relative; }
.char-card:hover { transform: translateY(-5px); box-shadow: 0 12px 20px rgba(0,0,0,0.1); }

.char-card .card-header { 
    color: white; padding: 6px 15px; font-size: 12px; 
    display: flex; justify-content: flex-end; font-weight: bold; 
}
.char-card .card-body { padding: 18px; }

.header-female { background-color: #e91e63; }
.header-male { background-color: #2196f3; }
.header-other { background-color: #4caf50; }

.char-name { font-size: 20px; margin: 0 0 5px 0; font-weight: bold; }
.char-name a:hover { color: #e91e63; }
.info-row { line-height: 1.5; margin-bottom: 4px; font-size: 13px; color: #555; }
.info-label { color: #999; font-size: 11px; margin-right: 4px; font-weight: bold; }
.char-detail { font-size:13px; color:#666; max-height:60px; overflow:hidden; margin-bottom:12px; line-height:1.6; border-top: 1px solid #f0f0f0; padding-top: 8px; }
.more-link { display: block; text-align: center; margin-top: 15px; padding: 10px; border: 1px solid #e91e63; color: #e91e63; text-decoration: none; border-radius: 30px; font-size: 14px; font-weight: bold; transition: 0.3s; }
.more-link:hover { background: #e91e63; color: white; }

/* --- タグ --- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 12px; margin-right: 5px; margin-bottom: 6px; font-weight: 500; }
.tag-work { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.tag-genre { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }
.tag-info { background: #fce4ec; color: #c2185b; border: 1px solid #f8bbd0; }
.tag-data { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.tag-birthday { background: #fff0f5; color: #d81b60; border: 1px solid #f8bbd0; font-weight: bold; }
.text-link { color: #333; text-decoration: none; border-bottom: 1px dotted #999; }
.text-link:hover { color: #e91e63; border-bottom: 1px solid #e91e63; }

/* =========================================
   ページネーション & 共通パーツ
   ========================================= */
.pagination { display: flex; justify-content: center; gap: 5px; margin: 20px 0; flex-wrap: wrap; align-items: center; }
.page-btn, .page-num { display: inline-block; padding: 8px 12px; background: #fff; border: 1px solid #ddd; border-radius: 4px; color: #333; text-decoration: none; font-size: 14px; min-width: 20px; text-align: center; }
.page-btn:hover, .page-num:hover { background: #e91e63; color: white; border-color: #e91e63; }
.page-num.active { background: #e91e63; color: white; pointer-events: none; border-color: #e91e63; }
#back-to-top { position: fixed; bottom: 30px; right: 30px; width: 55px; height: 55px; background: #e91e63; color: white; border: none; border-radius: 50%; font-size: 26px; cursor: pointer; z-index: 999; display: none; align-items: center; justify-content: center; box-shadow: 0 6px 12px rgba(0,0,0,0.3); transition: 0.3s; }
#back-to-top:hover { transform: scale(1.1); background: #c2185b; }
footer { text-align: center; padding: 20px; font-size: 12px; color: #666; border-top: 1px solid #eee; margin-top: 40px; }
footer a { color: #666; text-decoration: none; margin: 0 5px; }
footer a:hover { color: #e91e63; text-decoration: underline; }

/* =========================================
   各ページ固有スタイル
   ========================================= */

/* --- ランキングページ (ranking.cgi) --- */
.rank-header { text-align: center; margin-bottom: 30px; }
.rank-title { font-size: 24px; color: #e91e63; margin: 0 0 5px 0; font-weight:bold; }
.rank-desc { font-size: 13px; color: #666; }
.tab-nav { display: flex; justify-content: center; gap: 5px; margin-bottom: 20px; flex-wrap:wrap; }
.tab-nav a { padding: 8px 15px; background: #fff; border: 1px solid #ddd; border-radius: 20px; text-decoration: none; color: #666; font-size: 14px; transition:0.3s; }
.tab-nav a:hover { background: #f9f9f9; }
.tab-nav a.active { background: #e91e63; color: white; border-color: #e91e63; pointer-events:none; }
.date-nav { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 10px 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 20px; }
.nav-btn { text-decoration: none; color: #e91e63; font-weight: bold; font-size:14px; }
.current-label { font-size: 15px; font-weight: bold; color:#444; }
.rank-list { list-style: none; padding: 0; }
.rank-item { display: flex; align-items: center; background: white; border-bottom: 1px solid #eee; padding: 15px; transition: 0.2s; text-decoration: none; color: inherit; }
.rank-item:hover { background: #fff8e1; transform: translateX(5px); }
.rank-num { 
    width: 40px; height: 40px; line-height: 40px; 
    font-size: 18px; font-weight: bold; 
    text-align: center; margin-right: 15px; 
    color: #999; background: #f5f5f5; border-radius: 50%;
}
.rank-info { flex: 1; }
.rank-work { font-size: 11px; color: #888; margin-bottom: 3px; display:inline-block; background:#f0f0f0; padding:2px 6px; border-radius:4px; }
.rank-name { font-size: 16px; font-weight: bold; color: #333; margin: 0; }
.rank-pt { font-weight: bold; color: #e91e63; font-size:18px; }

/* --- ニュース --- */
.news-header { text-align:center; margin-bottom:30px; padding:20px; background:white; border-radius:10px; border-left:5px solid #673ab7; box-shadow:0 4px 10px rgba(0,0,0,0.05); }
.news-title { font-size:24px; color:#673ab7; margin:0; font-weight:bold; }
.news-list { list-style:none; padding:0; }
.news-item { background:white; padding:20px; margin-bottom:15px; border-radius:8px; border:1px solid #ddd; }
.news-date { color:#888; font-size:12px; margin-bottom:5px; display:block; font-weight:bold; }
.news-head { font-size:18px; color:#333; margin:0 0 10px 0; border-bottom:1px dashed #eee; padding-bottom:10px; font-weight:bold; }
.news-body { font-size:14px; line-height:1.6; color:#555; }

/* --- リクエストフォーム --- */
.form-card { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-top: 5px solid #009688; }
.form-group { margin-bottom: 20px; position:relative; }
.form-label, label { display: block; font-weight: bold; margin-bottom: 8px; font-size: 14px; color: #333; }
.badge-req, .required { color: #f44336; margin-left: 3px; font-size: 12px; vertical-align: top; font-weight:bold; }
.badge-any, .form-note { color: #999; margin-left: 3px; font-size: 12px; vertical-align: top; }
.form-control, input[type="text"], input[type="date"], input[type="number"], select, textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; box-sizing: border-box; }
input[type="file"] { padding: 10px 0; }
.submit-btn { 
    display: block; 
    width: 100%; 
    max-width: 300px; 
    margin: 30px auto 0; 
    padding: 15px; 
    background: #e91e63; 
    color: white; 
    border: none; 
    border-radius: 50px; 
    font-size: 18px; 
    font-weight: bold; 
    cursor: pointer; 
    box-shadow: 0 4px 10px rgba(233,30,99,0.3); 
    transition: 0.3s; 
    box-sizing: border-box; /* ★これではみ出し防止 */
}
.submit-btn:hover { background: #c2185b; transform: translateY(-2px); }
.suggest-box { position: absolute; top: 100%; left:0; background: white; border: 1px solid #ddd; width: 100%; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 100; max-height: 200px; overflow-y: auto; display: none; border-radius:0 0 4px 4px; }
.suggest-item { padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; font-size: 14px; color:#333; }
.suggest-item:hover { background: #e0f2f1; }
.row-3 { display: flex; gap: 15px; }
.row-3 > div { flex: 1; }
.row { display: flex; gap: 20px; }
.col { flex: 1; }
.birth-row { display: flex; gap: 10px; align-items: center; }
.birth-input { flex: 1; }
.birth-unit { font-size: 14px; color: #555; white-space: nowrap; margin-right: 5px; }
.btn-row { display: flex; gap: 15px; margin-top: 30px; align-items: stretch; }
.reset-btn { flex: 1; background: #90a4ae; color: white; border: none; padding: 15px; font-size: 16px; font-weight: bold; border-radius: 5px; cursor: pointer; transition: 0.3s; }
.reset-btn:hover { background: #607d8b; }
.notice-box { background: #fff8e1; border: 2px solid #ffe0b2; border-radius: 8px; padding: 15px; margin-bottom: 30px; font-size: 14px; line-height: 1.6; color: #5d4037; }
.success-box { background: #e8f5e9; border: 2px solid #a5d6a7; border-radius: 8px; padding: 20px; margin-bottom: 30px; text-align: center; color: #2e7d32; }

/* --- マイページ --- */
.mypage-header { text-align:center; margin-bottom:30px; padding:20px; background:white; border-radius:10px; border:2px solid #ff9800; box-shadow:0 4px 10px rgba(0,0,0,0.05); }
.mypage-title { font-size:22px; color:#ef6c00; margin:0 0 10px 0; font-weight:bold; }
.mypage-desc { font-size:13px; color:#666; margin-bottom:5px; }
.mypage-note { font-size:12px; color:#e91e63; font-weight:bold; }
.empty-msg { text-align: center; padding: 50px; background: #fff; border-radius: 10px; color: #888; }
.sort-area { text-align:right; margin-bottom:15px; }

/* --- 関連情報カード (ad-card) --- */
.ad-card {
    background: white; margin-top: 35px; padding: 20px;
    border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 2px solid #e3f2fd;
}
.ad-label {
    font-size: 12px; color: #888; margin-bottom: 15px; text-align:center;
    font-weight:bold; letter-spacing: 1px;
}
.ad-flex {
    display: flex; flex-wrap: nowrap; gap: 20px; align-items: flex-start; justify-content: center;
}
.ad-image {
    flex: 0 0 auto; width: 120px; text-align: center;
}
.ad-image img {
    width: 100%; height: auto; border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.ad-info {
    flex: 1; min-width: 0; text-align: center;
}
.ad-header {
    margin-bottom: 10px; padding-bottom: 8px;
    border-bottom: 2px solid #e91e63; display: block; width: 80%; margin-left: auto; margin-right: auto;
}
.ad-kana {
    font-size: 12px; color: #666; margin-bottom: 2px;
}
.ad-title {
    margin: 0; font-size: 18px; color: #333; line-height: 1.4; font-weight: bold;
}
.ad-list {
    list-style: none; padding: 0; display: table;
    margin: 0 auto; text-align: left;
}
.ad-list li {
    font-size: 13px; color: #555; margin-bottom: 6px; padding-left: 10px; border-left: 3px solid #ddd;
    line-height: 1.4;
}

/* =========================================
   詳細ページ（detail.cgi）専用レイアウト
   ========================================= */
.breadcrumb { font-size: 14px; margin-bottom: 20px; color: #666; }
.breadcrumb a { text-decoration: underline; }

.detail-card {
    background: white; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden;
    margin-bottom: 30px; border: 1px solid #eee;
}
.detail-card .card-header {
    color: white; padding: 25px; text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-header h1 { margin: 8px 0; font-size: 26px; letter-spacing: 1px; }
.card-header .kana { font-size: 14px; opacity: 0.9; }
.card-header .work {
    margin-top: 12px; display: inline-block;
    background: rgba(255,255,255,0.25);
    padding: 4px 12px; border-radius: 20px; font-size: 13px; backdrop-filter: blur(5px);
}
.card-header .work a { color: white; font-weight: bold; }
.detail-card .card-body { padding: 25px; }

/* 投票・尊いボタンエリア */
.vote-container {
    text-align: center; margin: 20px 0 35px 0; padding: 25px;
    background: #fff8e1; border-radius: 12px;
    box-shadow: 0 4px 10px rgba(255,193,7,0.2); border: 2px solid #ffe082;
}
.vote-btn {
    background: linear-gradient(135deg, #ff4081, #f50057);
    color: white; border: none;
    padding: 14px 40px; font-size: 20px; border-radius: 50px;
    cursor: pointer; transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 6px 15px rgba(255, 64, 129, 0.4);
    display: inline-flex; align-items: center; gap: 10px; font-weight: bold;
}
.vote-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 20px rgba(255, 64, 129, 0.5); }
.vote-btn:active { transform: translateY(1px); }
.vote-btn:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; transform: none; }
.vote-stats { margin-top: 12px; font-weight: bold; color: #555; font-size: 15px; }
.vote-count { font-size: 28px; color: #ff4081; font-family: 'Arial', sans-serif; }
.pop-anim { animation: pop 0.3s ease; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* お気に入りボタン */
.fav-area { margin-top: 40px; text-align: center; padding-top: 25px; border-top: 1px dashed #ddd; }
.fav-btn {
    background: #ff9800; color: white; border: none;
    padding: 12px 35px; font-size: 15px; border-radius: 30px;
    cursor: pointer; font-weight: bold; transition: 0.2s;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
}
.fav-btn:hover { background: #f57c00; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(255, 152, 0, 0.4); }
.fav-btn.active { background: #795548; box-shadow: none; }
.to-mypage { font-size: 14px; margin-top: 15px; display: inline-block; text-decoration: underline; color: #777; }

/* スペック表 */
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 25px; font-size: 15px; }
.spec-table th, .spec-table td { padding: 14px; border-bottom: 1px solid #eee; text-align: left; }
.spec-table th { width: 30%; font-weight: bold; }
.spec-table td { background: #fff; }
.search-link { color: #1976d2; border-bottom: 1px dotted #1976d2; margin-right: 6px; }

/* コメント欄・その他 */
.comment-section { margin-top: 40px; background: white; padding: 25px; border-radius: 12px; border: 1px solid #eee; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.comment-form { background: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 25px; }
.comment-form input, .comment-form textarea {
    width: 100%; box-sizing: border-box; padding: 12px;
    margin-bottom: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px;
}
.comment-btn { color: white; border: none; padding: 12px 25px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 15px; transition:0.3s; }
.comment-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.comment-list { list-style: none; padding: 0; }
.comment-item { border-bottom: 1px solid #eee; padding: 15px 0; }
.c-meta { font-size: 13px; color: #888; margin-bottom: 6px; }
.c-body { font-size: 15px; line-height: 1.6; color: #333; }
.desc-box { background: #fafafa; padding: 25px; border-radius: 8px; line-height: 1.8; font-size: 15px; color: #444; border: 1px solid #eee; margin-top: 25px; }
.req-area { text-align: right; margin-top: 20px; }
.req-btn { font-size: 13px; color: #888; text-decoration: none; border: 1px solid #ddd; padding: 8px 16px; border-radius: 20px; transition: 0.2s; background: #fff; display:inline-block; }
.req-btn:hover { background: #f0f0f0; color: #555; border-color:#bbb; }
.back-btn { display: block; width: 220px; margin: 40px auto; text-align: center; background: #607d8b; color: white; padding: 14px; border-radius: 30px; transition: 0.3s; cursor: pointer; text-decoration: none; font-weight:bold; box-shadow: 0 4px 10px rgba(96, 125, 139, 0.3); }
.back-btn:hover { background: #455a64; transform: translateY(-2px); }

/* candidate-list 修正 */
.candidate-list {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: white; border: 1px solid #e91e63; border-top: none;
    border-radius: 0 0 8px 8px; box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    z-index: 1000; max-height: 250px; overflow-y: auto;
}
.candidate-item {
    padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #eee;
    font-size: 14px; color: #333; background: #fff;
    transition: background 0.2s; display: flex;
    justify-content: space-between; align-items: center;
}
.candidate-item:hover { background: #fff3e0; }
.candidate-item:last-child { border-bottom: none; }
.candidate-item span { font-size: 14px; }
.candidate-item .c-sub { font-size: 11px; color: #888; margin-left: 10px; }

/* =========================================
   Portal Style (診断ポータル)
   ========================================= */
.portal-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; margin-top: 20px; 
}

/* カード本体 */
.portal-card { 
    background: white; border: 1px solid #eee; border-radius: 12px; 
    overflow: hidden; transition: all 0.3s ease; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    display: flex; flex-direction: column; 
    position: relative;
    top: 0;
}
.portal-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.15); 
    border-color: #ffc1e3; 
}

.portal-head { 
    background: linear-gradient(to right, #fce4ec, #fff0f5);
    color: #c2185b; 
    padding: 15px; font-weight: bold; font-size: 16px; 
    text-align: center; border-bottom: 1px solid #f8bbd0; 
    letter-spacing: 1px;
}
.portal-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.portal-desc { font-size: 13px; color: #666; margin-bottom: 20px; height: 54px; overflow: hidden; line-height: 1.6; }

.portal-rank { 
    font-size: 12px; background: #fffde7; padding: 10px 15px; 
    border-radius: 8px; border: 1px solid #fff9c4; margin-bottom: 20px; 
    display: flex; align-items: center; justify-content: space-between;
}
.portal-rank span { color: #fbc02d; font-weight: bold; margin-right: 10px; font-size:11px; }
.portal-rank strong { color: #e65100; font-size: 13px; text-align:right; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* リッチボタンエリア */
.portal-btns { margin-top: auto; display: flex; gap: 12px; }

.p-btn { 
    flex: 1; text-align: center; padding: 12px 5px; 
    font-size: 13px; font-weight: bold; text-decoration: none; 
    border-radius: 50px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: flex; align-items: center; justify-content: center; gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative; overflow: hidden;
}

/* 診断スタートボタン */
.p-btn.start { 
    background: linear-gradient(135deg, #e91e63 0%, #ff4081 100%); 
    color: white; border: none;
}
.p-btn.start::before { content: "🚀"; font-size: 16px; transition: transform 0.3s; }
.p-btn.start:hover { 
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4); 
    transform: translateY(-3px);
}
.p-btn.start:hover::before { transform: rotate(-10deg) scale(1.2); }

/* ランキングボタン */
.p-btn.rank { 
    background: white; 
    color: #ff9800; 
    border: 2px solid #ff9800; 
}
.p-btn.rank::before { content: "👑"; font-size: 16px; }
.p-btn.rank:hover { 
    background: #fff3e0; 
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.2); 
    transform: translateY(-3px);
}

.p-btn:active { transform: translateY(1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* 解析中画面用アニメーション */
.analyzing-box { text-align:center; padding:50px 20px; }
.loader { border: 8px solid #f3f3f3; border-top: 8px solid #e91e63; border-radius: 50%; width: 60px; height: 60px; animation: spin 1s linear infinite; margin: 0 auto 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.analyzing-text { font-size: 18px; font-weight: bold; color: #555; margin-bottom: 10px; }
.analyzing-sub { font-size: 14px; color: #999; }

/* --- スマホ対応 (レスポンシブ) --- */
@media screen and (max-width: 600px) {
  /* ナビゲーション（横スクロール & 影演出） */
  .main-nav { 
      justify-content: flex-start;
      gap: 8px; 
      flex-wrap: nowrap; 
      overflow-x: auto; 
      padding: 10px 5px; 
      border-radius: 0;
      box-shadow: none;
      background: transparent;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 5px;
      
      /* スクロールヒント（左右の影） */
      background-image: 
          linear-gradient(to right, #f5f7fa 10%, rgba(245,247,250,0)),
          linear-gradient(to right, rgba(0,0,0,0.05), rgba(0,0,0,0)),
          linear-gradient(to left, #f5f7fa 10%, rgba(245,247,250,0)),
          linear-gradient(to left, rgba(0,0,0,0.05), rgba(0,0,0,0));
      background-position: left center, left center, right center, right center;
      background-repeat: no-repeat;
      background-size: 20px 100%, 10px 100%, 20px 100%, 10px 100%;
      background-attachment: local, scroll, local, scroll;
  }
  .nav-link { 
      padding: 8px 10px;
      font-size: 13px; 
      white-space: nowrap; 
      flex-shrink: 0; 
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
      
      /* ★スマホでのサイズ統一 */
      width: 60px;
      justify-content: center;
  }
  .main-nav::-webkit-scrollbar { height: 3px; }
  .main-nav::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
  
  /* 検索バー */
  .search-area { top: 0; border-radius: 0 0 10px 10px; margin-left: -20px; margin-right: -20px; width: auto; padding: 15px 20px; }
  .input-group { flex-wrap: nowrap; gap: 5px; }
  .sort-select { max-width: 90px; padding: 10px 20px 10px 8px; font-size: 12px; }
  .search-input { padding: 10px; font-size: 14px; }
  .search-btn { padding: 0 12px; font-size: 13px; }

  /* 共通レイアウト */
  .row, .row-3 { flex-direction: column; gap: 0; }
  .rank-item { padding: 10px; }
  .rank-num { width: 30px; height: 30px; line-height: 30px; font-size: 14px; margin-right: 10px; }
  
  /* 関連情報 */
  .ad-flex { flex-direction: row; align-items: flex-start; gap: 15px; }
  .ad-image { width: 80px; flex: 0 0 80px; }
  .ad-info { text-align: left; }
  .ad-header { width: 100%; margin: 0 0 5px 0; padding-bottom: 5px; }
  .ad-title { font-size: 15px; }
  .ad-list { margin: 0; }
  
  /* 詳細ページ */
  .spec-table th { width: 35%; font-size: 13px; padding: 10px; }
  .spec-table td { font-size: 14px; padding: 10px; }
  .vote-btn { padding: 12px 30px; font-size: 18px; }
  .card-header h1 { font-size: 22px; }
  
  /* リクエストフォーム */
  .btn-row { flex-direction: column-reverse; gap: 15px; }
  .submit-btn, .reset-btn { width: 100%; flex: none; padding: 15px; }
}
/* =========================================
   ▼▼▼ 診断ウィザード用 (ここから追記) ▼▼▼
   ========================================= */

/* --- 1. 基本設定（PC向け：ボタンなどは隠す） --- */
.q-box { 
    margin-bottom: 25px; 
    border-bottom: 1px dashed #eee; 
    padding-bottom: 20px; 
    display: block; /* PCでは全問表示 */
}
.q-box:nth-child(even) { background-color: #fafafa; padding: 15px; border-radius: 8px; }

/* PCではスマホ用パーツを「完全に非表示」にする */
#mobile-controls, 
#progress-container,
.progress-text {
    display: none !important; /* 強制的に消す */
}

/* --- 2. スマホ対応 (600px以下で切り替え) --- */
@media screen and (max-width: 600px) {
    /* 質問箱：一旦すべて隠す */
    #quiz-container .q-box {
        display: none; 
        border-bottom: none;
        background-color: #fff !important;
        padding: 0;
        animation: fadeIn 0.3s ease;
    }
    
    /* アクティブな質問だけ表示 */
    #quiz-container .q-box.active {
        display: block;
    }

    /* スマホ用パーツを表示させる */
    #mobile-controls { 
        display: flex !important; 
        justify-content: space-between; 
        gap: 10px; margin-top: 20px; 
    }
    #progress-container { 
        display: block !important; 
        width: 100%; height: 8px; background: #eee; border-radius: 4px; margin-bottom: 20px; 
    }
    #progress-bar { width: 0%; height: 100%; background: #e91e63; transition: width 0.3s; }
    .progress-text { 
        display: block !important; 
        text-align: right; font-size: 12px; color: #e91e63; font-weight: bold; margin-bottom: 5px; 
    }

    /* ボタンのデザイン */
    .wizard-btn {
        flex: 1; padding: 12px; border: none; border-radius: 50px;
        font-weight: bold; font-size: 16px; cursor: pointer; transition: 0.3s;
    }
    .btn-prev { background: #cfd8dc; color: #555; }
    .btn-next { background: #e91e63; color: white; box-shadow: 0 4px 10px rgba(233,30,99,0.3); }
    .btn-next:disabled { background: #e0e0e0; color: #999; box-shadow: none; }

    /* 最後の送信ボタン：最初は隠す */
    .submit-btn { display: none; }
    .submit-btn.show-mobile { display: block; animation: popUp 0.5s; }
    
    /* 選択肢の押しやすさ改善 */
    .a-list label {
        padding: 15px; margin-bottom: 12px; border: 2px solid #eee;
        display: flex; align-items: center; font-size: 15px; border-radius: 8px;
    }
    .a-list input[type="radio"] { margin-right: 10px; transform: scale(1.3); }
    .a-list label:has(input:checked) { border-color: #e91e63; background: #fff0f5; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes popUp { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =========================================
   診断結果の演出（危険度別）
   ========================================= */

/* ベースの箱 */
.result-score-box {
    text-align: center;
    background: #fff;
    border: 4px solid #333;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-label { font-size: 16px; font-weight: bold; margin-bottom: 10px; opacity: 0.8; }
.result-score { font-size: 70px; font-weight: 900; line-height: 1; margin: 15px 0; text-shadow: 2px 2px 0px rgba(255,255,255,0.5); position:relative; z-index:2; }
.result-rank { font-size: 24px; font-weight: bold; margin-top: 15px; padding: 10px 20px; background: rgba(255,255,255,0.9); display: inline-block; border-radius: 50px; border: 2px solid rgba(0,0,0,0.1); position:relative; z-index:2; }
.result-text { background: rgba(255,255,255,0.95); padding: 20px; border-radius: 8px; margin-top: 20px; text-align: left; line-height: 1.8; color: #333; border: 1px solid #ddd; position:relative; z-index:2; }

/* --- レベル別演出 --- */

/* Lv1: 安全 (0-99) */
.lv-safe {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

/* Lv2: 注意 (100-199) */
.lv-caution {
    background: repeating-linear-gradient(45deg, #fffde7, #fffde7 10px, #fff9c4 10px, #fff9c4 20px);
    border-color: #fbc02d;
    color: #f57f17;
}

/* Lv3: 危険 (200-299) - 赤色点滅 */
.lv-danger {
    background-color: #ffebee;
    border-color: #d32f2f;
    color: #b71c1c;
    animation: danger-pulse 2s infinite;
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.4);
}
@keyframes danger-pulse {
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); border-color: #d32f2f; }
    70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); border-color: #ff5252; }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); border-color: #d32f2f; }
}

/* Lv4: 汚染 (300-399) - 毒々しい紫と緑 */
.lv-toxic {
    background: #f3e5f5;
    border-color: #8e24aa;
    color: #4a148c;
    background-image: radial-gradient(#d1c4e9 20%, transparent 20%), radial-gradient(#d1c4e9 20%, transparent 20%);
    background-position: 0 0, 10px 10px;
    background-size: 20px 20px;
    animation: toxic-shake 3s infinite;
    box-shadow: 0 0 20px #8e24aa;
}
.lv-toxic .result-score { text-shadow: 3px 3px 0px #00e676; color: #4a148c; }
@keyframes toxic-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

/* Lv5: 致命的 (400-499) - 警告ブラック＆グリッチ */
.lv-fatal {
    background: #000;
    border: 4px solid #ff0000;
    color: #ff0000;
    position: relative;
}
.lv-fatal::before {
    content: "WARNING WARNING WARNING";
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.1; color: red; font-size: 20px; font-weight: bold; word-break: break-all; pointer-events: none;
    z-index: 0;
}
.lv-fatal .result-score {
    color: #fff;
    text-shadow: 2px 0 red, -2px 0 blue;
    animation: glitch 0.3s infinite;
}
.lv-fatal .result-rank { background: #ff0000; color: #fff; border-color: #fff; }
@keyframes glitch {
    0% { transform: translate(0,0); }
    20% { transform: translate(-2px,2px); }
    40% { transform: translate(-2px,-2px); }
    60% { transform: translate(2px,2px); }
    80% { transform: translate(2px,-2px); }
    100% { transform: translate(0,0); }
}

/* Lv6: 神・解脱 (500~) - ゲーミングレインボー */
.lv-god {
    background: linear-gradient(124deg, #ff2400, #e81d1d, #e8b71d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
    background-size: 1800% 1800%;
    color: #fff;
    border: 4px solid #fff;
    animation: rainbow 5s ease infinite;
    box-shadow: 0 0 30px rgba(255,215,0, 0.8);
}
.lv-god .result-score {
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}
.lv-god .result-rank {
    background: #fff; color: #e91e63;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
@keyframes rainbow { 
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}

/* =========================================
   診断結果ページのアクションボタン
   ========================================= */

/* --- SNSシェアボタン群 --- */
.share-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 140px;
}
.btn-share:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-x { background-color: #000; }
.btn-line { background-color: #00c300; }
.btn-copy { background-color: #607d8b; }

/* --- ランキングを見るボタン --- */
.btn-ranking {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 25px;
    border: 2px solid #e91e63;
    border-radius: 30px;
    color: #e91e63;
    text-decoration: none;
    font-weight: bold;
    background: #fff;
    transition: 0.3s;
}
.btn-ranking:hover {
    background: #e91e63;
    color: white;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
}

/* --- もう一度診断するボタン --- */
.btn-retry {
    display: block;
    width: 80%;
    max-width: 300px;
    margin: 30px auto;
    padding: 15px;
    background: linear-gradient(135deg, #9c27b0, #673ab7);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
    transition: 0.3s;
}
.btn-retry:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6);
}

/* --- ジャンル切り替えボタン（nav-links） --- */
.cat-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
    margin-bottom: 20px;
}
.cat-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    transition: 0.2s;
}
.cat-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    transform: translateY(-2px);
}
.cat-btn.active {
    background: #333;
    color: white;
    border-color: #333;
    pointer-events: none;
}
