@charset "UTF-8";

:root {
    --bg-main: #0d0f12;
    --bg-card: #161a22;
    --bg-card-sub: #212631;
    --text-main: #f0f3f6;
    --text-muted: #8b949e;
    --kakao-yellow: #fee500;
    --kakao-text: #191919;
    --accent-red: #ff3355;
    --accent-green: #00e676;
    --accent-cyan: #00e5ff;
    --accent-yellow: #ffc400;
    --border-color: #30363d;
    --font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.8s ease;
}

/* =========================================
   장면별 리얼 배경 테마 (5종)
   ========================================= */
/* 1. 강남역 길거리 밤거리 */
body.bg-street {
    background: radial-gradient(circle at 50% 10%, #1c2333 0%, #0d1117 70%, #07090d 100%);
}
/* 2. 조용한 룸카페 밀실 */
body.bg-cafe {
    background: radial-gradient(circle at 50% 20%, #2e2213 0%, #1a1309 60%, #0c0803 100%);
}
/* 3. 새벽센터 / 상가 3층 공포 */
body.bg-center {
    background: radial-gradient(circle at 50% 15%, #2a313d 0%, #13171f 60%, #0a0c10 100%);
    animation: center-flicker 4s infinite alternate;
}
@keyframes center-flicker {
    0%, 95% { filter: brightness(1); }
    96%, 98% { filter: brightness(0.85); }
    100% { filter: brightness(1.05); }
}
/* 4. 대도진리원 비밀 제단 / 촛불 */
body.bg-altar {
    background: radial-gradient(circle at 50% 30%, #3a0d14 0%, #1f0509 60%, #0a0103 100%);
    animation: candle-flicker 2s infinite ease-in-out;
}
@keyframes candle-flicker {
    0%, 100% { box-shadow: inset 0 0 50px rgba(255, 51, 85, 0.2); }
    50% { box-shadow: inset 0 0 100px rgba(255, 51, 85, 0.45); }
}
/* 5. 소모임 감성 와인바 */
body.bg-bar {
    background: radial-gradient(circle at 50% 20%, #29122b 0%, #170719 60%, #09020a 100%);
}

/* 앱 컨테이너 */
#app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 화면 전환 */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-out;
}
.screen.active {
    display: block;
}

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

/* 상단 글로벌 헤더 */
.global-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-red);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-actions {
    display: flex;
    gap: 6px;
}

.btn-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 5px 8px;
    font-size: 0.78rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-header:hover {
    background: var(--bg-card-sub);
    border-color: #666;
}

/* =========================================
   시작 화면 (메인)
   ========================================= */
.hero-section {
    text-align: center;
    padding: 18px 0 12px 0;
}

.hero-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 51, 85, 0.15);
    color: var(--accent-red);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 51, 85, 0.3);
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 40%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.chapter-select-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chapter-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.chapter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.25s;
}
.chapter-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    box-shadow: 0 6px 16px rgba(0, 229, 255, 0.15);
}

