:root {
    --bg: #0d0e10;
    --surface: #17181c;
    --surface-2: #202227;
    --line: rgba(220, 214, 200, .12);
    --line-strong: rgba(220, 214, 200, .22);
    --text: #e4dfd3;
    --muted: #a39e92;
    --faint: #757169;
    --accent: #c9b386;
    --accent-soft: rgba(201, 179, 134, .35);
    --danger: #c27c6f;
    --mincho: 'Zen Old Mincho', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
    --sans: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.85;
    overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.logo, .h1, .h2, .hero-title, .feature-title, .poster-title, .game-title, .game-tag, .feature-tag { font-feature-settings: 'palt'; }

/* 粒子感のあるフィルムノイズ（画面全体に固定） */
.grain {
    position: fixed; inset: -50%; z-index: 50; pointer-events: none;
    background: url('/hub/img/grain.png') repeat;
    opacity: .55; mix-blend-mode: overlay;
    animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
    0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ヘッダー：ヒーローの上では透明、スクロールでぼかしの帯 */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 40; transition: background .4s, border-color .4s, backdrop-filter .4s; border-bottom: 1px solid transparent; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.site-head.is-scrolled, body.plain .site-head { background: rgba(13, 14, 16, .72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mincho); font-weight: 700; font-size: 19px; text-decoration: none; }
.logo-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px 2px var(--accent-soft); animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; box-shadow: 0 0 4px 0 var(--accent-soft); } }
.head-nav { display: flex; gap: 14px; font-size: 13px; }
.head-nav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.head-nav a:hover { color: var(--text); }
.head-note { color: var(--muted); font-size: 13px; }
body.plain main { padding-top: 60px; }

/* ボタン */
.button {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; cursor: pointer; text-decoration: none; text-align: center;
    background: var(--text); color: #121315; font: inherit; font-weight: 700; font-size: 15px; line-height: 1.5;
    padding: 13px 28px; border-radius: 999px; transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
}
.button:hover { background: var(--accent); }
.button.glow { background: linear-gradient(135deg, #efe4c8, var(--accent)); box-shadow: 0 0 0 1px rgba(255, 240, 210, .25) inset, 0 8px 32px -6px rgba(201, 179, 134, .55); overflow: hidden; }
.button.glow::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    animation: sheen 4.5s ease-in-out infinite 1.5s;
}
@keyframes sheen { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
.button.glow:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 240, 210, .35) inset, 0 14px 40px -6px rgba(201, 179, 134, .75); }
.button.ghost { background: rgba(255, 255, 255, .04); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong) inset; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.button.ghost:hover { background: rgba(255, 255, 255, .1); }
.button.soon, .button.soon:hover { background: rgba(255, 255, 255, .04); color: var(--muted); box-shadow: 0 0 0 1px var(--line-strong) inset; cursor: default; }

/* 見出し */
.kicker { margin: 0 0 10px; display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-size: 12px; letter-spacing: .04em; }
.kicker::before { content: ''; width: 24px; height: 1px; background: currentColor; opacity: .7; }
.h1 { font-family: var(--mincho); font-weight: 700; font-size: 30px; line-height: 1.4; margin: 0 0 12px; }
.h2 { font-family: var(--mincho); font-weight: 700; font-size: 26px; line-height: 1.45; margin: 0; }
.section-head { margin-bottom: 28px; display: grid; gap: 2px; }
.section-note { margin: 6px 0 0; color: var(--faint); font-size: 12px; }
.lead { color: var(--muted); margin: 0 0 24px; max-width: 40em; }
.section { margin-top: 96px; }
.prose p { margin: 0 0 1em; max-width: 40em; }
.text-link { color: var(--accent); }
.empty { color: var(--faint); font-size: 14px; }
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { white-space: nowrap; font-size: 11.5px; line-height: 1.6; color: var(--muted); padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px var(--line) inset; }

