/* ========================================
   The Spotlight Dinner - スタイルシート
   テーマ: Dark & Elegant / Material質感
   ======================================== */

/* ===========================================
   1. デザインシステム - CSS変数定義
   =========================================== */
:root {
    /* ================================================
     The Spotlight Dinner - カラーパレット
     ================================================ */

    /* --- シーン背景 --- */
    --bg-scene: #08080e;
    --spotlight-warm: rgba(255, 248, 220, 0.25);
    --spotlight-soft: rgba(255, 248, 220, 0.08);

    /* --- メニュー用紙 --- */
    --paper-cream: #f5f0e1;
    --paper-shadow: #d5d0c1;
    --paper-border: #4a1a1a;
    --paper-border-inner: #c9a94a;

    /* --- 入力フィールド --- */
    --field-bg: #e8e0d0;
    --field-border: #c0b8a8;

    /* --- インク・テキスト --- */
    --ink-black: #2a2520;
    --ink-muted: #6a6560;
    --ink-label: #8a8580;

    /* --- スタンプ --- */
    --stamp-red: #a03030;
    --stamp-red-light: #c04040;

    /* --- 装飾ボタン --- */
    --btn-burgundy-start: #6b1c1c;
    --btn-burgundy-end: #3a0a0a;
    --btn-gold: #c9a94a;
    --btn-gold-light: #f5e6a3;
    --btn-text: #fff5e0;

    /* --- 旧テーマとの互換性 --- */
    --color-base: #08080e;
    --color-surface: #f5f0e1;
    --color-surface-light: #e8e0d0;
    --color-border: #4a1a1a;
    --color-border-light: #c9a94a;
    --color-text: #2a2520;
    --color-text-muted: #6a6560;
    --color-accent: #c9a94a;
    --color-accent-glow: rgba(201, 169, 74, 0.4);
    --color-victory: #2E7D32;
    --color-victory-light: #4CAF50;
    --color-liar: #a03030;
    --color-liar-light: #c04040;
    --color-primary: #c9a94a;
    --color-success: #2E7D32;
    --color-warning: #E67E22;
    --color-purple: #9b59b6;
    --color-danger: #a03030;
    --color-gold: #c9a94a;
    --color-dark: #08080e;
    --color-light: #e8e0d0;
    --color-white: #f5f0e1;

    /* --- シャドウ --- */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 15px var(--color-accent-glow);
    --shadow-paper: 0 20px 40px rgba(0, 0, 0, 0.5), 0 10px 20px rgba(0, 0, 0, 0.3);

    /* --- ボーダーラジウス --- */
    --radius: 4px;
    --radius-sm: 2px;

    /* --- フォント --- */
    --font-heading: 'Noto Serif JP', 'Cinzel', serif;
    --font-body: 'Noto Sans JP', 'Roboto', sans-serif;
    --font-accent: 'Cinzel', 'Noto Serif JP', serif;

    /* --- z-index --- */
    --z-background: 1;
    --z-content: 10;
    --z-overlay: 100;
    --z-spotlight: 50;
}


/* リセットと基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 汎用非表示クラス */
.hidden {
    display: none !important;
}

/* ===========================================
   2. ベーススタイル - 背景とボディ
   =========================================== */
body {
    font-family: var(--font-body);
    background: var(--bg-scene);
    min-height: 100vh;
    color: var(--ink-black);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* スポットライト効果 + ビネット */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        /* 上部中央からの暖かいスポットライト */
        radial-gradient(ellipse 80% 60% at 50% 5%,
            var(--spotlight-warm) 0%,
            var(--spotlight-soft) 30%,
            transparent 60%),
        /* 四隅を暗くするビネット */
        radial-gradient(circle at 50% 50%,
            transparent 20%,
            rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
    z-index: var(--z-background);
}

/* ノイズテクスチャ (疑似的) - 暗め */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: var(--z-background);
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    z-index: var(--z-content);
}


