@font-face {
  font-family: Manrope;
  src: url("/assets/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #faf8f9;
  --surface: #fefefe;
  --ink: #0e1635;
  --muted: #515c79;
  --blue: #163cf1;
  --blue-hover: #0f2cd1;
  --line: #c9cee1;
  --line-soft: #dfe1eb;
  --error: #ad203d;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 550;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }
.shell { width: min(calc(100% - 80px), 1310px); margin-inline: auto; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
a { color: inherit; }
:focus-visible { outline: 3px solid #6078ff; outline-offset: 4px; }
svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.site-header, .site-footer { margin-inline: clamp(16px, 2.3vw, 34px); }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .shell, .site-footer .shell { width: min(calc(100% - 28px), 1290px); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.header-inner { min-height: 66px; }
.header-actions { display: flex; align-items: center; gap: clamp(12px, 2vw, 27px); }
.footer-inner { min-height: 55px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 34px; letter-spacing: -.055em; font-weight: 800; text-decoration: none; }
.brand img { display: block; }
.brand-small { font-size: 21px; gap: 8px; }
.text-button { border: 0; padding: 7px 0; background: none; color: var(--blue); font-weight: 750; font-size: 17px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-inner .text-button { color: var(--muted); font-size: 13px; font-weight: 650; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 38%); gap: 26px; align-items: center; min-height: 306px; padding: 36px 28px 27px; }
.hero h1 { margin: 0; font-size: clamp(38px, 4.82vw, 72px); letter-spacing: -.055em; line-height: 1; font-weight: 800; }
.hero h1 span { display: block; color: var(--blue); }
.hero p { margin: 18px 0 0; color: #343e5c; font-size: clamp(16px, 1.51vw, 22px); letter-spacing: -.025em; line-height: 1.45; }
.hero-art { display: block; width: 100%; max-width: 470px; height: auto; justify-self: end; }
.input-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 0 27px 25px; }
.mode-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line-soft); }
.mode-tabs button { position: relative; padding: 16px 17px 17px; border: 0; background: transparent; font-size: 20px; font-weight: 800; letter-spacing: -.025em; color: var(--muted); }
.mode-tabs button[aria-pressed="true"] { color: var(--blue); }
.mode-tabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; border-radius: 2px; background: var(--blue); }
.mode-tabs button:hover { color: var(--blue-hover); }
#lookup > label { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.03em; margin: 16px 0 10px; }
.lookup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 13px; }
.input-wrap { display: flex; align-items: center; gap: 14px; min-height: 49px; padding: 0 17px; border: 1px solid #b9c0d9; border-radius: 9px; color: var(--muted); }
.input-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #173cf119; }
.input-wrap:has([aria-invalid="true"]) { border-color: var(--error); }
.input-wrap input { width: 100%; min-width: 0; padding: 12px 0; border: 0; background: transparent; color: var(--ink); outline: none; font-size: 17px; }
.input-wrap input::placeholder { color: var(--muted); opacity: 1; }
.button { display: inline-flex; min-height: 49px; justify-content: center; align-items: center; gap: 11px; padding: 10px 23px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; white-space: nowrap; font-weight: 800; font-size: 17px; letter-spacing: -.025em; transition: background-color .16s, border-color .16s; }
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--blue-hover); }
.button-secondary { background: var(--surface); border-color: #b9c0d9; color: var(--ink); }
.button-secondary:hover:not(:disabled) { background: #f0f3ff; border-color: #8e9bc8; }
.feedback { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.feedback.error { color: var(--error); }
.results { margin-top: 22px; }
.results-title h2 { margin: 0; font-size: clamp(25px, 2.55vw, 35px); line-height: 1.25; font-weight: 800; letter-spacing: -.05em; }
.results-title p { margin: 5px 0 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.results-title p:empty { display: none; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0 4px; }
.selection { display: flex; align-items: center; gap: 14px; color: var(--ink); font-size: 16px; }
input[type="checkbox"] { margin: 0; width: 23px; height: 23px; accent-color: var(--blue); cursor: pointer; flex: none; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select { appearance: none; color: var(--ink); width: 199px; padding: 10px 36px 10px 14px; border: 1px solid #b9c0d9; border-radius: 9px; background: var(--surface); font-size: 16px; min-height: 46px; }
.select-wrap svg { position: absolute; right: 12px; width: 20px; pointer-events: none; color: var(--muted); }
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.entry:last-child { border-bottom: 0; }
.entry label { display: grid; grid-template-columns: 40px clamp(105px, 13vw, 184px) minmax(0, 1fr); align-items: center; gap: 16px; padding: 9px 0; cursor: pointer; }
.entry.single label { grid-template-columns: clamp(105px, 13vw, 184px) minmax(0, 1fr); }
.entry.unavailable label { opacity: .65; cursor: default; }
.entry .thumb { display: block; position: relative; width: 100%; aspect-ratio: 2.23; overflow: hidden; border-radius: 9px; background: #e7eafa; }
.entry .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry .duration { position: absolute; bottom: 4px; right: 5px; padding: 2px 6px; font-size: 12px; font-weight: 800; color: #fff; background: #101629e8; border-radius: 4px; }
.entry .entry-title { display: block; margin: 0; font-size: clamp(15px, 1.52vw, 21px); font-weight: 800; line-height: 1.3; letter-spacing: -.033em; overflow-wrap: anywhere; }
.entry .entry-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.entry-download { min-height: 42px; width: 42px; padding: 0; color: var(--blue); }
.entry-download svg { width: 20px; height: 20px; }
.job { display: flex; gap: 18px; justify-content: space-between; align-items: center; margin-top: 22px; background: #eef1ff; border: 1px solid #d5dcff; border-radius: 12px; padding: 18px 22px; }
.job h2, .empty h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.035em; }
.job p, .empty p { margin: 4px 0 0; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.5; }
.job progress { width: min(370px, 100%); height: 8px; accent-color: var(--blue); }
.job details { margin-top: 9px; font-size: 14px; }
.job details ul { max-height: 180px; overflow-y: auto; margin: 8px 0 0; padding-left: 22px; }
.empty { display: flex; align-items: center; gap: 17px; padding: 26px 3px; margin-top: 20px; }
.empty-icon { display: grid; place-items: center; width: 49px; height: 49px; background: #e9edff; border-radius: 10px; color: var(--blue); flex: none; }
.empty-icon svg { width: 23px; height: 23px; }
dialog { width: min(550px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 15px; padding: 24px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #111c48a0; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dialog-head h2 { margin: 0; font-size: 24px; letter-spacing: -.045em; font-weight: 800; }
.dialog-head button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; }
.dialog-head button:hover { background: #eef1ff; }
dialog li, dialog p { line-height: 1.5; }
dialog li { margin-bottom: 7px; }
dialog ol { padding-left: 23px; }
dialog p { color: var(--muted); font-size: 14px; }
.channel-input { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.channel-input input { flex: 1 1 175px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
#telegram-bot { color: var(--blue); }
#telegram-bound { margin-bottom: 0; font-weight: 800; color: var(--ink); }
.telegram-confirm { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.telegram-confirm p:first-child { font-weight: 800; color: var(--ink); }
.sr-only { width: 1px; height: 1px; position: absolute; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1050px) {
  .shell { width: calc(100% - 54px); }
  .hero { padding-inline: 12px; min-height: 260px; gap: 16px; }
  .input-panel { padding-inline: 19px; }
  .entry label { grid-template-columns: 27px clamp(105px, 14vw, 155px) minmax(0, 1fr); gap: 13px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 32px); }
  .site-header .shell, .site-footer .shell { width: 100%; }
  .header-inner { min-height: 59px; }
  .brand { font-size: 27px; gap: 8px; }
  .brand img { width: 40px; height: auto; }
  .brand-small { font-size: 18px; }
  .brand-small img { width: 28px; }
  .text-button { font-size: 13px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 25px 0 14px; gap: 9px; }
  .hero h1 { font-size: clamp(30px, 8.5vw, 45px); }
  .hero p { margin-top: 12px; max-width: 390px; font-size: 15px; }
  .hero-art { width: min(57%, 280px); justify-self: end; }
  .input-panel { padding-inline: 12px; padding-bottom: 13px; border-radius: 12px; }
  .mode-tabs button { font-size: 16px; padding: 11px 13px 12px; }
  #lookup > label { font-size: 15px; margin: 11px 0 8px; }
  .lookup-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
  .input-wrap { grid-column: 1 / -1; padding-inline: 10px; gap: 7px; }
  .input-wrap svg { width: 19px; height: 19px; }
  .input-wrap input { font-size: 16px; }
  .button { min-height: 44px; padding: 9px 12px; font-size: 14px; gap: 7px; }
  .button svg { width: 18px; height: 18px; }
  .toolbar { flex-wrap: wrap; }
  .selection { font-size: 14px; gap: 10px; }
  .toolbar-actions { margin: 0; }
  #telegram-publish { width: 100%; }
  .select-wrap select { width: 146px; min-height: 42px; padding-left: 9px; font-size: 13px; }
  input[type="checkbox"] { width: 21px; height: 21px; }
  .entry label { grid-template-columns: 21px 88px minmax(0, 1fr); gap: 9px; }
  .entry.single label { grid-template-columns: 100px minmax(0, 1fr); }
  .entry .thumb { aspect-ratio: 1.75; border-radius: 6px; }
  .entry .duration { font-size: 10px; right: 2px; bottom: 2px; padding: 1px 4px; }
  .entry .entry-meta { font-size: 12px; }
  .entry-download { width: 38px; min-height: 40px; padding: 0; }
  .empty { margin-top: 11px; padding: 14px 0; gap: 10px; }
  .empty-icon { width: 37px; height: 37px; }
  .empty h2 { font-size: 16px; }
  .empty p { font-size: 13px; }
  .job { align-items: flex-start; flex-direction: column; padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
