:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --line: #d9e2f2;
  --line-strong: #c7d4ea;
  --text: #0f254a;
  --muted: #6a7c9d;
  --blue: #2c56a2;
  --blue-dark: #183d85;
  --blue-soft: #e8effc;
  --shadow: 0 18px 40px rgba(29, 51, 96, 0.08);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(44, 86, 162, 0.08), transparent 25%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
}

body.guide-page {
  padding: 0 0 clamp(28px, 5vh, 52px);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

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

code {
  padding: 0.12rem 0.4rem;
  color: var(--blue-dark);
  font-family: Consolas, "Courier New", monospace;
  background: rgba(44, 86, 162, 0.08);
  border-radius: 8px;
}

.app-shell {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #d8e4f5;
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.guide-page .app-shell {
  width: min(1000px, calc(100% - 72px));
}

.guide-page .app-shell {
  margin: clamp(18px, 3vh, 28px) auto 0;
  padding: 12px;
}

.landing-shell {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 8px 0 24px;
}

.page-header,
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 2px 12px;
  border-bottom: 1px solid var(--line);
}

.back-link,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.page-title,
.landing-title {
  margin: 0;
  color: #06214c;
  font-size: clamp(1.85rem, 3.3vw, 2.45rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.guide-page .page-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 11px 20px 12px;
  color: #214f9a;
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #d5e2f5;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(33, 79, 154, 0.08);
}

.platform-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  color: var(--blue-dark);
  font-weight: 800;
  background: #ffffff;
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  box-shadow: none;
}

.platform-select__label {
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.platform-select select {
  min-width: 110px;
  color: var(--blue-dark);
  font-weight: 800;
  background: transparent;
  border: 0;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.progress-panel,
.landing-hero,
.step-copy,
.step-media,
.landing-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.progress-panel {
  margin-top: 14px;
  padding: 13px 16px 12px;
  background: #ffffff;
  border-color: #d8e4f5;
  border-radius: 20px;
  box-shadow: none;
}

.progress-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.progress-label {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.progress-action {
  color: var(--muted);
  font-weight: 700;
}

.progress-track {
  height: 7px;
  background: #dfe8f7;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #4a74c7);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.step-shell {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  background: #f4f8ff;
  border: 1px solid #d8e4f5;
  border-radius: 24px;
}

.step-copy {
  padding: 16px 16px 14px;
  background: #ffffff;
  border-color: #d8e4f5;
  border-radius: 20px;
  box-shadow: none;
}

.step-title {
  margin: 0;
  color: #06214c;
  font-size: clamp(1.24rem, 2vw, 1.62rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.step-description {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.42;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #2d456c;
  font-size: 0.92rem;
}

.detail-item__number {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  color: var(--blue-dark);
  font-size: 0.84rem;
  font-weight: 800;
  background: #f2f7ff;
  border: 1px solid #d4e0f3;
  border-radius: 50%;
}

.detail-item__text {
  padding-top: 2px;
  line-height: 1.38;
}

.detail-warning {
  display: block;
  color: #c62828;
  font-weight: 800;
}

.step-note {
  margin-top: 14px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

.step-note.is-hidden,
.step-cta.is-hidden {
  display: none;
}

.step-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 0;
  isolation: isolate;
  min-height: 50px;
  margin-top: 14px;
  padding: 0 18px;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #365fac 0%, #274a8e 100%);
  border: 1px solid #264887;
  border-radius: 16px;
  box-shadow:
    0 14px 24px rgba(39, 74, 142, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.step-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 36%, transparent 64%, rgba(255, 255, 255, 0.08));
  opacity: 0.9;
  pointer-events: none;
}

.step-cta:hover,
.step-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 18px 28px rgba(39, 74, 142, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: saturate(1.04);
}

.step-cta:focus-visible {
  outline: 2px solid rgba(39, 74, 142, 0.22);
  outline-offset: 2px;
}

.step-media {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.step-media__frame {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 390px;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #d8e4f5;
  border-radius: 20px;
  box-shadow: none;
}

.step-media__gallery {
  display: grid;
  gap: 8px;
  width: 100%;
}

.step-media__image-wrap {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #dfe8f6;
  border-radius: 18px;
}

.step-media__image-wrap img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 10px;
}

.step-media__image-wrap--compact {
  width: min(100%, 280px);
  justify-self: center;
  padding: 8px 10px;
}

.step-media__image-wrap--compact img {
  width: auto;
  max-width: 100%;
  max-height: 108px;
}

.step-media__caption {
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.step-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.footer-link {
  color: var(--muted);
  font-weight: 700;
}

.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.step-button {
  min-width: 104px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #d3def1;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.step-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.step-button--secondary {
  color: #7f92b4;
  font-weight: 800;
  background: #ffffff;
}

.step-button--primary {
  color: #fff;
  font-weight: 800;
  background: #2b539a;
  box-shadow: none;
}

.step-button:disabled {
  color: #aebbd2;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.landing-shell {
  padding-top: 16px;
}

.landing-hero {
  margin-top: 16px;
  padding: 22px;
}

.landing-hero p {
  margin: 12px 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 1rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.landing-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.landing-card h2 {
  margin: 0;
  color: #06214c;
  font-size: 1.45rem;
  font-weight: 800;
}

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

.landing-card__media {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 12px;
  background: linear-gradient(180deg, #f4f8ff, #fcfdff);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.landing-card__media img {
  max-height: 190px;
  object-fit: contain;
  border-radius: 10px;
}

.landing-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
  border-radius: 15px;
}

.landing-button--ghost {
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-strong);
}

.landing-notes {
  margin-top: 16px;
  padding: 16px 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.landing-notes ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.landing-notes li + li {
  margin-top: 8px;
}

.home-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-top: 3px solid #d9b233;
}

.home-header {
  padding: 10px 0 7px;
  background: #fff;
  border-bottom: 1px solid #d6dfef;
}

.home-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(1160px, calc(100% - 220px));
  margin: 0 auto;
}

.home-brand__mark {
  flex: 0 0 auto;
  height: 52px;
  line-height: 0;
  cursor: pointer;
}

.home-brand__mark img {
  width: auto;
  height: 52px;
  object-fit: contain;
}

.home-brand__eyebrow {
  color: var(--blue);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.05;
}

.home-brand__text h1,
.home-brand__text p {
  margin: 0;
}

.home-brand__text {
  padding-top: 2px;
  text-rendering: optimizeLegibility;
}

.home-brand__text h1 {
  margin-top: 5px;
  color: #16233c;
  font-family: "Aptos", "Segoe UI Semibold", "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.home-brand__text p {
  margin-top: 5px;
  color: #1c2942;
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  font-size: 0.89rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 280px));
  justify-content: center;
  gap: 20px;
  width: min(1420px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 28px;
}

.os-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 26px 22px 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d7e2f4;
  border-radius: 22px;
  box-shadow: 0 18px 34px rgba(30, 56, 111, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.os-card:hover,
.os-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(30, 56, 111, 0.12);
  outline: none;
}

.os-card.is-current-device {
  border-color: #a8c0ef;
  box-shadow: 0 24px 40px rgba(44, 86, 162, 0.16);
}

.os-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 11px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
  border-radius: 999px;
}

.os-card__icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-top: 20px;
  background: linear-gradient(180deg, #fbfdff, #f1f6ff);
  border: 1px solid #d7e2f4;
  border-radius: 22px;
}

.os-card__icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.os-card h2 {
  margin: 0;
  color: #081b3f;
  font-size: 1.15rem;
  font-weight: 800;
}

.os-card__link,
.os-card__download {
  font-weight: 800;
}

.os-card__link {
  color: var(--blue-dark);
  font-size: 0.98rem;
}

.os-card__download {
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .step-shell,
  .landing-grid {
    grid-template-columns: 1fr;
  }

  .step-media__frame {
    min-height: 240px;
  }

  .step-media__image-wrap--compact {
    justify-self: center;
  }

  .os-grid {
    grid-template-columns: repeat(2, minmax(220px, 260px));
  }
}

@media (max-width: 720px) {
  body.guide-page {
    padding: 0 0 18px;
  }

  .app-shell {
    width: calc(100% - 24px);
  }

  .guide-page .app-shell,
  .app-shell {
    padding: 12px;
    border-radius: 24px;
  }

  .guide-page .app-shell {
    margin-top: 14px;
  }

  .page-header,
  .landing-header,
  .progress-panel__top,
  .step-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-page .page-title {
    width: 100%;
    justify-content: center;
    padding: 10px 14px 11px;
    font-size: 0.96rem;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }

  .platform-select {
    justify-content: space-between;
  }

  .step-copy,
  .landing-hero,
  .landing-card {
    padding: 16px;
  }

  .step-button,
  .landing-button,
  .step-cta {
    width: 100%;
  }

  .step-actions,
  .landing-card__actions {
    flex-direction: column;
  }

  .home-header {
    padding: 9px 0 7px;
  }

  .home-brand {
    gap: 14px;
    width: calc(100% - 44px);
  }

  .home-brand__mark {
    height: 44px;
  }

  .home-brand__mark img {
    height: 44px;
  }

  .os-grid {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    padding: 18px 0 22px;
  }

  .os-card {
    max-width: 320px;
    margin: 0 auto;
  }
}
