/* admin.kedaipal.com/videos — same design tokens as the blog (../../../styles.css) */

:root {
  --navy: #0f1729;
  --navy-soft: #1d283a;
  --green: #10b77f;
  --green-deep: #067552;
  --green-light: #36d399;
  --amber: #b45309;
  --amber-bg: #fff7ed;
  --amber-border: #fed7aa;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --background: #ffffff;
  --foreground: #0f1729;
  --muted: #f1f5f9;
  --muted-foreground: #65758b;
  --border: #e1e7ef;
  --radius: 0.75rem;
  --radius-lg: calc(var(--radius) * 2.2);
  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-text: "Red Hat Text", system-ui, sans-serif;
  --font-mono: "Red Hat Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --page: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.025em; margin: 0; }
code, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 50%, transparent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1.25rem;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, opacity .2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-accent { background: var(--green); color: #fff; }
.btn-accent:hover:not(:disabled) { background: color-mix(in srgb, var(--green) 90%, #000); }
.btn-primary { background: var(--navy); color: #f8fafc; }
.btn-primary:hover:not(:disabled) { background: var(--navy-soft); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--foreground); }
.btn-outline:hover:not(:disabled) { border-color: color-mix(in srgb, var(--navy) 30%, transparent); }
.btn-ghost { color: var(--muted-foreground); background: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--muted); color: var(--foreground); }
.btn-sm { min-height: 2.25rem; padding: 0 0.875rem; font-size: 0.875rem; }
.link { color: var(--green-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Top bar ---------- */
.top {
  display: flex; align-items: center; gap: 0.75rem;
  max-width: var(--page); margin: 0 auto; padding: 1rem 1.25rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.brand img { height: 1.625rem; width: auto; }
@media (max-width: 479px) { .brand-sub { display: none; } }
.brand-sub {
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; color: var(--muted-foreground);
  padding-left: 0.625rem; border-left: 1px solid var(--border); line-height: 1;
}
.brand { margin-right: auto; flex: none; }
.top-nav { display: flex; gap: 0.25rem; }
.top-nav a {
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.75rem; border-radius: 999px;
  font-family: var(--font-display); font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); text-decoration: none;
}
.top-nav a:hover { background: var(--muted); color: var(--foreground); }
.top-nav a[aria-current="page"] { color: var(--green-deep); background: color-mix(in srgb, var(--green) 10%, transparent); }
.who {
  display: none; font-size: 0.8125rem; color: var(--muted-foreground);
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (min-width: 640px) { .who { display: inline; } }
.pill {
  display: inline-flex; align-items: center; height: 1.5rem; padding: 0 0.6rem; border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green-deep);
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; vertical-align: middle;
}
.pill--muted { background: var(--muted); color: var(--muted-foreground); }
.pill--amber { background: var(--amber-bg); color: var(--amber); }

/* ---------- Page ---------- */
.page { max-width: var(--page); margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
@media (min-width: 768px) { .page { padding-top: 3.5rem; } }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--green-deep);
}
.section-head h1 { margin-top: 0.75rem; font-size: clamp(1.875rem, 5vw, 2.75rem); letter-spacing: -0.035em; }
.lede { margin: 1rem 0 0; font-size: 1.0625rem; color: var(--muted-foreground); max-width: 38rem; }
.foot-note { margin: 1.5rem 0 0; font-size: 0.875rem; color: var(--muted-foreground); }
.foot-note a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
.foot-note a:hover { text-decoration: underline; }

/* ---------- Drop zone ---------- */
.drop {
  margin-top: 2rem; padding: 3rem 1.5rem; text-align: center; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--navy) 18%, transparent);
  border-radius: var(--radius-lg); background: var(--muted);
  transition: border-color .2s, background-color .2s, transform .2s;
}
@media (min-width: 768px) { .drop { padding: 4rem 2rem; } }
.drop:hover, .drop:focus-visible { border-color: var(--green); background: color-mix(in srgb, var(--green) 5%, #fff); }
.drop.is-over { border-color: var(--green); border-style: solid; background: color-mix(in srgb, var(--green) 9%, #fff); transform: scale(1.01); }
.drop-icon {
  display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: #fff; color: var(--green-deep); border: 1px solid var(--border); margin-bottom: 1.125rem;
}
.drop-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.drop-sub { margin: 0.375rem 0 0; color: var(--muted-foreground); font-size: 0.9375rem; }
body.is-dragging .drop { border-color: var(--green); }

/* ---------- Panel (every state after a file is chosen) ---------- */
.panel {
  margin-top: 2rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 41 / 0.04), 0 16px 40px -24px rgb(15 23 41 / 0.25);
  overflow: hidden;
}
.file-strip {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border); background: var(--muted);
}
.file-strip .file-icon { color: var(--muted-foreground); flex: none; }
.file-strip .file-name { min-width: 0; font-weight: 600; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-strip .file-size { color: var(--muted-foreground); font-size: 0.8125rem; white-space: nowrap; }
.file-strip .btn { margin-left: auto; flex: none; }
.panel-body { padding: 1.5rem 1.25rem; }
@media (min-width: 640px) { .panel-body { padding: 1.75rem 1.75rem; } }

/* status line with spinner */
.status { display: flex; align-items: center; gap: 0.875rem; }
.status-text { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; }
.status-sub { color: var(--muted-foreground); font-size: 0.9375rem; margin-top: 0.125rem; }
.spinner {
  width: 1.5rem; height: 1.5rem; border-radius: 50%; flex: none;
  border: 3px solid color-mix(in srgb, var(--green) 20%, transparent); border-top-color: var(--green);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* route / decision */
.route { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .route { grid-template-columns: 10rem 1fr; align-items: start; } }
.route-thumb {
  aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius); overflow: hidden; background: #000;
  display: grid; place-items: center; color: #fff; font-size: 0.8125rem;
}
.route-thumb img, .route-thumb video { width: 100%; height: 100%; object-fit: contain; }
.route-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.625rem; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.route-title .arrow { color: var(--muted-foreground); font-weight: 500; }
.route-why { margin: 0.375rem 0 0; color: var(--muted-foreground); font-size: 0.9375rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.375rem 1rem; margin: 0.875rem 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--muted-foreground); }
.facts li strong { color: var(--foreground); font-weight: 600; }
.dest { margin-top: 0.875rem; font-size: 0.875rem; color: var(--muted-foreground); word-break: break-all; }
.dest code { font-size: 0.8125rem; background: var(--muted); padding: 0.1em 0.4em; border-radius: 0.35em; color: var(--foreground); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.actions .hint { flex-basis: 100%; margin: 0; font-size: 0.8125rem; color: var(--muted-foreground); }

/* notices */
.notice { display: flex; gap: 0.75rem; padding: 0.875rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--muted); font-size: 0.9375rem; }
.notice svg { flex: none; margin-top: 0.15rem; }
.notice p { margin: 0; }
.notice p + p { margin-top: 0.375rem; }
.notice--warn { background: var(--amber-bg); border-color: var(--amber-border); color: var(--amber); }
.notice--error { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.notice--error strong, .notice--error em { color: inherit; }
.notice--ok { background: color-mix(in srgb, var(--green) 8%, #fff); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green-deep); }
.notice .small { font-size: 0.8125rem; opacity: .85; }
.notice + .notice, .notice + .route, .route + .notice { margin-top: 1rem; }
.refused-title { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; margin: 0 0 0.25rem; }

/* progress */
.progress { margin-top: 1.25rem; }
.bar { height: 0.625rem; border-radius: 999px; background: var(--muted); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--green-light)); transition: width .25s ease; }
.bar.is-indeterminate > span { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.progress-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; margin-top: 0.625rem; font-size: 0.875rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.progress-meta strong { color: var(--foreground); font-weight: 600; }

/* result */
.result-label { font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; color: var(--muted-foreground); margin: 0 0 0.5rem; }
.linkbox {
  display: flex; align-items: stretch; gap: 0.5rem; padding: 0.375rem 0.375rem 0.375rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--muted);
}
.linkbox code {
  flex: 1; min-width: 0; align-self: center; font-size: 0.9375rem; line-height: 1.4; word-break: break-all; color: var(--foreground);
}
@media (min-width: 640px) { .linkbox code { font-size: 1.0625rem; } }
.linkbox .btn { flex: none; align-self: center; }
.paste-hint { margin: 0.625rem 0 0; font-size: 0.9375rem; color: var(--muted-foreground); }
.paste-hint strong { color: var(--foreground); font-weight: 600; }
.preview { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; background: #000; }
.preview video, .preview img { width: 100%; height: auto; max-height: 24rem; object-fit: contain; display: block; }
.result-facts { margin-top: 0.75rem; }

/* ---------- Recent ---------- */
.page--recent h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
.recent-group { margin-top: 2.5rem; }
.recent-group h2 { font-size: 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.h2-sub { font-family: var(--font-text); font-weight: 400; font-size: 0.875rem; color: var(--muted-foreground); letter-spacing: 0; }
.recent-list { list-style: none; margin: 1rem 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.recent-row { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 0.75rem 0.875rem; align-items: center; padding: 0.875rem 1rem; }
.recent-row + .recent-row { border-top: 1px solid var(--border); }
.recent-thumb { width: 4.5rem; height: 2.55rem; border-radius: 0.4rem; object-fit: cover; background: #000; }
.recent-thumb--empty { background: var(--muted); border: 1px solid var(--border); }
.recent-main { min-width: 0; }
.recent-name { font-weight: 600; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.125rem 0.375rem; font-size: 0.8125rem; color: var(--muted-foreground); }
.recent-meta span { white-space: nowrap; }
/* The separator belongs to the item after it, so it never ends a wrapped line. */
.recent-meta span { white-space: normal; }
.recent-link { display: block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--green-deep); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0.125rem; }
.recent-link:hover { text-decoration: underline; }
.btn-copy { min-height: 2.25rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn-copy span { display: none; }
@media (min-width: 640px) { .btn-copy span { display: inline; } .recent-row { grid-template-columns: 6rem 1fr auto; } .recent-thumb { width: 6rem; height: 3.375rem; } }
.empty-note {
  margin: 1rem 0 0; padding: 1.5rem 1.25rem; text-align: center; color: var(--muted-foreground); font-size: 0.9375rem;
  border: 1px dashed var(--border); border-radius: var(--radius-lg); background: var(--muted);
}
.empty-note a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
.empty-note a:hover { text-decoration: underline; }
.empty-note code { font-size: 0.875em; }
.empty-note--error { color: var(--red); background: var(--red-bg); border-color: var(--red-border); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); opacity: 0;
  padding: 0.625rem 1rem; border-radius: 999px; background: var(--navy); color: #f8fafc;
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; box-shadow: 0 10px 30px -10px rgb(15 23 41 / .5);
  transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 2rem); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Keep motion gentle for people who asked for it. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Top bar: user + way back to the app ---------- */
.top-right { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.25rem; }
.top-app { display: none; }
@media (min-width: 640px) { .top-app { display: inline-flex; } }
.user-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; padding: 0 0.375rem 0 0.375rem;
  border: 1px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer;
  font-family: var(--font-display); font-size: 0.8125rem; font-weight: 600; color: var(--foreground);
}
.user-btn img, .user-btn .initial { width: 1.625rem; height: 1.625rem; border-radius: 50%; object-fit: cover; background: var(--muted); display: inline-grid; place-items: center; font-size: 0.75rem; }
.user-btn .label { display: none; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 0.375rem; }
@media (min-width: 640px) { .user-btn .label { display: inline; } }
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 15rem; padding: 0.5rem; z-index: 30;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 16px 40px -20px rgb(15 23 41 / .35);
}
.menu-pop .who-full { padding: 0.5rem 0.625rem 0.625rem; border-bottom: 1px solid var(--border); margin-bottom: 0.375rem; font-size: 0.8125rem; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; }
.menu-pop .who-full strong { display: block; color: var(--foreground); font-size: 0.875rem; }
.menu-pop a, .menu-pop button {
  display: flex; width: 100%; align-items: center; min-height: 2.25rem; padding: 0 0.625rem; border: 0; border-radius: 0.5rem;
  background: none; font: inherit; font-size: 0.875rem; color: var(--foreground); text-decoration: none; cursor: pointer; text-align: left;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--muted); }
.menu-pop .hint { padding: 0.25rem 0.625rem 0.375rem; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---------- Full-page gates: loading, sign-in, no access, errors ---------- */
.gate { min-height: calc(100vh - 6rem); display: grid; place-items: center; padding: 2rem 1.25rem 4rem; }
.gate-card {
  width: 100%; max-width: 28rem; padding: 2.25rem 1.75rem; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgb(15 23 41 / 0.04), 0 16px 40px -24px rgb(15 23 41 / 0.25);
}
.gate-card h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
.gate-card p { margin: 0; color: var(--muted-foreground); }
.gate-card p + p { margin-top: 0.625rem; }
.gate-card .actions { justify-content: center; }
.gate-card .small { font-size: 0.8125rem; }
.gate-card .small button { background: none; border: 0; padding: 0; font: inherit; color: var(--green-deep); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.gate-mark { display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: color-mix(in srgb, var(--green) 12%, #fff); color: var(--green-deep); margin-bottom: 1.25rem; }
.gate-mark--amber { background: var(--amber-bg); color: var(--amber); }
.gate-loading { display: grid; justify-items: center; gap: 0.875rem; color: var(--muted-foreground); font-size: 0.9375rem; }
.signin-wrap { width: 100%; max-width: 26rem; display: grid; justify-items: center; gap: 1.25rem; }
.signin-head { text-align: center; }
.signin-head h1 { font-size: clamp(1.5rem, 4vw, 1.875rem); margin-top: 0.625rem; }
.signin-head p { margin: 0.5rem 0 0; color: var(--muted-foreground); font-size: 0.9375rem; }
#clerk-signin { width: 100%; display: flex; justify-content: center; min-height: 18rem; }

/* ---------- Upload: preview + done ---------- */
.route-thumb .thumb-note { padding: 0.75rem; text-align: center; color: #cbd5e1; font-size: 0.8125rem; line-height: 1.4; }
.cost { margin: 0.875rem 0 0; font-size: 0.8125rem; color: var(--muted-foreground); }
.preview--thumb { position: relative; }
.preview--thumb .play-note {
  position: absolute; left: 0.75rem; bottom: 0.75rem; padding: 0.375rem 0.625rem; border-radius: 999px;
  background: rgb(15 23 41 / .78); color: #f8fafc; font-size: 0.75rem; font-family: var(--font-display); font-weight: 600;
}
.bar.is-processing > span { background: linear-gradient(90deg, var(--navy-soft), #475569); }
.recent-row.is-pending .recent-link { color: var(--muted-foreground); }
.pill--red { background: var(--red-bg); color: var(--red); }

/* ---------- R2 + YouTube (27 Oct): the two routes, the YouTube check ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.offline-pill { flex: none; white-space: nowrap; }
.spinner--inline { display: inline-block; width: 1rem; height: 1rem; border-width: 2px; vertical-align: -0.15em; margin-right: 0.5rem; }

.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.route-chip { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.875rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font-size: 0.875rem; line-height: 1.35; }
.route-chip strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; }
.route-chip span span { color: var(--muted-foreground); }
.route-chip-mark { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.625rem; }
.route-chip--clip .route-chip-mark { background: color-mix(in srgb, var(--green) 12%, #fff); color: var(--green-deep); }
.route-chip--youtube .route-chip-mark { background: #fff1f1; color: #e00000; }
.routes + .drop { margin-top: 1rem; }

.pill--yt { background: #fff1f1; color: #b00000; }

.steps { margin: 1.25rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.625rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.25rem; font-size: 0.9375rem; line-height: 1.5; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--muted); color: var(--foreground);
  font-family: var(--font-display); font-weight: 700; font-size: 0.75rem;
}
.btn svg { flex: none; }

.yt-card { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
@media (min-width: 640px) { .yt-card { padding: 1.5rem 1.75rem; } }
.yt-head { display: flex; gap: 0.875rem; align-items: flex-start; }
.yt-head h2 { font-size: 1.125rem; }
.yt-head p { margin: 0.25rem 0 0; color: var(--muted-foreground); font-size: 0.9375rem; }
.yt-mark { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; background: #fff1f1; color: #e00000; }
.yt-form { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1rem; }
.yt-input {
  flex: 1 1 16rem; min-width: 0; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--border); border-radius: 999px;
  font: inherit; font-size: 0.9375rem; color: var(--foreground); background: var(--muted);
}
.yt-input:focus { outline: none; border-color: color-mix(in srgb, var(--green) 60%, transparent); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.yt-result:not(:empty) { margin-top: 1rem; }
.yt-result .notice + * { margin-top: 1rem; }
.yt-video { display: grid; grid-template-columns: 8rem 1fr; gap: 0.875rem; align-items: center; margin-bottom: 1.25rem; }
.yt-video img { width: 8rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.5rem; background: #000; }
.yt-video--short img { width: 4.5rem; aspect-ratio: 9 / 16; justify-self: center; }
.yt-video > div { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; align-items: flex-start; }
.yt-title { font-family: var(--font-display); font-size: 1rem; line-height: 1.3; }
.yt-channel { font-size: 0.8125rem; color: var(--muted-foreground); }
.yt-aside { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding: 1rem 1.25rem; border: 1px dashed var(--border); border-radius: var(--radius-lg); background: var(--muted); font-size: 0.9375rem; }
.yt-aside p { flex: 1 1 14rem; margin: 0; color: var(--muted-foreground); }
.yt-aside p strong { color: var(--foreground); }
@media (max-width: 479px) { .routes { grid-template-columns: 1fr; } }

/* Phones: the nav takes its own row under the brand, so the header never pushes the page sideways. */
@media (max-width: 639px) {
  .top { flex-wrap: wrap; row-gap: 0.5rem; }
  .top-nav { order: 3; width: 100%; }
  .top-nav a { flex: 1; justify-content: center; }
}
