:root {
  color-scheme: light;
  font-family: "Segoe UI", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy-950: #091321;
  --navy-900: #0d1b2b;
  --navy-800: #14263a;
  --navy-700: #21374b;
  --slate-600: #516477;
  --slate-500: #687b8e;
  --slate-400: #94a4b3;
  --line: #dce4e9;
  --paper: #f3f6f7;
  --white: #ffffff;
  --cyan: #16b9b4;
  --cyan-bright: #39d4d0;
  --cyan-tint: #e5f7f6;
  --amber: #dc9a43;
  --radius: 1.125rem;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--navy-950); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--navy-900);
  background: var(--navy-950);
}

button, a { font: inherit; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.site-frame {
  display: grid;
  grid-template-columns: minmax(15rem, 19.5rem) minmax(0, 1fr);
  width: min(100%, 94rem);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 5rem rgb(0 0 0 / 20%);
}

.guide-rail {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 2.25rem 1.65rem 1.5rem;
  color: #eff7fa;
  background:
    linear-gradient(155deg, rgb(57 212 208 / 5%), transparent 38%),
    var(--navy-950);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 0.8rem;
  background: #fff;
}

.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }

.brand-word {
  display: grid;
  gap: 0.15rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-word span {
  color: #9aabba;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.17em;
}

.rail-heading { margin: 4.25rem 0 1.85rem; }

.overline,
.header-context,
.step-eyebrow,
.count-caption {
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.overline {
  margin: 0 0 0.75rem;
  color: var(--cyan-bright);
}

.rail-heading h1 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: 0.01em;
}

.rail-description {
  margin: 0.65rem 0 0;
  color: #b4c1cd;
  font-size: 0.95rem;
  line-height: 1.65;
}

.step-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  min-height: 3.2rem;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  color: #acbac7;
  font-size: 0.92rem;
  line-height: 1.4;
}

.step-list li[aria-current="step"] {
  border-color: rgb(57 212 208 / 20%);
  color: #f7ffff;
  background: rgb(57 212 208 / 10%);
}

.step-number {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid #405268;
  border-radius: 50%;
  color: #c1cdd6;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.step-list li[aria-current="step"] .step-number {
  border-color: var(--cyan-bright);
  color: var(--navy-950);
  background: var(--cyan-bright);
  font-weight: 800;
}

.step-list li.is-complete .step-number {
  border-color: rgb(57 212 208 / 48%);
  color: var(--cyan-bright);
}

.rail-bottom {
  margin-top: auto;
  padding-top: 2rem;
}

.rail-rule {
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--cyan);
}

.rail-bottom p {
  max-width: 15rem;
  margin: 0.8rem 0 0;
  color: #9aaab8;
  font-size: 0.8rem;
  line-height: 1.6;
}

.main-panel {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
  padding: 2.2rem clamp(1.25rem, 5vw, 5rem) 1.75rem;
  background:
    radial-gradient(ellipse at 92% 0%, rgb(22 185 180 / 5%), transparent 22rem),
    var(--paper);
}

.main-header {
  display: flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-context {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--slate-600);
}

.status-mark {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0.25rem rgb(22 185 180 / 12%);
}

.step-count {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--navy-900);
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.count-caption {
  color: var(--slate-500);
  font-size: 0.66rem;
}

.progress-track {
  height: 0.3rem;
  margin-top: 1.45rem;
  overflow: hidden;
  border-radius: 99px;
  background: #dfe7e9;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #36c8c3);
  transition: width 220ms ease;
}

.content-panel {
  display: flex;
  width: min(100%, 55rem);
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  padding: 3rem 0 2.5rem;
}

.step-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: #087f7c;
}

.step-eyebrow::before {
  width: 1.55rem;
  height: 2px;
  background: var(--cyan);
  content: "";
}

