:root {
  --paper: #f7f6f1;
  --paper-deep: #ecebe4;
  --paper-light: #fffefa;
  --ink: #181816;
  --ink-soft: #3d3d38;
  --muted: #77776f;
  --line: rgba(24, 24, 22, 0.14);
  --line-strong: rgba(24, 24, 22, 0.34);
  --accent: #2748ff;
  --orange: #ed5a34;
  --pink: #e9b7cf;
  --lilac: #c8bce4;
  --serif: "Iowan Old Style", "Baskerville", Georgia, "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Helvetica Neue", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  color: var(--paper-light);
  background: var(--accent);
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.1;
  background-image: radial-gradient(rgba(24, 24, 22, 0.7) 0.5px, transparent 0.65px);
  background-size: 8px 8px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

[data-tone="ai"] {
  --tone: var(--accent);
}

[data-tone="computer"] {
  --tone: var(--orange);
}

[data-tone="automation"] {
  --tone: #a64e77;
}

[data-tone="product"] {
  --tone: #726393;
}

[data-tone="business"] {
  --tone: #61743a;
}

[data-tone="all"] {
  --tone: var(--ink);
}

[data-tone="none"] {
  --tone: var(--muted);
}

.topbar {
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
  padding: 25px 0 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.04em;
  transition: color 160ms ease, background 160ms ease;
}

.brand:hover .brand-mark {
  background: var(--ink);
  color: var(--paper-light);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.total-pill {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.total-pill b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.suggest-btn {
  min-height: 35px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.suggest-btn svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.suggest-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper-light);
}

.random-btn {
  min-height: 35px;
  padding: 0 0 3px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  transition: color 160ms ease, border-color 160ms ease;
}

.random-btn svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.random-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mast-strip {
  width: min(1200px, calc(100% - 64px));
  min-height: 30px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 2.1fr auto;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.mast-strip span {
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
}

.mast-strip span:first-child {
  padding-left: 0;
  color: var(--ink);
}

.mast-strip span:nth-child(2) {
  color: var(--orange);
}

.mast-strip span:last-child {
  padding-right: 0;
  border-right: 0;
  color: var(--accent);
}

.mast-strip b {
  font-weight: inherit;
}

.page {
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

kbd {
  min-width: 22px;
  padding: 2px 6px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.3;
}

.search-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 8px 0 7px;
  background: rgba(247, 246, 241, 0.92);
  backdrop-filter: blur(14px);
}

.search-box {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper-light);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.search-icon {
  width: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: stroke 160ms ease;
}

.search-box:focus-within .search-icon {
  stroke: var(--accent);
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--serif);
  font-size: 17px;
}

.search-box input::placeholder {
  color: #92928a;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-shortcut {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}

.search-clear {
  flex: 0 0 auto;
  padding: 4px 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
}

.search-clear:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.search-hint {
  padding: 7px 2px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.015em;
}

.search-hint::before {
  content: "— ";
  color: var(--accent);
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 76px;
  padding: 18px 0 84px;
}

.sidebar {
  min-width: 0;
  position: sticky;
  top: 102px;
  align-self: start;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-line {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.category-list,
.primary-list {
  min-width: 0;
  max-width: 100%;
  margin-top: 14px;
  display: grid;
  gap: 0;
}

.category-btn {
  position: relative;
  width: 100%;
  min-height: 47px;
  padding: 7px 0 7px 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, transform 150ms ease;
}

.category-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tone, var(--line-strong));
  opacity: 0.65;
  transform: translateY(-50%);
  transition: width 150ms ease, height 150ms ease, opacity 150ms ease;
}

.category-btn:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.category-btn[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
}

.category-btn[aria-pressed="true"]::before {
  width: 7px;
  height: 7px;
  background: var(--accent);
  opacity: 1;
}

.category-name {
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 500;
}

.category-name small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
}

.category-count {
  min-width: 21px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-align: right;
}

.category-btn[aria-pressed="true"] .category-count {
  color: var(--ink);
}

.sidebar-card {
  margin-top: 32px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.sidebar-card-label {
  display: block;
  margin-bottom: 7px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.sidebar-card p {
  margin: 0;
}

.secondary-block {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.secondary-head {
  font-size: 7px;
}

.secondary-list {
  min-width: 0;
  max-width: 100%;
  margin-top: 10px;
  display: grid;
  gap: 0;
}

.secondary-btn {
  width: 100%;
  min-height: 32px;
  padding: 5px 0 5px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  font-size: 9px;
  transition: color 130ms ease, border-color 130ms ease;
}

.secondary-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.secondary-btn[aria-pressed="true"] {
  border-left: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.secondary-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 400;
}

.content {
  min-width: 0;
}

.alphabet-head {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.reset-link {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}

.reset-link:hover {
  color: var(--orange);
}

.alphabet {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.letter-rail {
  position: fixed;
  top: 50%;
  right: clamp(3px, 0.5vw, 10px);
  z-index: 26;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(9px, -50%);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.letter-rail.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.letter-rail-track {
  padding: 7px 1px 7px 6px;
  display: grid;
  gap: 1px;
  border-left: 1px solid var(--line-strong);
  background: linear-gradient(90deg, rgba(247, 246, 241, 0), rgba(247, 246, 241, 0.86) 46%);
}

.letter-rail-btn {
  position: relative;
  width: 19px;
  height: 16px;
  padding: 0;
  display: grid;
  place-items: center start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.letter-rail-btn::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 4px;
  height: 1px;
  background: var(--line);
  transition: width 150ms ease, background 150ms ease;
}

.letter-rail-btn span {
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1;
  transition: color 150ms ease, font-size 150ms ease, transform 150ms ease;
}

.letter-rail-btn:hover:not(:disabled)::before,
.letter-rail-btn[aria-current="location"]::before {
  width: 7px;
  background: var(--accent);
}

.letter-rail-btn:hover:not(:disabled) span,
.letter-rail-btn[aria-current="location"] span {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  transform: translate(-1px, -1px);
}

.letter-rail-btn:disabled {
  color: rgba(24, 24, 22, 0.2);
  cursor: default;
}

.letter-btn {
  position: relative;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  transition: color 130ms ease, background 130ms ease, border-color 130ms ease;
}

.letter-btn:hover:not(:disabled) {
  color: var(--accent);
  background: rgba(39, 72, 255, 0.045);
}

.letter-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.letter-btn:disabled {
  color: rgba(24, 24, 22, 0.2);
  background: rgba(24, 24, 22, 0.025);
  cursor: default;
}

.letter-btn .letter-count {
  position: absolute;
  right: 5px;
  bottom: 3px;
  font-family: var(--mono);
  font-size: 7px;
  opacity: 0.55;
}

.result-bar {
  min-height: 88px;
  padding: 24px 0 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.result-bar > div {
  min-width: 0;
}

.result-bar h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.result-bar h2::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--accent);
}

.result-bar p {
  margin: 7px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.result-count {
  padding-bottom: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}

.results {
  min-width: 0;
  display: grid;
  gap: 50px;
}

.letter-group {
  scroll-margin-top: 104px;
}

.letter-heading {
  margin-bottom: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.letter-heading strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 37px;
  font-weight: 400;
  line-height: 1;
}

.letter-heading span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.letter-heading .heading-line {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.card-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}

.term-card {
  position: relative;
  min-height: 214px;
  padding: 24px 4px 27px 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background 160ms ease, padding 160ms ease;
}

.letter-group .term-card:first-child,
.term-card:nth-child(even) {
  border-top-color: var(--line-strong);
}

.term-card::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.term-card:hover {
  padding-left: 12px;
  padding-right: 12px;
  background: rgba(255, 254, 250, 0.7);
}

.term-card:hover::after {
  transform: scaleX(1);
}

.term-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-category {
  min-width: 0;
  max-width: calc(100% - 44px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-category::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--tone, var(--muted));
  vertical-align: 1px;
}

.card-level {
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.term-card h3 {
  position: relative;
  z-index: 1;
  margin: 25px 0 3px;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.card-zh {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 11px;
}

.card-summary {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.72;
}

.card-bottom {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-tag {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.card-arrow {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: color 160ms ease, transform 160ms ease;
}

.card-arrow svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.term-card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.empty-state {
  padding: 76px 24px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.empty-state strong {
  display: block;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
}

.empty-state p {
  margin: 10px 0 21px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state button {
  padding: 7px 0 4px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
}

.empty-state button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px 24px;
}

.footer {
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line-strong);
}

.footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
}

.footer span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 22, 0.38);
  backdrop-filter: blur(9px);
  animation: fade-in 180ms ease both;
}

.modal-sheet {
  position: relative;
  width: min(720px, 100%);
  max-height: min(90vh, 920px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper-light);
  box-shadow: 0 28px 90px rgba(24, 24, 22, 0.16);
  overflow: hidden;
  animation: sheet-in 240ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.modal-sheet::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--tone, var(--accent));
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-light);
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-close svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.modal-scroll {
  flex: 1 1 auto;
  padding: 48px 45px 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.modal-categories {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  text-transform: none;
}

.modal-category-chip {
  color: var(--accent);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
}

.modal-category-chip + .modal-category-chip::before {
  content: "/";
  margin-right: 7px;
  color: var(--line-strong);
}

.modal-letter {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.modal-scroll h2 {
  max-width: calc(100% - 40px);
  margin: 28px 0 4px;
  font-family: var(--serif);
  font-size: clamp(46px, 7vw, 66px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.modal-full {
  margin: 11px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.modal-zh {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.modal-summary {
  margin: 29px 0 31px;
  padding: 3px 0 3px 19px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.58;
}

.modal-section {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 20px;
  padding: 23px 0;
  border-top: 1px solid var(--line);
}

.modal-section h3,
.modal-related h3 {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.modal-section h3 span {
  margin-right: 7px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}

.modal-section p {
  margin: -4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.modal-related {
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.related-list {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.related-btn {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  transition: color 130ms ease, border-color 130ms ease;
}

.related-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.related-empty {
  color: var(--muted);
  font-size: 11px;
}

.modal-foot {
  padding: 14px 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: var(--paper-light);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.modal-tag {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.modal-tag + .modal-tag::before {
  content: "/";
  margin: 0 7px;
  color: var(--line-strong);
}

.copy-link {
  flex: 0 0 auto;
  padding: 5px 0 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  transition: color 130ms ease, border-color 130ms ease;
}

.copy-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-link svg {
  width: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suggest-sheet {
  width: min(680px, 100%);
}

.suggest-scroll {
  flex: 1 1 auto;
  padding: 44px 45px 38px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.suggest-title {
  margin: 21px 0 13px;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.suggest-lead {
  max-width: 560px;
  margin: 0 0 29px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.suggest-form {
  display: grid;
  gap: 18px;
}

.suggest-field {
  display: grid;
  gap: 7px;
}

.suggest-field > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.suggest-field b {
  color: var(--orange);
  font-weight: 500;
}

.suggest-field i {
  color: #a09f96;
  font-style: normal;
  letter-spacing: 0;
}

.suggest-field input,
.suggest-field select,
.suggest-field textarea {
  width: 100%;
  min-height: 45px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: var(--paper-light);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.suggest-field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.7;
}

.suggest-field input::placeholder,
.suggest-field textarea::placeholder {
  color: #9b9a91;
}

.suggest-field input:focus,
.suggest-field select:focus,
.suggest-field textarea:focus {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

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

.suggest-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.suggest-actions {
  min-height: 58px;
  padding-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.suggest-status {
  max-width: 420px;
  margin: 0;
  color: var(--orange);
  font-size: 11px;
  line-height: 1.55;
}

.suggest-submit {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper-light);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  transition: background 150ms ease, border-color 150ms ease;
}

.suggest-submit i {
  font-style: normal;
}

.suggest-submit:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
}

.suggest-submit:disabled {
  cursor: wait;
  opacity: 0.58;
}

.suggest-success {
  padding: 30px 0 3px;
  border-top: 1px solid var(--line);
}

.suggest-success strong {
  display: block;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
}

.suggest-success p {
  margin: 10px 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.suggest-success button {
  padding: 5px 0 3px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
}

.suggest-success button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.noscript {
  padding: 20px;
  text-align: center;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 44px;
  }

  .sidebar {
    position: static;
  }

  .sidebar-head,
  .sidebar-card {
    display: none;
  }

  .category-list,
  .primary-list {
    width: 100%;
    margin: 0;
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 0 0 10px;
    scrollbar-width: thin;
  }

  .category-btn {
    width: auto;
    min-width: max-content;
    min-height: 35px;
    padding: 0 0 4px 12px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid transparent;
  }

  .category-btn::before {
    width: 4px;
    height: 4px;
  }

  .category-btn[aria-pressed="true"] {
    border-bottom-color: var(--ink);
  }

  .category-btn[aria-pressed="true"]::before {
    width: 6px;
    height: 6px;
  }

  .category-name {
    display: block;
  }

  .category-name small {
    display: none;
  }

  .secondary-block {
    margin-top: 12px;
    padding-top: 13px;
  }

  .secondary-list {
    width: 100%;
    max-width: 100%;
    margin-top: 9px;
    padding: 0 0 6px;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .secondary-btn {
    width: auto;
    min-width: max-content;
    min-height: 30px;
    padding: 0 0 3px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .secondary-btn[aria-pressed="true"] {
    border-left: 0;
    border-bottom: 1px solid var(--accent);
  }

}

@media (max-width: 720px) {
  .letter-rail {
    display: none;
  }

  .topbar,
  .mast-strip,
  .page,
  .footer {
    width: min(100% - 32px, 1200px);
  }

  .topbar {
    padding: 17px 0 14px;
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    font-size: 15px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .topbar-actions {
    gap: 12px;
  }

  .total-pill {
    font-size: 8px;
  }

  .random-btn {
    min-height: 28px;
    font-size: 8px;
  }

  .suggest-btn {
    width: auto;
    min-height: 30px;
    padding: 0 9px;
    justify-content: center;
  }

  .suggest-btn span {
    display: inline;
  }

  .mast-strip {
    min-height: 27px;
    grid-template-columns: 1fr 1fr;
    font-size: 7px;
  }

  .mast-strip span {
    padding: 0 9px;
  }

  .mast-strip span:first-child {
    padding-left: 0;
  }

  .mast-strip span:nth-child(3),
  .mast-strip span:nth-child(4) {
    display: none;
  }

  .search-wrap {
    padding: 6px 0 6px;
  }

  .search-box {
    min-height: 50px;
    padding: 0 12px;
    gap: 10px;
  }

  .search-icon {
    width: 18px;
  }

  .search-box input {
    font-family: var(--sans);
    font-size: 13px;
  }

  .search-shortcut,
  .search-hint {
    display: none;
  }

  .workspace {
    padding: 18px 0 64px;
  }

  .letter-btn {
    height: 40px;
    font-size: 14px;
  }

  .letter-btn .letter-count {
    right: 3px;
    bottom: 2px;
    font-size: 6px;
  }

  .result-bar {
    min-height: 79px;
    padding-top: 23px;
    align-items: start;
  }

  .result-bar h2 {
    gap: 8px;
    font-size: 25px;
  }

  .result-bar p {
    margin-top: 6px;
    font-size: 7px;
  }

  .result-count {
    padding-top: 5px;
    font-size: 7px;
  }

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

  .term-card {
    min-height: 198px;
    padding: 20px 2px 22px;
  }

  .term-card:hover {
    padding-left: 8px;
    padding-right: 8px;
  }

  .term-card h3 {
    margin-top: 21px;
    font-size: 32px;
  }

  .card-summary {
    max-width: 100%;
    font-size: 11px;
  }

  .footer {
    padding: 20px 0 25px;
  }

  .footer p {
    font-size: 11px;
  }

  .footer span {
    display: none;
  }

  .modal {
    padding: 0;
  }

  .modal-sheet {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    box-shadow: none;
  }

  .modal-close {
    top: 17px;
    right: 13px;
  }

  .modal-scroll {
    padding: 39px 21px 28px;
  }

  .modal-scroll h2 {
    margin-top: 24px;
    font-size: 46px;
  }

  .modal-summary {
    margin: 25px 0 27px;
    padding: 2px 0 2px 15px;
    font-size: 18px;
  }

  .modal-section {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 19px 0;
  }

  .modal-section p {
    margin-top: 0;
    font-size: 13px;
  }

  .modal-foot {
    padding: 12px 21px;
  }

  .modal-tags {
    display: none;
  }

  .suggest-scroll {
    padding: 34px 21px 28px;
  }

  .suggest-title {
    margin-top: 23px;
    font-size: 40px;
  }

  .suggest-lead {
    margin-bottom: 24px;
    font-size: 11px;
  }

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

  .suggest-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .suggest-submit {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .total-pill {
    display: none;
  }

  .random-btn {
    width: 28px;
    padding: 0;
    justify-content: center;
  }

  .random-btn span {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
