:root {
  --paper: #f3efe6;
  --paper-deep: #eae4d8;
  --card: #fffdf8;
  --card-warm: #fbf8ef;
  --ink: #1d2a24;
  --ink-soft: #526058;
  --muted: #838b84;
  --forest: #173b32;
  --forest-light: #285448;
  --vermilion: #b4513d;
  --vermilion-pale: #f3e3dc;
  --gold: #b38b4e;
  --gold-pale: #efe4cb;
  --line: #ddd6c8;
  --line-dark: #c9c0b0;
  --shadow-sm: 0 3px 14px rgba(38, 45, 37, 0.06);
  --shadow-md: 0 18px 50px rgba(38, 45, 37, 0.1);
  --shadow-lg: 0 34px 90px rgba(26, 46, 37, 0.13);
  --radius-sm: 10px;
  --radius-md: 17px;
  --radius-lg: 25px;
  --sidebar-width: 246px;
  --font-serif: "Iowan Old Style", "Baskerville", "Songti SC", "STSong",
    "Noto Serif CJK SC", serif;
  --font-sans: "Avenir Next", "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(180, 81, 61, 0.24);
  outline-offset: 2px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

::selection {
  color: var(--ink);
  background: #ead7a8;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 27px 18px 20px;
  color: #eef2ec;
  background:
    radial-gradient(circle at 20% 4%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(178deg, #1b4036 0%, #14352e 58%, #112d27 100%);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
}

.sidebar::after {
  position: absolute;
  right: -26px;
  bottom: -38px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  box-shadow:
    0 0 0 30px rgba(255, 255, 255, 0.025),
    0 0 0 65px rgba(255, 255, 255, 0.018);
  content: "";
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(236, 223, 190, 0.38);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.brand-mark svg {
  width: 30px;
  stroke: #e8d4a7;
  stroke-width: 1.35;
}

.brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: rgba(236, 242, 235, 0.58);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.mobile-close {
  display: none;
}

.primary-nav {
  position: relative;
  z-index: 1;
  margin-top: 41px;
}

.nav-label {
  margin: 0 12px 10px;
  color: rgba(231, 239, 232, 0.42);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

.nav-label-spaced {
  margin-top: 29px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  margin: 3px 0;
  padding: 0 11px;
  color: rgba(238, 244, 237, 0.68);
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.is-active {
  color: #fffdf6;
  background: rgba(255, 255, 255, 0.105);
  box-shadow: inset 2px 0 0 #d7b77a;
}

.nav-item:active {
  transform: translateY(1px);
}

.nav-item svg {
  width: 19px;
  height: 19px;
  margin-right: 11px;
  stroke-width: 1.55;
}

.nav-item span:not(.nav-count) {
  font-size: 13px;
  letter-spacing: 0.015em;
}

.nav-item kbd {
  margin-left: auto;
  padding: 2px 5px;
  color: rgba(239, 244, 237, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 9px;
}

.nav-count {
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  margin-left: auto;
  padding: 0 5px;
  color: rgba(255, 255, 255, 0.65);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.075);
  font-size: 10px;
}

.domain-list {
  display: grid;
  gap: 2px;
}

.domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: rgba(237, 243, 236, 0.5);
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  transition: color 160ms ease, background 160ms ease;
}

.domain-row:hover {
  color: #f4f1e8;
  background: rgba(255, 255, 255, 0.04);
}

.domain-symbol {
  width: 18px;
  color: #d6b980;
  font-family: var(--font-serif);
  font-size: 18px;
  text-align: center;
}

.domain-row span:last-child {
  font-size: 12px;
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.connection-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.08);
  text-align: left;
}

.connection-card:hover {
  background: rgba(255, 255, 255, 0.045);
}

.connection-card > svg {
  width: 15px;
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.34);
}

.status-dot {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8ea995;
  box-shadow: 0 0 0 3px rgba(142, 169, 149, 0.1);
}

.status-dot.is-online {
  background: #8fd19a;
  box-shadow: 0 0 0 3px rgba(143, 209, 154, 0.1);
}

.status-dot.is-offline {
  background: #ce7b67;
  box-shadow: 0 0 0 3px rgba(206, 123, 103, 0.1);
}

.status-dot.is-loading {
  animation: statusPulse 1.6s infinite;
}

.connection-copy {
  min-width: 0;
}

.connection-copy strong,
.connection-copy small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.connection-copy strong {
  font-size: 11px;
  font-weight: 500;
}

.connection-copy small {
  margin-top: 3px;
  color: rgba(240, 245, 238, 0.4);
  font-size: 9px;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: rgba(239, 244, 237, 0.32);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.privacy-note svg {
  width: 11px;
  height: 11px;
}

.sidebar-scrim {
  display: none;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(26px, 4.5vw, 64px);
  border-bottom: 1px solid rgba(195, 185, 168, 0.55);
  background: rgba(243, 239, 230, 0.86);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8c8e86;
  font-size: 11px;
  letter-spacing: 0.025em;
}

.crumb svg {
  width: 12px;
  height: 12px;
  color: #ada99e;
}

.crumb strong {
  color: #47544d;
  font-weight: 500;
}

.topbar-actions {
  gap: 12px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  color: #68736d;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.menu-button {
  display: none;
}

.lang-pair {
  display: flex;
  height: 35px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  color: #525e58;
  border: 1px solid #d4ccbd;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.58);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.lang-pair svg {
  width: 12px;
  color: #9b9b90;
}

.lang-pair span:last-child {
  font-family: var(--font-serif);
  font-size: 12px;
}

.main-scroll {
  min-height: calc(100vh - 68px);
}

.view {
  min-height: calc(100vh - 68px);
}

.is-hidden {
  display: none !important;
}

.home-view {
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 78px) clamp(28px, 5.2vw, 76px) 24px;
}

.hero {
  position: relative;
  max-width: 900px;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: -43px;
  right: -142px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(177, 160, 128, 0.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(177, 160, 128, 0.045),
    0 0 0 104px rgba(177, 160, 128, 0.025);
  content: "";
}

.hero-notation {
  position: absolute;
  top: 6px;
  right: -28px;
  display: flex;
  width: 124px;
  align-items: center;
  justify-content: space-between;
  color: rgba(29, 53, 44, 0.22);
  font-family: var(--font-serif);
  font-size: 20px;
  transform: rotate(-7deg);
}

.hero-notation::before,
.hero-notation::after {
  position: absolute;
  right: -10px;
  left: -10px;
  height: 1px;
  background: rgba(29, 53, 44, 0.1);
  content: "";
}

.hero-notation::before {
  top: 7px;
}

.hero-notation::after {
  top: 30px;
}

.hero-notation i {
  width: 16px;
  height: 1px;
  background: rgba(29, 53, 44, 0.14);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #9a7b4f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.hero-kicker span {
  display: block;
  width: 26px;
  height: 1px;
  background: #b2915b;
}

.eyebrow-line {
  display: inline-block;
  width: 29px;
  height: 1px;
  background: #b2915b;
}

.hero h1 {
  margin: 0 0 15px;
  font-family: var(--font-serif);
  font-size: clamp(46px, 4.5vw, 62px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.hero h1 em {
  color: var(--vermilion);
  font-weight: 400;
}

.hero-intro {
  max-width: 620px;
  margin: 0 0 28px;
  color: #69736d;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

.search-panel {
  max-width: 900px;
  overflow: hidden;
  border: 1px solid rgba(195, 184, 164, 0.86);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-md);
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.search-panel:focus-within {
  border-color: rgba(151, 129, 92, 0.9);
  box-shadow:
    0 18px 50px rgba(38, 45, 37, 0.1),
    0 0 0 4px rgba(179, 139, 78, 0.08);
}

.search-topline {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px 7px 13px;
  border-bottom: 1px solid #ece6da;
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}

.mode-option {
  padding: 7px 12px;
  color: #899088;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 10px;
  transition: color 150ms ease, background 150ms ease;
}

.mode-option:hover {
  color: #45534c;
}

.mode-option.is-active {
  color: var(--forest);
  background: #ebede5;
  font-weight: 600;
}

.source-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #858b83;
  cursor: pointer;
  font-size: 9px;
  user-select: none;
}

.search-options {
  display: flex;
  align-items: center;
  gap: 13px;
}

.auto-source-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8f897e;
  font-size: 9px;
  white-space: nowrap;
}

.auto-source-note svg {
  width: 13px;
  height: 13px;
  color: #a18457;
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8b8c83;
  font-size: 9px;
}

.language-picker select {
  max-width: 98px;
  padding: 4px 17px 4px 7px;
  color: #55625b;
  border: 1px solid #ddd5c8;
  border-radius: 6px;
  outline: 0;
  background:
    linear-gradient(45deg, transparent 50%, #92968e 50%) calc(100% - 8px) 50% / 4px 4px no-repeat,
    linear-gradient(135deg, #92968e 50%, transparent 50%) calc(100% - 5px) 50% / 4px 4px no-repeat,
    #fbf9f3;
  font-size: 9px;
  appearance: none;
}

.language-picker select:focus {
  border-color: #ae9f87;
}

/* Language is detected from the query and from the curated lexicon. Keeping
   a manual source-language menu visible made the default look like a choice
   the user had to make before every lookup. */
.language-picker {
  display: none;
}

.source-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 26px;
  height: 15px;
  border-radius: 99px;
  background: #d8d5cb;
  transition: background 150ms ease;
}

.toggle-track i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 150ms ease;
}

.source-toggle input:checked + .toggle-track {
  background: var(--forest-light);
}

.source-toggle input:checked + .toggle-track i {
  transform: translateX(11px);
}

.search-row {
  display: flex;
  min-height: 72px;
  align-items: center;
  padding: 9px 11px 9px 20px;
}

.search-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-right: 13px;
  color: #777f78;
}

.search-icon svg {
  width: 100%;
  height: 100%;
}

.search-row textarea {
  width: 100%;
  max-height: 120px;
  flex: 1;
  align-self: center;
  padding: 10px 0;
  resize: none;
  overflow-y: auto;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.45;
}

.search-row textarea:not(.is-scrollable) {
  overflow-y: hidden;
}

.search-row textarea.is-scrollable {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-row textarea::placeholder {
  color: #a5a498;
  font-family: var(--font-sans);
  font-size: 13px;
}

.char-count {
  display: none;
  margin: 0 7px;
  color: #a1a098;
  font-size: 9px;
}

.search-submit {
  display: flex;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  color: #f8f7f1;
  border: 0;
  border-radius: 12px;
  background: var(--forest);
  box-shadow: 0 7px 15px rgba(23, 59, 50, 0.16);
  font-size: 11px;
  letter-spacing: 0.03em;
  transition: background 150ms ease, transform 150ms ease;
}

.search-submit:hover {
  background: #224d42;
}

.search-submit:active {
  transform: translateY(1px);
}

.search-submit svg {
  width: 17px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 18px 12px;
  border-top: 1px solid #f1ede5;
}

.inline-suggestions {
  display: grid;
  gap: 3px;
  padding: 9px 13px 10px;
  border-top: 1px solid #ece6da;
  background: #fcfaf5;
}

.suggestion-label {
  padding: 2px 4px 5px;
  color: #9b917f;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.inline-suggestion {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 10px;
  color: #34443b;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.inline-suggestion:hover {
  background: #f0ece3;
}

.suggestion-copy {
  min-width: 0;
  flex: 1;
}

.suggestion-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
}

.suggestion-heading strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
}

.suggestion-heading em {
  color: #9a8b73;
  font-size: 9px;
  font-style: normal;
}

.suggestion-copy b {
  display: block;
  margin-top: 3px;
  color: #774f3f;
  font-size: 11px;
  font-weight: 600;
}

.suggestion-copy small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: #707a72;
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.suggestion-score {
  color: #9a9386;
  font-size: 8px;
}

.examples > span {
  margin-right: 3px;
  color: #a3a49a;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.examples button {
  padding: 4px 9px;
  color: #67726b;
  border: 1px solid #e5dfd3;
  border-radius: 6px;
  background: #fbf9f3;
  font-family: var(--font-serif);
  font-size: 10px;
}

.examples button:hover {
  color: var(--vermilion);
  border-color: #d9c8b5;
  background: #fffaf2;
}

.home-lower {
  display: grid;
  max-width: 900px;
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.85fr);
  gap: 17px;
  margin-top: 35px;
}

.feature-panel,
.recent-panel {
  min-height: 195px;
  border: 1px solid rgba(207, 198, 181, 0.75);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.55);
}

.feature-panel {
  padding: 18px 20px 15px;
  background:
    linear-gradient(120deg, rgba(255, 253, 248, 0.8), rgba(246, 241, 229, 0.64)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 15px,
      rgba(23, 59, 50, 0.03) 15px,
      rgba(23, 59, 50, 0.03) 16px
    );
}

.panel-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9b927f;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.panel-kicker > span:last-child {
  color: #b0a894;
  font-weight: 400;
  letter-spacing: 0.09em;
}

.feature-word {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 15px;
  margin: 20px 0 18px;
  padding: 0;
  color: var(--ink);
  border: 0;
  background: transparent;
  text-align: left;
}

.feature-number {
  align-self: flex-start;
  padding-top: 5px;
  color: #b5a583;
  font-family: var(--font-serif);
  font-size: 10px;
}

.feature-main {
  min-width: 0;
  flex: 1;
}

.feature-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.feature-title-row strong {
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 500;
}

.feature-title-row small {
  color: #92968d;
  font-family: var(--font-serif);
  font-size: 11px;
}

.feature-description {
  display: block;
  max-width: 390px;
  margin-top: 7px;
  color: #69736c;
  font-size: 11px;
  line-height: 1.7;
}

.feature-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d4ccbd;
  border-radius: 50%;
  transition: color 160ms ease, background 160ms ease;
}

