:root {
  color-scheme: light dark;
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-soft: #eef3fa;
  --color-text: #182235;
  --color-muted: #5d6879;
  --color-brand: #46689b;
  --color-brand-strong: #31517f;
  --color-brand-soft: #dfe9f8;
  --color-border: #d9e1ec;
  --color-focus: #d46d00;
  --shadow-card: 0 20px 54px rgba(31, 53, 82, 0.09);
  --shadow-soft: 0 10px 30px rgba(31, 53, 82, 0.07);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --content-width: 1160px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Yu Gothic", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-brand-strong);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: #111820;
  transform: translateY(-160%);
}

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

.container {
  width: min(var(--content-width), calc(100% - 40px));
  margin-inline: auto;
}

.narrow {
  width: min(860px, 100%);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

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

.site-nav a {
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-brand-strong);
  background: var(--color-brand-soft);
}

.nav-toggle {
  display: none;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  background: var(--color-surface);
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

main {
  overflow: clip;
}

.portal-hero {
  position: relative;
  isolation: isolate;
  padding: 82px 0 96px;
  background:
    radial-gradient(circle at 80% 15%, rgba(97, 136, 190, 0.2), transparent 35%),
    linear-gradient(180deg, var(--color-surface), var(--color-bg));
}

.portal-hero::before {
  position: absolute;
  z-index: -1;
  top: 14%;
  right: -12%;
  width: min(58vw, 720px);
  aspect-ratio: 1;
  border: clamp(18px, 3vw, 38px) solid rgba(70, 104, 155, 0.07);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 clamp(22px, 4vw, 58px) var(--color-surface),
    inset 0 0 0 clamp(34px, 6vw, 84px) rgba(70, 104, 155, 0.06);
  content: "";
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(460px, 1.06fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 13px;
  border: 1px solid color-mix(in srgb, var(--color-brand) 30%, transparent);
  border-radius: 999px;
  color: var(--color-brand-strong);
  background: var(--color-brand-soft);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0 0 26px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.17;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 600px;
  margin: 0 0 32px;
  color: var(--color-muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.9;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--color-brand);
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.button:hover {
  color: #ffffff;
  background: var(--color-brand-strong);
}

.button-secondary {
  border-color: var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: none;
}

.button-secondary:hover {
  color: var(--color-brand-strong);
  background: var(--color-brand-soft);
}

.app-showcase {
  position: relative;
  min-height: 620px;
}

.phone-shot {
  position: absolute;
  width: clamp(180px, 20vw, 235px);
  overflow: hidden;
  border: 7px solid #1d2633;
  border-radius: 34px;
  background: #1d2633;
  box-shadow: 0 30px 60px rgba(25, 38, 57, 0.24);
}

.phone-shot img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.phone-shot-home {
  z-index: 3;
  top: 26px;
  left: 30%;
  transform: rotate(-1deg);
}

.phone-shot-record {
  z-index: 2;
  top: 95px;
  left: 1%;
  transform: rotate(-6deg);
}

.phone-shot-statistics {
  z-index: 1;
  top: 88px;
  right: 0;
  transform: rotate(6deg);
}

.section {
  padding: 88px 0;
}

.section-tight {
  padding: 64px 0;
}

.section-soft {
  background: var(--color-surface-soft);
}

.section-dark {
  color: #f8fbff;
  background: #172033;
}

.section-heading {
  display: grid;
  max-width: 760px;
  gap: 12px;
  margin-bottom: 38px;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;
  color: var(--color-muted);
  font-size: 18px;
}

.section-dark .section-heading p {
  color: #c6d0dd;
}

.feature-grid,
.future-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card,
.future-card,
.content-card,
.link-card,
.x-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.feature-card,
.future-card,
.link-card {
  padding: 26px;
}

.feature-card h3,
.future-card h3,
.link-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.45;
}

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

.feature-card-wide {
  grid-column: span 2;
}

.story-grid,
.download-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 48px;
}

.support-screenshot {
  width: min(310px, 72%);
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 28px;
  object-fit: contain;
  box-shadow: var(--shadow-card);
}

.story-copy h2,
.download-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.3;
}

.story-copy p,
.download-copy p {
  color: var(--color-muted);
  font-size: 18px;
}

.story-note {
  padding: 32px;
  border-left: 5px solid var(--color-brand);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  font-size: clamp(21px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.75;
}

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

.store-button {
  display: grid;
  min-height: 82px;
  place-items: center;
  padding: 12px 18px;
  border: 1px dashed color-mix(in srgb, var(--color-border) 70%, var(--color-muted));
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  background: color-mix(in srgb, var(--color-surface) 75%, transparent);
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.store-button small {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.x-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 30px;
}

.x-logo {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 22px;
  background: #000000;
}

.x-logo img {
  width: 34px;
  height: auto;
}

.x-copy h2,
.x-copy h3 {
  margin: 0 0 4px;
}

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

.x-handle {
  font-size: 20px;
  font-weight: 900;
}

.roadmap-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.roadmap-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #e9eff8;
  background: rgba(255, 255, 255, 0.05);
}

.roadmap-list li::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8fb0df;
  content: "";
}

