/* Sakutio Guide Design System v1 — production guide styles */
.sg-guide {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--sakutio-bg);
  color: var(--sakutio-text);
  overflow-x: hidden;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}

.sg-guide > sakutio-global-footer {
  display: block;
  width: 100%;
  margin-top: auto;
}

.sg-tool-band {
  background: linear-gradient(135deg, var(--sakutio-brand-primary), var(--sakutio-brand-navy));
  color: #fff;
}

.sg-tool-band__inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.sg-tool-band__name {
  color: #fff;
  font-size: 1rem;
  font-weight: 760;
  text-decoration: none;
}
.sg-tool-band__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.sg-tool-band__privacy { font-size: 0.78rem; color: rgba(255,255,255,.9); }

.sg-page { background: var(--sakutio-bg); padding: 32px 32px 72px; }

.sg-article {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 54px 64px 72px;
  background: var(--sakutio-surface);
  border: 1px solid rgba(221, 228, 234, 0.95);
  border-radius: var(--sakutio-radius-lg);
}

.sg-flow { width: min(760px, 100%); margin-inline: auto; }

.sg-breadcrumb {
  margin: 0 auto 26px;
  width: min(760px, 100%);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--sakutio-text-muted);
}

.sg-breadcrumb a {
  color: var(--sakutio-text-muted);
  text-decoration: none;
}
.sg-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

