/* Tutorial presentation. Creator badge styles remain in theme.css. */
:root {
  --guide-page: #f3f6fb;
  --guide-surface: #ffffff;
  --guide-soft: #f7f9fd;
  --guide-text: #24324a;
  --guide-muted: #627089;
  --guide-faint: #78869c;
  --guide-line: #e0e7f1;
  --guide-blue: #4267bd;
  --guide-blue-deep: #3156ae;
  --guide-blue-soft: #edf3ff;
  --guide-shadow: 0 6px 24px rgba(36, 62, 106, .035);
}

html { background: var(--guide-page); }
body {
  background:
    radial-gradient(ellipse 100% 540px at 50% 0, #eaf1fe 0, transparent 80%),
    var(--guide-page);
  color: var(--guide-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}
.wrap { width: min(1180px, calc(100% - 64px)); }

/* A quiet cover with a clear title hierarchy. */
.hero { padding: 56px 0 42px; }
.hero-title {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  justify-content: center;
  justify-items: start;
  text-align: left;
  color: #2c4d94;
  font-size: clamp(36px, 4.8vw, 58px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.hero-title-text { grid-column: 2; grid-row: 1; min-width: 0; white-space: normal; text-wrap: balance; }
.hero-logo-box {
  grid-column: 1;
  grid-row: 1;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(91, 126, 188, .15);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(52, 85, 147, .065);
}
.hero-logo { width: 43px; height: 43px; }
.hero-title-sub {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  margin-top: 0;
  text-align: left;
  color: var(--guide-blue);
  font-size: clamp(21px, 2.65vw, 29px);
  font-weight: 550;
  line-height: 1.55;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.hero-subtitle {
  max-width: 740px;
  margin: 18px auto 0;
  color: var(--guide-muted);
  font-size: 16px;
  line-height: 1.85;
}

/* Independent cards give the long guide a lighter reading rhythm. */
.sheet {
  margin-bottom: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.layout {
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 28px;
  padding: 0;
  align-items: start;
}
.step-nav {
  top: 24px;
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 17px 12px 12px;
  border: 1px solid var(--guide-line);
  border-radius: 16px;
  background: var(--guide-surface);
  box-shadow: var(--guide-shadow);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e5 transparent;
}
.step-nav h2 {
  margin: 0 12px 12px;
  color: var(--guide-faint);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .08em;
  line-height: 1.6;
}
.nav-list { gap: 3px; }
.nav-list a {
  align-items: baseline;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--guide-muted);
  font-size: 14px;
  line-height: 1.65;
  transition: color .15s ease, background-color .15s ease;
}
.nav-list .nav-num {
  min-width: 22px;
  color: var(--guide-blue);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--guide-blue-deep);
  background: var(--guide-blue-soft);
}
.content { min-width: 0; }

/* Preparation is intentionally compact and numbered in reading order. */
.advertisement {
  margin: 0 0 25px;
  padding: 17px 22px;
  border: 1px solid #d3e0f7;
  border-left: 4px solid #6686c6;
  border-radius: 14px;
  background: #eef4ff;
  color: #315079;
  font-size: 15px;
  line-height: 1.9;
}
.advertisement p { margin: 0; }
.advertisement strong { font-weight: 700; }
@media (max-width: 680px) {
  .advertisement { padding: 14px 17px; font-size: 14px; }
}
@media (prefers-color-scheme: dark) {
  .advertisement { background: #202e46; border-color: #3e557b; border-left-color: #89a9e7; color: #c9d9f5; }
}
.official-note.caution-note {
  background: #fff0f1;
  color: #9f2434;
  border: 1px solid #f4b8c0;
  border-left: 4px solid #df4057;
  font-size: 15px;
  line-height: 1.9;
}
.official-note.caution-note strong { color: #b32137; }
@media (max-width: 680px) {
  .official-note.caution-note { font-size: 14px; }
}
@media (prefers-color-scheme: dark) {
  .official-note.caution-note { background: #351d27; border-color: #78404d; border-left-color: #f47789; color: #ffd3da; }
  .official-note.caution-note strong { color: #ffaabc; }
}
.notice {
  margin-bottom: 16px;
  padding: 25px 30px;
  border: 1px solid #d7e3f7;
  border-radius: 18px;
  background: #f4f8ff;
  color: var(--guide-text);
  scroll-margin-top: 24px;
}
.notice strong {
  margin-bottom: 10px;
  color: var(--guide-blue-deep);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.5;
}
.preparation-list {
  display: block;
  margin: 10px 0 0;
  padding-left: 1.4em;
  list-style: decimal outside;
}
.notice .preparation-list li {
  margin: 5px 0;
  padding-left: 4px;
  font-size: 16px;
  line-height: 1.8;
}
.preparation-list li::marker {
  color: var(--guide-blue);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.notice .subnote {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid #dce6f6;
  color: var(--guide-muted);
  font-size: 14px;
  line-height: 1.85;
}
.official-note {
  margin: 0 0 25px;
  padding: 17px 22px;
  border: 1px solid #eee4d1;
  border-left: 3px solid #c69a51;
  border-radius: 12px;
  background: #fbf8f1;
  color: #7c6643;
  font-size: 14px;
  line-height: 1.85;
}
.official-note strong { font-weight: 650; }
.official-note a,
.sources a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Each step starts at the same left edge, including wide screenshots. */
.steps { gap: 24px; }
.step {
  padding: 30px 34px 32px;
  border: 1px solid var(--guide-line);
  border-radius: 18px;
  background: var(--guide-surface);
  box-shadow: var(--guide-shadow);
  scroll-margin-top: 24px;
}
.step::before { display: none; }
.step-heading {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 15px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--guide-line);
}
.step-heading::before {
  width: 42px;
  height: 42px;
  border: 1px solid #dce6fa;
  border-radius: 13px;
  background: var(--guide-blue-soft);
  color: var(--guide-blue-deep);
  box-shadow: none;
  font: 650 16px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.step-heading h2 {
  color: var(--guide-text);
  font-size: 23px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.step-body { margin-left: 0; }
.step-copy {
  margin-bottom: 24px;
  color: var(--guide-text);
  font-size: 17px;
  line-height: 1.9;
}
.step-copy p + p { margin-top: 14px; }
.step-copy .subnote,
.subnote {
  color: var(--guide-muted);
  font-size: 14px;
  line-height: 1.85;
}
.step-reminder {
  padding: 13px 16px;
  font-size: 15px;
  line-height: 1.8;
}
.visual-stack { gap: 25px; }
.shot {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--guide-line);
  border-radius: 14px;
  background: var(--guide-soft);
}
.shot img,
.shot-wide img,
.shot-medium img,
.shot-small img {
  width: auto;
  max-width: 100%;
  max-height: 760px;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--guide-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(33, 49, 76, .045);
}
.shot:hover img,
.shot:focus-visible img {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(33, 49, 76, .09);
}
figcaption {
  max-width: 100%;
  margin: 11px auto 0;
  color: var(--guide-faint);
  font-size: 13px;
  line-height: 1.75;
}
figcaption svg { margin-top: 3px; color: var(--guide-blue); }
.code-row {
  gap: 12px;
  margin: 17px 0;
  padding: 11px 14px;
  border: 1px solid var(--guide-line);
  border-radius: 10px;
  background: var(--guide-soft);
}
.code-row code {
  min-width: 0;
  color: var(--guide-blue-deep);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.7;
}
.copy-code {
  min-height: 34px;
  padding: 4px 12px;
  border-color: var(--guide-line);
  background: var(--guide-surface);
  color: var(--guide-muted);
  font-size: 13px;
  white-space: nowrap;
}
.copy-code:hover { color: var(--guide-blue-deep); border-color: #aabfe7; }
.plan-link {
  padding: 9px 15px;
  border-color: #dce6fa;
  border-radius: 9px;
  background: var(--guide-blue-soft);
  color: var(--guide-blue-deep);
  font-size: 14px;
  font-weight: 600;
}
.plan-link:hover { border-color: #aabfe7; }
.step-body > .code-row { margin: 0 0 18px; }
.step-body > .plan-link { margin: 0 0 22px; }
.step-body > .code-row + .plan-link { margin-top: -5px; }

.completion {
  margin-top: 24px;
  padding: 25px 30px;
  border: 1px solid #d7e6e0;
  border-radius: 18px;
  background: #f1f8f5;
}
.completion h2 { margin-bottom: 15px; font-size: 21px; font-weight: 650; }
.completion h2 svg { width: 24px; height: 24px; }
.completion ul { gap: 9px; }
.completion li { gap: 10px; color: var(--guide-text); font-size: 15px; line-height: 1.85; }
.check-badge { width: 22px; height: 22px; margin-top: 3px; }
.check-badge svg { width: 12px; height: 12px; }
.sources {
  margin-top: 30px;
  padding: 23px 3px 0;
  border-color: var(--guide-line);
  color: var(--guide-muted);
  font-size: 14px;
  line-height: 1.9;
}
.sources h2 { margin-bottom: 10px; color: var(--guide-text); font-size: 17px; font-weight: 650; }
.sources p { margin: 0 0 10px; }
.sources ul { margin: 8px 0 14px; padding-left: 1.3em; }
.sources li { margin: 4px 0; }
.sources .source-date { color: var(--guide-faint); font-size: 12px; }
footer { padding-bottom: 32px; color: var(--guide-faint); font-size: 13px; line-height: 1.8; }
footer a { text-underline-offset: 3px; }
dialog { border-color: var(--guide-line); background: var(--guide-surface); }
.dialog-bar { border-color: var(--guide-line); background: var(--guide-surface); }
.close { border-color: var(--guide-line); background: var(--guide-soft); color: var(--guide-text); }

@media (max-width: 1050px) and (min-width: 901px) {
  .wrap { width: calc(100% - 40px); }
  .layout { grid-template-columns: 210px minmax(0, 1fr); gap: 22px; }
  .step { padding: 26px; }
  .notice { padding: 23px 26px; }
}
@media (max-width: 900px) {
  .wrap { width: min(760px, calc(100% - 40px)); }
  .hero { padding: 42px 0 30px; }
  .layout { grid-template-columns: 1fr; gap: 20px; padding: 0; }
  .step-nav { position: static; max-height: none; overflow: visible; padding: 14px 12px 9px; }
  .step-nav h2 { margin: 0 6px 9px; font-size: 12px; }
  .nav-list { gap: 7px; padding: 1px 1px 6px; }
  .nav-list a {
    min-height: 38px;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid var(--guide-line);
    border-radius: 999px;
    background: var(--guide-surface);
    font-size: 13px;
  }
  .nav-list .nav-num { min-width: auto; font-size: 11px; }
  .step { scroll-margin-top: 16px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 28px); }
  body { font-size: 17px; }
  .hero { padding: 30px 0 25px; }
  .hero-title { grid-template-columns: 50px minmax(0, 1fr); column-gap: 10px; row-gap: 7px; font-size: clamp(26px, 7.5vw, 40px); letter-spacing: -.025em; }
  .hero-logo-box { width: 50px; height: 50px; border-radius: 50%; }
  .hero-logo { width: 32px; height: 32px; }
  .hero-title-sub { margin-top: 0; font-size: 19px; line-height: 1.6; }
  .hero-subtitle { margin-top: 14px; font-size: 14px; line-height: 1.9; }
  .layout { gap: 16px; }
  .step-nav { border-radius: 14px; }
  .notice { padding: 21px 20px; border-radius: 15px; }
  .notice strong { font-size: 20px; }
  .notice .preparation-list li { font-size: 16px; margin: 6px 0; }
  .notice .subnote { margin-top: 13px; padding-top: 11px; font-size: 14px; }
  .official-note { margin-bottom: 20px; padding: 14px 17px; font-size: 13px; }
  .steps { gap: 18px; }
  .step { padding: 23px 19px 24px; border-radius: 15px; }
  .step-heading { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; margin-bottom: 18px; padding-bottom: 17px; }
  .step-heading::before { width: 36px; height: 36px; border-radius: 11px; font-size: 14px; }
  .step-heading h2 { font-size: 20px; line-height: 1.5; }
  .step-copy { margin-bottom: 20px; font-size: 16px; line-height: 1.9; }
  .step-copy p + p { margin-top: 12px; }
  .step-copy .subnote { font-size: 13px; }
  .visual-stack { gap: 21px; }
  .shot { padding: 5px; border-radius: 10px; }
  .shot img { max-height: none; border-radius: 6px; }
  figcaption { font-size: 12px; line-height: 1.75; }
  figcaption svg { width: 15px; height: 15px; }
  .code-row { gap: 8px; padding: 10px 12px; }
  .code-row code { font-size: 12px; }
  .copy-code { padding-inline: 10px; font-size: 12px; }
  .plan-link { font-size: 13px; }
  .completion { padding: 22px 20px; border-radius: 15px; }
  .completion h2 { font-size: 20px; }
  .completion li { font-size: 14px; }
  .sources { margin-top: 24px; padding-top: 20px; font-size: 13px; }
  .sources h2 { font-size: 16px; }
  footer { font-size: 12px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --guide-page: #101722;
    --guide-surface: #172130;
    --guide-soft: #1b2739;
    --guide-text: #e0e7f2;
    --guide-muted: #adbbcf;
    --guide-faint: #8f9eb5;
    --guide-line: #2b3a50;
    --guide-blue: #9dbbff;
    --guide-blue-deep: #b3cbff;
    --guide-blue-soft: #253650;
    --guide-shadow: 0 5px 22px rgba(0, 0, 0, .08);
  }
  body {
    background:
      radial-gradient(ellipse 100% 540px at 50% 0, #1b2c49 0, transparent 80%),
      var(--guide-page);
  }
  .hero-title { color: #d6e4ff; }
  .hero-logo-box { border-color: #d9e3f5; box-shadow: 0 6px 22px rgba(0, 0, 0, .1); }
  .step-nav { scrollbar-color: #455774 transparent; }
  .notice { border-color: #344e76; background: #1b2b43; }
  .notice .subnote { border-color: #344763; }
  .official-note { border-color: #524733; border-left-color: #a98b56; background: #2a261f; color: #d2c2a4; }
  .step-heading::before,
  .plan-link { border-color: #3a5072; }
  .shot:hover img,
  .shot:focus-visible img { box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
  .completion { border-color: #36564d; background: #1a302a; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-list a,
  .shot img { transition: none; }
  .shot:hover img,
  .shot:focus-visible img { transform: none; }
}
