@font-face {
  font-family: Inter;
  src: url("/assets/Inter-Variable.v3.29160a80ff49.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f4f7fb;
  --panel: #fff;
  --line: #d9e1ed;
  --line-strong: #bac7db;
  --text: #162033;
  --muted: #55627a;
  --brand: #2f67f6;
  --brand-deep: #173a8e;
  --brand-soft: #eaf1ff;
  --button: #2458dc;
  --warm: #fff1da;
  font-family: "Avenir Next", Inter, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
}

a { color: inherit; }
button, select { font: inherit; }
button, select, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--button); outline-offset: 4px; }

.guide-icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell { width: min(calc(100% - 64px), 1192px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--panel); }

.header-inner, .header-inner nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-inner { min-height: 69px; justify-content: space-between; }
.header-inner a { text-decoration: none; }
.header-inner nav { font-size: .9rem; color: var(--muted); font-weight: 600; }
.header-inner nav a:hover { color: var(--brand-deep); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: Inter, "Avenir Next", sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1;
}

.brand img { display: block; object-fit: contain; }

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-deep);
}

.app-link:hover { background: var(--brand-soft); }
.intro { padding: 42px 0 28px; }
.intro h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 750;
}

.intro p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide { padding-bottom: 36px; }
.guide.is-interactive {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.step-nav {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 10px;
}

.nav-group + .nav-group { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 7px; }
.nav-group h2 {
  margin: 10px 10px 6px;
  color: var(--muted);
  font-size: .77rem;
  font-weight: 700;
}

.nav-group ol { list-style: none; padding: 0; margin: 0; }
.nav-group a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 600;
}

.nav-group a:hover { background: var(--background); color: var(--text); }
.nav-group a[aria-current="step"] {
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-weight: 700;
}

.step-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}

[aria-current="step"] .step-number {
  border-radius: 50%;
  background: var(--button);
  color: #fff;
}

.guide-status {
  margin-bottom: 15px;
}

.status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
  font-size: .81rem;
  font-weight: 650;
}

#chapter-label { color: var(--brand-deep); }
#step-count { color: var(--muted); font-variant-numeric: tabular-nums; }

progress {
  display: block;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  color: var(--brand);
  background: var(--line);
}

progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }

.step-picker { display: none; }
.guide-step {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
}

.guide:not(.is-interactive) .guide-step + .guide-step { margin-top: 20px; }
.step-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 42px);
}

.step-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.step-mascot {
  display: block;
  align-self: flex-start;
  flex: none;
  width: clamp(62px, 8vw, 96px);
  height: auto;
}

.step-copy h2 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(1.8rem, 3.15vw, 2.65rem);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -.04em;
}

.step-copy h2:focus { outline: none; }
.overview-copy h2 { max-width: 17ch; font-size: clamp(1.95rem, 3.45vw, 2.95rem); }
.overview-copy h2 span { white-space: nowrap; }
.overview-copy h2 em { color: var(--brand-deep); font-style: normal; }
.step-copy p { margin: 0 0 13px; max-width: 48ch; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.step-copy strong { color: var(--text); font-weight: 700; }
.text-link { color: var(--brand-deep); text-underline-offset: .2em; }
.rate-details { padding: 10px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.rate-details summary { color: var(--brand-deep); font-weight: 650; }
.rate-details p { margin: 9px 0 0; font-size: .88rem; }

.frame-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.frame-options button {
  min-height: 38px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 650;
}

.frame-options button:hover { border-color: var(--brand); color: var(--brand-deep); }
.frame-options button[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
}

.step-visual {
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 21px 18px 14px;
  border-left: 1px solid var(--line);
  background: var(--brand-soft);
}

.setup-visual {
  min-height: 420px;
  padding: clamp(20px, 3vw, 38px);
}

.routine, .platform-panel {
  width: min(100%, 360px);
  padding: clamp(17px, 2.2vw, 26px);
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
}

.routine h3, .platform-panel h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.routine ol { margin: 0; padding: 0; list-style: none; }
.routine li {
  position: relative;
  padding: 12px 0 12px 41px;
  border-top: 1px solid var(--line);
}

.routine li:last-child { padding-bottom: 0; }
.routine-number {
  position: absolute;
  top: 12px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--warm);
  color: var(--text);
  font-size: .78rem;
  font-weight: 750;
}

.routine li strong { display: block; margin: 3px 0 5px; font-size: .91rem; }
.routine li p, .platform-panel li {
  margin: 0;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.55;
}

.platform-panel + .platform-panel:not([hidden]) { margin-top: 14px; }
.platform-panel ol { margin: 0; padding-inline-start: 20px; }
.platform-panel li + li { margin-top: 8px; }
.platform-panel li::marker { color: var(--brand-deep); font-weight: 650; }
.platform-panel li strong { color: var(--text); }
.platform-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 18px; font-size: .8rem; }
.platform-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--button);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.platform-primary:hover { background: var(--brand-deep); }

