:root {
  color-scheme: light;
  --bg: #f7f2e9;
  --bg-band: #efe3d2;
  --panel: rgba(255, 252, 246, 0.92);
  --panel-strong: #fffaf1;
  --line: rgba(88, 68, 45, 0.16);
  --ink: #2e2319;
  --muted: #6f6255;
  --soft: #948676;
  --accent: #ef6543;
  --accent-deep: #c6482f;
  --accent-soft: rgba(239, 101, 67, 0.12);
  --green: #168c73;
  --green-soft: rgba(22, 140, 115, 0.12);
  --blue: #2f5f9e;
  --blue-soft: rgba(47, 95, 158, 0.12);
  --shadow: 0 18px 52px rgba(70, 50, 29, 0.1);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fffaf2 0%, var(--bg) 42%, var(--bg-band) 100%);
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}

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

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

.shell {
  width: min(calc(100vw - 32px), var(--content-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(98, 74, 47, 0.08);
  background: rgba(248, 240, 225, 0.82);
  backdrop-filter: blur(18px);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--accent) 0%, #ff996d 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(198, 72, 47, 0.24);
  font-size: 0.8rem;
  font-weight: 900;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.nav a:hover {
  color: var(--ink);
}

.breadcrumb {
  padding: 22px 0 0;
  color: var(--soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: rgba(112, 98, 84, 0.58);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.guide-hero {
  padding: 44px 0 36px;
}

.guide-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border: 1px solid rgba(239, 101, 67, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.05rem);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3.4vw, 2.55rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
}

p {
  margin: 0;
}

.hero-lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 900;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(160deg, var(--accent) 0%, #ff835e 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(198, 72, 47, 0.22);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
}

.guide-visual {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(98, 74, 47, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.visual-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(98, 74, 47, 0.08);
  background: rgba(244, 238, 229, 0.96);
}

.visual-dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.visual-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d7c6ae;
}

.visual-dot:nth-child(1) {
  background: #ff5f57;
}

.visual-dot:nth-child(2) {
  background: #febc2e;
}

.visual-dot:nth-child(3) {
  background: #28c840;
}

.visual-address {
  min-width: 0;
  flex: 1;
  height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(98, 74, 47, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-body {
  padding: 16px;
}

.visual-body img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(98, 74, 47, 0.08);
  background: #fffdfa;
}

.summary-band {
  padding: 24px 0 10px;
}

.summary-grid,
.related-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-item,
.related-card,
.info-card,
.step-card,
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 8px 24px rgba(83, 58, 34, 0.05);
}

.summary-item,
.info-card {
  padding: 18px;
}

.summary-label {
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-item p,
.info-card p,
.related-card p,
.step-card p,
.faq-item p,
.note p {
  color: var(--muted);
}

.article-band {
  padding: 38px 0 56px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 34px;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.guide-section {
  padding: 34px 0;
  border-top: 1px solid rgba(98, 74, 47, 0.11);
}

.guide-hero-grid > *,
.article-layout > *,
.summary-item,
.related-card,
.info-card,
.step-card,
.cta-panel {
  min-width: 0;
}

.guide-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.section-copy {
  max-width: 48rem;
  color: var(--muted);
  font-size: 1rem;
}

.toc {
  position: sticky;
  top: 88px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 246, 0.84);
  box-shadow: 0 10px 30px rgba(83, 58, 34, 0.06);
}

.toc-title {
  margin-bottom: 10px;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 9px 0;
  border-top: 1px solid rgba(98, 74, 47, 0.1);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.toc a:hover {
  color: var(--ink);
}

.step-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  counter-reset: steps;
}

.step-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  counter-increment: steps;
}

.step-card::before {
  content: counter(steps, decimal-leading-zero);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px var(--green-soft);
}

.note {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(47, 95, 158, 0.22);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
}

.note strong {
  color: var(--blue);
}

.format-table {
  display: grid;
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.format-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0;
  background: rgba(255, 255, 255, 0.68);
}

.format-row > div {
  padding: 14px 16px;
}

.format-name {
  color: var(--ink);
  font-weight: 900;
}

.format-desc {
  color: var(--muted);
}

.inline-link {
  color: var(--accent-deep);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

.inline-link:hover {
  color: var(--ink);
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  padding: 18px;
}

.related-band,
.cta-band {
  padding: 28px 0;
}

.related-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.related-card h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.related-card a {
  color: var(--accent-deep);
  font-weight: 900;
}

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.cta-panel p {
  color: var(--muted);
}

.page-footer {
  padding: 30px 0 42px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .site-header .shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .guide-hero-grid,
  .article-layout,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .guide-visual {
    order: -1;
  }

  .toc {
    position: static;
  }

  .summary-grid,
  .related-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    flex: 0 0 42px;
  }

  .nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
  }

  h1 {
    font-size: clamp(1.85rem, 10.5vw, 2.55rem);
    word-break: break-all;
  }

  .guide-hero {
    padding-top: 30px;
  }

  .visual-body {
    padding: 12px;
  }

  .step-card {
    grid-template-columns: 1fr;
  }

  .format-row {
    grid-template-columns: 1fr;
  }

  .format-row > div + div {
    border-top: 1px solid var(--line);
  }

  .button {
    width: 100%;
  }
}
