/* ===================================
   禍ツ校舎ノ怨霊 - ホラーサウンドノベル
   スタイルシート
   =================================== */

/* リセットと基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8b0000;
    --secondary-color: #2d0a0a;
    --text-color: #e8e8e8;
    --text-shadow-color: #ff0000;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --accent-color: #ff3333;
    --font-main: 'Noto Serif JP', serif;
    --font-horror: 'Creepster', cursive;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background: var(--bg-darker);
    color: var(--text-color);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* オーバーレイ共通 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.95);
}

.overlay.active {
    display: flex;
}

/* ===================================
   警告画面
   =================================== */
#warning-overlay {
    background: linear-gradient(180deg, #1a0000 0%, #0a0000 100%);
}

.warning-content {
    text-align: center;
    padding: 40px;
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

.warning-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.warning-content h1 {
    font-size: 48px;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--text-shadow-color);
    margin-bottom: 30px;
    letter-spacing: 10px;
}

.warning-text {
    font-size: 18px;
    line-height: 2;
    margin-bottom: 20px;
    color: #ccc;
}

.warning-text strong {
    color: var(--accent-color);
}

.age-warning {
    font-size: 14px;
    color: #888;
    margin-bottom: 40px;
}

/* ホラーボタン */
.horror-btn {
    position: relative;
    padding: 15px 50px;
    font-size: 20px;
    font-family: var(--font-main);
    background: linear-gradient(180deg, #3d0000 0%, #1a0000 100%);
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.horror-btn:hover {
    background: linear-gradient(180deg, #5a0000 0%, #2d0000 100%);
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.5);
    transform: scale(1.05);
}

.horror-btn:active {
    transform: scale(0.98);
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,0,0,0.2) 0%, transparent 70%);
    animation: rotate 4s linear infinite;
}

/* ===================================
   タイトル画面
   =================================== */
#title-screen {
    background: radial-gradient(ellipse at center, #1a0505 0%, #0a0000 70%, #000 100%);
}

.title-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.title-fog {
    position: absolute;
    top: -100%;
    left: -50%;
    width: 200%;
    height: 300%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.05"/></svg>');
    animation: drift 30s linear infinite;
    pointer-events: none;
}

.main-title {
    margin-bottom: 20px;
}

.title-sub {
    display: block;
    font-size: 28px;
    letter-spacing: 15px;
    color: #666;
    margin-bottom: 10px;
    animation: flicker 3s infinite;
}

.title-main {
    display: block;
    font-size: 120px;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 
        0 0 10px var(--text-shadow-color),
        0 0 20px var(--text-shadow-color),
        0 0 40px var(--text-shadow-color),
        0 0 80px var(--text-shadow-color);
    letter-spacing: 30px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.chapter-title {
    font-size: 24px;
    color: #888;
    letter-spacing: 8px;
    margin-bottom: 60px;
}

.title-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.menu-btn {
    width: 250px;
    padding: 15px 30px;
    font-size: 18px;
    font-family: var(--font-main);
    background: transparent;
    border: 1px solid #333;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139,0,0,0.3), transparent);
    transition: left 0.5s ease;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-color);
    text-shadow: 0 0 10px var(--text-shadow-color);
}

.menu-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.menu-btn:disabled:hover {
    border-color: #333;
    color: #888;
    text-shadow: none;
}

.version-info {
    margin-top: 40px;
    font-size: 12px;
    color: #444;
    letter-spacing: 3px;
}

/* ===================================
   設定画面
   =================================== */
.settings-content {
    background: rgba(10, 10, 10, 0.95);
    padding: 40px;
    border: 1px solid #333;
    max-width: 500px;
    width: 90%;
}

.settings-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    letter-spacing: 5px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.settings-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #222;
}

.settings-group label span {
    color: #aaa;
}

.settings-group input[type="range"] {
    width: 150px;
    accent-color: var(--primary-color);
}

.settings-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

/* ===================================
   ゲーム画面
   =================================== */
.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: #000;
}

.game-container.active {
    display: block;
}

/* 背景レイヤー */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease, filter 0.5s ease;
}

/* エフェクトレイヤー */
.effects-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* 雨エフェクト */
.rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1s ease;
}