/* タイトル */
.game-title {
    text-align: center;
    color: var(--color-white);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ゲームヘッダー（The Spotlight Dinner） */
.game-header {
    text-align: center;
    margin-bottom: 24px;
}

.header-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: transparent;
    background: linear-gradient(180deg,
            var(--btn-gold) 0%,
            var(--btn-gold-light) 50%,
            var(--btn-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 8px;
}

.header-subtitle {
    font-family: var(--font-accent);
    font-size: 0.85rem;
    color: var(--ink-muted);
    letter-spacing: 3px;
    margin: 0;
}

/* 画面管理 */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   3. カードコンポーネント - メニューブック風
   =========================================== */
.card {
    background: var(--paper-cream);
    border: 6px solid var(--paper-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow:
        inset 0 0 0 2px var(--paper-border-inner),
        var(--shadow-paper);
    position: relative;
    transform: rotate(-0.5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 紙のテクスチャオーバーレイ */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    border-radius: inherit;
}

.card:hover {
    transform: rotate(-0.5deg) translateY(-2px);
    box-shadow:
        inset 0 0 0 2px var(--paper-border-inner),
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 15px 30px rgba(0, 0, 0, 0.4);
}

.card h1,
.card h2,
.card h3 {
    font-family: var(--font-heading);
    color: var(--ink-black);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

.card p {
    color: var(--ink-muted);
    text-align: center;
    margin-bottom: 16px;
}



/* ===========================================
   10. アニメーション - Cut-in & Spotlight
   =========================================== */

/* 基本フェードイン */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* カットイン (ズームアウト) */
@keyframes cutInZoom {
    0% {
        opacity: 0;
        transform: scale(1.3);
    }

    20% {
        opacity: 1;
        transform: scale(1);
    }

    80% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* スポットライト点滅 */
@keyframes spotlightPulse {

    0%,
    100% {
        box-shadow: 0 0 15px var(--color-accent-glow);
    }

    50% {
        box-shadow: 0 0 30px var(--color-accent-glow), 0 0 50px rgba(244, 228, 188, 0.2);
    }
}

/* カード登場アニメーション */
@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* disabled カード用アニメーション（薄い状態で登場） */
@keyframes cardRevealDisabled {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 0.6;
        transform: translateY(0) scale(1);
    }
}

/* Usedカード登場アニメーション（最初から暗い） */
@keyframes cardRevealUsed {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 0.4;
        transform: translateY(0) scale(1);
    }
}

/* 画面遷移 */
.screen.active {
    display: block;
    animation: slideUpFade 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* カードのスタガー登場 */
.food-card {
    animation: cardReveal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.food-card:nth-child(1) {
    animation-delay: 0.1s;
}

.food-card:nth-child(2) {
    animation-delay: 0.15s;
}

.food-card:nth-child(3) {
    animation-delay: 0.2s;
}

.food-card:nth-child(4) {
    animation-delay: 0.25s;
}

/* 選択時のパルスアニメーション（1回のみ再生） */
/* 選択時のパルスアニメーション（高速化: 1.5s -> 0.6s） */
.food-card.selected {
    animation: spotlightPulse 0.6s ease-in-out 1;
}

/* 他カード暗転 (JS連携用クラス) */
.food-card.dimmed {
    filter: brightness(0.5);
    transform: scale(0.98);
}


/* カード内h2は既に上で定義済み - 削除 */

/* ===========================================
   4. フォーム - Material Underline Style
   =========================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-border);
    border-radius: 0;
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-bottom-color: var(--color-accent);
}

/* ===========================================
   5. ボタン - メニューブック風
   =========================================== */
.btn {
    display: block;
    width: 100%;
    padding: 16px 32px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-accent);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Primary: ORDER & LIE風ボタン */
.btn-primary {
    background: linear-gradient(180deg, var(--btn-burgundy-start) 0%, var(--btn-burgundy-end) 100%);
    color: var(--btn-text);
    border: 4px double var(--btn-gold);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary::before {
    content: '◆';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.5rem;
    color: var(--btn-gold);
}

.btn-primary::after {
    content: '◆';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.5rem;
    color: var(--btn-gold);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(201, 169, 74, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Success: 勝利/正解 */
.btn-success {
    background: linear-gradient(180deg, #3a8a3e 0%, var(--color-victory) 100%);
    color: var(--btn-text);
    border: 4px double var(--btn-gold);
}

.btn-success:hover {
    filter: brightness(1.1);
}

/* Warning: 演技終了など */
.btn-warning {
    background: transparent;
    color: var(--btn-gold);
    border: 2px solid var(--btn-gold);
}

.btn-warning:hover {
    background: var(--btn-gold);
    color: var(--bg-scene);
}

/* Danger: 推理ボタン */
.btn-danger {
    background: linear-gradient(180deg, var(--stamp-red-light) 0%, var(--stamp-red) 100%);
    color: var(--btn-text);
    border: 4px double var(--btn-gold);
}

.btn-danger:hover {
    filter: brightness(1.1);
}

/* メッセージ */
.message {
    text-align: center;
    padding: 20px;
    margin-top: 16px;
}

.message.hidden {
    display: none;
}

/* スピナー */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 説明テキスト */
.instruction {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

/* メニュー入力 - メニューブック風 */
.menu-inputs {
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border: none;
    position: relative;
}

.input-group .field-label {
    font-size: 0.8rem;
    color: var(--ink-label);
    margin-left: 4px;
    font-weight: 400;
}

.input-group .field-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.input-group input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    background: var(--field-bg);
    border: none;
    border-bottom: 1px solid var(--field-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--ink-black);
    transition: outline 0.2s ease;
}

.input-group input[type="text"]::placeholder {
    color: var(--ink-muted);
    opacity: 0.5;
}

.input-group input[type="text"]:focus {
    outline: 2px solid var(--btn-gold);
    outline-offset: -2px;
}

/* =============================================
   スタンプUI (LIAR)
   ============================================= */
.stamp-liar {
    width: 52px;
    height: 52px;
    border: 3px solid var(--stamp-red);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--stamp-red);
    letter-spacing: 1px;
    opacity: 0.25;
    cursor: pointer;
    transition: all 0.2s ease;
    filter: blur(0.2px);
    mix-blend-mode: multiply;
    flex-shrink: 0;
    user-select: none;
}

.stamp-liar:hover {
    opacity: 0.5;
    transform: scale(1.05);
}

/* 選択時：押印された状態 */
.stamp-liar.active {
    opacity: 0.9;
    transform: scale(1.05) rotate(12deg);
    box-shadow: 0 0 8px rgba(160, 48, 48, 0.3);
    animation: stamp-press 0.3s ease-out forwards;
}

.stamp-liar.active::after {
    content: '嫌い';
    position: absolute;
    bottom: -18px;
    font-size: 0.6rem;
    font-family: var(--font-body);
    color: var(--stamp-red);
    font-weight: 600;
}

@keyframes stamp-press {
    0% {
        transform: scale(1.3) rotate(8deg);
        opacity: 0;
    }

    50% {
        transform: scale(0.95) rotate(12deg);
        opacity: 1;
    }

    100% {
        transform: scale(1.05) rotate(12deg);
        opacity: 0.9;
    }
}

/* 旧ラジオボタンを非表示 */
.input-group label.radio-label,
.input-group input[type="radio"] {
    display: none;
}

.menu-items {
    margin-bottom: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--color-light);
    border-radius: var(--radius-sm);
}

.menu-item input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.menu-item input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.menu-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-label {
    font-size: 0.9rem;
    color: var(--color-danger);
    font-weight: 600;
    cursor: pointer;
}

/* ===========================================
   6. メニューカード - Dark Material with Glow
   =========================================== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.food-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Hover: 浮き上がり + ゴールド枠線 + 発光 */
.food-card:hover:not(.disabled):not(.selected):not(.used) {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lg), 0 0 10px rgba(244, 228, 188, 0.2);
}

/* Selected: 強い発光 + ゴールド枠 */
.food-card.selected {
    background: var(--color-surface-light);
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Used: 暗転 */
.food-card.used {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--color-base);
    border-color: var(--color-border);
    color: var(--paper-cream);
    /* 視認性向上: 明るいクリーム色 */
}

/* Disabled */
/* Disabled - クリック時の状態変化（アニメーションなし） */
.food-card.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    /* transitionで自然にフェードアウトするためアニメーション指定なし */
}

/* Initially Disabled - 登場時から無効化されているカード */
.food-card.initially-disabled {
    cursor: not-allowed;
    animation-name: cardRevealDisabled;
}

/* Initially Used - 登場時から使用済みのカード */
.food-card.initially-used {
    animation-name: cardRevealUsed;
}

/* ===========================================
   7. ターン情報 & 説明エリア - Spotlight Style
   =========================================== */
.header-info {
    margin-bottom: 24px;
}

.turn-info {
    text-align: center;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-weight: 600;
    font-family: var(--font-body);
    border: 1px solid var(--color-border);
}

.turn-info.my-turn {
    background: var(--color-surface);
    color: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 0 8px rgba(244, 228, 188, 0.2);
}

.turn-info.opponent-turn {
    background: var(--color-base);
    color: var(--color-text-muted);
    border-color: var(--color-border);
}

#eating-progress {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.game-board h3 {
    font-family: var(--font-heading);
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

/* 説明エリア - スポットライト演出 */
.explanation-area {
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    color: var(--color-text);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-glow);
    position: relative;
}

.explanation-area.hidden {
    display: none;
}

.explanation.guess-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-accent);
    margin: 10px 0;
}

.food-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin: 15px 0;
    text-shadow: 0 0 10px rgba(244, 228, 188, 0.3);
}

.explanation-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.explanation-hint {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.explanation-area .btn {
    background: var(--color-accent);
    color: var(--color-base);
    border: 2px solid var(--color-accent);
    font-weight: 700;
}

.explanation-area .btn:hover {
    background: transparent;
    color: var(--color-accent);
}

/* 進行状況 */
.progress-text {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* 画像確認画面 */
.reveal-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-light);
}

.reveal-section:last-of-type {
    border-bottom: none;
}

.reveal-section h3 {
    text-align: center;
    margin-bottom: 12px;
    color: var(--color-dark);
}

.guess-text {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-purple);
    margin-bottom: 16px;
}

/* 画像確認画面 (Showcase Style) */
.reveal-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-light);
}

