:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #6b7785;
  --line: #dce3e8;
  --paper: #f7f9fa;
  --panel: #ffffff;
  --accent: #fa7298;
  --accent-dark: #d6537b;
  --blue: #2f6fed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
.shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 10vh 0 48px; }
.masthead { margin-bottom: 32px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 560px; margin-bottom: 12px; font-size: clamp(38px, 8vw, 68px); line-height: .98; letter-spacing: 0; }
h2 { margin-bottom: 20px; font-size: 22px; letter-spacing: 0; }
.lede { max-width: 460px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.tool, .result { padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 36px rgb(23 33 43 / 7%); }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.input-row { display: flex; gap: 10px; }
input { min-width: 0; flex: 1; height: 48px; padding: 0 14px; color: var(--ink); background: #fff; border: 1px solid #b8c4ce; border-radius: 6px; font: inherit; font-size: 16px; }
input:focus { outline: 3px solid rgb(47 111 237 / 18%); border-color: var(--blue); }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 0; border-radius: 6px; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
button { color: #fff; background: var(--accent-dark); }
button:hover { background: #bd4269; }
button:disabled { opacity: .6; cursor: wait; }
.hint, footer { color: var(--muted); font-size: 13px; }
.hint { margin: 10px 0 0; }
.status { min-height: 22px; margin: 16px 0 0; color: var(--accent-dark); font-size: 14px; }
.result { margin-top: 24px; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.result-heading h2 { margin-bottom: 0; }
.bvid { padding: 6px 9px; color: var(--blue); background: #edf3ff; border-radius: 4px; font: 700 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.preview-wrap { overflow: hidden; margin-top: 24px; background: #e9eef2; border-radius: 6px; aspect-ratio: 16 / 9; }
#cover-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-title { margin: 16px 0 0; font-size: 15px; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button.primary { color: #fff; background: var(--blue); }
.button.secondary { color: var(--ink); background: #eef2f5; }
footer { margin-top: 24px; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 540px) {
  .shell { width: min(100% - 24px, 760px); padding-top: 48px; }
  .tool, .result { padding: 20px; }
  .input-row { flex-direction: column; }
  button { width: 100%; }
}
