/* =========================
   Bright / Modern UI
   Shared stylesheet
   ========================= */

:root{
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: rgba(15,23,42,.10);
  --shadow: 0 10px 30px rgba(15,23,42,.10);
  --shadow2: 0 6px 18px rgba(15,23,42,.08);
  --radius: 18px;

  --brand1: #4f46e5;
  --brand2: #06b6d4;
  --brand3: #22c55e;
  --chip: rgba(79,70,229,.08);
  --chipLine: rgba(79,70,229,.22);
}

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

body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 20% 0%, rgba(79,70,229,.16), transparent 60%),
    radial-gradient(900px 450px at 85% 15%, rgba(6,182,212,.14), transparent 60%),
    linear-gradient(180deg, var(--bg), #ffffff 45%, var(--bg));
  line-height: 1.7;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; }

.wrap{
  max-width: 1060px;
  margin: 0 auto;
  padding: 26px 18px 44px;
}

/* Top bar */
.topbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px;
}
.brand{ display:flex; align-items:center; gap:10px; min-width:0; }
.logo{
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: var(--shadow2);
  flex: 0 0 auto;
}
.brand-title{
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.22);
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge .dot{
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--brand3);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

/* Hero */
.hero{
  margin-top: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 22px;
  overflow:hidden;
  position: relative;
}
.hero::after{
  content:"";
  position:absolute;
  inset: -120px -140px auto auto;
  width: 340px; height: 340px;
  background:
    radial-gradient(circle at 30% 30%, rgba(79,70,229,.22), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(6,182,212,.18), transparent 60%);
  filter: blur(4px);
  transform: rotate(12deg);
  pointer-events:none;
}
.hero-grid{
  display:grid;
  gap: 16px;
  grid-template-columns: 1fr;
  position: relative;
  z-index: 1;
}
@media (min-width: 920px){
  .hero-grid{ grid-template-columns: 1.05fr .95fr; align-items: start; }
}

h1{
  margin: 8px 0 10px;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.18;
  letter-spacing: .2px;
}
.lead{ margin: 0; color: var(--muted); font-size: 15.5px; }

.chips{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.chip{
  display:inline-flex;
  gap: 8px;
  align-items:center;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--chipLine);
  font-size: 13px;
  color: #1e1b4b;
  font-weight: 650;
  white-space: nowrap;
}

/* Buttons */
.cta{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  box-shadow: 0 4px 10px rgba(15,23,42,.06);
  font-weight: 750;
  font-size: 14px;
}
.btn:hover{ transform: translateY(-1px); text-decoration:none; }
.btn:active{ transform: translateY(0); }
.btn.primary{
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 12px 26px rgba(79,70,229,.22);
}
.icon{ width: 18px; height: 18px; display:inline-block; }

/* Sections / Cards */
.section{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 920px){
  .section.cols-2{ grid-template-columns: 1fr 1fr; }
  .section.cols-3{ grid-template-columns: 1fr 1fr 1fr; }
}

.card{
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding: 16px;
  backdrop-filter: blur(10px);
}
.card h2{
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: .2px;
}
.card p{ margin: 0; color: var(--muted); }
.card ul{ margin: 0; padding-left: 1.2em; color: var(--muted); }
.card li{ margin: 8px 0; }
.muted{ color: var(--muted); }
.small{ font-size: 12px; color: #64748b; margin-top: 10px; }

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  background: rgba(15,23,42,.06);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,.08);
}

/* Figure / Placeholder */
.figure{
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
.figure img{ width: 100%; height: auto; display:block; }
.figcap{
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  background: rgba(255,255,255,.92);
}
.placeholder{
  aspect-ratio: 16 / 9;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 18px;
  color: #64748b;
  background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(6,182,212,.08));
}
.ph-title{
  font-weight: 800;
  color: #334155;
  margin-bottom: 6px;
}

/* Gallery */
.gallery{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 720px){
  .gallery{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1040px){
  .gallery.gallery-6{ grid-template-columns: 1fr 1fr 1fr; }
}
.gallery a:hover{ text-decoration:none; }

/* Footer */
.footer{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}



/* =========================
   Lightbox (no JS)
   ========================= */
.zoomable { cursor: zoom-in; }
.zoomable img { transition: transform .18s ease; }
.zoomable:hover img { transform: scale(1.01); }

.lightbox{
  position: fixed;
  inset: 0;
  display: none;          /* 普段は非表示 */
  z-index: 9999;
}

.lightbox:target{
  display: block;         /* #img-01 が付いた時だけ表示 */
}

.lightbox__bg{
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.70);
  backdrop-filter: blur(4px);
}

.lightbox__panel{
  position: relative;
  margin: 4vh auto;
  width: min(1100px, 92vw);
  height: auto;
  max-height: 92vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
}

.lightbox__panel img{
  width: 100%;
  height: auto;
  display: block;
  max-height: 92vh;
  object-fit: contain;
  background: #fff;
}

.lightbox__close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 6px 18px rgba(15,23,42,.18);
}

.lightbox__close:hover{
  text-decoration: none;
  transform: translateY(-1px);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 800; letter-spacing: 0.2px; }
.brand-subtitle { font-size: 0.85em; opacity: 0.85; margin-top: 2px; }
.brand-by { font-size: 0.92em; opacity: 0.9; }


/* 問いかけを「少し目立つ」程度に */
.hook{
  display: inline-block;
  font-weight: 700;
  padding: 0.25em 0.55em;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
}


/* flat_records ガイド強調ボタン */
.btn.guide{
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 12px 26px rgba(34,197,94,.25);
  font-weight: 800;
}

.btn.guide:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(34,197,94,.35);
}

/* chip にヒントがあることを示す */
.chip[title]{
  cursor: help;
}










/* 改良履歴 */
.history-card {
  padding: 24px;
}

.history-lead {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.8;
}

.history-box {
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.history-scroll {
  max-height: 340px;   /* 行数が増えてもここで縦スクロール */
  overflow-y: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.history-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
  color: #1f2937;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid #dbe3ee;
  padding: 12px 14px;
}

.history-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  line-height: 1.7;
}

.history-table tbody tr:nth-child(even) {
  background: #fcfdff;
}

.history-date {
  width: 140px;
  white-space: nowrap;
  color: #334155;
  font-weight: 600;
}

.history-note {
  margin-top: 12px;
  font-size: 0.92rem;
  color: #6b7280;
}

@media (max-width: 700px) {
  .history-scroll {
    max-height: 300px;
  }

  .history-table {
    min-width: 520px;
  }

  .history-table th,
  .history-table td {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .history-date {
    width: 120px;
  }
}


.hero-eyebrow{
  display:inline-block;
  margin:0 0 12px 0;
  padding:6px 12px;
  border-radius:999px;
  background:#eef4ff;
  color:#1d4ed8;
  font-size:.92rem;
  font-weight:700;
}

