:root {
  --ink: #07363c;
  --teal: #007f82;
  --teal-dark: #00535a;
  --mint: #dff3ee;
  --paper: #f7f6ef;
  --card: #fffefa;
  --coral: #f47d68;
  --gold: #e5aa3f;
  --blue: #5685df;
  --line: #d9e5df;
  --muted: #6d8586;
  --shadow: 0 18px 50px rgba(14, 54, 56, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(229, 170, 63, .11), transparent 24rem),
    radial-gradient(circle at 92% 20%, rgba(0, 127, 130, .10), transparent 28rem),
    var(--paper);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem max(1rem, calc((100vw - 1440px) / 2));
  background: rgba(247, 246, 239, .92); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(7, 54, 60, .10);
}
.brand { display: flex; gap: .75rem; align-items: center; text-decoration: none; font-weight: 900; }
.brand-mark {
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  border-radius: 50%; color: white; background: var(--teal-dark);
}
.topbar nav { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a {
  text-decoration: none; padding: .55rem .75rem; border-radius: 999px;
  font-size: .78rem; color: var(--muted);
}
.topbar nav a:hover, .topbar nav a.active { background: white; color: var(--teal-dark); }
.hero {
  max-width: 1440px; margin: 0 auto; padding: 3.1rem 1.2rem 1.5rem;
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end;
}
.eyebrow {
  margin: 0 0 .65rem; letter-spacing: .2em; font-size: .73rem;
  color: var(--teal); font-weight: 900;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .75rem; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(2.1rem, 5vw, 4.6rem); line-height: .98; }
.hero p:last-child { color: var(--muted); max-width: 52rem; line-height: 1.75; }
.load-status { border: 1px solid var(--line); background: white; border-radius: 999px; padding: .65rem 1rem; white-space: nowrap; }
.workspace {
  max-width: 1440px; margin: 0 auto; padding: 1.2rem;
  display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 1.2rem;
}
.panel {
  background: rgba(255, 254, 250, .92); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow);
}
.finder { padding: 1rem; position: sticky; top: 5rem; align-self: start; max-height: calc(100vh - 6rem); display: flex; flex-direction: column; }
.finder label { font-size: .72rem; font-weight: 900; letter-spacing: .1em; margin: .35rem 0; }
.finder input, .finder select {
  width: 100%; border: 1px solid var(--line); border-radius: 13px;
  padding: .85rem .9rem; background: white; color: var(--ink); outline: none;
}
.finder input:focus, .finder select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 127, 130, .12); }
.result-list { margin-top: .75rem; overflow: auto; display: grid; gap: .35rem; }
.word-result {
  border: 0; background: transparent; text-align: left; cursor: pointer;
  border-radius: 12px; padding: .65rem .7rem; display: grid; gap: .15rem;
}
.word-result:hover { background: var(--mint); }
.word-result strong { font-family: Georgia, serif; font-size: 1.08rem; }
.word-result small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { min-width: 0; }
.word-head { padding: 1.45rem 1.6rem; display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.word-head h2 { margin: 0; font: 800 clamp(2.2rem, 5vw, 4.8rem)/1 Georgia, serif; }
.word-head .meaning { color: var(--muted); margin: .45rem 0 0; }
.speak, .primary, .secondary {
  border: 0; border-radius: 999px; cursor: pointer; padding: .75rem 1rem; font-weight: 800;
}
.speak, .primary { background: var(--teal-dark); color: white; }
.secondary { background: var(--mint); color: var(--teal-dark); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.tag { padding: .35rem .55rem; border-radius: 999px; background: var(--mint); color: var(--teal-dark); font-size: .72rem; font-weight: 800; }
.section { margin-top: 1rem; padding: 1.4rem; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section h3 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 1.55rem; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 1rem; }
.component-badge { border-radius: 14px; border: 1px solid var(--line); padding: .75rem; background: white; }
.component-badge b { display: block; font-family: Georgia, serif; font-size: 1.15rem; }
.component-badge small { color: var(--muted); }
.quality-badge {
  display: inline-flex; align-items: center; width: fit-content;
  margin-top: .6rem; padding: .34rem .62rem; border-radius: 999px;
  font-size: .7rem; font-weight: 900; letter-spacing: .04em;
}
.quality-badge.ready { background: var(--mint); color: var(--teal-dark); }
.quality-badge.review { background: #fff1d6; color: #85570b; }
.bilingual-example {
  margin: .9rem 0 0; padding: 1rem 1.05rem;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, .78);
}
.bilingual-example.compact { margin: 0; padding: .7rem .8rem; min-width: 16rem; }
.example-en {
  margin: 0; color: var(--ink); font-size: .98rem; line-height: 1.6;
  font-family: Georgia, "Times New Roman", serif;
}
.example-zh {
  margin: .35rem 0 0; color: #4c6b6c; font-size: .8rem; line-height: 1.65;
}
.example-zh.pending { color: #a06b18; }
.translation-label {
  display: block; margin-top: .35rem; color: var(--teal);
  font-size: .64rem; font-weight: 850; letter-spacing: .05em;
}
.translation-label.draft { color: #9a681c; }
.learning-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem; margin-top: 1rem;
}
.learning-item {
  min-width: 0; padding: .9rem 1rem; border: 1px solid var(--line);
  border-radius: 16px; background: rgba(255, 255, 255, .8);
}
.learning-item.origin, .learning-item.semantic { grid-column: 1 / -1; }
.learning-item small {
  display: block; margin-bottom: .35rem; color: var(--teal);
  font-size: .67rem; font-weight: 900; letter-spacing: .12em;
}
.learning-item p {
  margin: 0; color: #34595b; font-size: .86rem; line-height: 1.72;
  overflow-wrap: anywhere;
}
.learning-item.error { border-color: rgba(244, 125, 104, .35); background: #fff8f5; }
.learning-item.memory { background: #fffbef; }
.learning-item.pending { grid-column: 1 / -1; background: #fff9e9; }
.component-line {
  margin-top: .8rem; padding: .75rem .9rem; border-radius: 14px;
  background: var(--mint); color: var(--teal-dark); font-size: .84rem; line-height: 1.6;
}
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  padding: .8rem 1rem; border-radius: 14px; background: var(--ink); color: white;
  transform: translateY(140%); transition: .25s ease;
}
.toast.show { transform: translateY(0); }
.aquacyne-main-return {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; margin-left: auto; padding: 0 .95rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.84); color: var(--teal-dark);
  font-size: .82rem; font-weight: 850; text-decoration: none;
}
.aquacyne-main-return:hover { border-color: var(--teal); background: white; }
@media (max-width: 900px) {
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .load-status { justify-self: start; }
  .workspace { grid-template-columns: 1fr; }
  .finder { position: static; max-height: 25rem; }
  .learning-grid { grid-template-columns: 1fr; }
  .learning-item.origin, .learning-item.semantic { grid-column: auto; }
  .bilingual-example.compact { min-width: 12rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
