:root {
  --ink: #082f35;
  --muted: #6d8484;
  --paper: #fffef9;
  --mist: #edf6f2;
  --line: #d7e5df;
  --teal: #006b6d;
  --deep: #003f46;
  --mint: #40c7a4;
  --coral: #ff8169;
  --amber: #f0b84b;
  --violet: #8f70d9;
  --blue: #5f8fe8;
  --shadow: 0 18px 55px rgba(3, 54, 58, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f7f8f2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(64, 199, 164, .12), transparent 26rem),
    radial-gradient(circle at 3% 26%, rgba(240, 184, 75, .08), transparent 25rem),
    #f7f8f2;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(1rem, calc((100vw - 1380px) / 2));
  background: rgba(255, 254, 249, .91);
  border-bottom: 1px solid rgba(0, 84, 88, .1);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  background: var(--deep);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .13);
}
.topnav { display: flex; align-items: center; gap: .35rem; }
.topnav a {
  padding: .66rem .82rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 750;
  font-size: .9rem;
}
.topnav a:hover, .topnav a.active { color: var(--deep); background: var(--mist); }

.hero {
  max-width: 1380px;
  margin: 0 auto;
  padding: 4.4rem 1.25rem 2.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}
.hero h1 {
  max-width: 980px;
  margin: .35rem 0 .75rem;
  font: 900 clamp(2.7rem, 6vw, 6.6rem)/.96 Georgia, "Noto Serif SC", serif;
  letter-spacing: -.055em;
}
.hero p:not(.eyebrow) { max-width: 820px; margin: 0; color: var(--muted); line-height: 1.8; }
.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: .76rem;
  letter-spacing: .19em;
  font-weight: 950;
  text-transform: uppercase;
}
.load-status, .pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: fit-content;
  padding: .6rem .86rem;
  border-radius: 999px;
  color: var(--teal);
  background: #e3f4ef;
  border: 1px solid #c6e7dd;
  font-weight: 850;
  font-size: .84rem;
}

.shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}
.panel {
  background: rgba(255, 254, 249, .95);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.control-panel {
  position: sticky;
  top: 84px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto;
  gap: .75rem;
  padding: .85rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(16px);
}
.field, .select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  padding: 0 .9rem;
  outline: none;
}
.field:focus, .select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 107, 109, .12); }
.button {
  min-height: 48px;
  padding: 0 1.05rem;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: var(--deep);
  color: white;
  font-weight: 850;
}
.button:hover { background: var(--teal); }
.button.secondary { color: var(--teal); background: var(--mist); border: 1px solid var(--line); }

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.method-card {
  position: relative;
  min-height: 275px;
  padding: 1.45rem;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.method-card:hover { transform: translateY(-5px); border-color: var(--teal); }
.method-card .num {
  position: absolute;
  right: .9rem;
  top: .45rem;
  color: rgba(0, 72, 76, .09);
  font: 900 5.5rem/1 Georgia, serif;
}
.method-card h2 { margin: 4.2rem 0 .4rem; font: 850 1.55rem/1.2 Georgia, "Noto Serif SC", serif; }
.method-card p { color: var(--muted); line-height: 1.7; }
.method-card strong { margin-top: auto; color: var(--teal); }
.method-card:nth-child(2n) { background: linear-gradient(145deg, #fffefa, #f4effc); }
.method-card:nth-child(3n) { background: linear-gradient(145deg, #fffefa, #fff3dc); }
.method-card:last-child { color: white; background: linear-gradient(145deg, #07363c, #006d70); }
.method-card:last-child p, .method-card:last-child strong { color: #dcf6ee; }

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 1rem;
}
.workspace > * { min-width: 0; }
.sidebar { display: grid; align-content: start; gap: 1rem; }
.word-card { padding: 1.35rem; }
.word-card h2 {
  margin: .4rem 0 .1rem;
  font: 900 clamp(2.7rem, 5vw, 4.8rem)/1 Georgia, "Noto Serif SC", serif;
}
.pinyin { color: var(--teal); font-weight: 850; letter-spacing: .04em; }
.meaning { margin: .8rem 0; color: var(--muted); line-height: 1.65; }
.meta-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.tiny {
  display: inline-flex;
  align-items: center;
  padding: .35rem .55rem;
  border-radius: 9px;
  color: var(--teal);
  background: var(--mist);
  border: 1px solid var(--line);
  font-size: .73rem;
  font-weight: 850;
}
.speak {
  float: right;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  color: var(--teal);
  background: var(--mist);
  cursor: pointer;
  font-size: 1.15rem;
}

.result-list { padding: .55rem; max-height: 470px; overflow: auto; }
.word-result {
  width: 100%;
  padding: .75rem .8rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
}
.word-result:hover, .word-result.active { background: var(--mist); }
.word-result strong { font-size: 1.15rem; }
.word-result span { min-width: 0; }
.word-result small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sense-switch { padding: 1rem; }
.sense-switch h3 { margin: .3rem 0 .8rem; font-size: 1rem; }
.sense-options { display: grid; gap: .5rem; }
.sense-option {
  width: 100%;
  padding: .7rem .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
}
.sense-option:hover, .sense-option.active { border-color: var(--teal); background: var(--mist); }
.sense-option strong { color: var(--teal); }
.sense-option span { color: var(--muted); font-size: .76rem; line-height: 1.35; }

.stage { min-width: 0; overflow: hidden; }
.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem;
  border-bottom: 1px solid var(--line);
}
.stage-head h2 { margin: .2rem 0 0; font: 850 1.45rem/1.2 Georgia, "Noto Serif SC", serif; }
.stage-body { padding: 1.35rem; }

.network {
  position: relative;
  min-height: 650px;
  overflow: auto;
  background:
    linear-gradient(rgba(0, 90, 90, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 90, 90, .04) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(64, 199, 164, .16), transparent 34%);
  background-size: 40px 40px, 40px 40px, auto;
}
.network-inner { position: relative; min-width: 850px; min-height: 650px; }
.network-line {
  position: absolute;
  height: 4px;
  transform-origin: 0 50%;
  border-radius: 999px;
  background: rgba(0, 107, 109, .35);
}
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 84px;
  padding: .56rem .72rem;
  border: 3px solid white;
  border-radius: 15px;
  background: white;
  box-shadow: 0 8px 25px rgba(3, 54, 58, .12);
  cursor: pointer;
  text-align: center;
}
.node strong { display: block; font: 850 1.22rem/1.1 Georgia, "Noto Serif SC", serif; }
.node small { display: block; margin-top: .22rem; color: var(--muted); font-size: .67rem; }
.node.center { min-width: 135px; padding: 1rem; border-color: var(--coral); background: var(--deep); color: white; }
.node.center strong { font-size: 2rem; }
.node.character { border-color: var(--amber); }
.node.family { border-color: #a88add; }
.node:hover { z-index: 3; transform: translate(-50%, -50%) scale(1.06); }

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.detail-card {
  padding: 1rem;
  border-radius: 18px;
  background: #f7faf8;
  border: 1px solid var(--line);
}
.detail-card h3 { margin: .25rem 0 .45rem; }
.detail-card p { color: var(--muted); line-height: 1.65; margin: .35rem 0; }
.detail-card .zh-history { color: var(--ink); }
.source-note { font-size: .72rem; color: var(--muted); }
.source-links { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .45rem; }
.source-link { color: var(--teal); font-size: .78rem; font-weight: 800; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.example-confidence { color: var(--muted); font-size: .78rem; margin: .55rem 0 0; }
.assembly-item { position: relative; display: inline-flex; align-items: flex-start; }
.remove-block {
  position: absolute;
  right: -.35rem;
  top: -.4rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(207, 90, 77, .25);
}
.char-block:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(.5); }
.schedule-note {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  color: var(--muted);
  font-size: .82rem;
}
.schedule-note strong { color: var(--teal); }

.timeline { position: relative; display: grid; gap: 1rem; padding-left: 2.6rem; }
.timeline::before { content: ""; position: absolute; left: 1rem; top: .7rem; bottom: .7rem; width: 3px; background: linear-gradient(var(--coral), var(--amber), var(--mint)); }
.timeline-step { position: relative; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: white; }
.timeline-step::before { content: ""; position: absolute; left: -2.12rem; top: 1.25rem; width: 14px; height: 14px; border: 4px solid white; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.timeline-step h3 { margin: 0 0 .4rem; }
.timeline-step p { margin: .35rem 0; color: var(--muted); line-height: 1.7; }

.block-instructions { padding: .8rem 1rem; border-radius: 15px; background: #e9f7f3; color: var(--teal); line-height: 1.6; }
.block-zone { min-height: 125px; padding: 1rem; margin: .8rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; border: 2px dashed var(--line); border-radius: 18px; }
.char-block, .part-block {
  min-width: 92px;
  padding: .8rem;
  border: 2px solid var(--blue);
  border-radius: 16px;
  background: #eef4ff;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 7px 15px rgba(48, 90, 170, .1);
}
.char-block strong, .part-block strong { display: block; font: 850 1.55rem/1 Georgia, "Noto Serif SC", serif; }
.char-block small, .part-block small { display: block; margin-top: .3rem; color: var(--muted); font-size: .68rem; }
.part-block.semantic { border-color: var(--mint); background: #eaf9f4; }
.part-block.phonetic { border-color: var(--amber); background: #fff7e6; }
.part-block.pictorial { border-color: var(--violet); background: #f4effc; }
.assembly { border-style: solid; background: #fff; }
.assembly .placeholder { color: var(--muted); }
.component-strip { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .7rem; }

.comparison-wrap { overflow: auto; }
.comparison { width: 100%; border-collapse: collapse; min-width: 760px; }
.comparison th, .comparison td { padding: .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.comparison th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.comparison tbody tr { cursor: pointer; }
.comparison tbody tr:hover { background: var(--mist); }
.comparison .main-word { font: 850 1.3rem/1 Georgia, "Noto Serif SC", serif; }

.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.story-card {
  position: relative;
  min-height: 245px;
  padding: 1.2rem;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(145deg, #fffefa, #edf8f4);
  border: 1px solid var(--line);
}
.story-card:nth-child(2n) { background: linear-gradient(145deg, #fffefa, #fff3dc); }
.story-card .big-char { position: absolute; right: .4rem; bottom: -.35rem; color: rgba(0, 70, 74, .07); font: 900 9rem/1 Georgia, serif; }
.story-card h3 { margin: .35rem 0; font: 850 1.5rem/1.15 Georgia, "Noto Serif SC", serif; }
.story-card p { position: relative; color: var(--muted); line-height: 1.68; }
.practice-panel {
  width: min(100%, 760px);
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid #bfded7;
  border-radius: 18px;
  background: linear-gradient(145deg, #effaf7, #fffdf8);
  text-align: left;
}
.practice-panel.compact { margin: .8rem 0; padding: .8rem; }
.practice-panel > small { display: block; margin: .45rem 0; color: var(--teal); font-weight: 850; letter-spacing: .08em; }
.practice-panel > strong { display: block; color: var(--ink); line-height: 1.55; }
.practice-cloze { margin: .7rem 0; padding: .75rem; border-radius: 13px; color: var(--ink) !important; background: white; font-size: 1.05rem; font-weight: 750; }
.practice-answer { width: 100%; margin-top: .8rem; padding: .8rem; border-radius: 13px; background: white; color: var(--ink); }
.practice-answer[hidden] { display: none; }
.practice-answer p { margin-bottom: 0; color: var(--muted); }

.path-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.stat { padding: 1rem; border-radius: 17px; text-align: center; background: var(--mist); border: 1px solid var(--line); }
.stat strong { display: block; font: 900 1.7rem/1 Georgia, serif; }
.stat small { color: var(--muted); }
.study-card { padding: 2rem; text-align: center; min-height: 390px; display: grid; align-content: center; justify-items: center; }
.study-card .study-word { font: 900 clamp(4rem, 11vw, 8rem)/1 Georgia, "Noto Serif SC", serif; }
.study-card .study-pinyin { color: var(--teal); font-size: 1.35rem; font-weight: 850; }
.study-card .reveal { max-width: 700px; margin: 1rem auto; padding: 1rem; border-radius: 18px; background: var(--mist); }
.progress { height: 10px; border-radius: 99px; background: #dbe8e3; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--mint)); transition: width .25s; }

.game-shell { color: #eafff8; background: linear-gradient(155deg, #062f35, #003f46); border-color: #175c60; }
.game-shell .stage-head { border-color: rgba(255,255,255,.12); }
.game-shell .eyebrow { color: #72dec3; }
.game-toolbar { display: flex; flex-wrap: wrap; gap: .7rem; padding: 1rem; background: rgba(255,255,255,.06); border-radius: 18px; }
.game-toolbar .select { background: #0b4a50; color: white; border-color: #397276; }
.scoreboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 1rem 0; }
.score { padding: .8rem; text-align: center; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.06); }
.score strong { display: block; color: #8ff0d2; font: 900 1.65rem/1 Georgia, serif; }
.arena {
  --aim-x: 0;
  --aim-y: 0;
  position: relative;
  min-height: 690px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(1,21,25,.05) 0 55%, rgba(0,18,23,.78) 100%),
    linear-gradient(rgba(95,210,190,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95,210,190,.07) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, rgba(44,176,160,.2), transparent 46%),
    linear-gradient(155deg, #063b42, #022a31 60%, #011a20);
  background-size: auto, 46px 46px, 46px 46px, auto, auto;
  box-shadow: inset 0 0 90px rgba(0,0,0,.38);
}
.arena::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at calc(50% + var(--aim-x) * 4%) calc(49% + var(--aim-y) * 3%), transparent 0 31%, rgba(0,8,11,.12) 61%, rgba(0,5,8,.42) 100%);
}
.mission { position: relative; z-index: 7; padding: 1.2rem; text-align: center; }
.mission h2 { margin: .3rem 0; font: 850 clamp(1.7rem, 4vw, 3rem)/1.2 Georgia, "Noto Serif SC", serif; }
.targets { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; padding: 1.2rem 2rem 18rem; }
.target {
  min-height: 130px;
  border: 2px solid rgba(114,222,195,.48);
  border-radius: 50%;
  color: white;
  background: radial-gradient(ellipse, rgba(53,193,176,.3), rgba(5,57,62,.7) 58%, transparent 60%);
  cursor: crosshair;
  font: 850 clamp(1.7rem, 3vw, 2.6rem)/1 Georgia, "Noto Serif SC", serif;
}
.target:hover { border-color: var(--amber); box-shadow: 0 0 38px rgba(240,184,75,.25); transform: translateY(-2px); }
.target.hit { animation: hit .42s ease; }
.target.miss { animation: miss .35s ease; }
@keyframes hit { 50% { transform: scale(.85); background: rgba(64,199,164,.75); } }
@keyframes miss { 30%, 70% { transform: translateX(8px); border-color: var(--coral); } 50% { transform: translateX(-8px); } }
.aim-depth {
  position: absolute;
  z-index: 2;
  left: calc(50% + var(--aim-x) * 2.2%);
  top: calc(49% + var(--aim-y) * 1.8%);
  width: min(44vw, 520px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(122,236,212,.08);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 40px rgba(83,204,181,.025), 0 0 0 90px rgba(83,204,181,.018);
}
.weapon-rig {
  position: absolute;
  z-index: 6;
  right: -8%;
  bottom: -7%;
  width: clamp(560px, 70vw, 930px);
  aspect-ratio: 3 / 2;
  pointer-events: none;
  transform-origin: 86% 88%;
  transform: translate(calc(var(--aim-x) * 18px), calc(var(--aim-y) * 13px)) rotate(calc(var(--aim-x) * -1.25deg));
  transition: transform .12s cubic-bezier(.2,.7,.2,1), filter .18s ease;
  filter: drop-shadow(-22px 28px 22px rgba(0,0,0,.48));
  will-change: transform;
}
.weapon-rig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.weapon-glow {
  position: absolute;
  inset: 30% 18% 3% 30%;
  background: radial-gradient(ellipse, rgba(44,211,178,.18), transparent 68%);
  filter: blur(24px);
}
.muzzle-flash {
  position: absolute;
  left: 44.7%;
  top: 42.5%;
  width: 10px;
  height: 10px;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-12deg);
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 10px 5px #fff7c8, 0 0 22px 11px #ffbd48, 0 0 50px 21px rgba(255,92,27,.72);
}
.weapon-rig.firing { animation: rifle-recoil .22s cubic-bezier(.16,.8,.26,1); }
.weapon-rig.firing .muzzle-flash { animation: muzzle-burst .12s ease-out; }
@keyframes rifle-recoil {
  32% { transform: translate(calc(var(--aim-x) * 18px + 22px), calc(var(--aim-y) * 13px + 17px)) rotate(calc(var(--aim-x) * -1.25deg + 2deg)); }
  100% { transform: translate(calc(var(--aim-x) * 18px), calc(var(--aim-y) * 13px)) rotate(calc(var(--aim-x) * -1.25deg)); }
}
@keyframes muzzle-burst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.45) rotate(-12deg); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(2.8) rotate(12deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.2) rotate(24deg); }
}
.impact-ring {
  position: absolute;
  z-index: 8;
  width: 28px;
  height: 28px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.3);
  border: 2px solid #fff4b3;
  border-radius: 50%;
  pointer-events: none;
}
.impact-ring.show { animation: impact-pulse .28s ease-out; }
@keyframes impact-pulse {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.3); box-shadow: 0 0 8px #fff; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.2); box-shadow: 0 0 28px #f0b84b; }
}
.shot-kick { animation: arena-kick .16s ease-out; }
@keyframes arena-kick { 45% { box-shadow: inset 0 0 110px rgba(255,184,75,.14); } }
.training-hud {
  position: absolute;
  z-index: 8;
  right: 1.1rem;
  top: 1.1rem;
  display: grid;
  grid-template-columns: auto auto;
  gap: .1rem .55rem;
  align-items: baseline;
  padding: .7rem .8rem;
  border: 1px solid rgba(126,229,205,.28);
  border-radius: 13px;
  background: rgba(1,23,29,.7);
  backdrop-filter: blur(9px);
  color: #dffdf5;
  letter-spacing: .08em;
}
.training-hud span { color: var(--amber); font: 900 1.35rem/1 Georgia, serif; }
.training-hud small { grid-column: 1 / -1; color: #8eb8b2; font-size: .66rem; }
.arena.is-aiming .crosshair { filter: drop-shadow(0 0 8px rgba(255,230,170,.42)); }
.arena.is-aiming .weapon-rig { filter: drop-shadow(-22px 28px 22px rgba(0,0,0,.48)) brightness(1.03); }
.crosshair {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #ffe6aa;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9;
}
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: #ffe6aa; box-shadow: 0 0 5px rgba(255,230,170,.65); }
.crosshair::before { left: 50%; top: -9px; width: 2px; height: 50px; }
.crosshair::after { top: 50%; left: -9px; height: 2px; width: 50px; }
.crosshair span { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--amber); box-shadow: 0 0 9px rgba(240,184,75,.9); }
.feedback { position: absolute; z-index: 10; left: 1.2rem; bottom: 1.2rem; width: min(53%, 620px); min-height: 86px; margin: 0; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(0,15,19,.76); backdrop-filter: blur(10px); line-height: 1.6; }
.feedback strong { color: var(--amber); }

.empty { color: var(--muted); }
.footer-note { margin-top: 1rem; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.history-caveat {
  margin-top: .85rem;
  padding: .8rem .9rem;
  border-left: 4px solid var(--amber);
  border-radius: 0 12px 12px 0;
  background: #fff6df;
  color: #665026;
  line-height: 1.6;
}
.history-caveat small { color: #806b43; }
.lexical-note {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #b8ded7;
  border-radius: 16px;
  background: linear-gradient(135deg, #eefaf7, #fffdf8);
  line-height: 1.65;
}
.usage-pattern {
  display: grid;
  gap: .25rem;
  margin: .8rem 0;
  padding: .75rem .85rem;
  border-radius: 12px;
  background: rgba(6, 92, 94, .08);
}
.usage-pattern small { color: var(--muted); }

@media (max-width: 1020px) {
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .result-list { max-height: 330px; }
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 72px;
    padding: .65rem 1rem .5rem;
    flex-wrap: wrap;
    gap: .45rem;
  }
  .brand { min-height: 44px; }
  .topnav {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    padding-bottom: .15rem;
    scroll-snap-type: x proximity;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    scroll-snap-align: start;
  }
  .hero { grid-template-columns: 1fr; padding-top: 2.7rem; }
  .control-panel { position: static; grid-template-columns: 1fr; }
  .method-grid, .story-grid, .detail-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .path-stats, .scoreboard { grid-template-columns: repeat(2, 1fr); }
  .targets { grid-template-columns: 1fr; padding: 1rem 1rem 22rem; }
  .arena { min-height: 920px; }
  .weapon-rig { right: -34%; bottom: 3.6rem; width: 720px; transform: translate(calc(var(--aim-x) * 11px), calc(var(--aim-y) * 8px)) rotate(calc(var(--aim-x) * -1deg)); }
  .training-hud { top: auto; bottom: 1rem; right: 1rem; }
  .feedback { left: 1rem; bottom: 8.6rem; width: calc(100% - 2rem); }
  @keyframes rifle-recoil {
    32% { transform: translate(calc(var(--aim-x) * 11px + 15px), calc(var(--aim-y) * 8px + 12px)) rotate(calc(var(--aim-x) * -1deg + 1.5deg)); }
    100% { transform: translate(calc(var(--aim-x) * 11px), calc(var(--aim-y) * 8px)) rotate(calc(var(--aim-x) * -1deg)); }
  }
}

.account-sync-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: .55rem .8rem;
  border: 1px solid rgba(6, 80, 84, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #0a5558;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.account-sync-badge.is-synced {
  border-color: rgba(56, 184, 145, .38);
  background: rgba(220, 250, 239, .9);
}

@media (prefers-reduced-motion: reduce) {
  .weapon-rig, .target { transition: none; }
  .weapon-rig.firing, .weapon-rig.firing .muzzle-flash, .impact-ring.show, .shot-kick { animation-duration: .01ms; }
}