.status {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--color-brand-strong);
  background: var(--color-brand-soft);
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  padding: 72px 0 58px;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(circle at 85% 10%, rgba(70, 104, 155, 0.16), transparent 34%),
    var(--color-surface);
}

.page-hero h1 {
  max-width: 850px;
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--color-muted);
  font-size: 19px;
}

.content-stack {
  display: grid;
  gap: 24px;
}

.content-card {
  padding: clamp(24px, 4vw, 42px);
}

.content-card h2 {
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.4;
}

.content-card h3 {
  margin: 32px 0 8px;
  font-size: 21px;
}

.content-card h3:first-child {
  margin-top: 0;
}

.content-card p:last-child,
.content-card ul:last-child {
  margin-bottom: 0;
}

.content-card li + li {
  margin-top: 6px;
}

.notice {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 4px solid var(--color-brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-brand-soft);
}

.meta {
  color: var(--color-muted);
  font-size: 14px;
}

.official-x-panel {
  display: grid;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid #303a49;
  border-radius: var(--radius-md);
  color: #f8fbff;
  background: #111820;
}

.official-x-panel .x-card {
  padding: 0;
  border: 0;
  color: #f8fbff;
  background: transparent;
  box-shadow: none;
}

.official-x-panel .x-logo {
  background: #ffffff;
}

.official-x-panel .x-logo img {
  filter: none;
}

.official-x-panel p {
  color: #cad3df;
}

.official-x-panel a:not(.button) {
  color: #ffffff;
}

.official-x-panel .button {
  color: #111820;
  background: #ffffff;
}

.official-x-panel .button:hover {
  color: #111820;
  background: #e7edf5;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 52px 0 34px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-grid p,
.footer-grid ul {
  margin: 0;
  color: var(--color-muted);
}

.footer-grid ul {
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 38px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1622;
    --color-surface: #172033;
    --color-surface-soft: #1c2940;
    --color-text: #f4f7fb;
    --color-muted: #b6c1cf;
    --color-brand: #86a8d7;
    --color-brand-strong: #b4cef2;
    --color-brand-soft: #243b5c;
    --color-border: #34445b;
    --shadow-card: 0 20px 54px rgba(0, 0, 0, 0.26);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .portal-hero {
    background:
      radial-gradient(circle at 80% 15%, rgba(106, 147, 204, 0.22), transparent 35%),
      linear-gradient(180deg, #172033, #0f1622);
  }

  .phone-shot {
    border-color: #05080d;
    background: #05080d;
  }

  .section-dark {
    background: #090e16;
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .app-showcase {
    width: min(700px, 100%);
    min-height: 560px;
    margin-inline: auto;
  }

  .phone-shot {
    width: clamp(170px, 27vw, 220px);
  }

  .feature-grid,
  .future-grid,
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card-wide {
    grid-column: auto;
  }

  .story-grid,
  .download-grid {
    gap: 30px;
  }
}

@media (max-width: 1040px) {
  .nav-shell {
    position: relative;
    min-height: 68px;
  }

  .brand {
    max-width: 250px;
    font-size: 15px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
  }

  .site-nav[data-open="true"] {
    display: grid;
  }

  .site-nav a {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--content-width));
  }

  .brand {
    max-width: 230px;
  }

  .portal-hero {
    padding: 60px 0 66px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 13vw, 60px);
  }

  .hero-lead {
    font-size: 17px;
  }

  .app-showcase {
    min-height: 470px;
  }

  .phone-shot {
    width: min(43vw, 185px);
    border-width: 5px;
    border-radius: 26px;
  }

  .phone-shot-home {
    top: 8px;
    left: 29%;
  }

  .phone-shot-record {
    top: 88px;
    left: 0;
  }

  .phone-shot-statistics {
    top: 82px;
  }

  .section,
  .section-tight {
    padding: 64px 0;
  }

  .feature-grid,
  .future-grid,
  .link-grid,
  .story-grid,
  .download-grid,
  .support-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .story-note {
    padding: 24px;
  }

  .x-card {
    grid-template-columns: auto 1fr;
  }

  .x-card .button {
    grid-column: 1 / -1;
  }

  .roadmap-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero {
    padding: 56px 0 46px;
  }

  .footer-grid {
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .hero-actions,
  .button-row {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .app-showcase {
    min-height: 420px;
  }

  .phone-shot {
    width: min(42vw, 160px);
  }

  .store-buttons,
  .roadmap-list {
    grid-template-columns: 1fr;
  }

  .x-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .x-logo {
    margin-inline: auto;
  }
}

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

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

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .nav-toggle {
    display: none;
  }

  body {
    color: #000000;
    background: #ffffff;
  }

  .content-card {
    border: 0;
    box-shadow: none;
  }
}
