:root {
  --bg: #f4f7f8; --surface: #fff; --ink: #1a2228; --muted: #5b6b75;
  --line: #dce3e7; --accent: #0e7c8c; --accent-ink: #fff;
  --soft: rgba(14,124,140,.08); --warn-bg: #fff6e0; --warn-ink: #7a5a00; --err: #b3362c;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1417; --surface: #161e23; --ink: #e6edf0; --muted: #8ca0aa;
    --line: #25313a; --accent: #3bc3d6; --accent-ink: #06232a;
    --soft: rgba(59,195,214,.1); --warn-bg: #2e2609; --warn-ink: #e3c36a; --err: #e5756b;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--accent); }
.site-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; max-width: 760px; margin: 0 auto; width: 100%;
}
.brand { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 15px; }
.lang a { text-decoration: none; color: var(--muted); font-size: 13px; padding: 2px 6px; }
.lang a.on { color: var(--ink); font-weight: 700; }
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 20px 48px; width: 100%; flex: 1; }
.hero h1 { font-size: clamp(22px, 5vw, 30px); text-align: center; margin: 12px 0 24px; text-wrap: balance; }
.resolve-form { display: flex; flex-direction: column; gap: 12px; }
.input-row { display: flex; gap: 8px; }
input[type=url] {
  flex: 1; padding: 13px 15px; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
input[type=url]:focus-visible { outline: 2px solid var(--accent); border-color: transparent; }
button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); }
button.ghost { background: var(--surface); color: var(--ink); padding: 0 16px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; padding: 13px; font-weight: 700; font-size: 15px; }
button.primary:disabled { opacity: .55; cursor: default; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status { text-align: center; margin-top: 18px; color: var(--muted); }
.status.error { color: var(--err); font-weight: 600; }
.result-card { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.result-head { display: flex; gap: 14px; align-items: center; }
.result-head img { width: 70px; height: 94px; object-fit: cover; border-radius: 8px; background: var(--line); }
.result-head b { display: block; }
.muted { color: var(--muted); font-size: 14px; }
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.option {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink);
}
.option:hover { background: var(--soft); border-color: var(--accent); }
.option.best { border-color: var(--accent); background: var(--soft); font-weight: 600; }
.option .size { color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; }
.hevc-hint { margin-top: 12px; background: var(--warn-bg); color: var(--warn-ink); padding: 10px 14px; border-radius: 9px; font-size: 14px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; margin-top: 16px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.item img { width: 100%; border-radius: 6px; }
.site-foot { border-top: 1px solid var(--line); padding: 20px; text-align: center; }
.site-foot nav { display: flex; gap: 18px; justify-content: center; font-size: 14px; }
.site-foot nav a { color: var(--muted); text-decoration: none; }
.ad-slot { margin-top: 16px; }
.doc { max-width: 640px; }
.doc h1 { font-size: 24px; }
.doc h2 { font-size: 18px; margin-top: 24px; }
.doc p, .doc li { color: var(--ink); }
