@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0914; --surface: #12111a; --surface-alt: #14131e;
  --border: #2a2838; --text: #e8e4d9; --text-muted: #8a8698;
  --text-dim: #6b6880; --text-faint: #4a4860;
  --gold: #c9a84c; --gold-dark: #a08030; --blue: #6b8cce;
  --green: #6bce6b; --red: #ce4b4b; --orange: #e07b39; --purple: #9b6bce;
  --font-display: 'Cinzel', serif;
  --font-body: 'Crimson Text', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --safe-bottom: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; overscroll-behavior-y: contain; -webkit-user-select: none; user-select: none; min-height: 100vh; }
input, textarea { -webkit-user-select: text; user-select: text; }
a { color: var(--gold); text-decoration: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.container { max-width: 520px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
.animate-in { animation: fadeIn 0.4s ease both; }
.animate-delay-1 { animation-delay: 0.1s; } .animate-delay-2 { animation-delay: 0.2s; }
.btn { border: none; border-radius: 8px; padding: 12px 24px; font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; }
.btn:active { transform: scale(0.98); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1a0a2e; }
.btn-outline { background: transparent; border: 1px solid rgba(201,168,76,0.3); color: var(--gold); }
.btn-blue { background: linear-gradient(135deg, var(--blue), #4a6aae); color: white; }
.btn-danger { background: rgba(206,75,75,0.1); border: 1px solid rgba(206,75,75,0.3); color: var(--red); }
.btn-block { width: 100%; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card-clickable { cursor: pointer; }
.section-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--gold); letter-spacing: 0.08em; margin-bottom: 14px; }
.top-bar { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, var(--bg) 70%, transparent); padding: 12px 20px 20px; display: flex; justify-content: space-between; align-items: center; }
.top-bar-logo { font-family: var(--font-display); font-size: 18px; font-weight: 900; color: var(--gold); letter-spacing: 0.05em; }
.gem-badge { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px; font-family: var(--font-mono); font-size: 12px; color: var(--blue); cursor: pointer; }
.energy-bar-wrap { display: flex; align-items: center; gap: 8px; }
.energy-bar-track { width: 80px; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.energy-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; background: var(--gold); }
.energy-bar-text { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(180deg, transparent, var(--bg) 30%, var(--bg)); padding: 14px 0 calc(10px + var(--safe-bottom)); display: flex; justify-content: center; gap: 6px; z-index: 100; }
.nav-btn { background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 6px 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nav-btn.active { background: rgba(201,168,76,0.15); border-color: rgba(201,168,76,0.3); }
.nav-btn-icon { font-size: 20px; }
.nav-btn-label { font-family: var(--font-display); font-size: 9px; letter-spacing: 0.08em; color: var(--text-dim); }
.nav-btn.active .nav-btn-label { color: var(--gold); font-weight: 700; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.story-card-thumb { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 48px; position: relative; }
.story-card-body { padding: 14px 16px 16px; }
.story-card-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.story-card-author { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.story-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.4; margin-bottom: 8px; }
.story-card-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }
.premium-badge { position: absolute; top: 10px; right: 10px; background: linear-gradient(135deg, var(--gold), #f0d68a); color: #1a0a2e; font-size: 10px; font-family: var(--font-display); font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.choice-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; cursor: pointer; text-align: left; font-family: var(--font-body); font-size: 15px; color: var(--text); line-height: 1.4; width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.choice-btn:hover { border-color: var(--gold); }
.risk-badge { font-family: var(--font-mono); font-size: 9px; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; text-transform: uppercase; }
.risk-low { background: rgba(107,206,107,0.13); color: var(--green); border: 1px solid rgba(107,206,107,0.25); }
.risk-moderate { background: rgba(224,123,57,0.13); color: var(--orange); border: 1px solid rgba(224,123,57,0.25); }
.risk-high { background: rgba(206,75,75,0.13); color: var(--red); border: 1px solid rgba(206,75,75,0.25); }
.stat-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-family: var(--font-mono); font-size: 11px; }
.stat-label { color: var(--text-muted); } .stat-value { color: var(--text); font-weight: 500; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.shop-item-icon { font-size: 28px; }
.shop-item-info { flex: 1; }
.shop-item-name { font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.shop-item-desc { font-size: 12px; color: var(--text-dim); }
.shop-price-btn { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1a0a2e; border: none; border-radius: 6px; padding: 6px 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.gem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gem-card { background: linear-gradient(135deg, var(--surface), #1a192e); border: 1px solid #2a2850; border-radius: 12px; padding: 16px; text-align: center; }
.gem-card-icon { font-size: 32px; margin-bottom: 6px; }
.gem-card-name { font-family: var(--font-display); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.gem-card-bonus { font-size: 11px; color: var(--green); margin-bottom: 8px; }
.input { width: 100%; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--font-body); font-size: 16px; outline: none; }
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--text-faint); }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid rgba(201,168,76,0.3); border-radius: 10px; padding: 10px 20px; font-size: 14px; z-index: 200; box-shadow: 0 8px 30px rgba(0,0,0,0.5); animation: fadeIn 0.3s ease; white-space: nowrap; }
.page-content { padding-bottom: 100px; }
