/* 《人间回响》v2：图像变奏、季节、上锁选项、右栏新盒子、规划五年、记忆铺满的走马灯、奇遇图鉴 */

/* ZCOOL XiaoWei 把「回」画成了一个实心方块：这一个字改用系统里的宋体/黑体 */
@font-face { font-family: "RJ Hui"; src: local("Noto Serif CJK SC"), local("Source Han Serif SC"), local("Songti SC"), local("STSong"), local("SimSun"), local("Noto Sans CJK SC"), local("PingFang SC"), local("Microsoft YaHei"); unicode-range: U+56DE; }
:root { --display: "RJ Hui", "ZCOOL XiaoWei", "Noto Serif SC", serif; --brush: "Ma Shan Zheng", "RJ Hui", "ZCOOL XiaoWei", "Noto Serif SC", serif; }

/* ================================================================ 图像变奏 */
.va { position: relative; overflow: hidden; isolation: isolate; background-image: none !important; }
.va::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--tint, none), var(--art); background-size: cover; background-position: var(--px, 50%) var(--py, 50%); background-blend-mode: soft-light, normal; transform: scale(var(--z, 1)) scaleX(var(--fx, 1)); transform-origin: 50% 50%; filter: var(--grade, none); }
.evcard .art.va::before { animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { from { translate: 0 0; } to { translate: var(--dx, 0) var(--dy, 0); } }
@media (prefers-reduced-motion: reduce) { .evcard .art.va::before { animation: none; } }

/* 季节粒子：春花瓣、夏萤火（默认）、秋叶、冬雪 */
#motes.s-spring .mote { background: radial-gradient(circle at 40% 40%, rgba(255, 222, 232, 0.95), rgba(255, 176, 200, 0) 72%); border-radius: 70% 0 70% 0; animation-name: fall; }
#motes.s-autumn .mote { background: radial-gradient(circle at 40% 40%, rgba(246, 176, 92, 0.95), rgba(214, 120, 48, 0) 72%); border-radius: 0 70% 0 70%; animation-name: fall; }
#motes.s-winter .mote { background: radial-gradient(circle, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0) 70%); animation-name: fall; }
@keyframes fall { from { transform: translate(0, -125vh) rotate(0deg); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 0.85; } to { transform: translate(70px, 0) rotate(320deg); opacity: 0; } }

/* ================================================================ 上锁的选项与奇遇 */
.choice.locked { opacity: 0.62; cursor: not-allowed; background: rgba(240, 229, 208, 0.6); border-style: dashed; }
.choice.locked:hover { transform: none; box-shadow: none; border-color: var(--line); }
.choice.locked b { font-weight: 500; color: var(--ink-2); }
.aitag { display: inline-block; margin-right: 8px; padding: 1px 9px; border-radius: 999px; background: linear-gradient(110deg, #f6dfa6, #fff3d2); color: #8a5d1b; letter-spacing: 0.15em; }
.evcard.ai { box-shadow: 0 0 0 1px rgba(226, 187, 108, 0.7), 0 0 50px -10px rgba(255, 210, 120, 0.7), 0 30px 80px -30px rgba(90, 58, 24, 0.6); }

/* ================================================================ 右栏新盒子 */
.win { font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line); line-height: 1.5; }
.win:last-child { border-bottom: 0; }
.win small { display: block; color: var(--ink-3); font-size: 11.5px; }
.win .wbar { height: 4px; border-radius: 4px; background: var(--paper-3); margin: 4px 0 2px; overflow: hidden; }
.win .wbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #8fc3b9); }
.mys { display: flex; gap: 8px; margin: 6px 0; }
.mys i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--gold); background: rgba(255, 252, 245, 0.6); }
.mys i.on { background: radial-gradient(circle at 35% 30%, #fffbe8, #f3cc76 45%, #c08a35); box-shadow: 0 0 10px rgba(255, 210, 130, 0.9); }

/* ================================================================ 规划五年 */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.popt { position: relative; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 252, 245, 0.9); padding: 6px 6px 8px; cursor: pointer; text-align: center; transition: all 0.2s var(--ease); }
.popt:hover { border-color: var(--gold); transform: translateY(-2px); }
.popt .pa { aspect-ratio: 1.3; border-radius: 8px; margin-bottom: 6px; }
.popt b { display: block; font-size: 13.5px; font-weight: 600; }
.popt small { color: var(--gold); font-size: 10px; letter-spacing: 2px; }
.popt em { position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; font-style: normal; font-weight: 700; color: #fff; background: var(--gold); box-shadow: 0 0 10px rgba(255, 210, 130, 0.9); z-index: 1; }
.popt.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 187, 108, 0.45); background: #fff8e8; }
.popt.sel em { display: grid; }
.plan-run { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 24px; margin-top: auto; margin-bottom: 20px; }
.plan-cards { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.plan-cards span { padding: 5px 14px; border-radius: 999px; background: rgba(255, 244, 214, 0.9); border: 1px solid var(--gold-2); font-size: 14px; animation: pulse 1.3s ease-in-out infinite alternate; }
@keyframes pulse { from { box-shadow: 0 0 0 rgba(255, 210, 130, 0); } to { box-shadow: 0 0 16px rgba(255, 210, 130, 0.9); } }

/* ================================================================ 走马灯：记忆一张张落下，铺满画面 */
.reel.collage { position: fixed; inset: 0; height: auto; display: block; overflow: hidden; }
.reel.collage .reel-title { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); transition: top 1.2s var(--ease), transform 1.2s var(--ease); z-index: 400; }
.reel.collage .reel-title.up { top: 2.5vh; transform: translateY(0); }
.reel.collage .reel-title.up .nm { font-size: clamp(28px, 4vw, 48px); transition: font-size 1.2s var(--ease); }
.rc { position: absolute; left: 0; top: 0; border-radius: 12px; background: var(--paper); padding: 6px 6px 7px; opacity: 0; box-shadow: 0 0 24px rgba(255, 214, 150, 0.6), 0 18px 34px -16px rgba(80, 50, 20, 0.7); will-change: transform; }
.rc .ra { aspect-ratio: 1.22; border-radius: 8px; }
.rc .rn { text-align: center; font-family: var(--display); font-size: 15px; padding-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc.r2 { box-shadow: 0 0 0 1px rgba(226, 187, 108, 0.8), 0 0 30px rgba(255, 210, 130, 0.75), 0 18px 34px -16px rgba(80, 50, 20, 0.7); }
.rc.r3 { box-shadow: 0 0 0 2px var(--gold-2), 0 0 46px rgba(255, 196, 100, 0.95), 0 18px 34px -16px rgba(80, 50, 20, 0.7); }
.rc .nw { position: absolute; top: -7px; right: -7px; z-index: 2; padding: 1px 8px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 11px; letter-spacing: 0.1em; box-shadow: 0 2px 8px rgba(150, 60, 50, 0.4); }
.mem-strip { padding-top: 14px; }
.mem-strip div { position: relative; overflow: visible; }
.mem-strip div.nw::after { content: "新"; position: absolute; top: -6px; right: -6px; padding: 0 6px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 10px; }
.rfinal { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); z-index: 600; text-align: center; padding: 18px 34px 20px; border-radius: 20px; background: rgba(251, 246, 236, 0.92); border: 1px solid var(--gold-2); box-shadow: 0 0 60px rgba(255, 210, 120, 0.8); animation: cardin 0.9s var(--ease); width: max-content; max-width: 92vw; }
.rfinal .a { font-family: var(--display); font-size: 28px; letter-spacing: 0.1em; }
.rfinal .b { color: var(--ink-2); margin: 6px 0 14px; font-size: 14px; }

/* ================================================================ 图鉴：奇遇 */
.tale-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tale { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.tale .ta { border-radius: 10px; background-size: cover; background-position: center; min-height: 96px; }
.tale b { font-size: 15px; }
.tale small { display: block; color: var(--ink-3); font-size: 11.5px; }
.tale p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.tale p.to { color: var(--ink); border-left: 2px solid var(--gold-2); padding-left: 8px; }

@media (max-width: 820px) {
  .rc .rn { font-size: 12px; }
  .rfinal .a { font-size: 22px; }
  .tale-list { grid-template-columns: 1fr; }
}

/* ================================================================ v3：写实立绘站在场景里 */
#s-game .layout { position: relative; z-index: 1; }
#s-game .topbar { position: relative; }
#hero { position: absolute; left: 296px; bottom: 0; height: 86vh; z-index: 0; pointer-events: none; display: none; }
#hero.on { display: block; }
#hero img { height: 100%; width: auto; display: block; opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); filter: drop-shadow(0 18px 26px rgba(60, 35, 15, 0.35)) drop-shadow(0 0 18px rgba(255, 214, 150, 0.35)); }
#hero.in img { opacity: 1; transform: none; }
/* 地面接触阴影 */
#hero::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -1.5vh; height: 4vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 35, 15, 0.38), rgba(60, 35, 15, 0)); }
.portrait .pimg.sp { background-size: 210% auto; background-position: 50% 4%; background-repeat: no-repeat; }
.person .av.face { background-size: 340% auto; background-position: 50% 6%; background-repeat: no-repeat; border: 1.5px solid rgba(255, 252, 245, 0.9); box-shadow: 0 2px 6px rgba(80, 50, 20, 0.25); }
@media (max-width: 1180px) { #hero { left: 260px; height: 78vh; } }
@media (max-width: 820px) { #hero { display: none !important; } }

/* ================================================================ 加速与一生地图 */
.tb-speed { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 252, 245, 0.7); border: 1px solid var(--line); }
.tb-speed button { min-width: 34px; height: 28px; padding: 0 8px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); background: transparent; border: 0; }
.tb-speed button:hover { background: rgba(226, 187, 108, 0.25); }
.tb-speed button.on { background: var(--gold); color: #fff; box-shadow: 0 0 10px rgba(226, 187, 108, 0.7); }
.tb-wait { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--rose); color: #fff; animation: pulse 1.2s ease-in-out infinite alternate; }
.lmap { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-top: 4px; }
.lmap i { position: relative; aspect-ratio: 1; border-radius: 3px; background: rgba(230, 214, 184, 0.55); }
.lmap i.fut { background: rgba(240, 229, 208, 0.45); }
.lmap i.cur { box-shadow: 0 0 0 2px var(--rose), 0 0 8px rgba(201, 111, 95, 0.6); }
.lmap i.le { outline: 1.5px dashed var(--gold); outline-offset: 1px; }
.lmap i.end { box-shadow: inset 0 0 0 2px rgba(60, 40, 20, 0.55); }
.lmap i b { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fffaf0; box-shadow: 0 0 4px rgba(255, 240, 200, 0.95); }
.lmap.compact { grid-template-columns: repeat(20, 1fr); gap: 2px; }
.lmap-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.lmap-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.lmap-key i.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); margin-right: 3px; }
.lmap-key i.lek { outline: 1.5px dashed var(--gold); background: transparent; margin-right: 4px; }
.lmap-key .sep { opacity: 0.5; }
@media (max-width: 820px) { .tb-speed button { min-width: 28px; padding: 0 5px; } }

/* 左栏的盒子不许被压扁（人多时头像框会塌） */
.col > .box { flex-shrink: 0; }
/* 有立绘时，阶段标题挪到右边，别压在人脸上 */
#s-game.with-hero .stage-top { justify-content: flex-end; }
#s-game.with-hero .stage-cap { text-align: right; margin-right: 1.5vw; }
#s-game.with-hero .stage-cap .big { font-size: clamp(30px, 3.6vw, 52px); }

/* 加速时小事的倒数条 */
.autobar { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.autobar i { display: block; height: 3px; margin-bottom: 6px; border-radius: 2px; background: var(--gold); transform-origin: left center; animation: autobar linear forwards; }
@keyframes autobar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* 结局走马灯：从离世倒回出生 */
.reel.rewind { position: fixed; inset: 0; height: auto; display: block; overflow: hidden; background: radial-gradient(ellipse at 50% 56%, rgba(40, 24, 10, 0) 25%, rgba(30, 18, 8, 0.55) 100%); }
.reel.rewind .reel-title { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); transition: top 1.2s var(--ease), transform 1.2s var(--ease); z-index: 400; }
.reel.rewind .reel-title.up { top: 2.5vh; transform: translateY(0); }
.reel.rewind .reel-title.up .nm { font-size: clamp(26px, 3.6vw, 44px); transition: font-size 1.2s var(--ease); }
.rw-hud { position: absolute; left: 0; right: 0; top: 19vh; z-index: 300; text-align: center; color: #fffaf0; text-shadow: 0 2px 12px rgba(60, 30, 5, 0.65); animation: cardin 0.9s var(--ease) both; }
.rw-age b { font-family: var(--display); font-size: clamp(42px, 6vw, 74px); font-weight: 400; font-variant-numeric: tabular-nums; }
.rw-age span { font-size: 18px; margin-left: 6px; letter-spacing: 0.2em; }
.rw-year { font-size: 15px; letter-spacing: 0.35em; opacity: 0.88; }
.rw-strip { position: absolute; left: 50%; top: 58%; width: 0; height: 0; transition: top 1s var(--ease); }
.reel.rewind.done .rw-strip { top: 47%; }
.reel.rewind.done .rw-hud { animation: none; opacity: 0; transition: opacity 0.8s; }
.reel.rewind .rfinal { bottom: 4vh; }
.rw { position: absolute; left: 0; top: 0; padding: 8px 8px 10px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 28px rgba(255, 214, 150, 0.55), 0 22px 40px -18px rgba(60, 35, 10, 0.75); transition-property: transform, opacity; transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform, opacity; }
.rw .ra { aspect-ratio: 1.25; border-radius: 9px; transition: filter 0.6s; }
.rw:not(.cur) .ra { filter: sepia(0.45) brightness(0.9) saturate(0.8); }
.rw .rn { text-align: center; font-family: var(--display); font-size: 21px; padding-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw .rp { max-height: 0; opacity: 0; overflow: hidden; padding: 0 8px; text-align: center; font-size: 13px; line-height: 1.65; color: var(--ink-2); transition: max-height 0.5s var(--ease), opacity 0.5s; }
.rw.cur .rp { max-height: 5em; opacity: 1; padding-top: 3px; }
.rw.cur.r2 { box-shadow: 0 0 0 1px rgba(226, 187, 108, 0.85), 0 0 40px rgba(255, 210, 130, 0.8), 0 22px 40px -18px rgba(60, 35, 10, 0.75); }
.rw.cur.r3 { box-shadow: 0 0 0 2px var(--gold-2), 0 0 60px rgba(255, 196, 100, 0.95), 0 22px 40px -18px rgba(60, 35, 10, 0.75); }
.rw .nw { position: absolute; top: -8px; right: -8px; z-index: 2; padding: 1px 9px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 12px; letter-spacing: 0.1em; box-shadow: 0 2px 8px rgba(150, 60, 50, 0.4); }
.rw-bar { position: absolute; left: 50%; bottom: 8vh; z-index: 300; width: min(560px, 80vw); height: 4px; transform: translateX(-50%); border-radius: 3px; background: rgba(255, 250, 240, 0.25); transition: opacity 0.6s; }
.rw-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 3px; background: var(--gold-2); box-shadow: 0 0 10px rgba(255, 200, 110, 0.8); transition: width 0.7s var(--ease); }
.rw-bar span { position: absolute; top: 10px; font-size: 12px; letter-spacing: 0.25em; color: rgba(255, 250, 240, 0.85); }
.rw-bar .l { left: 0; } .rw-bar .r { right: 0; }
@media (max-width: 700px) { .rw .rn { font-size: 17px; } .rw .rp { font-size: 12px; } .rw-hud { top: 17vh; } }

/* 结局闪回：全屏快切、白光、颗粒、上下黑边 */
.reel.flash { position: fixed; inset: 0; height: auto; display: block; overflow: hidden; animation: fbin 0.7s ease both; }
@keyframes fbin { from { background-color: rgba(11, 8, 5, 0); } to { background-color: #0b0805; } }
.reel.flash .reel-title { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 400; transition: opacity 0.6s, top 1.2s var(--ease), transform 1.2s var(--ease); }
.reel.flash .reel-title.up { top: 2.5vh; transform: translateY(0); }
.reel.flash .reel-title.fbhide { animation: fbout 0.6s ease forwards; } /* 进场动画会锁住透明度，所以用另一个动画来淡出 */
@keyframes fbout { to { opacity: 0; } }
.reel.flash .reel-title.up .nm { font-size: clamp(26px, 3.6vw, 44px); transition: font-size 1.2s var(--ease); }
.fb-stage { position: absolute; left: 0; right: 0; top: 10vh; bottom: 10vh; overflow: hidden; }
.fb-stage .fb-shot { position: absolute; inset: 0; will-change: transform, opacity; }
.fb-stage { transition: transform 1.3s var(--ease); }
.fb-stage .fb-shot.whole::before { background-size: contain; background-repeat: no-repeat; background-position: 50% 50%; transform: none; }
.fb-stage .fb-shot.fb-blur { filter: blur(28px) brightness(0.55) saturate(0.8) !important; transform: scale(1.15); }
.reel.flash.fbdone .fb-stage { transform: translateY(-7vh) scale(0.8); }
.fb-grain { position: absolute; inset: -50%; z-index: 5; pointer-events: none; opacity: 0.2; mix-blend-mode: overlay; animation: fbgrain 0.6s steps(5) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes fbgrain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.fb-vig { position: absolute; left: 0; right: 0; top: 10vh; bottom: 10vh; z-index: 6; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 45%, rgba(10, 6, 2, 0.7) 100%); box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55); }
.fb-light { position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 46%, #fffdf6 0%, #fff1d6 45%, #f6d19a 100%); }
.fb-age { position: absolute; left: 4vw; bottom: 1.8vh; z-index: 8; display: flex; align-items: baseline; gap: 10px; color: rgba(255, 246, 230, 0.9); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); transition: opacity 0.5s; }
.fb-age b { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 48px); font-variant-numeric: tabular-nums; }
.fb-age span { font-size: 14px; letter-spacing: 0.3em; opacity: 0.85; }
.fb-line { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 13vh; z-index: 8; width: min(820px, 90vw); text-align: center; /* 不用 transform 居中：淡入动画会改 transform */ color: #fffaf0; opacity: 0; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.6); }
.fb-line b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.6vw, 34px); letter-spacing: 0.18em; }
.fb-line span { display: block; margin-top: 6px; font-size: 15px; letter-spacing: 0.12em; opacity: 0.92; }
.reel.flash.fbdone .fb-age, .reel.flash.fbdone .fb-line { opacity: 0 !important; transition: opacity 0.6s; }
.reel.flash .rfinal { bottom: 13vh; }
@media (max-width: 700px) { .fb-stage, .fb-vig { top: 14vh; bottom: 14vh; } .fb-line { bottom: 16vh; } .fb-line span { font-size: 13px; } }

/* AI 改写：等待时的「回想」占位，拿到后淡入 */
.txt.voicing .vline { height: 0.95em; margin: 0.55em 0; border-radius: 6px; background: linear-gradient(90deg, rgba(226, 187, 108, 0.14), rgba(226, 187, 108, 0.38), rgba(226, 187, 108, 0.14)); background-size: 200% 100%; animation: vshimmer 1.3s ease-in-out infinite; }
.txt.voicing .vline.short { width: 62%; }
@keyframes vshimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.voicing-note { color: var(--ink-2); font-size: 13.5px; letter-spacing: 0.15em; padding: 10px 2px; animation: pulse 1.2s ease-in-out infinite alternate; }
.txt.voiced { animation: vin 0.6s var(--ease) both; }
@keyframes vin { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
.aitag.soft { background: transparent; color: var(--gold-2); padding: 0 6px 0 0; box-shadow: none; }

/* 牵挂 */
.box.care { border-color: rgba(226, 187, 108, 0.55); }
.care-i { padding: 6px 0 7px; border-bottom: 1px dashed var(--line); }
.care-i:last-child { border-bottom: 0; }
.care-i b { display: block; font-weight: 500; font-size: 14px; }
.care-i small { color: var(--ink-2); font-size: 12px; }
/* 「明年……」：在出牌区、「度过这一年」上方 */
.nexthint { margin: 4px 0 8px; font-size: 13.5px; letter-spacing: 0.12em; color: var(--gold-2); text-align: right; animation: cardin 0.6s var(--ease) both; }
/* 留给后人的信、家族宿愿 */
.letter-tease { margin: 2px 0 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 244, 220, 0.75); border: 1px dashed var(--gold-2); font-size: 13.5px; color: var(--ink); }
.vow-line { margin-top: 18px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 250, 240, 0.7); border: 1px solid var(--line); }
.vow-line.done { border-color: var(--gold-2); box-shadow: 0 0 24px rgba(255, 210, 130, 0.6); }
.vow-line b { font-weight: 500; margin-right: 8px; }
.vow-line .mys { display: inline-flex; gap: 5px; vertical-align: middle; }
.vow-line small { display: block; margin-top: 4px; color: var(--ink-2); font-size: 12.5px; }
.tree-vow { margin: 0 auto 12px; width: max-content; max-width: 92%; padding: 7px 16px; border-radius: 999px; background: rgba(255, 250, 240, 0.85); border: 1px solid var(--gold-2); font-size: 13.5px; text-align: center; }
.vow-line .mys { margin: 0; gap: 4px; } .vow-line .mys i { width: 13px; height: 13px; }