.feature-word:hover .feature-arrow {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.feature-arrow svg {
  width: 15px;
}

.feature-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #e7e1d6;
}

.feature-tags {
  display: flex;
  gap: 5px;
}

.feature-tags span {
  padding: 4px 7px;
  color: #7c7669;
  border-radius: 5px;
  background: #ede7da;
  font-size: 8px;
}

.curated-mark {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #8b806d;
  font-size: 8px;
}

.curated-mark svg {
  width: 12px;
  color: #668071;
}

.recent-panel {
  padding: 18px 17px;
  background: rgba(248, 244, 236, 0.65);
}

.text-button {
  padding: 0;
  color: #927b56;
  border: 0;
  background: transparent;
  font-size: 9px;
}

.text-button:hover {
  color: var(--vermilion);
}

.recent-list {
  display: grid;
  gap: 3px;
  margin-top: 11px;
}

.recent-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  color: #48564e;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.recent-item:hover {
  background: rgba(255, 255, 255, 0.65);
}

.recent-index {
  width: 17px;
  color: #b6ad9d;
  font-family: var(--font-serif);
  font-size: 9px;
}

.recent-copy {
  min-width: 0;
  flex: 1;
}

.recent-copy strong,
.recent-copy small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recent-copy strong {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
}

.recent-copy small {
  margin-top: 2px;
  color: #a09e95;
  font-size: 8px;
}

