:root {
  --ink: #132238;
  --muted: #5f6f82;
  --line: #dfe6ee;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --navy: #132a46;
  --accent: #5368e8;
  --accent-dark: #3346bd;
  --accent-soft: #eef0ff;
  --warm: #ffcc7a;
  --shadow: 0 24px 70px rgba(30, 47, 68, 0.11);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fbfcfe;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.product-nicesleep { --accent: #5867dc; --accent-dark: #3542a2; --accent-soft: #eef0ff; }
body.product-emonest { --accent: #a93668; --accent-dark: #7f244d; --accent-soft: #fff0f5; }
body.product-fake-gps { --accent: #17684d; --accent-dark: #0e503b; --accent-soft: #e9f8f2; }
body.product-mirror { --accent: #a44d27; --accent-dark: #7f3719; --accent-soft: #fff1e9; }

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(223, 230, 238, 0.82);
  background: rgba(251, 252, 254, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: -0.06em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: #42536a;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent-dark);
}

.language-switcher {
  position: relative;
  flex: 0 0 auto;
}

.language-switcher::before {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--muted);
  font-size: .82rem;
  content: "文";
  pointer-events: none;
  transform: translateY(-52%);
}

.language-switcher select {
  min-height: 40px;
  max-width: 170px;
  padding: 0 34px 0 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
}

.language-switcher option {
  color: var(--navy);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  min-height: 690px;
  align-items: center;
  gap: 72px;
  padding: 84px 0 96px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 15px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.product-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(3.4rem, 7vw, 6.8rem);
  font-weight: 800;
  letter-spacing: -0.068em;
  line-height: 0.96;
}

.hero h1 span,
.product-hero h1 span {
  color: var(--accent);
}

.hero-lede,
.product-lede {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  line-height: 1.65;
}

.hero-actions,
.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  box-shadow: 0 12px 28px rgba(19, 42, 70, 0.2);
  transform: translateY(-2px);
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

.button-accent {
  border-color: var(--accent);
  background: var(--accent);
}

.hero-visual {
  position: relative;
  min-height: 500px;
}

.visual-orbit {
  position: absolute;
  inset: 20px 10px 10px;
  overflow: hidden;
  border-radius: 42% 58% 50% 50% / 47% 43% 57% 53%;
  background:
    radial-gradient(circle at 25% 18%, rgba(255,255,255,.86), transparent 22%),
    linear-gradient(145deg, #dfe4ff 2%, #eef8f4 50%, #fff0d8 100%);
  box-shadow: var(--shadow);
}

.visual-orbit::before,
.visual-orbit::after {
  position: absolute;
  border: 1px solid rgba(19, 42, 70, 0.12);
  border-radius: 50%;
  content: "";
}

.visual-orbit::before { inset: 76px 54px; transform: rotate(-18deg); }
.visual-orbit::after { inset: 122px 28px; transform: rotate(32deg); }

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border: 10px solid rgba(255,255,255,.72);
  border-radius: 34px;
  background: var(--navy);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  transform: translate(-50%, -50%) rotate(-6deg);
  box-shadow: 0 18px 46px rgba(19, 42, 70, .25);
}

.orbit-app {
  position: absolute;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 8px solid rgba(255,255,255,.82);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(19, 42, 70, .17);
}

.orbit-app img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; }
.orbit-app.one { top: 14%; left: 15%; transform: rotate(-8deg); }
.orbit-app.two { top: 17%; right: 14%; transform: rotate(8deg); }
.orbit-app.three { right: 11%; bottom: 14%; transform: rotate(-5deg); }
.orbit-app.four { bottom: 12%; left: 14%; transform: rotate(7deg); }

.section {
  padding: 100px 0;
}

.section-soft {
  border-radius: 42px;
  background: var(--surface-soft);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 42px;
}

.section-heading h2,
.content-section h2,
.cta-panel h2 {
  max-width: 760px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.15rem, 4.4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.052em;
  line-height: 1.05;
}

.section-heading p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.app-card {
  position: relative;
  display: grid;
  min-height: 350px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 18px 50px rgba(30, 47, 68, 0.07);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.app-card:hover {
  border-color: #c8d1dc;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-icon {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(19, 42, 70, .15);
}

.platform-label {
  display: inline-flex;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-title {
  display: block;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.app-card h3 {
  margin: 30px 0 12px;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

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

.text-link {
  display: inline-flex;
  align-self: end;
  margin-top: 28px;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.text-link::after { margin-left: 8px; content: "\2192"; transition: transform 160ms ease; }
.text-link:hover::after { transform: translateX(4px); }

.about-grid,
.feature-grid,
.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.about-card,
.feature-card,
.fact-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.card-number {
  color: var(--accent);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.about-card h3,
.feature-card h3,
.fact-card h3 {
  margin: 40px 0 10px;
  color: var(--navy);
  font-size: 1.18rem;
  letter-spacing: -.02em;
}

.feature-card h3,
.fact-card h3 { margin-top: 18px; }

.about-card p,
.feature-card p,
.fact-card p {
  margin: 0;
  color: var(--muted);
}

.cta-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
  margin: 20px 0 100px;
  padding: 52px;
  border-radius: 30px;
  background: var(--navy);
  color: #fff;
}

.cta-panel h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); }
.cta-panel p { max-width: 690px; margin: 14px 0 0; color: #c8d7e8; }
.cta-panel .button { border-color: #fff; background: #fff; color: var(--navy); }

.site-footer {
  border-top: 1px solid var(--line);
  background: #f4f7fa;
}

.footer-shell {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0;
  grid-template-columns: 1fr auto;
  gap: 32px;
}

.footer-company strong { display: block; color: var(--navy); }
.footer-company span { display: block; max-width: 680px; margin-top: 8px; color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; align-content: start; justify-content: end; gap: 10px 22px; }
.footer-links a { color: #415269; font-size: .9rem; font-weight: 700; text-decoration: none; }

/* Product pages */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 28px;
  color: var(--muted);
  font-size: .86rem;
}

.breadcrumbs a { text-decoration: none; }
.breadcrumbs span::before { margin-right: 8px; color: #9ba8b7; content: "/"; }

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr);
  min-height: 650px;
  align-items: center;
  gap: 70px;
  padding: 62px 0 88px;
}

.product-identity {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 28px;
}

.product-identity .app-icon { width: 66px; height: 66px; flex-basis: 66px; border-radius: 19px; }
.product-identity strong { display: block; color: var(--navy); font-size: 1rem; }
.product-identity span { color: var(--muted); font-size: .88rem; }
.product-hero h1 { font-size: clamp(3.3rem, 6.2vw, 6rem); }

.product-art {
  position: relative;
  display: grid;
  min-height: 490px;
  place-items: center;
  overflow: hidden;
  border-radius: 44px;
  background: var(--accent-soft);
}

.product-art::before {
  position: absolute;
  width: 440px;
  height: 440px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 50%;
  content: "";
}

.store-screen {
  position: relative;
  z-index: 1;
  width: min(58%, 250px);
  border: 10px solid rgba(255,255,255,.82);
  border-radius: 24px;
  box-shadow: 0 28px 65px color-mix(in srgb, var(--accent) 22%, transparent);
}

.mood-preview {
  position: relative;
  z-index: 1;
  width: min(80%, 380px);
  padding: 32px;
  border: 10px solid rgba(255,255,255,.72);
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 28px 65px rgba(157,55,98,.15);
}

.mood-preview h2 { margin: 0; font-size: 1.55rem; line-height: 1.2; }
.mood-preview p { margin: 7px 0 24px; color: var(--muted); }
.mood-row { display: flex; justify-content: space-between; gap: 10px; }
.mood-dot { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: #fff0f5; font-size: 1.3rem; }
.mood-dot.active { background: var(--accent); color: #fff; transform: translateY(-4px); }
.mood-chart { display: flex; height: 90px; align-items: end; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.mood-bar { flex: 1; border-radius: 8px 8px 3px 3px; background: #f5bed3; }
.mood-bar:nth-child(1) { height: 34%; }
.mood-bar:nth-child(2) { height: 58%; }
.mood-bar:nth-child(3) { height: 42%; }
.mood-bar:nth-child(4) { height: 78%; background: var(--accent); }
.mood-bar:nth-child(5) { height: 62%; }

.content-section {
  padding: 90px 0;
}

.content-intro {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 80px;
  margin-bottom: 46px;
}

.content-intro p {
  max-width: 620px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.steps {
  display: grid;
  counter-reset: steps;
  gap: 0;
  border-top: 1px solid var(--line);
}

.step {
  display: grid;
  grid-template-columns: 80px .8fr 1.2fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: steps;
}

.step::before {
  color: var(--accent);
  font-size: .88rem;
  font-weight: 900;
  content: "0" counter(steps);
}

.step h3 { margin: 0; color: var(--navy); font-size: 1.12rem; }
.step p { margin: 0; color: var(--muted); }

.note-panel {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
  padding: 48px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}

.note-panel h2 { font-size: clamp(2rem, 3vw, 2.8rem); }
.note-list { margin: 0; padding: 0; list-style: none; }
.note-list li { position: relative; padding: 0 0 17px 30px; color: #42536a; }
.note-list li::before { position: absolute; top: 8px; left: 0; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); content: ""; }

.privacy-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 42px;
  padding: 38px 42px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #fff;
}

.privacy-panel h2 { margin: 0; color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.privacy-panel p { max-width: 740px; margin: 10px 0 0; color: #cbd9e7; }
.privacy-panel .button { border-color: #fff; background: #fff; color: var(--navy); }

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  position: relative;
  padding: 25px 50px 25px 0;
  color: var(--navy);
  font-size: 1.07rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { position: absolute; top: 25px; right: 6px; color: var(--accent); font-size: 1.4rem; content: "+"; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { max-width: 800px; margin: -6px 0 26px; color: var(--muted); }

.other-apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.other-app {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  text-decoration: none;
}

.other-app img { width: 52px; height: 52px; border-radius: 15px; object-fit: cover; }
.other-app strong { display: block; color: var(--navy); }
.other-app span { color: var(--muted); font-size: .84rem; }

/* Legal pages */
.legal-page { max-width: 900px; padding: 72px 0 100px; }
.legal-content h1 { margin: 0 0 28px; color: var(--navy); font-size: clamp(2.8rem, 6vw, 4.6rem); letter-spacing: -.055em; line-height: 1; }
.legal-content h2 { margin: 40px 0 12px; color: var(--navy); font-size: 1.28rem; letter-spacing: -.02em; }
.legal-content p, .legal-content li { color: #46576d; }
.legal-content p { margin: 0 0 16px; }
.legal-content ul { margin: 0 0 20px; padding-left: 1.35rem; list-style: disc; }
.legal-content li { margin-bottom: 7px; }
.legal-content a { color: var(--accent-dark); font-weight: 700; }
.legal-content code { overflow-wrap: anywhere; }
.legal-language-note { padding: 13px 16px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); color: var(--navy) !important; font-weight: 700; }

@media (max-width: 920px) {
  .hero,
  .product-hero { grid-template-columns: 1fr; min-height: 0; gap: 50px; }
  .hero { padding-top: 70px; }
  .hero-visual { min-height: 430px; }
  .product-art { min-height: 420px; }
  .about-grid,
  .feature-grid,
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .content-intro,
  .note-panel { grid-template-columns: 1fr; gap: 30px; }
  .section-heading { align-items: start; flex-direction: column; gap: 16px; }
  .step { grid-template-columns: 50px 1fr; }
  .step p { grid-column: 2; }
}

@media (max-width: 720px) {
  .nav-shell { min-height: 64px; }
  .site-nav { gap: 14px; }
  .site-nav a:nth-child(2),
  .site-nav a:nth-child(4) { display: none; }
  .language-switcher select { width: 48px; padding-right: 8px; color: transparent; }
  .hero h1,
  .product-hero h1 { font-size: clamp(3.1rem, 16vw, 4.6rem); }
  .hero { padding: 58px 0 74px; }
  .hero-visual { min-height: 380px; }
  .visual-orbit { inset: 4px; }
  .app-grid,
  .about-grid,
  .feature-grid,
  .facts-grid,
  .other-apps { grid-template-columns: 1fr; }
  .section { padding: 76px 0; }
  .section-soft { border-radius: 28px; }
  .content-section { padding: 70px 0; }
  .cta-panel,
  .privacy-panel { grid-template-columns: 1fr; padding: 34px 28px; }
  .footer-shell { grid-template-columns: 1fr; }
  .footer-links { justify-content: start; }
}

@media (max-width: 520px) {
  .nav-shell,
  .site-shell,
  .footer-shell { width: min(100% - 28px, 1180px); }
  .site-nav { margin-left: auto; }
  .site-nav a { display: none; }
  .brand span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .hero-visual { min-height: 330px; }
  .orbit-app { width: 60px; height: 60px; border-width: 6px; border-radius: 19px; }
  .orbit-center { width: 92px; height: 92px; border-radius: 27px; }
  .app-card { min-height: 0; padding: 25px; }
  .product-hero { padding-top: 42px; }
  .product-art { min-height: 330px; border-radius: 30px; }
  .mood-preview { width: 88%; padding: 24px; }
  .note-panel { padding: 32px 24px; }
  .step { grid-template-columns: 38px 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
