:root{
  --bg: #ffffff;
  --text: #111827;       /* ほぼ黒 */
  --muted: #4b5563;      /* グレー */
  --border: #e5e7eb;     /* 薄い罫線 */
  --panel: #f9fafb;      /* 薄い背景 */
  --accent: #2563eb;     /* 青 */
  --danger: #b91c1c;     /* 赤 */
  --dangerBg: #fef2f2;   /* 薄赤背景 */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", sans-serif;
  line-height: 1.75;
}

.container{
  width:min(980px, calc(100% - 32px));
  margin: 0 auto;
}

/* Hero（仰々しさ撤去：ただのヘッダ） */
.hero{
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.hero__inner{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.badge{
  display:inline-flex;
  align-self:flex-start;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
}

h1{
  margin:0;
  font-size: 28px;
  line-height: 1.2;
}

.lead{
  margin:0;
  color: var(--muted);
  font-size: 15px;
}

/* ボタンも控えめに */
.hero__cta{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  margin-top: 6px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration:none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.btn:hover{
  background: var(--panel);
}

.btn--primary{
  border-color: rgba(37,99,235,0.35);
  color: #1d4ed8;
}

.btn--ghost{
  color: var(--text);
}

/* メタカード：やめて“横並びの小メモ”に */
.hero__meta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.metaCard{
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.metaCard__label{
  font-size: 12px;
  color: var(--muted);
}

.metaCard__value{
  margin-top: 2px;
  font-weight: 600;
  font-size: 13px;
}

/* Sections */
.section{
  padding: 22px 0;
}

.section h2{
  margin: 0 0 10px;
  font-size: 18px;
}

.section p{
  margin: 0 0 10px;
  color: var(--muted);
}

/* Callout：軽く */
.callout{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
}

.callout__icon{
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #fff;
  border: 1px solid var(--border);
}

.callout__title{
  margin:0 0 2px;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.callout__text{
  margin:0;
  color: var(--muted);
  font-size: 14px;
}

/* Cards：影なし、罫線のみ */
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 12px;
}

.card{
  padding: 14px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}

.card h3{
  margin:0 0 6px;
  font-size: 15px;
}

.card p{ margin:0 0 8px; }

.list{
  margin:0;
  padding-left: 18px;
  color: var(--muted);
}

/* Code box */
.code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  color: #111827;
  background: #f3f4f6;
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.6;
}

/* Steps */
.steps{
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display:grid;
  gap: 10px;
}

.steps li{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 12px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
}

.stepNum{
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  color: #1d4ed8;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.20);
}

/* Danger section：赤も控えめに、読みやすく */
.section--danger{
  padding-top: 10px;
}

.dangerBox{
  margin-top: 10px;
  padding: 14px 14px;
  border-radius: 8px;
  background: var(--dangerBg);
  border: 1px solid rgba(185,28,28,0.18);
}

.dangerBox h3{
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--danger);
}

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

.dangerItem{
  padding: 12px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}

.dangerItem__title{
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 14px;
}

.dangerItem__text{
  color: var(--muted);
  font-size: 14px;
}

.fineprint{
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

/* details（折りたたみ） */
.details{
  margin-top: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
}

.details > summary{
  cursor: pointer;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  user-select:none;
  background: #fff;
}

.details > summary:hover{
  background: var(--panel);
}

.details > summary::-webkit-details-marker{ display:none; }

.details__title{
  font-weight: 700;
  color: var(--text);
}

.details__meta{
  font-size: 12px;
  color: var(--muted);
}

.pre{
  margin:0;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #f9fafb;
  overflow:auto;
}

.pre code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #111827;
  white-space: pre;
}

/* Footer */
.footer{
  padding: 20px 0 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.note{
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr; }
  .dangerGrid{ grid-template-columns: 1fr; }
}

/* 図・スクショ */
.figureGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.figureCard{
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.figureMedia{
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* 画像未用意でも崩れにくくする */
.figureMedia img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
  background: #fff;
}

/* 画像が読み込めない時の代替表示っぽさ */
.figureMedia img:not([src]), 
.figureMedia img[src=""]{
  display:none;
}

.figureCaption{
  padding: 12px 12px;
}

.figureTitle{
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.figureText{
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 860px){
  .figureGrid{ grid-template-columns: 1fr; }
}