.recent-type {
  color: #a7a399;
  font-size: 8px;
}

.recent-empty {
  display: flex;
  min-height: 102px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #aaa79d;
}

.recent-empty span {
  color: #c3baa8;
  font-family: var(--font-serif);
  font-size: 24px;
}

.recent-empty p {
  margin: 5px 0 0;
  font-size: 9px;
}

.home-footer {
  display: flex;
  max-width: 900px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 17px;
  color: #aaa69b;
  border-top: 1px solid rgba(205, 197, 181, 0.6);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.home-footer p {
  margin: 0;
}

.home-footer p:last-child {
  font-family: var(--font-serif);
  font-size: 10px;
}

.home-footer span {
  color: #b0a78f;
}

/* Result */
.result-view {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px clamp(25px, 4.5vw, 64px) 80px;
}

.result-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 18px;
}

.back-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 2px;
  color: #768078;
  border: 0;
  background: transparent;
  font-size: 10px;
}

.back-button:hover {
  color: var(--ink);
}

.back-button svg {
  width: 16px;
}

.compact-search {
  display: flex;
  max-width: 420px;
  height: 38px;
  flex: 1;
  align-items: center;
  padding: 0 5px 0 12px;
  border: 1px solid #d8d0c1;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.6);
}

.compact-search:focus-within {
  border-color: #b9ad98;
  background: var(--card);
}

.compact-search svg {
  width: 16px;
  flex: 0 0 auto;
  margin-right: 8px;
  color: #949990;
}

.compact-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 12px;
}

.compact-search button {
  height: 28px;
  padding: 0 10px;
  color: #f5f4ef;
  border: 0;
  border-radius: 6px;
  background: var(--forest);
  font-size: 9px;
}

.result-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.tool-button {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: #7b837d;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 9px;
}

.tool-button:hover {
  color: var(--ink);
  border-color: #d5cdbf;
  background: rgba(255, 255, 255, 0.45);
}

.tool-button.is-saved {
  color: var(--vermilion);
}

.tool-button svg {
  width: 15px;
}

.query-context {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 32px 0 20px;
}

.query-label {
  color: #a39478;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.query-context h2 {
  max-width: 780px;
  overflow: hidden;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.query-mode {
  padding: 4px 7px;
  color: #777e77;
  border: 1px solid #d4ccbe;
  border-radius: 5px;
  font-size: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  align-items: start;
  gap: 20px;
}

.entry-sheet {
  overflow: hidden;
  min-height: 480px;
  padding: clamp(25px, 4vw, 45px);
  border: 1px solid #d8d0c2;
  border-radius: 20px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.965), rgba(255, 253, 248, 0.965)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(23, 59, 50, 0.04) 28px,
      rgba(23, 59, 50, 0.04) 29px
    );
  box-shadow: var(--shadow-sm);
}

.loading-state {
  display: flex;
  min-height: 400px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.loading-score {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 245px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 25px;
  padding-top: 30px;
}

.loading-score::before,
.loading-score::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: #d8d2c7;
  content: "";
}

.loading-score::before {
  top: 9px;
}

.loading-score::after {
  top: 22px;
}

.loading-score span {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border: 1px solid #ad9f88;
  border-radius: 50%;
  background: var(--card);
}

.loading-score span:nth-child(2) {
  margin-top: 15px;
}

.loading-score span:nth-child(4) {
  margin-top: 8px;
}

.loading-score span:nth-child(5) {
  margin-top: 21px;
}

.loading-score i {
  position: absolute;
  z-index: 2;
  top: 23px;
  left: 0;
  width: 23%;
  height: 3px;
  border-radius: 4px;
  background: var(--vermilion);
  animation: scoreScan 1.8s ease-in-out infinite alternate;
}

.loading-state h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.loading-state > p {
  margin: 8px 0 22px;
  color: #97998f;
  font-size: 10px;
}

.loading-steps {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #b4b2a8;
  font-size: 8px;
}

.loading-steps span {
  position: relative;
}

.loading-steps span + span::before {
  position: absolute;
  top: 50%;
  left: -9px;
  width: 4px;
  height: 1px;
  background: #ccc6bb;
  content: "";
}

.loading-steps .is-done {
  color: #75837b;
}

.loading-steps .is-active {
  color: var(--vermilion);
}

.entry-content {
  animation: revealContent 380ms ease both;
}

.entry-header {
  position: relative;
  padding-bottom: 28px;
}

.entry-header::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--vermilion);
  content: "";
}

.entry-header-sentence {
  padding-bottom: 8px;
}

.entry-header-sentence::after {
  display: none;
}

.entry-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
}

.entry-badge {
  padding: 4px 7px;
  color: #716c60;
  border-radius: 5px;
  background: #eee8dc;
  font-size: 8px;
  letter-spacing: 0.035em;
}

.entry-badge.is-primary {
  color: #fff8ec;
  background: var(--forest);
}

.entry-badge.is-outline {
  border: 1px solid #d8cfc0;
  background: transparent;
}

.headword-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.headword-row h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(37px, 4vw, 50px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.headword-row .article {
  color: #9a8170;
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
}

.word-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 10px;
  color: #8a8d84;
  font-size: 10px;
}

.word-meta span {
  position: relative;
}

.word-meta span + span::before {
  position: absolute;
  top: 50%;
  left: -9px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #bbb6aa;
  content: "";
}

.entry-summary {
  max-width: 760px;
  margin: 20px 0 0;
  color: #5d6861;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.9;
}

.translation-hero {
  margin: 5px 0 31px;
  padding: 22px 24px;
  border-left: 2px solid var(--vermilion);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, #f4eee4, rgba(244, 238, 228, 0.35));
}

.translation-hero h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.7;
}

.translation-hero p {
  margin: 0;
  color: #958e82;
  font-size: 9px;
}

.entry-section {
  margin-top: 31px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
}

.section-heading h2::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.section-count {
  color: #a2a096;
  font-size: 9px;
}

.sense-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #e4ded2;
}

.sense-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 13px;
  padding: 19px 0 20px;
  border-bottom: 1px solid #e4ded2;
}

.sense-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #9c8b70;
  border: 1px solid #d9cfbc;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 9px;
}

