:root{--ink:#24170f;--ink-soft:#5b432b;--paper:#f4e4c5;--paper-deep:#d8b77d;--gold:#e5aa2f;--red:#bd3d2d;--jade:#6f9a73;--moss:#8fa787;--blue:#5b8fb6;--shadow:#25160a4d}*{box-sizing:border-box}html,body,#app{width:100%;height:100dvh;margin:0;overflow:hidden}body{color:var(--ink);letter-spacing:0;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:radial-gradient(circle at 15% 16%,#fff3cbb3,#0000 28%),linear-gradient(160deg,#c9d8d8 0%,#f1dfbd 35%,#d9b16d 100%);font-family:KaiTi,STKaiti,Songti SC,serif}button{font:inherit;color:inherit}.game-shell{justify-content:center;width:100%;height:100dvh;padding:8px;display:flex}.game-stage{width:min(100%,560px);height:100%;max-height:960px;box-shadow:0 18px 34px var(--shadow);background:linear-gradient(#ecd7ad,#cab28a 58%,#b48d60);border:4px solid #4a2b1b;border-radius:8px;grid-template-rows:minmax(82px,12vh) minmax(260px,1fr) minmax(248px,34vh);display:grid;position:relative;overflow:hidden}.game-stage:before{content:"";pointer-events:none;mix-blend-mode:multiply;background-image:linear-gradient(#523a2214 1px,#0000 1px),linear-gradient(90deg,#523a220d 1px,#0000 1px);background-size:18px 18px;position:absolute;inset:0}.top-hud,.bottom-hud{z-index:4;position:relative}.top-hud{background:linear-gradient(#f4e4c5f5,#eaca8fcc);border-bottom:3px solid #4228188c;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px 6px;display:flex}.brand-block{align-items:center;gap:8px;min-width:0;display:flex}.brand-block>div{min-width:0}.stage-pill{border:3px solid var(--ink);color:#fff1cc;text-align:center;background:linear-gradient(#5b3b25,#2e1e14);border-radius:6px;flex:none;place-items:center;width:58px;height:54px;font-size:18px;line-height:1.05;display:grid;box-shadow:inset 0 0 0 2px #ffeca633}.brand-block h1{color:#ffe19a;-webkit-text-stroke:2px var(--ink);text-shadow:0 3px #7c412a;white-space:nowrap;margin:0;font-size:clamp(28px,5vh,46px);line-height:.9}.brand-block p{max-width:190px;color:var(--ink-soft);text-overflow:ellipsis;white-space:nowrap;margin:4px 0 0;font-size:15px;overflow:hidden}.build-version{color:#6b4a28;text-overflow:ellipsis;white-space:nowrap;background:#fff1ccb8;border:1px solid #24170f66;border-radius:999px;width:fit-content;max-width:190px;margin-top:2px;padding:1px 6px;font-family:Arial,sans-serif;font-size:11px;line-height:1.2;display:block;overflow:hidden}.resource-strip{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:5px;min-width:156px;display:flex}.resource,.icon-button{border:2px solid var(--ink);background:#fff0cd;border-radius:999px;min-height:30px;box-shadow:0 2px #24170f3d}.resource{align-items:center;gap:4px;padding:2px 9px;font-size:17px;line-height:1;display:inline-flex}.coin{color:#865c0a}.heart{color:#c62626}.heart b{color:var(--ink);font-weight:700}.merit{color:#31547a}.enemy{color:#7a3f25;white-space:nowrap}.icon-button{cursor:pointer;width:34px;height:34px;padding:0;font-size:18px;font-weight:700}.canvas-wrap{background:linear-gradient(#d8c09a,#bfcbb2);min-height:0;position:relative;overflow:hidden}.canvas-wrap canvas{display:block}.bottom-hud{background:linear-gradient(#f4e4c5f2,#d3a86f);border-top:4px solid #402616c7;flex-direction:column;gap:7px;padding:8px 9px 10px;display:flex}.prompt-row{align-items:center;gap:8px;min-height:30px;display:flex}.message-ribbon{text-align:center;text-overflow:ellipsis;white-space:nowrap;background:#fff1d6;border:2px solid #402616a6;border-radius:6px;flex:1;min-width:0;padding:6px 10px;font-size:16px;line-height:1;overflow:hidden}.selected-chip{border:2px solid var(--ink);background:#f9f5eb;border-radius:6px;place-items:center;width:34px;height:34px;font-size:23px;display:grid;box-shadow:0 2px #24170f2e}.pending-panel,.result-panel{background:#fff2d3;border:2px solid #6c4626;border-radius:7px;grid-template-columns:1fr auto auto;align-items:center;gap:6px;padding:7px;display:grid;box-shadow:0 3px #24170f29}.pending-panel strong,.result-panel strong{font-size:18px;line-height:1.1;display:block}.pending-panel span{color:var(--ink-soft);font-size:13px;display:block}.pending-panel button,.result-panel button,.reward-grid button{border:2px solid var(--ink);cursor:pointer;background:#f6d07e;border-radius:6px;min-height:34px;font-size:16px}.result-panel{grid-template-columns:auto 1fr}.result-panel.defeat{background:#f0c5b8;grid-template-columns:1fr auto}.reward-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;display:grid}.reward-grid button{background:#f7e1a3;flex-direction:column;justify-content:center;min-width:0;padding:4px;display:flex}.reward-grid b,.reward-grid span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tavern-row{grid-template-columns:auto repeat(3,42px) 1fr;align-items:center;gap:6px;min-height:46px;display:grid}.tavern-title{color:var(--ink-soft);white-space:nowrap;font-size:18px}.tavern-slot,.skill-button{cursor:pointer;background:#efe1c8;border:2px solid #3b2719;border-radius:6px;place-items:center;height:42px;font-size:25px;display:grid;box-shadow:inset 0 -4px #4228181a}.skill-row{justify-content:flex-end;gap:5px;min-width:0;display:flex;overflow:hidden}.skill-button{background:#e8b34b;width:48px;font-size:19px}.skill-button small{font-size:11px;line-height:1}.skill-button:disabled{filter:grayscale(.6);opacity:.7}.hand-row{grid-template-columns:54px 1fr 54px;align-items:stretch;gap:7px;min-height:74px;display:grid}.cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;min-width:0;display:grid}.word-card,.tool-button{border:3px solid var(--ink);cursor:grab;background:#f8f0de;border-radius:7px;min-width:0;min-height:68px;position:relative;box-shadow:0 4px #24170f38,inset 0 0 0 2px #ffffff59}.word-card span{place-items:center;width:100%;height:100%;font-size:clamp(31px,7vh,52px);line-height:1;display:grid}.word-card.selected{border-color:#a4271f;transform:translateY(-3px);box-shadow:0 7px #69221952}.rarity-进阶{background:#e9f0db}.rarity-稀有{background:#e3edfb}.rarity-史诗{background:#f2dff5}.cat-hero-word:after,.cat-element:after,.cat-formation:after{content:"";border:1px solid #24170f6b;border-radius:50%;width:10px;height:10px;position:absolute;top:4px;right:4px}.cat-hero-word:after{background:var(--red)}.cat-element:after{background:var(--blue)}.cat-formation:after{background:var(--jade)}.tool-button{cursor:pointer;background:#e6ccb0;place-items:center;font-size:28px;line-height:1;display:grid}.tool-button small{font-size:15px}.tool-button.active{color:#fff2d8;background:#d95b3c}.action-row{grid-template-columns:1fr minmax(138px,35%);align-items:stretch;gap:8px;min-height:58px;display:grid}.action-side{grid-template-rows:auto 1fr;gap:5px;min-width:0;display:grid}.difficulty-row{align-items:center;gap:4px;min-width:0;display:flex}.difficulty-row>span{color:var(--ink-soft);white-space:nowrap;flex:none;font-size:14px;line-height:1}.difficulty-row button{cursor:pointer;background:#f6e3b3;border:2px solid #24170f9e;border-radius:6px;flex:0 34px;min-width:28px;height:26px;font-size:15px;line-height:1}.difficulty-row button.active{color:#fff4d4;background:#c84c36;border-color:#7a241c;box-shadow:inset 0 -2px #24170f2e}.difficulty-row button:disabled{cursor:not-allowed;filter:grayscale(.35);opacity:.68}.formula-strip{scrollbar-width:none;align-items:center;gap:5px;min-width:0;display:flex;overflow-x:auto}.formula-strip span,.formula-action{white-space:nowrap;background:#fff5dcd1;border:2px solid #24170f6b;border-radius:5px;flex:none;padding:5px 7px;font-size:15px;line-height:1}.formula-action{cursor:pointer;background:#f5d27f;border-color:#7a241c;box-shadow:inset 0 -2px #24170f29}.recruit-button{border:4px solid var(--ink);color:#fff5dc;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;text-shadow:0 2px #42190f;background:linear-gradient(#d95c3c,#aa2f25);border-radius:8px;justify-content:center;align-items:center;gap:8px;min-width:0;font-size:clamp(23px,4.2vh,36px);display:flex;box-shadow:0 5px #24170f4d}.recruit-button span{min-width:34px;height:30px;color:var(--ink);text-shadow:none;background:#f4c14a;border-radius:999px;place-items:center;font-size:19px;display:inline-grid}.drawer-backdrop{z-index:19;background:#140c0759;position:fixed;inset:0}.dictionary-drawer{z-index:20;border:4px solid var(--ink);background:#f4e4c5;border-radius:8px;width:min(92vw,520px);max-height:min(72vh,680px);padding:12px;position:fixed;bottom:14px;left:50%;overflow:auto;transform:translate(-50%);box-shadow:0 18px 35px #1e11085c}.drawer-head{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.dictionary-drawer h2{margin:10px 0 6px;font-size:19px}.mini-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;display:grid}.mini-card{background:#fff3d8;border:2px solid #24170f80;border-radius:6px;place-items:center;min-height:46px;font-size:24px;display:grid}.mini-card small{color:var(--ink-soft);font-size:10px}.recipe-list{gap:5px;font-size:15px;display:grid}.recipe-list span{background:#ffffff6b;border-radius:5px;padding:6px 7px}.drag-ghost{z-index:50;border:3px solid var(--ink);width:72px;height:72px;color:var(--ink);pointer-events:none;background:#fff5df;border-radius:8px;place-items:center;font-size:44px;display:grid;position:fixed;top:0;left:0;box-shadow:0 8px 18px #160d0747}@media (height<=760px){.game-stage{grid-template-rows:76px minmax(220px,1fr) 232px}.brand-block h1{font-size:31px}.word-card,.tool-button{min-height:60px}.hand-row{min-height:64px}.bottom-hud{gap:5px;padding-bottom:7px}}@media (width<=420px){.game-shell{padding:0}.game-stage{border-width:0;border-radius:0;grid-template-rows:96px minmax(258px,1fr) 232px;width:100%;height:100dvh;max-height:none}.top-hud{grid-template-columns:minmax(0,1fr) auto;padding:8px 8px 5px;display:grid}.brand-block{gap:6px;overflow:hidden}.stage-pill{width:46px;height:48px;font-size:16px}.brand-block h1{-webkit-text-stroke:1.4px var(--ink);font-size:27px}.brand-block p{max-width:108px;font-size:13px}.build-version{max-width:108px;padding-inline:5px;font-size:10px}.resource-strip{gap:4px;min-width:150px;max-width:178px}.resource{min-height:28px;padding-inline:6px;font-size:14px}.heart{gap:2px;font-size:0}.heart:before{content:"♥";font-size:14px}.heart b{font-size:14px}.icon-button{width:30px;height:30px}.bottom-hud{gap:6px;padding:7px 7px 8px}.message-ribbon{padding:5px 8px;font-size:15px}.pending-panel,.result-panel{padding:6px}.tavern-row{grid-template-columns:auto repeat(3,36px) minmax(0,1fr);gap:5px;min-height:38px}.tavern-title{font-size:16px}.tavern-slot,.skill-button{height:36px;font-size:22px}.hand-row{grid-template-columns:44px 1fr 44px;gap:5px;min-height:62px}.cards{gap:5px}.word-card,.tool-button{border-width:2px;min-height:58px}.word-card span{font-size:33px}.tool-button{font-size:24px}.tool-button small{font-size:13px}.action-row{grid-template-columns:minmax(0,1fr) 126px;gap:6px;min-height:52px}.formula-strip span,.formula-action{padding:4px 6px;font-size:12px}.recruit-button{border-width:3px;font-size:22px}.recruit-button span{min-width:28px;height:26px;font-size:16px}.dictionary-drawer{border-width:3px;width:calc(100vw - 16px);max-height:min(70dvh,620px);padding:10px;bottom:8px}}@media (width<=380px),(height<=720px){.game-stage{grid-template-rows:92px minmax(220px,1fr) 218px}.top-hud{gap:5px;padding:6px 6px 4px}.stage-pill{width:42px;height:44px;font-size:14px}.brand-block h1{-webkit-text-stroke:1.2px var(--ink);text-shadow:0 2px #7c412a;font-size:24px}.brand-block p{max-width:96px;font-size:12px}.build-version{max-width:96px;font-size:9px}.resource-strip{gap:3px;min-width:136px;max-width:154px}.resource{min-height:24px;padding-inline:5px;font-size:12px}.heart:before,.heart b{font-size:12px}.icon-button{width:26px;height:26px;font-size:15px}.bottom-hud{gap:4px;padding:5px 6px 6px}.prompt-row{min-height:26px}.message-ribbon{font-size:14px}.tavern-row{grid-template-columns:auto repeat(3,32px) minmax(0,1fr);gap:4px;min-height:34px}.tavern-title{font-size:14px}.tavern-slot,.skill-button{height:32px;font-size:20px}.hand-row{grid-template-columns:40px 1fr 40px;min-height:54px}.word-card,.tool-button{min-height:52px}.word-card span{font-size:30px}.tool-button{font-size:21px}.action-row{grid-template-columns:minmax(0,1fr) 116px;min-height:48px}.recruit-button{font-size:20px}}
