/* 我是大作家 · 休闲游戏风 */
:root {
  --navy: #33415c; --navy2: #56657f; --navy3: #8a97ad;
  --bg: #eef2f7; --bg2: #e3e9f1; --inset: #f4f7fb;
  --or1: #ffc993; --or2: #ff9f55; --or3: #e9802f; --or-t: #fff1e3;
  --bl1: #d6ebff; --bl2: #a8d2fb; --bl3: #78b2ec; --bl-t: #eaf4ff;
  --gold: #ffc93c; --gold2: #f0a91c; --red1: #ffb48a; --red2: #ff7f6b;
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  --spring: cubic-bezier(.34,1.56,.64,1); --ease: cubic-bezier(.22,.8,.25,1);
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23dbe3ee' stroke-width='5' stroke-linejoin='round'%3E%3Cpath d='M50 20l9 19 21 3-15 14 4 21-19-10-19 10 4-21-15-14 21-3z'/%3E%3Cpath d='M160 110l12 25 27 4-20 19 5 27-24-13-24 13 5-27-20-19 27-4z'/%3E%3Cpath d='M40 150l6 12 13 2-10 9 3 13-12-6-12 6 3-13-10-9 13-2z'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; background: var(--bg) var(--stars); color: var(--navy); font-family: var(--font); font-weight: 500; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; animation: screenIn .45s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } }
.mascot { width: 40px; height: 40px; flex: none; }

/* ================= 组件 ================= */
.gb { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 30px; border-radius: 28px; border: 3px solid var(--navy); font-size: 19px; font-weight: 900; color: #fff; letter-spacing: .02em; white-space: nowrap;
  background: linear-gradient(180deg, var(--or1), var(--or2) 60%); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -6px 0 var(--or3), 0 5px 0 var(--navy); text-shadow: 0 2px 0 var(--or3); transition: transform .12s, box-shadow .12s, filter .2s; user-select: none; }
.gb:hover { filter: brightness(1.04) saturate(1.05); }
.gb:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -4px 0 var(--or3), 0 1px 0 var(--navy); }
.gb:disabled { filter: grayscale(.6) opacity(.6); cursor: not-allowed; transform: none; }
.gb.blue { background: linear-gradient(180deg, var(--bl1), var(--bl2) 60%); box-shadow: inset 0 3px 0 rgba(255,255,255,.7), inset 0 -6px 0 var(--bl3), 0 5px 0 var(--navy); text-shadow: 0 2px 0 var(--bl3); }
.gb.blue:active { box-shadow: inset 0 3px 0 rgba(255,255,255,.7), inset 0 -4px 0 var(--bl3), 0 1px 0 var(--navy); }
.gb.white { background: linear-gradient(180deg, #fff, #eef3f9 60%); color: var(--navy); box-shadow: inset 0 3px 0 #fff, inset 0 -6px 0 #d3dcea, 0 5px 0 var(--navy); text-shadow: none; }
.gb.white:active { box-shadow: inset 0 3px 0 #fff, inset 0 -4px 0 #d3dcea, 0 1px 0 var(--navy); }
.gb.sm { height: 44px; padding: 0 18px; font-size: 15px; border-radius: 22px; }
.gb.wide { width: 100%; }
.rb { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 3px solid var(--navy); background: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 900; box-shadow: inset 0 -3px 0 #dfe6ef, 0 3px 0 var(--navy); transition: transform .12s, box-shadow .12s; }
.rb:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 #dfe6ef, 0 0 0 var(--navy); }
.rb.sm { width: 42px; height: 42px; font-size: 18px; }
.pop { position: relative; border-radius: 34px; padding: 10px; border: 3px solid var(--navy); background: linear-gradient(180deg, var(--bl1), var(--bl2)); box-shadow: inset 0 3px 0 rgba(255,255,255,.8), inset 0 -6px 0 var(--bl3), 0 10px 0 rgba(51,65,92,.22); text-align: left; }
.pop.orange { background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: inset 0 3px 0 rgba(255,255,255,.7), inset 0 -6px 0 var(--or3), 0 10px 0 rgba(51,65,92,.22); }
.pop.white { background: linear-gradient(180deg, #fff, #eef3f9); box-shadow: inset 0 3px 0 #fff, inset 0 -6px 0 #d3dcea, 0 10px 0 rgba(51,65,92,.18); }
.pop-t { min-height: 50px; padding: 0 50px; display: grid; place-items: center; text-align: center; font-size: 25px; font-weight: 900; color: #fff; letter-spacing: .04em;
  text-shadow: 0 3px 0 var(--navy), 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy), 2px 3px 0 var(--navy), -2px 3px 0 var(--navy), 2px -2px 0 var(--navy), -2px -2px 0 var(--navy); }
.pop.white .pop-t { color: var(--navy); text-shadow: none; }
.pop-b { border-radius: 24px; background: linear-gradient(180deg, #fff, var(--inset)); border: 2px solid rgba(51,65,92,.14); box-shadow: inset 0 4px 0 rgba(51,65,92,.05); padding: 20px; }
.x { position: absolute; right: 12px; top: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--navy); display: grid; place-items: center; color: #fff; font-size: 19px; font-weight: 900; background: linear-gradient(180deg, var(--red1), var(--red2)); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), inset 0 -3px 0 #e2604f, 0 3px 0 var(--navy); transition: transform .15s; }
.x:hover { transform: rotate(90deg); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px; border-radius: 14px; font-size: 13px; font-weight: 700; border: 2px solid var(--navy); background: #fff; white-space: nowrap; }
.chip.o { background: var(--or-t); } .chip.b { background: var(--bl-t); }
.hud { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 5px; border-radius: 21px; background: #fff; border: 3px solid var(--navy); box-shadow: inset 0 -3px 0 #dfe6ef, 0 3px 0 var(--navy); font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hud .ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; border: 2px solid var(--navy); background: var(--or-t); }
.hud.bump { animation: bump .7s var(--spring); }
@keyframes bump { 35% { transform: scale(1.18) rotate(-3deg); } }
.stroke { color: #fff; font-weight: 900; text-shadow: 0 5px 0 var(--navy), 3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 -3px 0 var(--navy), 3px 3px 0 var(--navy), -3px 3px 0 var(--navy), 3px -3px 0 var(--navy), -3px -3px 0 var(--navy), 3px 5px 0 var(--navy), -3px 5px 0 var(--navy); }
.stroke .o { color: var(--or1); }
.bub { display: inline-flex; align-items: center; gap: 10px; padding: 5px 18px 5px 5px; border-radius: 28px; background: #fff; border: 3px solid var(--navy); box-shadow: 0 3px 0 var(--navy); font-size: 15px; font-weight: 700; text-align: left; max-width: 100%; }
.bub .mascot { width: 34px; height: 34px; }
.bub.hop .mascot { animation: hop .7s var(--spring); }
.bub.think .say::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: dots 1.2s steps(4) infinite; }
.bub.think .mascot { animation: wobble 1.4s ease-in-out infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes hop { 30% { transform: translateY(-9px) scale(1.12) rotate(-8deg); } 60% { transform: translateY(0) scale(.95); } }
@keyframes wobble { 50% { transform: rotate(8deg); } }
.mascot .eyes { animation: blink 4s infinite; transform-origin: 50% 50%; transform-box: fill-box; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.pop-in { animation: popIn .6s var(--spring) both; animation-delay: var(--d, 0s); }
@keyframes popIn { from { opacity: 0; transform: scale(.6) translateY(10px); } }
.rise { animation: rise .7s var(--spring) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

/* ================= 首页 ================= */
.nav { position: sticky; top: 0; z-index: 20; height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 26px; background: rgba(214,235,255,.75); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.logo { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 900; }
.nav nav { display: flex; gap: 28px; font-size: 15px; font-weight: 700; color: var(--navy2); }
.nav nav a:hover { color: var(--navy); }
.nav > .hud-r { justify-self: end; }
.snd { font-size: 17px; }
.badge-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; border: 2px solid var(--navy); background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 900; margin-left: 4px; }
.hero { position: relative; text-align: center; padding: 24px 16px 0; overflow: hidden; background: linear-gradient(180deg, #d6ebff 0%, #e8f3ff 50%, rgba(238,242,247,0) 100%); }
.cloud { position: absolute; background: #fff; border-radius: 60px; animation: drift 26s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.c1 { width: 180px; height: 54px; left: 6%; top: 50px; } .c1::before { width: 80px; height: 80px; left: 30px; top: -40px; } .c1::after { width: 60px; height: 60px; left: 90px; top: -26px; }
.c2 { width: 140px; height: 44px; right: 8%; top: 130px; animation-duration: 32s; animation-direction: reverse; } .c2::before { width: 64px; height: 64px; left: 24px; top: -32px; } .c2::after { width: 48px; height: 48px; left: 74px; top: -20px; }
.c3 { width: 110px; height: 36px; left: 62%; top: 330px; opacity: .8; animation-duration: 40s; } .c3::before { width: 50px; height: 50px; left: 20px; top: -24px; } .c3::after { width: 40px; height: 40px; left: 56px; top: -16px; }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(40px); } }
.title { position: relative; margin-top: 18px; font-size: clamp(56px, 11vw, 116px); letter-spacing: .02em; line-height: 1.08; }
.title span { display: inline-block; animation: letter .7s var(--spring) both; }
.title span:nth-child(2) { animation-delay: .08s; } .title span:nth-child(3) { animation-delay: .16s; } .title span:nth-child(4) { animation-delay: .24s; } .title span:nth-child(5) { animation-delay: .32s; }
@keyframes letter { 0% { opacity: 0; transform: translateY(-60px) scale(.6); } 60% { opacity: 1; transform: translateY(6px) scale(1.06); } }
.title:hover span { animation: jiggle .5s var(--spring); }
.title:hover span:nth-child(2) { animation-delay: .05s; } .title:hover span:nth-child(3) { animation-delay: .1s; } .title:hover span:nth-child(4) { animation-delay: .15s; } .title:hover span:nth-child(5) { animation-delay: .2s; }
@keyframes jiggle { 40% { transform: translateY(-10px) rotate(-4deg); } }
.tg { position: relative; margin-top: 16px; font-size: clamp(18px, 2.4vw, 24px); font-weight: 900; }
.tg em { font-style: normal; color: var(--or3); }
.ctas { position: relative; margin-top: 26px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.stage { position: relative; height: 430px; margin-top: 20px; }
.gcard { position: absolute; left: 50%; bottom: 40px; width: 230px; margin-left: -115px; border-radius: 28px; border: 3px solid var(--navy); background: #fff; box-shadow: inset 0 -6px 0 #dfe6ef, 0 8px 0 rgba(51,65,92,.2); padding: 8px; text-align: left; animation: bob 5s ease-in-out infinite; }
.gcard .hd { height: 120px; border-radius: 20px; display: grid; place-items: center; font-size: 54px; border: 2px solid rgba(51,65,92,.12); }
.gcard .bd { padding: 14px 10px 12px; }
.gcard small { font-size: 12px; font-weight: 700; color: var(--navy3); }
.gcard h4 { margin-top: 4px; font-size: 21px; font-weight: 900; line-height: 1.25; }
.gcard .rd { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--navy2); }
.gcard .rd i { flex: 1; height: 10px; border-radius: 5px; background: var(--bg2); border: 2px solid var(--navy); overflow: hidden; }
.gcard .rd i b { display: block; height: 100%; background: linear-gradient(180deg, var(--or1), var(--or2)); }
.g1 { --r: -10deg; --x: -260px; animation-delay: -1s; } .g1 .hd { background: linear-gradient(180deg, var(--bl1), var(--bl2)); }
.g2 { --r: 0deg; --x: 0px; z-index: 2; bottom: 60px; width: 250px; margin-left: -125px; } .g2 .hd { background: linear-gradient(180deg, var(--or1), var(--or2)); height: 140px; }
.g3 { --r: 10deg; --x: 260px; animation-delay: -2.5s; } .g3 .hd { background: linear-gradient(180deg, #fff, var(--bg2)); }
@keyframes bob { 0%, 100% { transform: translateX(var(--x)) rotate(var(--r)) translateY(0); } 50% { transform: translateX(var(--x)) rotate(var(--r)) translateY(-12px); } }
.flt { position: absolute; z-index: 4; animation: bob2 4s ease-in-out infinite; }
.f1 { left: calc(50% - 440px); top: 40px; --r: -8deg; }
.f2 { right: calc(50% - 450px); top: 70px; --r: 6deg; animation-delay: -2s; }
@keyframes bob2 { 0%, 100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(var(--r)) translateY(-8px); } }
.toast-card { display: flex; align-items: center; gap: 12px; padding: 10px 20px 10px 10px; border-radius: 24px; border: 3px solid var(--navy); background: #fff; box-shadow: inset 0 -5px 0 #dfe6ef, 0 6px 0 var(--navy); text-align: left; }
.toast-card .bi { width: 50px; height: 50px; border-radius: 15px; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 24px; background: linear-gradient(180deg, #ffe08a, var(--gold)); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -4px 0 #d48f0e; }
.toast-card small { display: block; font-size: 12px; font-weight: 900; color: var(--or3); }
.toast-card b { display: block; font-size: 17px; font-weight: 900; }
.ribbon { position: relative; z-index: 3; margin: -6px auto 0; width: min(760px, calc(100% - 80px)); height: 58px; overflow: hidden; border-radius: 14px; border: 3px solid var(--navy);
  background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -5px 0 var(--or3), 0 6px 0 var(--navy); }
.ribbon .track { display: flex; width: max-content; height: 100%; align-items: center; animation: marquee 22s linear infinite; }
.ribbon span { padding-right: 10px; font-size: 18px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 var(--or3); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
.feats { max-width: 1180px; margin: 0 auto; padding: 56px 24px 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat:nth-child(2) { --d: .08s; } .feat:nth-child(3) { --d: .16s; } .feat:nth-child(4) { --d: .24s; }
.feat .pop-b { text-align: center; padding: 18px 14px; }
.feat .big { font-size: 42px; transition: transform .3s var(--spring); }
.feat:hover .big { transform: scale(1.2) rotate(-8deg); }
.feat h4 { margin-top: 8px; font-size: 18px; font-weight: 900; }
.feat p { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--navy2); }
.works { max-width: 1180px; margin: 0 auto; padding: 30px 24px 20px; }
.stroke.sm { font-size: 36px; letter-spacing: .03em; text-shadow: 0 4px 0 var(--navy), 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy), 2px 4px 0 var(--navy), -2px 4px 0 var(--navy), 2px -2px 0 var(--navy), -2px -2px 0 var(--navy); }
.works-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.wk { position: relative; border-radius: 26px; border: 3px solid var(--navy); background: #fff; box-shadow: inset 0 -6px 0 #dfe6ef, 0 6px 0 var(--navy); padding: 8px; text-align: left; transition: transform .25s var(--spring); }
.wk:hover { transform: translateY(-5px) rotate(-1deg); }
.wk .hd { height: 70px; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border: 2px solid rgba(51,65,92,.12); font-size: 30px; }
.wk.m-deck .hd { background: linear-gradient(180deg, var(--bl1), var(--bl2)); }
.wk.m-level .hd { background: linear-gradient(180deg, var(--or1), var(--or2)); }
.wk .bd { padding: 12px 8px 6px; }
.wk h4 { font-size: 18px; font-weight: 900; line-height: 1.3; }
.wk p { margin-top: 6px; font-size: 13px; color: var(--navy2); }
.wk .del { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; font-size: 13px; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.wk:hover .del { opacity: 1; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px 50px; font-size: 13px; color: var(--navy3); }
.chip.on { background: #e5f7ee; } .chip.off { background: var(--or-t); }

/* ================= 选模式 ================= */
.bar { position: sticky; top: 0; z-index: 20; height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 0 20px; }
.hud-r { justify-self: end; display: flex; gap: 8px; align-items: center; }
.choose { text-align: center; padding: 6px 20px 60px; }
.choose h2 { font-size: clamp(38px, 6vw, 54px); letter-spacing: .02em; }
.choose > p { margin-top: 12px; font-size: 16px; font-weight: 700; color: var(--navy2); }
.modes { margin: 34px auto 0; max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.mode { transition: transform .3s var(--spring); }
.mode:hover { transform: translateY(-8px) rotate(-.6deg); }
.mode:nth-child(2):hover { transform: translateY(-8px) rotate(.6deg); }
.mode .pop-b { padding: 16px; }
.ill { position: relative; height: 200px; border-radius: 18px; overflow: hidden; border: 2px solid rgba(51,65,92,.12); }
.ill-deck { background: linear-gradient(180deg, #eaf4ff, #d6ebff); }
.ill-level { background: linear-gradient(180deg, #fff6ec, #ffe9d4); }
.ill-level svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mode h3 { margin-top: 16px; font-size: 26px; font-weight: 900; }
.mode p { margin-top: 6px; font-size: 14px; line-height: 1.65; color: var(--navy2); }
.mode .meta { margin: 12px 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.mc { position: absolute; left: 50%; top: 24px; width: 104px; height: 144px; margin-left: -52px; border-radius: 18px; border: 3px solid var(--navy); background: #fff; box-shadow: inset 0 -4px 0 #dfe6ef; padding: 6px; transition: transform .45s var(--spring); }
.mc i { display: block; height: 52px; border-radius: 12px; }
.mc b { display: block; margin: 12px 6px 0; height: 10px; border-radius: 5px; background: var(--navy); width: 70%; }
.mc u { display: block; margin: 8px 6px 0; height: 8px; border-radius: 4px; background: var(--bg2); }
.m1 { transform: translateX(-86px) rotate(-10deg) scale(.88); } .m1 i { background: linear-gradient(var(--bl1), var(--bl2)); }
.m2 { z-index: 2; } .m2 i { background: linear-gradient(var(--or1), var(--or2)); }
.m3 { transform: translateX(86px) rotate(10deg) scale(.88); } .m3 i { background: linear-gradient(#fff, var(--bg2)); }
.mode:hover .m1 { transform: translateX(-104px) rotate(-16deg) scale(.88); }
.mode:hover .m3 { transform: translateX(104px) rotate(16deg) scale(.88); }
.mode:hover .m2 { transform: translateY(-8px); }
.lvn { position: absolute; width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 20px; font-weight: 900; }
.lvn.d { color: #fff; background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -4px 0 var(--or3), 0 4px 0 var(--navy); text-shadow: 0 2px 0 var(--or3); }
.lvn.n { background: #fff; width: 64px; height: 64px; font-size: 24px; box-shadow: 0 0 0 6px rgba(255,159,85,.35), inset 0 -4px 0 #dfe6ef, 0 4px 0 var(--navy); animation: pulse 1.6s ease-in-out infinite; }
.lvn.l { background: var(--bg2); color: var(--navy3); box-shadow: inset 0 -4px 0 #cfd8e4, 0 4px 0 var(--navy); }
.lvn s { position: absolute; top: -22px; text-decoration: none; font-size: 13px; color: var(--gold); letter-spacing: 1px; text-shadow: 0 1px 0 var(--navy); white-space: nowrap; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(255,159,85,.18), inset 0 -4px 0 #dfe6ef, 0 4px 0 var(--navy); } }

/* ================= 创作台 ================= */
#studio.active { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.tog { position: relative; display: flex; padding: 4px; border-radius: 26px; border: 3px solid var(--navy); background: #fff; box-shadow: 0 3px 0 var(--navy); }
.tog button { position: relative; z-index: 1; width: 84px; height: 36px; border-radius: 18px; font-size: 15px; font-weight: 900; color: var(--navy3); transition: color .25s; }
.tog button.on { color: #fff; text-shadow: 0 2px 0 #5a96d4; }
.tog .pill { position: absolute; left: 4px; top: 4px; width: 84px; height: 36px; border-radius: 18px; background: linear-gradient(180deg, var(--bl2), var(--bl3)); box-shadow: inset 0 2px 0 rgba(255,255,255,.5); transition: transform .45s var(--spring); }
.view { flex: 1; min-height: 0; display: none; position: relative; }
.view.on { display: flex; animation: screenIn .45s var(--ease); }
#vDeck { flex-direction: column; }
.prog { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; padding: 0 12px; }
.seg { min-width: 84px; height: 34px; padding: 0 10px; border-radius: 17px; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 13px; font-weight: 900; background: #fff; color: var(--navy3); transition: .3s; }
.seg.d { color: #fff; background: linear-gradient(180deg, var(--bl1), var(--bl3)); text-shadow: 0 1px 0 #5a96d4; cursor: pointer; }
.seg.n { color: #fff; background: linear-gradient(180deg, var(--or1), var(--or2)); text-shadow: 0 1px 0 var(--or3); box-shadow: 0 0 0 5px rgba(255,159,85,.3); }
.seg.pulse { animation: bump .7s var(--spring); }
.qwrap { text-align: center; margin-top: 14px; padding: 0 16px; }
.q { font-size: clamp(32px, 5vw, 48px); letter-spacing: .03em; line-height: 1.2; }
.qwrap .bub { margin-top: 12px; }
.deck-area { position: relative; flex: 1; min-height: 0; }
.deck { position: absolute; inset: 0; }
.cd { position: absolute; left: 50%; top: 22px; width: 300px; margin-left: -150px; border-radius: 30px; border: 3px solid var(--navy); background: #fff; box-shadow: inset 0 -6px 0 #dfe6ef, 0 8px 0 rgba(51,65,92,.22); padding: 8px; text-align: left; transition: transform .55s var(--spring), opacity .4s, box-shadow .3s; touch-action: pan-y; user-select: none; cursor: grab; }
.cd.dragging { transition: none; cursor: grabbing; }
.cd .hd { height: 96px; border-radius: 22px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px; border: 2px solid rgba(51,65,92,.12); background: linear-gradient(180deg, #fff, var(--bg2)); }
.cd .num { width: 44px; height: 44px; border-radius: 14px; border: 3px solid var(--navy); background: #fff; display: grid; place-items: center; font-size: 21px; font-weight: 900; box-shadow: inset 0 -3px 0 #dfe6ef; }
.cd .em { font-size: 40px; }
.cd .bd { padding: 14px 10px 10px; }
.cd h4 { font-size: 22px; font-weight: 900; line-height: 1.25; }
.cd p { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--navy2); max-height: 168px; overflow: auto; }
.cd .tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.cd.s-l .hd { background: linear-gradient(180deg, var(--bl1), var(--bl2)); }
.cd.s-c { z-index: 3; box-shadow: 0 0 0 6px rgba(255,159,85,.35), inset 0 -6px 0 #dfe6ef, 0 10px 0 rgba(51,65,92,.25); }
.cd.s-c .hd { background: linear-gradient(180deg, var(--or1), var(--or2)); }
.cd.s-c:hover { box-shadow: 0 0 0 9px rgba(255,159,85,.35), inset 0 -6px 0 #dfe6ef, 0 12px 0 rgba(51,65,92,.25); }
.cd.deal { animation: deal .7s var(--spring) both; }
@keyframes deal { from { opacity: 0; translate: 0 140px; rotate: 14deg; scale: .7; } }
.cd.skel .hd, .cd.skel h4, .cd.skel p { background: linear-gradient(90deg, var(--bg2) 0, #f6f9fc 40%, var(--bg2) 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: 12px; color: transparent; }
.cd.skel h4 { height: 26px; width: 70%; } .cd.skel p { height: 90px; }
@keyframes shimmer { to { background-position: -150% 0; } }
.arrow { position: absolute; top: 160px; z-index: 4; }
.dock { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 10px 16px 22px; }
.idea-box { position: absolute; left: 50%; top: 18px; width: min(620px, calc(100% - 32px)); transform: translateX(-50%); z-index: 3; }
.idea-in textarea, .own-in textarea { width: 100%; min-height: 110px; resize: none; border-radius: 18px; border: 3px solid var(--navy); background: #fff; padding: 14px 16px; font-size: 17px; font-weight: 700; line-height: 1.6; outline: 0; box-shadow: inset 0 4px 0 rgba(51,65,92,.06); }
.idea-in textarea:focus, .own-in textarea:focus { box-shadow: 0 0 0 5px rgba(255,159,85,.3), inset 0 4px 0 rgba(51,65,92,.06); }
.idea-in .row { margin-top: 14px; display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.sparks { margin-top: 12px; display: grid; gap: 8px; }
.spark { text-align: left; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--navy); background: var(--bl-t); font-size: 14px; font-weight: 700; line-height: 1.5; box-shadow: 0 3px 0 var(--navy); transition: transform .15s; animation: popIn .5s var(--spring) both; }
.spark:hover { transform: translateY(-2px); background: var(--or-t); }
.analysis { margin-top: 2px; }
.an-top { display: flex; gap: 14px; align-items: center; }
.an-top .sc { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 24px; font-weight: 900; background: linear-gradient(180deg, #ffe08a, var(--gold)); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -4px 0 #d48f0e; }
.an-top small { font-size: 12px; font-weight: 700; color: var(--navy3); }
.an-top b { display: block; font-size: 20px; font-weight: 900; }
.an-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* 过关地图 */
#vLevel { gap: 0; }
.map { position: relative; isolation: isolate; flex: 1; min-width: 0; overflow: hidden; border-radius: 0 34px 0 0; background: linear-gradient(180deg, #d8ecff, #eef6ff 70%, rgba(238,242,247,.4)); }
.map .cloud { animation-duration: 30s; }
.map .c1 { top: 18%; left: 55%; } .map .c2 { top: 70%; left: 6%; right: auto; }
.road { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.road .base { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; }
.road .dash { fill: none; stroke: var(--bl2); stroke-width: 4; stroke-dasharray: 2 14; stroke-linecap: round; animation: march 1.5s linear infinite; }
.road .done { fill: none; stroke: var(--or2); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
@keyframes march { to { stroke-dashoffset: -32; } }
.nd { position: absolute; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 32px; font-weight: 900; transition: transform .3s var(--spring); }
.nd::before { content: ""; position: absolute; left: 50%; bottom: -24px; width: 140px; height: 42px; margin-left: -70px; border-radius: 50%; background: #fff; border: 3px solid var(--navy); box-shadow: inset 0 -6px 0 #dfe6ef, 0 6px 0 rgba(51,65,92,.2); z-index: -1; }
.nd.d { color: #fff; background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: inset 0 4px 0 rgba(255,255,255,.6), inset 0 -6px 0 var(--or3), 0 6px 0 var(--navy); text-shadow: 0 3px 0 var(--or3); cursor: pointer; }
.nd.d:hover { transform: translateY(-4px); }
.nd.n { width: 104px; height: 104px; margin: -52px 0 0 -52px; font-size: 38px; background: #fff; box-shadow: 0 0 0 10px rgba(255,159,85,.3), inset 0 -6px 0 #dfe6ef, 0 6px 0 var(--navy); animation: pulse2 1.8s ease-in-out infinite; }
@keyframes pulse2 { 50% { box-shadow: 0 0 0 18px rgba(255,159,85,.14), inset 0 -6px 0 #dfe6ef, 0 6px 0 var(--navy); } }
.nd.l { background: var(--bg2); color: var(--navy3); box-shadow: inset 0 -6px 0 #cfd8e4, 0 6px 0 var(--navy); font-size: 26px; }
.nd.win { animation: win .9s var(--spring); }
@keyframes win { 0% { transform: scale(1); } 30% { transform: scale(1.35) rotate(-10deg); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.nd label { position: absolute; top: calc(100% + 18px); left: 50%; translate: -50% 0; white-space: nowrap; font-size: 15px; font-weight: 900; color: var(--navy); text-shadow: none; pointer-events: none; }
.nd .s { position: absolute; top: -32px; left: 50%; translate: -50% 0; display: flex; align-items: flex-end; }
.nd .s svg { width: 24px; height: 24px; animation: starIn .5s var(--spring) both; }
.nd .s svg:nth-child(2) { width: 30px; height: 30px; margin: 0 -2px 4px; animation-delay: .12s; } .nd .s svg:nth-child(3) { animation-delay: .24s; }
@keyframes starIn { from { opacity: 0; transform: scale(0) rotate(-90deg); } }
.here { position: absolute; z-index: 3; translate: 70px -16px; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 78px -16px; } }
.side { width: 470px; flex: none; padding: 0 18px 18px 18px; display: flex; min-height: 0; }
.side .pop { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.side .pop-b { flex: 1; display: flex; flex-direction: column; padding: 18px; min-height: 0; overflow: auto; }
.lv-q { font-size: 24px; font-weight: 900; line-height: 1.3; }
.bub.mini { margin: 10px 0 0; font-size: 13px; padding: 3px 14px 3px 3px; }
.bub.mini .mascot { width: 28px; height: 28px; }
.goal { display: grid; gap: 6px; margin: 12px 0 14px; }
.goal span { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--navy2); }
.goal svg { width: 18px; height: 18px; flex: none; }
.opt { width: 100%; display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; border: 3px solid var(--navy); background: #fff; box-shadow: inset 0 -4px 0 #dfe6ef, 0 4px 0 var(--navy); margin-bottom: 12px; text-align: left; transition: transform .2s var(--spring), background .2s, box-shadow .2s; animation: rise .55s var(--spring) both; }
.opt:nth-child(2) { animation-delay: .08s; } .opt:nth-child(3) { animation-delay: .16s; }
.opt:hover { transform: translateX(4px); }
.opt .k { width: 46px; height: 46px; border-radius: 15px; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 21px; font-weight: 900; background: var(--bl-t); transition: .25s; }
.opt h4 { font-size: 16px; font-weight: 900; }
.opt p { margin-top: 2px; font-size: 13px; color: var(--navy2); line-height: 1.55; }
.opt.on { background: var(--or-t); box-shadow: 0 0 0 5px rgba(255,159,85,.3), inset 0 -4px 0 #ffd9b5, 0 4px 0 var(--navy); }
.opt.on .k { color: #fff; background: linear-gradient(180deg, var(--or1), var(--or2)); text-shadow: 0 2px 0 var(--or3); transform: rotate(-8deg) scale(1.08); }
.opt.skel { height: 78px; background: linear-gradient(90deg, var(--bg2) 0, #f6f9fc 40%, var(--bg2) 80%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; box-shadow: none; border-color: var(--bg2); }
.acts { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; }
.acts #pickLevel { flex: 1; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ================= 弹窗 ================= */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 40px 16px 20px; background: rgba(51,65,92,.42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .25s; overflow: auto; }
@keyframes fadeIn { from { opacity: 0; } }
.overlay.out { animation: fadeOut .22s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.modal { width: min(460px, 100%); animation: modalIn .55s var(--spring); margin: auto; }
.modal.wide { width: min(620px, 100%); }
.overlay.out .modal { animation: modalOut .22s forwards; }
@keyframes modalIn { from { transform: scale(.5) translateY(40px); opacity: 0; } }
@keyframes modalOut { to { transform: scale(.85); opacity: 0; } }
.rtop { display: flex; align-items: center; gap: 18px; }
.medal { position: relative; width: 104px; height: 104px; flex: none; animation: medalIn .9s var(--spring) .15s both; }
@keyframes medalIn { from { transform: scale(0) rotate(-200deg); } }
.medal .rim { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--navy); background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, var(--gold2)); box-shadow: inset 0 4px 0 rgba(255,255,255,.65), inset 0 -6px 0 #d48f0e, 0 5px 0 var(--navy); }
.medal.A .rim { background: linear-gradient(180deg, var(--bl1), var(--bl2) 55%, var(--bl3)); box-shadow: inset 0 4px 0 rgba(255,255,255,.7), inset 0 -6px 0 #5a96d4, 0 5px 0 var(--navy); }
.medal.B .rim, .medal.C .rim { background: linear-gradient(180deg, #fff, var(--bg2)); box-shadow: inset 0 4px 0 #fff, inset 0 -6px 0 #cfd8e4, 0 5px 0 var(--navy); }
.medal.K .rim { background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: inset 0 4px 0 rgba(255,255,255,.6), inset 0 -6px 0 var(--or3), 0 5px 0 var(--navy); }
.medal.S::before { content: ""; position: absolute; inset: -18px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 10%, rgba(255,201,60,.45) 10% 14%, transparent 14% 26%, rgba(255,201,60,.45) 26% 30%, transparent 30% 42%, rgba(255,201,60,.45) 42% 46%, transparent 46% 58%, rgba(255,201,60,.45) 58% 62%, transparent 62% 74%, rgba(255,201,60,.45) 74% 78%, transparent 78% 90%, rgba(255,201,60,.45) 90% 94%, transparent 94%); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.medal b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 50px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 var(--navy), 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy); }
.medal.K b { font-size: 30px; }
.medal em { position: absolute; left: 50%; bottom: -14px; translate: -50% 0; white-space: nowrap; padding: 2px 10px; border-radius: 10px; border: 2px solid var(--navy); background: #fff; font-size: 11px; font-weight: 900; font-style: normal; }
.rnum small { font-size: 13px; font-weight: 700; color: var(--navy3); }
.rnum b { display: block; font-size: 58px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.rnum .chip { margin-top: 8px; }
.cheer { margin-top: 22px; font-size: 17px; font-weight: 900; line-height: 1.6; text-align: center; animation: rise .5s var(--spring) .35s both; }
.bars { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; animation: rise .5s var(--spring) .45s both; }
.meter { font-size: 12px; font-weight: 700; color: var(--navy2); }
.meter div { display: flex; justify-content: space-between; margin-bottom: 4px; }
.meter i { display: block; height: 14px; border-radius: 7px; border: 2px solid var(--navy); background: var(--bg2); overflow: hidden; }
.meter i b { display: block; height: 100%; width: 0; background: linear-gradient(180deg, var(--bl1), var(--bl3)); box-shadow: inset 0 2px 0 rgba(255,255,255,.6); transition: width 1s var(--ease); }
.combo { margin-top: 12px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; animation: popIn .5s var(--spring) .6s both; }
.sur { margin-top: 14px; animation: rise .5s var(--spring) .55s both; }
.letter { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 2px dashed var(--or2); background: var(--or-t); text-align: left; transition: transform .15s; }
.letter:hover { transform: scale(1.02); }
.letter .env { width: 46px; height: 34px; border-radius: 8px; border: 3px solid var(--navy); background: #fff; position: relative; transform: rotate(-8deg); flex: none; animation: wig 2.4s ease-in-out 1.2s infinite; }
.letter .env::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 17px; background: var(--or1); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .4s; }
.letter.open .env::before { transform: rotateX(180deg); }
@keyframes wig { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -10deg; } 90% { rotate: 8deg; } 95% { rotate: -4deg; } }
.letter b { display: block; font-size: 15px; font-weight: 900; }
.letter span { font-size: 12px; font-weight: 700; color: var(--navy2); }
.egg { padding: 14px 16px; border-radius: 18px; border: 2px solid var(--navy); background: linear-gradient(180deg, #fff, var(--or-t)); font-size: 15px; font-weight: 700; line-height: 1.65; animation: popIn .5s var(--spring); }
.egg small { display: block; font-size: 12px; font-weight: 900; color: var(--or3); margin-bottom: 2px; }
.egg .gb { margin-top: 10px; }
.crew { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--bl-t); border: 2px solid rgba(51,65,92,.12); }
.crew .av { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 15px; font-weight: 900; color: #fff; background: linear-gradient(180deg, var(--bl2), var(--bl3)); }
.crew small { font-size: 12px; font-weight: 700; color: var(--navy3); }
.crew p { margin-top: 2px; font-size: 14px; font-weight: 700; line-height: 1.6; }
.dm { position: relative; height: 96px; border-radius: 18px; overflow: hidden; border: 2px solid rgba(51,65,92,.12); background: var(--bl-t); }
.dm small { position: absolute; left: 12px; top: 8px; font-size: 12px; font-weight: 700; color: var(--navy3); }
.dm span { position: absolute; left: 100%; white-space: nowrap; padding: 3px 12px; border-radius: 14px; border: 2px solid var(--navy); background: #fff; font-size: 13px; font-weight: 700; animation: fly var(--t) linear forwards; }
@keyframes fly { to { transform: translateX(calc(-100% - 480px)); } }
.pa { margin-top: 18px; display: flex; gap: 10px; }
.pa .gb:last-child { flex: 1; }
.stars3 { position: absolute; top: -50px; left: 50%; translate: -50% 0; display: flex; align-items: flex-end; z-index: 3; }
.stars3 svg { width: 76px; height: 76px; filter: drop-shadow(0 4px 0 var(--navy)); animation: starDrop .6s var(--spring) both; }
.stars3 svg:nth-child(1) { animation-delay: .25s; }
.stars3 svg:nth-child(2) { width: 100px; height: 100px; margin: 0 -6px 14px; animation-delay: .45s; }
.stars3 svg:nth-child(3) { animation-delay: .65s; }
@keyframes starDrop { 0% { opacity: 0; transform: translateY(-80px) scale(2) rotate(-60deg); } 70% { opacity: 1; transform: translateY(4px) scale(.9); } }
.pass .pop-t { margin-top: 46px; }
.pass-line { text-align: center; font-size: 15px; font-weight: 700; color: var(--navy2); margin-bottom: 14px; }
.pass-line b { color: var(--navy); font-size: 22px; font-weight: 900; }
.loot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.loot div { padding: 10px 6px; border-radius: 18px; border: 3px solid var(--navy); background: #fff; text-align: center; box-shadow: inset 0 -4px 0 #dfe6ef; animation: popIn .5s var(--spring) both; }
.loot div:nth-child(1) { animation-delay: .8s; } .loot div:nth-child(2) { animation-delay: .9s; } .loot div:nth-child(3) { animation-delay: 1s; }
.loot .e { font-size: 24px; }
.loot b { display: block; font-size: 18px; font-weight: 900; }
.loot small { font-size: 12px; font-weight: 700; color: var(--navy3); }
.warn-ico { width: 74px; height: 74px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 38px; font-weight: 900; color: #fff; background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -5px 0 var(--or3), 0 4px 0 var(--navy); text-shadow: 0 3px 0 var(--or3); animation: warnIn .7s var(--spring); }
@keyframes warnIn { 0% { transform: scale(0); } 60% { transform: scale(1.15) rotate(10deg); } 80% { transform: rotate(-6deg); } }
.warn h5 { margin-top: 14px; text-align: center; font-size: 21px; font-weight: 900; }
.warn p { margin-top: 8px; text-align: center; font-size: 14px; line-height: 1.7; color: var(--navy2); }
.warn .chip { display: flex; width: max-content; margin: 12px auto 0; }
.sug { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--bl-t); border: 2px solid rgba(51,65,92,.12); font-size: 14px; line-height: 1.65; }
.sug b { color: var(--bl3); font-weight: 900; }
.keep { display: block; margin: 14px auto 0; font-size: 13px; color: var(--navy3); text-decoration: underline; }
.wrap-sheet .rtop { justify-content: center; text-align: center; flex-direction: column; gap: 22px; }
.wrap-steps { margin-top: 14px; display: grid; gap: 8px; }
.ws { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; animation: rise .5s var(--spring) both; }
.ws i { height: 14px; border-radius: 7px; border: 2px solid var(--navy); background: var(--bg2); overflow: hidden; }
.ws i b { display: block; height: 100%; background: linear-gradient(180deg, var(--or1), var(--or2)); }
.ws em { font-style: normal; font-weight: 900; }
.bible-f { display: grid; gap: 10px; max-height: 60vh; overflow: auto; padding-right: 4px; }
.bible-f label { display: grid; gap: 4px; }
.bible-f span { font-size: 13px; font-weight: 900; color: var(--navy2); display: flex; justify-content: space-between; }
.bible-f textarea { width: 100%; min-height: 54px; resize: vertical; border-radius: 14px; border: 2px solid var(--navy); padding: 10px 12px; font-size: 14px; line-height: 1.6; outline: 0; background: #fff; }
.bible-f textarea:focus { box-shadow: 0 0 0 4px rgba(255,159,85,.3); }
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 60vh; overflow: auto; }
.ach { padding: 12px 8px; border-radius: 18px; border: 2px solid rgba(51,65,92,.15); background: var(--bg); text-align: center; filter: grayscale(1); opacity: .55; }
.ach.on { filter: none; opacity: 1; background: #fff; border: 3px solid var(--navy); box-shadow: 0 4px 0 var(--navy); }
.ach .ai { font-size: 28px; }
.ach b { display: block; margin-top: 4px; font-size: 13px; font-weight: 900; }
.ach p { margin-top: 2px; font-size: 11px; line-height: 1.4; color: var(--navy2); }

/* 写作台 */
#writer.active { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.w-title { text-align: center; line-height: 1.2; }
.w-title b { display: block; font-size: 17px; font-weight: 900; max-width: 50vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-title small { font-size: 12px; color: var(--navy3); }
.writer { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 360px; gap: 18px; padding: 0 20px 20px; max-width: 1280px; width: 100%; margin: 0 auto; }
.paper-wrap { display: flex; min-height: 0; }
.paper-wrap .pop-b { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 14px; }
.parts { display: flex; gap: 6px; flex-wrap: wrap; }
.parts button { height: 36px; padding: 0 14px; border-radius: 18px; border: 2px solid var(--navy); background: #fff; font-size: 14px; font-weight: 900; color: var(--navy2); }
.parts button.on { color: #fff; background: linear-gradient(180deg, var(--or1), var(--or2)); text-shadow: 0 1px 0 var(--or3); box-shadow: 0 3px 0 var(--navy); }
.parts .empty { font-size: 13px; color: var(--navy3); padding: 8px 4px; }
.paper-box { position: relative; flex: 1; min-height: 0; margin-top: 12px; }
.paper { width: 100%; height: 100%; resize: none; border: 2px solid rgba(51,65,92,.12); border-radius: 18px; background: #fffdf9 repeating-linear-gradient(180deg, transparent 0 33px, #f1ece2 33px 34px); padding: 18px 22px; font-size: 17px; line-height: 34px; outline: 0; }
.writing { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 22px; border: 2px solid var(--navy); background: #fff; font-size: 13px; font-weight: 900; }
.writing .mascot { width: 30px; height: 30px; animation: wobble 1s ease-in-out infinite; }
.writing i { width: 6px; height: 6px; border-radius: 50%; background: var(--or2); animation: blinkDot 1s infinite; }
.writing i:nth-of-type(2) { animation-delay: .2s; } .writing i:nth-of-type(3) { animation-delay: .4s; }
@keyframes blinkDot { 50% { opacity: .2; } }
.composer { margin-top: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chips button { height: 30px; padding: 0 12px; border-radius: 15px; border: 2px solid var(--navy); background: var(--bl-t); font-size: 12px; font-weight: 700; transition: transform .15s; }
.chips button:hover { transform: translateY(-2px); background: var(--or-t); }
.c-row { display: flex; gap: 8px; }
.c-row input { flex: 1; min-width: 0; height: 44px; border-radius: 22px; border: 3px solid var(--navy); padding: 0 16px; font-size: 15px; outline: 0; background: #fff; }
.tools { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; padding: 4px 4px 10px; }
.tools > * { flex: none; }
.tool-row { display: flex; gap: 8px; } .tool-row .gb { flex: 1; }
.scr { animation: rise .5s var(--spring); }
.scr .pop-b { padding: 14px; }
.scr-head { display: flex; align-items: center; gap: 12px; }
.scr-head b { font-size: 34px; font-weight: 900; }
.scr-head span { font-size: 14px; font-weight: 700; line-height: 1.5; }
.persona { margin-top: 10px; padding: 10px 12px; border-radius: 16px; background: var(--bl-t); }
.persona .phd { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 900; }
.persona .phd em { margin-left: auto; font-style: normal; }
.persona p { margin-top: 4px; font-size: 13px; line-height: 1.6; }
.persona small { display: block; margin-top: 4px; font-size: 12px; color: var(--or3); font-weight: 700; }
.fix { margin-top: 8px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 2px dashed var(--or2); background: var(--or-t); }
.fix div { flex: 1; font-size: 13px; line-height: 1.5; }
.fix b { display: block; font-weight: 900; }

/* 特效 / 提示 */
.fx { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.pt { position: absolute; width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--navy); animation: pt var(--t) cubic-bezier(.15,.7,.3,1) forwards; }
.pt.round { border-radius: 50%; }
@keyframes pt { 0% { transform: translate(0,0) rotate(0) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.6); opacity: 0; } }
.toasts { position: fixed; left: 50%; bottom: 26px; z-index: 95; translate: -50% 0; display: grid; gap: 10px; justify-items: center; pointer-events: none; }
.toasts .toast-card { animation: toastIn .55s var(--spring), toastOut .35s var(--ease) 2.8s forwards; }
.toasts .msg { padding: 10px 20px; border-radius: 22px; border: 3px solid var(--navy); background: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 4px 0 var(--navy); animation: toastIn .45s var(--spring), toastOut .3s var(--ease) 2.6s forwards; max-width: calc(100vw - 32px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(30px) scale(.8); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(20px); } }

/* ================= v2：仪式感 / 加载 / 写作台 ================= */
/* 思考气泡：轮播的俏皮话 */
.say.tip { animation: tipIn .4s var(--spring); display: inline-block; }
@keyframes tipIn { from { opacity: 0; transform: translateY(8px); } }
/* 构思中：卡背洗牌 */
.cd.back { padding: 8px; cursor: default; background: #fff; animation: shuffle 1.9s var(--ease) infinite; animation-delay: calc(var(--k) * -0.63s); }
.cd.back .cb { height: clamp(200px, calc(100dvh - 420px), 320px); border-radius: 22px; border: 3px solid var(--navy); display: grid; place-items: center; align-content: center; gap: 6px; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.55) 0 22%, transparent 23%), repeating-linear-gradient(45deg, var(--bl2) 0 14px, var(--bl1) 14px 28px); box-shadow: inset 0 0 0 8px rgba(255,255,255,.5); }
.cd.back .mascot { width: 96px; height: 96px; animation: wobble 1.2s ease-in-out infinite; }
.cd.back b { font-size: 46px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 var(--navy), 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy); }
@keyframes shuffle {
  0%, 100% { transform: translateX(calc(var(--sx, 230px) * -1)) rotate(-9deg) scale(.88); z-index: 1; }
  33% { transform: translateX(0) rotate(0) scale(1); z-index: 3; }
  66% { transform: translateX(var(--sx, 230px)) rotate(9deg) scale(.88); z-index: 2; }
}
.cd.flip { animation: flipIn .75s var(--spring) both; backface-visibility: hidden; }
@keyframes flipIn { 0% { opacity: 0; rotate: y 180deg; scale: .7; } 40% { opacity: 1; } 100% { rotate: y 0deg; scale: 1; } }
.opt.back { position: relative; cursor: default; overflow: hidden; background: repeating-linear-gradient(45deg, #f3f8ff 0 12px, #fff 12px 24px); animation: optPulse 1.4s ease-in-out infinite; animation-delay: calc(var(--k) * .2s); }
.opt.back .k { color: var(--bl3); }
.opt.back i { display: block; height: 12px; border-radius: 6px; background: var(--bg2); margin: 6px 0; width: 80%; }
.opt.back i + i { width: 55%; }
.opt.back .mascot { position: absolute; right: 14px; top: 50%; width: 34px; height: 34px; margin-top: -17px; animation: hop 1.4s var(--spring) infinite; animation-delay: calc(var(--k) * .3s); }
@keyframes optPulse { 50% { transform: translateX(6px); } }
.opt.flipx { animation: flipX .6s var(--spring) both; }
@keyframes flipX { from { opacity: 0; rotate: x 90deg; } }
/* 情绪标签 */
.chip.mood { border-color: var(--navy); }
.chip.mood.crush { background: #ffe1d6; } .chip.mood.twist { background: #ece4ff; } .chip.mood.warm { background: #fff3cf; } .chip.mood.sweet { background: #ffe3ef; }
.chip.mood.suspense { background: #dde3ee; } .chip.mood.funny { background: #e2f7d9; } .chip.mood.sad { background: #dceeff; } .chip.mood.hype { background: #ffe4c7; }
.opt h4 .chip { height: 22px; font-size: 11px; padding: 0 8px; vertical-align: 2px; margin-left: 4px; }
/* 底部工具：图标块 + 文字 */
.dock { gap: 14px; align-items: flex-end; }
.tb { display: grid; justify-items: center; gap: 4px; width: 64px; font-size: 12px; font-weight: 900; color: var(--navy2); transition: transform .15s var(--spring); }
.tb i { font-style: normal; width: 52px; height: 52px; border-radius: 18px; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 24px; background: linear-gradient(180deg, #fff, #eef3f9); box-shadow: inset 0 -4px 0 #d3dcea, 0 4px 0 var(--navy); transition: transform .12s, box-shadow .12s; }
.tb:hover { transform: translateY(-3px); }
.tb:active i { transform: translateY(3px); box-shadow: inset 0 -3px 0 #d3dcea, 0 1px 0 var(--navy); }
.tb[data-act="reroll"] i { background: linear-gradient(180deg, var(--bl1), var(--bl2)); box-shadow: inset 0 -4px 0 var(--bl3), 0 4px 0 var(--navy); }
.tb.hot i { background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: inset 0 -4px 0 var(--or3), 0 4px 0 var(--navy); animation: wig 2.6s ease-in-out 1s infinite; }
.tb.hot span { color: var(--or3); }
.gb.pick { height: 62px; padding: 0 40px; font-size: 22px; margin-left: 6px; }
/* 闪光 */
.flash { position: absolute; inset: 0; opacity: 0; animation: flash .6s ease-out; }
@keyframes flash { 10% { opacity: .85; } }
/* 情绪字幕：横扫全屏 */
.msplash { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(51,65,92,.0) 0, rgba(51,65,92,.35) 70%); animation: fadeOut .35s 1.15s forwards; }
.msplash .band { position: relative; width: 120%; padding: 26px 0 22px; display: grid; justify-items: center; gap: 4px; border-top: 4px solid var(--navy); border-bottom: 4px solid var(--navy); background: linear-gradient(180deg, #fff, var(--bg)); rotate: -4deg; animation: band .7s var(--spring) both; }
.msplash .em { font-size: 64px; line-height: 1; animation: popIn .5s var(--spring) .15s both; }
.msplash b { font-size: clamp(40px, 7vw, 72px); font-weight: 900; color: #fff; letter-spacing: .04em; text-shadow: 0 5px 0 var(--navy), 3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 -3px 0 var(--navy), 3px 3px 0 var(--navy), -3px 3px 0 var(--navy), 3px -3px 0 var(--navy), -3px -3px 0 var(--navy); animation: slamIn .45s var(--spring) .2s both; }
.msplash small { font-size: 14px; font-weight: 900; color: var(--navy2); }
@keyframes band { from { transform: translateX(-110%); } }
@keyframes slamIn { from { opacity: 0; transform: scale(2.2); } }
.msplash.crush .band { background: linear-gradient(180deg, #ffd9c9, #ff9f7f); } .msplash.twist .band { background: linear-gradient(180deg, #efe6ff, #b9a2f5); }
.msplash.warm .band { background: linear-gradient(180deg, #fff6d8, #ffd877); } .msplash.sweet .band { background: linear-gradient(180deg, #ffeaf3, #ffadcd); }
.msplash.suspense .band { background: linear-gradient(180deg, #5d6a85, #33415c); } .msplash.suspense small { color: #cfd8e8; }
.msplash.funny .band { background: linear-gradient(180deg, #ecfbe4, #a9e48e); } .msplash.sad .band { background: linear-gradient(180deg, #e8f3ff, #9cc7f2); }
.msplash.hype .band { background: linear-gradient(180deg, #ffe7cc, #ff9f55); }
.msplash.twist .band { animation: band .7s var(--spring) both, twistSpin .5s var(--ease) .75s both; }
@keyframes twistSpin { 50% { rotate: 6deg; scale: 1.05; } 100% { rotate: -4deg; } }
/* 奖章光芒 */
.medal .rays { position: absolute; inset: -34px; border-radius: 50%; opacity: 0; background: repeating-conic-gradient(from 0deg, rgba(255,201,60,.55) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: spin 9s linear infinite, raysIn .5s .7s forwards; }
.medal.A .rays { background: repeating-conic-gradient(from 0deg, rgba(120,178,236,.55) 0 8deg, transparent 8deg 22deg); }
.medal.K .rays { background: repeating-conic-gradient(from 0deg, rgba(255,159,85,.5) 0 8deg, transparent 8deg 22deg); }
.medal.B .rays, .medal.C .rays { display: none; }
@keyframes raysIn { to { opacity: 1; } }
.medal.S::before { display: none; }
/* 彩蛋按钮 */
.letter { position: relative; }
.letter .rar { position: absolute; right: 12px; top: 50%; translate: 0 -50%; padding: 2px 10px; border-radius: 10px; border: 2px solid var(--navy); font-size: 12px; font-weight: 900; background: var(--bl1); }
.letter.SSR { border-color: var(--gold2); background: linear-gradient(90deg, #fff6d6, #ffe6a3, #fff6d6); background-size: 200% 100%; animation: shine 2.4s linear infinite; }
.letter.SSR .rar { background: linear-gradient(180deg, #ffe08a, var(--gold)); }
@keyframes shine { to { background-position: -200% 0; } }
.egg b { display: block; font-size: 16px; font-weight: 900; margin-bottom: 2px; }
.egg em { display: block; margin-top: 8px; font-style: normal; font-size: 13px; font-weight: 900; color: #2e9d6a; }
.egg.SSR { background: linear-gradient(180deg, #fffbea, #ffefc0); border-color: var(--gold2); }
/* 彩蛋开箱舞台 */
.egg-stage { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; background: rgba(32,41,60,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s; overflow: hidden; }
.egg-stage.out { animation: fadeOut .3s forwards; }
.es-rays { position: absolute; width: 1400px; height: 1400px; left: 50%; top: 50%; margin: -700px 0 0 -700px; border-radius: 50%; opacity: .25; background: repeating-conic-gradient(from 0deg, rgba(168,210,251,.7) 0 6deg, transparent 6deg 18deg); animation: spin 14s linear infinite; transition: opacity .5s; }
.egg-stage.SSR .es-rays { background: repeating-conic-gradient(from 0deg, rgba(255,201,60,.8) 0 6deg, transparent 6deg 18deg); }
.egg-stage.open .es-rays { opacity: .8; animation-duration: 6s; }
.es-env { position: relative; width: 200px; height: 140px; cursor: pointer; animation: envIn .7s var(--spring); }
.es-env .body { position: absolute; inset: 0; border-radius: 18px; border: 4px solid var(--navy); background: linear-gradient(180deg, #fff, #eef3f9); box-shadow: 0 8px 0 var(--navy); }
.egg-stage.SSR .es-env .body { background: linear-gradient(180deg, #fff6d6, var(--gold)); }
.es-env .flap { position: absolute; left: 4px; right: 4px; top: 4px; height: 76px; z-index: 2; background: var(--or1); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .45s var(--ease); }
.egg-stage.SSR .es-env .flap { background: var(--gold2); }
.es-env .seal { position: absolute; left: 50%; top: 58px; z-index: 3; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 22px; color: #fff; background: linear-gradient(180deg, var(--red1), var(--red2)); }
.es-env.shake { animation: envShake .85s ease-in; }
@keyframes envIn { from { transform: translateY(300px) scale(.4) rotate(-20deg); opacity: 0; } }
@keyframes envShake { 0% { transform: none; } 20% { transform: rotate(-6deg) scale(1.05); } 40% { transform: rotate(7deg) scale(1.1); } 60% { transform: rotate(-9deg) scale(1.15); } 80% { transform: rotate(10deg) scale(1.22); } 100% { transform: scale(1.3); } }
.egg-stage.open .es-env { animation: envGone .5s var(--ease) forwards; }
.egg-stage.open .es-env .flap { transform: rotateX(180deg); }
@keyframes envGone { to { transform: translateY(120px) scale(.6); opacity: 0; } }
.es-tip { position: absolute; bottom: 18%; color: #fff; font-weight: 900; animation: blinkDot 1.2s infinite; }
.es-card { position: absolute; width: min(420px, calc(100% - 40px)); padding: 26px 22px 20px; border-radius: 30px; border: 4px solid var(--navy); background: linear-gradient(180deg, #fff, var(--bl-t)); box-shadow: 0 10px 0 var(--navy); text-align: center; opacity: 0; transform: scale(.3) rotate(-12deg); pointer-events: none; }
.egg-stage.SSR .es-card { background: linear-gradient(180deg, #fffdf2, #ffeebc); }
.egg-stage.open .es-card { pointer-events: auto; animation: cardOut .8s var(--spring) .2s forwards; }
@keyframes cardOut { 0% { opacity: 0; transform: translateY(80px) scale(.3) rotate(-12deg); } 100% { opacity: 1; transform: none; } }
.es-badge { position: absolute; left: 50%; top: -30px; translate: -50% 0; min-width: 120px; padding: 6px 16px; border-radius: 18px; border: 3px solid var(--navy); font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 var(--navy); background: linear-gradient(180deg, var(--bl2), var(--bl3)); box-shadow: 0 4px 0 var(--navy); line-height: 1.1; }
.egg-stage.SSR .es-badge { background: linear-gradient(180deg, #ffe08a, var(--gold2)); }
.es-badge small { display: block; font-size: 12px; text-shadow: none; color: var(--navy); }
.es-card h3 { margin-top: 18px; font-size: 24px; font-weight: 900; line-height: 1.35; }
.es-txt { margin-top: 10px; min-height: 5.2em; font-size: 16px; font-weight: 700; line-height: 1.75; color: var(--navy); text-align: left; }
.es-why { margin-top: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.7); font-size: 13px; font-weight: 700; color: var(--or3); text-align: left; opacity: 0; transition: opacity .4s; }
.es-card .pa { opacity: 0; transition: opacity .4s; }
.egg-stage.done .es-why, .egg-stage.done .es-card .pa { opacity: 1; }
/* 设定完成：分镜 */
.w-cover { position: relative; padding: 16px 18px 14px; border-radius: 20px; border: 3px solid var(--navy); background: linear-gradient(135deg, var(--bl1), #fff 60%); text-align: center; animation: coverIn .8s var(--spring) .2s both; }
.w-cover small { font-size: 12px; font-weight: 900; color: var(--bl3); }
.w-cover h3 { margin-top: 4px; font-size: 22px; font-weight: 900; line-height: 1.35; }
.w-cover p { margin-top: 4px; font-size: 13px; color: var(--navy2); line-height: 1.5; }
.w-tape { position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; margin-left: -45px; background: rgba(255,201,147,.85); border: 2px solid rgba(51,65,92,.2); rotate: -3deg; }
@keyframes coverIn { from { opacity: 0; transform: translateY(-60px) rotate(-8deg) scale(.8); } }
.wrap-sheet .wrap-steps { margin-top: 16px; }
.wrap-sheet .ws { opacity: 0; animation: none; }
.wrap-sheet .ws.in { opacity: 1; animation: rise .4s var(--spring); }
.wrap-sheet .ws i b { width: 0; transition: width .6s var(--ease); }
.ws em { min-width: 40px; text-align: center; padding: 1px 6px; border-radius: 10px; border: 2px solid var(--navy); background: #fff; font-size: 13px; }
.ws.in em { animation: stampIn .45s var(--spring) .1s both; }
.ws em.g-S { background: linear-gradient(180deg, #ffe08a, var(--gold)); } .ws em.g-A { background: var(--bl1); } .ws em.g-K { background: var(--or1); }
@keyframes stampIn { from { opacity: 0; transform: scale(2.6) rotate(-18deg); } }
.w-result { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 26px; min-height: 120px; }
.wrap-sheet .medal { animation: none; opacity: 0; }
.wrap-sheet.medal-in .medal { opacity: 1; animation: medalSlam .55s var(--spring) both; }
@keyframes medalSlam { 0% { opacity: 0; transform: scale(3) rotate(-30deg); } 100% { opacity: 1; transform: none; } }
.wrap-sheet .medal em i { font-style: normal; }
.w-title-stamp { padding: 8px 16px; border-radius: 16px; border: 3px dashed var(--or3); color: var(--or3); background: var(--or-t); rotate: -6deg; opacity: 0; text-align: center; }
.w-title-stamp small { display: block; font-size: 11px; font-weight: 900; color: var(--navy3); }
.w-title-stamp b { font-size: 20px; font-weight: 900; }
.wrap-sheet.title-in .w-title-stamp { opacity: 1; animation: stampIn .5s var(--spring); }
.wrap-sheet .loot { margin-top: 18px; }
.wrap-sheet .loot div { animation: none; opacity: 0; }
.wrap-sheet.all-in .loot div { opacity: 1; animation: popIn .5s var(--spring) both; }
.wrap-sheet.all-in .loot div:nth-child(2) { animation-delay: .1s; } .wrap-sheet.all-in .loot div:nth-child(3) { animation-delay: .2s; }
.wrap-sheet .pa { opacity: 0; pointer-events: none; }
.wrap-sheet.all-in .pa { opacity: 1; pointer-events: auto; animation: rise .5s var(--spring) .3s both; }
.wrap-sheet.all-in #wrapGo { animation: glow 1.6s ease-in-out 1s infinite; }
@keyframes glow { 50% { box-shadow: inset 0 3px 0 rgba(255,255,255,.6), inset 0 -6px 0 var(--or3), 0 5px 0 var(--navy), 0 0 0 8px rgba(255,159,85,.35); } }
/* 写作台 v2 */
.writer { grid-template-columns: 240px 1fr 330px; max-width: 1400px; }
.writer > * { min-width: 0; }
.paper-wrap .pop-b { min-width: 0; }
.chap { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; padding: 4px 2px 10px; }
.chap-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.chap-head b { font-size: 17px; font-weight: 900; }
.chap-head span { font-size: 12px; font-weight: 700; color: var(--navy3); }
.chap-bar { height: 14px; border-radius: 7px; border: 2px solid var(--navy); background: #fff; overflow: hidden; }
.chap-bar i { display: block; height: 100%; width: 0; background: linear-gradient(180deg, var(--or1), var(--or2)); transition: width .8s var(--spring); }
.chap .parts { display: grid; gap: 10px; }
.chap .parts button { height: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 20px; border: 3px solid var(--navy); background: #fff; text-align: left; box-shadow: inset 0 -4px 0 #dfe6ef, 0 4px 0 var(--navy); transition: transform .2s var(--spring); color: var(--navy); text-shadow: none; }
.chap .parts button:hover:not(:disabled) { transform: translateX(4px); }
.chap .parts .pn { width: 38px; height: 38px; flex: none; border-radius: 13px; border: 2px solid var(--navy); display: grid; place-items: center; font-size: 17px; font-weight: 900; background: var(--bg); }
.chap .parts .pl b { display: block; font-size: 14px; font-weight: 900; }
.chap .parts .pl small { font-size: 12px; color: var(--navy3); font-weight: 700; }
.chap .parts .pt-d .pn { color: #fff; background: linear-gradient(180deg, var(--bl2), var(--bl3)); }
.chap .parts .on { background: var(--or-t); box-shadow: 0 0 0 4px rgba(255,159,85,.35), inset 0 -4px 0 #ffd9b5, 0 4px 0 var(--navy); }
.chap .parts .pt-nx { border-style: dashed; background: #fffaf3; }
.chap .parts .pt-nx .pn { background: linear-gradient(180deg, var(--or1), var(--or2)); animation: wig 2.4s ease-in-out infinite; }
.chap .parts .pt-lk { opacity: .55; box-shadow: none; cursor: default; }
.page-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 0; }
.ph-n { width: 44px; height: 44px; flex: none; border-radius: 14px; border: 3px solid var(--navy); display: grid; place-items: center; font-size: 20px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 var(--or3); background: linear-gradient(180deg, var(--or1), var(--or2)); box-shadow: 0 3px 0 var(--navy); }
.page-head b { display: block; font-size: 18px; font-weight: 900; }
.page-head small { font-size: 12px; color: var(--navy3); font-weight: 700; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; border-radius: 18px; background: radial-gradient(circle at 50% 30%, #fff 0, rgba(255,253,249,.9) 60%); }
.empty-state .mascot.big { width: 110px; height: 110px; animation: hop 2s var(--spring) infinite; }
.empty-state h3 { font-size: 24px; font-weight: 900; }
.empty-state p { max-width: 380px; font-size: 14px; line-height: 1.7; color: var(--navy2); }
.empty-state .gb { margin-top: 6px; animation: glow 1.8s ease-in-out infinite; }
.composer.off { opacity: .45; pointer-events: none; filter: grayscale(.4); }
.ch-stamp { position: absolute; right: 30px; top: 24px; z-index: 3; padding: 10px 18px; border-radius: 18px; border: 4px solid var(--or3); color: var(--or3); background: rgba(255,241,227,.92); text-align: center; rotate: -10deg; animation: stampIn .5s var(--spring) .2s both, fadeOut .4s 1.8s forwards; }
.ch-stamp b { display: block; font-size: 20px; font-weight: 900; }
.ch-stamp span { font-size: 26px; font-weight: 900; }
.tool-card .pop-t { min-height: 40px; font-size: 20px; }
.tool-card .pop-b { padding: 14px; display: grid; gap: 10px; }
.tc-d { font-size: 13px; line-height: 1.6; color: var(--navy2); }
#screening .pop.scr { margin-top: 2px; }
#screening .scr .pop-t { display: none; }
#screening .scr { padding: 0; border: 0; background: none; box-shadow: none; }
#screening .scr .pop-b { padding: 0; border: 0; background: none; box-shadow: none; }
a.gb { text-decoration: none; }
/* 完结 */
.book { position: relative; width: 220px; height: 280px; margin: 0 auto 18px; animation: bookIn .9s var(--spring) both; }
.bk-spine { position: absolute; left: 0; top: 6px; bottom: -6px; width: 28px; border-radius: 10px 0 0 10px; border: 3px solid var(--navy); background: var(--or3); }
.bk-face { position: absolute; left: 18px; right: 0; top: 0; bottom: 0; border-radius: 6px 22px 22px 6px; border: 3px solid var(--navy); background: linear-gradient(160deg, var(--bl1), #fff 55%, var(--or-t)); box-shadow: 0 8px 0 rgba(51,65,92,.25); padding: 22px 16px; text-align: center; display: grid; align-content: center; gap: 8px; }
.bk-face small { font-size: 11px; font-weight: 900; color: var(--bl3); }
.bk-face h3 { font-size: 20px; font-weight: 900; line-height: 1.4; }
.bk-face p { font-size: 12px; color: var(--navy2); line-height: 1.5; }
.bk-stamp { position: absolute; right: -14px; bottom: 18px; padding: 4px 12px; border-radius: 12px; border: 3px solid var(--red2); color: var(--red2); background: #fff; font-size: 20px; font-weight: 900; rotate: -14deg; animation: stampIn .5s var(--spring) .7s both; }
@keyframes bookIn { from { opacity: 0; transform: translateY(80px) rotate(-14deg) scale(.6); } }
.finale .cheer { margin-top: 16px; }
/* PDF */
.pdf-wait { display: grid; justify-items: center; gap: 16px; padding: 10px 0 6px; }
.pw-book { position: relative; width: 120px; height: 90px; }
.pw-book i { position: absolute; left: 50%; bottom: 0; width: 56px; height: 80px; border-radius: 6px 12px 12px 6px; border: 3px solid var(--navy); background: #fff; transform-origin: left bottom; animation: pageTurn 1.2s var(--ease) infinite; }
.pw-book i:nth-child(1) { background: var(--or1); animation: none; left: calc(50% - 56px); transform: none; border-radius: 12px 6px 6px 12px; }
.pw-book i:nth-child(3) { animation-delay: .6s; background: var(--bl1); }
@keyframes pageTurn { 0% { transform: rotateY(0); } 50%, 100% { transform: rotateY(-180deg); } }
.pdf-wait p { font-size: 15px; font-weight: 900; color: var(--navy2); }
.pdf-done { display: flex; gap: 16px; align-items: center; }
.pdf-done img { width: 110px; flex: none; border-radius: 10px; border: 3px solid var(--navy); box-shadow: 0 5px 0 var(--navy); rotate: -4deg; animation: popIn .6s var(--spring); }
.pdf-done b { display: block; font-size: 16px; font-weight: 900; word-break: break-all; }
.pdf-done small { font-size: 12px; color: var(--navy3); font-weight: 700; }
.pd-tip { margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--or3); font-weight: 700; }

/* 声音面板 */
.snd-panel { position: fixed; z-index: 70; min-width: 196px; padding: 8px; border-radius: 20px; border: 3px solid var(--navy); background: #fff; box-shadow: 0 6px 0 var(--navy); display: grid; gap: 4px; animation: popIn .35s var(--spring); transform-origin: top right; }
.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 8px 8px 10px; border-radius: 14px; font-size: 15px; font-weight: 900; }
.sp-row:nth-child(1) { background: var(--or-t); } .sp-row:nth-child(2) { background: var(--bl-t); }
.sw { position: relative; width: 52px; height: 30px; border-radius: 15px; border: 3px solid var(--navy); background: var(--bg2); transition: background .25s; flex: none; }
.sw i { position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; transition: transform .3s var(--spring); }
.sw.on { background: linear-gradient(180deg, var(--or1), var(--or2)); }
.sw.on i { transform: translateX(22px); }
.snd-hint { position: fixed; z-index: 69; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 78px); translate: -50% 0; padding: 8px 18px; border-radius: 20px; border: 3px solid var(--navy); background: linear-gradient(180deg, #fff, var(--or-t)); box-shadow: 0 4px 0 var(--navy); font-size: 14px; font-weight: 900; white-space: nowrap; animation: hintBob 1.6s ease-in-out infinite; }
@keyframes hintBob { 50% { transform: translateY(-5px); } }

/* ================= 手机 ================= */
@media (max-width: 1180px) {
  .writer { grid-template-columns: 210px 1fr 300px; gap: 14px; padding: 0 14px 14px; }
}
@media (max-width: 960px) {
  .feats { grid-template-columns: 1fr 1fr; }
  .f1, .f2 { display: none; }
  #vLevel { flex-direction: column; overflow: auto; }
  .map { flex: none; height: 360px; border-radius: 0; }
  .side { width: 100%; padding: 12px; }
  #writer.active { height: auto; min-height: 100vh; }
  .writer { grid-template-columns: 1fr; overflow: visible; }
  .chap { overflow: visible; padding: 0; }
  .chap .parts { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; }
  .chap .parts button { flex: none; scroll-snap-align: start; padding: 8px 12px 8px 8px; }
  .paper-wrap { min-height: 72vh; }
  .tools { overflow: visible; }
}
@media (max-width: 640px) {
  .nav { padding: 0 14px; grid-template-columns: 1fr auto; }
  .nav nav { display: none; }
  .stage { height: 360px; }
  .gcard { width: 190px; margin-left: -95px; }
  .g2 { width: 200px; margin-left: -100px; }
  .g1 { --x: -150px; } .g3 { --x: 150px; }
  .ribbon { width: calc(100% - 32px); }
  .feats { grid-template-columns: 1fr 1fr; gap: 12px; padding: 36px 14px 20px; }
  .feat { border-radius: 26px; padding: 7px; }
  .feat .pop-t { min-height: 38px; padding: 0 8px; font-size: 17px; }
  .feat .pop-b { padding: 12px 8px; border-radius: 18px; }
  .feat .big { font-size: 32px; }
  .feat h4 { font-size: 15px; }
  .feat p { font-size: 12px; }
  .modes { grid-template-columns: 1fr; }
  .bar { padding: 0 10px; height: 64px; gap: 6px; grid-template-columns: auto 1fr auto; }
  .bar > .tog { justify-self: center; }
  .bar .rb { width: 40px; height: 40px; font-size: 18px; }
  .bar .rb.sm { width: 36px; height: 36px; font-size: 15px; }
  .hud-r { gap: 6px; }
  #bibleBtn { display: none; }
  .tog button, .tog .pill { width: 56px; }
  .tog button { font-size: 14px; }
  .dock { gap: 8px; padding: 8px 12px 18px; flex-wrap: nowrap; }
  .tb { width: 50px; font-size: 11px; }
  .tb i { width: 46px; height: 46px; border-radius: 16px; font-size: 21px; }
  .gb.pick { height: 54px; padding: 0 18px; font-size: 18px; margin-left: 2px; flex: 1; max-width: 170px; }
  .qwrap { margin-top: 8px; }
  .qwrap .bub { font-size: 13px; }
  .msplash .em { font-size: 48px; }
  .w-title b { max-width: 46vw; font-size: 15px; }
  #writer .bar .gb.sm { height: 38px; padding: 0 12px; font-size: 13px; }
  .hud { height: 38px; font-size: 14px; padding: 0 10px 0 4px; }
  .hud .ico { width: 24px; height: 24px; font-size: 12px; }
  #hudStars { display: none; }
  .seg { min-width: 56px; font-size: 12px; height: 30px; }
  .cd { width: 272px; margin-left: -136px; }
  .cd.back { --sx: 96px; }
  .arrow { display: none; }
  .gb { padding: 0 22px; }
  .rnum b { font-size: 46px; }
  .medal { width: 86px; height: 86px; }
  .medal b { font-size: 40px; }
  .ach-grid { grid-template-columns: 1fr 1fr; }
  .hud b { white-space: nowrap; }
  .map { height: 380px; }
  .nd { width: 58px; height: 58px; margin: -29px 0 0 -29px; font-size: 22px; }
  .nd.n { width: 70px; height: 70px; margin: -35px 0 0 -35px; font-size: 26px; }
  .nd.l { font-size: 18px; }
  .nd::before { width: 96px; height: 30px; margin-left: -48px; bottom: -16px; }
  .nd label { top: calc(100% + 12px); font-size: 13px; }
  .nd .s { top: -24px; }
  .nd .s svg { width: 16px; height: 16px; } .nd .s svg:nth-child(2) { width: 20px; height: 20px; }
  .here { translate: 44px -14px; animation: none; font-size: 12px; }
  .side, .side .pop { min-width: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .chips button { flex: none; }
  .paper { padding: 14px 16px; font-size: 16px; }
  .writer { padding: 0 12px 16px; gap: 14px; }
  .acts { flex-wrap: wrap; }
  .acts .gb.sm { flex: 1; }
  .acts #pickLevel { flex: 1 1 100%; order: -1; }
  .lv-q { font-size: 21px; }
  .opt { grid-template-columns: 40px 1fr; gap: 10px; padding: 10px; }
  .opt .k { width: 40px; height: 40px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; } }