.sense-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sense-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
}

.sense-domain {
  padding: 3px 6px;
  color: #947653;
  border-radius: 4px;
  background: var(--gold-pale);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.sense-definition {
  margin: 7px 0 0;
  color: #56635b;
  font-size: 12px;
  line-height: 1.85;
}

.sense-example {
  position: relative;
  margin: 11px 0 0;
  padding: 10px 12px 10px 25px;
  border-radius: 7px;
  background: rgba(240, 235, 224, 0.62);
}

.sense-example::before {
  position: absolute;
  top: 4px;
  left: 10px;
  color: #c0aa84;
  content: "„";
  font-family: var(--font-serif);
  font-size: 24px;
}

.sense-example .de {
  color: #3e4e45;
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.65;
}

.sense-example .zh {
  margin-top: 3px;
  color: #858b83;
  font-size: 10px;
  line-height: 1.65;
}

.sense-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 9px 0 0;
  color: #a47a55;
  font-size: 9px;
  line-height: 1.7;
}

.sense-note::before {
  flex: 0 0 auto;
  margin-top: 2px;
  content: "◆";
  font-size: 5px;
}

.term-notes {
  display: grid;
  gap: 9px;
}

.equivalent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.equivalent-item {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  color: inherit;
  border: 1px solid #e1d9cc;
  border-radius: 8px;
  background: #fbf8f1;
  text-align: left;
}

.equivalent-item:hover {
  border-color: #c6b69e;
  background: #fffdf8;
}

.equivalent-item span {
  flex: 0 0 auto;
  color: #9a978d;
  font-size: 8px;
}

.equivalent-item strong {
  min-width: 0;
  flex: 1;
  color: #43534a;
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 500;
  text-align: right;
}

.equivalent-item svg,
.related-term-button svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: #a48d69;
}

.term-note {
  padding: 13px 15px;
  border: 1px solid #dfd7c9;
  border-radius: 9px;
  background: #fbf8f1;
}

.term-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.term-note-head code {
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 12px;
}

.term-note-head span {
  color: var(--vermilion);
  font-size: 10px;
}

.term-note p {
  margin: 6px 0 0;
  color: #677169;
  font-size: 10px;
  line-height: 1.75;
}

.notes-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes-list li {
  position: relative;
  margin: 7px 0;
  padding-left: 14px;
  color: #5e6a62;
  font-size: 10px;
  line-height: 1.75;
}

.notes-list li::before {
  position: absolute;
  top: 8px;
  left: 1px;
  width: 4px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-list span {
  padding: 6px 9px;
  color: #59675f;
  border: 1px solid #ddd5c7;
  border-radius: 6px;
  background: #fdfbf6;
  font-family: var(--font-serif);
  font-size: 10px;
}

.confusion-list {
  display: grid;
  gap: 10px;
}

.confusion-item {
  padding-left: 13px;
  border-left: 2px solid #d8b68b;
}

.confusion-item strong {
  color: #4c5c54;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 600;
}

.confusion-item p {
  margin: 4px 0 0;
  color: #727b74;
  font-size: 10px;
  line-height: 1.75;
}

.related-term-button {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  color: inherit;
  border: 1px solid #e1d9cc;
  border-left: 2px solid #d8b68b;
  border-radius: 0 8px 8px 0;
  background: #fbf8f1;
  text-align: left;
}

.related-term-button:hover {
  border-color: #c6b69e;
  border-left-color: var(--vermilion);
  background: #fffdf8;
}

.related-term-button > span {
  min-width: 0;
  flex: 1;
}

.related-term-button small {
  display: block;
  margin-top: 4px;
  color: #727b74;
  font-size: 10px;
  line-height: 1.75;
}

.reference-note {
  margin: 0 0 11px;
  color: #7f8179;
  font-size: 9px;
  line-height: 1.7;
}

.reference-links {
  display: grid;
  gap: 6px;
}

.reference-links a {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  color: #526159;
  border: 1px solid #e1d9cc;
  border-radius: 7px;
  background: #fbf8f1;
  text-decoration: none;
}

.reference-links a:hover {
  color: var(--forest);
  border-color: #bfb09a;
  background: #fffdf8;
}

.reference-links svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #a18155;
}

.uncertainty-box {
  padding: 13px 15px;
  color: #825d46;
  border: 1px solid #e4cabb;
  border-radius: 9px;
  background: #fbf0e9;
  font-size: 10px;
  line-height: 1.75;
}

.uncertainty-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
}

.result-aside {
  display: grid;
  gap: 11px;
}

.aside-card {
  padding: 15px;
  border: 1px solid #d8d0c2;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.65);
}

.aside-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #98958b;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.aside-title > span:last-child {
  color: #aaa69c;
  font-weight: 400;
}

.engine-card {
  background:
    radial-gradient(circle at 100% 0, rgba(205, 181, 126, 0.15), transparent 45%),
    #173a31;
  color: #f3f3eb;
  border-color: #173a31;
}

.engine-card .aside-title {
  color: rgba(238, 242, 233, 0.4);
}

.engine-card .aside-title > span:last-child {
  color: #c5b784;
}

.engine-status.is-error {
  color: #ef9b83 !important;
}

.engine-name {
  margin: 15px 0 7px;
  font-family: var(--font-serif);
  font-size: 17px;
}

.engine-description {
  margin: 0;
  color: rgba(238, 242, 233, 0.5);
  font-size: 9px;
  line-height: 1.65;
}

.engine-meter {
  overflow: hidden;
  height: 2px;
  margin-top: 17px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.09);
}

.engine-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: #d6b879;
  transition: width 500ms ease;
}

.reliability-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #635f55;
  background: #f1e9d9;
}

.reliability-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: #9a7540;
  border-radius: 50%;
  background: rgba(158, 123, 70, 0.12);
}

.reliability-icon svg {
  width: 14px;
}

.reliability-card strong {
  display: block;
  margin: 1px 0 4px;
  color: #6e5d46;
  font-size: 9px;
}

.reliability-card p {
  margin: 0;
  color: #8d806e;
  font-size: 8px;
  line-height: 1.7;
}

.source-links {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.source-link {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 3px;
  color: #5e6a62;
  border-bottom: 1px solid #ebe5da;
  font-size: 9px;
  line-height: 1.45;
  text-decoration: none;
}

.source-link:last-child {
  border-bottom: 0;
}

.source-link:hover {
  color: var(--vermilion);
}

.source-link svg {
  width: 11px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #a79e8d;
}

.aside-empty {
  margin: 5px 0 0;
  color: #aaa69b;
  font-size: 8px;
  line-height: 1.6;
}

.aside-actions {
  padding: 2px;
}

.subtle-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  color: #7d827b;
  border: 1px dashed #cec6b8;
  border-radius: 8px;
  background: transparent;
  font-size: 8px;
}

.subtle-action:hover {
  color: var(--forest);
  border-color: #a8b1a7;
  background: rgba(255, 255, 255, 0.3);
}

.subtle-action svg {
  width: 13px;
}

.error-state {
  display: flex;
  min-height: 390px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.error-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 18px;
  color: var(--vermilion);
  border: 1px solid #dfc6bc;
  border-radius: 50%;
  background: var(--vermilion-pale);
  font-family: var(--font-serif);
  font-size: 22px;
}

