/* さいぷら — 白背景＋黒系テキスト＋緑1色。主役はゲーム画像。 */
:root {
  --bg: #ffffff;
  --text: #111111;
  --sub: #666666;
  --line: #eaeaea;
  --soft: #f4f5f4;
  --green: #16a34a;        /* アクセントはこの1色だけ */
  --green-hover: #128a3e;
  --radius: 16px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 24px rgba(17, 17, 17, 0.06);
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--sub); }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: inline-flex; align-items: center; }
.logo-img { height: 48px; width: auto; }

/* 準備中のリンク：カーソルを合わせると吹き出しで「準備中」 */
.soon { position: relative; cursor: default; opacity: .55; }
.soon::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 10px); transform: translate(-50%, -4px); padding: 5px 10px; border-radius: 8px; background: var(--text); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; }
.soon:hover, .soon:focus-visible { opacity: 1; }
.soon:hover::after, .soon:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.site-footer .soon::after { top: auto; bottom: calc(100% + 10px); transform: translate(-50%, 4px); }
.site-footer .soon:hover::after, .site-footer .soon:focus-visible::after { transform: translate(-50%, 0); }
.nav { display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--green); }
.nav-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; color: var(--text); }
.nav-icon svg { width: 22px; height: 22px; }
.nav-icon .brand-icon.steam { width: 26px; height: 26px; }
.nav-icon .brand-icon.youtube { width: 28px; height: 28px; }
.nav-icon:hover { color: var(--green); opacity: .85; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(420px, 44vw, 540px); display: flex; align-items: center; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }
.hero-text { max-width: 640px; padding: 40px 0 56px; }
.hero-title { font-size: clamp(30px, 4.1vw, 54px); font-weight: 900; line-height: 1.32; letter-spacing: -0.01em; word-break: auto-phrase; }
.hero-lead { margin-top: 22px; color: var(--sub); font-size: clamp(15px, 1.4vw, 18px); max-width: 24em; word-break: auto-phrase; }
.btn-hero { margin-top: 36px; }
.hero-media { position: absolute; top: 0; right: 0; bottom: 0; width: 58%; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%), linear-gradient(to top, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0%, #000 30%), linear-gradient(to top, transparent 0%, #000 22%); mask-composite: intersect; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 48px; padding: 0 28px; border-radius: 999px; font-size: 16px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; cursor: pointer; font-family: inherit; transition: background-color .2s, color .2s, border-color .2s; }
.btn-lg { height: 60px; padding: 0 34px; font-size: 17px; }
.btn-hero { height: 62px; padding: 0 34px; font-size: 17px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); color: #fff; }
.btn-ghost { border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-disabled { color: var(--sub); background: var(--soft); cursor: default; }
.i-arrow { width: 20px; height: 20px; flex: none; transition: transform .25s; }
.i-play { width: 15px; height: 15px; }
.btn:hover .i-arrow, .more-link:hover .i-arrow, .back:hover .i-arrow { transform: translateX(3px); }
.back:hover .i-arrow { transform: translateX(-3px); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(64px, 8vw, 104px); }
.page-top { padding-top: clamp(40px, 6vw, 72px); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-title { color: var(--green); font-size: clamp(20px, 2vw, 24px); font-weight: 700; letter-spacing: 0.42em; }
.section-title.small { font-size: 14px; letter-spacing: 0.3em; margin-bottom: 24px; }
.more-link { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: #444; }
.more-link .i-arrow { color: var(--green); }
.more-link:hover { color: var(--green); }

/* ---------- Game cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .3s, transform .3s; }
.card:hover { box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 14px 32px rgba(17, 17, 17, 0.09); }
.card-media { position: relative; aspect-ratio: 11 / 8; overflow: hidden; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: 22px 24px 22px; flex: 1; }
.card-title { font-size: clamp(18px, 1.6vw, 21px); font-weight: 700; line-height: 1.45; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* カード全体をクリックで詳細へ */
.card-genre { color: var(--sub); font-size: 14px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; min-height: 52px; }
.platform { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.platform svg { width: 30px; height: 30px; }
.status { font-size: 12px; color: var(--sub); font-weight: 500; }
.status::before { content: "·"; margin-right: 8px; }
.round-arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #fff; transition: background-color .2s; }
.round-arrow .i-arrow { width: 22px; height: 22px; }
.card:hover .round-arrow { background: var(--green-hover); }
.card:hover .round-arrow .i-arrow { transform: translateX(3px); }
.teaser-media { display: grid; place-items: center; }
.teaser-media span { font-size: clamp(64px, 8vw, 110px); font-weight: 900; color: #d9dcd9; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card-teaser:hover .teaser-media span { transform: rotate(-8deg) scale(1.05); }

/* ---------- Carousel ---------- */
.carousel, .slide.single { position: absolute; inset: 0; }
.carousel { overflow: hidden; touch-action: pan-y; }
.carousel-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.3, .7, .2, 1); }
.slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn { position: absolute; top: 50%; z-index: 3; width: 38px; height: 38px; margin-top: -19px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .25s, transform .25s, color .2s; }
.carousel-btn svg { width: 16px; height: 16px; }
.carousel-btn.prev { left: 12px; transform: translateX(-4px); }
.carousel-btn.next { right: 12px; transform: translateX(4px); }
.carousel:hover .carousel-btn, .card:hover .carousel-btn, .carousel-btn:focus-visible { opacity: 1; transform: none; }
.carousel-btn:hover { color: var(--green); }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.carousel-dots span { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.65); box-shadow: 0 0 2px rgba(0, 0, 0, 0.25); transition: width .3s, background-color .3s; }
.carousel-dots span.on { width: 18px; background: #fff; }
@media (hover: none) { .carousel-btn { opacity: .9; transform: none; width: 32px; height: 32px; margin-top: -16px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 0 0 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 40px; }
.brand-small .logo-img { height: 36px; }
.copyright { margin-top: 10px; font-size: 13px; color: var(--sub); }
.copyright a:hover { color: var(--green); }
.footer-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 14px clamp(20px, 3vw, 36px); font-size: 14px; }
.footer-nav a:hover { color: var(--green); }
.to-top { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); color: var(--green); margin-left: clamp(0px, 4vw, 64px); }
.to-top svg { width: 18px; height: 18px; }
.to-top:hover { border-color: var(--green); }

/* ---------- Detail ---------- */
.detail { padding-top: 20px; padding-bottom: clamp(64px, 8vw, 104px); }
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.back:hover { color: var(--green); }
.detail-media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.video-play { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.95); color: var(--text); display: grid; place-items: center; cursor: pointer; z-index: 2; transition: transform .25s, color .2s; }
.video-play .i-play { width: 26px; height: 26px; margin-left: 4px; }
.video-play:hover { transform: scale(1.06); color: var(--green); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; padding: clamp(28px, 4vw, 44px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.detail-title { font-size: clamp(30px, 4.4vw, 52px); font-weight: 900; line-height: 1.25; }
.detail-title small { font-size: 0.5em; font-weight: 700; color: var(--sub); margin-left: 8px; }
.detail-lead { margin: 10px 0 6px; font-size: clamp(16px, 1.6vw, 19px); color: #333; }
.detail-head .card-foot { margin-top: 6px; min-height: 0; }
.detail-section { padding-top: clamp(40px, 5vw, 64px); }
.overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px 64px; }
.overview p { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.95; }
.facts { margin: 0; display: grid; gap: 14px; font-size: 14px; align-content: start; }
.facts div { display: grid; grid-template-columns: 8em 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--sub); }
.facts dd { margin: 0; font-weight: 700; }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 40px; counter-reset: f; }
.features li { counter-increment: f; display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-weight: 500; }
.features li::before { content: counter(f, decimal-leading-zero); color: var(--green); font-size: 13px; font-weight: 700; padding-top: 3px; }

/* ---------- Play ---------- */
.play { padding-top: 12px; padding-bottom: 48px; }
.play-bar { display: flex; justify-content: space-between; align-items: center; height: 52px; }
.play-bar .back { margin: 0; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--green); color: var(--green); }
.player { position: relative; width: 100%; height: min(calc(100svh - 190px), 820px); min-height: 360px; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.player > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(3px); transform: scale(1.03); }
.player-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(255, 255, 255, 0.5); }
.player-note { font-size: 13px; font-weight: 700; }
.player-note-strong { font-size: 16px; background: #fff; padding: 10px 20px; border-radius: 999px; }
.player-progress { position: absolute; left: 50%; top: 50%; width: min(320px, 60%); height: 6px; transform: translate(-50%, -50%); border-radius: 99px; background: rgba(0, 0, 0, 0.08); overflow: hidden; }
.player-progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
#unity-canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: #e9f7fb; touch-action: none; }
.play-help { margin-top: 14px; font-size: 13px; text-align: center; color: var(--sub); }

/* ---------- Prose ---------- */
.prose { max-width: 760px; padding-bottom: 80px; }
.prose h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; margin-bottom: 28px; }
.prose h2 { font-size: 18px; font-weight: 700; margin: 36px 0 10px; }
.prose p { color: #333; }
.prose a { color: var(--green); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview { grid-template-columns: 1fr; }
  .hero-media { width: 64%; }
}
@media (max-width: 760px) {
  .header-inner { height: 64px; }
  .logo-img { height: 38px; }
  .nav { gap: 18px; font-size: 14px; }
  .hero { flex-direction: column-reverse; align-items: stretch; min-height: 0; }
  .hero-media { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .hero-video { -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 25%); mask-image: linear-gradient(to top, transparent 0%, #000 25%); }
  .hero-text { padding: 8px 0 40px; }
  .grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .to-top { margin-left: 0; }
  .detail-head .actions, .detail-head .btn { width: 100%; }
  .player { height: calc(100svh - 170px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 触感フィードバック（控えめに、でも触って分かる） ---------- */
:root { --spring: cubic-bezier(.34, 1.7, .5, 1); --soft-spring: cubic-bezier(.22, 1.35, .4, 1); }
.btn, .carousel-btn, .nav-icon, .to-top, .icon-btn, .video-play, .brand, .more-link, .back, .soon, .round-arrow {
  transition: transform .45s var(--spring), box-shadow .3s, background-color .2s, color .2s, border-color .2s, opacity .2s;
}

/* ホバー：浮く・弾む */
.btn:hover { transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 10px 22px -8px rgba(22, 163, 74, .55); }
.to-top:hover, .icon-btn:hover { transform: translateY(-3px); }
.nav-icon:hover, .soon:hover { transform: scale(1.18); }
.brand:hover { transform: rotate(-2.5deg) scale(1.05); }
.carousel-btn:hover { transform: scale(1.1); }
.more-link:hover .i-arrow, .btn:hover .i-arrow { transform: translateX(5px); }

/* 文字リンク：緑の下線がスッと伸びる */
.nav > a:not(.nav-icon), .footer-nav > a:not(.nav-icon):not(.to-top), .more-link { position: relative; }
.nav > a:not(.nav-icon)::after, .footer-nav > a:not(.nav-icon):not(.to-top)::after, .more-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; border-radius: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.nav > a:not(.nav-icon):hover::after, .footer-nav > a:not(.nav-icon):not(.to-top):hover::after, .more-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* カード：カーソル位置に合わせて少し傾き、浮き上がる（--rx/--ry は JS が設定） */
.card {
  --rx: 0deg; --ry: 0deg; --ty: 0px; --s: 1;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--ty)) scale(var(--s));
  transition: transform .55s var(--soft-spring), box-shadow .35s, opacity .7s ease;
}
.card:hover { --ty: -6px; box-shadow: 0 2px 4px rgba(17, 17, 17, .04), 0 22px 44px -10px rgba(17, 17, 17, .18); }
.card:hover .card-media img { transform: scale(1.06); }
.card:hover .round-arrow { transform: scale(1.12); }
.card:hover .teaser-media span { transform: rotate(-10deg) scale(1.08); }

/* 押したとき：沈む（ホバーより後に書く） */
.btn.is-pressed, .carousel-btn.is-pressed, .nav-icon.is-pressed, .to-top.is-pressed, .icon-btn.is-pressed,
.video-play.is-pressed, .brand.is-pressed, .more-link.is-pressed, .back.is-pressed, .soon.is-pressed {
  transform: scale(.92); transition-duration: .08s;
}
.card.is-pressed { --ty: -2px; --s: .975; transition-duration: .1s; }
.card.is-pressed .round-arrow { transform: scale(.88); transition-duration: .08s; }

/* スクロールで画面に入ったら、ふわっと出る（1回だけ） */
.reveal { transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
.js .card.reveal:not(.in) { --ty: 18px; transform: perspective(1000px) translateY(var(--ty)); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal:not(.in) { opacity: 1; transform: none; }
  .card, .card:hover, .btn:hover, .brand:hover, .nav-icon:hover { transform: none; }
}
/* ---------- スマホの PLAY ページ：ヘッダー等を消してゲームを画面いっぱいに ---------- */
@media (max-width: 760px), (max-height: 500px) {
  .play-page { overscroll-behavior: none; }
  .play-page .site-header, .play-page .site-footer, .play-page .play-help { display: none; }
  .play-page .play { padding: 0; max-width: none; }
  .play-page .play-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; height: 48px; padding: 0 14px; background: rgba(255, 255, 255, 0.92); }
  .play-page .player { height: 100svh; min-height: 0; border-radius: 0; }
  .play-page.playing .play-bar { display: none; }
}