:root {
  --ink: #17252a;
  --muted: #627176;
  --line: #dce4e5;
  --surface: #ffffff;
  --surface-soft: #f1f5f4;
  --page: #f5f7f6;
  --brand: #087f72;
  --brand-dark: #05645b;
  --brand-soft: #e4f3f0;
  --accent: #ef6a4f;
  --accent-soft: #fff0ec;
  --warning: #a85a12;
  --warning-soft: #fff7e8;
  --danger: #b83e35;
  --shadow-sm: 0 1px 2px rgba(23, 37, 42, .05), 0 8px 24px rgba(23, 37, 42, .06);
  --shadow-md: 0 18px 48px rgba(23, 37, 42, .12);
}

html {
  scroll-behavior: smooth;
}

body,
body[data-page] {
  background: #050708;
  background-image: none;
  color: var(--ink);
  animation: none;
  letter-spacing: 0;
}

body[data-page]::before {
  display: none;
}

.bg-particles {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.bg-particles .particle {
  display: none;
}

.star {
  position: absolute;
  left: var(--star-x);
  top: var(--star-y);
  width: var(--star-size);
  height: var(--star-size);
  background: rgba(255, 255, 255, .92);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(255, 255, 255, .42);
  opacity: var(--star-opacity);
  will-change: transform, opacity;
  animation: starFloat var(--star-duration) ease-in-out var(--star-delay) infinite;
}

.star:nth-child(9n) {
  background: #79d7c9;
  box-shadow: 0 0 9px rgba(121, 215, 201, .55);
}

.star:nth-child(13n) {
  background: #ffac8f;
  box-shadow: 0 0 9px rgba(255, 172, 143, .5);
}

@keyframes starFloat {
  0%, 100% {
    opacity: .18;
    transform: translate3d(0, 5px, 0) scale(.78);
  }
  50% {
    opacity: var(--star-opacity);
    transform: translate3d(var(--star-drift), -7px, 0) scale(1.18);
  }
}

button,
a,
[role="tab"] {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
[role="tab"]:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(239, 106, 79, .35);
  outline-offset: 3px;
}

.page-kicker {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover {
  color: #fff;
}

/* Home */
body[data-page="home"] {
  padding-bottom: 48px;
}

body[data-page="home"] .container {
  max-width: 780px;
  padding: 56px 24px 24px;
}

body[data-page="home"] .header {
  margin-bottom: 34px;
  text-align: left;
  animation: none;
}

body[data-page="home"] .logo-wrapper {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 30px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-page="home"] .logo {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(23, 52, 47, .16);
}

body[data-page="home"] .brand-copy {
  min-width: 0;
}

body[data-page="home"] .brand-name {
  margin: 0;
  background: none;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  filter: none;
  -webkit-text-fill-color: currentColor;
}

body[data-page="home"] .brand-label {
  margin-top: 2px;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 650;
}

body[data-page="home"] .main-title {
  max-width: 620px;
  margin-bottom: 10px;
  color: #fff;
  font-size: 34px;
  font-weight: 780;
  line-height: 1.24;
  letter-spacing: 0;
  text-shadow: none;
}

body[data-page="home"] .sub-title {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: none;
}

body[data-page="home"] .platform-list {
  gap: 12px;
  margin-bottom: 40px;
  animation: none;
}

body[data-page="home"] .platform-item {
  min-height: 112px;
  gap: 18px;
  padding: 20px;
  overflow: visible;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(13, 28, 30, .18);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body[data-page="home"] .platform-item::before {
  display: none;
}

body[data-page="home"] .platform-item:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 127, 114, .24);
  box-shadow: 0 22px 54px rgba(23, 37, 42, .15);
}

body[data-page="home"] .platform-icon {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 8px;
  box-shadow: none !important;
}

body[data-page="home"] .platform-name {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0;
}

body[data-page="home"] .platform-desc {
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
}

body[data-page="home"] .platform-desc::before {
  background: var(--brand);
}

body[data-page="home"] .platform-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  background: var(--brand);
  border-radius: 7px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0;
  transition: background-color .2s ease, transform .2s ease;
}

body[data-page="home"] .platform-action:hover {
  background: var(--brand-dark);
  box-shadow: none;
  transform: translateY(-1px);
}

