.wchip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.15rem 0.5rem;
  margin: 0.15rem 0.2rem;
  font-size: 0.92rem;
}

.wchip b {
  font-size: 1.05rem;
}

.wchip-tl {
  color: var(--accent-deep);
}

.about h3 {
  margin: 1.2rem 0 0.4rem;
  font-size: 1.02rem;
  color: var(--accent-deep);
}

.about p,
.about li {
  font-size: 0.95rem;
  line-height: 1.8;
}

.about code {
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.05em 0.4em;
  border-radius: 6px;
}

textarea,
#vb-in,
#pr-in {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfd;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 6.5rem;
  resize: vertical;
}

#vb-in,
#pr-in {
  min-height: 0;
  max-width: 32rem;
}

textarea:focus,
#vb-in:focus,
#pr-in:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
  background: #fff;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.seg-btn {
  border: 0;
  background: var(--card);
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
}

.seg-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.hints {
  margin-top: 0.8rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.6rem;
  font-size: 0.92rem;
}

.hints .hint-title {
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.hints ul {
  margin: 0.3rem 0 0;
  padding-inline-start: 1.2rem;
}

.hints code {
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.05em 0.4em;
  border-radius: 6px;
}

.hints details.calque {
  margin-top: 0.5rem;
}

.hints summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.dict-link {
  font-size: 0.72rem;
  color: var(--accent-deep);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  margin-inline-start: 0.3rem;
  vertical-align: middle;
  white-space: nowrap;
}

.dict-link:hover {
  background: var(--accent-soft);
}

.row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-block: 0.7rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.btn.primary:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.opt {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.out-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr;
}

.out-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  background: linear-gradient(180deg, #fdfefe, #f7faf9);
}

.out-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.out-head h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.roman {
  display: block;
  font-size: 1.3rem;
  line-height: 1.95;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  min-height: 2.6em;
  margin-top: 0.25rem;
}

.anno {
  margin-top: 0.9rem;
  line-height: 2.15;
  overflow-wrap: anywhere;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
}

.anno.word {
  border: 0;
  background: none;
  padding: 0 0.12em;
  cursor: pointer;
  border-bottom: 2px dotted var(--accent);
  font-size: 1.12rem;
  border-radius: 4px;
  transition: background 0.12s ease;
}

.anno.word:hover {
  background: var(--accent-soft);
}

.anno.miss {
  color: var(--miss);
  font-weight: 700;
}

.prac-card {
  display: grid;
  gap: 0.65rem;
  justify-items: center;
  text-align: center;
  padding: 1.2rem 0.6rem 0.4rem;
}

.prac-score {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.prac-han {
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.prac-gloss {
  color: var(--ink-soft);
}

.prac-fb {
  min-height: 2.4em;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.prac-fb.good {
  color: var(--good);
}

.prac-fb.bad {
  color: var(--bad);
}

.prac-fb .w-ok {
  color: var(--good);
}

.prac-fb .w-bad {
  color: var(--bad);
  text-decoration: line-through;
}

.ex-cell .ex {
  font-size: 0.92rem;
  line-height: 1.45;
  padding-block: 0.2rem;
}

.ex-cell .ex + .ex {
  border-top: 1px dashed var(--line);
  margin-top: 0.3rem;
  padding-top: 0.3rem;
}


.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

#vb-tbl {
  width: 100%;
  border-collapse: collapse;
}

#vb-tbl th,
#vb-tbl td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

#vb-tbl th {
  position: sticky;
  top: 0;
  background: #f7f9fa;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

#vb-tbl tbody tr:nth-child(even) {
  background: #fafbfc;
}

#vb-tbl td.w {
  font-weight: 700;
  white-space: nowrap;
}

#vb-tbl td.roman {
  overflow-wrap: anywhere;
}

@media (min-width: 48rem) {
  .out-grid {
    grid-template-columns: 1fr 1fr;
  }
}
