:root {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #fff; --text: #242b36; --muted: #6a7281;
  --line: #e4e7ee; --accent: #4f62d7; --button-text: #fff; --hover: #edf0ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14171d; --surface: #1c2028; --text: #e7eaf1; --muted: #a0a8b8;
  --line: #303744; --accent: #a5b2ff; --button-text: #161b32; --hover: #282e3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #14171d; --surface: #1c2028; --text: #e7eaf1; --muted: #a0a8b8;
    --line: #303744; --accent: #a5b2ff; --button-text: #161b32; --hover: #282e3a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; font-size: 15px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 32px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 650; font-size: 17px; }
.brand span { font-weight: 400; color: var(--muted); }
.appearance { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
select, input, button { font: inherit; color: inherit; min-height: 46px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
select { padding: 7px 10px; }
main { width: min(100% - 40px, 720px); margin: 72px auto 80px; flex: 1; }
.eyebrow { color: var(--accent); font-size: 13px; letter-spacing: .08em; margin: 0 0 14px; }
h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 650; line-height: 1.3; letter-spacing: -.04em; margin: 0 0 14px; }
.intro > p:last-child { color: var(--muted); margin: 0 0 32px; }
.mobile-break { display: none; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.panel label { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 550; }
.input-row { display: flex; gap: 10px; }
input { min-width: 0; flex: 1; padding: 11px 13px; width: 100%; background: var(--bg); }
input::placeholder { color: var(--muted); opacity: 1; }
input:focus { border-color: var(--accent); }
button { padding: 10px 18px; cursor: pointer; white-space: nowrap; }
button:hover { background: var(--hover); }
.primary { color: var(--button-text); background: var(--accent); border-color: var(--accent); }
.primary:hover { filter: brightness(.95); background: var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
#result { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
.download { display: inline-block; color: var(--accent); padding: 12px 0 4px; min-height: 44px; }
#status { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
#status:empty { margin: 0; }
details { margin-top: 24px; font-size: 14px; color: var(--muted); }
summary { cursor: pointer; min-height: 44px; padding: 11px 0; width: fit-content; color: var(--text); }
.details-content p { margin: 12px 0; }
code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 14px; font-size: 12px; color: var(--text); }
.examples { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.examples button { font-size: 13px; padding: 6px 12px; }
footer { width: 100%; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 32px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px 18px; background: var(--surface); z-index: 10; }
.skip-link:focus { top: 8px; }
@media (max-width: 560px) {
  header { padding: 16px 20px; gap: 10px; }
  .brand { font-size: 15px; }
  .brand span { display: none; }
  .appearance { gap: 6px; }
  .appearance select { max-width: 110px; }
  main { margin-top: 44px; margin-bottom: 44px; }
  .panel { padding: 20px; }
  .input-row { flex-wrap: wrap; }
  .input-row input { flex-basis: 100%; }
  .input-row button { width: 100%; }
  footer { padding: 20px; }
}
@media (max-width: 370px) { .mobile-break { display: initial; } }
