/* 並びと形。色と書体は static/css/themes/<テーマ>.css（--bg・--fg・--muted・--line・--card・--accent・--accent-2・--font-head・--font-body） */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.8 var(--font-body); }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; border-radius: 0; }
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
h1, h2, h3, .logo { font-family: var(--font-head); font-weight: 700; letter-spacing: .02em; }
h1 { font-size: 1.9rem; line-height: 1.35; }
h2 { font-size: 1.3rem; line-height: 1.5; margin: 2.8rem 0 .6rem; padding-top: .7rem; border-top: 2px solid var(--fg); }
/* 誌面の見出しの上の小さな英字（セクションの名前）。見出しの文字（AI が読む質問）に混ぜないよう CSS で出す */
[data-kicker]::before { content: attr(data-kicker); display: block; font: 700 .7rem/1.4 system-ui, sans-serif; letter-spacing: .2em; color: var(--accent-2); margin-bottom: .2rem; }
.site-header { max-width: 1040px; margin: 0 auto; padding: 14px 16px 0; }
.masthead { display: flex; align-items: baseline; gap: 12px; padding-bottom: 6px; border-bottom: 3px double var(--fg); }
.logo { font-size: 1.7rem; line-height: 1.1; white-space: nowrap; color: var(--fg); text-decoration: none; }
.logo b { color: var(--accent); font-weight: 700; }
.issue { margin-left: auto; font-size: .75rem; color: var(--muted); letter-spacing: .1em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 0; border-bottom: 1px solid var(--fg); }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; }
.site-header nav a { color: var(--fg); text-decoration: none; letter-spacing: .05em; }
.site-header nav a:hover { color: var(--accent); }
.search { margin-left: auto; } .search input { padding: 5px 10px; border: 1px solid var(--line); border-radius: 0; background: var(--card); color: var(--fg); width: 15rem; max-width: 100%; font: inherit; font-size: .85rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; max-width: 1040px; margin: 8px auto 0; padding: 0 16px; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.answer { font-size: 1rem; color: var(--fg); margin: 0 0 1rem; }
.lead { color: var(--muted); font-size: .95rem; }
.note, .credit, .by { color: var(--muted); font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 28px 18px; }
.card { min-width: 0; }
.card h3 { margin: 8px 0 2px; font-size: 1.1rem; line-height: 1.4; } .card a { text-decoration: none; color: var(--fg); }
.card a:hover h3 { color: var(--accent); }
.card .summary { font-size: .8rem; line-height: 1.7; color: var(--muted); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .x-credit { display: none; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tags a { display: inline-block; font-size: .78rem; color: var(--muted); text-decoration: none; }
.tags a::before { content: "#"; color: var(--accent); }
.tags a:hover { color: var(--accent); }
.tags.big { gap: 8px 16px; } .tags.big a { font-size: .95rem; color: var(--fg); }
.tags.big a { font-size: .95rem; padding: 4px 14px; }
.profile-head { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 24px; align-items: start; }
.profile-head figure { margin: 0; }
.kana { font-size: .9rem; color: var(--muted); font-weight: 400; }
.tagline { display: block; font-size: 1rem; color: var(--muted); font-weight: 400; }
@media (max-width: 680px) { .profile-head { grid-template-columns: 1fr; } .search { margin-left: 0; width: 100%; } .search input { width: 100%; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; } .facts dt { color: var(--muted); } .facts dd { margin: 0; }
.sns { list-style: none; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.sns a, .button, button { display: inline-block; padding: 7px 18px; border-radius: 0; background: var(--fg); color: var(--bg); text-decoration: none; border: 0; font: inherit; font-size: .9rem; letter-spacing: .05em; cursor: pointer; }
.sns a:hover, .button:hover { background: var(--accent); color: #fff; }
.works { list-style: none; padding: 0; } .works li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.works time, .news time { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.sns.support a { background: transparent; color: var(--fg); border: 1px solid var(--fg); }
.pr { font-size: .7rem; border: 1px solid var(--muted); border-radius: 3px; padding: 0 4px; margin-right: 4px; }
.kind { font-size: .75rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; margin-right: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; } .gallery figure { margin: 0; }
.x-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.x-filter button { background: transparent; color: var(--fg); border: 1px solid var(--line); padding: 3px 12px; font-size: .85rem; letter-spacing: 0; }
.x-filter a { display: inline-block; border: 1px solid var(--line); border-radius: 0; padding: 3px 12px; font-size: .85rem; color: var(--fg); text-decoration: none; background: transparent; }
.x-filter a[aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.filters { margin: 0 0 12px; } .filters .x-filter { margin: 0 0 6px; }
.x-filter details { display: contents; } .x-filter summary { cursor: pointer; font-size: .85rem; color: var(--muted); align-self: center; padding: 4px 6px; }
.x-filter details[open] summary { display: none; }
.x-filter .label { font-size: .85rem; color: var(--muted); align-self: center; margin-right: 4px; }
/* スマホでは絞り込みを1行ずつ横にスクロールさせ、写真が早く見えるようにする */
@media (max-width: 680px) {
  .x-filter, .filters .x-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .x-filter::-webkit-scrollbar { display: none; }
  .x-filter > *, .x-filter details > * { flex: none; white-space: nowrap; }
  .x-filter.more-right { mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
  .x-filter.more-left { mask-image: linear-gradient(to right, transparent, #000 48px); }
  .x-filter.more-left.more-right { mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
}
.to-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 5; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 0; background: var(--fg); color: var(--bg); text-decoration: none; font-size: 1.3rem; box-shadow: 0 2px 8px rgb(0 0 0 / .25); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.shown { opacity: 1; pointer-events: auto; }
.no-photo { display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--card); border: 1px solid var(--line); color: var(--accent); font: 700 3.5rem var(--font-head); }
.more { grid-column: 1 / -1; justify-self: center; display: inline-block; margin: 16px 0; padding: 7px 22px; border: 1px solid var(--fg); color: var(--fg); text-decoration: none; font-size: .9rem; letter-spacing: .05em; }
.more::after { content: " →"; color: var(--accent); }
.more:hover { background: var(--fg); color: var(--bg); }
.x-filter button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.x-posts > [hidden] { display: none; }
.x-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.x-slot { border: 1px dashed var(--line); padding: 16px; min-height: 120px; }
.x-slot.loaded { border: 0; padding: 0; } .x-slot.loaded > a { display: none; }
.card .x-slot { min-height: 80px; }
.x-post { margin: 0; }
.card .x-media { aspect-ratio: 4 / 5; } .card .x-media.n1 img, .card .x-media.n1 video { height: 100%; max-height: none; object-fit: cover; }
.x-media { display: grid; gap: 2px; overflow: hidden; background: var(--line); }
.x-media > * { position: relative; display: block; min-height: 0; }
.x-media img, .x-media video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; background: #000; }
.x-media.n1 img, .x-media.n1 video { height: auto; max-height: 80vh; object-fit: contain; background: var(--card); }
.x-media.n2, .x-media.n3, .x-media.n4 { aspect-ratio: 1; grid-template-columns: 1fr 1fr; }
.x-media.n3, .x-media.n4 { grid-template-rows: 1fr 1fr; } .x-media.n3 span:first-child { grid-row: span 2; }
.x-media .video::after { content: "▶"; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgb(0 0 0 / .6); color: #fff; }
.x-post { position: relative; } .x-reveal { display: none; }
.x-sensitive .x-reveal { display: block; position: absolute; inset: 0 0 auto; aspect-ratio: 1; width: 100%; z-index: 1; border-radius: 0; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 2; }
.x-sensitive .x-reveal b { color: var(--accent); } .x-sensitive .x-media { aspect-ratio: 1; visibility: hidden; }
.x-credit { font-size: .8rem; color: var(--muted); margin-top: 4px; } .x-credit a { color: var(--muted); overflow-wrap: anywhere; } .x-credit .when { white-space: nowrap; } .x-credit b { color: var(--fg); }
/* 写真を押すと画面いっぱいに出し、上下のスクロールで次の写真へ（static/js/lightbox.js） */
.lightbox { border: 0; padding: 0; margin: 0; background: #000; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; height: 100dvh; max-height: 100dvh; }
.lightbox::backdrop { background: #000; }
.lb-open, .lb-open body { overflow: hidden; }
.lb-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.lb-feed::-webkit-scrollbar { display: none; }
.lb-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; grid-template: 100% / 100%; place-items: center; }
/* 行を 100% にしないと、img の height: 100% が画像の高さで決まり、PC で縦長の写真の上下が切れる */
.lb-slide img, .lb-slide video { width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: 0; background: #000; }
/* 動画は下に再生の操作が出るので、クレジットを上に */
.lightbox .lb-video .lb-credit { inset: 0 0 auto; padding: 16px 64px 32px 16px; background: linear-gradient(rgb(0 0 0 / .7), transparent); }
.lightbox .lb-close { position: fixed; top: 12px; right: 12px; z-index: 1; background: rgb(0 0 0 / .5); color: #fff; font-size: 1.6rem; width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.lightbox .lb-credit { position: absolute; inset: auto 0 0; margin: 0; padding: 32px 16px 16px; background: linear-gradient(transparent, rgb(0 0 0 / .7)); color: #ddd; }
.lightbox .lb-credit a, .lightbox .lb-credit b { color: #fff; }
.x-media a.zoom { cursor: zoom-in; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; } .faq summary { cursor: pointer; } .faq summary h3 { display: inline; font-size: 1.02rem; }
.faq summary::marker { color: var(--accent); }
.list { border-collapse: collapse; width: 100%; } .list th, .list td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.news { list-style: none; padding: 0; } .news li { padding: 6px 0; }
.search-big { display: flex; gap: 8px; } .search-big input { flex: 1; padding: 8px 12px; border-radius: 0; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; }
.sources ul { font-size: .85rem; word-break: break-all; }
.site-footer { border-top: 3px double var(--fg); margin-top: 48px; padding: 16px; font-size: .8rem; color: var(--muted); max-width: 1040px; margin-inline: auto; }
.table-wrap { overflow-x: auto; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .9rem; }
.table-wrap th, .table-wrap td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.table-wrap th { background: var(--card); }
/* トップの表紙。スマホは写真が先、PC は写真と見出しを左右に */
.cover { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: end; margin: 8px 0 12px; }
.cover-photo { margin: 0; } .cover-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.cover h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 .8rem; }
.cover .tagline { font-size: 1.05rem; margin-top: .6rem; line-height: 1.6; }
.cover-name a { color: var(--fg); text-decoration: none; font-family: var(--font-head); font-size: 1.1rem; }
.cover-name b { color: var(--accent); font-size: 1.5rem; margin-left: .3em; }
@media (max-width: 680px) {
  .cover { grid-template-columns: 1fr; gap: 12px; margin-inline: -16px; }
  .cover-photo .x-credit, .cover-text { padding-inline: 16px; }
  .cover h1 { font-size: 2rem; }
}
@media (max-width: 680px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .card h3 { font-size: 1rem; } .card .summary { -webkit-line-clamp: 2; font-size: .75rem; }
}
.profile-head.no-cover { grid-template-columns: 1fr; }
.profile-head h1 { font-size: 2.2rem; margin: 0 0 .3rem; }
.profile-head .answer { font-size: 1.02rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.profile-cover .x-media.n1 img { max-height: 70vh; object-fit: cover; }
@media (max-width: 680px) { .profile-cover { margin-inline: -16px; } .profile-cover .x-credit { padding-inline: 16px; } .profile-head h1 { font-size: 1.8rem; } }
/* ホーム画面に追加の案内（static/js/install.js）。画面の下に小さく、×で閉じられる */
.install { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; background: var(--bg); color: var(--fg); border: 1px solid var(--fg); box-shadow: 0 4px 16px rgb(0 0 0 / .18); }
.install img { flex: none; width: 40px; height: 40px; }
.install p { flex: 1; margin: 0; font-size: .8rem; line-height: 1.5; } .install b { display: block; font-family: var(--font-head); font-size: .9rem; } .install span { color: var(--muted); }
.install .install-add { flex: none; padding: 6px 12px; font-size: .85rem; }
.install .install-close { flex: none; background: transparent; color: var(--muted); padding: 4px 8px; font-size: 1.2rem; }
.has-install .to-top { bottom: calc(92px + env(safe-area-inset-bottom)); }
