:root {
  color-scheme: light;
  --page: #f3f6f8;
  --surface: #fff;
  --text: #192a37;
  --muted: #536675;
  --accent: #0870ae;
  --accent-hover: #0869a1;
  --accent-soft: #e1f0fa;
  --line: #d5dfe6;
  --focus: #0674ba;
  --radius: 16px;
  --app-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: var(--page);
  color: var(--text);
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --page: #17212b; --surface: #202e3b; --text: #f2f6fa; --muted: #a8bac9; --accent: #67b8ed; --accent-hover: #8bcaf3; --accent-soft: #253e51; --line: #364957; --focus: #81c7f6; }
}
:root[data-theme="dark"] { color-scheme: dark; --page: #17212b; --surface: #202e3b; --text: #f2f6fa; --muted: #a8bac9; --accent: #67b8ed; --accent-hover: #8bcaf3; --accent-soft: #253e51; --line: #364957; --focus: #81c7f6; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-underline-offset: 4px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
::selection { background: var(--accent); color: var(--page); }
html { scrollbar-color: var(--muted) var(--page); scrollbar-width: thin; scroll-padding-bottom: calc(100px + var(--app-safe-bottom)); }
.app-shell { max-width: 520px; min-height: 100dvh; padding: 0 22px calc(110px + var(--app-safe-bottom)); margin: 0 auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; padding-top: max(16px, env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px)); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--accent); background: var(--accent-soft); border-radius: 11px; }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--text); background: var(--surface); }
.theme-toggle:hover { background: var(--accent-soft); }
.home-screen { margin: 0 0 8px; }
.home-screen-button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; text-align: left; }
.home-screen-button svg { width: 20px; height: 20px; }
.home-screen-button .install-chevron { margin-left: auto; }
.home-screen-button:hover { color: var(--accent-hover); }
.home-screen-button[aria-expanded="true"] .install-chevron { transform: rotate(180deg); }
.home-screen-help { padding: 16px 0 20px; border-bottom: 1px solid var(--line); }
.install-intro { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.install-devices { display: flex; gap: 6px; margin-bottom: 16px; }
.install-devices button { flex: 1; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; }
.install-devices button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.install-devices button:hover { background: var(--accent-soft); }
.home-screen-help ol { padding-left: 22px; margin: 12px 0 8px; font-size: 14px; line-height: 1.6; }
.home-screen-help li + li { margin-top: 8px; }
.home-screen-help .text-button { width: 100%; text-align: left; }
.home-screen-help label { display: block; margin: 12px 0 8px; font-size: 14px; }
.home-screen-help input { width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; }
#install-status:empty { display: none; }
.theme-sun { display: none; }
.is-dark .theme-sun { display: block; }
.is-dark .theme-moon { display: none; }
.app-page { padding: 8px 0; }
.hero-visual { margin: 0 0 24px; }
.hero-visual img { display: block; width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; border-radius: 14px; }
.hero-visual figcaption { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.service-location { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--text); margin: 20px 0 0; }
.service-location svg { width: 21px; height: 21px; color: var(--accent); }
.service-location strong { font-weight: 700; white-space: nowrap; }
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -.03em; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
#hero-title { font-size: clamp(29px, 7.7vw, 38px); }
.keep-together { white-space: nowrap; }
.title-second { display: block; color: var(--accent); margin-top: 3px; }
.hero-description, .page-description { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 18px 0 24px; }
.hero-description strong { color: var(--text); font-weight: 600; }
.hero-action { margin-top: 24px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.price strong { font-size: 29px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.price span { font-size: 16px; }
.primary-button, .secondary-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 15px 18px; border: 0; border-radius: 12px; font-size: 16px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; }
.primary-button { background: var(--accent); color: var(--surface); transition: background-color 160ms ease; }
.primary-button:hover { background: var(--accent-hover); }
.hero-action .primary-button { justify-content: space-between; }
.secondary-button { background: var(--surface); color: var(--accent); }
.secondary-button:hover { background: var(--accent-soft); }
.primary-button svg { width: 21px; height: 21px; }
.action-hint, .field-hint, .catalog-status { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 12px 0 0; }
.bottom-nav { position: fixed; z-index: 10; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 16px calc(8px + var(--app-safe-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 60px; padding: 9px 4px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 12px; line-height: 1.2; font-weight: 500; }
.bottom-nav a[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.bottom-nav a:active { background: var(--accent-soft); }
label { display: block; font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
input, select { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); caret-color: var(--accent); font-size: 16px; }
input::placeholder { color: var(--muted); opacity: 1; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 14px; top: 14px; color: var(--muted); width: 21px; height: 21px; pointer-events: none; }
.search-field input { padding-left: 44px; }
.catalog-status { margin: 18px 0 10px; }
.model-list { list-style: none; padding: 0; margin: 0; }
.model-list li { border-bottom: 1px solid var(--line); }
.model-option { display: block; width: 100%; padding: 16px 2px; background: transparent; border: 0; color: var(--text); text-align: left; }
.model-option strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.model-option span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 5px; overflow-wrap: anywhere; }
.model-option:hover { background: var(--accent-soft); }
#show-more { margin-top: 18px; }
.selected-device { padding: 20px 0 8px; }
.selected-label { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; }
.selected-label svg { width: 18px; height: 18px; }
h2 { margin: 14px 0 10px; font-size: 25px; line-height: 1.2; letter-spacing: -.025em; font-weight: 650; overflow-wrap: anywhere; }
.device-os { color: var(--accent); font-size: 14px; }
#compatibility-note, details p { font-size: 14px; line-height: 1.55; }
.selected-device .primary-button { margin-top: 24px; }
.text-button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 0; border: 0; color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
details { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
summary { cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.5; }
details p { color: var(--muted); overflow-wrap: anywhere; }
details a { color: var(--accent); }
.manual-device { margin-top: 8px; padding: 0; border: 0; }
.manual-device summary { min-height: 44px; padding: 12px 0; color: var(--accent); }
.manual-device .secondary-button { margin-top: 18px; }
.home-comparison { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.home-comparison h2 { margin: 0; }
.comparison-description { margin: 14px 0 20px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.comparison-figure { margin: 0; }
.comparison-visual { --comparison-position: 50%; position: relative; overflow: hidden; aspect-ratio: 1024 / 704; border-radius: 14px; background: #17212b; isolation: isolate; }
.comparison-layer { position: absolute; inset: 0; overflow: hidden; }
.comparison-layer img { display: block; width: 100%; height: auto; max-width: none; user-select: none; pointer-events: none; }
/* Two aligned crops from the same demonstration image; both TV frames start at y=24. */
.comparison-layer-before img { transform: translateY(-4.166667%); }
.comparison-layer-after img { transform: translateY(-52.018229%); }
.comparison-layer-before { clip-path: inset(0 calc(100% - var(--comparison-position)) 0 0); }
.comparison-label { position: absolute; top: 12px; padding: 6px 10px; border-radius: 12px; background: #17212b; color: #fff; font-size: 16px; font-weight: 650; line-height: 1.25; }
.comparison-label-before { left: 12px; }
.comparison-label-after { right: 12px; }
.comparison-divider { position: absolute; top: 0; bottom: 0; left: var(--comparison-position); width: 2px; transform: translateX(-50%); background: #fff; pointer-events: none; }
.comparison-handle { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; color: #17212b; }
.comparison-range { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.comparison-visual:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.comparison-hint { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.comparison-figure figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.comparison-figure figcaption strong { color: var(--text); font-weight: 600; }
.home-contacts { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.home-contacts h2 { margin: 0; }
.home-contacts .page-description { margin: 14px 0 0; }
.contact-actions { display: grid; gap: 12px; margin-top: 28px; }
.contact-actions a { justify-content: flex-start; }
.contact-actions .trailing-icon { margin-left: auto; }
.contact-actions small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
[hidden] { display: none !important; }
@media (max-width: 340px) { .app-shell { padding-left: 18px; padding-right: 18px; } .primary-button { font-size: 15px; padding-left: 14px; padding-right: 14px; } }
@media (prefers-reduced-motion: no-preference) {
  .bottom-nav a { transition: background-color 160ms ease, color 160ms ease; }
  .app-page.page-enter { animation: page-in 200ms cubic-bezier(.16, 1, .3, 1); }
  @keyframes page-in { from { transform: translateY(5px); } to { transform: translateY(0); } }
}