/* 浏览器拦住声音时：先藏起菜单，在菜单的位置显示「轻触开始」；点一下菜单淡入、音乐响起 */
body.tapwait #title-menu, body.tapwait #title-meta { visibility: hidden; } /* .menu 有进场动画锁着透明度，所以用 visibility */
body.tapdone #title-menu, body.tapdone #title-meta { animation: fadein 0.9s ease both; }
#tapstart { position: fixed; inset: 0; z-index: 900; cursor: pointer; background: transparent; transition: opacity 0.6s ease; }
#tapstart.out { opacity: 0; pointer-events: none; }
#tapstart .s { position: absolute; left: 0; right: 0; top: 41%; text-align: center; font-size: 17px; letter-spacing: 0.5em; color: #fffaf0; text-shadow: 0 1px 3px rgba(70, 40, 10, 0.6), 0 0 24px rgba(120, 70, 20, 0.6); animation: tappulse 1.8s ease-in-out infinite alternate; }
@keyframes tappulse { from { opacity: 0.45; } to { opacity: 1; } }

/* ================================================================ 手机：事件卡占满顶栏和底部导航之间，选项始终看得到 */
@media (max-width: 820px) {
  #s-game .layout { grid-template-rows: minmax(0, 1fr); }
  .stage { overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
  .stage > .stage-top:only-child { height: 100%; }            /* 事件阶段：只有一张卡 */
  .stage > .stage-top:only-child .evcard { height: 100%; }
  .evcard { display: flex; flex-direction: column; max-height: 100%; border-radius: 16px; }
  .evcard .art { flex: none; min-height: 0; height: clamp(96px, 21vh, 180px); }
  .evcard .body { flex: 1; min-height: 0; overflow: hidden; padding: 12px 16px 12px; }
  .evcard .kicker { font-size: 11px; letter-spacing: 0.25em; }
  .evcard h3 { font-size: 23px; margin: 2px 0 8px; }
  /* 正文在中间单独滚动；底部渐隐提示还有字 */
  .evcard .txt { flex: 1 1 auto; min-height: 3.6em; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 2px; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent); }
  .evcard .txt p { font-size: 14.5px; line-height: 1.75; margin-bottom: 8px; }
  .evcard .txt p:last-child { padding-bottom: 14px; }
  /* 选项、结果、倒数条固定在下面 */
  .choices { flex: none; max-height: 56%; overflow-y: auto; margin-top: 6px; padding-top: 8px; gap: 7px; }
  .choice { padding: 10px 14px; }
  .choice b { font-size: 14.5px; }
  .choice small { font-size: 12px; margin-top: 2px; }
  .outcome { flex: none; max-height: 62%; overflow-y: auto; margin-top: 6px; padding-top: 8px; }
  .outcome .otext { font-size: 14.5px; line-height: 1.75; padding: 10px 13px; }
  .autobar { flex: none; margin-top: 8px; }
  .evcard .voicing-note { flex: none; }
  /* 出牌区的按钮不要折成两行 */
  .handbar { gap: 8px; }
  .handbar .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .handbar .actions button { white-space: nowrap; padding: 9px 15px; font-size: 14px; }
}
@media (max-width: 820px) and (max-height: 700px) {
  .evcard .art { height: clamp(64px, 12vh, 110px); }
  .evcard .body { padding: 10px 14px 10px; }
  .evcard h3 { font-size: 20px; margin: 0 0 4px; }
  .evcard .txt p { font-size: 14px; line-height: 1.65; }
  .choices { max-height: 64%; gap: 6px; margin-top: 4px; padding-top: 6px; }
  .choice { padding: 8px 12px; }
  .choice b { font-size: 14px; }
  .choice small { font-size: 11.5px; }
  .topbar { padding: 6px 12px; gap: 8px; }
  .tb-age .n { font-size: 22px; }
  .tb-speed button { height: 26px; }
}

