:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft Yahei", sans-serif;
  --background: #12191b;
  --surface: #1b2527;
  --input: #101819;
  --ink: #edf5ed;
  --muted: #b0c3c0;
  --accent: #b2edc5;
  --line: #34484a;
  --error: #ffc1a9;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--ink); }
button, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.desk { width: min(100%, 1120px); margin: auto; padding: clamp(22px, 4.6vw, 64px) clamp(16px, 4vw, 44px); }
.masthead { display: flex; align-items: center; gap: 15px; padding-bottom: clamp(24px, 4vw, 41px); }
.brand-icon { flex: none; border-radius: 15px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 5vw, 2.55rem); letter-spacing: 0.035em; }
h2 { font-size: 1.34rem; }
h3 { font-size: 1.08rem; overflow-wrap: anywhere; }
.help-button { margin-left: auto; }
.columns { display: grid; grid-template-columns: 1.08fr 1fr; align-items: start; gap: 22px; }
.panel, dialog {
  min-width: 0;
  padding: clamp(16px, 2.7vw, 27px);
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
}
.muted { color: var(--muted); line-height: 1.65; }
.summary { margin-top: 7px; margin-bottom: 24px; }
.input-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
textarea {
  display: block;
  resize: vertical;
  width: 100%;
  min-height: 118px;
  padding: 12px;
  margin: 6px 0 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 11px;
}
textarea::placeholder { color: #a3b5b2; }
.primary, .secondary {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.primary { background: var(--accent); color: #10231c; }
.primary:hover { background: #cbf8d8; }
.primary:disabled { cursor: wait; opacity: 0.65; }
.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.secondary:hover { background: #263639; }
#download-form > .primary { width: 100%; }
.message { margin-top: 13px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.message[data-error="true"] { color: var(--error); }
.empty, .result { border-radius: 11px; background: var(--input); padding: 16px; }
.empty { display: grid; color: var(--muted); min-height: 130px; place-items: center; }
.result { display: grid; gap: 10px; }
.source { color: var(--accent); font-weight: 650; font-size: 0.9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 3px; }
dialog { width: min(calc(100% - 32px), 500px); color: var(--ink); }
dialog::backdrop { background: rgba(5, 12, 13, 0.8); }
dialog ul { padding-left: 1.3rem; line-height: 1.7; }
dialog form { margin-top: 16px; }
@media (max-width: 730px) { .columns { grid-template-columns: 1fr; gap: 16px; } }
