/* =========================
   base.css（置き換え版）
   - 白背景×黒文字を基本に固定
   - 帯ヘッダー（sticky）
   - フッターを常にページ下へ
   - 余白/カード/リンクを安定化
   - diff（+青 / -赤）も最低限ここで効くように
   ========================= */

:root{
  --container: 1100px;

  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: rgba(15, 23, 42, .92);
  --muted: rgba(15, 23, 42, .62);
  --border: rgba(15, 23, 42, .10);

  --info: #2563eb;
  --shadow: 0 10px 30px rgba(15,23,42,.06);
}

/* Reset */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

/* Layout: footer to bottom */
.app{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* container */
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* main */
.main{
  flex: 1 0 auto;
  padding: 18px 0 28px;
}

/* 何かが白文字固定でも、主要ブロックは必ず戻す */
main, .container, .card, .summary, .side, .details{
  color: var(--text);
}

/* Links */
a{ color: var(--info); }
a:hover{ opacity: .9; }

/* =========================
   Header（よくある帯）
   ========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}

.topbar-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand{
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: rgba(17,24,39,.92);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .02em;
  font-size: 16px;
}

.brand-sub{
  font-weight: 700;
  font-size: 12px;
  color: rgba(107,114,128,.95);
}

/* nav */
.topnav{
  display: flex;
  align-items: center;
  gap: 10px;
}

.topnav-link{
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(17,24,39,.82);
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.85);
  font-size: 13px;
  font-weight: 700;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
}

.topnav-link:hover{
  background: rgba(17,24,39,.04);
  border-color: rgba(0,0,0,.14);
}

.topnav-link:active{
  transform: translateY(1px);
}

/* mobile */
@media (max-width: 700px){
  .topbar-inner{
    flex-wrap: wrap;
    justify-content: center;
  }
  .topnav{
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}

/* =========================
   Common UI（カード/見出し）
   ========================= */
.page-title{
  margin: 10px 0 14px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: .01em;
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.muted{ color: var(--muted); }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

/* =========================
   Footer（ページ下固定）
   ========================= */
.footer{
  flex-shrink: 0;
  color: rgba(15, 23, 42, .62);
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(15,23,42,.08);
  text-align: center;
  padding: 18px 12px;
}

.footer a{
  color: rgba(15, 23, 42, .62);
  text-decoration: none;
}
.footer a:hover{ text-decoration: underline; }

.footer .menu{
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

.footer-copy, .footer .copyright{
  margin: 0;
  padding: 10px 0 0;
  font-size: 12px;
}

/* =========================
   diff colors（+青 / -赤）
   ========================= */

/* pre.diff 自体の見た目（任意） */
pre.diff{
  background: #0b1020;
  color: #e5e7eb;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  line-height: 1.55;
}
