:root {
  --navy: #153b5b;
  --navy-deep: #0c2b45;
  --gold: #ffd447;
  --gold-soft: #fff4bd;
  --cream: #fffdf7;
  --paper: #ffffff;
  --ink: #17202a;
  --muted: #4b5563;
  --teal: #00766e;
  --line: #d9e1e7;
  --red-soft: #fff0ed;
  --red: #8f251f;
  --shadow: 0 14px 34px rgba(21, 59, 91, 0.13);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f3f8fb;
  font-family: "Nunito", system-ui, sans-serif;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: var(--navy); }
button, a { font: inherit; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 10px 14px; background: var(--navy); color: white; }
.skip-link:focus { top: 12px; }

.guide-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 10px max(18px, calc((100vw - 1120px) / 2));
  border-bottom: 4px solid var(--gold);
  background: rgba(255, 255, 255, 0.97);
}
.guide-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.guide-brand span { display: grid; line-height: 1.05; }
.guide-brand strong { font-family: "Baloo 2", sans-serif; font-size: 1.25rem; }
.guide-brand small { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.guide-header-actions { display: flex; gap: 8px; }
.guide-button {
  min-height: 42px;
  padding: 8px 16px;
  border: 2px solid var(--navy);
  border-radius: 12px;
  background: var(--navy);
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.guide-button-light { background: white; color: var(--navy); }
.guide-button-return { border-color: var(--gold); color: var(--navy-deep); background: var(--gold); }

main { width: min(100% - 32px, 1040px); margin: 0 auto; padding: 58px 0 90px; }
.guide-intro { max-width: 780px; margin: 0 auto 32px; text-align: center; }
.guide-kicker, .step-label { margin: 0 0 6px; color: var(--teal); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { color: var(--navy-deep); font-family: "Baloo 2", sans-serif; line-height: 1.08; }
h1 { margin-bottom: 18px; font-size: clamp(2.3rem, 6vw, 4.4rem); }
h2 { margin-bottom: 16px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { margin: 24px 0 8px; color: var(--navy); font-size: 1.1rem; }
.guide-lead { margin: 0 auto 24px; color: var(--muted); font-size: 1.15rem; }
.guide-note, .guide-warning, .guide-success { padding: 18px 20px; border-radius: 16px; text-align: left; }
.guide-note { border: 2px solid var(--gold); background: var(--gold-soft); }
.guide-note p, .guide-warning p, .guide-success p { margin: 4px 0 0; }

.guide-contents {
  margin: 0 auto 34px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}
.guide-contents strong { color: var(--navy); }
.guide-contents ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; margin: 10px 0 0; padding-left: 24px; }
.guide-contents a { font-weight: 700; }

.guide-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  margin-top: 34px;
  padding: 42px;
  scroll-margin-top: 98px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.step-number {
  position: absolute;
  top: -18px;
  left: 28px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  font-family: "Baloo 2", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(21, 59, 91, 0.18);
}
.step-copy ol, .step-copy ul { margin: 0; padding-left: 22px; }
.step-copy li + li { margin-top: 8px; }
.step-copy-after { grid-column: 1; }
figure { align-self: start; margin: 0; overflow: hidden; border: 1px solid #cbd7df; border-radius: 16px; background: #eef4f7; }
figure img { width: 100%; height: auto; }
figcaption { padding: 10px 14px; color: var(--muted); background: white; font-size: 0.86rem; }
.step-tip { margin: 18px 0 0; padding: 13px 15px; border-left: 4px solid var(--gold); background: var(--gold-soft); }
.guide-warning { align-self: start; border: 2px solid #efb4a8; background: var(--red-soft); color: var(--red); }
.guide-success { align-self: start; border: 2px solid #83c9bc; background: #eaf9f5; color: #075d56; }

footer { display: flex; align-items: center; justify-content: center; gap: 12px 22px; padding: 28px 20px; border-top: 4px solid var(--gold); background: white; color: var(--muted); }
footer p { margin: 0; font-weight: 800; }
footer a { font-weight: 800; }

.guide-scroll-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 6;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.guide-scroll-top[hidden] { display: none; }
.guide-scroll-top:hover { background: var(--navy-deep); }
.guide-scroll-top:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.guide-scroll-top span { font-size: 1.7rem; font-weight: 900; line-height: 1; transform: translateY(-1px); }

@media (max-width: 760px) {
  .guide-header { position: static; flex-wrap: wrap; align-items: flex-start; padding: 10px 14px; }
  .guide-brand small { display: none; }
  .guide-header-actions { width: 100%; align-items: stretch; }
  .guide-button { display: grid; flex: 1; place-items: center; padding-inline: 8px; font-size: 0.78rem; text-align: center; }
  main { width: min(100% - 22px, 1040px); padding-top: 38px; }
  .guide-contents ol { grid-template-columns: 1fr; }
  .guide-step { grid-template-columns: 1fr; gap: 22px; padding: 38px 18px 22px; }
  .step-copy-after { grid-column: auto; }
  footer { flex-wrap: wrap; }
}

@media print {
  @page { size: A4; margin: 13mm; }
  body { background: white; font-size: 10pt; }
  .guide-header, .guide-contents, .guide-scroll-top, .skip-link, footer { display: none; }
  main { width: 100%; padding: 0; }
  .guide-intro { margin-bottom: 16px; }
  h1 { font-size: 27pt; }
  .guide-step { display: block; margin: 16px 0 0; padding: 25px 20px 18px; border: 1px solid #aebbc4; box-shadow: none; break-inside: avoid; }
  .step-copy, figure, .guide-warning, .guide-success { margin-bottom: 12px; }
  figure { max-width: 150mm; margin-inline: auto; }
  .step-number { top: -12px; width: 34px; height: 34px; font-size: 1rem; }
  a { color: inherit; text-decoration: none; }
}
