/* 黄昏放学路 —— 颜色都取自你拍的那几张晚霞 */
:root {
  --ink: #140D12;        /* 剪影黑 */
  --dusk: #5B4B7A;       /* 暮紫 */
  --glow: #F08A8C;       /* 霞粉 */
  --ember: #FF7A3D;      /* 余烬橙 */
  --sun: #FFD27A;        /* 落日金 */
  --haze: #FFE9D6;       /* 雾白，正文色 */
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --hand: "Ma Shan Zheng", "KaiTi", "STKaiti", cursive;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--ink); color: var(--haze); font-family: var(--serif);
  overflow: hidden; opacity: 0; transition: opacity .48s ease;
  user-select: none; -webkit-user-select: none;
}
body.in { opacity: 1; }
body.out { opacity: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }

/* 一屏一景：手机上铺满，电脑上居中成手机宽度 */
.scene {
  position: fixed; top: 0; bottom: 0; left: 50%; width: min(100vw, 480px);
  transform: translateX(-50%); overflow: hidden; touch-action: manipulation;
}
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity 1.4s ease; }
.bg.pan { animation: pan 46s ease-in-out infinite alternate; }
@keyframes pan { from { background-position: 22% center; } to { background-position: 82% center; } }
.shade { position: absolute; inset: 0; pointer-events: none; }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.layer { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; padding: max(22px, env(safe-area-inset-top)) 22px max(26px, env(safe-area-inset-bottom)); }

.hand { font-family: var(--hand); font-weight: 400; }

/* 主按钮：一道落日余晖 */
.btn {
  display: inline-block; padding: 14px 34px; font-size: 18px; letter-spacing: .3em; text-indent: .3em;
  color: var(--ink); text-decoration: none; font-weight: 700;
  background: linear-gradient(100deg, var(--sun), var(--ember) 70%, var(--glow));
  border-radius: 999px; box-shadow: 0 0 28px rgba(255, 122, 61, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .15s;
}
.btn:active { transform: scale(.95); }
.btn[disabled] { filter: grayscale(.8) brightness(.6); box-shadow: none; }
.ghost {
  padding: 8px 16px; font-size: 14px; border: 1px solid rgba(255, 233, 214, .45); border-radius: 999px;
  background: rgba(20, 13, 18, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.mute {
  position: absolute; z-index: 9; top: max(16px, env(safe-area-inset-top)); right: 16px;
  width: 38px; height: 38px; border-radius: 50%; font-size: 16px;
  border: 1px solid rgba(255, 233, 214, .45); background: rgba(20, 13, 18, .4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.mute.off { opacity: .55; font-size: 13px; }

.toast {
  position: fixed; z-index: 20; left: 50%; bottom: 12%; transform: translate(-50%, 20px);
  max-width: min(86vw, 400px); padding: 12px 20px; font-size: 15px; line-height: 1.6; text-align: center;
  color: var(--ink); background: linear-gradient(100deg, var(--sun), #FFB36B);
  border-radius: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
  opacity: 0; pointer-events: none; transition: all .45s cubic-bezier(.2, 1.3, .4, 1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 各站通用：页头、返回、礼物抽屉和卡片 */
.head { margin-right: 50px; text-shadow: 0 2px 8px rgba(20, 13, 18, .9); }
.head h1 { font-size: 20px; font-weight: 900; }
.head p { margin-top: 2px; font-size: 19px; opacity: .92; }
.back { position: absolute; z-index: 5; left: 22px; bottom: max(22px, env(safe-area-inset-bottom)); transition: opacity .3s; }
.sheet-on .back { opacity: 0; pointer-events: none; }
.sheet {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(rgba(43, 28, 58, .82), rgba(20, 13, 18, .94));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 210, 122, .5); border-radius: 26px 26px 0 0;
  transform: translateY(105%); transition: transform .7s cubic-bezier(.2, 1.1, .3, 1);
}
.sheet-on .sheet { transform: none; }
.sheet h2 { font-size: 23px; font-weight: 400; text-align: center; margin-bottom: 12px; }
.sheet .btn { display: block; width: 100%; margin-top: 14px; padding: 12px; }
.sheet .more { margin-top: 10px; text-align: center; font-size: 12px; opacity: .55; }
.cards { display: flex; flex-direction: column; gap: 9px; }
.card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; text-align: left;
  border: 1px solid rgba(255, 233, 214, .25); border-radius: 16px; background: rgba(255, 233, 214, .07);
  transition: all .25s; animation: cardIn .5s ease backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } }
.card i { font-style: normal; font-size: 30px; }
.card b { display: block; font-size: 16px; }
.card small { font-size: 12px; opacity: .7; }
.card.on { border-color: var(--sun); background: rgba(255, 210, 122, .18); box-shadow: 0 0 22px rgba(255, 122, 61, .4); }
.card.secret { border-style: dashed; border-color: var(--glow); }

@media (prefers-reduced-motion: reduce) {
  .bg.pan { animation: none; }
  * { transition-duration: .01s !important; }
}