/* ================================================================ 手机：其余界面 */
html { -webkit-text-size-adjust: 100%; }
button, .choice, .card, .ccard, .era, .wopt, .popt, .opt, .heir, .mobnav button, .tabs button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .ccard:hover, .wopt:hover, .popt:hover, .menu button:hover, .choice:hover { transform: none; } }
@media (max-width: 820px) {
  /* 底部导航避开 iPhone 的手势条；有事等你决定时，「这一年」上亮一个点 */
  .mobnav { bottom: calc(8px + env(safe-area-inset-bottom)); }
  #s-game .topbar { margin-top: calc(8px + env(safe-area-inset-top)); } /* 刘海屏 */
  #s-game .layout { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mobnav button { position: relative; }
  .mobnav button.ping::after { content: ""; position: absolute; top: 9px; right: calc(50% - 34px); width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 8px rgba(201, 111, 95, 0.9); animation: tappulse 0.9s ease-in-out infinite alternate; }
  /* 面板标题栏：返回按钮和右边的数字不要折成竖排 */
  .ph { grid-template-columns: auto 1fr auto; gap: 8px; padding: 12px 14px; }
  .ph h2 { font-size: 22px; letter-spacing: 0.12em; text-align: center; white-space: nowrap; }
  .ph .back { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
  .ph .right { font-size: 13px; white-space: nowrap; }
  .pbody { padding: 14px 14px 20px; }
  /* 选国家：两列小卡片；底部一行放得下 */
  .lottery { padding: 12px 14px; gap: 12px; }
  .lottery h3 { font-size: 17px; }
  .lottery p { font-size: 12.5px; }
  .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ccard { padding: 9px 10px; }
  .ccard b { font-size: 14px; }
  .ccard small { font-size: 11px; }
  .era { padding: 8px 14px; font-size: 13.5px; }
  .pf { padding: 10px 14px; gap: 10px; }
  #setup-pick { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.4; }
  #setup-go { flex: none; white-space: nowrap; }
  /* 图鉴：页签横向滑动；两列 */
  .tabs { flex: none; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; padding: 10px 14px 4px; gap: 6px; scrollbar-width: none; } /* flex:none：别被面板压扁 */
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; padding: 7px 14px; font-size: 13.5px; }
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mcell .mt { font-size: 13.5px; }
  .mcell .ms { font-size: 11px; min-height: 0; }
  /* 人物页：头像缩成一行（左图右字） */
  .portrait { display: grid; grid-template-columns: 108px 1fr; align-items: center; }
  .portrait .pimg { aspect-ratio: auto; height: 124px; }
  .portrait .pinfo { position: static; padding: 10px 14px; background: none; }
  .portrait .pname { font-size: 22px; }
  /* 一生地图：一行 20 年，矮一半 */
  .col .lmap:not(.compact) { grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 2px; }
  .col .lmap:not(.compact) i { border-radius: 2px; }
  /* 弹窗（愿望清单、五年规划）：按钮钉在底部，卡片更紧凑 */
  .modal { padding: 18px 14px 0; max-height: calc(100dvh - 24px); border-radius: 18px; }
  .modal h3 { font-size: 22px; }
  .modal .lead { font-size: 13px; margin-bottom: 12px; line-height: 1.6; }
  .modal .row { position: sticky; bottom: 0; margin: 12px -14px 0; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(251, 246, 236, 0), rgba(251, 246, 236, 0.96) 35%); }
  .wgrid { grid-template-columns: 1fr; gap: 8px; }
  .wopt { padding: 10px 14px; }
  .wopt b { font-size: 15.5px; }
  .wopt small { font-size: 12.5px; }
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .popt { padding: 4px 4px 6px; }
  .popt b { font-size: 12.5px; }
  /* 总结页 */
  .epi-name { font-size: 32px; }
  .epi-yr { font-size: 13px; letter-spacing: 0.12em; }
  .epi { font-size: 15px; line-height: 1.8; padding: 10px 14px; }
  .sub { letter-spacing: 0.08em; }
  .re-reel { display: inline-block; white-space: nowrap; letter-spacing: 0.04em; margin: 4px 12px 0 0 !important; }
  .sub .re-reel:first-of-type { margin-left: 0 !important; }
  .tnode { padding: 12px 14px 12px 60px; }
  .tnode small { display: block; margin: 2px 0 0; }
  .upitem { padding: 12px 14px; }
}
