.detail-card {
  display: block; position: relative;
  background: var(--token-expanded); border-radius: 14px; padding: 10px;
}
.detail-section:first-of-type { margin-top: 0; }
.detail-section > :first-child { margin-top: 0; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section { padding: 10px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; color: var(--accent); font: inherit; font-size: 1.05rem; font-weight: 600; padding: 0 12px; min-width: 0; cursor: pointer; margin: 0 0 5px -12px; }
.back-link:active { background: none; }
.token-hanzi, .token-pinyin { padding-bottom: 0; }
.token-hanzi-row { display: flex; align-items: center; gap: 8px; }
.token-hanzi-row .hanzi { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.token-copy {
  min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 4px;
  background: none; color: var(--text); font-weight: inherit; cursor: auto;
  text-align: left;
}
.token-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.token-speak {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; min-width: 30px; min-height: 30px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
}
.token-speak svg { width: 18px; height: 18px; }
.token-speak:hover { background: var(--control-fill); color: var(--text); }
.token-speak:active { background: var(--control-fill); color: var(--accent); }
.token-speak:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.token-speak.speaking { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.token-pinyin .pinyin { color: var(--pinyin-blue); font-family: var(--mono); font-size: 0.95rem; line-height: 1; }
.gloss-space {
  white-space: pre; border-radius: 2px;
  background: color-mix(in srgb, var(--gloss-purple) 24%, transparent);
}
.gloss-main-row { display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; row-gap: 2px; }
.gloss-now { display: inline-flex; align-items: center; gap: 6px; }
.gloss-main { color: var(--gloss-purple); font-size: 1.35rem; line-height: 1.1; }
.gloss-main[data-placeholder] { cursor: default; opacity: 1; }
.gloss-was {
  font-size: 0.95rem; line-height: 1.1;
  color: var(--gloss-purple-dim); text-decoration: line-through;
}
.gloss-arrow { font-size: 0.95rem; line-height: 1.1; color: var(--muted); }
.gloss-was[hidden], .gloss-arrow[hidden], .gloss-mark[hidden] { display: none; }
.gloss-justification { display: block; width: 100%; margin-top: 8px; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.gloss-justification[hidden] { display: none; }
.gloss-justification code { font: inherit; color: var(--gloss-purple-dim); }
.gloss-alts {
  margin-top: 8px; color: var(--gloss-purple-dim);
  font-size: 0.8rem; font-style: italic; line-height: 1.35;
}
.gloss-alts:empty { display: none; }
.detail-actions { display: flex; flex-direction: column; align-items: flex-start; }
.detail-card .placeholder, .detail-card .loading, .detail-actions #token-submit { font-size: 0.85rem; }
.detail-card .loading { padding: 0; }
.delete-error { margin-top: 10px; }
#submit-progress { margin-top: 10px; }
.hit-count { font-size: 0.8rem; line-height: 1.1; color: var(--muted); }
.hit-count .n { font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--text); }
.token-curate { display: none; flex-direction: column; gap: 12px; }
.detail-section.token-curate {
  margin: 10px -10px -10px; padding: 20px; border-radius: 0 0 14px 14px;
  background: rgb(255 255 255 / 3%);
}
.token-curate:has(> *:not([hidden]):not(:empty)) { display: flex; }
.curate-control {
  display: inline-flex; align-items: stretch;
  border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--gloss-purple) 12%, transparent);
}
.curate-control button {
  display: inline-flex; align-items: center;
  font: inherit; font-size: 0.8rem; font-weight: 600; line-height: 1.2;
  min-height: 0; min-width: 0; padding: 6px 10px; border: 0; border-radius: 0;
  background: none; color: var(--muted); cursor: pointer;
}
.curate-control button[hidden] { display: none; }
.curate-control button:hover { background: color-mix(in srgb, var(--gloss-purple) 20%, transparent); color: var(--text); }
.curate-control button:active { background: color-mix(in srgb, var(--gloss-purple) 28%, transparent); }
.curate-control button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.curate-annotate { box-shadow: inset 1px 0 0 color-mix(in srgb, var(--gloss-purple) 40%, transparent); }
.token-curate-slot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.token-curate-slot[hidden] { display: none; }
.curate-cost { color: var(--muted); font-size: 0.8rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.curate-error { margin-top: 0; }
.token-dates {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  column-gap: 16px; row-gap: 6px;
  font-size: 0.65rem; line-height: 1.3; color: color-mix(in srgb, var(--muted) 38%, transparent);
}
.token-dates .meta-item { display: flex; flex-direction: column; white-space: nowrap; }

