:root {
  color-scheme: light;
  --bg: #f2f7fc;
  --panel: #ffffff;
  --border: #d0e2f2;
  --text: #0a1e3d;
  --muted: #4a6d8f;
  --primary: #1A88C8;
  --primary-strong: #0f5b8c;
  --ok: #2d9b6f;
  --warn: #b37700;
  --error: #b33a57;
  --stage-dark: #0a1628;
  --stage-mid: #142a4a;
  --hero-text: #f4f9ff;
  --hero-muted: #b8cfe0;
  --hero-accent: #8fd1ff;
  --hero-card-bg: #0f2240;
  --hero-card-light: #162d50;
  --hero-pill-bg: #1a3358;
  --hero-border: #1e3d66;
  --toc-bg: #ffffff;
  --toc-link-bg: #f4f9fd;
  --toc-link-active: #e7f2fb;
  --toc-link-hover: #edf6fd;
  --toc-rail: #d6e5f1;
  --image-hover-shadow: 0 18px 38px rgba(10, 22, 40, 0.22);
  --lightbox-backdrop: rgba(10, 22, 40, 0.88);
  --lightbox-surface: #0d1a30;
  --lightbox-border: #1e3d66;
  --lightbox-control: #163a5e;
  --lightbox-control-hover: #1f4d7b;
  --lightbox-caption: #d0e4f4;
  --lightbox-caption-muted: #8fb4d1;
  --hero-shadow: 0 24px 64px rgba(5, 12, 24, 0.38);
  --shadow-sm: 0 2px 12px rgba(10, 30, 61, 0.06);
  --shadow-md: 0 8px 28px rgba(10, 30, 61, 0.10);
  --shadow-lg: 0 18px 50px rgba(10, 22, 40, 0.24);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.toc-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

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

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

code {
  display: inline;
  padding: 2px 6px;
  border-radius: 6px;
  background: #e0f0fa;
  color: var(--primary-strong);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95em;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.guide-page {
  min-height: 100vh;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  padding: 24px 0 74px;
  background: linear-gradient(145deg, var(--stage-dark) 0%, var(--stage-mid) 52%, var(--primary) 100%);
}

.hero-inner,
.content-wrap,
.footer-shell {
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 34px 30px;
  border-radius: 32px;
  background: var(--hero-card-bg);
  border: 1px solid var(--hero-border);
  box-shadow: var(--hero-shadow);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a5a8a 0%, transparent 70%);
  pointer-events: none;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--hero-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  color: var(--hero-text);
}

.hero-brand {
  color: #ffffff;
  white-space: nowrap;
}

.hero-lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--hero-muted);
  font-size: 17px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--hero-pill-bg);
  border: 1px solid var(--hero-border);
  color: var(--hero-text);
  font-size: 13px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hero-border);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26, 136, 200, 0.3);
}

.hero-btn.primary {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--primary-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero-btn.secondary {
  background: var(--hero-pill-bg);
  border-color: var(--hero-border);
  color: var(--hero-text);
}

.mode-preview {
  display: grid;
  gap: 16px;
}

.mode-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--hero-card-light);
  border: 1px solid var(--hero-border);
}

.mode-card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--hero-pill-bg);
  color: var(--hero-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mode-card h3 {
  margin: 10px 0 8px;
  font-size: 22px;
  line-height: 1.15;
  color: var(--hero-text);
}

.mode-card p {
  margin: 0;
  color: var(--hero-muted);
  font-size: 14px;
}

.mode-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.mode-card li {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--hero-muted);
}

.hero-stage code,
.mode-card code {
  background: #1a3a5e;
  color: var(--hero-accent);
}

.content-wrap {
  margin-top: -48px;
  padding-bottom: 56px;
}

.guide-layout {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
}

.toc-mobile-btn {
  display: none;
}