.page-title {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(2rem, 4.3vw, 3.4rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.2;
  text-wrap: balance;
}

.lead {
  max-width: 43rem;
  margin: 1.35rem 0 0;
  color: var(--navy-800);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  font-weight: 590;
  line-height: 1.8;
  text-wrap: pretty;
}

.body-copy {
  max-width: 45rem;
  margin-top: 1.15rem;
  color: var(--slate-600);
  font-size: 1rem;
  line-height: 1.9;
}

.body-copy p { margin: 0 0 0.8rem; }
.body-copy p:last-child { margin-bottom: 0; }

.resource-section { margin-top: 2rem; }

.resource-heading {
  margin: 0 0 0.75rem;
  color: var(--slate-600);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
}

.resource-card {
  display: flex;
  min-height: 5.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: var(--navy-900);
  background: var(--white);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

a.resource-card:hover {
  transform: translateY(-1px);
  border-color: #80cfcc;
  box-shadow: 0 0.4rem 1.2rem rgb(9 19 33 / 6%);
}

.resource-copy { display: grid; gap: 0.25rem; }

.resource-title {
  font-size: 0.98rem;
  font-weight: 740;
}

.resource-description {
  color: var(--slate-500);
  font-size: 0.83rem;
  line-height: 1.5;
}

.resource-state {
  flex: 0 0 auto;
  padding: 0.34rem 0.52rem;
  border: 1px solid #d8e2e7;
  border-radius: 99px;
  color: var(--slate-500);
  background: #f5f8f9;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

a.resource-card .resource-state {
  border-color: #bce6e3;
  color: #087f7c;
  background: var(--cyan-tint);
}

.resource-arrow {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: #087f7c;
}

.checklist {
  display: grid;
  gap: 0.65rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.check-item {
  display: flex;
  min-height: 3.6rem;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--white);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.check-item:has(input:checked) {
  border-color: #a4dcd9;
  background: #f1fbfa;
}

.check-item input {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #0b9f9b;
  cursor: pointer;
}

.check-item span {
  color: var(--navy-800);
  font-size: 0.98rem;
  line-height: 1.55;
}

.notice {
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--amber);
  border-radius: 0 0.55rem 0.55rem 0;
  color: #655039;
  background: #fbf5ec;
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-line;
}

.completion-panel {
  padding: 1.5rem 1.6rem;
  border: 1px solid #bee6e3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff 45%, #effafa);
}

.completion-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 50%;
  color: #087f7c;
  background: var(--cyan-tint);
  font-size: 1.25rem;
  font-weight: 800;
}

.completion-message {
  max-width: 42rem;
  margin: 1.2rem 0 0;
  color: var(--slate-600);
  font-size: 1rem;
  line-height: 1.85;
}

.loading-state,
.error-state {
  display: grid;
  min-height: 12rem;
  place-content: center;
  justify-items: center;
  gap: 0.8rem;
  color: var(--slate-600);
  text-align: center;
}

.loading-state p,
.error-state p { margin: 0; line-height: 1.7; }

.loading-mark {
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid #c9d8dc;
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: rotate 800ms linear infinite;
}

.main-footer {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid #dce4e8;
  padding-top: 1.1rem;
}

.storage-note {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.82rem;
  line-height: 1.5;
}

.navigation-actions { display: flex; align-items: center; gap: 0.65rem; }

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  padding: 0.72rem 1rem;
  font-size: 0.94rem;
  font-weight: 720;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.button svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.button-back { border-color: #ccd8df; color: var(--navy-800); background: transparent; }
.button-back:hover:not(:disabled) { border-color: #9eb0bb; background: #fff; }
.button-next { min-width: 7.2rem; color: #fff; background: var(--navy-900); }
.button-next:hover:not(:disabled) { transform: translateY(-1px); background: #16334a; }
.button:disabled { opacity: 0.42; cursor: not-allowed; }

@keyframes rotate { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  .site-frame { grid-template-columns: 14.5rem minmax(0, 1fr); }
  .guide-rail { padding-right: 1.15rem; padding-left: 1.15rem; }
  .main-panel { padding-right: clamp(1.1rem, 3.5vw, 2rem); padding-left: clamp(1.1rem, 3.5vw, 2rem); }
}

@media (max-width: 640px) {
  .site-frame { display: flex; min-height: 100vh; flex-direction: column; }
  .guide-rail { min-height: 0; padding: 1rem 1rem 0.85rem; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .brand-word { font-size: 0.82rem; }
  .rail-heading { margin: 1.2rem 0 0.8rem; }
  .rail-heading h1 { font-size: 1.28rem; }
  .overline { margin-bottom: 0.35rem; font-size: 0.68rem; }
  .rail-description { margin-top: 0.25rem; font-size: 0.84rem; }
  .step-navigation { overflow-x: auto; margin: 0 -0.25rem; padding: 0.15rem 0.25rem 0.3rem; }
  .step-list { width: max-content; grid-auto-columns: minmax(2.55rem, auto); grid-auto-flow: column; gap: 0.35rem; }
  .step-list li { display: grid; min-width: 2.65rem; min-height: 2.65rem; grid-template-columns: 1fr; justify-items: center; gap: 0; padding: 0.15rem; }
  .step-list li > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .step-number { width: 1.85rem; height: 1.85rem; }
  .rail-bottom { display: none; }
  .main-panel { min-height: 0; flex: 1; padding: 1.2rem 1rem 1rem; }
  .header-context { font-size: 0.67rem; }
  .progress-track { margin-top: 1rem; }
  .content-panel { justify-content: flex-start; padding: 2.2rem 0 2rem; }
  .page-title { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .lead { margin-top: 1rem; font-size: 1.05rem; }
  .resource-section { margin-top: 1.5rem; }
  .resource-grid { grid-template-columns: 1fr; }
  .main-footer { align-items: flex-end; gap: 0.7rem; }
  .storage-note { max-width: 10rem; font-size: 0.75rem; }
  .navigation-actions { gap: 0.45rem; }
  .button { min-height: 2.85rem; padding: 0.65rem 0.8rem; }
  .button-next { min-width: 6.1rem; }
}

@media (max-width: 380px) {
  .main-footer { align-items: stretch; flex-direction: column; }
  .storage-note { max-width: none; }
  .navigation-actions { justify-content: space-between; }
  .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