.reveal-section:last-of-type {
    border-bottom: none;
}

.reveal-section h3 {
    text-align: center;
    margin-bottom: 12px;
    color: var(--color-dark);
}

.guess-text {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-purple);
    margin-bottom: 16px;
}

.reveal-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.03);
    padding: 20px;
    border-radius: 12px;
    min-height: 280px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.reveal-images img {
    height: 250px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: transform 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.reveal-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.images-container .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
    color: #666;
}

/* ===========================================
   8. 結果画面 - Victory/Defeat Theme
   =========================================== */
#result-content {
    margin-bottom: 20px;
}

.result-item {
    padding: 20px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--color-border);
}

.result-item.correct {
    background: var(--color-surface);
    border-color: var(--color-victory);
    color: var(--color-victory-light);
}

.result-item.wrong {
    background: var(--color-surface);
    border-color: var(--color-liar);
    color: var(--color-liar-light);
}

.result-item .player-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.result-item .result-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.game-end-message {
    text-align: center;
    padding: 28px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
}

.game-end-message.hidden {
    display: none;
}

.game-end-message.win {
    background: var(--color-surface);
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.game-end-message.draw {
    background: var(--color-surface);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.game-end-message.lose {
    background: var(--color-base);
    color: var(--color-liar-light);
    border: 1px solid var(--color-liar);
}

/* ===========================================
   9. オーバーレイ - Dark Blur Backdrop
   =========================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay);
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: var(--color-surface);
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 90%;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.overlay-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--color-text);
}

.overlay-content h3 {
    margin-bottom: 16px;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

/* オーバーレイアニメーション */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.overlay:not(.hidden) .overlay-content {
    animation: overlayFadeIn 0.3s ease-out;
}

/* ===========================================
   11. フェーズ カットイン演出
   =========================================== */
.phase-cutin {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    pointer-events: none;
}

.phase-cutin.hidden {
    display: none;
}

.phase-cutin span {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    text-shadow: 0 0 30px var(--color-accent-glow), 0 0 60px rgba(244, 228, 188, 0.3);
    animation: cutInZoom 1.5s ease-out forwards;
}

/* ===========================================
   12. レスポンシブ対応
   =========================================== */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .game-title {
        font-size: 1.4rem;
    }

    .card {
        padding: 16px;
    }

    .food-card {
        padding: 14px;
        font-size: 1rem;
        min-height: 70px;
    }

    .images-container img {
        width: 80px;
        height: 80px;
    }

    .phase-cutin span {
        font-size: 2rem;
        letter-spacing: 0.15em;
    }

    .cards-container {
        gap: 10px;
    }
}

/* ===========================================
   13. PC向け2カラムレイアウト
   =========================================== */

/* デフォルト（モバイル）：サイドパネル非表示 */
.side-panel {
    display: none;
}

/* ルールボタン（モバイル用） */
.btn-text {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px;
    margin-bottom: 16px;
    background: transparent;
    border: none;
    color: var(--ink-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--btn-gold);
}

/* PC向けレイアウト */
@media (min-width: 1024px) {
    body {
        overflow: hidden;
    }

    .layout-wrapper {
        display: grid;
        grid-template-columns: 380px 1fr;
        height: 100vh;
    }

    .side-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(8, 8, 14, 0.7);
        border-right: 1px solid rgba(201, 169, 74, 0.2);
        padding: 40px 32px;
        position: relative;
        z-index: 20;
    }

    .side-content {
        text-align: center;
        max-width: 320px;
    }

    .brand-logo {
        font-family: var(--font-accent);
        font-size: 2.2rem;
        font-weight: 700;
        color: var(--btn-gold);
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .brand-tagline {
        font-family: var(--font-accent);
        font-size: 0.85rem;
        color: var(--ink-muted);
        letter-spacing: 2px;
        margin-bottom: 24px;
    }

    .separator {
        width: 60px;
        height: 2px;
        background: var(--btn-gold);
        margin: 0 auto 24px;
        opacity: 0.5;
    }

    .brand-rules {
        text-align: left;
    }

    .brand-rules p {
        font-family: var(--font-body);
        font-size: 0.9rem;
        color: var(--paper-cream);
        margin-bottom: 12px;
        line-height: 1.6;
        opacity: 0.8;
    }

    .main-content {
        overflow-y: auto;
        position: relative;
    }

    .container {
        padding-top: 40px;
        max-width: 540px;
    }

    /* PCではルールボタン非表示（サイドパネルにあるため） */
    #show-rules-btn {
        display: none;
    }
}

