/* 勝手におわら研究会 — 夜の八尾の紺に、ぼんぼりの山吹。STUDIO版の配色を引き継ぐ */
:root {
  --navy: #1a2b4c;
  --navy-deep: #13213c;
  --navy-line: rgba(255,255,255,.28);
  --gold: #f8b500;
  --paper: #ffffff;
  --ink: #23283a;
  --beni: #8e2a35;      /* 記事見出しの帯 */
  --beni-ink: #a3283a;  /* 目次・リンク */
  --muted: rgba(255,255,255,.72);
  --f-mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --f-latin: "Cormorant Garamond", "Shippori Mincho", Georgia, serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --header-h: 64px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--navy); color: #fff;
  font-family: var(--f-mincho); font-size: 16px; line-height: 2; letter-spacing: .08em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pc { display: none; }
@media (min-width: 841px) { .pc { display: inline; } .sp { display: none; } }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--navy); z-index: 60; }
.site-header {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  height: var(--header-h); background: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
body { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
.logo { text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: .14em; line-height: 1.3; min-width: 0; }
.logo-main, .logo small { display: block; white-space: nowrap; }
.logo-main span, .logo small span { color: var(--gold); margin: 0 .35em; }
.logo small { font-family: var(--f-latin); font-size: 15px; letter-spacing: .06em; font-weight: 500; }
.logo small span { margin: 0 .1em; }
.logo--en { font-family: var(--f-latin); font-size: 19px; letter-spacing: .04em; }
.logo--en .logo-main span { margin: 0 .2em; }
.header-right { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; gap: 10px; }
.lang a {
  font-family: var(--f-latin); font-size: 15px; line-height: 1; padding: 9px 10px; border-radius: 4px;
  background: #fff; color: var(--navy); text-decoration: none; font-weight: 600; letter-spacing: .02em;
}
.lang a:lang(ja), .lang a:first-child { font-family: var(--f-mincho); }
.lang a.is-current { background: var(--gold); color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.menu-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--gold); cursor: pointer;
  display: grid; place-content: center; gap: 5px; padding: 0; position: relative; z-index: 80;
}
.menu-btn span { display: block; width: 20px; height: 2px; background: #fff; transition: transform .3s, opacity .3s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 540px) {
  .logo { font-size: 15px; letter-spacing: .1em; }
  .logo small { font-size: 12.5px; }
  .lang a { font-size: 12px; padding: 8px 7px; }
  .menu-btn { width: 42px; height: 42px; }
  .header-right { gap: 8px; }
}

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 70; background: rgba(10,18,34,.55); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 86vw); overflow-y: auto;
  background: var(--navy); border-left: 1px solid var(--navy-line);
  padding: calc(env(safe-area-inset-top, 0px) + 20px) max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 32px) 20px;
  display: flex; flex-direction: column; gap: 24px;
  animation: slide-in .32s ease-out;
}
@keyframes slide-in { from { transform: translateX(30px); opacity: .4; } }
.drawer-logo { margin: 6px 64px 0 0; font-size: 20px; font-weight: 600; letter-spacing: .14em; line-height: 1.5; }
.drawer-logo span { color: var(--gold); }
.lang--drawer a { font-size: 16px; padding: 12px 18px; }
.drawer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.drawer-list a {
  display: block; text-decoration: none; border: 1px solid #fff; border-radius: 8px; padding: 14px 16px;
  font-size: 15px; line-height: 1.6; text-align: center; transition: background .2s, color .2s;
}
.drawer-list a:hover { background: #fff; color: var(--navy); }
body.drawer-open { overflow: hidden; }

/* ---------- sns ---------- */
.sns { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; }
.sns a { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; }
.sns svg { width: 22px; height: 22px; }
.sns--dark a { color: var(--ink); }
.sns--drawer { margin-top: auto; }
.side-rail { display: none; }
@media (min-width: 1141px) {
  .side-rail {
    display: flex; flex-direction: column; align-items: center; gap: 28px;
    position: fixed; left: 26px; top: 50%; transform: translateY(-40%); z-index: 5;
  }
  .side-rail .sns { flex-direction: column; }
  .rail-copy { writing-mode: vertical-rl; font-size: 11px; letter-spacing: .2em; margin: 0; color: var(--muted); }
  .page-top main { padding-left: 64px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; max-width: 1180px; margin: 24px auto 0;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: 1fr; grid-template-rows: auto;
}
.hero-photo {
  grid-area: 1 / 1; position: relative; min-height: 640px; border-radius: 24px; overflow: hidden; background: var(--navy-deep);
}
.hero-photo img, .hero-photo video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero-photo img.is-active, .hero-photo video { opacity: 1; }
.hero-text {
  grid-area: 1 / 1; align-self: end; position: relative; z-index: 2; background: var(--navy);
  width: 63%; margin-left: -1px; padding: 24px 18px 0 0; border-top-right-radius: 22px; min-width: 0;
}
.hero-text h1 { margin: 0 0 16px; font-size: clamp(22px, 6.2vw, 46px); line-height: 1.5; letter-spacing: .12em; font-weight: 600; text-wrap: balance; }
.hero-text p { margin: 0; font-size: 13px; line-height: 2.05; letter-spacing: .1em; }
.yt-badge {
  position: absolute; right: max(34px, calc(env(safe-area-inset-right, 0px) + 30px)); bottom: 34px; z-index: 3;
  width: 112px; aspect-ratio: 1; border-radius: 50%; background: var(--navy); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center;
  color: #fff;
}
.yt-ring { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); color: #fff; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.yt-top { font-size: 9.5px; letter-spacing: .12em; }
.yt-mid { font-size: 11.5px; color: var(--gold); letter-spacing: .06em; font-weight: 600; }
.yt-btn { font-size: 9.5px; background: #fff; color: var(--navy); border-radius: 999px; padding: 1px 8px; margin-top: 3px; letter-spacing: .04em; }
.yt-badge:hover .yt-btn { background: var(--gold); color: #fff; }
@media (min-width: 541px) {
  .hero-text p { font-size: 14.5px; }
  .yt-badge { width: 140px; }
  .yt-top, .yt-btn { font-size: 11px; } .yt-mid { font-size: 13.5px; }
}
@media (min-width: 841px) {
  .hero { margin-top: 40px; }
  .hero-photo { min-height: 620px; }
  .hero-text { width: 52%; padding: 36px 40px 0 0; border-top-right-radius: 28px; }
  .yt-badge { width: 168px; right: 56px; bottom: 48px; }
  .yt-top, .yt-btn { font-size: 12px; } .yt-mid { font-size: 15px; }
}
.hero--en .hero-text h1 { font-family: var(--f-latin); letter-spacing: .04em; font-size: clamp(32px, 7vw, 52px); }
.hero--en .hero-text p { font-family: var(--f-latin); font-size: 17px; letter-spacing: .02em; line-height: 1.7; }

/* ---------- 7選 ---------- */
.section-title {
  font-size: clamp(25px, 6.4vw, 52px); font-weight: 600; letter-spacing: .14em; line-height: 1.5; margin: 0 0 40px;
  text-wrap: balance;
}
.section-title .num { font-family: var(--f-latin); font-size: 1.1em; margin: 0 .1em; }
.section-title--sm { font-size: clamp(22px, 4.6vw, 30px); }
.section-title--en { font-family: var(--f-latin); letter-spacing: .03em; }
.seven { max-width: 1180px; margin: 96px auto 0; }
.seven .section-title, .en-note { padding-inline: max(36px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.en-note { margin: -24px 0 24px; color: var(--muted); font-family: var(--f-latin); font-size: 16px; letter-spacing: .02em; }
.card-grid {
  list-style: none; margin: 0; display: grid; grid-template-columns: 1fr; gap: 16px;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
}
@media (min-width: 600px) { .card-grid { grid-template-columns: 1fr 1fr; gap: 20px; } .card-grid > li:last-child { grid-column: 1 / -1; } }
@media (min-width: 960px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.card {
  position: relative; display: flex; align-items: flex-end; aspect-ratio: 16 / 10; overflow: hidden; text-decoration: none;
  border-radius: 14px; background: var(--navy-deep); isolation: isolate;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
@media (min-width: 600px) { .card { aspect-ratio: 4 / 3; } .card-grid > li:last-child .card { aspect-ratio: 21 / 8; } }
.card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(19,33,60,0) 35%, rgba(19,33,60,.55) 62%, rgba(19,33,60,.92));
}
.card:hover img { transform: scale(1.04); }
.card-body { display: grid; gap: 6px; padding: 0 64px 20px 22px; }
.card-no {
  font-family: var(--f-latin); font-size: 15px; font-weight: 600; letter-spacing: .12em; line-height: 1; color: var(--gold);
  display: flex; align-items: center; gap: 10px;
}
.card-no::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.card-label {
  font-size: 18px; line-height: 1.6; letter-spacing: .1em; font-weight: 600; color: #fff;
  word-break: auto-phrase; text-wrap: balance; text-shadow: 0 1px 12px rgba(19,33,60,.5);
}
.card-arrow {
  position: absolute; right: 18px; bottom: 20px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55); color: #fff; display: grid; place-items: center;
  transition: background .3s, border-color .3s, color .3s, transform .3s;
}
.card-arrow svg { width: 16px; height: 16px; }
.card:hover .card-arrow { background: var(--gold); border-color: var(--gold); transform: translateX(3px); }
@media (min-width: 960px) { .card-grid > li:last-child .card-label { font-size: 22px; } .card-grid > li:last-child .card-body { padding: 0 80px 28px 32px; } .card-grid > li:last-child .card-arrow { right: 28px; bottom: 28px; } }

/* ---------- about ---------- */
.about {
  max-width: 760px; margin: 96px auto 0; display: grid; gap: 28px; justify-items: center;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}
.about .section-title { margin: 0; }
.about-text { margin: 0; max-width: 34em; font-size: 15px; line-height: 2.2; }
.profile {
  margin-top: 28px; width: 100%; background: var(--paper); color: var(--ink); border-radius: 20px;
  padding: 0 28px 32px; display: grid; grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 18px; align-items: end;
}
.profile-photo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; margin-top: -40px; background: #ccc; }
.profile-head { min-width: 0; padding-bottom: 4px; }
.profile-roma { margin: 0; font-family: var(--f-latin); color: var(--gold); font-size: 15px; letter-spacing: .06em; line-height: 1.4; }
.profile-name { margin: 2px 0 10px; font-size: 22px; letter-spacing: .16em; line-height: 1.4; font-weight: 600; }
.profile-bio { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 2; }
.profile-link { grid-column: 1 / -1; font-size: 14px; text-decoration: none; color: var(--ink); }
.profile-link:hover { color: var(--beni-ink); text-decoration: underline; }

/* ---------- band & footer ---------- */
.band { margin: 96px 0 0; }
.band img { width: 100%; height: clamp(150px, 26vw, 320px); object-fit: cover; background: var(--navy-deep); }
.band--top { margin: 0; }
.band--top img { height: clamp(120px, 22vw, 260px); }
.site-footer {
  text-align: center; padding: 40px max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}
.footer-home { font-family: var(--f-latin); font-size: 26px; text-decoration: none; letter-spacing: .06em; }
.footer-home:hover { color: var(--gold); }
.copyright { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--navy-line); font-size: 11.5px; letter-spacing: .08em; line-height: 1.7; }

/* ---------- article ---------- */
.page-article { --header-h: 72px; }
.crumbs {
  max-width: 900px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; letter-spacing: .1em;
  padding: 18px max(24px, env(safe-area-inset-right, 0px)) 18px max(24px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--navy-line);
}
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--gold); }
.article { max-width: 760px; margin: 0 auto; padding: 40px max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px)); }
.art-head { text-align: center; padding-bottom: 28px; border-bottom: 1px solid var(--navy-line); }
.art-head h1 { margin: 0 0 18px; font-size: clamp(22px, 5.4vw, 34px); line-height: 1.6; letter-spacing: .14em; font-weight: 600; text-wrap: balance; }
.art-meta { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; font-size: 12px; letter-spacing: .1em; line-height: 1.6; font-variant-numeric: tabular-nums; }
.author { background: #fff; color: var(--beni-ink); border-radius: 999px; padding: 2px 14px; font-weight: 600; }
.eyecatch { margin: 32px 0 0; }
.eyecatch img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 26px; background: var(--navy-deep); }
.lead { margin-top: 32px; }
.lead p, .art-body p { margin: 0 0 1.4em; font-size: 15.5px; line-height: 2.1; }
.toc { margin: 36px 0 0; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 22px 26px 18px; }
.toc-title { margin: 0 0 8px; font-weight: 600; letter-spacing: .2em; font-size: 15px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.toc a { color: var(--beni-ink); font-weight: 600; font-size: 14.5px; line-height: 1.7; text-underline-offset: 3px; }
.toc-l2 { padding-left: 1.5em; }
.toc-l3 { padding-left: 3em; font-size: .95em; }
.toc-l3 a { font-weight: 400; }
.art-body { margin-top: 40px; }
.art-body .h2 {
  margin: 56px 0 22px; background: var(--beni); color: #fff; border-radius: 4px;
  padding: 10px 16px; font-size: 19px; line-height: 1.6; letter-spacing: .14em; font-weight: 600;
}
.art-body .h2:first-child { margin-top: 0; }
.art-body .h3 {
  margin: 40px 0 16px; padding: 0 0 8px; border-bottom: 1px solid var(--gold);
  font-size: 17px; line-height: 1.6; letter-spacing: .12em; font-weight: 600; color: #fff;
}
.art-fig { margin: 0 0 22px; }
.art-fig img { max-height: 620px; width: auto; max-width: 100%; border-radius: 4px; background: var(--navy-deep); }
.verse {
  margin: 0 0 22px; padding: 18px 22px; border-left: 3px solid var(--gold);
  background: rgba(255,255,255,.05); font-size: 17px; line-height: 2.1; letter-spacing: .18em;
}
.credit { text-align: right; color: var(--muted); font-size: 13.5px !important; }
.more { margin: -.4em 0 1.6em !important; }
.more a { color: var(--gold); text-decoration: none; font-size: 14.5px; border-bottom: 1px solid currentColor; }
.more a:hover { color: #fff; }
.pager {
  margin: 72px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.pager a {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; border: 1px solid var(--navy-line); border-radius: 10px;
  padding: 14px 16px; font-size: 14px; line-height: 1.6; min-width: 0; transition: border-color .2s;
}
.pager a:hover { border-color: var(--gold); }
.pager small { color: var(--gold); font-size: 11.5px; letter-spacing: .14em; }
.pager-next { text-align: right; grid-column: 2; }
@media (max-width: 420px) { .pager { grid-template-columns: 1fr; } .pager-next { grid-column: 1; } }
.page-article .band:not(.band--top) { margin-top: 80px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
/* 7本目は横いっぱいの帯にする（奇数で1枚だけ余らないように） */
.card-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 841px) {
  .card-grid li:last-child:nth-child(odd) { grid-column: auto; }
  .card-grid li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}
