/* 早稲田大学ドラえもん研究会 サイト共通スタイル
   色を変えたいときは、下の :root の値だけ変えればOK */
:root {
  --blue: #0a7fd1;       /* メインの青 */
  --blue-dark: #075f9e;  /* リンク・見出し用の濃い青 */
  --blue-light: #eef6fc; /* 薄い背景 */
  --text: #222;
  --muted: #666;
  --line: #d6e4f0;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
a { color: var(--blue-dark); }
a:focus-visible { outline: 3px solid #ffb300; outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.sp { display: none; }

/* ---- ヘッダー ---- */
.site-header { background: var(--blue); color: #fff; }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 20px; padding-top: 12px; padding-bottom: 12px;
}
.site-title { color: #fff; font-weight: bold; font-size: 1.15rem; line-height: 1.4; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 4px; }
.nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 4px; }
.nav a:hover { background: rgba(255,255,255,.2); }
.nav a[aria-current="page"] { background: #fff; color: var(--blue-dark); font-weight: bold; }
.sns { display: flex; gap: 6px; }
.sns a { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; }
.sns a:hover { background: rgba(255,255,255,.2); }
.sns svg { width: 20px; height: 20px; fill: #fff; }
.site-header a:focus-visible { outline-color: #fff; }

/* ---- 本文 ---- */
main.wrap { padding-top: 40px; padding-bottom: 48px; }
h1 { font-size: 1.6rem; margin: 8px 0 20px; color: var(--blue-dark); }
h2 {
  font-size: 1.25rem; margin: 0 0 12px; padding-left: 10px;
  border-left: 5px solid var(--blue); line-height: 1.4;
}
.section { margin-bottom: 40px; }
.section p { margin: 0 0 12px; }
.more { font-size: .95rem; }

/* イベント */
.events, .plain { list-style: none; margin: 0; padding: 0; }
.events li { background: var(--blue-light); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.events .date { font-weight: bold; color: var(--blue-dark); }
.events .title { font-weight: bold; }
.events .place { color: var(--muted); font-size: .95rem; }
.events .body { margin-top: 6px; font-size: .95rem; }
.plain { list-style: disc; padding-left: 1.4em; }

/* ニュース */
.news-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.news-item .date { color: var(--muted); font-size: .9rem; }
.news-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.news-item p { margin: 0; }

/* 団体情報など */
.info { display: grid; grid-template-columns: 9em 1fr; margin: 0 0 12px; border-top: 1px solid var(--line); }
.info dt, .info dd { margin: 0; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.info dt { font-weight: bold; background: var(--blue-light); }

/* ポスト埋め込み（幅は画面に合わせて自動調整） */
/* ポスト埋め込み：パソコンは3列、スマホは横スクロール（下の @media 内） */
.tweets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.tweets .twitter-tweet { min-width: 0; max-width: 100% !important; margin: 0 !important; }
.tweets > p { grid-column: 1 / -1; margin: 0; }

/* 活動紹介 */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards a { display: block; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; height: 100%; }
.cards a:hover { border-color: var(--blue); }
.cards .thumb { position: relative; aspect-ratio: 4 / 3; }  /* 画像がない時は単色で表示されます */
.cards .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cards .caption { padding: 8px 10px; font-size: .95rem; line-height: 1.5; }

/* ---- フッター ---- */
.site-footer { background: var(--blue-light); border-top: 1px solid var(--line); padding: 20px 0; font-size: .85rem; color: var(--muted); }
.site-footer p { margin: 0 0 8px; }

/* ---- スマホ ---- */
@media (max-width: 640px) {
  .tweets { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .tweets .twitter-tweet { flex: 0 0 300px; max-width: 300px !important; scroll-snap-align: start; }
  body { font-size: 15px; }
  main.wrap { padding-top: 28px; }
  .header-inner { gap: 6px 12px; padding-top: 10px; padding-bottom: 10px; }
  .site-title { font-size: 1rem; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }
  .section { margin-bottom: 32px; }
  .sp { display: inline; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cards .caption { font-size: .85rem; padding: 6px 8px; }
  .info { grid-template-columns: 1fr; }
  .info dt { border-bottom: 0; padding-bottom: 2px; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .nav a { flex: 1; text-align: center; padding: 8px 4px; }
}
