:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #1c2226;
  --muted: #68737d;
  --line: #d8e0e5;
  --field: #fbfcfd;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warn: #a15c10;
  --danger: #b42318;
  --soft: #e8f3f1;
  --mark: #fff4cc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
}

.mast {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 7px;
  color: var(--warn);
  font-size: 14px;
}

h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
}

.stats {
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: right;
}

.search-panel {
  padding: 22px 0 18px;
}

.search {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  outline: none;
}

input {
  height: 52px;
  padding: 0 15px;
  font-size: 19px;
}

textarea {
  resize: vertical;
  min-height: 88px;
  padding: 10px 12px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 0 16px;
  cursor: pointer;
}

.search button {
  height: 52px;
  font-size: 17px;
}

button:hover {
  background: var(--accent-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

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

.ghost,
.link-button {
  min-height: 30px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent-dark);
  padding: 0 10px;
  font-size: 13px;
}

.ghost:hover,
.link-button:hover {
  background: var(--soft);
}

.message {
  min-height: 24px;
  margin-top: 10px;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: start;
}

.result {
  display: grid;
  gap: 20px;
}

.hidden {
  display: none !important;
}

.primary,
.history {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.primary {
  padding: 18px;
  border-left: 5px solid var(--accent);
}

.primary-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.translation {
  font-size: 44px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
}

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

.facts div {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--field);
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 5px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.meta {
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.components {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.components-title {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.component-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.component {
  display: grid;
  gap: 2px;
  min-width: 130px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mark);
  padding: 8px 10px;
}

.component span {
  color: var(--muted);
  font-size: 13px;
}

.notice-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.notice {
  border: 1px solid #e4bd7a;
  border-radius: 6px;
  background: #fff7e6;
  color: #744210;
  padding: 9px 11px;
  line-height: 1.5;
}

.evidence {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.evidence-row {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  padding: 9px 11px;
}

.evidence-row span {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.historical {
  border: 1px solid #b8d6d0;
  border-radius: 8px;
  background: #f1faf8;
  padding: 16px;
}

.historical-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.historical-item {
  display: grid;
  gap: 4px;
  min-height: 86px;
  border: 1px solid #b8d6d0;
  border-radius: 6px;
  background: #ffffff;
  padding: 11px 13px;
}

.historical-item strong {
  font-size: 22px;
}

.historical-item span,
.historical-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.list-wrap {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.item,
.empty {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 12px 14px;
}

.empty {
  display: flex;
  align-items: center;
  color: var(--muted);
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.item strong {
  display: block;
  font-size: 22px;
}

.item span,
.item small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.combo-langs {
  margin-top: 4px;
}

.compact .item {
  min-height: 70px;
}

.history {
  padding: 14px;
  position: sticky;
  top: 16px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.history-head h2 {
  margin: 0;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.history-item {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  text-align: left;
  overflow-wrap: anywhere;
}

.history-item:hover {
  border-color: var(--accent);
  background: var(--soft);
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 22px, 1180px);
    padding: 24px 0;
  }

  .mast,
  .primary-head {
    display: grid;
    align-items: start;
  }

  .stats {
    text-align: left;
  }

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

  .history {
    position: static;
  }

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

  h1 {
    font-size: 32px;
  }

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

  .translation {
    font-size: 36px;
  }
}
