:root {
    color-scheme: light;
    --ink: #171716;
    --muted: #696966;
    --paper: rgba(255, 255, 255, .92);
    --line: #d9d9d4;
    --accent: #292927;
    --success: #147a48;
    --danger: #b42318;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #ededeb url('/assets/fondo-sky.png') center / cover fixed;
}
.shell { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.brand { display: flex; justify-content: center; margin-bottom: 28px; }
.brand img { width: min(240px, 58vw); filter: drop-shadow(0 10px 22px rgba(0,0,0,.12)); }
.card {
    background: var(--paper);
    border: 1px solid rgba(23,23,22,.1);
    border-radius: 22px;
    padding: 26px;
    margin-bottom: 18px;
    box-shadow: 0 18px 50px rgba(25,25,23,.09);
    backdrop-filter: blur(12px);
}
.card.accent { border-left: 6px solid var(--accent); }
.narrow { max-width: 480px; margin-inline: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1; margin-bottom: 10px; letter-spacing: -.04em; }
h2 { font-size: 1.15rem; margin-bottom: 20px; }
.eyebrow { margin-bottom: 8px; font-weight: 800; font-size: .75rem; letter-spacing: .18em; }
.muted, .hint { color: var(--muted); }
.hint { margin: 18px 0 0; font-size: .88rem; }
.youtube-check {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    margin-top: 16px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 10px 14px;
    color: var(--muted);
    background: rgba(255,255,255,.5);
}
.youtube-check img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; }
.youtube-check div { min-width: 0; display: grid; gap: 4px; }
.youtube-check small { overflow-wrap: anywhere; color: var(--muted); }
.youtube-check.valid { border-style: solid; border-color: #75c69a; color: var(--success); background: #effbf4; }
.youtube-check.invalid { border-style: solid; border-color: #f0a6a0; color: var(--danger); background: #fff4f3; }
.youtube-check.loading { opacity: .72; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
label { display: grid; gap: 8px; font-size: .84rem; font-weight: 750; }
input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    background: rgba(255,255,255,.9);
    color: var(--ink);
    font: inherit;
    outline: none;
}
input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,23,22,.1); }
button, .button-link {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    background: var(--ink);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}
.narrow button { width: 100%; margin-top: 20px; }
.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.actions { display: flex; align-items: center; gap: 18px; justify-content: flex-end; margin-top: 26px; }
.api-link { color: var(--ink); font-weight: 750; }
.notice { border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; font-weight: 700; }
.notice.success { background: #dff7e9; color: var(--success); }
.notice.error { background: #fee4e2; color: var(--danger); }
form { margin: 0; }
@media (max-width: 680px) {
    .grid { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; }
    .card { padding: 20px; border-radius: 18px; }
    .actions { align-items: stretch; flex-direction: column; }
}
