body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #222;
  line-height: 1.6;
  font-size: 16px;
}

html {
  scroll-behavior: smooth;
}

/* =========================32px
   レイアウト
========================= */
.container {
  max-width: 720px;
  margin: 48px auto;
  padding: 48px 28px 40px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* =========================
   タイポグラフィ
========================= */
h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}

h2 {
  font-size: 20px;
  margin: 32px 0 8px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 16px 0 6px;
  color: #444;
}

.description {
  font-size: 15px;
  line-height: 1.5;
  color: #555;
  margin: 16px 0 12px;
}

.tags {
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  font-size: 13px;
  color: #2563eb;
  background: #eef4ff;
  padding: 4px 10px;
  border-radius: 999px;
  margin-right: 8px;
  margin-bottom: 16px;
  text-decoration: none;
}

.tag:hover {
  opacity: 0.8;
}

.meta {
  margin: 18px 0 28px;
  color: #444;
  line-height: 1.35;
}

.meta div {
  margin-bottom: 3px;
}

.meta span {
  display: inline-block;
  width: 84px;
  color: #666;
}

.map-link {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 0;
}

.map-link::after {
  content: " ↗";
  font-size: 12px;
}

.note {
  font-size: 13px;
  color: #777;
  margin-top: 8px;
}

/* =========================
   リスト
========================= */
ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

li {
  margin-bottom: 4px;
}

/* =========================
   画像
========================= */
img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  margin: 20px 0;
  max-width: 100%;
}

img + img {
  margin-top: 16px;
}

.video {
  margin: 28px 0;
  aspect-ratio: 16 / 9;
}

.video iframe {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

figure video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.content-video {
  display: block;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0 auto;
  background: #000;
}

/* =========================
   ギャラリー
========================= */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
/*   grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); */
  gap: 16px;
  margin: 12px 0;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f3f4f6;
  border-radius: 10px;
}

.gallery img:only-child {
  width: 100%;
  max-width: 440px;
}

figure {
  margin: 28px auto;
  max-width: 720px;
}

figure img {
  display: block;
  width: 100%;
  max-height: none;
  height: auto;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  margin: 0;
}

figcaption {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 10px 12px;
  margin: 0;
}

figcaption small {
  display: block;
  margin-top: 4px;
  color: #999;
  font-size: 12px;
}

/* =========================
   一覧カード
========================= */
.list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.card {
  display: block;
  padding: 18px 20px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #2563eb;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #222;
}

.card-desc {
  font-size: 14px;
  color: #666;
}

.card-hub {
  border-left: 4px solid #22c55e;
  background: #f8fafc;
}
.card-hub:hover {
  background: #ecfdf5;
}

.card-external {
  border-left: 4px solid #9ca3af;
}

.card-external:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  background: #f3f4f6;
}

.card:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.card-external:focus {
  outline: 2px solid #9ca3af;
}

.card-post {
  border-left: 4px solid #222;
}

.card-post:hover {
  background: #f7f7f7;
}

.card-post:focus {
  outline: 2px solid #222;
}

.external-sub {
  margin: 8px 0 20px;
  padding: 0 4px;
}

.external-sub a {
  color: #2a5db0;
  text-decoration: none;
}

.external-sub a:hover {
  text-decoration: underline;
}

/* =========================
   フッター導線
========================= */
.footer-nav {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  font-size: 14px;
  color: #2563eb;
  text-decoration: none;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  transition: all 0.2s ease;
}

.footer-link:hover {
  background: #eef4ff;
  border-color: #2563eb;
  text-decoration: none;
}

.footer-banner {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.footer-banner img {
  width: auto;
}

/* =========================
   リンク
========================= */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.dead-link {
  color: #777;
  opacity: 0.7;
}

.dead-link:hover {
  opacity: 1;
}

.dead-note {
  font-size: 13px;
  color: #777;
  margin: 8px 0 12px;
}

/* =========================
   スマホ対応
========================= */
@media (max-width: 640px) {
  .container {
    margin: 24px 12px;
    padding: 32px 20px 48px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================
   X引用対応
========================= */
.x-quote {
  background: #f1f1f1;
  border-left: 1px solid #bbb;
  padding: 2px 8px;
  margin: 0;
  color: #333;
  line-height: 1.6;
}

.x-quote p {
  margin: 0;
}

.x-head {
  margin-bottom: 2px; /* ←少しだけ詰める */
}

.x-icon {
  color: #1d9bf0;
  font-weight: bold;
  margin-right: 4px;
}

.x-head a {
  color: #1d4ed8;
  text-decoration: underline;
}

.x-date {
  color: #333;
}

.x-quote .gallery {
  margin: 6px 0 0;
  padding: 0;
}

.x-quote .gallery img {
  display: block;
  max-width: 500px;
  width: 70%;
  height: auto;
  margin: 4px 0 0;
  border-radius: 0;
}

.x-label {
  font-size: 12px;
  opacity: 0.5;
  margin-right: 4px;
}

/* =========================
   表
========================= */

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
}

.table-wrap table {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f5f5f5;
  font-weight: 600;
}

td {
  background: #fff;
}

/* =========================
   タイムラインログ
========================= */

.timeline-log {
  margin: 24px 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  color: #333;
  line-height: 1.7;
  font-size: 15px;
  overflow-x: auto;
}

.timeline-log p {
  margin-top: 0;
  margin-bottom: 0.8em;
  color: #666;
  font-size: 0.9rem;
}

.timeline-log br {
  line-height: 2;
}

.timeline-log .time {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: #555;
  font-size: 0.92em;
}

/* =========================
   小型動画埋め込み
========================= */

.video-small {
  margin-top: 10px;
  max-width: 420px;
  aspect-ratio: 16 / 9;
}

.video-small iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.video-figure {
  max-width: 420px;
  margin: 18px 0;
}

.video-figure .video-small {
  width: 100%;
  max-width: none;
  margin: 0;
}

.video-figure iframe {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px 12px 0 0;
}