/* ===========================================
   14. ルールモーダル
   =========================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    max-width: 400px;
    width: 100%;
    animation: overlayFadeIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ink-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    color: var(--stamp-red);
}

.rules-body {
    text-align: left;
    margin-top: 16px;
}

.rules-body p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* ===========================================
   11. Respect Section - 元ネタリスペクト動画
   =========================================== */

.respect-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 120px;
    margin-bottom: 40px;
    max-width: 500px;
}

/* レスポンシブ: 狭い画面では縦並び */
@media (max-width: 540px) {
    .respect-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* 個別カード */
.respect-card {
    background: var(--paper-cream);
    border: 6px solid var(--paper-border);
    border-radius: var(--radius);
    padding: 0;
    box-shadow:
        inset 0 0 0 2px var(--paper-border-inner),
        var(--shadow-paper);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ラベル: RESPECT & INSPIRATION */
.respect-label {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--btn-gold);
    text-align: center;
    letter-spacing: 2px;
    padding: 12px 8px 8px;
    text-transform: uppercase;
}

/* 動画ラッパー */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
    cursor: pointer;
}

/* カバー画像 */
.video-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.6);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.video-wrapper:hover .video-cover img {
    filter: grayscale(80%) brightness(0.7);
    transform: scale(1.02);
}

