@font-face {
  font-family: "UKIJ Ekran";
  src: url("font/ukij-ekran.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "UKIJ Tuz Tom";
  src: url("font/ukij-tuz-tom.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --pink: #f32e91;
  --gradient: linear-gradient(105deg, #f33b7b, #eb2f96 25%, #f53e74 50%, #eb2f96);
  font-family: "UKIJ Ekran", sans-serif;
  color: #242124;
  background: #f3f3f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #913264;
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

img {
  max-inline-size: 100%;
  block-size: auto;
}

[hidden] {
  display: none !important;
}

[data-embedded-only] {
  display: none !important;
}

html[data-browser="embedded"] [data-embedded-only] {
  display: revert !important;
}

.desktop-nav,
.desktop-app-heading,
.desktop-guide,
.desktop-download-icon {
  display: none;
}

bdi {
  font-family: Arial, sans-serif;
}

/* 独立样式仅用于 TV 下载页，容器单位使移动端与设计稿保持相同比例。 */
.tv-page {
  container-type: inline-size;
  inline-size: 100%;
  max-inline-size: 520px;
  margin-inline: auto;
  background: repeating-linear-gradient(116deg, transparent 0 9px, #ffdcec 9px 10px), #fff;
  overflow: clip;
}

.tv-header {
  display: flex;
  align-items: center;
  gap: 2.8cqw;
  min-block-size: 22cqw;
  padding: 3.4cqw 3cqw;
  background: var(--gradient);
  color: #fff;
}

.brand {
  flex: 0 0 13cqw;
  line-height: 0;
}

.brand img {
  display: block;
  inline-size: 13cqw;
  border-radius: 3cqw;
  box-shadow: 0 2px 9px #b21c6845;
}

.tv-header p {
  flex: 1;
  margin: 0;
  font-size: 3.35cqw;
  line-height: 1.75;
  text-align: justify;
}

.download-button {
  border: 0;
  border-radius: 2.5cqw;
}

.header-download {
  flex: 0 0 31.5cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1cqw;
  min-block-size: 9.2cqw;
  padding: 1cqw;
  color: var(--pink);
  background: #fff0f6;
  font-size: 3.15cqw;
  white-space: nowrap;
}

.header-download svg {
  inline-size: 5.5cqw;
  block-size: 5.5cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.television {
  display: block;
  inline-size: 84%;
  margin-inline: auto;
}

.tv-hero {
  padding-block-start: 1cqw;
}

.tv-hero .television {
  inline-size: 80.5%;
}

.features {
  margin: 2.4cqw 3cqw 4cqw;
  font-size: 3.18cqw;
  line-height: 1.8;
  text-align: center;
}

.tutorial {
  margin-inline: 5.7cqw;
}

.tutorial h1 {
  margin: 0 0 2cqw;
  text-align: center;
  font-family: "UKIJ Tuz Tom", "UKIJ Ekran", sans-serif;
  font-size: 3.25cqw;
  line-height: 1.8;
  font-weight: normal;
}

.video-frame {
  position: relative;
  aspect-ratio: 2;
  border-radius: 2.5cqw;
  overflow: hidden;
  background: #21151b;
  scroll-margin-block: 20px;
}

.video-poster {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  border: 0;
  padding: 0;
  background: #ad3658;
}

.video-poster img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transform: scale(1.12);
  filter: blur(8px) brightness(.85);
}

.play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  inline-size: 10cqw;
  block-size: 10cqw;
  border-radius: .7cqw;
  background: #fff;
  box-shadow: 0 1px 6px #0001;
}

.play-icon svg {
  inline-size: 7cqw;
  block-size: 7cqw;
  fill: #80604f;
}

.video-frame video {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  background: #000;
}

.video-retry {
  position: absolute;
  inset: 0;
  margin: auto;
  inline-size: max-content;
  block-size: max-content;
  border: 0;
  padding: 10px 20px;
  border-radius: 8px;
  background: #fff;
  color: #a32261;
}

.tutorial-status,
.download-status {
  margin: 2cqw 0 0;
  color: #a32261;
  font-size: 3cqw;
  line-height: 1.7;
  text-align: center;
}

.brands {
  margin: 4.4cqw 5.7cqw 3.5cqw;
  border: 1px solid #ffd1e6;
  border-radius: 2.5cqw;
  overflow: hidden;
  background: #fdeaf3;
}

.brands h2 {
  margin: 0;
  padding: 3.7cqw 2cqw;
  font-family: "UKIJ Tuz Tom", "UKIJ Ekran", sans-serif;
  font-size: 3.1cqw;
  font-weight: normal;
  text-align: center;
  line-height: 1.8;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.brand-grid button {
  min-block-size: 10.8cqw;
  border: 0;
  border-block-start: 1px solid #ffd4e8;
  color: var(--pink);
  background: transparent;
  font-size: 3.45cqw;
  transition: background .15s, color .15s;
}

.brand-grid button:hover {
  background: #ffdaeb;
}

.brand-grid button[aria-pressed="true"] {
  color: #fff;
  background: var(--gradient);
}

/* 保留原文连字与词组，不使用字母间距或强制逐字换行。 */
.body-copy {
  margin: 0 5.7cqw;
  font-size: 3.18cqw;
  line-height: 1.8;
  text-align: justify;
  overflow-wrap: break-word;
}

.membership-gift {
  display: block;
  inline-size: 80%;
  margin: 4cqw auto 5cqw;
}

.gift-caption {
  margin: 0 5cqw 4.5cqw;
  text-align: center;
  font-size: 3.15cqw;
  line-height: 1.8;
  color: var(--pink);
}

.main-download {
  display: block;
  inline-size: 80.5%;
  min-block-size: 9.5cqw;
  margin-inline: auto;
  padding: 1cqw 3cqw;
  color: #fff;
  background: var(--gradient);
  font-size: 3.65cqw;
}

.copy-icon {
  inline-size: 5.5cqw;
  block-size: 5.5cqw;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-copy {
  direction: ltr;
  align-items: center;
  flex-basis: 100%;
  min-inline-size: 0;
  min-block-size: 11cqw;
  padding: 0 3cqw 0 0;
  border: 1px solid #ffb8d6;
  border-radius: 2.4cqw;
  color: #fff;
  background: transparent;
  text-align: left;
}

.header-copy bdi {
  flex: 1;
  min-inline-size: 0;
  font-size: 4.3cqw;
  font-weight: 400;
  line-height: 1.5;
  padding: 1cqw 2.4cqw;
  overflow-wrap: anywhere;
}

.website-icon {
  display: grid;
  place-items: center;
  align-self: stretch;
  inline-size: 12cqw;
  border-right: 1px solid #ffb8d6;
}

.website-icon svg {
  inline-size: 6cqw;
  block-size: 6cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.quick-guide {
  counter-reset: install;
  margin: 2.2cqw 4cqw 3cqw;
  padding: 0;
  list-style: none;
  color: var(--pink);
  font-size: 2.7cqw;
  line-height: 1.9;
}

.quick-guide li {
  counter-increment: install;
  display: flex;
  gap: 1.5cqw;
  align-items: baseline;
  margin-block: .8cqw;
}

.quick-guide li::before {
  content: counter(install);
  display: grid;
  place-items: center;
  flex: 0 0 4.6cqw;
  block-size: 4.6cqw;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  font: 3cqw/1 Arial, sans-serif;
}

.shared-phone {
  padding: 0 22cqw 4cqw;
}

.shared-phone img {
  display: block;
  inline-size: 100%;
}

html[data-browser="embedded"] .tv-header {
  flex-wrap: wrap;
  padding: 4cqw;
  gap: 2.8cqw;
}

html[data-browser="embedded"] .tv-header p {
  font-size: 3.5cqw;
}

html[data-browser="embedded"] .header-download,
html[data-browser="embedded"] .features {
  display: none;
}

html[data-browser="embedded"] .header-copy {
  display: flex !important;
}

html[data-browser="embedded"] .tv-hero {
  padding-block-start: 0;
  padding-block-end: 1.8cqw;
}

html[data-browser="embedded"] .main-download {
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  font-family: Arial, sans-serif;
  font-size: 4cqw;
  font-weight: 400;
}

html[data-browser="embedded"] #main-action-label {
  min-inline-size: 0;
  text-align: left;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

html[data-browser="embedded"] .main-download .copy-icon {
  display: block !important;
}

.download-status {
  margin-inline: 6cqw;
}

.usb-guide {
  margin-block-start: 3.2cqw;
  padding-block-end: max(8cqw, env(safe-area-inset-bottom));
}

.usb-guide .body-copy {
  margin-inline: 9.5cqw;
  font-size: 3.64cqw;
  line-height: 1.65;
}

.bottom-television {
  margin-block-start: 3.5cqw;
}

.browser-guide {
  inline-size: min(90vw, 400px);
  border: 0;
  border-radius: 20px;
  padding: 24px;
  color: #282126;
  background: #fff;
  font-family: "UKIJ Ekran", sans-serif;
}

.browser-guide::backdrop {
  background: #0009;
}

.browser-guide-content {
  position: relative;
  text-align: center;
}

.browser-guide h2 {
  font-size: 22px;
  font-weight: normal;
}

.browser-guide p {
  font-size: 17px;
  line-height: 1.9;
}

.browser-guide button {
  inline-size: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-size: 18px;
}

.browser-guide input {
  inline-size: 100%;
  margin-block-end: 18px;
  padding: 12px;
  border: 1px solid #f3a3c9;
  border-radius: 8px;
  color: #282126;
  background: #fff5fa;
  font: 14px Arial, sans-serif;
}

.copy-toast {
  position: fixed;
  z-index: 10;
  inset-block-end: max(24px, env(safe-area-inset-bottom));
  inset-inline: 20px;
  inline-size: fit-content;
  max-inline-size: calc(100% - 40px);
  margin-inline: auto;
  border-radius: 10px;
  padding: 12px 22px;
  background: #33252fef;
  color: #fff;
  font-size: 17px;
  text-align: center;
  pointer-events: none;
}

@media (min-width: 800px) {
  :root {
    background: #fff;
  }

  .tv-page {
    max-inline-size: none;
    background: #fff;
  }

  .tv-header {
    min-block-size: 88px;
    gap: 24px;
    padding: 14px max(32px, calc((100% - 1200px) / 2));
  }

  .brand {
    flex-basis: 60px;
  }

  .brand img {
    inline-size: 60px;
    border-radius: 12px;
  }

  .tv-header p {
    font-size: 20px;
    line-height: 1.6;
    text-align: start;
  }

  .download-button {
    border-radius: 8px;
  }

  .header-download {
    flex-basis: 190px;
    gap: 8px;
    min-block-size: 48px;
    padding: 8px 16px;
    font-size: 17px;
  }

  .header-download svg {
    inline-size: 23px;
    block-size: 23px;
  }

  main {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
    gap: 0 36px;
    max-inline-size: 1264px;
    margin-inline: auto;
    padding-inline: 32px;
  }

  .tv-hero {
    grid-column: 1 / -1;
    padding-block: 24px 20px;
  }

  .tv-hero .television {
    inline-size: min(100%, 720px);
  }

  .features {
    margin: 12px 0 0;
    font-size: 19px;
    line-height: 1.7;
  }

  .tutorial {
    grid-column: 1;
    margin: 0;
  }

  .tutorial h1,
  .brands h2 {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.6;
  }

  .video-frame {
    aspect-ratio: 2;
    border-radius: 8px;
  }

  .play-icon {
    inline-size: 56px;
    block-size: 56px;
    border-radius: 5px;
  }

  .play-icon svg {
    inline-size: 40px;
    block-size: 40px;
  }

  .tutorial-status,
  .download-status {
    margin-block-start: 12px;
    font-size: 16px;
  }

  .brands {
    grid-column: 2;
    align-self: start;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .brands h2 {
    padding: 0;
  }

  .brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: #ffd4e8;
    border: 1px solid #ffd4e8;
  }

  .brand-grid button {
    min-block-size: 64px;
    padding: 4px;
    background: #fff5fa;
    font-size: 18px;
  }

  .body-copy {
    margin: 0;
    font-size: 17px;
    line-height: 1.9;
  }

  .membership {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    align-items: center;
    column-gap: 56px;
    margin-block-start: 72px;
    padding-block: 50px;
    border-block: 1px solid #f4d7e4;
  }

  .membership .body-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .membership-gift {
    grid-column: 2;
    grid-row: 1 / 4;
    inline-size: 100%;
    max-inline-size: 560px;
    margin: 0 auto;
  }

  .gift-caption {
    grid-column: 1;
    grid-row: 2;
    margin: 18px 0;
    font-size: 18px;
    line-height: 1.7;
  }

  .main-download {
    grid-column: 1;
    grid-row: 3;
    inline-size: min(100%, 360px);
    min-block-size: 52px;
    margin-inline: auto;
    padding: 8px 20px;
    font-size: 20px;
  }

  .membership .download-status {
    grid-column: 1;
    grid-row: 4;
    margin-inline: 0;
  }

  .usb-guide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    margin: 0;
    padding-block: 48px 80px;
  }

  .usb-guide .body-copy {
    margin: 0;
    font-size: 19px;
    line-height: 1.9;
  }

  .bottom-television {
    display: none;
  }

  html[data-browser="embedded"] .tv-header {
    gap: 20px;
    padding: 14px max(32px, calc((100% - 1200px) / 2));
  }

  html[data-browser="embedded"] .tv-header p {
    font-size: 20px;
  }

  html[data-browser="embedded"] .header-copy {
    flex-basis: 100%;
    min-block-size: 52px;
    padding: 0 12px 0 0;
    border-radius: 8px;
  }

  html[data-browser="embedded"] .header-copy bdi {
    font-size: 17px;
    padding: 8px 12px;
  }

  html[data-browser="embedded"] .website-icon {
    inline-size: 52px;
  }

  html[data-browser="embedded"] .website-icon svg,
  .copy-icon {
    inline-size: 24px;
    block-size: 24px;
  }

  html[data-browser="embedded"] .main-download {
    gap: 12px;
    font-size: 18px;
  }

  .quick-guide {
    grid-column: 1 / -1;
    margin: 24px 0 0;
    font-size: 17px;
  }

  .quick-guide li {
    gap: 10px;
    margin-block: 8px;
  }

  .quick-guide li::before {
    flex-basis: 28px;
    block-size: 28px;
    font-size: 17px;
  }

  .shared-phone {
    max-inline-size: 1200px;
    margin-inline: auto;
    padding: 0 32px 48px;
  }

  .shared-phone img {
    max-inline-size: 480px;
    margin-inline: auto;
  }
}

@media (min-width: 1200px) {
  .tv-page {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    overflow: visible;
  }

  .tv-header {
    display: none;
  }

  .desktop-nav {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-self: start;
    flex-direction: column;
    align-items: center;
    gap: 42px;
    margin: 42px 14px 0 0;
    padding: 22px 8px 32px;
    border-radius: 70px;
    background: #fde9f4;
  }

  .desktop-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    color: #1e1b1e;
    text-decoration: none;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
  }

  .desktop-nav a[aria-current="page"] {
    color: var(--pink);
  }

  .desktop-nav a:hover {
    color: #c51370;
  }

  .desktop-nav-logo img {
    display: block;
    inline-size: 72px;
    block-size: 72px;
    border-radius: 50%;
  }

  .desktop-nav svg {
    inline-size: 42px;
    block-size: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  main {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(340px, .9fr) minmax(0, 2.2fr);
    align-items: start;
    gap: 0 42px;
    max-inline-size: none;
    padding: 42px clamp(28px, 3vw, 58px) 80px;
  }

  .tv-hero {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding: 0;
  }

  .tv-hero .television {
    inline-size: 100%;
    aspect-ratio: 1110 / 625;
    border: 9px solid #f8e7f0;
    border-radius: 10px;
    object-fit: cover;
  }

  .features {
    display: none;
  }

  .membership {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .desktop-app-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .desktop-app-heading img {
    inline-size: 120px;
    block-size: 120px;
    border-radius: 28px;
  }

  .desktop-app-heading h2 {
    margin: 16px 0 8px;
    font-family: "UKIJ Tuz Tom", "UKIJ Ekran", sans-serif;
    font-size: 27px;
    line-height: 1.4;
    font-weight: normal;
  }

  .membership .body-copy {
    font-size: 14px;
    line-height: 1.75;
    text-align: justify;
  }

  .membership-gift,
  .gift-caption {
    display: none;
  }

  .main-download {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    inline-size: 100%;
    min-block-size: 62px;
    margin: 24px 0 0;
    font-size: 21px;
  }

  .desktop-download-icon {
    display: block;
    inline-size: 26px;
    block-size: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .desktop-guide {
    display: grid;
    gap: 7px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    color: var(--pink);
    font-size: 12px;
    line-height: 1.55;
  }

  .desktop-guide li {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }

  .desktop-guide li::before {
    content: counter(step);
    counter-increment: step;
    flex: 0 0 21px;
    block-size: 21px;
    border-radius: 50%;
    color: #fff;
    background: var(--pink);
    text-align: center;
    font: 13px/21px Arial, sans-serif;
  }

  .desktop-guide {
    counter-reset: step;
  }

  .quick-guide {
    display: none !important;
  }

  html[data-browser="embedded"] .quick-guide {
    display: none !important;
  }

  .usb-guide {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr);
    margin-block-start: 36px;
    padding-block: 28px 0;
    border-block-start: 1px solid #f1dde6;
  }

  .usb-guide .body-copy {
    max-inline-size: 960px;
    margin-inline: auto;
    font-size: 16px;
    line-height: 1.9;
  }

  /* 教程集中在首屏下方，品牌入口与视频顶部对齐。 */
  .tutorial,
  .brands {
    margin-block-start: 48px;
    padding-block-start: 28px;
    border-block-start: 1px solid #f1dde6;
  }

  .tutorial {
    grid-column: 2;
    grid-row: 2;
  }

  .video-poster img {
    transform: none;
    filter: brightness(.72);
  }

  .brands {
    grid-column: 1;
    grid-row: 2;
  }

  html[data-browser="embedded"] .main-download {
    justify-content: space-between;
    font-size: 15px;
  }

  html[data-browser="embedded"] .main-download .desktop-download-icon {
    display: none;
  }

  .shared-phone {
    grid-column: 2;
  }
}

/* 品牌教程使用原生弹窗，移动端可滚动，桌面端保留现有主页面布局。 */
.brand-guide { inline-size: min(92vw, 680px); max-block-size: 88dvh; padding: 24px; border: 0; border-radius: 18px; color: #242124; background: #fff; overflow: auto; }
.brand-guide::backdrop { background: #0009; }
.brand-guide-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-guide-heading h2 { margin: 0; font-size: 21px; line-height: 1.7; font-weight: normal; }
.brand-guide-heading button { flex: 0 0 44px; block-size: 44px; border: 0; border-radius: 50%; font: 28px Arial, sans-serif; color: #a32260; background: #fdeaf3; }
.install-diagram { display: block; inline-size: 100%; block-size: auto; margin-block: 20px; padding: 10px; border-radius: 12px; color: #eb2f96; background: #fff4f8; }
#brand-guide-note { margin: 0 0 20px; font-size: 14px; line-height: 1.9; color: #666; }
#brand-guide-steps { display: grid; gap: 16px; list-style: none; counter-reset: guide; padding: 0; margin: 0; }
#brand-guide-steps li { counter-increment: guide; position: relative; padding: 16px 58px 16px 16px; border: 1px solid #f5dce8; border-radius: 12px; }
#brand-guide-steps li::before { content: counter(guide); position: absolute; inset-inline-start: 14px; inset-block-start: 17px; display: grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%; color: #fff; background: #eb2f96; font: 16px Arial, sans-serif; }
#brand-guide-steps h3 { margin: 0 0 6px; font-size: 18px; font-weight: normal; }
#brand-guide-steps p { margin: 0; font-size: 16px; line-height: 1.9; overflow-wrap: break-word; }
@media (max-width: 480px) { .brand-guide { padding: 16px; } .brand-guide-heading h2 { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
