
:root{
  --bg:#07090d;
  --panel:rgba(18,22,30,.92);
  --panel2:rgba(13,16,22,.96);
  --line:#2c3442;
  --text:#f3f5f7;
  --muted:#9ca5b4;
  --accent:#f4a300;
  --accent2:#ffbf3f;
  --danger:#a94444;
  --shadow:0 24px 70px rgba(0,0,0,.45);
}

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

html,body{margin:0;min-height:100%;background:var(--bg)}

body{
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  min-height:100vh;
  overflow-x:hidden;
}

button{font:inherit}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% -10%,rgba(80,102,140,.28),transparent 42%),
    radial-gradient(circle at 10% 80%,rgba(30,48,72,.14),transparent 32%);
}

.snow{
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.18;
  background-image:
    radial-gradient(circle,rgba(255,255,255,.75) 0 1px,transparent 1.5px),
    radial-gradient(circle,rgba(255,255,255,.5) 0 1px,transparent 1.5px);
  background-size:58px 58px,93px 93px;
  background-position:10px 20px,35px 5px;
  animation:snow 18s linear infinite;
}
@keyframes snow{to{background-position:10px 400px,35px 460px}}

.app{
  width:100%;
  max-width:720px;
  margin:0 auto;
  min-height:100vh;
  padding:
    max(18px,env(safe-area-inset-top))
    18px
    max(28px,env(safe-area-inset-bottom));
  position:relative;
  z-index:1;
}

.hidden{display:none!important}

.start-screen{
  min-height:calc(100vh - 46px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:30px 10px;
}

.start-art{
  width:92px;height:92px;
  border:1px solid #384253;
  border-radius:28px;
  display:grid;place-items:center;
  font-size:46px;
  background:linear-gradient(145deg,#151b25,#0b0e14);
  box-shadow:var(--shadow);
  margin-bottom:24px;
}

.eyebrow{
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:2.2px;
  margin-bottom:12px;
}

h1{
  margin:0;
  font-size:clamp(36px,11vw,62px);
  line-height:.95;
  letter-spacing:2px;
}

.lead{
  margin:15px 0 0;
  font-size:21px;
  font-weight:700;
}

.hint{
  max-width:440px;
  color:var(--muted);
  line-height:1.5;
  margin:14px auto 0;
  font-size:16px;
}

.primary,.secondary,.text-button,.icon-button{
  border:0;
  cursor:pointer;
}

.primary{
  width:100%;
  max-width:430px;
  margin-top:28px;
  padding:17px 20px;
  border-radius:16px;
  background:linear-gradient(180deg,var(--accent2),var(--accent));
  color:#121212;
  font-weight:900;
  font-size:17px;
  letter-spacing:.4px;
  box-shadow:0 10px 30px rgba(244,163,0,.18);
}

.primary:active,.choice:active,.secondary:active{transform:scale(.985)}

.small-note{
  color:#6f7887;
  font-size:12px;
  margin-top:14px;
}

.topbar{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:46px;
}

.icon-button{
  width:42px;height:42px;
  border-radius:13px;
  color:var(--text);
  background:#121720;
  border:1px solid var(--line);
  font-size:22px;
}

.title-mini{
  flex:1;
  font-size:13px;
  font-weight:900;
  letter-spacing:1.7px;
  color:#dce1e8;
}

.text-button{
  background:transparent;
  color:#9ea7b6;
  padding:8px 2px;
  font-size:13px;
}

.progress-track{
  height:3px;
  border-radius:3px;
  background:#1a202a;
  overflow:hidden;
  margin:13px 0 17px;
}

.progress-bar{
  height:100%;
  width:2%;
  background:var(--accent);
  transition:width .3s ease;
}

.story-card{
  background:linear-gradient(180deg,var(--panel),var(--panel2));
  border:1px solid var(--line);
  border-radius:24px;
  padding:23px 19px 25px;
  box-shadow:var(--shadow);
}

.chapter{
  color:var(--accent);
  font-size:11px;
  font-weight:900;
  letter-spacing:2px;
  margin-bottom:17px;
}

.story{
  font-size:17px;
  line-height:1.62;
  white-space:pre-line;
  color:#f0f2f5;
}

.choices{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:13px;
}

.choice{
  width:100%;
  margin:0;
  text-align:left;
  border-radius:16px;
  padding:15px 16px;
  background:#121720;
  color:#f0f2f5;
  border:1px solid #303949;
  font-size:15px;
  font-weight:700;
  line-height:1.35;
  transition:.15s ease;
}

.choice:hover{background:#19202b;border-color:#4b5668}

.ending-box{
  margin-top:14px;
  padding:17px;
  border-radius:16px;
  background:#121720;
  border:1px solid #4a3c27;
  color:#e9edf2;
  text-align:center;
  line-height:1.5;
}

.modal{
  position:fixed;
  inset:0;
  z-index:10;
  background:rgba(0,0,0,.68);
  display:grid;
  place-items:end center;
  padding:18px;
}

.modal-card{
  width:100%;
  max-width:520px;
  background:#171c25;
  border:1px solid #3a4352;
  border-radius:24px;
  padding:22px;
  box-shadow:0 25px 80px rgba(0,0,0,.55);
}

.modal-card h2{margin:0 0 8px;font-size:21px}
.modal-card p{margin:0;color:var(--muted);line-height:1.5}

.modal-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:18px;
}

.secondary{
  border-radius:14px;
  padding:14px;
  background:#252c38;
  color:#fff;
  font-weight:800;
}

@media (min-width:600px){
  .app{padding-left:26px;padding-right:26px}
  .story-card{padding:28px 27px 30px}
  .story{font-size:18px}
}

@media (prefers-reduced-motion:reduce){
  .snow{animation:none}
}