/* ヒーロー */
.hero { position: relative; min-height: 92svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero-bg, .hero-bg picture, .hero-shade, .dust { position: absolute; inset: 0; }
.hero-bg { z-index: -3; background: #000; }
.hero-slide { opacity: 0; transition: opacity 2.2s ease; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: 35% 75%; filter: brightness(1.18) saturate(1.05); transform: scale(1.12); transition: transform 9s linear; }
.hero-slide.is-on { opacity: 1; }
.hero-slide.is-on img { transform: scale(1.02); }
.dust { z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-shade {
    z-index: -2;
    background:
        radial-gradient(120% 90% at 60% 40%, transparent 40%, rgba(13, 14, 16, .55) 85%),
        linear-gradient(180deg, rgba(13, 14, 16, .4) 0%, rgba(13, 14, 16, 0) 28%, rgba(13, 14, 16, .35) 65%, var(--bg) 100%);
}
.hero-inner { padding-top: 120px; padding-bottom: 72px; }
.hero-title {
    margin: 0 0 14px; font-family: var(--mincho); font-weight: 900; font-size: clamp(52px, 15vw, 112px); line-height: 1.1;
    background: linear-gradient(180deg, #fbf6ea 20%, #cdbf9f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, .6));
}
.hero-lead { margin: 0 0 30px; max-width: 30em; color: #d2ccbf; font-size: 15px; text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { list-style: none; margin: 40px 0 0; padding: 0; display: flex; gap: 0; }
.hero-stats li { padding: 0 20px; border-left: 1px solid var(--line-strong); display: grid; }
.hero-stats li:first-child { padding-left: 0; border-left: 0; }
.hero-stats b { font-family: var(--mincho); font-size: 22px; font-weight: 700; line-height: 1.3; }
.hero-stats span { font-size: 11px; color: var(--muted); }
.hero-now {
    position: absolute; right: 16px; bottom: 20px; display: none; align-items: baseline; gap: 10px;
    font-size: 11px; color: var(--muted); text-decoration: none; transition: opacity .6s;
}
.hero-now b { font-family: var(--mincho); font-weight: 500; font-size: 13px; color: var(--text); }
.hero-now.is-fading { opacity: 0; }

/* 新作の大枠 */
.feature { position: relative; display: grid; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset, 0 30px 80px -30px rgba(0, 0, 0, .9); }
.feature-art { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.feature-art picture, .feature-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-art img { transition: transform 1.2s var(--ease); }
.feature-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, var(--surface)); }
.feature:hover .feature-art img { transform: scale(1.04); }
.badge-new { position: absolute; z-index: 1; left: 16px; top: 16px; font-size: 12px; font-weight: 700; color: #121315; background: var(--accent); padding: 3px 12px; border-radius: 999px; box-shadow: 0 0 20px rgba(201, 179, 134, .6); }
.feature-text { position: relative; padding: 4px 20px 26px; }
.feature-title { margin: 2px 0 6px; font-family: var(--mincho); font-weight: 700; font-size: 32px; line-height: 1.3; }
.feature-title a { text-decoration: none; }
.feature-tag { margin: 0 0 14px; color: var(--accent); font-family: var(--mincho); font-size: 16px; }
.feature-lead { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.feature-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ポスター型のカード */
.posters { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.poster { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; transition: transform .45s var(--ease), box-shadow .45s; }
.poster:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--accent-soft) inset, 0 20px 50px -20px rgba(201, 179, 134, .35); }
.poster-link { display: block; text-decoration: none; }
.poster-frame { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.poster-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .9s; filter: saturate(.9) brightness(.92); }
.poster:hover .poster-frame img { transform: scale(1.06); filter: saturate(1) brightness(1); }
.poster-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(13, 14, 16, .55) 62%, rgba(13, 14, 16, .97)); }
.poster-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 12px 14px; display: grid; gap: 2px; }
.poster-genre { margin: 0; color: var(--accent); font-size: 11px; }
.poster-title { font-family: var(--mincho); font-weight: 700; font-size: 18px; line-height: 1.4; }
.poster-tag { color: #bdb8ac; font-size: 12px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster-text .chips { margin-top: 6px; }
.poster-text .chips span { font-size: 10.5px; padding: 1px 8px; }
.poster-play {
    position: absolute; right: 10px; top: 10px; z-index: 1;
    font-size: 12px; font-weight: 700; text-decoration: none; color: #121315; background: rgba(228, 223, 211, .92);
    padding: 3px 12px; border-radius: 999px; line-height: 1.6; transition: background .2s;
}
.poster-play:hover { background: var(--accent); }
.poster-play.is-soon, .poster-play.is-soon:hover { color: var(--text); background: rgba(12, 13, 14, .78); box-shadow: 0 0 0 1px var(--line-strong) inset; }

/* 感想 */
.reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.review { position: relative; overflow: hidden; padding: 22px 20px 16px; border-radius: 14px; background: linear-gradient(160deg, var(--surface-2), var(--surface)); box-shadow: 0 0 0 1px var(--line) inset; }
.review-mark { position: absolute; right: 10px; top: -18px; font-family: var(--mincho); font-size: 110px; line-height: 1; color: var(--accent); opacity: .12; pointer-events: none; }
.review-game { margin: 0 0 8px; font-size: 12px; }
.review-game a { color: var(--accent); text-decoration: none; }
.review-body { margin: 0; }
.review-body p { margin: 0; font-family: var(--mincho); font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.review-foot { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--faint); }
.review-foot a { color: var(--muted); }

/* このサイトについて */
.about { position: relative; overflow: hidden; display: grid; gap: 28px; padding: 36px 20px; border-radius: 18px; background: radial-gradient(120% 120% at 100% 0%, rgba(201, 179, 134, .1), transparent 60%), var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.about-inner { position: relative; z-index: 1; }
.about-art { display: flex; gap: 10px; justify-content: center; }
.about-art img { width: 30%; max-width: 150px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; opacity: .8; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .8); }
.about-art img:nth-child(1) { transform: rotate(-5deg) translateY(10px); }
.about-art img:nth-child(3) { transform: rotate(5deg) translateY(10px); }

/* 作品ページ */
.hero-game { min-height: auto; }
.hero-game .hero-inner { padding-top: 76px; padding-bottom: 48px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--faint); padding: 0 0 18px; }
.crumbs a { color: var(--muted); }
.game-head { display: grid; gap: 24px; }
.game-img { width: 62%; max-width: 300px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-strong), 0 30px 60px -20px rgba(0, 0, 0, .9); }
.game-title { margin: 0 0 6px; font-family: var(--mincho); font-weight: 900; font-size: clamp(36px, 10vw, 60px); line-height: 1.2; text-shadow: 0 4px 30px rgba(0, 0, 0, .7); }
.game-tag { margin: 0 0 14px; color: var(--accent); font-family: var(--mincho); font-size: 17px; }
.game-lead { margin: 0 0 24px; color: #cfc9bc; font-size: 14px; text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.game-intro .chips { margin-top: 20px; }
.game { margin-top: 8px; }
.game-desc p { font-size: 15.5px; }
.note { margin-top: 20px; padding: 16px 18px; background: var(--surface); border-left: 2px solid var(--accent-soft); border-radius: 6px; font-size: 13px; color: var(--muted); }
.note p { margin: 0; }
.note .note-title { color: var(--text); margin-bottom: 4px; }
.howto { margin-top: 20px; font-size: 13px; color: var(--faint); }
.notfound { padding: 96px 0 24px; }

/* フッター */
.site-foot { margin-top: 120px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; background: linear-gradient(180deg, transparent, rgba(201, 179, 134, .04)); }
.site-foot .wrap { padding-top: 32px; padding-bottom: 48px; }
.site-foot p { margin: 0 0 4px; }
.site-foot .foot-name { font-family: var(--mincho); font-size: 16px; color: var(--text); margin-bottom: 6px; }
.site-foot a { color: var(--muted); }

/* スクロールで浮かび上がる（JSが動くときだけ隠す） */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .posters .reveal:nth-child(2) { transition-delay: .08s; }
.js .posters .reveal:nth-child(3) { transition-delay: .16s; }
.js .posters .reveal:nth-child(4) { transition-delay: .24s; }
.js .hero-inner > * { animation: rise 1.4s var(--ease) both; }
.js .hero-inner > :nth-child(2) { animation-delay: .12s; }
.js .hero-inner > :nth-child(3) { animation-delay: .24s; }
.js .hero-inner > :nth-child(4) { animation-delay: .36s; }
.js .hero-inner > :nth-child(5) { animation-delay: .48s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

@media (min-width: 720px) {
    .wrap { padding: 0 32px; }
    .h1 { font-size: 36px; }
    .h2 { font-size: 32px; }
    .hero { min-height: 100svh; align-items: center; }
    .hero-inner { padding-top: 140px; padding-bottom: 120px; }
    .hero-lead { font-size: 16px; }
    .hero-now { display: inline-flex; right: 32px; bottom: 32px; }
    .feature { grid-template-columns: 1.35fr 1fr; align-items: center; }
    .feature-art { aspect-ratio: auto; height: 100%; min-height: 420px; }
    .feature-art::after { background: linear-gradient(90deg, transparent 55%, var(--surface)); }
    .feature-text { padding: 36px 36px 36px 8px; }
    .feature-title { font-size: 40px; }
    .posters { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .poster-text { padding: 16px 16px 18px; }
    .poster-title { font-size: 21px; }
    .reviews { grid-template-columns: repeat(2, 1fr); align-items: start; }
    .about { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 56px 48px; }
    .hero-game { min-height: 78svh; }
    .hero-game .hero-inner { padding-top: 110px; padding-bottom: 72px; }
    .game-head { grid-template-columns: 300px 1fr; gap: 48px; align-items: end; }
    .game-img { width: 100%; }
}
@media (min-width: 1000px) {
    .posters { grid-template-columns: repeat(5, 1fr); }
    .posters:has(> :nth-child(6)) { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .grain, .logo-mark, .button.glow::after { animation: none; }
    .hero-slide, .hero-slide img, .feature-art img, .poster, .poster-frame img { transition: none; }
    .js .reveal, .js .hero-inner > * { opacity: 1; transform: none; animation: none; transition: none; }
}

/* 管理ページ：派手な演出は使わない */
body.admin .site-head { position: static; background: var(--surface); border-bottom-color: var(--line); }
body.admin .h2 { font-size: 20px; margin: 0 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 12px; }
body.admin .button { border-radius: 6px; }
body.admin .crumbs { padding: 20px 0 4px; }
.h2-note { font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--faint); }
/* 管理ページ */
.panel { margin-top: 28px; padding: 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel.narrow { max-width: 420px; margin-left: auto; margin-right: auto; margin-top: 48px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.flash, .error { margin: 20px 0 0; padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.flash { background: #23302a; color: #b8d4c2; }
.error { background: #352523; color: #e6b8ae; }
.panel .error { margin: 0 0 16px; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.admin-item { padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.admin-item.is-hidden { opacity: .55; }
.admin-item-head { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.admin-item-body { margin: 0 0 10px; font-size: 14px; overflow-wrap: anywhere; }
.badge { color: var(--danger); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions form { margin: 0; }
.small-button {
    display: inline-block; font: inherit; font-size: 13px; cursor: pointer; text-decoration: none;
    color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 14px; line-height: 1.5;
}
.small-button.danger { color: var(--danger); }
.logout { margin-top: 24px; text-align: right; }
.text-button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

/* ヒーローの文字化け（hub.js の mojibake） */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.is-garbled { display: inline-block; text-align: center; overflow: visible; white-space: nowrap; }
.hero-lead .is-garbled { color: #e9dcc0; }
.hero-title.is-split { transform: translateX(1px); filter: drop-shadow(-3px 0 rgba(255, 30, 70, .55)) drop-shadow(3px 0 rgba(40, 210, 255, .5)) drop-shadow(0 4px 30px rgba(0, 0, 0, .6)); }
.hero-lead.is-split { text-shadow: -1.5px 0 rgba(255, 30, 70, .6), 1.5px 0 rgba(40, 210, 255, .55), 0 1px 12px rgba(0, 0, 0, .8); }
