@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-regular-site.woff2?v=20260906") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-medium-site.woff2?v=20260906") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-semibold-site.woff2?v=20260906") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "QianTu HouHei"; src: url("/fonts/qiantu-houhei-site.woff2?v=20260906") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #101820;
  --ink-soft: #303b44;
  --muted: #65717b;
  --line: rgba(16, 24, 32, .14);
  --mist: #f3f5f6;
  --white: #fff;
  --green: #276345;
  --green-soft: #dcebe1;
  --tea: #9a5c35;
  --tea-soft: #f1e5d9;
  --gold: #d9a936;
  --danger: #b54b42;
  font-family: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--mist); }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--mist); -webkit-font-smoothing: antialiased; }
button, a { font: inherit; -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
::selection { color: var(--white); background: var(--ink); }

.two-d-main { width: min(1280px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 72px; }
.two-d-breadcrumb { min-height: 58px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.two-d-breadcrumb a { color: inherit; text-decoration: none; }
.two-d-breadcrumb a::after { content: "/"; margin-left: 10px; color: rgba(16, 24, 32, .32); }
.two-d-breadcrumb span { color: var(--ink); font-weight: 500; }

.two-d-titlebar { padding: 34px 0 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.two-d-titlebar h1 { margin: 0; font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif; font-size: clamp(48px, 5.3vw, 76px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.two-d-titlebar h1 > span { display: inline-block; }
.two-d-titlebar p { max-width: 48em; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.two-d-title-actions { display: flex; gap: 8px; }
.quiet-button { min-height: 46px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--white); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }

.two-d-game-layout { position: relative; }
.two-d-help { margin-bottom: 12px; padding: 20px 24px; display: grid; grid-template-columns: 180px 1fr minmax(200px, .6fr); gap: 28px; align-items: start; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.two-d-help[hidden] { display: none; }
.two-d-help h2 { margin: 0; font-size: 20px; font-weight: 600; }
.two-d-help ol { margin: 0; padding-left: 1.2em; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.two-d-help p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.two-d-stage { position: relative; min-height: 650px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: 0 24px 60px rgba(32, 52, 43, .08); }
.two-d-hud { position: absolute; z-index: 12; top: 16px; left: 16px; right: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; pointer-events: none; }
.two-d-hud p { min-height: 58px; margin: 0; padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(16, 24, 32, .11); border-radius: 13px; background: rgba(255, 255, 255, .94); box-shadow: 0 9px 26px rgba(16, 24, 32, .08); }
.two-d-hud span { color: var(--muted); font-size: 11px; }
.two-d-hud strong { font-size: clamp(19px, 2vw, 27px); font-weight: 600; font-variant-numeric: tabular-nums; }

.game-feedback { position: absolute; z-index: 9; left: 50%; bottom: 16px; margin: 0; padding: 9px 14px; transform: translateX(-50%); border-radius: 10px; color: var(--white); background: rgba(16, 24, 32, .88); font-size: 12px; font-weight: 500; box-shadow: 0 12px 28px rgba(16, 24, 32, .18); pointer-events: none; }
.game-feedback[data-tone="good"] { background: rgba(39, 99, 69, .94); }
.game-feedback[data-tone="bad"] { background: rgba(181, 75, 66, .94); }

.two-d-overlay { position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(243, 245, 246, .9); }
.two-d-overlay[hidden] { display: none; }
.two-d-overlay > div { width: min(430px, 100%); padding: 26px 34px 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 24px 68px rgba(16, 24, 32, .14); text-align: center; }
.two-d-overlay img { width: 118px; height: 118px; object-fit: contain; }
.two-d-overlay h2 { margin: 6px 0 0; font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif; font-size: 36px; line-height: 1; }
.two-d-overlay p { margin: 16px auto 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.primary-game-button { min-height: 50px; margin-top: 22px; padding: 0 24px; border: 0; border-radius: 12px; color: var(--white); background: var(--ink); font-weight: 600; cursor: pointer; }

/* Tea house */
.tea-stage { display: grid; grid-template-rows: minmax(430px, 1fr) auto; }
.tea-room { position: relative; min-height: 480px; overflow: hidden; isolation: isolate; background: #f3eee3; }
.tea-scene { position: absolute; z-index: -2; inset: 0; background-image: linear-gradient(90deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.16) 42%, rgba(255,255,255,.38) 100%), url("/world/partners/chengdu-tea.jpg"); background-size: cover; background-position: center 46%; filter: saturate(.96); }
.tea-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.26), transparent 36%, rgba(70,50,31,.1)); }
.tea-host { position: absolute; z-index: 3; left: .75%; bottom: 8px; width: 21%; min-width: 145px; text-align: center; }
.tea-host img { display: block; width: 100%; height: auto; filter: drop-shadow(0 15px 14px rgba(45, 34, 23, .18)); }
.tea-host span { position: relative; display: inline-block; margin-top: -28px; padding: 6px 10px; border-radius: 8px; color: var(--ink); background: var(--white); font-size: 11px; font-weight: 600; box-shadow: 0 7px 18px rgba(16, 24, 32, .12); }

.tea-guests { position: absolute; z-index: 4; top: 104px; right: 3%; bottom: 52px; left: 22%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.tea-guest { position: relative; isolation: isolate; min-width: 0; height: 100%; padding: 8px 8px 12px; overflow: hidden; border: 1px solid rgba(87, 69, 44, .2); border-radius: 16px; background: linear-gradient(180deg, #fffdf8 0%, #f5eee1 100%); box-shadow: 0 18px 36px rgba(65, 48, 28, .12); cursor: pointer; transition: transform 180ms cubic-bezier(.16,1,.3,1), border-color 180ms ease, box-shadow 180ms ease; }
.tea-guest::before { content: ""; position: absolute; z-index: 0; inset: 56px 6px 18px; border-radius: 13px; background: radial-gradient(circle at 50% 76%, rgba(217,190,144,.34), transparent 43%), linear-gradient(180deg, #fffdf8, #eee4d3); }
.tea-guest[aria-pressed="true"] { border-color: var(--tea); transform: translateY(-6px); box-shadow: 0 18px 42px rgba(74, 116, 83, .2), inset 0 0 0 2px rgba(43,103,73,.12); }
.tea-guest-image { position: absolute; z-index: 1; inset: 64px 10px 52px; display: grid; place-items: center; pointer-events: none; }
.tea-guest-image img { display: block; width: 100%; max-width: 238px; height: 100%; max-height: 100%; object-fit: contain; object-position: center center; filter: drop-shadow(0 12px 9px rgba(49, 35, 23, .2)); }
.tea-guest[data-character="yuming"] .tea-guest-image img { max-width: 205px; }
.tea-guest-order { position: absolute; z-index: 3; top: 8px; right: 8px; left: 8px; min-height: 49px; padding: 7px 8px; display: flex; align-items: center; gap: 7px; border-radius: 10px; color: var(--ink); background: var(--white); box-shadow: 0 7px 18px rgba(16, 24, 32, .1); text-align: left; }
.tea-order-icon { flex: 0 0 38px; width: 38px; height: 38px; padding: 2px; border: 1px solid rgba(87,69,44,.1); border-radius: 8px; background: #faf7f0; object-fit: contain; box-sizing: border-box; }
.tea-guest-order strong { display: block; font-size: 12px; line-height: 1.3; }
.tea-guest-order small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.tea-patience { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 10px; height: 7px; overflow: hidden; border-radius: 4px; background: rgba(16, 24, 32, .1); }
.tea-patience span { display: block; width: 100%; height: 100%; transform-origin: left center; background: var(--green); transition: transform 120ms linear, background 180ms ease; }
.tea-patience span[data-low="true"] { background: var(--danger); }
.tea-guest[data-serving="true"] .tea-guest-image { animation: tea-thanks 460ms cubic-bezier(.16,1,.3,1); }

.tea-counter { position: relative; z-index: 10; min-height: 145px; padding: 16px; display: grid; grid-template-columns: 126px minmax(0, 1fr) minmax(150px, .36fr); gap: 12px; align-items: stretch; border-top: 1px solid var(--line); background: var(--white); }
.tea-counter-heading { padding: 8px 4px; display: flex; flex-direction: column; justify-content: center; }
.tea-counter-heading strong { font-size: 18px; }
.tea-counter-heading span { margin-top: 8px; color: var(--muted); font-size: 11px; }
.tea-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tea-choice { position: relative; min-height: 104px; padding: 8px 10px 8px 82px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(180deg, #fff, #f3f1ed); cursor: pointer; text-align: left; }
.tea-choice-art { position: absolute; left: 10px; width: 64px; height: 64px; padding: 3px; border-radius: 11px; background: #faf7f0; object-fit: contain; box-sizing: border-box; box-shadow: inset 0 0 0 1px rgba(16,24,32,.06); }
.tea-choice strong { font-size: 12px; }
.tea-choice small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.tea-skill { min-height: 104px; padding: 12px; border: 1px solid var(--tea); border-radius: 13px; color: var(--white); background: var(--tea); cursor: pointer; }
.tea-skill:disabled { border-color: var(--line); color: var(--muted); background: var(--mist); cursor: default; }
.tea-skill span, .tea-skill small { display: block; }
.tea-skill span { font-weight: 600; }
.tea-skill small { margin-top: 7px; font-size: 10px; }

/* Sunbird relic guard */
.guard-game { --green: #76613a; --green-soft: #eee7d2; }
.guard-game .two-d-main { width: min(1480px, calc(100% - 32px)); }
.guard-stage { display: grid; grid-template-rows: minmax(520px, 1fr) auto; }
.guard-field { --core-rail: clamp(62px, 5.8%, 82px); position: relative; min-height: 520px; overflow: hidden; isolation: isolate; background: #6b654d; }
.guard-field::before { content: ""; position: absolute; z-index: -3; inset: 0 0 0 var(--core-rail); background: url("/games/2d-shared/scenes/ancient-shu-relic-defense-v01.png") center / cover no-repeat; filter: saturate(.94) brightness(1.04); }
.guard-field::after { content: ""; position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(255,250,236,.22), transparent 28%, transparent 76%, rgba(53,39,23,.13)), linear-gradient(180deg, rgba(255,255,255,.12), transparent 45%, rgba(84,59,26,.08)); pointer-events: none; }
.guard-depth { position: absolute; z-index: -1; inset: 82px 0 0; background: linear-gradient(90deg, rgba(183,138,45,.12), transparent 20%, transparent 84%, rgba(70,84,65,.12)), repeating-linear-gradient(180deg, transparent 0 calc(25% - 2px), rgba(255,248,224,.84) calc(25% - 2px) 25%); }
.guard-gate { position: absolute; z-index: 8; top: 82px; bottom: 0; left: 0; width: var(--core-rail); background: linear-gradient(90deg, rgba(54,63,52,.9), rgba(126,92,38,.38) 72%, transparent); box-shadow: 5px 0 14px rgba(99,73,28,.1); }
.guard-gate > strong { position: absolute; z-index: 3; top: 7px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.86); font-size: 9px; white-space: nowrap; letter-spacing: .08em; }
.guard-cores { position: absolute; inset: 20px 2px 2px; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); }
.guard-core { position: relative; display: grid; place-items: center; min-height: 0; }
.guard-core::before { content: ""; position: absolute; width: min(70%, 52px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.92); border-radius: 15px; background: rgba(255,255,255,.84); box-shadow: inset 0 0 14px rgba(255,244,210,.42), 0 4px 11px rgba(37,31,23,.16); }
.guard-core::after { content: ""; position: absolute; z-index: 1; top: 50%; left: 50%; width: min(76%, 56px); aspect-ratio: 1; transform: translate(-50%, -50%); background-position: center; background-repeat: no-repeat; background-size: contain; filter: brightness(1.08) saturate(1.08) drop-shadow(0 0 8px rgba(255,206,86,.62)) drop-shadow(0 5px 3px rgba(24,25,20,.24)); }
.guard-core:nth-child(1)::after { background-image: url("/games/2d-shared/cores/jade-prism-core-render-v01.png"); }
.guard-core:nth-child(2)::after { background-image: url("/games/2d-shared/cores/bronze-drum-core-render-v01.png"); }
.guard-core:nth-child(3)::after { background-image: url("/games/2d-shared/cores/amber-orb-core-render-v01.png"); }
.guard-core:nth-child(4)::after { background-image: url("/games/2d-shared/cores/lotus-flame-core-render-v01.png"); }
.guard-core img { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.guard-core[data-hit="true"] { animation: guard-core-hit 620ms ease-out; }
.guard-core[data-hit="true"]::after { filter: saturate(.3) brightness(1.32) drop-shadow(0 0 16px rgba(255,80,51,.92)); }
.guard-core[data-healed="true"] { animation: guard-core-heal 860ms ease-out; }
.guard-core[data-healed="true"]::after { filter: brightness(1.2) drop-shadow(0 0 18px rgba(116,231,150,.96)); }
.guard-lanes { position: absolute; z-index: 3; top: 82px; right: 8%; bottom: 0; left: 27%; display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); }
.guard-lane { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.guard-cell { position: relative; z-index: 4; min-width: 0; border: 0; border-right: 1px solid rgba(124, 88, 32, .12); background: transparent; cursor: pointer; }
.guard-cell::after { content: ""; position: absolute; inset: 10px; border: 1px solid transparent; border-radius: 13px; transition: border-color 150ms ease, background 150ms ease; }
.guard-cell[data-placeable="true"]::after { border-color: rgba(177,127,34,.46); background: rgba(255,248,220,.22); }
.guard-cell[data-removable="true"]::after { border-color: rgba(163,91,48,.82); background: rgba(255,239,221,.26); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), 0 0 18px rgba(176,104,54,.24); }
.guard-cell[data-removable="true"]::before { content: "撤回"; position: absolute; z-index: 12; top: 7px; right: 7px; min-width: 34px; padding: 3px 7px; border: 1px solid rgba(255,255,255,.82); border-radius: 999px; color: #fff; background: #9a5936; box-shadow: 0 4px 12px rgba(70,38,21,.24); font-size: 9px; font-weight: 700; }
.guard-unit { position: absolute; z-index: 6; left: 50%; bottom: 1px; width: min(88%, 96px); transform: translateX(-50%); pointer-events: none; }
.guard-unit[data-unit="yuechuan"] { width: min(96%, 108px); }
.guard-unit img { display: block; width: 100%; height: auto; filter: drop-shadow(0 11px 8px rgba(59, 43, 26, .22)); }
.guard-unit::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 8px; border-radius: 50%; background: rgba(72,49,24,.2); filter: blur(2px); }
.guard-unit[data-flash="true"] img { animation: guard-fire 260ms ease-out; }
.guard-unit-health { position: absolute; z-index: 12; top: -9px; left: 50%; display: grid; grid-template-columns: 20px 46px; align-items: center; gap: 4px; transform: translateX(-50%); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); font-size: 10px; font-weight: 800; }
.guard-unit-health strong { display: grid; min-width: 20px; height: 18px; place-items: center; border: 1px solid rgba(255,255,255,.72); border-radius: 6px; background: rgba(16,24,32,.82); box-shadow: 0 4px 10px rgba(17,25,31,.18); }
.guard-unit-health i { display: block; height: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.85); border-radius: 8px; background: rgba(15,24,29,.28); box-shadow: 0 3px 8px rgba(17,25,31,.18); }
.guard-unit-health b { display: block; width: 100%; height: 100%; transform-origin: left; border-radius: inherit; background: linear-gradient(90deg, #4caa78, #80d99a); transition: transform 180ms ease, background 180ms ease; }
.guard-unit-health[data-danger="true"] b { background: linear-gradient(90deg, #cf5746, #f28a55); }
.guard-unit-badge { position: absolute; z-index: 8; top: 9%; left: 2%; min-width: 34px; height: 22px; padding: 0 6px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; color: #fff; background: #277969; box-shadow: 0 0 0 4px rgba(99,202,179,.18), 0 7px 16px rgba(27,68,60,.24); font-size: 10px; font-weight: 700; }
.guard-unit-badge[hidden] { display: none; }
.guard-unit[data-unit="yuechuan"]::before { content: ""; position: absolute; z-index: -1; inset: 3% -6% 3%; border: 3px solid rgba(83,200,174,.72); border-radius: 48%; box-shadow: inset 0 0 16px rgba(106,230,202,.32), 0 0 18px rgba(68,185,157,.34); }
.guard-unit[data-heal="true"]::before { content: "+"; position: absolute; z-index: 9; inset: 12% auto auto 50%; color: #fff; text-shadow: 0 0 8px #6fc58d, 0 0 18px #3f9b66; font-size: 36px; font-weight: 700; animation: guard-heal 680ms ease-out; }
.guard-unit[data-healed="true"] img { filter: brightness(1.1) drop-shadow(0 0 13px rgba(95,215,134,.9)) drop-shadow(0 11px 8px rgba(59,43,26,.22)); }
.guard-unit[data-hit="true"] { animation: guard-unit-hit 340ms ease-out; }
.guard-unit[data-hit="true"] img { filter: saturate(.58) brightness(1.3) drop-shadow(0 0 14px rgba(255,91,61,.9)); }
.guard-unit[data-shield-hit="true"]::before { animation: guard-shield-hit 360ms ease-out; }
.guard-heal-petal { --petal-angle: 0deg; --petal-delay: 0ms; position: absolute; z-index: 11; top: 42%; left: 54%; width: 9px; height: 15px; border-radius: 70% 20% 70% 20%; background: linear-gradient(145deg, #fff4f5, #ef8799 58%, #c94f6a); box-shadow: 0 0 8px rgba(242,139,159,.78); transform: rotate(var(--petal-angle)); animation: guard-petal 820ms var(--petal-delay) ease-out both; }
.guard-heal-bloom { position: absolute; z-index: 10; top: 44%; left: 52%; width: 92px; height: 92px; transform: translate(-50%, -50%); background: url("/games/2d-shared/projectiles/funing-hibiscus-heal-v01.png") center / contain no-repeat; filter: drop-shadow(0 0 12px rgba(131,221,139,.64)); animation: guard-heal-bloom 940ms ease-out both; }
.guard-falling-hibiscus { --flower-delay: 0ms; position: absolute; z-index: 16; top: 0; left: 50%; width: 54px; height: 54px; background: url("/games/2d-shared/projectiles/funing-hibiscus-heal-v01.png") center / contain no-repeat; filter: drop-shadow(0 0 13px rgba(255,208,218,.94)) drop-shadow(0 7px 8px rgba(88,44,48,.25)); pointer-events: none; animation: guard-hibiscus-fall 1.9s var(--flower-delay) cubic-bezier(.22,.72,.28,1) both; }
.guard-enemy { position: absolute; z-index: 7; top: 50%; width: 72px; height: 72px; transform: translate(-50%, -50%); filter: drop-shadow(0 8px 6px rgba(30,36,28,.26)); }
.guard-enemy-art { display: block; width: 100%; height: 100%; object-fit: contain; }
.guard-enemy[data-kind="wisp"] { width: 42px; height: 42px; }
.guard-enemy[data-kind="swift"] { width: 56px; height: 56px; }
.guard-enemy[data-kind="stalker"] { width: 88px; height: 88px; }
.guard-enemy[data-kind="heavy"] { width: 108px; height: 108px; }
.guard-enemy[data-kind="thrower"] { z-index: 8; width: 124px; height: 124px; }
.guard-enemy[data-kind="raider"] { z-index: 10; width: 52px; height: 52px; filter: drop-shadow(0 7px 5px rgba(23,26,23,.34)); }
.guard-enemy[data-kind="colossus"] { z-index: 8; width: 142px; height: 142px; }
.guard-enemy[data-kind="overlord"] { z-index: 9; width: clamp(300px, 31vw, 440px); height: clamp(300px, 31vw, 440px); transform: translate(-50%, -52%); filter: drop-shadow(0 15px 12px rgba(22,25,23,.4)) drop-shadow(0 0 18px rgba(226,178,70,.25)); }
.guard-enemy[data-kind="overlord"] .guard-enemy-health { right: 12%; bottom: 7%; left: 12%; height: 8px; border: 1px solid rgba(255,248,216,.72); background: rgba(16,24,32,.42); }
.guard-enemy[data-throwing="true"] .guard-enemy-art { animation: guard-enemy-throw 720ms ease-in-out; }
.guard-enemy[data-attacking="pounce"] .guard-enemy-art { animation: guard-enemy-pounce 360ms ease-out; }
.guard-enemy[data-attacking="charged-claw"] .guard-enemy-art { animation: guard-enemy-charge 760ms ease-in-out; }
.guard-enemy[data-attacking="smash"] .guard-enemy-art, .guard-enemy[data-attacking="shockwave"] .guard-enemy-art, .guard-enemy[data-attacking="four-lane-surge"] .guard-enemy-art { animation: guard-enemy-heavy-attack 920ms ease-in-out; }
.guard-enemy[data-attacking="shadow-bolt"] .guard-enemy-art { filter: brightness(1.18) drop-shadow(0 0 14px rgba(230,178,64,.84)); }
.guard-enemy-health { position: absolute; right: 4px; bottom: -5px; left: 4px; height: 4px; overflow: hidden; border-radius: 3px; background: rgba(16,24,32,.18); }
.guard-enemy-health span { display: block; height: 100%; transform-origin: left; background: #e8bb4b; }
.guard-enemy[data-hit="true"] .guard-enemy-art { animation: guard-enemy-hit 250ms ease-out; filter: brightness(1.35) saturate(.7) drop-shadow(0 0 11px rgba(255,95,60,.9)); }
.guard-enemy[data-hit="true"]::after { content: ""; position: absolute; z-index: 10; top: 34%; left: 22%; width: 22px; height: 22px; background: radial-gradient(circle, #fff 0 12%, #ffc25c 18% 34%, rgba(238,72,43,.75) 35% 45%, transparent 48%); animation: guard-hit-spark 250ms ease-out; }
.guard-enemy[data-knockback="true"] { filter: drop-shadow(0 0 15px rgba(82,216,142,.86)); }
.guard-landing-warning { position: absolute; z-index: 5; width: 62px; height: 30px; transform: translate(-50%, -50%); border: 2px dashed rgba(161,68,33,.88); border-radius: 50%; background: radial-gradient(ellipse, rgba(255,239,176,.2), rgba(195,76,33,.34) 58%, transparent 64%); box-shadow: 0 0 0 7px rgba(255,219,128,.14), 0 0 20px rgba(140,50,24,.3); pointer-events: none; animation: guard-landing-pulse 620ms ease-in-out infinite alternate; }
.guard-thrown-raider { position: absolute; z-index: 20; width: 58px; height: 58px; transform: translate(-50%, -50%); pointer-events: none; filter: drop-shadow(0 10px 8px rgba(25,26,22,.34)); }
.guard-thrown-raider img { display: block; width: 100%; height: 100%; object-fit: contain; }
.guard-overlord-warning { position: absolute; z-index: 5; height: calc(25% - 8px); transform: translateY(-50%); border: 2px solid rgba(196,83,36,.68); border-radius: 16px; background: repeating-linear-gradient(125deg, rgba(239,194,92,.12) 0 12px, rgba(109,48,31,.18) 12px 24px); box-shadow: inset 0 0 18px rgba(250,202,93,.2), 0 0 15px rgba(121,49,27,.18); pointer-events: none; animation: guard-overlord-charge 560ms ease-in-out infinite alternate; }
.guard-overlord-warning[data-impact="true"] { border-color: rgba(255,226,139,.96); background: linear-gradient(90deg, rgba(255,242,175,.74), rgba(165,67,34,.68), rgba(255,242,175,.74)); box-shadow: inset 0 0 24px rgba(255,248,201,.84), 0 0 28px rgba(177,70,30,.78); animation: guard-overlord-impact 420ms ease-out both; }
.guard-damage-number { position: absolute; z-index: 15; top: 3%; left: 50%; transform: translateX(-50%); color: #fff; text-shadow: 0 2px 5px rgba(104,17,13,.75); font-size: 14px; font-weight: 900; letter-spacing: -.03em; animation: guard-damage-rise 720ms ease-out both; }
.guard-damage-number[data-tone="heal"] { color: #91efa9; text-shadow: 0 2px 5px rgba(22,93,48,.75), 0 0 9px rgba(95,215,134,.72); }
.guard-damage-number[data-tone="shield"] { color: #9cf4e0; text-shadow: 0 2px 5px rgba(18,89,83,.78), 0 0 9px rgba(74,211,185,.8); }
.guard-shot { position: absolute; z-index: 8; width: 34px; height: 22px; border-radius: 0; background-position: center; background-repeat: no-repeat; background-size: contain; filter: drop-shadow(0 3px 6px rgba(54,42,24,.24)); pointer-events: none; }
.guard-shot[data-kind="flower"] { background: radial-gradient(circle at center, #fff 0 18%, #f0a7b6 19% 45%, #a95d75 70%); }
.guard-shot[data-kind="sun"] { width: 62px; height: 40px; background-image: url("/games/2d-shared/projectiles/junyu-bamboo-orb-right-v01.png"); }
.guard-shot[data-kind="rapid"] { width: 50px; height: 26px; background-image: url("/games/2d-shared/projectiles/yuming-feather-bolt-right-v01.png"); }
.guard-shot[data-kind="gaiwan"] { z-index: 12; width: 64px; height: 46px; background-image: url("/games/2d-shared/projectiles/chayue-gaiwan-grenade-right-v01.png"); filter: drop-shadow(0 8px 7px rgba(83,48,25,.34)); }
.guard-shot[data-kind="lightning"] { width: 82px; height: 38px; background-image: url("/games/2d-shared/projectiles/yaochen-blue-lightning-right-v01.png"); filter: drop-shadow(0 0 10px rgba(57,191,255,.94)); }
.guard-enemy-attack { position: absolute; z-index: 11; width: 58px; height: 58px; transform: translate(-50%, -50%); pointer-events: none; }
.guard-enemy-attack[data-kind="shadow-bolt"] { width: 38px; height: 24px; border-radius: 50%; background: radial-gradient(ellipse, #fff3ba 0 12%, #d6aa46 13% 26%, #2d2420 34% 58%, transparent 64%); box-shadow: 0 0 13px rgba(42,28,27,.78); }
.guard-enemy-attack[data-kind="pounce"], .guard-enemy-attack[data-kind="swipe"], .guard-enemy-attack[data-kind="charged-claw"] { background: conic-gradient(from 35deg, transparent 0 16%, rgba(255,233,172,.94) 17% 21%, transparent 22% 35%, rgba(72,53,43,.88) 36% 42%, transparent 43%); filter: drop-shadow(0 0 6px rgba(84,49,34,.52)); animation: guard-enemy-swipe 520ms ease-out both; }
.guard-enemy-attack[data-kind="charged-claw"] { width: 84px; height: 84px; filter: drop-shadow(0 0 10px rgba(211,159,60,.72)); }
.guard-enemy-attack[data-kind="smash"] { width: 92px; height: 36px; border-radius: 50%; border: 5px solid rgba(102,75,48,.72); box-shadow: 0 0 0 8px rgba(224,187,102,.18); animation: guard-ground-smash 820ms ease-out both; }
.guard-enemy-attack[data-kind="shockwave"] { width: 150px; height: 64px; border-radius: 50%; border: 7px solid rgba(219,177,77,.82); box-shadow: 0 0 0 10px rgba(49,46,35,.22), inset 0 0 18px rgba(255,229,150,.74); animation: guard-ground-smash 1050ms ease-out both; }
.guard-energy-loot { position: absolute; z-index: 18; display: grid; width: 38px; height: 38px; place-items: center; transform: translate(-50%, -50%); border: 2px solid rgba(255,251,213,.94); border-radius: 50%; color: #56350c; background: radial-gradient(circle at 36% 28%, #fffbd0 0 10%, #ffe16d 11% 30%, #e3a329 58%, #a96c12 100%); box-shadow: 0 0 0 5px rgba(255,208,62,.18), 0 0 20px rgba(255,190,36,.9), 0 7px 8px rgba(83,48,11,.24); font-size: 10px; font-weight: 900; pointer-events: none; }
.guard-energy-loot::before { content: "辉"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; }
.guard-energy-loot { color: transparent; }
.guard-hud .guard-currency { position: relative; overflow: hidden; }
.guard-hud .guard-currency::after { content: "收集器"; position: absolute; right: 9px; bottom: 4px; color: #8b671f; font-size: 8px; font-weight: 600; letter-spacing: .08em; }
.guard-hud .guard-currency[data-collecting="true"] { border-color: rgba(219,169,47,.78); box-shadow: 0 0 0 5px rgba(255,209,70,.25), 0 9px 28px rgba(183,126,20,.3); }
.guard-hud #guard-wave { font-size: clamp(14px, 1.55vw, 21px); white-space: nowrap; }
.guard-blast { position: absolute; z-index: 9; width: 74px; height: 74px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff9d2 0 8%, #ffd366 9% 24%, rgba(238,111,46,.78) 25% 45%, rgba(154,67,37,.22) 46% 58%, transparent 62%); box-shadow: 0 0 24px rgba(255,169,61,.8); pointer-events: none; animation: guard-blast 460ms ease-out both; }

.guard-dock { position: relative; z-index: 12; min-height: 146px; padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--white); }
.guard-dock-heading { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.guard-dock-heading strong { font-size: 15px; }
.guard-dock-heading span { color: var(--muted); font-size: 11px; }
.guard-dock-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.guard-sell-button { min-height: 44px; padding: 0 12px; border: 1px solid rgba(132,91,54,.34); border-radius: 999px; color: #724b2e; background: #fff; box-shadow: 0 4px 12px rgba(76,51,28,.08); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.guard-sell-button[aria-pressed="true"] { border-color: #9a5936; color: #6b3d25; background: #faeadc; box-shadow: 0 0 0 4px rgba(173,102,53,.14); }
.guard-sell-button:disabled { opacity: .42; cursor: default; }
.guard-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.guard-card { position: relative; min-width: 0; min-height: 90px; padding: 8px 8px 8px 60px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--mist); cursor: pointer; text-align: left; }
.guard-card[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.guard-card:disabled { opacity: .48; cursor: default; }
.guard-card img { position: absolute; left: 4px; bottom: 2px; width: 54px; height: 74px; object-fit: contain; object-position: center bottom; }
.guard-card strong, .guard-card span, .guard-card small { display: block; }
.guard-card strong { font-size: 12px; }
.guard-card span { margin-top: 4px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.guard-card small { margin-top: 5px; color: var(--green); font-size: 10px; font-weight: 600; }

:focus-visible { outline: 3px solid #315f9f; outline-offset: 3px; }
.quiet-button:active, .primary-game-button:active, .tea-choice:active, .tea-skill:active, .guard-card:active { transform: translateY(1px); }

@media (hover: hover) and (pointer: fine) {
  .quiet-button:hover { border-color: var(--ink); }
  .tea-choice:hover, .guard-card:hover { border-color: rgba(16,24,32,.35); }
  .guard-cell:hover::after { border-color: rgba(39,99,69,.28); }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes tea-thanks { 0% { transform: translateY(0); } 42% { transform: translateY(-13px) scale(1.025); } 100% { transform: translateY(0); } }
  @keyframes guard-fire { 0% { transform: translateX(0); } 45% { transform: translateX(7px) scale(1.03); } 100% { transform: translateX(0); } }
  @keyframes guard-core-float { 0%,100% { transform: translateY(1px) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
  @keyframes guard-core-hit { 0% { transform: translateX(0) scale(1); } 28% { transform: translateX(-9px) scale(.9) rotate(-7deg); } 54% { transform: translateX(6px) scale(1.05) rotate(4deg); } 100% { transform: translateX(0) scale(1); } }
  @keyframes guard-core-heal { 0% { transform: scale(.82); opacity: .62; } 42% { transform: scale(1.14); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
  @keyframes guard-hibiscus-fall { 0% { opacity: 0; transform: translate(-50%, -74px) rotate(-24deg) scale(.58); } 18% { opacity: 1; } 72% { opacity: 1; transform: translate(-50%, 22px) rotate(16deg) scale(1.02); } 86% { opacity: 1; transform: translate(-50%, 30px) rotate(9deg) scale(.96); } 100% { opacity: 0; transform: translate(-50%, 34px) rotate(6deg) scale(1.16); } }
  @keyframes guard-unit-hit { 0% { transform: translateX(-50%); } 35% { transform: translateX(calc(-50% - 9px)) rotate(-3deg); } 68% { transform: translateX(calc(-50% + 3px)) rotate(1deg); } 100% { transform: translateX(-50%); } }
  @keyframes guard-enemy-hit { 0% { transform: translateX(0); } 42% { transform: translateX(8px) rotate(3deg); } 100% { transform: translateX(0); } }
  @keyframes guard-enemy-pounce { 0% { transform: translateX(0) scale(1); } 45% { transform: translateX(-13px) scale(1.08,.94); } 100% { transform: translateX(0) scale(1); } }
  @keyframes guard-enemy-charge { 0%,35% { transform: translateX(5px) rotate(2deg); filter: brightness(.86); } 58% { transform: translateX(-10px) rotate(-4deg); filter: brightness(1.3); } 100% { transform: translateX(0); } }
  @keyframes guard-enemy-throw { 0%,35% { transform: translateX(0) rotate(0); } 65% { transform: translate(8px,-5px) rotate(4deg) scale(1.04); } 100% { transform: translateX(0) rotate(0); } }
  @keyframes guard-enemy-heavy-attack { 0%,35% { transform: translateY(-5px) rotate(2deg); } 62% { transform: translate(-12px, 7px) rotate(-5deg) scale(1.05); } 100% { transform: translate(0); } }
  @keyframes guard-enemy-swipe { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-22deg); } 38% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(14deg); } }
  @keyframes guard-ground-smash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.25); } 38% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } }
  @keyframes guard-shield-hit { 0% { opacity: .5; transform: scale(.9); } 45% { opacity: 1; transform: scale(1.14); box-shadow: inset 0 0 20px rgba(118,246,216,.62), 0 0 24px rgba(68,185,157,.8); } 100% { opacity: .72; transform: scale(1); } }
  @keyframes guard-hit-spark { 0% { opacity: 0; transform: scale(.25) rotate(0); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6) rotate(32deg); } }
  @keyframes guard-damage-rise { 0% { opacity: 0; transform: translate(-50%, 5px) scale(.75); } 22% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -34px) scale(1.08); } }
  @keyframes guard-petal { 0% { opacity: 0; transform: translate(0,0) rotate(var(--petal-angle)) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(cos(var(--petal-angle)) * 48px), calc(sin(var(--petal-angle)) * 34px)) rotate(calc(var(--petal-angle) + 140deg)) scale(1.05); } }
  @keyframes guard-heal-bloom { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.32) rotate(-10deg); } 34% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.28) rotate(8deg); } }
  @keyframes guard-blast { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.18); } 32% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.38); } }
  @keyframes guard-landing-pulse { from { opacity: .58; transform: translate(-50%, -50%) scale(.82); } to { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } }
  @keyframes guard-overlord-charge { from { opacity: .38; filter: saturate(.78); } to { opacity: .82; filter: saturate(1.25); } }
  @keyframes guard-overlord-impact { 0% { opacity: .35; transform: translateY(-50%) scaleX(.94); } 35% { opacity: 1; transform: translateY(-50%) scaleX(1.02); } 100% { opacity: 0; transform: translateY(-50%) scaleX(1); } }
  @keyframes guard-heal { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 36% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -34px) scale(1.2); } }
  .tea-host img { animation: host-breathe 3.2s ease-in-out infinite; }
  @keyframes host-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
}

@media (max-width: 1040px) {
  .two-d-titlebar { grid-template-columns: 1fr; gap: 18px; }
  .two-d-title-actions { justify-content: flex-start; }
  .two-d-help { grid-template-columns: 1fr; gap: 12px; }
  .two-d-help ol { grid-template-columns: 1fr; gap: 6px; }
  .tea-counter { grid-template-columns: 102px minmax(0, 1fr); }
  .tea-skill { grid-column: 1 / -1; min-height: 54px; }
  .guard-card { padding-left: 50px; }
  .guard-card img { width: 46px; }
}

@media (max-width: 720px) {
  .two-d-main { width: min(100% - 20px, 1280px); padding-bottom: 32px; }
  .two-d-breadcrumb { min-height: 48px; font-size: 11px; }
  .two-d-titlebar { grid-template-columns: 1fr; gap: 12px; padding: 24px 4px 18px; }
  .two-d-titlebar h1 { font-size: clamp(42px, 13vw, 58px); }
  .two-d-titlebar p { font-size: 13px; line-height: 1.65; }
  .two-d-title-actions { position: static; }
  .quiet-button { min-height: 44px; padding: 0 12px; font-size: 12px; }
  .two-d-stage { min-height: 620px; border-radius: 18px; }
  .two-d-hud { top: 8px; left: 8px; right: 8px; gap: 5px; }
  .two-d-hud p { min-height: 50px; padding: 7px 9px; border-radius: 10px; display: grid; align-content: center; justify-content: stretch; gap: 1px; }
  .two-d-hud span { font-size: 9px; }
  .two-d-hud strong { font-size: 18px; }
  .guard-hud { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr); }
  .game-feedback { bottom: 8px; max-width: calc(100% - 20px); width: max-content; font-size: 12px; }

  .tea-stage { grid-template-rows: 430px auto; }
  .tea-room { min-height: 430px; }
  .tea-scene { background-position: 56% center; }
  .tea-host { left: -4%; bottom: 18px; width: 34%; min-width: 116px; }
  .tea-host span { display: none; }
  .tea-guests { top: 72px; right: 6px; bottom: 44px; left: 24%; gap: 5px; }
  .tea-guest { padding: 5px 4px 9px; border-radius: 12px; }
  .tea-guest::before { inset: 50px 3px 14px; }
  .tea-guest-image { inset: 56px 2px 31px; }
  .tea-guest-order { top: 5px; right: 4px; left: 4px; min-height: 46px; padding: 5px; gap: 3px; border-radius: 8px; }
  .tea-order-icon { flex-basis: 29px; width: 29px; height: 29px; padding: 1px; }
  .tea-guest-order strong { font-size: 11px; }
  .tea-guest-order small { display: none; }
  .tea-patience { left: 5px; right: 5px; bottom: 6px; height: 5px; }
  .tea-counter { min-height: 170px; padding: 10px; grid-template-columns: 1fr; gap: 7px; }
  .tea-counter-heading { padding: 0 2px; flex-direction: row; align-items: baseline; justify-content: space-between; }
  .tea-counter-heading strong { font-size: 14px; }
  .tea-counter-heading span { margin: 0; font-size: 9px; }
  .tea-options { gap: 5px; }
  .tea-choice { min-height: 78px; padding: 45px 4px 5px; align-items: center; justify-content: flex-end; text-align: center; }
  .tea-choice-art { top: 5px; left: 50%; width: 42px; height: 42px; padding: 1px; transform: translateX(-50%); }
  .tea-choice strong { font-size: 12px; }
  .tea-choice small { display: none; }
  .tea-skill { min-height: 45px; }
  .tea-skill span, .tea-skill small { display: inline; }
  .tea-skill small { margin: 0 0 0 7px; }

  .guard-stage { width: 100%; max-width: 100%; min-width: 0; grid-template-rows: 500px auto; }
  .guard-field, .guard-dock { min-width: 0; }
  .guard-field { --core-rail: 50px; min-height: 500px; }
  .guard-lanes, .guard-gate { top: 66px; }
  .guard-depth { inset: 66px 0 0; }
  .guard-lanes { left: 27%; right: 8%; }
  .guard-gate > strong { display: none; }
  .guard-cores { top: 4px; }
  .guard-core::before { width: 40px; border-radius: 12px; }
  .guard-core::after { width: 44px; }
  .guard-cell::after { inset: 5px 2px; border-radius: 9px; }
  .guard-unit { bottom: 1px; width: min(92%, 68px); }
  .guard-unit[data-unit="yuechuan"] { width: min(98%, 76px); }
  .guard-enemy { width: 56px; height: 56px; }
  .guard-enemy[data-kind="wisp"] { width: 34px; height: 34px; }
  .guard-enemy[data-kind="swift"] { width: 44px; height: 44px; }
  .guard-enemy[data-kind="stalker"] { width: 68px; height: 68px; }
  .guard-enemy[data-kind="heavy"] { width: 84px; height: 84px; }
  .guard-enemy[data-kind="thrower"] { width: 94px; height: 94px; }
  .guard-enemy[data-kind="raider"] { width: 42px; height: 42px; }
  .guard-enemy[data-kind="colossus"] { width: 108px; height: 108px; }
  .guard-enemy[data-kind="overlord"] { width: min(340px, 58vw); height: min(340px, 58vw); }
  .guard-thrown-raider { width: 46px; height: 46px; }
  .guard-landing-warning { width: 48px; height: 24px; }
  .guard-dock { min-height: 166px; padding: 10px; }
  .guard-dock-heading { align-items: flex-start; }
  .guard-dock-tools { gap: 6px; }
  .guard-dock-heading span { display: none; }
  .guard-sell-button { min-height: 44px; padding: 0 9px; font-size: 12px; }
  .guard-cards { width: 100%; max-width: 100%; min-width: 0; grid-template-columns: repeat(6, 82px); gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .guard-card { min-height: 146px; padding: 62px 6px 6px; text-align: center; scroll-snap-align: start; }
  .guard-card img { top: 2px; bottom: auto; left: 50%; width: 54px; height: 61px; transform: translateX(-50%); }
  .guard-card span { min-height: 3em; white-space: normal; overflow-wrap: break-word; }
  .guard-card small { margin-top: 3px; }
  .two-d-overlay > div { padding: 22px 20px 26px; }
}

@media (max-width: 420px) {
  .tea-guest-image img { width: 100%; }
  .tea-order-icon { display: none; }
  .tea-guest-order { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