.error-state h3 {
  margin: 0 0 9px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.error-state p {
  max-width: 390px;
  margin: 0;
  color: #7e827b;
  font-size: 10px;
  line-height: 1.8;
}

.error-actions {
  display: flex;
  gap: 8px;
  margin-top: 19px;
}

.error-suggestions {
  width: min(430px, 100%);
  margin-top: 17px;
  text-align: left;
}

.error-suggestions > span {
  display: block;
  margin-bottom: 6px;
  color: #99988f;
  font-size: 8px;
  letter-spacing: 0.05em;
}

.error-suggestion {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #e2dacd;
  border-radius: 7px;
  background: #fbf8f2;
}

.error-suggestion + .error-suggestion {
  margin-top: 5px;
}

.error-suggestion strong {
  color: #44544b;
  font-family: var(--font-serif);
  font-size: 15px;
}

.error-suggestion-main {
  min-width: 0;
  flex: 1;
}

.error-suggestion-main strong,
.error-suggestion-main b,
.error-suggestion-main small {
  display: block;
}

.error-suggestion-main b {
  margin-top: 3px;
  color: #8b5e4b;
  font-size: 11px;
}

.error-suggestion-main small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: #7d827a;
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.error-suggestion-meta {
  flex: 0 0 auto;
  color: #9a958b;
  font-size: 8px;
}

.correction-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 23px;
  padding: 11px 13px;
  color: #6a655a;
  border: 1px solid #ddd2bd;
  border-radius: 9px;
  background: #f3ecdd;
  font-size: 9px;
  line-height: 1.65;
}

.correction-banner strong {
  color: #876a3f;
}

.primary-small,
.secondary-small,
.danger-small {
  height: 36px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 9px;
}

.primary-small {
  color: #fff;
  border: 1px solid var(--forest);
  background: var(--forest);
}

.secondary-small {
  color: #647067;
  border: 1px solid #d2cbbc;
  background: transparent;
}

.danger-small {
  color: #fff;
  border: 1px solid #a54f3e;
  background: #a54f3e;
}

/* Collections */
.collection-view {
  max-width: 1050px;
  margin: 0 auto;
  padding: clamp(55px, 7vw, 90px) clamp(28px, 6vw, 80px);
}

.collection-header {
  max-width: 570px;
  margin-bottom: 38px;
}

.collection-kicker {
  margin: 12px 0 10px;
  color: #978361;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.collection-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.collection-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.collection-clear {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: #995443;
  border: 1px solid #dfc9bf;
  border-radius: 99px;
  background: rgba(255, 251, 246, 0.7);
  font-size: 10px;
}

.collection-clear:hover {
  color: #8b3d2c;
  border-color: #cda99d;
  background: var(--vermilion-pale);
}

.collection-clear svg {
  width: 15px;
  height: 15px;
}

.collection-header > p:last-child {
  margin: 13px 0 0;
  color: #7b837c;
  font-size: 12px;
  line-height: 1.8;
}

.collection-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.collection-card {
  position: relative;
  min-height: 177px;
  padding: 21px 20px 17px;
  border: 1px solid #d9d1c3;
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.65);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.collection-card:hover {
  border-color: #c6b8a3;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.collection-card-main {
  width: 100%;
  padding: 0 29px 0 0;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
}

.collection-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.collection-card-top span {
  color: #9c907d;
  font-size: 8px;
}

.collection-card h2 {
  overflow: hidden;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 9px 0 0;
  color: #737c75;
  font-size: 10px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-remove {
  position: absolute;
  top: 15px;
  right: 14px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  color: #aaa69c;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.collection-remove:hover {
  color: var(--vermilion);
  background: var(--vermilion-pale);
}

.collection-remove svg {
  width: 13px;
}

.collection-empty {
  grid-column: 1 / -1;
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed #d6cec0;
  border-radius: 15px;
  text-align: center;
}

.collection-empty span {
  color: #b5aa96;
  font-family: var(--font-serif);
  font-size: 40px;
}

.collection-empty h2 {
  margin: 13px 0 6px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
}

.collection-empty p {
  margin: 0;
  color: #94968d;
  font-size: 10px;
}

.lexicon-view {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 78px) clamp(28px, 5vw, 72px) 80px;
}

.lexicon-header {
  margin-bottom: 28px;
}

.lexicon-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.lexicon-search {
  display: flex;
  width: min(480px, 100%);
  height: 42px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d8d0c2;
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.75);
}

.lexicon-search:focus-within {
  border-color: #aaa08f;
  background: var(--card);
}

.lexicon-search svg {
  width: 17px;
  flex: 0 0 auto;
  margin-right: 9px;
  color: #969a92;
}

.lexicon-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.lexicon-toolbar-meta {
  display: flex;
  min-width: 244px;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.lexicon-toolbar-meta > span {
  color: #98998f;
  font-size: 9px;
  white-space: nowrap;
}

.lexicon-sort-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #ddd5c7;
  border-radius: 99px;
  background: rgba(255, 253, 248, 0.58);
}

.lexicon-sort-picker > span {
  padding: 0 6px;
  color: #9a978e;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.lexicon-sort-picker button {
  min-width: 34px;
  min-height: 26px;
  padding: 0 8px;
  color: #757d76;
  border: 0;
  border-radius: 99px;
  background: transparent;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.lexicon-sort-picker button.is-active {
  color: #fff;
  background: var(--forest);
}

.lexicon-filter-panel {
  margin: 4px 0 0;
  padding: 14px 15px 15px;
  border: 1px solid rgba(214, 204, 188, 0.86);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.52);
}

.lexicon-filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lexicon-filter-title span,
.lexicon-subfilter-block > span {
  color: #766a57;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.lexicon-filter-title small {
  color: #a19a8e;
  font-size: 8px;
}

.lexicon-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.lexicon-filter {
  padding: 6px 10px;
  color: #737c74;
  border: 1px solid #d8d0c2;
  border-radius: 99px;
  background: rgba(255, 253, 248, 0.52);
  font-size: 9px;
}

.lexicon-filter:hover,
.lexicon-filter.is-active {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.lexicon-subfilter-block {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(216, 205, 189, 0.72);
}

.lexicon-subfilter-block > span {
  display: block;
  margin-bottom: 8px;
}

.lexicon-subfilters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lexicon-subfilter {
  min-height: 29px;
  padding: 5px 9px;
  color: #7c776e;
  border: 1px solid #ded5c7;
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.74);
  font-size: 8px;
}

.lexicon-subfilter.is-active {
  color: #6f5738;
  border-color: #c9ae82;
  background: #f2e6d0;
}

.lexicon-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0 22px;
  padding: 4px 0 7px;
  overflow: visible;
}

.lexicon-alpha-button {
  display: grid;
  min-width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 7px;
  color: #7c827b;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 11px;
}

.lexicon-alpha-button:hover {
  color: var(--forest);
  background: #f5f0e6;
}

.lexicon-alpha-button.is-active {
  color: #fffdf7;
  border-color: var(--forest);
  background: var(--forest);
}

