:root {
  --paper: #f3ece1;
  --paper-2: #ebe1d2;
  --ink: #1b1714;
  --muted: #5d5349;
  --line: #d7cbb8;
  --accent: #c24e1d;
  --accent-2: #1f6f63;
  --dark: #14110f;
  --code: #231f1b;
  --card: #fffaf3;
  --shadow: 0 18px 40px rgba(28, 22, 16, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans JP", "IBM Plex Sans", sans-serif;
  line-height: 1.75;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent-2); }
code, pre { font-family: "IBM Plex Mono", ui-monospace, monospace; }
pre {
  background: var(--code);
  color: #f4eadc;
  padding: 1rem 1.1rem;
  overflow: auto;
  border-radius: 10px;
  font-size: 0.88rem;
}
code {
  background: #efe4d4;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.92em;
}
pre code { background: transparent; padding: 0; color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  padding: 0.4rem 0.7rem;
}

.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--dark);
  color: #f3ece1;
  padding: 1.4rem 1.1rem 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.brand a { color: inherit; text-decoration: none; }
.brand-kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #cbb9a2;
}
.brand-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.nav { display: flex; flex-direction: column; gap: 0.15rem; }
.nav a {
  color: #eadfce;
  text-decoration: none;
  padding: 0.42rem 0.6rem;
  border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] {
  background: rgba(255, 250, 243, 0.1);
  color: #fff;
}
.nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.sidebar-foot a { color: #cbb9a2; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem 0;
}
.topbar-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.menu-btn {
  display: none;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

.content {
  max-width: 820px;
  padding: 1.2rem 1.6rem 3rem;
}
.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}
.content h1 {
  margin: 0 0 0.8rem;
  font-size: 2.05rem;
  line-height: 1.25;
}
.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin-top: 0;
}
.content h2 {
  margin-top: 2.2rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.35rem;
}
.content h3 { margin-top: 1.5rem; font-size: 1.08rem; }
.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--card);
}
.content th, .content td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}
.content th { background: var(--paper-2); }
.content blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  background: #efe3c8;
  border-left: 4px solid var(--accent);
}
.content ul { padding-left: 1.2rem; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.4rem;
  align-items: center;
  margin: 0.4rem 0 1.8rem;
}
.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.hero-photos img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: #ddd;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0 1.8rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.card strong { display: block; font-size: 1.02rem; }
.card span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.3rem; }
.card em {
  display: inline-block;
  margin-top: 0.7rem;
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
}

.steps { counter-reset: step; padding: 0; list-style: none; }
.steps li {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0.65rem 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 0.95rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 600;
}

.callout {
  background: #e7f3ef;
  border: 1px solid #b7d6cf;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 1.1rem 0;
}

.content video {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0.8rem 0 1.2rem;
  border-radius: 12px;
  background: #111;
  box-shadow: var(--shadow);
}

.source-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.site-footer {
  max-width: 820px;
  padding: 0 1.6rem 2.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 20;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    width: min(280px, 86vw);
  }
  .sidebar.is-open { transform: none; }
  .menu-btn { display: inline-block; }
  .hero { grid-template-columns: 1fr; }
  .content, .site-footer { padding-left: 1rem; padding-right: 1rem; }
}
