body { font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.tool-page { display: grid; gap: 22px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 26px); font-weight: 800; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
form { margin-top: 16px; }
label { display: block; font-size: 13px; font-weight: 600; }
textarea { display: block; width: 100%; min-height: 130px; margin-top: 8px; padding: 12px; resize: vertical; border: 1px solid var(--border); border-radius: 10px; background: #fbfbfd; color: var(--text); font: 13px/1.7 "Noto Sans SC", "Microsoft YaHei", sans-serif; overflow-wrap: anywhere; }
textarea::placeholder { color: #737b89; }
textarea:focus-visible, button:focus-visible { outline: 3px solid #a9bde9; outline-offset: 2px; }
textarea[aria-invalid="true"] { border-color: #b42318; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.btn { min-height: 40px; padding: 9px 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-family: inherit; font-weight: 700; cursor: pointer; }
.btn:hover:not(:disabled) { filter: brightness(0.94); }
.btn.secondary { background: #e9edf4; color: #253858; }
.result-header .btn { min-width: 108px; }
.btn.copied { background: #dcfce7; color: #166534; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; color: var(--muted); font-size: 12px; }
.text-button { min-height: 40px; padding: 4px 0; border: 0; background: transparent; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.message { min-height: 20px; margin: 10px 0 0; color: #28573c; font-size: 13px; line-height: 1.6; }
.message.error { color: #b42318; }
.results { display: grid; gap: 12px; min-width: 0; }
.result-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.result-heading .hint { margin: 0; }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-header label { font-size: 15px; }
.half-output { min-height: 174px; }
.full-output { min-height: 82px; }
.results > .message { margin: 0; }
@media (max-width: 540px) {
  .card { padding: 16px; }
  .examples { flex-basis: 100%; margin-left: 0; }
  .half-output { min-height: 250px; }
}
