/* まなクロ文化祭 作者のアーカイブ（/artist/ と /artist/…/）。tools/make_artist.py が作るページの共通。クラスは .ar- */
.ar-w { max-width: 800px; }

/* 頭：一覧へ戻る → 作者 → 名前 → 学年と紹介 */
.ar-head { padding-bottom: 16px; text-align: center; }
.ar-back { font-size: 13px; margin-bottom: 28px; }
.ar-back a { color: var(--teal); font-weight: 500; text-decoration: none; }
.ar-back a:hover { text-decoration: underline; }
.ar-label { font-family: var(--head); font-weight: 800; color: var(--teal); font-size: 14px; letter-spacing: .1em; }
.ar-name { word-break: break-word; }
.ar-lead { margin-top: 14px; }
.ar-head .btns { margin-top: 24px; }
.ar-profile { max-width: 620px; margin: 20px auto 0; text-align: left; }
.ar-profile p + p { margin-top: 6px; }
.ar-grade { text-align: center; font-family: var(--head); font-weight: 800; color: var(--ink); font-size: 18px; letter-spacing: .04em; margin-bottom: 14px; }

/* 本文：見出しの上は広く、見出しと本文は詰める */
.ar-body > p { margin-top: 14px; }
.ar-h { margin-top: 56px; margin-bottom: 12px; }
.ar-body > .ar-h:first-child { margin-top: 8px; }
.ar-gap { height: 24px; }

/* 作品：切らずにそのままの形で。角は丸めない */
.ar-fig { margin-top: 20px; }
.ar-fig img { width: auto; max-width: 100%; max-height: 760px; margin: 0 auto; }
.ar-fig figcaption { font-size: 13px; margin-top: 6px; text-align: center; color: #555; }
.ar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; margin-top: 20px; align-items: start; }
.ar-fig > .ph { max-width: 560px; margin: 0 auto; }
.ar-grid .ar-fig { margin-top: 0; }
.ar-grid .ar-fig > .ph { max-width: none; }
.ar-grid .ar-fig img { max-height: none; width: 100%; }
.ar-grid--past { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ar-one .ar-fig { margin-top: 20px; }

/* 動画・音・アプリ */
.ar-video { margin: 20px auto 0; position: relative; width: 100%; aspect-ratio: 16 / 9; background: #111; }
.ar-video--4-3 { aspect-ratio: 4 / 3; }
.ar-video--9-16 { aspect-ratio: 9 / 16; max-width: 340px; }
.ar-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ar-audio { display: block; width: 100%; margin-top: 20px; }
.ar-mov { display: block; width: 100%; margin-top: 20px; background: #111; }
.ar-embed { margin: 20px auto 0; max-width: 485px; aspect-ratio: 485 / 402; }
.ar-embed iframe { width: 100%; height: 100%; border: 0; }

/* 吹き出し（にっしーのあいさつ、柴崎先生のことば）は site.css の .bubble */
.ar-say { margin-top: 24px; }
.ar-says { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; margin-top: 24px; align-items: start; }
.ar-says .ar-say { margin-top: 0; }
.ar-says .ar-say:nth-child(even)::after { left: auto; right: 36px; clip-path: polygon(0 0, 100% 0, 90% 100%); }
.ar-say p + p { margin-top: 8px; }

/* 一覧：名前と学年だけ。箱で囲まない */
.ar-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 28px; margin-top: 8px; }
.ar-list a { display: block; text-decoration: none; padding: 4px 0; }
.ar-list b { display: block; font-family: var(--head); font-weight: 800; color: var(--ink); font-size: 18px; line-height: 1.45; letter-spacing: .02em; word-break: break-word; }
.ar-list small { display: block; font-size: 12px; color: var(--teal); font-weight: 500; }
.ar-list a:hover b { color: var(--teal); }
.ar-list--ev { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* 終わり：前へ・次へ と 一覧へ */
.ar-end { padding-top: 40px; padding-bottom: 80px; }
.ar-pager { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.ar-pager a { text-decoration: none; font-family: var(--head); font-weight: 800; color: var(--ink); font-size: 17px; line-height: 1.4; max-width: 48%; }
.ar-pager small { display: block; font-size: 12px; color: var(--teal); letter-spacing: .1em; }
.ar-pager__next { text-align: right; }
.ar-pager a:hover { color: var(--teal); }

@media (max-width: 860px) {
  .ar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-grid--past { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-says { grid-template-columns: 1fr; }
  .ar-h { margin-top: 48px; }
  .ar-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
  .ar-list b { font-size: 16px; }
  .ar-list--ev { grid-template-columns: 1fr; }
}