.chapter-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.chapter-badge {
    font-size: 0.7rem;
    background: var(--bg-card-sub);
    color: var(--accent-yellow);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.chapter-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.chapter-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* =========================================
   게임 플레이: 리얼 카톡/채팅 뷰 인터페이스
   ========================================= */
.chat-device-frame {
    background: rgba(18, 22, 28, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* 채팅 상대방 프로필 헤더 */
.chat-profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(22, 26, 34, 0.95);
    border-bottom: 1px solid var(--border-color);
}

.chat-avatar {
    width: 38px;
    height: 38px;
    background: #2a313d;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    border: 2px solid #3d4655;
    flex-shrink: 0;
}

.chat-profile-info {
    flex: 1;
    overflow: hidden;
}

.chat-sender-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-location-badge {
    font-size: 0.72rem;
    color: var(--accent-cyan);
}

/* HUD (멘탈, 의심도, 잔고) */
.chat-hud-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    background: rgba(13, 16, 21, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
}

.hud-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.hud-stat-label {
    color: var(--text-muted);
}
.hud-stat-val {
    font-weight: 800;
}

.mini-bar {
    width: 50px;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
}
.mini-bar-fill {
    height: 100%;
    transition: width 0.3s;
}

/* 카톡 대화창 스크롤 영역 */
.chat-messages-container {
    padding: 16px 12px;
    min-height: 250px;
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 카톡 말풍선 스타일 */
.chat-bubble-row {
    display: flex;
    gap: 8px;
    max-width: 88%;
    animation: bubblePop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bubblePop {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-bubble-row.other {
    align-self: flex-start;
}
.chat-bubble-row.my {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bubble-avatar {
    width: 32px;
    height: 32px;
    background: #252b36;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.bubble-content {
    display: flex;
    flex-direction: column;
}

.bubble-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    margin-left: 2px;
}

.bubble-text {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: keep-all;
}

.other-bubble {
    background: #222731;
    color: #e6edf3;
    border-top-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.my-bubble {
    background: var(--kakao-yellow);
    color: var(--kakao-text);
    font-weight: 600;
    border-top-right-radius: 2px;
}

/* =========================================
   타임어택(초시계) 바
   ========================================= */
.timeattack-bar-wrap {
    background: #14171d;
    padding: 6px 14px;
    border-top: 1px solid var(--border-color);
    display: none;
}

.timeattack-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.timeattack-bar-bg {
    width: 100%;
    height: 7px;
    background: #252a33;
    border-radius: 4px;
    overflow: hidden;
}

.timeattack-bar-fill {
    height: 100%;
    width: 100%;
    background: var(--accent-cyan);
    transition: width 0.1s linear, background-color 0.2s;
}

/* 선택지 버튼 영역 */
.choices-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.choice-btn {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 13px 15px;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    transition: all 0.2s;
    line-height: 1.4;
}
.choice-btn:hover {
    background: var(--bg-card-sub);
    border-color: #58a6ff;
    transform: translateX(3px);
}

/* 훼이크 버튼 & 글리치 */
#fake-evade-btn {
    position: relative;
    transition: transform 0.12s ease-out;
}

.glitch-text-btn {
    animation: glitch-anim 0.2s infinite;
    border-color: red !important;
}

@keyframes glitch-anim {
    0% { transform: translate(0) }
    25% { transform: translate(-3px, 2px) }
    50% { transform: translate(3px, -2px) }
    75% { transform: translate(-2px, -3px) }
    100% { transform: translate(0) }
}

/* 화면 흔들림 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.shake-effect {
    animation: shake 0.35s ease-in-out;
}

/* 인벤토리 (찬스 아이템) */
.inventory-section {
    margin-bottom: 12px;
}
.inventory-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.item-slot {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 3px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.item-slot.available:hover {
    border-color: var(--accent-yellow);
    background: var(--bg-card-sub);
    transform: translateY(-2px);
}
.item-slot.used {
    opacity: 0.35;
    cursor: not-allowed;
}
.item-icon {
    display: block;
    font-size: 1.15rem;
}
.item-name {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-badge {
    display: inline-block;
    font-size: 0.58rem;
    color: var(--accent-yellow);
}

/* =========================================
   인터랙티브 미니게임 태블릿 모달
   ========================================= */
.tablet-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}
.tablet-modal-overlay.active {
    display: flex;
}

.tablet-frame {
    background: #1c2128;
    border: 3px solid #444c56;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    animation: popIn 0.25s ease-out;
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.tablet-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.tablet-question {
    font-size: 0.95rem;
    color: #e6edf3;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 스티커 미니게임 */
.survey-options {
    margin-bottom: 20px;
}
.survey-option {
    background: #2d333b;
    border: 2px dashed #58a6ff;
    border-radius: 10px;
    padding: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #c9d1d9;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.heart-sticker {
    background: linear-gradient(135deg, #ff3355, #ff0077);
    color: #fff;
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-block;
    box-shadow: 0 6px 20px rgba(255, 51, 85, 0.5);
    transition: all 0.2s;
    user-select: none;
}
.heart-sticker:active {
    transform: scale(0.92);
}

/* 도형 심리테스트 미니게임 그리드 */
.shapes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.shape-card {
    background: #2d333b;
    border: 1px solid #444c56;
    border-radius: 12px;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    text-align: center;
}
.shape-card:hover {
    background: #373e47;
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}
.shape-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 4px;
}
.shape-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 2px;
}
.shape-desc {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* 송금 취소 연타 미니게임 */
.tap-counter-box {
    background: #2d333b;
    border-radius: 8px;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.tap-giant-btn {
    background: linear-gradient(135deg, #ff0055, #cc0033);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 20px;
    font-size: 1.25rem;
    font-weight: 900;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 0, 85, 0.5);
    user-select: none;
    transition: transform 0.05s;
}
.tap-giant-btn:active {
    transform: scale(0.94);
}

/* =========================================
   결과 화면 & 카드 캡처 영역
   ========================================= */
.result-card-wrap {
    background: #111317;
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #30363d;
}

.card-brand {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-red);
}

.result-grade-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 900;
    color: #000;
    margin-bottom: 12px;
}

.result-title {
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 6px;
    color: #fff;
}

.result-subtitle {
    font-size: 0.9rem;
    color: var(--accent-yellow);
    margin-bottom: 14px;
    font-weight: 700;
}

.result-desc {
    font-size: 0.9rem;
    color: #c9d1d9;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    padding: 12px;
    border-radius: 8px;
    word-break: keep-all;
}

.final-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

.final-stat-box {
    background: #1c2128;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 8px 4px;
}
.stat-box-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: block;
}
.stat-box-val {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
}

.result-watermark {
    font-size: 0.7rem;
    color: #666;
    margin-top: 8px;
}

.action-btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff3355, #cc0033);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}
.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.blog-promo-banner {
    background: linear-gradient(135deg, #1f242e, #14171f);
    border: 1px solid #3b4352;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.blog-promo-title {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--accent-cyan);
}
.blog-promo-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.blog-promo-arrow {
    font-size: 1.3rem;
    color: var(--text-muted);
}

.adsense-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 8px;
    text-align: center;
    margin: 16px 0;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.ad-notice {
    font-size: 0.7rem;
    color: #555;
    margin-bottom: 4px;
}

/* =========================================
   도감 및 가이드 모달
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
}
.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    border-radius: 18px 18px 0 0;
    padding: 18px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 14px;
}
.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
}
.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.collection-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.collection-card {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}
.collection-card.locked { opacity: 0.45; }
.col-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.col-grade {
    font-size: 0.65rem;
    font-weight: 900;
    color: #000;
    padding: 1px 6px;
    border-radius: 3px;
}
.col-grade.locked { background: #444; color: #aaa; }
.col-title { font-size: 0.9rem; font-weight: 700; color: #fff; }
.col-sub { font-size: 0.78rem; color: var(--text-muted); }

.guide-article { font-size: 0.88rem; line-height: 1.6; color: #c9d1d9; }
.guide-article h3 {
    font-size: 0.98rem;
    color: var(--accent-cyan);
    margin: 16px 0 6px 0;
    border-left: 3px solid var(--accent-cyan);
    padding-left: 6px;
}
.guide-article p { margin-bottom: 8px; }
.guide-callout {
    background: rgba(255, 196, 0, 0.08);
    border: 1px solid rgba(255, 196, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

/* =========================================
   v3 개편: 메신저 배경, 내레이션, 토스트, 결과 카드 확장
   ========================================= */
/* 6. 오픈채팅 / 줌 (메신저 화면) */
body.bg-phone {
    background: radial-gradient(circle at 50% 10%, #10263a 0%, #0a1621 60%, #05090e 100%);
}

.chapter-card { display:block; width:100%; text-align:left; color:inherit; font:inherit; overflow:hidden; }
.chapter-art, .scene-art { display:block; background-image:url('../assets/chapter-panorama.png'); background-size:400% auto; background-repeat:no-repeat; }
.chapter-art { height:128px; margin:-14px -14px 14px; border-bottom:1px solid rgba(255,255,255,.12); }
.art-1 { background-position:0% center; }
.art-2 { background-position:33.333% center; }
.art-3 { background-position:66.667% center; }
.art-4 { background-position:100% center; }
.scene-art { height:118px; box-shadow:inset 0 -24px 28px rgba(6,12,20,.65); }
.chapter-meta { display:block; color:#91a8b9; font-size:.72rem; margin-top:12px; }
.chapter-card:focus-visible, .choice-btn:focus-visible { outline:3px solid var(--accent-cyan); outline-offset:3px; }
.reading-option { display:flex; align-items:center; gap:9px; padding:12px; border:1px solid var(--border-color); border-radius:10px; color:#dce8ef; font-size:.85rem; }
.reading-option input { width:18px; height:18px; accent-color:var(--accent-cyan); }
.play-hint { color:#94a5b8; font-size:.8rem; line-height:1.7; margin:10px 0 18px; }
.journey-bar { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; color:#9cb5c8; font-size:.72rem; gap:8px; border-bottom:1px solid var(--border-color); }
.decision-review { text-align:left; margin:18px 0; padding:12px; background:rgba(255,255,255,.04); border-radius:10px; font-size:.8rem; line-height:1.7; color:#b9c8d4; }
.decision-review summary { cursor:pointer; color:var(--accent-cyan); }
.decision-review ol { padding-left:20px; }
.decision-review li { margin-top:10px; }
@media(max-width:420px) { .chapter-art { height:110px; } .scene-art { height:96px; } .chat-profile-header { flex-wrap:wrap; } .chat-mode-badge { margin-left:auto; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }

.chat-hud-bar { position: relative; }

.chat-mode-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #bbb;
}

.chat-divider {
    align-self: center;
    margin: 14px auto 6px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #9aa4b2;
    font-size: 0.7rem;
    text-align: center;
    width: fit-content;
}

.chat-narration {
    margin: 8px 18px;
    color: #c9b98a;
    font-size: 0.82rem;
    font-style: italic;
    text-align: center;
    line-height: 1.55;
    animation: popIn 0.3s ease-out;
}

.stat-float {
    position: absolute;
    right: 14px;
    top: -4px;
    font-size: 0.8rem;
    font-weight: 800;
    pointer-events: none;
    animation: stat-float-up 1.1s ease-out forwards;
}
.stat-float.neg { color: var(--accent-red); }
.stat-float.pos { color: var(--accent-cyan); }
@keyframes stat-float-up {
    0% { opacity: 0; transform: translateY(6px); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-22px); }
}

/* 멘탈이 바닥나면 화면 가장자리가 어두워진다 */
#app.low-mental {
    box-shadow: inset 0 0 120px rgba(255, 0, 40, 0.35);
    animation: low-mental-pulse 1.2s infinite ease-in-out;
}
@keyframes low-mental-pulse {
    0%, 100% { filter: saturate(1); }
    50% { filter: saturate(0.6) brightness(0.9); }
}

.item-slot.locked {
    opacity: 0.55;
    filter: grayscale(0.8);
}
.item-slot.available {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(255, 196, 0, 0.25);
}

.game-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    max-width: 90%;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(20, 24, 32, 0.96);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    white-space: pre-line;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease-out;
    z-index: 2000;
}
.game-toast.show { opacity: 1; transform: translate(-50%, 0); }
.game-toast.good { border-color: var(--accent-green); }
.game-toast.warn { border-color: var(--accent-yellow); }

.chapter-tag {
    display: inline-block;
    margin: 6px 0 2px;
    font-size: 0.7rem;
    color: var(--accent-cyan);
}
.chapter-new {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 14px rgba(255, 196, 0, 0.2);
}
.chapter-new .chapter-tag { color: var(--accent-yellow); font-weight: 800; }

.challenge-banner {
    margin: 0 0 14px;
    padding: 14px;
    border-radius: 12px;
    border: 1px dashed var(--accent-red);
    background: rgba(255, 51, 85, 0.08);
}
.challenge-label { font-size: 0.72rem; color: var(--accent-red); font-weight: 800; }
.challenge-title { margin: 4px 0; font-size: 1rem; font-weight: 800; color: #fff; }
.challenge-sub { font-size: 0.78rem; color: #aaa; }

.result-badge-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.result-new-badge {
    display: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-yellow);
    color: #111;
    font-size: 0.72rem;
    font-weight: 800;
    animation: popIn 0.4s ease-out;
}
.result-persona {
    margin: 10px auto 0;
    padding: 8px 14px;
    width: fit-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
}
.result-score-box {
    margin: 16px 0 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
}
.result-score-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #ccc;
}
.result-score-head strong { font-size: 1.3rem; color: var(--accent-red); }
.result-score-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow), var(--accent-red));
    transition: width 1s ease-out;
}

.btn-share {
    background: #fee500;
    color: #191919;
}

.tablet-footnote {
    margin-top: 10px;
    font-size: 0.68rem;
    color: #777;
}

.site-disclaimer {
    margin: 28px 14px 18px;
    font-size: 0.68rem;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* 좁은 화면에서 헤더 줄바꿈 방지 */
.brand-title { white-space: nowrap; flex-shrink: 0; }
.header-actions { flex-wrap: nowrap; gap: 4px; }
.btn-header { white-space: nowrap; }
@media (max-width: 420px) {
    .brand-title { font-size: 1rem; }
    .btn-header { padding: 6px 8px; font-size: 0.72rem; }
}
