:root { --ink:#1b232b; --paper:#f6efe0; --red:#b8342a; --gold:#d9b45a; --jade:#3f8a6a; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #14202b; color: var(--ink); font-family: "PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.screen { position: fixed; inset: 0; display: none; z-index: 10; }
.screen.show { display: flex; }
#loading { background: radial-gradient(circle at 50% 40%, #27455a, #101820); align-items: center; justify-content: center; flex-direction: column; color: var(--paper); }
.seal { font-family: "STKaiti","KaiTi","Kaiti SC",serif; font-size: 34px; letter-spacing: 6px; color: #fff6e0; padding: 10px 22px; border: 2px solid var(--gold); border-radius: 6px; background: linear-gradient(#c23b2a, #8e2420); box-shadow: 0 6px 24px rgba(0,0,0,.35), inset 0 0 0 4px rgba(255,230,170,.18); }
.seal.big { font-size: clamp(38px, 8vw, 64px); }

#title { align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(10,20,30,.05), rgba(10,20,30,.45)); }
.title-box { text-align: center; color: #fff; padding: 24px; max-width: 520px; }
.sub { font-size: 17px; text-shadow: 0 2px 6px rgba(0,0,0,.6); margin: 22px 0; line-height: 1.6; }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { border: 2px solid var(--gold); background: rgba(246,239,224,.94); color: var(--ink); border-radius: 10px; padding: 11px 22px; font-size: 17px; font-weight: 600; box-shadow: 0 3px 10px rgba(0,0,0,.25); transition: transform .1s; }
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(#c8432f, #9a2a22); color: #fff8e6; }
.btn:disabled { opacity: .55; }
.qrow { margin-top: 18px; color: #fff; text-shadow: 0 1px 4px #000; font-size: 15px; }
.qbtn { margin: 0 3px; padding: 5px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.25); color: #fff; }
.qbtn.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.tiny { font-size: 12.5px; opacity: .8; margin-top: 14px; }

/* 选人：电脑在右侧，手机在下方，人物在画面中间偏左/偏上 */
#select { pointer-events: none; }
#select > * { pointer-events: auto; }
.sel-head { position: absolute; top: calc(14px + var(--safe-t)); left: 0; right: 0; text-align: center; color: #fff; font-size: 20px; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.7); pointer-events: none; }
.sel-side { position: absolute; right: 18px; top: 56px; width: 300px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100% - 70px); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.card { background: rgba(246,239,224,.9); border: 2px solid transparent; border-radius: 10px; padding: 8px 10px; text-align: left; }
.card b { display: block; font-size: 17px; }
.card span { font-size: 12.5px; color: #6a5a44; }
.card.on { border-color: var(--red); background: #fff8ea; box-shadow: 0 0 0 3px rgba(217,180,90,.6); }
.card .dot { float: right; width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; }
.sel-info { background: rgba(246,239,224,.94); border-radius: 12px; padding: 14px; border: 2px solid var(--gold); }
.sel-name b { font-size: 22px; margin-right: 8px; } .sel-name span { color: var(--red); font-weight: 600; }
.sel-trait { margin: 8px 0 4px; font-size: 15px; line-height: 1.5; }
.sel-item { font-size: 13px; color: #6a5a44; margin-bottom: 12px; }
.sel-info .btn { width: 100%; font-size: 20px; letter-spacing: 8px; }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .sel-side { left: 10px; right: 10px; top: auto; bottom: calc(10px + var(--safe-b)); width: auto; gap: 8px; }
  .cards { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .card { padding: 6px 4px; text-align: center; } .card b { font-size: 15px; } .card span { display: none; } .card .dot { display: none; }
  .sel-info { padding: 10px 12px; }
  .sel-trait { font-size: 14px; margin: 4px 0 2px; } .sel-item { margin-bottom: 8px; }
}

#story { background: rgba(8,14,22,.35); align-items: flex-start; justify-content: center; padding-top: 14vh; }
#story p { color: #fff6e0; font-family: "STKaiti","KaiTi","Kaiti SC",serif; font-size: clamp(20px, 4.4vw, 30px); text-align: center; max-width: 760px; line-height: 1.7; padding: 0 20px; text-shadow: 0 2px 10px #000; transition: opacity .5s; }
#story .skip { position: absolute; bottom: calc(24px + var(--safe-b)); left: 0; right: 0; text-align: center; color: #fff; opacity: .7; font-size: 13px; }

/* HUD：只占四角，不挡人物 */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud button { pointer-events: auto; }
.stats { position: absolute; top: calc(10px + var(--safe-t)); left: 10px; background: rgba(20,28,36,.45); border-radius: 10px; padding: 7px 9px; backdrop-filter: blur(4px); }
.stat { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.stat i { font-style: normal; color: #fff; font-size: 12px; width: 16px; text-align: center; font-weight: 700; }
.bar { width: clamp(80px, 16vw, 140px); height: 8px; background: rgba(255,255,255,.2); border-radius: 5px; overflow: hidden; }
.bar b { display: block; height: 100%; width: 50%; border-radius: 5px; transition: width .3s; }
#barH { background: linear-gradient(90deg, #e08a3a, #f2b75a); } #barT { background: linear-gradient(90deg, #3a8fc0, #7cc8e8); } #barS { background: linear-gradient(90deg, #4f9a3c, #9ad26a); }
.bar.low b { animation: blink 1s infinite; } @keyframes blink { 50% { opacity: .35; } }
.topright { position: absolute; top: calc(10px + var(--safe-t)); right: 10px; display: flex; gap: 6px; align-items: center; }
.clock { color: #fff; background: rgba(20,28,36,.45); padding: 6px 10px; border-radius: 10px; font-size: 14px; backdrop-filter: blur(4px); }
.ibtn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(20,28,36,.45); color: #fff; font-size: 14px; }
.ibtn.off { opacity: .5; text-decoration: line-through; }
.zone-tag { position: absolute; top: calc(52px + var(--safe-t)); right: 10px; color: #fff; font-size: 13px; background: rgba(184,52,42,.75); padding: 3px 10px; border-radius: 10px; }
.bottomright { position: absolute; right: 12px; bottom: calc(12px + var(--safe-b)); display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap-reverse; justify-content: flex-end; max-width: 60vw; }
.btn.act { font-size: 15px; padding: 9px 14px; }
.bagbtn { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--gold); background: radial-gradient(#c8432f, #8e2420); color: #fff6e0; font-family: "STKaiti","KaiTi",serif; font-size: 24px; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.bagbtn em { position: absolute; top: -4px; right: -4px; background: #fff6e0; color: var(--red); font-style: normal; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 6px; border: 1px solid var(--gold); font-family: sans-serif; }
.bagbtn.bump { animation: bump .35s; } @keyframes bump { 40% { transform: scale(1.2); } }

#labels { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.wlabel { position: absolute; transform: translate(-50%, -100%); background: rgba(246,239,224,.92); color: var(--ink); border: 1px solid var(--gold); border-radius: 8px; padding: 3px 9px; font-size: 13.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.wlabel.camp { background: rgba(184,52,42,.9); color: #fff; }
#fly { position: fixed; inset: 0; pointer-events: none; z-index: 7; }
.flyicon { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-family: "STKaiti","KaiTi",serif; font-size: 20px; font-weight: 700; border: 2px solid #f5dfa0; box-shadow: 0 2px 10px rgba(0,0,0,.35), 0 0 14px rgba(255,220,140,.8); }
.floattxt { position: absolute; transform: translate(-50%, 0); color: #fff; font-weight: 800; font-size: 18px; text-shadow: 0 2px 4px #000, 0 0 8px rgba(255,200,90,.9); white-space: nowrap; }
#toast { position: fixed; left: 50%; top: calc(16% + var(--safe-t)); transform: translateX(-50%); z-index: 8; pointer-events: none; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tmsg { background: rgba(20,28,36,.78); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 15px; max-width: 86vw; text-align: center; animation: tin .25s; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } }
#bigTag { position: fixed; left: 0; right: 0; top: 22%; text-align: center; z-index: 6; pointer-events: none; font-family: "STKaiti","KaiTi","Kaiti SC",serif; font-size: clamp(30px, 7vw, 52px); color: #fff6e0; text-shadow: 0 3px 12px rgba(0,0,0,.6); opacity: 0; transition: opacity .8s; letter-spacing: 8px; }
#bigTag small { display: block; font-size: 15px; letter-spacing: 1px; font-family: sans-serif; margin-top: 4px; }

.panel { position: fixed; z-index: 9; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 92vw); max-height: 78vh; overflow: auto; background: var(--paper); border: 2px solid var(--gold); border-radius: 14px; padding: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .panel-head b { font-size: 19px; } .panel-head span { color: #6a5a44; font-size: 13px; flex: 1; }
.x { border: none; background: none; font-size: 18px; margin-left: auto; }
.relic { font-size: 13px; color: #6a5a44; margin-bottom: 8px; }
.baglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bi { border: 1px solid #e0d2b0; background: #fffaf0; border-radius: 10px; padding: 8px 4px; text-align: center; font-size: 13px; }
.bi .g { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 4px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: "STKaiti","KaiTi",serif; font-size: 18px; font-weight: 700; }
.bi em { font-style: normal; color: var(--red); font-weight: 700; }
.bi small { display: block; color: #8a7a5a; font-size: 11px; }
.bi.use { border-color: var(--jade); }
.empty { color: #8a7a5a; grid-column: 1/-1; text-align: center; padding: 18px; }
.help ul { padding-left: 18px; line-height: 1.6; font-size: 14.5px; } .help .btn { width: 100%; }

#fade { position: fixed; inset: 0; background: #fff8e8; opacity: 0; pointer-events: none; z-index: 20; transition: opacity .6s; }
#fade.dark { background: #0b0f14; }
#fade.on { opacity: 1; }
.marker { position: absolute; }

.panel.help { top: calc(64px + var(--safe-t)); transform: translateX(-50%); max-height: 46vh; width: min(460px, 92vw); padding: 10px 14px; }
.help ul { margin: 4px 0 8px; font-size: 13.5px; line-height: 1.5; }
@media (max-aspect-ratio: 1/1) { .panel.help { top: calc(70px + var(--safe-t)); max-height: 44vh; } }

/* 手机虚拟摇杆（左下）与「采」键 */
#hud .joy { pointer-events: auto; }
.joy { position: absolute; left: calc(6px + env(safe-area-inset-left, 0px)); bottom: calc(8px + var(--safe-b)); width: 160px; height: 160px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; z-index: 2; }
.joy-base { position: absolute; left: 18px; top: 18px; width: 124px; height: 124px; border-radius: 50%; background: radial-gradient(circle, rgba(255,250,235,.10) 0 45%, rgba(20,28,36,.38) 46% 100%); border: 2px solid rgba(255,246,224,.55); box-shadow: inset 0 0 18px rgba(0,0,0,.25), 0 2px 10px rgba(0,0,0,.2); pointer-events: none; }
.joy-base::before, .joy-base::after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(255,246,224,.35); border-radius: 2px; }
.joy-base::before { width: 2px; height: 80%; transform: translate(-50%, -50%); }
.joy-base::after { width: 80%; height: 2px; transform: translate(-50%, -50%); }
.joy-knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fffaf0, #e9cf8c 55%, #c9a24e); border: 2px solid rgba(255,255,255,.85); box-shadow: 0 3px 10px rgba(0,0,0,.35); transition: transform .12s ease-out; z-index: 1; }
.joy.active .joy-knob { transition: none; }
.joy.active .joy-base { border-color: rgba(255,246,224,.9); }
.joy.run .joy-base { border-color: #ffcf5a; box-shadow: inset 0 0 18px rgba(0,0,0,.25), 0 0 14px rgba(255,200,80,.7); }
.usebtn { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,246,224,.6); background: rgba(20,28,36,.45); color: rgba(255,246,224,.7); font-family: "STKaiti","KaiTi",serif; font-size: 26px; font-weight: 700; touch-action: manipulation; transition: background .15s, box-shadow .15s, transform .1s; }
.usebtn.ready { background: radial-gradient(#3f8a6a, #24604a); color: #fff8e6; border-color: #f5dfa0; box-shadow: 0 0 0 3px rgba(245,223,160,.35), 0 0 16px rgba(255,220,140,.75); }
.usebtn:active { transform: scale(.94); }
/* 帮助文字按设备分 */
.help .only-desk { display: none; }
@media (pointer: fine) { .help .only-desk { display: list-item; } .help .only-touch { display: none; } }
/* 手机：右下按钮区收窄，「采」「囊」在最下排，营地按钮排到上面，不压左边摇杆 */
.bottomright .act { order: 2; }
@media (pointer: coarse) { .bottomright { max-width: 200px; } .btn.act { font-size: 14px; padding: 8px 10px; } }

/* ===================== v3 国风美化 ===================== */
:root { --zhu:#c8281e; --yu:#3f9a72; --jin:#e2b04a; --mo:#1b1410; --mi:#f7f0e1; --tian:#5fa8d8; --sha:#e9d2a0; --hai:#174a6e; }
#loading { background: radial-gradient(circle at 50% 38%, #2f5d78 0%, #173246 55%, #0d1a26 100%); }
.loadbar { width: min(260px, 60vw); height: 6px; border-radius: 4px; background: rgba(255,255,255,.15); margin-top: 22px; overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--jin), #fff1c0); animation: loadmove 1.2s ease-in-out infinite; }
@keyframes loadmove { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
#loading p { color: var(--mi); opacity: .85; font-size: 15px; }
.seal { background: linear-gradient(160deg, #d63a2a, #9a1f18); border-color: var(--jin); }

#title { background: linear-gradient(180deg, rgba(23,74,110,.12) 0%, rgba(10,20,30,0) 40%, rgba(10,20,30,.55) 100%); }
.title-box { position: relative; background: radial-gradient(ellipse at center, rgba(16,26,36,.45), rgba(16,26,36,0) 70%); padding: 30px 26px 24px; }
.cloudline { height: 22px; margin: 0 auto 14px; width: 220px; background:
  radial-gradient(circle at 12px 14px, transparent 7px, var(--jin) 7px 9px, transparent 9px) 0 0/44px 22px repeat-x; opacity: .85; }
.seal.big { animation: sealin .9s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes sealin { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
.sub { font-size: clamp(16px, 3.6vw, 19px); }
.feat { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: -6px 0 20px; }
.feat span { font-size: 13px; padding: 3px 10px; border-radius: 12px; color: var(--mi); background: rgba(63,154,114,.55); border: 1px solid rgba(247,240,225,.45); }
.feat span:nth-child(2n) { background: rgba(95,168,216,.5); }
.btn { border-radius: 12px; min-height: 48px; padding: 12px 26px; font-size: 18px; }
.btn.primary { background: linear-gradient(#d84a34, #a2281f); border-color: #f2cf7a; box-shadow: 0 4px 0 #6e1712, 0 8px 18px rgba(0,0,0,.3); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #6e1712, 0 4px 10px rgba(0,0,0,.3); }

/* 选人卡片：米白底、墨字、朱红选中 */
.card { background: rgba(247,240,225,.94); border: 2px solid rgba(226,176,74,.35); min-height: 52px; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); }
.card.on { border-color: var(--zhu); background: #fffaf0; box-shadow: 0 0 0 3px rgba(226,176,74,.7), 0 6px 14px rgba(0,0,0,.25); }
.sel-head { font-family: "STKaiti","KaiTi","Kaiti SC",serif; }
.sel-info { background: linear-gradient(#fffaf0, #f3e8d0); border-color: var(--jin); box-shadow: 0 8px 24px rgba(0,0,0,.3); }

/* 开场：卷轴 */
#story { background: radial-gradient(ellipse at 50% 30%, rgba(8,14,22,.15), rgba(8,14,22,.55)); }
#story .scroll { position: relative; max-width: 780px; margin: 0 16px; padding: 18px 26px; background: linear-gradient(90deg, rgba(247,240,225,0), rgba(247,240,225,.14) 12%, rgba(247,240,225,.14) 88%, rgba(247,240,225,0)); border-top: 2px solid rgba(226,176,74,.7); border-bottom: 2px solid rgba(226,176,74,.7); }
#story .skip { font-size: 15px; animation: blink 1.6s infinite; }

/* HUD */
.stats { background: rgba(27,20,16,.5); border: 1px solid rgba(226,176,74,.45); }
.stat i { width: 20px; height: 20px; line-height: 20px; border-radius: 50%; font-family: "STKaiti","KaiTi",serif; font-size: 13px; }
.stat:nth-child(1) i { background: #c9762e; } .stat:nth-child(2) i { background: #2f86b8; } .stat:nth-child(3) i { background: #3f8a3a; }
.bar { height: 10px; }
.clock { background: rgba(27,20,16,.5); border: 1px solid rgba(226,176,74,.45); }
.ibtn { width: 40px; height: 40px; background: rgba(27,20,16,.5); border-color: rgba(226,176,74,.6); font-family: "STKaiti","KaiTi",serif; font-size: 16px; }
.zone-tag { top: calc(58px + var(--safe-t)); right: 10px; font-family: "STKaiti","KaiTi",serif; font-size: 16px; letter-spacing: 2px; padding: 3px 12px; border: 1px solid #f2cf7a; background: linear-gradient(90deg, var(--zc, #b8342a), rgba(27,20,16,.75)); text-shadow: 0 1px 2px #000; }
.goal { position: absolute; top: calc(92px + var(--safe-t)); left: 10px; max-width: min(300px, 46vw); background: rgba(247,240,225,.92); border: 2px solid var(--jin); border-left: 6px solid var(--zhu); border-radius: 10px; padding: 6px 10px; color: var(--mo); box-shadow: 0 3px 10px rgba(0,0,0,.25); font-size: 13px; line-height: 1.4; }
.goal b { display: block; font-size: 15px; color: var(--zhu); }
.goal span { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.goal em { font-style: normal; background: #efe2c4; border-radius: 6px; padding: 0 6px; font-size: 12.5px; }
.goal em.ok { background: #cdebd8; color: #1f6a48; }
.goal small { display: block; color: #6a5a44; margin-top: 2px; font-size: 12px; }
.miniwrap { position: absolute; top: calc(90px + var(--safe-t)); right: 10px; width: 112px; height: 112px; padding: 0; border: none; background: none; border-radius: 50%; pointer-events: auto; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.miniwrap canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }
.miniwrap span { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--zhu); color: var(--mi); font-size: 11.5px; padding: 1px 8px; border-radius: 8px; border: 1px solid var(--jin); font-family: "STKaiti","KaiTi",serif; }
.tarrow { position: absolute; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: rgba(27,20,16,.62); color: #ffe6a0; border: 1px solid var(--jin); border-radius: 18px; padding: 4px 12px 4px 6px; font-size: 14px; white-space: nowrap; }
.tarrow i { font-style: normal; display: inline-block; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; background: var(--jin); color: var(--mo); transform-origin: 50% 50%; }
.tarrow i::before { content: ""; }
@media (pointer: coarse), (max-width: 760px) {
  .miniwrap { width: 88px; height: 88px; top: calc(88px + var(--safe-t)); }
  .goal { top: calc(84px + var(--safe-t)); max-width: 52vw; font-size: 12px; padding: 5px 8px; }
  .goal b { font-size: 14px; }
  .tarrow { top: auto; bottom: calc(176px + var(--safe-b)); font-size: 13px; }
}
.bagbtn { width: 64px; height: 64px; background: radial-gradient(circle at 40% 35%, #e0503a, #8e2420); }
.usebtn { width: 72px; height: 72px; }
.wlabel { border-radius: 10px; font-size: 14px; padding: 4px 10px; }
.wlabel.site { background: linear-gradient(#3f9a72, #2a7354); border-color: #f2cf7a; color: #fff8e6; }
.flyburst { position: absolute; width: 90px; height: 90px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255,250,220,.95) 0 12%, var(--c, #ffd36a) 13% 22%, rgba(255,220,140,0) 60%); mix-blend-mode: screen; }
.flyicon { width: 42px; height: 42px; margin: -21px 0 0 -21px; font-size: 22px; }
.floattxt { font-size: 22px; color: #fff3c4; }
.tmsg { background: rgba(27,20,16,.82); border: 1px solid rgba(226,176,74,.55); font-size: 16px; padding: 9px 16px; }
#bigTag { text-shadow: 0 3px 12px rgba(0,0,0,.7), 0 0 24px rgba(226,176,74,.5); }
#bigTag small { font-size: 16px; }

/* 面板：米白纸 + 金边 */
.panel { background: linear-gradient(#fffaf0, #f4e9d2); border: 2px solid var(--jin); box-shadow: 0 0 0 4px rgba(200,40,30,.18), 0 12px 40px rgba(0,0,0,.45); }
.panel-head b { font-family: "STKaiti","KaiTi","Kaiti SC",serif; font-size: 22px; color: var(--zhu); }
.x { width: 40px; height: 40px; border-radius: 50%; background: rgba(200,40,30,.1); }
.bagcat { grid-column: 1/-1; font-family: "STKaiti","KaiTi",serif; font-size: 15px; color: var(--zhu); border-bottom: 1px dashed rgba(200,40,30,.35); padding: 4px 2px 2px; margin-top: 2px; }
.bi { border-radius: 12px; min-height: 84px; box-shadow: 0 2px 0 #e6d6b0; transition: transform .1s; }
.bi:active { transform: scale(.95); }
.bi.use { border: 2px solid var(--yu); background: #f2fbf5; }
.bi .g { width: 38px; height: 38px; font-size: 20px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }

/* 大地图 */
.bigmap { width: min(760px, 94vw); max-height: 88vh; }
.bm-body { display: flex; gap: 12px; align-items: flex-start; }
.bm-body canvas { width: min(420px, 56vw); aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--jin); background: #2b6f8f; cursor: pointer; }
.zlist { flex: 1; display: grid; gap: 6px; }
.zrow { display: flex; align-items: center; gap: 8px; text-align: left; min-height: 44px; border: 1px solid #e0d2b0; background: #fffaf0; border-radius: 10px; padding: 6px 10px; font-size: 15px; }
.zrow i { width: 14px; height: 14px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.2); }
.zrow span { margin-left: auto; color: #6a5a44; font-size: 13px; }
.zrow.here { border-color: var(--zhu); } .zrow.on { background: #fff1c8; border: 2px solid var(--jin); }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .bm-body { flex-direction: column; align-items: center; }
  .bm-body canvas { width: min(86vw, 46vh); }
  .zlist { width: 100%; grid-template-columns: 1fr 1fr; }
  .zrow { font-size: 14px; } .zrow span { font-size: 12px; }
}

/* 胜利：暖色、温馨 */
#victory { position: fixed; inset: 0; z-index: 15; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(255,214,140,.35), rgba(120,50,20,.45)); opacity: 0; transition: opacity .5s; }
#victory.on { opacity: 1; }
.vic-card { position: relative; width: min(440px, 90vw); text-align: center; background: linear-gradient(#fffaf0, #f7e7c4); border: 3px solid var(--jin); border-radius: 18px; padding: 26px 22px 20px; box-shadow: 0 0 0 6px rgba(200,40,30,.25), 0 20px 60px rgba(0,0,0,.4); transform: scale(.8); transition: transform .6s cubic-bezier(.2,1.5,.4,1); }
#victory.on .vic-card { transform: scale(1); }
.vic-seal { width: 76px; height: 76px; margin: -64px auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: "STKaiti","KaiTi",serif; font-size: 26px; color: #fff6e0; background: radial-gradient(#e0503a, #9a1f18); border: 3px solid var(--jin); box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.vic-card h2 { font-family: "STKaiti","KaiTi","Kaiti SC",serif; color: var(--zhu); font-size: 30px; margin: 6px 0 10px; letter-spacing: 3px; }
.vic-card p { font-size: 16px; line-height: 1.7; color: #3a2e22; margin: 6px 0; }
.vic-stats { color: #6a5a44 !important; font-size: 14px !important; }
.vic-stats b { color: var(--zhu); }
.vic-card .btn { margin-top: 12px; width: 100%; }
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petals i { position: absolute; top: -20px; width: 14px; height: 10px; border-radius: 10px 0 10px 0; background: linear-gradient(#ffd0d6, #f28aa0); animation: petal 5s linear infinite; opacity: .9; }
.petals i:nth-child(3n) { background: linear-gradient(#fff1b8, #f2c862); width: 10px; height: 10px; border-radius: 50%; }
@keyframes petal { to { transform: translate(60px, 110vh) rotate(540deg); } }