.rain-container.active {
    opacity: 1;
}

.rain-drop {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(transparent, rgba(200, 200, 200, 0.3));
    animation: rainFall linear infinite;
}

/* 霧エフェクト */
.fog-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="f"><feTurbulence baseFrequency="0.02" numOctaves="3"/><feColorMatrix values="0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0.3 0"/></filter><rect width="100%" height="100%" filter="url(%23f)"/></svg>');
    opacity: 0;
    animation: fogDrift 60s linear infinite;
    transition: opacity 2s ease;
}

.fog-layer.active {
    opacity: 1;
}

/* グリッチエフェクト */
.glitch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    pointer-events: none;
}

.glitch-layer.active {
    animation: glitchEffect 0.3s steps(2) infinite;
    opacity: 1;
}

/* 血のオーバーレイ */
.blood-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(100, 0, 0, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.blood-overlay.active {
    opacity: 1;
}

/* キャラクターレイヤー */
.character-layer {
    position: absolute;
    bottom: 150px;
    left: 0;
    width: 100%;
    height: calc(100% - 170px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 15;
    pointer-events: none;
}

/* 個別キャラクター位置 */
.character-slot {
    position: absolute;
    bottom: 0;
    height: 100%;
    min-width: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.3s ease;
}

.character-slot.visible {
    opacity: 1 !important;
    transform: translateY(0);
    visibility: visible !important;
}

.character-slot.speaking {
    filter: brightness(1.1);
}

.character-slot.not-speaking {
    filter: brightness(0.7);
}

/* キャラクター位置設定 */
.character-slot.position-left {
    left: 5%;
}

.character-slot.position-center {
    left: 50%;
    transform: translateX(-50%);
}

.character-slot.position-center.visible {
    transform: translateX(-50%) translateY(0);
}

.character-slot.position-right {
    right: 5%;
}

/* キャラクター画像 */
.character-image {
    display: block;
    height: 500px;
    max-height: 70vh;
    width: auto;
    max-width: 350px;
    object-fit: contain;
    object-position: bottom;
    transition: transform 0.3s ease;
}

/* デバッグ用 - 画像が見えない場合の背景 */
.character-slot {
    /* border: 2px solid red; */ /* デバッグ用 */
}

/* 表情変化アニメーション */
.character-slot.expression-change .character-image {
    animation: expressionChange 0.2s ease;
}

@keyframes expressionChange {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* キャラクター登場・退場アニメーション */
.character-slot.entering {
    animation: characterEnter 0.5s ease forwards;
}

.character-slot.leaving {
    animation: characterLeave 0.5s ease forwards;
}

@keyframes characterEnter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes characterLeave {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* 特殊演出 */
.character-slot.shake {
    animation: characterShake 0.5s ease;
}

@keyframes characterShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.character-slot.glitch {
    animation: characterGlitch 0.3s steps(2) infinite;
}

@keyframes characterGlitch {
    0% { transform: translate(0); filter: hue-rotate(0deg); }
    25% { transform: translate(-3px, 2px); filter: hue-rotate(90deg); }
    50% { transform: translate(3px, -2px); filter: hue-rotate(180deg); }
    75% { transform: translate(-2px, -1px); filter: hue-rotate(270deg); }
    100% { transform: translate(0); filter: hue-rotate(360deg); }
}

/* 話者の表情アイコン（テキストボックス外） */
.speaker-icon {
    position: fixed;
    bottom: 180px;
    left: 30px;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    background-size: cover;
    background-position: center top;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.6), 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.speaker-icon.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    display: block !important;
}

.speaker-icon.ghost {
    border-color: #6a6a8a;
    box-shadow: 0 0 25px rgba(100, 100, 180, 0.7), 0 5px 15px rgba(0, 0, 0, 0.5);
    filter: brightness(0.9) contrast(1.1);
}



/* テキストボックス */
.text-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.text-box.hidden {
    opacity: 0;
    pointer-events: none;
}

.text-box-inner {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    border: 1px solid rgba(139, 0, 0, 0.5);
    border-radius: 8px;
    padding: 20px 25px;
    position: relative;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.speaker-name {
    font-size: 16px;
    color: var(--accent-color);
    letter-spacing: 3px;
    margin-bottom: 12px;
    min-height: 20px;
}

.dialogue-text {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-color);
    min-height: 60px;
    letter-spacing: 1px;
}

.click-indicator {
    position: absolute;
    bottom: 12px;
    right: 20px;
    color: var(--primary-color);
    animation: bounce 1s infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.click-indicator.visible {
    opacity: 1;
}

/* 選択肢 */
.choices-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    gap: 15px;
    z-index: 30;
    width: 80%;
    max-width: 600px;
}

.choices-container.active {
    display: flex;
}

.choice-btn {
    padding: 20px 30px;
    font-size: 18px;
    font-family: var(--font-main);
    background: rgba(20, 5, 5, 0.9);
    border: 1px solid #3a0000;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: 44px; /* タッチターゲット最小サイズ */
}

.choice-btn:hover {
    background: rgba(60, 10, 10, 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
    transform: translateX(10px);
}

.choice-btn:active {
    background: rgba(80, 15, 15, 0.95);
    transform: scale(0.98);
}

/* ゲームメニュー */
.game-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 25;
}

.game-menu-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid #333;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.game-menu-btn:hover {
    background: rgba(60, 10, 10, 0.9);
    border-color: var(--primary-color);
    color: var(--text-color);
}

/* ===================================
   ログ画面
   =================================== */
.log-content {
    background: rgba(10, 10, 10, 0.98);
    padding: 40px;
    border: 1px solid #333;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.log-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    letter-spacing: 5px;
}

.log-entries {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #222;
    margin-bottom: 20px;
    max-height: 400px;
}

.log-entry {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #222;
}

.log-entry .log-speaker {
    color: var(--accent-color);
    font-size: 14px;
    margin-bottom: 5px;
}

.log-entry .log-text {
    color: #ccc;
    line-height: 1.6;
}

/* ===================================
   セーブ/ロード画面
   =================================== */
.save-load-content {
    background: rgba(10, 10, 10, 0.98);
    padding: 40px;
    border: 1px solid #333;
    max-width: 800px;
    width: 90%;
}

.save-load-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    letter-spacing: 5px;
}

.save-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.save-slot {
    padding: 20px;
    background: rgba(20, 10, 10, 0.8);
    border: 1px solid #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-slot:hover {
    border-color: var(--primary-color);
    background: rgba(40, 10, 10, 0.8);
}

.save-slot .slot-number {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 5px;
}

.save-slot .slot-info {
    color: #888;
    font-size: 12px;
}

.save-slot .slot-empty {
    color: #444;
    font-style: italic;
}

/* ===================================
   ゲームオーバー画面
   =================================== */
.gameover-content {
    text-align: center;
}

.gameover-title {
    font-family: var(--font-horror);
    font-size: 100px;
    color: var(--primary-color);
    text-shadow: 
        0 0 10px var(--text-shadow-color),
        0 0 30px var(--text-shadow-color),
        0 0 60px var(--text-shadow-color);
    animation: deadEndPulse 2s infinite;
    margin-bottom: 30px;
}

.gameover-text {
    font-size: 18px;
    color: #888;
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.8;
}

/* ===================================
   アニメーション
   =================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

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

@keyframes flicker {
    0%, 90%, 100% { opacity: 1; }
    92%, 94%, 96%, 98% { opacity: 0.4; }
    91%, 93%, 95%, 97%, 99% { opacity: 1; }
}

@keyframes titleGlow {
    from { text-shadow: 0 0 10px var(--text-shadow-color), 0 0 20px var(--text-shadow-color), 0 0 40px var(--text-shadow-color); }
    to { text-shadow: 0 0 20px var(--text-shadow-color), 0 0 40px var(--text-shadow-color), 0 0 80px var(--text-shadow-color); }
}

@keyframes drift {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes rainFall {
    to { transform: translateY(100vh); }
}

@keyframes fogDrift {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes glitchEffect {
    0% { 
        background: transparent;
        transform: translate(0);
    }
    25% { 
        background: rgba(255, 0, 0, 0.1);
        transform: translate(-5px, 2px);
    }
    50% { 
        background: rgba(0, 255, 255, 0.1);
        transform: translate(5px, -2px);
    }
    75% { 
        background: rgba(255, 0, 0, 0.1);
        transform: translate(-2px, 5px);
    }
    100% { 
        background: transparent;
        transform: translate(0);
    }
}

@keyframes deadEndPulse {
    0%, 100% { 
        opacity: 1;
        text-shadow: 0 0 10px var(--text-shadow-color), 0 0 30px var(--text-shadow-color);
    }
    50% { 
        opacity: 0.8;
        text-shadow: 0 0 30px var(--text-shadow-color), 0 0 60px var(--text-shadow-color), 0 0 100px var(--text-shadow-color);
    }
}

@keyframes textReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translate(0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-5px, 2px); }
    20%, 40%, 60%, 80% { transform: translate(5px, -2px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* レスポンシブ対応 */
/* タブレット対応 (768px以下) */
@media (max-width: 768px) {
    .title-main {
        font-size: 60px;
        letter-spacing: 15px;
    }
    
    .title-sub {
        font-size: 18px;
        letter-spacing: 8px;
    }
    
    .chapter-title {
        font-size: 16px;
    }
    
    .menu-btn {
        width: 200px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .dialogue-text {
        font-size: 18px;
        min-height: 50px;
    }
    
    .text-box-inner {
        padding: 15px 20px;
    }
    
    .speaker-icon {
        width: 80px;
        height: 80px;
        bottom: 140px;
        left: 15px;
    }
    
    .speaker-name {
        font-size: 14px;
    }
    
    .game-menu {
        top: 10px;
        right: 10px;
    }
    
    .game-menu-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .gameover-title {
        font-size: 50px;
    }
    
    .choice-btn {
        padding: 15px 20px;
        font-size: 16px;
        max-width: 90%;
    }
    
    .choices-container {
        padding: 0 10px;
    }
}

/* スマホ対応 (480px以下) */
@media (max-width: 480px) {
    .title-main {
        font-size: 40px;
        letter-spacing: 10px;
    }
    
    .title-sub {
        font-size: 14px;
        letter-spacing: 5px;
    }
    
    .chapter-title {
        font-size: 14px;
    }
    
    .menu-btn {
        width: 180px;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .warning-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .warning-content h1 {
        font-size: 28px;
    }
    
    .warning-text {
        font-size: 14px;
    }
    
    .text-box {
        padding: 10px 15px;
    }
    
    .text-box-inner {
        padding: 12px 15px;
    }
    
    .dialogue-text {
        font-size: 16px;
        line-height: 1.6;
        min-height: 40px;
    }
    
    .speaker-name {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .speaker-icon {
        width: 60px;
        height: 60px;
        bottom: 120px;
        left: 10px;
        border-width: 2px;
    }
    
    .game-menu {
        top: 5px;
        right: 5px;
        gap: 5px;
    }
    
    .game-menu-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .choice-btn {
        padding: 12px 15px;
        font-size: 14px;
        max-width: 95%;
    }
    
    .gameover-title {
        font-size: 35px;
    }
    
    .gameover-message {
        font-size: 14px;
        padding: 0 20px;
    }
    
    .log-content {
        padding: 20px 15px;
    }
    
    .log-entry {
        font-size: 14px;
    }
    
    .settings-content {
        padding: 20px 15px;
    }
    
    .setting-item label {
        font-size: 14px;
    }
    
    /* セーブ/ロード画面 */
    .save-slot {
        padding: 10px;
    }
    
    .save-slot-info {
        font-size: 12px;
    }
}

/* 非常に小さい画面 (360px以下) */
@media (max-width: 360px) {
    .title-main {
        font-size: 32px;
        letter-spacing: 8px;
    }
    
    .title-sub {
        font-size: 12px;
    }
    
    .dialogue-text {
        font-size: 14px;
    }
    
    .speaker-icon {
        width: 50px;
        height: 50px;
        bottom: 110px;
        left: 8px;
    }
    
    .choice-btn {
        font-size: 13px;
        padding: 10px 12px;
    }
}