/* 再生ボタン */
/* 再生ボタン */
.play-button {
    /* サイズ調整 */
    width: 50px;
    height: 50px;

    /* 「塗り」をなくし、半透明の黒にする */
    background: rgba(0, 0, 0, 0.4);

    /* 枠線をゴールドにする */
    border: 1px solid var(--btn-gold);
    border-radius: 50%;

    /* 中央配置 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* 中身（三角）の配置 */
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 20;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    padding: 0;
    /* reset */
}

/* 三角アイコン (擬似要素で作成) */
.play-button::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    /* 三角形のサイズ */
    border-color: transparent transparent transparent var(--btn-gold);
    margin-left: 4px;
    /* 視覚的な中央調整 */
}

.video-wrapper:hover .play-button {
    background: rgba(201, 169, 74, 0.2);
    /* ゴールドを薄く敷く */
    box-shadow: 0 0 15px rgba(201, 169, 74, 0.4);
    /* 発光 */
    transform: translate(-50%, -50%) scale(1.1);
}

/* iframe コンテナ */
.video-iframe-container {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.video-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* キャプション */
.respect-caption {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-align: center;
    padding: 12px 8px 16px;
    line-height: 1.4;
}

/* ===========================================
   11. 年齢確認モーダル (Age Verification)
   =========================================== */
#age-verification-modal.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 14, 0.95);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#age-verification-modal .modal-content {
    max-width: 500px;
    width: 100%;
    text-align: center;
    border: 2px solid var(--paper-border-inner);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(201, 169, 74, 0.2);
    animation: cutInZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#age-verification-modal .modal-header h2 {
    color: var(--color-accent);
    margin-bottom: 24px;
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 16px;
}

