:root {
  --page-bg: #ffffff;
  --pale-bg: #eef5ff;
  --soft-bg: #f6f8fc;
  --card-bg: #ffffff;
  --ink: #1d2430;
  --muted: #6f7f94;
  --faint: #9ba8ba;
  --line: #d9e1ec;
  --line-strong: #bed0e5;
  --brand: #1f74ff;
  --brand-strong: #0f5fe8;
  --brand-soft: #e8f1ff;
  --eye-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --eye-off-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.9 5.1A9.8 9.8 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-3 3.9M6.1 6.1A17 17 0 0 0 2 12s3.5 7 10 7a9.8 9.8 0 0 0 4.1-.9'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3Cline x1='2' y1='2' x2='22' y2='22'/%3E%3C/svg%3E");
  --success: #02a37a;
  --danger: #d84242;
  --shadow: 0 22px 70px rgba(28, 48, 78, 0.12);
  --radius: 8px;
  --radius-lg: 24px;
  --header-height: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body[data-theme="dark"] {
  --page-bg: #0f1723;
  --pale-bg: #162235;
  --soft-bg: #101a2a;
  --card-bg: #172235;
  --ink: #eef5ff;
  --muted: #b0c0d6;
  --faint: #7f90a8;
  --line: #2c3b52;
  --line-strong: #3e5472;
  --brand-soft: #183153;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  color: var(--ink);
  background: var(--page-bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  border-bottom: 1px solid rgba(217, 225, 236, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

body[data-theme="dark"] .site-header {
  background: rgba(15, 23, 35, 0.88);
}

.nav-shell {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 152px;
  min-width: 152px;
  text-decoration: none;
}

.brand-logo,
.coming-logo,
.account-logo {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: 18px;
}

.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--brand);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip-btn {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.chip-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.login-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.login-link:hover {
  background: var(--brand-strong);
}

.user-menu-shell {
  position: relative;
}

.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.user-avatar {
  color: var(--success);
  font-size: 10px;
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 172px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.user-menu[hidden] {
  display: none;
}

.user-menu-profile {
  display: grid;
  gap: 2px;
  padding: 6px 12px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.user-menu-profile strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.user-menu-mobile {
  color: var(--muted);
  font-size: 12px;
}

.user-menu-profile:empty,
.user-menu-mobile:empty {
  display: none;
}

.user-menu button,
.user-menu a {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.user-menu button:hover,
.user-menu a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nas-style-home {
  overflow: hidden;
  background: var(--page-bg);
}

.notice-bar {
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

body[data-theme="dark"] .notice-bar {
  background: #111c2c;
}

.notice-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.notice-inner a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.hero-section {
  min-height: min(780px, calc(100svh - var(--header-height)));
  padding: clamp(54px, 8vw, 96px) 0 0;
  background:
    radial-gradient(circle at 50% 86%, rgba(31, 116, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 63%, #edf5ff 63%, #edf5ff 100%);
}

body[data-theme="dark"] .hero-section {
  background:
    radial-gradient(circle at 50% 86%, rgba(31, 116, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #0f1723 0%, #0f1723 63%, #162235 63%, #162235 100%);
}

.hero-shell {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 34px;
}

.hero-copy {
  display: grid;
  justify-items: center;
}

.hero-logo {
  width: min(280px, 68vw);
  margin-bottom: 18px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  font-size: clamp(58px, 12vw, 120px);
  line-height: 0.88;
  font-weight: 800;
}

h2 {
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.08;
  font-weight: 800;
}

h3 {
  font-size: 22px;
  line-height: 1.24;
  font-weight: 800;
}

.hero-lead {
  width: min(760px, 100%);
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin-top: 26px;
}

.hero-tags span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.hero-actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms var(--ease), border-color 180ms ease, background-color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-ghost {
  color: var(--ink);
  background: var(--card-bg);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hero-device {
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  padding-bottom: 62px;
}

.monitor {
  width: min(700px, 100%);
  border: 8px solid #202733;
  border-radius: 8px;
  background: #202733;
  box-shadow: 0 32px 78px rgba(48, 79, 123, 0.22);
}

.monitor-bar {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #111722;
}

.monitor-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6f7f94;
}

.monitor-screen {
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at 72% 32%, #ffdf9a 0, #ff976d 22%, #457cff 48%, transparent 50%),
    linear-gradient(135deg, #eef6ff 0%, #f7fbff 54%, #d9eaff 100%);
}

.desktop-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.desktop-sidebar span,
.file-grid span {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(52, 78, 116, 0.12);
}

.desktop-sidebar span {
  width: 44px;
  height: 44px;
}

.desktop-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: end;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-content: end;
}

.file-grid span {
  aspect-ratio: 1.18;
}

.status-panel {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  color: #213047;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(52, 78, 116, 0.14);
  text-align: left;
}

.status-panel small {
  color: #66809f;
}

.status-lines {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.status-lines span {
  height: 9px;
  border-radius: 999px;
  background: #dce8f6;
}

.status-lines span:nth-child(2) {
  width: 72%;
}

.status-lines span:nth-child(3) {
  width: 48%;
}

.monitor-stand {
  width: 180px;
  height: 54px;
  border-bottom: 22px solid #c8d4e3;
  border-left: 36px solid transparent;
  border-right: 36px solid transparent;
}

.pale-section {
  background: var(--pale-bg);
}

.feature-section,
.media-section,
.connect-section,
.app-section,
.apps-center,
.account-section,
.download-section {
  padding: clamp(70px, 9vw, 118px) 0;
}

.section-head {
  margin-bottom: 32px;
}

.section-head.centered {
  text-align: center;
  display: grid;
  justify-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-copy {
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 18px;
  max-width: 520px;
}

.feature-board {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 18px;
}

.feature-card {
  min-height: 300px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.feature-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.wide-card {
  grid-column: span 1;
}

.folder-art {
  height: 138px;
  display: grid;
  gap: 12px;
  align-content: end;
}

.folder-art span {
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, #cfe0f6, #eff6ff);
}

.folder-art span:nth-child(2) {
  width: 78%;
}

.folder-art span:nth-child(3) {
  width: 58%;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: clamp(34px, 6vw, 84px);
  align-items: center;
}

.split-section.reverse {
  grid-template-columns: minmax(420px, 1.05fr) minmax(0, 0.95fr);
}

.poster-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.poster-wall span {
  aspect-ratio: 0.72;
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), transparent 40%),
    linear-gradient(135deg, #293b59, #0f5fe8);
  box-shadow: 0 20px 44px rgba(47, 76, 120, 0.16);
}

.poster-wall span:nth-child(2n) {
  transform: translateY(26px);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, #ffb56b, #ec6b57);
}

.poster-wall span:nth-child(3n) {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, #33b49b, #2774ff);
}

.connect-art {
  min-height: 420px;
  position: relative;
  display: grid;
  place-items: center;
}

.phone-frame {
  width: 214px;
  height: 386px;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 34px 18px;
  border: 10px solid #202733;
  border-radius: 36px;
  background: linear-gradient(180deg, #f9fbff, #dcecff);
  box-shadow: var(--shadow);
}

.phone-frame span,
.app-phone span {
  display: block;
  border-radius: 16px;
  background: #cfe0f6;
}

.phone-frame span:first-child {
  height: 112px;
  background: linear-gradient(135deg, #267cff, #6bbfff);
}

.phone-frame span:not(:first-child) {
  height: 52px;
}

.cloud-card {
  position: absolute;
  right: 8%;
  bottom: 18%;
  min-width: 210px;
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.cloud-card small {
  color: var(--muted);
}

.app-shell {
  display: grid;
  justify-items: center;
}

.app-preview {
  width: min(360px, 100%);
  margin: 10px auto 0;
}

.app-phone {
  min-height: 420px;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 26px;
  border: 10px solid #202733;
  border-radius: 38px;
  background: #f8fbff;
  box-shadow: var(--shadow);
}

.app-phone .app-hero {
  height: 160px;
  background: linear-gradient(135deg, #267cff, #65d7ff);
}

.app-phone span:not(.app-hero) {
  height: 58px;
}

.apps-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.apps-grid span {
  min-width: 118px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--card-bg);
  font-size: 14px;
  font-weight: 700;
}

.account-section {
  background: var(--soft-bg);
}

.account-shell {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1.08fr);
  gap: 28px;
  align-items: start;
}

.account-card,
.device-panel,
.download-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.account-card {
  min-height: 650px;
  padding: clamp(28px, 4vw, 44px);
}

.account-logo {
  width: 150px;
  margin-bottom: 42px;
}

.account-card h2,
.device-panel h2 {
  font-size: clamp(28px, 3.4vw, 42px);
}

.account-note {
  margin: 16px 0 24px;
  color: var(--muted);
}

.api-config {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.api-config label,
.auth-form label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.api-config-row,
.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.api-config input,
.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  background: var(--card-bg);
  outline: none;
}

.api-config input:focus,
.auth-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 116, 255, 0.12);
}

.icon-btn {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--brand);
  background: var(--card-bg);
  font-weight: 900;
  cursor: pointer;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 20px 0;
  padding: 5px;
  border-radius: 12px;
  background: var(--soft-bg);
}

.login-tab {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.login-tab.active {
  color: #ffffff;
  background: var(--brand);
}

.login-pane {
  display: none;
}

.login-pane.active {
  display: block;
}

.qr-layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.qr-box {
  width: 212px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
}

.qr-box canvas {
  width: 192px;
  height: 192px;
}

.qr-placeholder {
  position: absolute;
  inset: 20px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--faint);
  font-weight: 800;
}

.qr-actions {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.muted {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.full-width {
  width: 100%;
}

.status-message {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.status-message[data-tone="success"] {
  color: var(--success);
}

.status-message[data-tone="error"] {
  color: var(--danger);
}

.agreement {
  margin: 28px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.agreement a {
  color: var(--brand);
  text-decoration: none;
}

.account-landing-card {
  display: grid;
  align-content: center;
  gap: 18px;
}

.device-panel {
  padding: clamp(24px, 3vw, 34px);
}

.device-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.session-summary {
  width: fit-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--soft-bg);
  font-size: 14px;
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.session-summary.is-online .status-dot {
  background: var(--success);
}

.device-grid {
  display: grid;
  gap: 14px;
}

.empty-state,
.device-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft-bg);
}

.empty-state h3,
.device-card h3 {
  font-size: 18px;
}

.empty-state p,
.device-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.device-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.device-meta {
  font-size: 14px;
}

.device-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--success);
  background: rgba(2, 163, 122, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.device-tag[data-status="OFFLINE"] {
  color: var(--danger);
  background: rgba(216, 66, 66, 0.1);
}

.device-tag[data-status="UNKNOWN"] {
  color: var(--muted);
  background: rgba(111, 127, 148, 0.12);
}

.download-section {
  background: linear-gradient(135deg, #e8f2ff, #f8fbff);
}

body[data-theme="dark"] .download-section {
  background: linear-gradient(135deg, #13233a, #0f1723);
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 5vw, 54px);
}

.download-card h2 {
  max-width: 680px;
}

.download-actions {
  margin-top: 0;
  flex: 0 0 auto;
}

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--page-bg);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-info {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 13px;
}

.footer-info p {
  margin: 0;
}

.footer-info a {
  color: var(--muted);
  text-decoration: none;
}

.footer-gongan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.footer-gongan img {
  width: 16px;
  height: 16px;
}

.hidden {
  display: none !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 36px;
  overflow: auto;
  background: rgba(15, 23, 35, 0.52);
}

.auth-modal[hidden] {
  display: none;
}

.devices-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 36px;
  overflow: auto;
  background: rgba(15, 23, 35, 0.52);
}

.devices-modal[hidden] {
  display: none;
}

.devices-modal-backdrop {
  position: fixed;
  inset: 0;
}

.devices-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: calc(100svh - 72px);
  overflow-y: auto;
  padding: clamp(26px, 4vw, 38px);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: 0 28px 80px rgba(25, 45, 75, 0.24);
}

.auth-modal-open {
  overflow: hidden;
}

.auth-route-modal {
  background: #eef3fb;
}

.account-route {
  min-height: 100svh;
  background: #fff;
  color: #1f2430;
}

.account-site-header {
  position: static;
  border-bottom: 0;
  background: #fff;
}

.account-nav-shell {
  max-width: 1720px;
}

.account-top-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.6vw, 26px);
  font-size: 15px;
  font-weight: 600;
}

.account-top-links > a:not(.login-link) {
  color: #1f2430;
  text-decoration: none;
}

.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #5488ff 0%, #96e1e1 100%);
  font-weight: 500;
  background-size: cover;
  background-position: center;
}

.account-avatar.has-image {
  color: transparent;
}

.account-avatar-small {
  width: 40px;
  height: 40px;
  font-size: 17px;
}

.account-avatar-large {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  font-size: 28px;
}

.account-page {
  width: min(100% - 80px, 1200px);
  min-height: calc(100svh - 84px);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  margin: 0 auto;
  padding: 48px 0 64px;
}

.account-sidebar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.account-mobile {
  margin: 8px 0 0;
  color: #5f6c81;
  font-size: 15px;
}

.account-divider {
  height: 1px;
  margin: 28px 0 24px;
  background: #e0e6ef;
}

.account-menu {
  display: grid;
  gap: 16px;
}

.account-menu a,
.account-menu button {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  padding: 0;
  color: #1f2430;
  background: transparent;
  text-align: left;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.account-menu a.active {
  color: #2465e8;
  font-weight: 700;
}

.account-menu strong {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #2465e8;
  background: #edf3ff;
  font-size: 13px;
}

.account-menu.secondary {
  gap: 18px;
}

.account-content {
  padding-top: 4px;
}

.account-content-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.account-content-head p {
  margin: 8px 0 0;
  color: #8190a8;
  font-size: 15px;
}

.account-status-message {
  min-height: 22px;
  margin-top: 14px;
  color: #2465e8;
  font-size: 14px;
}

.account-status-message[data-tone="error"] {
  color: #d84242;
}

.account-status-message[data-tone="success"] {
  color: #078461;
}

.account-device-list {
  min-height: 420px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-content: start;
  gap: 20px;
  margin-top: 20px;
}

.account-empty-state {
  grid-column: 1 / -1;
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: #8a99b2;
  font-size: 16px;
}

.empty-device-icon {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 20px;
  background: linear-gradient(180deg, #eff3f9, #e8edf5);
}

.empty-device-icon::before {
  content: "";
  position: absolute;
  inset: 21px 21px 27px 24px;
  border-radius: 50%;
  border: 8px solid #b8c3d4;
  background: #eef3fa;
}

.empty-device-icon::after {
  content: "";
  position: absolute;
  width: 38px;
  height: 8px;
  right: 8px;
  bottom: 19px;
  border-radius: 999px;
  background: #b8c3d4;
  transform: rotate(45deg);
}

.empty-device-icon span,
.empty-device-icon span::before,
.empty-device-icon span::after {
  position: absolute;
  left: 18px;
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #d8deea;
  content: "";
}

.empty-device-icon span {
  top: 22px;
}

.empty-device-icon span::before {
  top: 13px;
  left: 0;
}

.empty-device-icon span::after {
  top: 26px;
  left: 0;
  width: 34px;
}

.account-device-card {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 1px solid #dde5f0;
  border-radius: 12px;
  background: #fff;
}

.account-device-icon {
  width: 58px;
  height: 50px;
  border-radius: 6px;
  background: linear-gradient(135deg, #647386, #394555);
  box-shadow: inset -5px 0 0 #7ca2aa;
}

.account-device-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.account-dialog {
  width: min(92vw, 420px);
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: transparent;
}

.account-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
}

.account-dialog-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 30px 28px 24px;
  border-radius: 16px;
  background: #fff;
  color: #1f2430;
}

.account-dialog-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
}

.account-dialog-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.account-dialog-card p {
  margin: -8px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.account-dialog-close {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: #98a2b0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.account-dialog-close:hover {
  color: #4b5563;
  background: #f3f4f6;
}

.account-form-field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.account-form-field em {
  color: #ef4444;
  font-style: normal;
}

.account-form-field input,
.account-password-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  padding: 0 16px;
  color: #1f2430;
  background: #fff;
  font-size: 15px;
  outline: none;
}

.account-form-field input:focus,
.account-password-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 116, 255, 0.12);
}

.account-form-field input:disabled {
  color: #8ba0bb;
  background: #f3f5f9;
}

.account-password-row {
  position: relative;
  display: block;
}

.account-password-row input {
  padding-right: 48px;
}

.account-password-row button {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.account-password-row button::before {
  content: "";
  width: 20px;
  height: 20px;
  background-color: #98a2b0;
  -webkit-mask: var(--eye-off-icon) center / contain no-repeat;
  mask: var(--eye-off-icon) center / contain no-repeat;
}

.account-password-row button[aria-pressed="true"]::before {
  -webkit-mask-image: var(--eye-icon);
  mask-image: var(--eye-icon);
}

.account-text-btn {
  justify-self: start;
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.account-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.account-secondary-btn,
.account-primary-btn {
  min-width: 96px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.account-secondary-btn {
  border: 1px solid #dfe3e8;
  color: #4b5563;
  background: #fff;
}

.account-secondary-btn:hover {
  background: #f6f8fc;
}

.account-primary-btn {
  border: 0;
  color: #fff;
  background: var(--brand);
}

.account-primary-btn:hover {
  background: var(--brand-strong);
}

.account-primary-btn:disabled {
  color: #fff;
  background: #c9ccd1;
  cursor: not-allowed;
}

.account-password-step {
  display: none;
}

.account-password-step.active {
  display: grid;
}

.account-strength {
  margin-top: -6px;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
}

.auth-route-modal .auth-modal-backdrop {
  display: none;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  min-height: 0;
  max-height: calc(100svh - 72px);
  overflow-y: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: start;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(25, 45, 75, 0.22);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #71829c;
  background: #eef3fb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.auth-logo {
  width: 116px;
  display: inline-flex;
  margin-bottom: 20px;
}

.auth-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.auth-view {
  display: none;
}

.auth-view.active {
  display: block;
}

.register-step {
  display: none;
}

.register-step.active {
  display: block;
}

.auth-view h1 {
  margin-bottom: 18px;
  color: #1c222b;
  font-size: clamp(22px, 3vw, 26px);
  line-height: 1.15;
  font-weight: 800;
}

.auth-login-panel {
  display: none;
}

.auth-login-panel.active {
  display: grid;
}

.auth-login-header {
  margin-bottom: 20px;
}

.auth-login-title {
  margin: 0 0 8px;
  color: #1c222b;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.auth-login-subtitle {
  margin: 0;
  color: #98a2b0;
  font-size: 14px;
  font-weight: 500;
}

.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;
}

.auth-subtitle {
  margin: -6px 0 20px;
  color: #71829c;
  font-size: 15px;
  font-weight: 600;
}

.auth-form-large {
  display: grid;
  gap: 14px;
}

.auth-form-large.auth-login-panel,
.auth-login-panel:not(.active) {
  display: none !important;
}

.auth-form-large.auth-login-panel.active {
  display: grid !important;
}

.auth-form-large label {
  color: #71829c;
  font-size: 14px;
  font-weight: 700;
}

.auth-form-large input,
.password-row,
.phone-row {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  color: #1c222b;
  background: #ffffff;
  font-size: 15px;
}

.auth-form-large input {
  padding: 0 16px;
  outline: none;
}

.auth-form-large input::placeholder {
  color: #b7bcc4;
}

.auth-form-large input:focus,
.password-row:focus-within,
.phone-row:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 116, 255, 0.12);
}

.password-row,
.phone-row {
  display: grid;
  align-items: center;
  padding: 0;
}

.password-row {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.password-row input,
.phone-row input {
  min-height: 46px;
  border: 0;
  box-shadow: none;
}

.phone-row {
  grid-template-columns: 72px minmax(0, 1fr);
}

.phone-row span {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #dfe3e8;
  color: #71829c;
  font-size: 15px;
  font-weight: 600;
}

.password-toggle {
  width: 44px;
  height: 46px;
  border: 0;
  color: #b7bcc4;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle::before {
  content: "";
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask: var(--eye-off-icon) center / contain no-repeat;
  mask: var(--eye-off-icon) center / contain no-repeat;
}

.password-toggle[aria-pressed="true"]::before {
  -webkit-mask-image: var(--eye-icon);
  mask-image: var(--eye-icon);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.auth-code-send {
  min-height: 48px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  color: var(--brand);
  background: #f5f8fd;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-code-send:disabled {
  color: #9cafc8;
  background: #edf2fa;
  cursor: default;
}

.auth-submit {
  min-height: 46px;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: var(--brand);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.auth-submit:hover {
  background: var(--brand-strong);
}

.auth-submit:disabled,
.auth-submit[disabled] {
  color: #ffffff;
  background: #c9ccd1;
  cursor: not-allowed;
}

.auth-text-action {
  width: fit-content;
  min-height: 30px;
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.code-digits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  margin: 16px 0 14px;
}

.code-digits input {
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 1px solid #dfe3e8;
  border-radius: 12px;
  color: #1c222b;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  outline: none;
}

.code-digits input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 116, 255, 0.12);
}

.code-digits span {
  color: #71829c;
  font-size: 20px;
  font-weight: 700;
}

.password-strength {
  display: flex;
  gap: 6px;
  margin: -2px 0 12px;
}

.password-strength span {
  width: 56px;
  height: 6px;
  background: #158c20;
}

.required {
  color: #ee1d34;
}

.usage-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 10px 0 18px;
  padding: 0;
  border: 0;
}

.usage-fieldset legend {
  width: 100%;
  margin-bottom: 8px;
  color: #1c222b;
  font-size: 15px;
  font-weight: 700;
}

.usage-fieldset label,
.agreement-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1c222b;
  font-size: 14px;
  font-weight: 500;
}

.usage-fieldset input,
.agreement-check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--brand);
}

.agreement-check {
  margin-top: clamp(10px, 2svh, 20px);
  color: #1c222b;
}

.agreement-check a {
  color: var(--brand);
  text-decoration: none;
}

.auth-login-agreement {
  margin-top: 2px;
  align-items: center;
  color: #3a3f47;
  font-size: 14px;
  font-weight: 500;
}

.auth-login-agreement input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.auth-login-agreement a {
  color: var(--brand);
  font-weight: 500;
}

.auth-register-link {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.auth-secondary-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 28px;
}

.auth-register-link button {
  border: 0;
  color: var(--brand);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.auth-secondary-links button,
.auth-back {
  border: 0;
  color: #8a9099;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.auth-secondary-links button:hover {
  color: #5a6068;
}

.auth-back {
  margin: 0 0 18px;
  padding: 0;
  color: #71829c;
  font-size: 15px;
}

.auth-agreement {
  margin: 34px 0 0;
  color: #536780;
  text-align: center;
  font-size: 15px;
}

.auth-agreement a {
  color: var(--brand);
  text-decoration: none;
}

.auth-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: #536780;
  text-align: center;
  font-weight: 800;
}

.auth-status[data-tone="success"] {
  color: var(--success);
}

.auth-status[data-tone="error"] {
  color: var(--danger);
}

.btn:focus-visible,
.chip-btn:focus-visible,
.user-menu-toggle:focus-visible,
.user-menu button:focus-visible,
.main-nav a:focus-visible,
.login-link:focus-visible,
.icon-btn:focus-visible,
.login-tab:focus-visible,
.auth-register-link button:focus-visible,
.auth-secondary-links button:focus-visible,
.auth-back:focus-visible,
.auth-close:focus-visible,
.auth-text-action:focus-visible,
.auth-code-send:focus-visible,
.password-toggle:focus-visible,
.auth-submit:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (max-width: 1000px) {
  .main-nav {
    gap: 18px;
  }

  .account-top-links a:not(.login-link) {
    display: none;
  }

  .feature-board,
  .split-section,
  .split-section.reverse,
  .account-shell {
    grid-template-columns: 1fr;
  }

  .account-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: auto;
  }

  .container {
    width: min(100% - 32px, 1180px);
  }

  .site-header {
    position: relative;
    height: auto;
  }

  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 12px;
  }

  .brand {
    width: 132px;
    min-width: 132px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .account-top-links {
    order: 2;
    margin-left: auto;
    gap: 12px;
  }

  .header-actions {
    margin-left: auto;
  }

  .notice-inner {
    min-height: 44px;
    flex-wrap: wrap;
    gap: 4px 12px;
    text-align: center;
  }

  .hero-section {
    padding-top: 44px;
  }

  .hero-tags {
    gap: 10px 18px;
  }

  .monitor {
    border-width: 5px;
  }

  .monitor-screen {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .desktop-main {
    grid-template-columns: 1fr;
  }

  .status-panel {
    min-height: 118px;
  }

  .feature-section,
  .media-section,
  .connect-section,
  .app-section,
  .apps-center,
  .account-section,
  .download-section {
    padding: 58px 0;
  }

  .poster-wall {
    gap: 10px;
  }

  .connect-art {
    min-height: 360px;
  }

  .cloud-card {
    right: 0;
  }

  .qr-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .qr-actions {
    justify-items: stretch;
    width: 100%;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .download-card,
  .device-head {
    align-items: stretch;
    flex-direction: column;
  }

  .download-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 50px;
  }

  h2 {
    font-size: 30px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero-actions,
  .download-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .account-card,
  .device-panel {
    border-radius: 18px;
    padding: 22px;
  }

  .auth-modal {
    padding: 0;
    align-items: stretch;
  }

  .devices-modal {
    padding: 0;
    align-items: stretch;
  }

  .devices-panel {
    width: 100%;
    min-height: 100svh;
    max-height: none;
    border-radius: 0;
    padding: 34px 28px;
  }

  .auth-panel {
    width: 100%;
    min-height: 100svh;
    max-height: none;
    border-radius: 0;
    padding: 34px 28px;
  }

  .auth-logo {
    margin-bottom: 54px;
  }

  .auth-agreement {
    margin-top: 88px;
  }

  .agreement-check {
    margin-top: 64px;
    align-items: flex-start;
  }

  .code-digits {
    gap: 8px;
  }

  .code-digits input {
    min-height: 58px;
    border-radius: 14px;
    font-size: 24px;
  }

  .apps-grid span {
    min-width: calc(50% - 8px);
  }
}
