/* Layout: follows the owner's blog. Charcoal header and nav, grey ground, white content panel, poster banner with a slanted green band. */
:root {
  color-scheme: light;
  --ground: #9E9E9E;
  --panel: #FFFFFF;
  --char: #212121;
  --char-2: #424242;
  --ink: #1A1A1A;
  --muted: #616161;
  --line: #E0E0E0;
  --banner: #D6D3CA;
  --green: #12B824;
  --green-deep: #0D8F1C;
  --red: #E51E1E;
  --gold: #F7C62F;
  --font-poster: "Dela Gothic One", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-body); line-height: 1.7; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}

/* ヘッダー */
.site-head { background: linear-gradient(100deg, #1F1F1F, #4A4A4A 45%, #1F1F1F); color: #fff; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { flex: none; width: 64px; height: 64px; object-fit: contain; }
.brand small { display: block; font-size: 13px; line-height: 1.5; }
.brand b { display: block; font-size: 21px; line-height: 1.4; }

.notice { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 9px 14px; border-radius: 4px; background: var(--char); color: #fff; font-weight: 700; text-decoration: none; }
.notice span:first-child { flex: none; padding-right: 12px; border-right: 1px solid #fff; color: var(--gold); font-size: 13px; }
.notice span:last-child { flex: 1; min-width: 0; text-align: center; }
.notice:hover { background: #000; }

.gnav { margin-top: 8px; background: linear-gradient(180deg, #3A3A3A, #1F1F1F); }
.gnav .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gnav a { display: block; padding: 9px 4px; border-right: 1px solid #555; color: #fff; font-size: 14px; text-align: center; text-decoration: none; }
.gnav a:first-child { border-left: 1px solid #555; }
.gnav a:hover { background: #000; }

/* バナー */
.banner { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); margin-top: 8px; overflow: hidden; background: var(--banner); }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 0 61%, var(--green) 61% 68%, var(--green-deep) 68% 70%, #fff 70%); }
.banner > * { position: relative; }
.banner-copy { padding: clamp(14px, 3vw, 30px); }
.banner h1 { font-family: var(--font-poster); font-weight: 400; font-size: clamp(23px, 4.2vw, 46px); line-height: 1.25; }
.banner ol { display: grid; gap: 2px; margin: clamp(8px, 1.6vw, 16px) 0 0; padding: 0; list-style: none; font-family: var(--font-poster); font-size: clamp(12.5px, 2.2vw, 24px); line-height: 1.45; }
.banner li { display: flex; gap: .6em; }
.banner em { color: var(--red); font-style: normal; text-decoration: underline; text-underline-offset: .15em; }
.btn-green { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 3px solid #4E9A12; border-radius: 12px; background: linear-gradient(180deg, #D4F85A, #7FD321); box-shadow: inset 0 2px 0 rgb(255 255 255 / .6), 0 2px 5px rgb(0 0 0 / .35); color: #123A0A; font-size: 18px; font-weight: 900; text-decoration: none; }
.btn-green:hover { filter: brightness(1.06); }
.banner .btn-green { margin-top: clamp(10px, 2vw, 20px); }

.banner-art { position: relative; min-height: clamp(200px, 32vw, 340px); }
.chara { position: absolute; right: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
.bubble { position: absolute; top: 8px; right: 6px; z-index: 1; padding: 4px 12px; white-space: nowrap; border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--green-deep); font-size: 13px; font-weight: 900; }
.fan a { position: absolute; top: 50%; left: 56%; width: 46%; max-width: 170px; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 14px rgb(0 0 0 / .35); transition: transform .2s ease; }
.fan a:nth-child(1) { transform: translate(-96%, -50%) rotate(-10deg); }
.fan a:nth-child(2) { transform: translate(-6%, -50%) rotate(9deg); }
.fan a:nth-child(3) { transform: translate(-50%, -54%); z-index: 1; }
.fan a:hover { filter: brightness(1.08); }

/* 写真タイル */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tile { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 2; overflow: hidden; background: var(--char-2); box-shadow: 0 2px 6px rgb(0 0 0 / .45); text-decoration: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.72); transition: transform .2s ease; }
.tile:hover img { transform: scale(1.05); }
.tile span { position: relative; padding: 0 6px; color: #fff; font-size: clamp(14px, 1.8vw, 18px); font-weight: 900; line-height: 1.35; text-align: center; text-shadow: 0 1px 4px #000, 0 0 2px #000; }

/* 本文パネル */
.panel { margin-block: 12px 20px; padding: 0 clamp(12px, 3vw, 32px) 28px; background: var(--panel); }
.label { display: inline-block; margin-bottom: 14px; padding: 5px 16px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.5; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.chips { display: flex; gap: 6px; }
.chip { min-height: 42px; padding: 0 14px; border: 1px solid var(--char); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--char); color: #fff; }
.search { flex: 1 1 200px; min-width: 0; min-height: 42px; padding: 0 12px; border: 1px solid #BDBDBD; border-radius: 4px; background: #FAFAFA; color: var(--ink); font: inherit; font-size: 16px; }
.search::placeholder { color: #757575; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 44%), 1fr)); gap: 22px 14px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; text-decoration: none; }
.card .cover { box-shadow: 0 1px 4px rgb(0 0 0 / .4); transition: filter .15s ease; }
.card:hover .cover { filter: brightness(1.08); }
.card:hover h3 { color: var(--green-deep); }
.card h3 { font-size: 16px; font-weight: 700; line-height: 1.4; }
.card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.55; }
.kind { display: inline-block; padding: 1px 8px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 700; }
.kind .new { color: var(--gold); margin-left: 6px; }
.empty { padding-block: 40px; color: var(--muted); text-align: center; }

/* カバー */
.cover { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; container-type: inline-size; background: oklch(.74 .16 var(--h)); color: oklch(.26 .09 var(--h)); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::before { content: ""; position: absolute; inset: 0; opacity: .5; }
.cover.has-image::before { display: none; }
.cover.p0::before { background: radial-gradient(circle at 50% 50%, oklch(.84 .13 var(--h)) 22%, transparent 23%) 0 0 / 34px 34px; }
.cover.p1::before { background: repeating-linear-gradient(135deg, oklch(.84 .13 var(--h)) 0 12px, transparent 12px 28px); }
.cover.p2::before { background: repeating-radial-gradient(circle at 100% 100%, oklch(.84 .13 var(--h)) 0 14px, transparent 14px 32px); }
.cover.p3::before { background: conic-gradient(from 45deg at 50% 50%, oklch(.84 .13 var(--h)) 25%, transparent 0 50%, oklch(.84 .13 var(--h)) 0 75%, transparent 0) 0 0 / 56px 56px; }
.glyph { position: absolute; left: 8%; bottom: 2%; font-family: var(--font-poster); font-size: 58cqw; line-height: 1.1; }

/* 作品ページ */
.detail { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 12px; padding: clamp(14px, 3vw, 26px); background: var(--char-2); color: #fff; }
.detail .kind { background: #fff; color: var(--ink); }
.detail .kind .new { color: var(--red); }
.detail h1 { margin-top: 8px; color: var(--gold); font-family: var(--font-poster); font-weight: 400; font-size: clamp(30px, 5vw, 50px); line-height: 1.25; text-wrap: balance; }
.detail .desc { max-width: 34em; margin-top: 12px; font-size: 16px; }
.play { min-width: 240px; margin-top: 20px; font-size: 21px; }
.howto { margin-top: 22px; }
.howto h2 { color: #A5E86B; font-size: 15px; font-weight: 900; }
.howto ul { margin: 6px 0 0; padding-left: 1.2em; max-width: 34em; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 16px; color: #BDBDBD; font-size: 13px; }
.related { padding-top: 0; }

/* 読み物 */
.page { padding-top: 20px; }
.page h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 900; line-height: 1.35; margin-bottom: 14px; }
.page h2 { margin-top: 24px; padding: 4px 12px; background: var(--char); color: #fff; font-size: 16px; }
.page p { max-width: 42em; margin-top: 8px; }
.listhead { margin-bottom: 14px; color: var(--muted); }

/* フッター */
footer { background: linear-gradient(100deg, #1F1F1F, #4A4A4A 45%, #1F1F1F); color: #fff; padding-block: 22px; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
footer b { font-size: 17px; }
footer nav { display: flex; gap: 16px; }

@media (max-width: 720px) {
  .brand img { width: 52px; height: 52px; }
  .brand b { font-size: 17px; }
  .brand small { font-size: 11.5px; }
  .banner { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .banner .btn-green { min-height: 44px; padding: 0 16px; font-size: 15px; }
  .banner-art { min-height: 0; }
  .bubble { top: 5px; right: 3px; padding: 2px 7px; border-width: 1.5px; font-size: 10px; }
  .chara { height: calc(100% - 26px); object-position: center bottom; }
  .fan a { width: 62%; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .detail .cover { aspect-ratio: 16 / 10; }
  .detail .glyph { font-size: 34cqw; }
  .play { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