.sg-header { width: min(760px, 100%); margin: 0 auto; }
.sg-header h1 {
  margin: 0;
  color: var(--sakutio-heading);
  font-size: clamp(2rem, 3.1vw, 2.25rem);
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sg-heading-marker {
  display: inline;
  padding: 0 .04em;
  background: linear-gradient(transparent 70%, var(--sakutio-marker) 70%, var(--sakutio-marker) 95%, transparent 95%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sg-prose .sg-lead {
  margin: 22px 0 0;
  font-size: 1.08rem;
  line-height: 1.85;
  color: #3f4a55;
}

.sg-prose { font-size: 17px; line-height: 1.85; }
.sg-prose p { margin: 0 0 20px; }
.sg-prose ul, .sg-prose ol { margin: 0 0 22px; padding-left: 1.35em; }
.sg-prose li + li { margin-top: 8px; }
.sg-prose strong { color: #252f3a; font-weight: 760; }

.sg-prose a:not(.sg-button):not(.sg-toc__link):not(.sg-related__link) {
  color: var(--sakutio-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--sakutio-link-underline);
  text-underline-offset: 3px;
  font-weight: 650;
}
.sg-prose a:not(.sg-button):hover { color: var(--sakutio-link-hover); text-decoration-thickness: 2px; }

.sg-marker {
  background: linear-gradient(transparent 50%, var(--sakutio-marker) 50%, var(--sakutio-marker) 93%, transparent 93%);
  padding: 0 .06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sg-summary {
  margin: 30px auto 0;
  padding: 18px 20px;
  background: var(--sakutio-surface-soft);
  border-left: 3px solid var(--sakutio-brand-soft-2);
  border-radius: 0 var(--sakutio-radius-md) var(--sakutio-radius-md) 0;
}
.sg-summary__title { margin: 0 0 10px; color: var(--sakutio-heading); font-size: .95rem; font-weight: 780; }
.sg-summary ul { margin: 0; padding: 0; list-style: none; }
.sg-summary li { position: relative; padding-left: 1.55em; line-height: 1.7; }
.sg-summary li + li { margin-top: 6px; }
.sg-summary li::before { content: "✓"; position: absolute; left: 0; color: var(--sakutio-brand-primary); font-weight: 850; }

.sg-cta { width: min(760px, 100%); margin: 26px auto 0; }
.sg-cta--secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: var(--sakutio-brand-soft);
  border: 1px solid var(--sakutio-point-border);
  border-radius: var(--sakutio-radius-md);
}
.sg-cta__text { margin: 0; line-height: 1.6; color: #30465e; }
.sg-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 760;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}
.sg-button--secondary { background: var(--sakutio-raised); color: var(--sakutio-brand-primary-deep); border: 1px solid var(--sakutio-brand-border); }
.sg-button--secondary:hover { background: #f8fbff; }
.sg-button--primary { color: #fff; background: linear-gradient(135deg, var(--sakutio-brand-primary), var(--sakutio-brand-indigo)); border: 1px solid transparent; }
.sg-button--primary:hover { filter: brightness(1.045); }

.sg-toc {
  width: min(760px, 100%);
  margin: 34px auto 0;
  background: var(--sakutio-surface-soft);
  border: 1px solid var(--sakutio-border);
  border-radius: var(--sakutio-radius-md);
  overflow: clip;
}
.sg-toc summary {
  min-height: 48px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  color: var(--sakutio-heading);
  font-weight: 800;
}
.sg-toc summary::-webkit-details-marker { display: none; }
.sg-toc summary::after { content: "∨"; color: var(--sakutio-brand-primary-deep); font-size: 1.15rem; line-height: 1; transform: rotate(0deg); }
.sg-toc[open] summary::after { content: "∧"; }
.sg-toc__list { margin: 0; padding: 0 20px 18px; list-style: none; counter-reset: toc; }
.sg-toc__item { counter-increment: toc; }
.sg-toc__item + .sg-toc__item { margin-top: 3px; }
.sg-toc__link {
  min-height: 48px;
  padding: 10px 8px;
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  align-items: center;
  border-radius: 8px;
  color: #34495e;
  text-decoration: none;
  line-height: 1.5;
}
.sg-toc__link::before { content: counter(toc, decimal-leading-zero); color: var(--sakutio-brand-primary); font-size: .78rem; font-weight: 800; }
.sg-toc__link:hover { background: #edf3f8; color: var(--sakutio-brand-primary-deep); }

.sg-section { width: min(760px, 100%); margin: 72px auto 0; scroll-margin-top: 24px; }
.sg-section h2 {
  margin: 0 0 24px;
  padding-left: 17px;
  position: relative;
  color: var(--sakutio-heading);
  font-size: 28px;
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.sg-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  bottom: .15em;
  width: 4px;
  border-radius: 999px;
  background: var(--sakutio-brand-primary);
}
.sg-section h3 { margin: 40px 0 16px; color: #202a35; font-size: 21px; line-height: 1.5; font-weight: 780; }

.sg-subpoints { display: grid; gap: 30px; margin-top: 28px; }
.sg-subpoint { padding-bottom: 28px; border-bottom: 1px solid var(--sakutio-border); }
.sg-subpoint:last-child { padding-bottom: 0; border-bottom: 0; }
.sg-subpoint__index { display: inline-block; margin-bottom: 8px; color: var(--sakutio-brand-primary); font-size: .76rem; font-weight: 850; letter-spacing: .1em; }
.sg-subpoint h3 { margin: 0 0 12px; }

.sg-figure {
  width: min(560px, 100%);
  margin: 36px auto 38px;
}
.sg-figure--narrow { width: min(460px, 100%); }
.sg-figure--wide { width: min(760px, 100%); }
.sg-figure__zoom {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--sakutio-radius-md);
  background: transparent;
  cursor: zoom-in;
}
.sg-figure__zoom img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--sakutio-border);
  border-radius: var(--sakutio-radius-md);
  background: var(--sakutio-raised);
  box-shadow: 0 3px 16px rgba(15, 23, 42, .065);
}
.sg-figure__zoom::after {
  content: "拡大";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
  background: rgba(17, 24, 39, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  opacity: .88;
  pointer-events: none;
}
.sg-figure__zoom:hover::after,
.sg-figure__zoom:focus-visible::after { opacity: 1; }
.sg-figure figcaption {
  width: 100%;
  margin: 9px auto 0;
  color: var(--sakutio-text-muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.sg-lightbox {
  border: 0;
  background: transparent;
}
.sg-lightbox:not([open]) { display: none; }
.sg-lightbox[open] {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.sg-lightbox::backdrop { background: rgba(15, 23, 42, .72); }
.sg-lightbox__inner {
  position: relative;
  display: grid;
  place-items: center;
  max-width: min(900px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
}
.sg-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 48px);
  object-fit: contain;
  border-radius: var(--sakutio-radius-md);
  background: #fff;
  box-shadow: 0 18px 60px rgba(15, 23, 42, .35);
}
.sg-lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,.88);
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .28);
}

.sg-note {
  margin: 30px 0;
  padding: 18px 20px;
  border: 1px solid;
  border-radius: var(--sakutio-radius-md);
}
.sg-note__label { margin: 0 0 7px; font-size: .78rem; font-weight: 850; letter-spacing: .08em; }
.sg-note p:last-child { margin-bottom: 0; }
.sg-note--point { background: var(--sakutio-point-bg); border-color: var(--sakutio-point-border); }
.sg-note--point .sg-note__label { color: var(--sakutio-brand-primary-deep); }
.sg-note--caution { background: var(--sakutio-caution-bg); border-color: var(--sakutio-caution-border); }
.sg-note--caution .sg-note__label { color: var(--sakutio-caution-text); }
.sg-note--info { background: var(--sakutio-info-bg); border-color: var(--sakutio-info-border); }
.sg-note--info .sg-note__label { color: var(--sakutio-info-text); }

.sg-steps { margin-top: 30px; }
.sg-step { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 24px; }
.sg-step + .sg-step { margin-top: 54px; padding-top: 2px; }
.sg-step__number { padding-top: 2px; color: var(--sakutio-brand-primary); }
.sg-step__kicker { display: block; font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.sg-step__digit { display: block; margin-top: 1px; font-size: 30px; line-height: 1.1; font-weight: 820; letter-spacing: -.03em; }
.sg-step__body h3 { margin: 0 0 13px; }

.sg-faq { margin-top: 26px; border-top: 1px solid var(--sakutio-border); }
.sg-faq details { border-bottom: 1px solid var(--sakutio-border); }
.sg-faq summary {
  min-height: 52px;
  padding: 15px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  color: #263647;
  font-weight: 760;
}
.sg-faq summary::-webkit-details-marker { display: none; }
.sg-faq summary::after { content: "+"; flex: 0 0 auto; color: var(--sakutio-brand-primary); font-size: 1.2rem; font-weight: 500; }
.sg-faq details[open] summary::after { content: "−"; }
.sg-faq__answer { padding: 0 4px 18px; }
.sg-faq__answer p:last-child { margin-bottom: 0; }

.sg-final-cta {
  width: min(760px, 100%);
  margin: 72px auto 0;
  padding: 28px;
  text-align: center;
  background: linear-gradient(180deg, #eef5fd 0%, #f8fbff 100%);
  border: 1px solid var(--sakutio-point-border);
  border-radius: var(--sakutio-radius-lg);
}
.sg-final-cta h2 { margin: 0 0 12px; color: var(--sakutio-heading); font-size: 24px; line-height: 1.45; }
.sg-final-cta p { margin: 0 auto 20px; max-width: 600px; line-height: 1.75; }

.sg-related { width: min(760px, 100%); margin: 58px auto 0; }
.sg-related h2 { margin: 0 0 15px; color: var(--sakutio-heading); font-size: 20px; }
.sg-related__item { padding: 15px 0; border-top: 1px solid var(--sakutio-border); }
.sg-related__item:last-child { border-bottom: 1px solid var(--sakutio-border); }
.sg-related__link { color: var(--sakutio-link); font-weight: 760; text-decoration: none; }
.sg-related__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sg-related__desc { margin: 6px 0 0; color: var(--sakutio-text-muted); font-size: .92rem; line-height: 1.65; }

@media (max-width: 900px) {
  .sg-page { padding: 22px 0 54px; }
  .sg-article { width: 100%; padding: 36px 26px 56px; border-left: 0; border-right: 0; border-radius: 0; }
  .sg-section { margin-top: 60px; }
  .sg-section h2 { font-size: 25px; }
  .sg-step { grid-template-columns: 68px minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 600px) {
  .sg-tool-band__inner { width: calc(100% - 36px); }
  .sg-tool-band__inner { min-height: 54px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 2px; padding: 8px 0; }
  .sg-tool-band__privacy { font-size: .7rem; }
  .sg-article { padding: 30px 18px 52px; }
  .sg-breadcrumb { margin-bottom: 22px; font-size: .8rem; }
  .sg-header h1 { font-size: 29px; line-height: 1.45; }
  .sg-prose .sg-lead { margin-top: 18px; font-size: 16px; line-height: 1.85; }
  .sg-prose { font-size: 16px; line-height: 1.88; }
  .sg-prose p { margin-bottom: 18px; }
  .sg-summary { margin-top: 24px; padding: 16px; }
  .sg-cta--secondary { align-items: stretch; flex-direction: column; padding: 16px; }
  .sg-button { width: 100%; white-space: normal; }
  .sg-toc { margin-top: 28px; }
  .sg-toc summary { padding: 14px 16px; }
  .sg-toc__list { padding: 0 10px 12px; }
  .sg-toc__link { padding-left: 7px; padding-right: 7px; }
  .sg-section { margin-top: 56px; }
  .sg-section h2 { margin-bottom: 20px; padding-left: 14px; font-size: 23px; line-height: 1.5; }
  .sg-section h2::before { width: 3px; }
  .sg-section h3 { margin-top: 32px; margin-bottom: 14px; font-size: 19px; }
  .sg-subpoints { gap: 25px; }
  .sg-subpoint { padding-bottom: 24px; }
  .sg-figure { margin: 30px auto 32px; }
  .sg-figure figcaption { font-size: 13px; }
  .sg-lightbox[open] { padding: 12px; }
  .sg-lightbox__inner { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .sg-lightbox__image { max-height: calc(100dvh - 24px); }
  .sg-lightbox__close { top: 8px; right: 8px; width: 44px; height: 44px; border-width: 1px; }
  .sg-note { margin: 26px 0; padding: 16px; }
  .sg-step { grid-template-columns: 54px minmax(0, 1fr); gap: 14px; }
  .sg-step + .sg-step { margin-top: 44px; }
  .sg-step__digit { font-size: 26px; }
  .sg-final-cta { margin-top: 60px; padding: 22px 17px; }
  .sg-final-cta h2 { font-size: 21px; }
  .sg-related { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