#age-verification-modal .warning-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 32px;
    color: var(--color-text);
}

#age-verification-modal .modal-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 600px) {
    #age-verification-modal .modal-actions {
        flex-direction: row;
        justify-content: center;
    }

    #age-verification-modal .modal-actions .btn {
        width: auto;
        min-width: 180px;
    }
}

/* ===========================================
   12. Tips & Disclaimer (Refined)
   =========================================== */
.brand-tips {
    margin-top: 24px;
    border-top: 2px solid var(--btn-gold);
    /* separatorと同じ色 */
    /* opacityは削除（文字色が薄くなりすぎるため） */
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-box {
    margin-bottom: 8px;
    /* 背景・枠線なし */
}

.tip-title {
    color: var(--paper-cream);
    font-family: var(--font-body);
    /* ルールと同じフォント */
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
    opacity: 0.9;
}

.tip-box p:not(.tip-title) {
    color: var(--paper-cream);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.8;
}

/* モーダル内のTips調整 */
.modal-content .brand-tips {
    margin-top: 24px;
}

/* リスペクト免責 */
.respect-disclaimer {
    margin-top: 32px;
    padding: 16px;
    text-align: center;
    color: var(--ink-muted);
    /* 背景が明るいエリアには暗い文字 */
    font-size: 0.75rem;
    line-height: 1.6;
    font-family: var(--font-heading);
    border-top: 1px solid var(--paper-border-inner);
}

/* 暗い背景（サイドパネルなど）での免責の見た目調整が必要な場合 */
.side-panel .respect-disclaimer {
    color: var(--paper-cream);
    opacity: 0.6;
    border-top: none;
}

/* モーダル内のTips調整 */
.modal-content .brand-tips {
    margin-top: 24px;
    border-top-color: var(--paper-border-inner);
}

/* リスペクト免責 */
.respect-disclaimer {
    margin-top: 32px;
    padding: 16px;
    text-align: center;
    color: var(--paper-cream);
    /* 背景が暗いため明るい色に変更 */
    opacity: 0.7;
    /* 少し控えめに */
    font-size: 0.75rem;
    line-height: 1.6;
    font-family: var(--font-heading);
    border-top: 1px solid var(--paper-border-inner);
}

/* 暗い背景（サイドパネルなど）での免責の見た目調整が必要な場合 */
.side-panel .respect-disclaimer {
    color: var(--paper-cream);
    opacity: 0.6;
    border-top: none;
}