.frame { display: grid; justify-items: center; gap: 9px; width: 100%; margin: 0; }
.frame + .frame:not([hidden]) { margin-top: 12px; }

.screenshot-link {
  display: block;
  width: min(100%, 238px);
  border-radius: 19px;
  padding: 4px;
  border: 1px solid #374151;
  background: var(--text);
  box-shadow: 0 12px 25px #17203329;
  cursor: zoom-in;
}

.screenshot-link:hover { outline: 2px solid var(--brand); outline-offset: 3px; }
.screenshot-link img { display: block; width: 100%; height: auto; border-radius: 14px; }
.frame figcaption {
  min-height: 2.7em;
  width: min(100%, 33ch);
  color: var(--muted);
  text-align: center;
  font-size: .8rem;
  line-height: 1.35;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.pagination a {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 680;
}

.back { border: 1px solid var(--line-strong); color: var(--brand-deep); background: var(--panel); }
.back:hover { background: var(--brand-soft); }
.back[aria-disabled="true"] { cursor: default; opacity: .44; }
.next { margin-left: auto; background: var(--button); color: #fff; }
.next:hover { background: var(--brand-deep); }

.guide-help {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}
.guide-help strong { color: var(--text); }
.guide-help .guide-icon { vertical-align: -.19em; color: var(--brand-deep); }

dialog {
  width: min(94vw, 460px);
  max-height: 95dvh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  background: var(--panel);
}

dialog::backdrop { background: #162033a6; }
.zoom-panel { display: grid; justify-items: center; padding: 12px 18px; }
.zoom-close { display: grid; place-items: center; justify-self: end; min-width: 41px; min-height: 41px; border: 1px solid var(--line); border-radius: 50%; color: var(--brand-deep); background: var(--brand-soft); }
#zoom-image { display: block; max-width: 100%; max-height: 76dvh; height: auto; object-fit: contain; }
#zoom-caption { margin: 8px 0 0; color: var(--muted); text-align: center; font-size: .84rem; }

@media (max-width: 920px) {
  .shell { width: min(calc(100% - 40px), 1192px); }
  .guide.is-interactive { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step-nav { display: none; }
  .step-picker:not([hidden]) { display: grid; gap: 5px; margin-bottom: 13px; color: var(--muted); font-size: .8rem; }
  .step-picker select { min-height: 44px; width: 100%; padding: 6px 11px; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px; }
}

@media (max-width: 575px) {
  .shell { width: calc(100% - 28px); }
  .header-inner, .header-inner nav { gap: 12px; }
  .header-inner { min-height: 59px; }
  .brand { gap: 6px; font-size: .82rem; letter-spacing: .035em; }
  .brand img { width: 33px; height: 15px; }
  .header-inner nav { font-size: .78rem; }
  .app-link { gap: 4px; padding: 7px 8px; white-space: nowrap; }
  .intro { padding: 28px 0 23px; }
  .intro p { font-size: .9rem; }
  .guide-step { grid-template-columns: minmax(0, 1fr); border-radius: 15px; }
  .step-heading { gap: 8px; margin-bottom: 11px; }
  .step-copy h2 { max-width: 20ch; }
  .step-mascot { width: clamp(52px, 16vw, 74px); }
  .step-visual { border-left: 0; border-top: 1px solid var(--line); }
  .setup-visual { min-height: auto; }
  .frame-options button { min-height: 42px; }
  .pagination { position: sticky; bottom: 0; z-index: 1; padding: 8px 0 max(8px, env(safe-area-inset-bottom)); background: var(--background); }
}