body[data-page="home"] .notice-section {
  margin: 0 0 30px;
  padding: 22px 24px;
  overflow: visible;
  background: #fff;
  border: 1px solid #d5dfdc;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(7, 18, 20, .16);
  animation: none;
  backdrop-filter: none;
}

body[data-page="home"] .notice-section::before {
  display: none;
}

body[data-page="home"] .notice-title {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
}

body[data-page="home"] .notice-title::before {
  width: 4px;
  height: 20px;
  margin-right: 10px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: none;
}

body[data-page="home"] .notice-list {
  border-top: 1px solid var(--line);
}

body[data-page="home"] .notice-item {
  margin: 0;
  padding: 16px 10px 16px 36px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: #435258;
  font-size: 14px;
  font-weight: 500;
  transition: background-color .2s ease;
}

body[data-page="home"] .notice-item:hover {
  background: #eef3f2;
  transform: none;
}

body[data-page="home"] .footer {
  margin: 0;
  padding: 20px;
  background: #f7f9f8;
  border: 1px solid #d5dfdc;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(7, 18, 20, .14);
  animation: none;
  backdrop-filter: none;
}

body[data-page="home"] .copyright {
  color: #778489;
  font-size: 12px;
  font-weight: 450;
}

body[data-page="home"] .toast {
  top: auto;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: min(440px, calc(100vw - 32px));
  padding: 13px 18px;
  background: #17252a;
  border: 0;
  border-radius: 7px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  transform: translate(-50%, 18px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

body[data-page="home"] .toast.show {
  transform: translate(-50%, 0);
}

body[data-page="home"] .toast-icon {
  margin-right: 8px;
  font-size: 16px;
  animation: none;
}

/* Android and iOS guides */
body[data-page="android"],
body[data-page="ios"] {
  padding: 28px 20px 132px;
}

body[data-page="android"] .container,
body[data-page="ios"] .container {
  max-width: 760px;
}

body[data-page="android"] header,
body[data-page="ios"] header {
  margin-bottom: 28px;
  text-align: left;
  animation: none;
}

body[data-page="android"] .logo-text,
body[data-page="ios"] .logo-text {
  color: #fff;
  font-size: 30px;
  font-weight: 780;
  line-height: 1.28;
  letter-spacing: 0;
  text-shadow: none;
}

.guide-subtitle {
  max-width: 580px;
  margin-top: 8px;
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
}

body[data-page="android"] .card,
body[data-page="ios"] .card {
  margin-bottom: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  opacity: 1;
  animation: none;
  backdrop-filter: none;
}

body[data-page="android"] .alert-card {
  background: var(--warning-soft);
  border-color: #f0cea8;
}

body[data-page="android"] .alert-card h2 {
  margin-bottom: 10px;
  color: #794312;
  font-size: 17px;
}

body[data-page="android"] .alert-card p {
  margin-bottom: 6px;
  padding-left: 22px;
  color: #795026;
  font-size: 13px;
}

body[data-page="android"] .section-title,
body[data-page="ios"] .section-title {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
}

body[data-page="android"] .section-title::before,
body[data-page="ios"] .section-title::before {
  width: 4px;
  height: 20px;
  background: var(--brand);
  border-radius: 2px;
  box-shadow: none;
}

body[data-page="android"] .guide-tabs {
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 -4px 20px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

body[data-page="android"] .guide-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 6px;
  color: #536267;
  font-size: 13px;
  font-weight: 650;
  transition: background-color .2s ease, color .2s ease;
}

body[data-page="android"] .guide-tab:hover {
  background: #e7eeec;
  border-color: transparent;
  transform: none;
}

body[data-page="android"] .guide-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: none;
  color: #fff;
}

body[data-page="android"] .guide-content.active {
  animation: contentFade .18s ease;
}

@keyframes contentFade {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

body[data-page="android"] .guide-step,
body[data-page="ios"] .guide-step {
  margin-bottom: 10px;
  padding: 15px 16px;
  background: var(--surface-soft);
  border: 0;
  border-left: 3px solid #9fbab5;
  border-radius: 6px;
  color: #4a5a5f;
  font-size: 14px;
  line-height: 1.75;
}

body[data-page="android"] .guide-step b,
body[data-page="ios"] .guide-step b {
  color: var(--ink);
}

body[data-page="android"] .guide-step span {
  color: var(--danger);
}

body[data-page="android"] .guide-step span.highlight {
  background: #ffe9e5;
  color: var(--danger);
}

body[data-page="android"] .info-card {
  background: var(--surface);
  border-color: var(--line);
}

body[data-page="android"] .info-card .section-title::before {
  background: var(--accent);
  box-shadow: none;
}

body[data-page="ios"] .app-info {
  justify-content: flex-start;
}

body[data-page="ios"] .app-icon {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}

body[data-page="ios"] .app-name {
  color: var(--ink);
  font-size: 19px;
  letter-spacing: 0;
}

body[data-page="ios"] .app-badge {
  background: var(--brand-soft);
  border-radius: 5px;
  color: var(--brand-dark);
}

body[data-page="ios"] .guide-step {
  padding-left: 56px;
  border-left: 0;
}

body[data-page="ios"] .guide-step .step-num {
  left: 16px;
  top: 16px;
  background: var(--brand) !important;
  box-shadow: none !important;
}

body[data-page="ios"] .guide-step .highlight {
  background: #fff0cf;
  color: #84500d;
  white-space: normal;
}

body[data-page="ios"] .search-keyword {
  min-height: 42px;
  padding: 0 14px;
  background: var(--brand-soft);
  border: 1px solid #add2cb;
  border-radius: 6px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

body[data-page="ios"] .search-keyword:hover {
  background: #d7ebe7;
  border-color: #86bdb4;
  transform: none;
}

body[data-page="ios"] .search-keyword::after {
  display: none;
}

body[data-page="android"] footer,
body[data-page="ios"] footer {
  margin-top: 24px;
  opacity: 1;
  animation: none;
}

body[data-page="android"] footer p,
body[data-page="ios"] footer p {
  color: rgba(255, 255, 255, .68);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .42);
}

body[data-page="android"] .download-container,
body[data-page="ios"] .download-container {
  bottom: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

body[data-page="android"] .download-btn,
body[data-page="ios"] .download-btn {
  width: min(720px, 100%);
  min-height: 52px;
  padding: 0 24px;
  background: var(--brand);
  border-radius: 7px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
}

body[data-page="android"] .download-btn:hover,
body[data-page="ios"] .download-btn:hover {
  background: var(--brand-dark);
  box-shadow: none;
  transform: translateY(-1px);
}

body[data-page="ios"] .toast {
  top: auto;
  bottom: 92px;
  padding: 12px 16px;
  background: #17252a;
  border-radius: 7px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  animation: toastIn .2s ease, toastOut .2s ease 1.35s forwards;
}

@keyframes posterSaveBlink {
  0%, 42%, 100% {
    opacity: 1;
    box-shadow: 0 8px 20px rgba(184, 62, 53, .3), 0 0 0 0 rgba(239, 106, 79, .45);
    transform: translate(-50%, -50%) scale(1);
  }
  58%, 72% {
    opacity: .58;
    box-shadow: 0 8px 18px rgba(184, 62, 53, .2), 0 0 0 10px rgba(239, 106, 79, 0);
    transform: translate(-50%, -50%) scale(.94);
  }
}

@media (max-width: 640px) {body[data-page="home"] .container {
    padding: 34px 16px 18px;
  }

body[data-page="home"] .header {
    margin-bottom: 26px;
  }

body[data-page="home"] .logo-wrapper {
    gap: 12px;
    margin-bottom: 24px;
  }

body[data-page="home"] .logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
  }

body[data-page="home"] .brand-name {
    font-size: 23px;
  }

body[data-page="home"] .main-title {
    font-size: 27px;
  }

body[data-page="home"] .platform-item {
    min-height: 100px;
    gap: 14px;
    padding: 16px;
  }

body[data-page="home"] .platform-icon {
    width: 52px;
    height: 52px;
  }

body[data-page="home"] .platform-action {
    min-height: 42px;
    padding: 0 14px;
  }

body[data-page="android"] .guide-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

}

@media (max-width: 420px) {body[data-page="home"] .platform-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
  }

body[data-page="home"] .platform-action {
    grid-column: 1 / -1;
    width: 100%;
  }

body[data-page="ios"] .app-info {
    justify-content: flex-start;
  }

}

@media (prefers-reduced-motion: reduce) {html {
    scroll-behavior: auto;
  }

*,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

.star {
    opacity: .5;
    animation: none !important;
  }

}