.toc-card {
  position: static;
  padding: 14px;
  border-radius: 18px;
  background: var(--toc-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.toc-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.toc-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.toc-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f3f8fc;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.toc-shortcut:hover {
  background: #ebf4fb;
  border-color: #c8dced;
  transform: translateY(-1px);
}

.toc-current {
  margin: 14px 0 0;
  padding: 2px 2px 0;
  color: var(--text);
  font-size: 13px;
}

.toc-current-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.toc-group {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 1px solid var(--toc-rail);
}

.toc-group-title {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toc-links {
  display: grid;
  gap: 2px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.toc-link:hover {
  transform: none;
  border-color: transparent;
  background: var(--toc-link-hover);
}

.toc-link.active {
  border-color: transparent;
  background: var(--toc-link-active);
  color: var(--primary-strong);
  box-shadow: inset 2px 0 0 var(--primary);
}

.toc-index {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d7e7f3;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

.toc-link.active .toc-index {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.guide-main {
  display: grid;
  gap: 24px;
}

.guide-section {
  scroll-margin-top: 88px;
}

.section-panel {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 14px 32px rgba(10, 30, 61, 0.08);
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}

.section-lead {
  margin: 12px 0 0;
  max-width: 860px;
  color: var(--muted);
  font-size: 16px;
}

.cards-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.cards-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shot-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.shot-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card,
.step-card,
.check-card,
.recipe-card {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.info-card:hover,
.step-card:hover,
.check-card:hover,
.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.info-card h3,
.step-card h3,
.check-card h3,
.recipe-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.2;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.scenario-card ul {
  flex: 1 1 auto;
}

.scenario-action {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.scenario-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--toc-link-active);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.scenario-link:hover {
  transform: translateY(-1px);
  background: var(--toc-link-hover);
  box-shadow: var(--shadow-sm);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-full);
  background: #e0f0fa;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.info-card p,
.step-card p,
.check-card p,
.recipe-card p {
  margin: 0;
  color: var(--muted);
}

.info-card ul,
.info-card ol,
.step-card ul,
.step-card ol,
.check-card ul,
.check-card ol,
.recipe-card ul,
.recipe-card ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.info-card li,
.step-card li,
.check-card li,
.recipe-card li {
  margin-bottom: 8px;
}

.callout {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border-left: 4px solid var(--primary);
  background: #e8f4fc;
  color: var(--text);
  font-size: 14px;
}

.callout.warning {
  border-left-color: var(--warn);
  background: #fef6e6;
}

.callout.success {
  border-left-color: var(--ok);
  background: #e8f8f0;
}

figure {
  margin: 14px 0 0;
}

figure img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.guide-main figure img:hover {
  transform: translateY(-1px);
  box-shadow: var(--image-hover-shadow);
}

.guide-main figure img:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.footer-shell {
  padding-bottom: 56px;
}

.footer-note {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
}

body.lightbox-open {
  overflow: hidden;
}

.guide-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
}

.guide-lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: var(--lightbox-backdrop);
}

.guide-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: grid;
  gap: 12px;
}

.guide-lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 320px;
  padding: 28px 72px;
  border-radius: 24px;
  border: 1px solid var(--lightbox-border);
  background: var(--lightbox-surface);
  box-shadow: var(--hero-shadow);
}

.guide-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.guide-lightbox-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--lightbox-border);
  background: var(--lightbox-surface);
  color: var(--lightbox-caption);
}

.guide-lightbox-caption-text {
  margin: 0;
  font-size: 14px;
}

.guide-lightbox-caption-index {
  flex: 0 0 auto;
  color: var(--lightbox-caption-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-lightbox-close,
.guide-lightbox-nav {
  border: 1px solid var(--lightbox-border);
  background: var(--lightbox-control);
  color: var(--hero-text);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.guide-lightbox-close:hover,
.guide-lightbox-nav:hover {
  background: var(--lightbox-control-hover);
}

.guide-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.guide-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.guide-lightbox-nav.prev {
  left: 18px;
}

.guide-lightbox-nav.next {
  right: 18px;
}

.guide-lightbox-nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

.guide-lightbox-close:focus-visible,
.guide-lightbox-nav:focus-visible {
  outline: 3px solid var(--hero-accent);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .hero-top {
    grid-template-columns: 1fr;
  }

  .guide-layout {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 18px;
  }

  .section-panel {
    padding: 24px;
  }

  .toc-card {
    padding: 18px;
  }
}

@media (max-width: 840px) {
  .hero-top {
    grid-template-columns: 1fr;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .content-wrap {
    margin-top: -20px;
  }

  .guide-sidebar {
    position: sticky;
    top: 10px;
    z-index: 30;
  }

  .toc-mobile-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    color: var(--text);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .toc-card {
    display: none;
    position: static;
    margin-top: 10px;
    max-height: 62vh;
    overflow: auto;
  }

  .guide-sidebar.open .toc-card {
    display: block;
  }
}

@media (max-width: 860px) {
  .cards-grid.two,
  .cards-grid.three,
  .shot-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-card,
  .section-panel,
  .info-card,
  .step-card,
  .check-card,
  .recipe-card {
    padding: 18px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .guide-lightbox {
    padding: 10px;
  }

  .guide-lightbox-frame {
    padding: 52px 12px 12px;
    min-height: 220px;
  }

  .guide-lightbox-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .guide-lightbox-close {
    top: 10px;
    right: 10px;
  }

  .guide-lightbox-nav {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 28px;
  }

  .guide-lightbox-nav.prev {
    left: 10px;
  }

  .guide-lightbox-nav.next {
    right: 10px;
  }

  .guide-lightbox-image {
    max-height: calc(100vh - 180px);
  }
}
