/* =========================
   Reset / Base
========================= */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}

body {
  background: #fff;
  color: #111;
  font-family: system-ui, -apple-system,
               "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.9;
}

/* =========================
   Variables
========================= */
:root {
  --content-width: 720px;
  --border: #e5e7eb;
  --muted: #6b7280;
  --link: #2563eb;
  --radius: 8px;

  /* ===== editor（絶対に消さない）===== */
  --editor-lineheight-px: 30px;
  --editor-pad-y: 15px;
  --editor-pad-x: .8rem;

  --ln-minw: 3.2rem;
  --ln-minw-sp: 2.1rem;
  --ln-color: #9ca3af;
  --ln-color-major: #6b7280;
  --ln-color-ten: #374151;
}

/* =========================
   Links
========================= */
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =========================
   Header
========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.site-title a {
  color: #111;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .95rem;
}
.header-nav a {
  color: #333;
}

/* Hamburger */
.hamburger-btn {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* =========================
   Main
========================= */
main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem;
}

/* =========================
   Breadcrumb
========================= */
.breadcrumb {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: .4rem 0rem;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--link);
}

/* =========================
   Buttons
========================= */
.btn {
  display: inline-block;
  padding: .4rem .8rem;
  border: 1px solid #111;
  border-radius: 6px;
  font-size: .9rem;
  background: #fff;
  color: #111 !important;
}
.btn.primary {
  background: #111;
  color: #fff !important;
}

/* =========================
   Forms（汎用）
========================= */
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .6rem;
}

/* =========================
   Utilities
========================= */
.center {
  text-align: center;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* =========================
   Mobile
========================= */
@media (max-width: 768px) {

  .hamburger-btn {
    display: block;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: .75rem 1rem;
    flex-direction: column;
  }

  .header-nav.open {
    display: flex;
  }

  main {
    padding: .8rem;
  }
}

/* =========================
   Wide
========================= */
@media (min-width: 900px) {
  :root {
    --content-width: 900px;
  }
}

/* =========================
   Back to top
========================= */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 10px 14px;
  background: #2563eb;
  color: #fff;
  font-size: 0.85rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 1000;
}
.back-to-top:hover {
  background: #1e40af;
}