.lexicon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lexicon-letter-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  gap: 10px;
  margin: 15px 0 0;
  padding: 7px 2px 8px;
  color: #8c7655;
  border-bottom: 1px solid rgba(202, 190, 171, 0.65);
}

.lexicon-letter-heading:first-child {
  margin-top: 0;
}

.lexicon-letter-heading span {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1;
}

.lexicon-letter-heading small {
  color: #a19c92;
  font-size: 8px;
  letter-spacing: 0.05em;
}

.lexicon-card {
  position: relative;
  min-height: 205px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.9), rgba(255, 253, 248, 0.9)),
    repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(23, 59, 50, 0.035) 22px, rgba(23, 59, 50, 0.035) 23px);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lexicon-card:hover {
  border-color: #bfb29e;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.lexicon-card-open {
  width: 100%;
  height: 100%;
  min-height: 203px;
  padding: 17px 16px 15px;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
}

.lexicon-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #9a927f;
  font-size: 8px;
}

.lexicon-card-meta span:first-child {
  padding: 3px 6px;
  color: #856c48;
  border-radius: 4px;
  background: #f0e6d3;
}

.lexicon-card h2 {
  overflow: hidden;
  margin: 14px 0 3px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lexicon-card h3 {
  overflow: hidden;
  margin: 0;
  color: #8a8172;
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lexicon-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 11px 0 14px;
  color: #727c75;
  font-size: 9px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.lexicon-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lexicon-variants span {
  padding: 3px 5px;
  color: #8c8e84;
  border-radius: 4px;
  background: #f0ece3;
  font-family: var(--font-serif);
  font-size: 8px;
}

.lexicon-empty {
  grid-column: 1 / -1;
  padding: 45px 20px;
  color: #96988f;
  border: 1px dashed #d6cec0;
  border-radius: 12px;
  text-align: center;
  font-size: 10px;
}

/* Dialog and toast */
.info-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 34px 35px 28px;
  color: var(--ink);
  border: 1px solid #d4cab9;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.info-dialog::backdrop {
  background: rgba(17, 36, 30, 0.42);
  backdrop-filter: blur(5px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  color: #8f938b;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.dialog-close:hover {
  background: #f0eadf;
}

.dialog-close svg {
  width: 15px;
}

.dialog-kicker {
  margin: 0 0 12px;
  color: #9c835e;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.info-dialog h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.info-dialog > p:not(.dialog-kicker, .dialog-shortcut) {
  margin: 14px 0 22px;
  color: #68736c;
  font-size: 11px;
  line-height: 1.9;
}

.dialog-notes {
  display: grid;
  gap: 9px;
}

.dialog-notes > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #68726b;
  font-size: 10px;
  line-height: 1.7;
}

.dialog-notes strong {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  color: #8d744e;
  border-radius: 50%;
  background: #f1e8d8;
  font-family: var(--font-serif);
  font-size: 9px;
  font-weight: 500;
}

.dialog-shortcut {
  margin: 23px 0 0;
  padding-top: 16px;
  color: #9a9b93;
  border-top: 1px solid #ebe5da;
  font-size: 9px;
}

.dialog-shortcut kbd {
  padding: 2px 5px;
  color: #716f68;
  border: 1px solid #d7d1c6;
  border-radius: 4px;
  background: #f8f5ee;
  font-family: var(--font-sans);
  font-size: 8px;
}

.dialog-mobile-help {
  display: none;
  margin-top: 21px;
  padding: 13px 14px;
  color: #657068;
  border: 1px solid #e2d8c8;
  border-radius: 10px;
  background: #f7f1e6;
  font-size: 10px;
  line-height: 1.7;
}

.dialog-mobile-help strong,
.dialog-mobile-help span {
  display: block;
}

.dialog-mobile-help strong {
  margin-bottom: 3px;
  color: #806748;
  font-size: 10px;
}

.about-mobile-note {
  display: none;
}

.confirm-dialog {
  width: min(430px, calc(100vw - 32px));
}

.confirm-dialog > p:not(.dialog-kicker) {
  margin-bottom: 21px;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.provider-dialog {
  width: min(580px, calc(100vw - 32px));
}

.provider-dialog > p:not(.dialog-kicker) {
  margin-bottom: 18px;
}

.provider-list {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.provider-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid #e4ddd1;
  border-radius: 10px;
  background: #fbf8f1;
}

.provider-row.is-ready {
  border-color: #c7d7ce;
  background: #f2f7f2;
}

.provider-mark {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: #f6f2e8;
  border-radius: 8px;
  background: var(--forest);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.provider-mark-cloud {
  background: #315f93;
}

.provider-copy {
  min-width: 0;
  flex: 1;
}

.provider-copy strong,
.provider-copy small {
  display: block;
}

.provider-copy strong {
  color: #46544c;
  font-size: 10px;
  font-weight: 600;
}

.provider-copy small {
  overflow: hidden;
  margin-top: 4px;
  color: #95978e;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-state {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: #9a9488;
  border-radius: 99px;
  background: #efebe2;
  font-size: 8px;
}

.provider-row.is-ready .provider-state {
  color: #476e58;
  background: #e2eee5;
}

.key-form {
  padding: 16px;
  border: 1px solid #ddd5c8;
  border-radius: 11px;
  background: #fdfbf6;
}

.key-form > label {
  display: block;
  margin-bottom: 7px;
  color: #6c746e;
  font-size: 9px;
  font-weight: 600;
}

.key-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-input-row input {
  height: 38px;
  min-width: 0;
  flex: 1;
  padding: 0 11px;
  color: #39483f;
  border: 1px solid #d9d1c3;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.key-input-row input:focus {
  border-color: #9daf9f;
  box-shadow: 0 0 0 3px rgba(39, 88, 72, 0.07);
}

.key-input-row button {
  height: 38px;
  flex: 0 0 auto;
  padding: 0 13px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: #315f93;
  font-size: 9px;
}

.key-input-row button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.key-form-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

.key-form-foot p {
  max-width: 350px;
  margin: 0;
  color: #96978f;
  font-size: 8px;
  line-height: 1.6;
}

.key-form-foot button {
  flex: 0 0 auto;
  padding: 0;
  color: #aa7668;
  border: 0;
  background: transparent;
  font-size: 8px;
}

.key-form-foot button:hover {
  color: var(--vermilion);
}

.key-form-note.is-error {
  color: #a75141 !important;
}

.key-form-note.is-success {
  color: #4e765e !important;
}

.provider-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
}

.toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  padding: 10px 15px;
  color: #f5f4ed;
  border-radius: 8px;
  background: #243d34;
  box-shadow: var(--shadow-md);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

@keyframes scoreScan {
  from {
    left: 0;
  }
  to {
    left: 72%;
  }
}

@keyframes revealContent {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  :root {
    --sidebar-width: 216px;
  }

  .sidebar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .home-lower {
    grid-template-columns: 1fr;
  }

  .recent-panel {
    min-height: auto;
  }

  .recent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aside-actions {
    grid-column: 1 / -1;
  }

  .lexicon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: 248px;
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  body.is-menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-close {
    position: absolute;
    z-index: 2;
    top: 25px;
    right: 15px;
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    padding: 0;
    color: rgba(255, 255, 255, 0.5);
    border: 0;
    border-radius: 50%;
    background: transparent;
  }

  .mobile-close svg {
    width: 15px;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    background: rgba(12, 28, 23, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  body.is-menu-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    height: 60px;
    padding: 0 16px;
  }

  .menu-button {
    display: grid;
    margin-right: 6px;
  }

  .crumb span,
  .crumb svg {
    display: none;
  }

  .lang-pair {
    display: none;
  }

  .main-scroll {
    min-height: calc(100vh - 60px);
  }

  .view {
    min-height: calc(100vh - 60px);
  }

  .home-view {
    padding: 44px 19px 20px;
  }

  .hero-notation {
    display: none;
  }

  .hero::before {
    top: -18px;
    right: -190px;
  }

  .hero h1 {
    margin-top: 16px;
    font-size: clamp(39px, 11vw, 55px);
    line-height: 1.18;
  }

  .hero-intro {
    margin-bottom: 25px;
    font-size: 12px;
    line-height: 1.8;
  }

  .search-panel {
    border-radius: 16px;
  }

  .search-topline {
    min-height: 46px;
  }

  .source-toggle > span:last-child {
    display: none;
  }

  .auto-source-note {
    display: none;
  }

  .search-options {
    gap: 8px;
  }

  .language-picker > span {
    display: none;
  }

  .language-picker select {
    max-width: 82px;
  }

  .search-row {
    min-height: 64px;
    padding-left: 15px;
  }

  .search-row textarea {
    font-size: 16px;
  }

  .search-icon {
    margin-right: 10px;
  }

  .search-submit {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  .search-submit span {
    display: none;
  }

  .search-submit svg {
    width: 18px;
  }

  .examples {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 11px;
    scrollbar-width: none;
  }

  .examples::-webkit-scrollbar {
    display: none;
  }

  .examples button {
    flex: 0 0 auto;
  }

  .home-lower {
    margin-top: 24px;
  }

  .recent-list {
    grid-template-columns: 1fr;
  }

  .home-footer {
    margin-top: 26px;
  }

  .home-footer p:first-child {
    display: none;
  }

  .result-view {
    padding: 16px 14px 60px;
  }

  .result-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .compact-search {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }

  .tool-button span {
    display: none;
  }

  .query-context {
    margin: 23px 4px 15px;
  }

  .query-context h2 {
    font-size: 17px;
  }

  .entry-sheet {
    min-height: 400px;
    padding: 25px 19px 31px;
    border-radius: 15px;
  }

  .loading-state {
    min-height: 340px;
  }

  .headword-row {
    flex-wrap: wrap;
    gap: 7px;
  }

  .headword-row h1 {
    font-size: 37px;
  }

  .entry-summary {
    font-size: 13px;
  }

  .sense-item {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 10px;
  }

  .sense-number {
    width: 21px;
    height: 21px;
    font-size: 8px;
  }

  .result-aside {
    grid-template-columns: 1fr;
  }

  .equivalent-grid {
    grid-template-columns: 1fr;
  }

  .collection-view {
    padding: 47px 20px 70px;
  }

  .lexicon-view {
    padding: 47px 16px 70px;
  }

  .lexicon-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .lexicon-grid {
    grid-template-columns: 1fr;
  }

  .collection-list {
    grid-template-columns: 1fr;
  }

  .info-dialog {
    padding: 31px 23px 24px;
  }
}

/* Desktop reading and browsing refinements. The iPhone-specific file remains
   independent, so these wider layouts never leak into the phone UI. */
@media (min-width: 1180px) {
  .sidebar {
    padding-top: 30px;
  }

  .primary-nav {
    margin-top: 36px;
  }

  .nav-item {
    min-height: 47px;
  }

  .nav-item span:not(.nav-count) {
    font-size: 14px;
  }

  .connection-copy strong {
    font-size: 12px;
  }

  .connection-copy small {
    font-size: 10px;
  }

  .home-view {
    max-width: 1340px;
    padding-top: clamp(42px, 4.6vw, 64px);
    padding-right: clamp(38px, 4.4vw, 74px);
    padding-left: clamp(38px, 4.4vw, 74px);
  }

  .hero {
    max-width: 900px;
  }

  .hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(54px, 4.5vw, 66px);
  }

  .hero-intro {
    max-width: 720px;
    margin-bottom: 27px;
    font-size: 14px;
    line-height: 1.82;
  }

  .search-panel {
    border-radius: 22px;
  }

  .search-topline {
    min-height: 54px;
    padding: 8px 12px 8px 16px;
  }

  .mode-option {
    padding: 8px 14px;
    font-size: 11px;
  }

  .auto-source-note,
  .source-toggle {
    font-size: 10px;
  }

  .search-row {
    min-height: 78px;
    padding: 10px 12px 10px 22px;
  }

  .search-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
  }

  .search-row textarea {
    padding: 11px 4px;
    font-size: 20px;
  }

  .search-row textarea::placeholder {
    font-size: 14px;
  }

  .search-submit {
    height: 50px;
    padding: 0 21px;
    font-size: 12px;
  }

  .examples {
    padding: 9px 20px 13px;
  }

  .examples button {
    padding: 5px 10px;
    font-size: 10.5px;
  }

  .inline-suggestions {
    padding: 10px 16px 12px;
  }

  .suggestion-heading strong {
    font-size: 20px;
  }

  .suggestion-copy b {
    font-size: 12px;
  }

  .suggestion-copy small {
    font-size: 11px;
    line-height: 1.62;
  }

  .home-lower {
    max-width: 900px;
    grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.85fr);
    gap: 18px;
    margin-top: 29px;
  }

  .feature-panel,
  .recent-panel {
    min-height: 210px;
  }

  .feature-panel {
    padding: 21px 23px 18px;
  }

  .feature-title-row strong {
    font-size: 32px;
  }

  .feature-description {
    max-width: 460px;
    font-size: 12px;
    line-height: 1.75;
  }

  .recent-panel {
    padding: 21px 20px;
  }

  .recent-item {
    padding: 10px 8px;
  }

  .recent-copy strong {
    font-size: 13px;
  }

  .recent-copy small,
  .recent-type {
    font-size: 9px;
  }

  .home-footer {
    max-width: 900px;
    margin-top: 26px;
  }

  .result-view {
    max-width: 1340px;
    padding-top: 18px;
    padding-right: clamp(34px, 4.3vw, 66px);
    padding-left: clamp(34px, 4.3vw, 66px);
  }

  .compact-search {
    max-width: 520px;
    height: 40px;
  }

  .query-context {
    margin: 28px 0 19px;
  }

  .result-grid {
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 22px;
  }

  .result-aside {
    position: sticky;
    top: 86px;
  }

  .entry-sheet {
    padding: clamp(31px, 3.4vw, 46px);
    border-radius: 22px;
  }

  .entry-summary {
    font-size: 15px;
    line-height: 1.92;
  }

  .sense-head h3 {
    font-size: 17px;
  }

  .sense-definition {
    font-size: 13px;
    line-height: 1.88;
  }

  .section-heading h2 {
    font-size: 17px;
  }

  .notes-list li,
  .term-note p,
  .confusion-item p,
  .related-term-button small {
    font-size: 11.5px;
    line-height: 1.8;
  }

  .reference-note {
    font-size: 10.5px;
  }

  .reference-links a {
    min-height: 43px;
    font-size: 11.5px;
  }

  .aside-title {
    font-size: 9px;
  }

  .engine-name {
    font-size: 18px;
  }

  .engine-description {
    font-size: 10px;
  }

  .lexicon-view {
    max-width: 1240px;
    padding-top: clamp(38px, 4vw, 52px);
    padding-right: clamp(36px, 4.6vw, 70px);
    padding-left: clamp(36px, 4.6vw, 70px);
  }

  .lexicon-header {
    margin-bottom: 23px;
  }

  .lexicon-search {
    height: 44px;
  }

  .lexicon-search input {
    font-size: 12.5px;
  }

  .lexicon-filter {
    padding: 7px 12px;
    font-size: 10px;
  }

  .lexicon-subfilter {
    min-height: 31px;
    font-size: 9px;
  }

  .lexicon-alphabet {
    display: grid;
    grid-template-columns: repeat(27, minmax(0, 1fr));
    gap: 2px;
    margin-top: 9px;
    margin-bottom: 20px;
  }

  .lexicon-alpha-button {
    width: 100%;
    min-width: 0;
    height: 31px;
    padding: 0;
    font-size: 10px;
  }

  .lexicon-grid {
    gap: 12px;
  }

  .lexicon-card {
    min-height: 218px;
  }

  .lexicon-card-open {
    min-height: 216px;
    padding: 18px 17px 16px;
  }

  .lexicon-card h2 {
    font-size: 21px;
  }

  .lexicon-card h3 {
    font-size: 10px;
  }

  .lexicon-card p {
    font-size: 10.5px;
    line-height: 1.75;
  }

  .lexicon-variants span {
    font-size: 9px;
  }

  .collection-view {
    max-width: 1160px;
    padding-top: clamp(44px, 4.6vw, 62px);
  }

  .collection-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-card p {
    font-size: 11px;
  }
}

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

/* 1.9.5 readability, homepage focus and sidebar hit target */
:root {
  --font-serif: "New York", "Iowan Old Style", "Baskerville", "Songti SC",
    "STSong", "Noto Serif CJK SC", serif;
  --font-sans: "SF Pro Text", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
}

body {
  font-size: 16px;
  line-height: 1.65;
}

.sidebar {
  padding-bottom: 76px;
}

.sidebar-foot {
  z-index: 3;
}

.brand strong {
  font-size: 22px;
}

.brand small {
  font-size: 11px;
}

.nav-item {
  font-size: 14px;
}

.hero {
  max-width: 980px;
}

.hero h1 {
  max-width: 900px;
  margin: 0 0 30px;
  font-size: clamp(56px, 5vw, 76px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.search-panel {
  max-width: 980px;
}

.search-topline {
  min-height: 54px;
}

.search-mode-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  color: var(--forest);
  border-radius: 7px;
  background: var(--paper-deep);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.search-row textarea {
  font-size: 20px;
}

.search-row textarea::placeholder {
  font-size: 15px;
}

.examples button {
  font-size: 12px;
}

.feature-description {
  font-size: 13px;
  line-height: 1.7;
}

.recent-copy strong {
  font-size: 14px;
}

.recent-copy small,
.recent-type {
  font-size: 10px;
}

.home-lower,
.home-footer {
  max-width: 980px;
}

.entry-summary {
  font-size: 16.5px;
  line-height: 1.9;
}

.sense-head h3 {
  font-size: 18px;
}

.sense-definition {
  font-size: 15px;
  line-height: 1.9;
}

.section-heading h2 {
  font-size: 19px;
}

.notes-list li {
  font-size: 14px;
  line-height: 1.85;
}

.reference-note {
  font-size: 12px;
  line-height: 1.8;
}

.term-note p {
  font-size: 13px;
}

.confusion-item small {
  font-size: 12px;
}

.mobile-brand-mark {
  display: none;
}

@media (max-width: 760px) {
  .hero h1 {
    margin: 4px 0 24px;
    font-size: clamp(40px, 10.5vw, 48px);
  }

  .search-row textarea {
    font-size: 17px;
  }

  .entry-summary {
    font-size: 16px;
  }

  .sense-definition {
    font-size: 15.5px;
  }

  .sense-head h3 {
    font-size: 17.5px;
  }

  .section-heading h2 {
    font-size: 18px;
  }
}

/* 1.9.6 focused search landing page */
.home-view {
  display: flex;
  max-width: none;
  min-height: calc(100vh - 72px);
  flex-direction: column;
  padding: 20px clamp(26px, 5vw, 72px) 18px;
}

.hero {
  width: min(100%, 860px);
  max-width: none;
  margin: auto;
  padding: 20px 0 0;
  text-align: center;
}

.hero::before {
  display: none;
}

.hero-rule {
  display: block;
  width: 38px;
  height: 1px;
  margin: 0 auto 22px;
  background: #b68a50;
}

.hero h1 {
  max-width: none;
  margin: 0 auto 38px;
  font-size: clamp(48px, 4.8vw, 68px);
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-align: center;
}

.search-panel {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  border-radius: 22px;
  text-align: left;
}

.search-row {
  min-height: 88px;
  padding: 10px 12px 10px 24px;
}

.search-row textarea {
  font-size: 21px;
}

.search-row textarea::placeholder {
  font-size: 14px;
}

.search-submit {
  height: 54px;
  padding: 0 23px;
  border-radius: 13px;
  font-size: 12px;
}

.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 20px 12px;
}

.search-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: #737c73;
  border-radius: 0;
  background: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.search-mode-label::before {
  width: 18px;
  height: 1px;
  background: #b68a50;
  content: "";
}

.examples {
  padding: 13px 20px 15px;
  border-top: 1px solid #eee8dc;
}

.examples > span {
  font-size: 9px;
  letter-spacing: 0.18em;
}

.examples button {
  padding: 6px 11px;
  font-size: 12px;
}

.home-footer {
  width: min(100%, 860px);
  max-width: none;
  margin: 0 auto;
  padding: 18px 0 2px;
  border-top: 0;
  justify-content: center;
}

@media (max-width: 760px) {
  .home-view {
    min-height: calc(100dvh - 128px);
    padding: 8px 14px 0;
  }

  .hero {
    margin: auto;
    padding: 8px 0 0;
  }

  .hero h1 {
    margin-bottom: 26px;
    font-size: clamp(38px, 10vw, 46px);
  }

  .hero-rule {
    margin-bottom: 17px;
  }

  .search-panel {
    max-width: none;
  }

  .search-row {
    min-height: 68px;
    padding: 6px 8px 6px 16px;
  }

  .search-row textarea {
    font-size: 18px;
  }

  .search-submit {
    height: 46px;
    padding: 0 16px;
  }

  .search-meta {
    padding: 0 16px 8px;
  }

  .examples {
    padding: 10px 13px 12px;
  }
}

/* iPhone-only staff artwork; keep it out of the Mac layout. */
.ios-home-art {
  display: none;
}
