/* なりきりドロボー 製品ページ。色はゲームの UI（夜の紫・ピンク・金・水色）に合わせる */
:root {
  --bg: #170c29;
  --bg-2: #1f1137;
  --panel: #2a1846;
  --panel-2: #33205a;
  --line: rgba(201, 189, 240, .16);
  --ink: #2a0f40;
  --text: #f6f0ff;
  --muted: #c3b6ea;
  --pink: #ff54a3;
  --pink-l: #ff99d1;
  --cyan: #38dbf2;
  --gold: #ffd940;
  --gold-d: #ff9a14;
  --lilac: #9f70ff;
  --mint: #59eba8;
  --radius: 22px;
  --wrap: 1160px;
  --nav-h: 64px;
  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 500;
  line-height: 1.8; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--cyan); }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.nw { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
kbd {
  display: inline-block; min-width: 1.9em; padding: 1px 8px 2px; border-radius: 8px; text-align: center;
  font-family: var(--font); font-weight: 800; font-size: .86em; line-height: 1.6; color: var(--text);
  background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}

/* ---------- ほぬらぼの帯 */
.studio { background: #0f0820; font-size: 13px; }
.studio .wrap { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.studio a { color: var(--muted); text-decoration: none; font-weight: 800; }
.studio a b { color: #fff; font-weight: 900; }
.studio a:hover { color: #fff; }
.studio span { color: rgba(195, 182, 234, .6); }

/* ---------- ナビ */
.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: rgba(23, 12, 41, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 22px; }
.nav-logo { text-decoration: none; font-weight: 900; font-size: 19px; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.nav-logo .a { color: var(--pink-l); }
.nav-logo .b { color: var(--gold); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .07); }

/* ---------- ボタン */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 13px 24px 14px; border-radius: 18px;
  color: #fff; text-decoration: none; font-weight: 900; font-size: 19px; line-height: 1.25; cursor: pointer;
  border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn small { display: block; font-size: 12px; font-weight: 800; opacity: .9; }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn.win { background: linear-gradient(#5be6ff, #19a9d6); }
.btn.mac { background: linear-gradient(#ff8cc6, var(--pink)); }
.btn.sm { font-size: 14px; padding: 7px 16px 8px; border-radius: 999px; border-width: 2px; box-shadow: 0 4px 0 var(--ink); background: linear-gradient(#ff8cc6, var(--pink)); }

/* ---------- ロゴ（ゲームのタイトルと同じ配色） */
.logo { margin: 0; line-height: 1.02; transform: rotate(-4deg); transform-origin: left center; }
.logo span { display: block; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.logo .a {
  font-size: clamp(50px, 6.6vw, 92px);
  background: linear-gradient(#ffc2e2, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 0 var(--ink));
}
.logo .b {
  font-size: clamp(58px, 7.6vw, 106px); margin-left: .3em;
  background: linear-gradient(#fff7a0, var(--gold-d)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 var(--ink));
}
.en {
  display: inline-block; margin: 18px 0 0; padding: 4px 18px; border-radius: 999px; background: var(--pink); color: #fff;
  font-weight: 900; letter-spacing: .1em; font-size: 14px; box-shadow: 0 4px 0 var(--ink); transform: rotate(-3deg);
}

/* ---------- ヒーロー */
.hero { position: relative; min-height: min(calc(100svh - var(--nav-h) - 36px), 860px); display: flex; flex-direction: column; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg video, .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 12, 41, .94) 0%, rgba(23, 12, 41, .78) 38%, rgba(23, 12, 41, .12) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(23, 12, 41, 0) 30%);
}
.hero-body { position: relative; flex: 1; display: flex; align-items: center; padding: 64px 0 40px; }
.hero > .wrap, .hero-body > .wrap { width: 100%; }  /* flex の中で margin:auto の .wrap が縮まないように */
.hero-copy { max-width: 560px; }
.tagline { font-size: clamp(20px, 2vw, 25px); font-weight: 900; margin: 26px 0 10px; }
.tagline em { font-style: normal; color: var(--gold); }
.lead { color: var(--muted); margin: 0 0 30px; font-size: 16px; }
.dl { display: flex; flex-wrap: wrap; gap: 14px; }
.dl-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.dl-note a { color: var(--muted); }
.facts {
  position: relative; list-style: none; margin: 0; padding: 0 0 34px; display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-size: 14px; font-weight: 800; color: var(--muted);
}
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }

/* ---------- セクション */
.sec { padding: 110px 0; }
.sec.alt { background: var(--bg-2); }
.kicker { margin: 0 0 8px; font-weight: 900; font-size: 13px; letter-spacing: .24em; color: var(--cyan); }
.h2 { margin: 0 0 18px; font-size: clamp(30px, 3.6vw, 46px); font-weight: 900; line-height: 1.3; letter-spacing: -.01em; }
.sec-lead { max-width: 40em; color: var(--muted); margin: 0 0 48px; font-size: 16px; }
.center { text-align: center; }
.center .sec-lead { margin-left: auto; margin-right: auto; }

.shot { border-radius: 16px; border: 4px solid #fff; box-shadow: 0 10px 0 var(--ink), 0 22px 44px rgba(0, 0, 0, .45); width: 100%; height: auto; }

/* 泥棒と鬼 */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.role { background: var(--panel); border-radius: 26px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.role img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.role-body { padding: 26px 30px 32px; }
.role-tag { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .16em; padding: 2px 12px; border-radius: 999px; color: var(--ink); }
.role.thief .role-tag { background: var(--pink-l); }
.role.oni .role-tag { background: var(--cyan); }
.role h3 { margin: 12px 0 10px; font-size: 25px; font-weight: 900; line-height: 1.4; }
.role p { margin: 0; color: var(--muted); }
.role b { color: var(--text); }
.rule {
  margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  padding: 26px 30px; border-radius: 26px; background: linear-gradient(100deg, rgba(255, 217, 64, .12), rgba(255, 84, 163, .08));
  border: 1px solid rgba(255, 217, 64, .3);
}
.rule .pts { font-weight: 900; font-size: 15px; color: var(--gold); white-space: nowrap; text-align: center; line-height: 1.3; }
.rule .pts b { display: block; font-size: 42px; }
.rule p { margin: 0; color: var(--muted); }
.rule p b { color: var(--text); }

/* 見どころ */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.feature + .feature { margin-top: 110px; }
.feature.flip > :first-child { order: 2; }
.feature h3 { margin: 0 0 14px; font-size: clamp(26px, 2.8vw, 34px); font-weight: 900; line-height: 1.35; }
.feature p { margin: 0 0 14px; color: var(--muted); }
.feature b { color: var(--text); }
.levels { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.levels span { padding: 3px 14px; border-radius: 999px; font-weight: 900; font-size: 14px; color: var(--ink); transform: skewX(-12deg); }
.levels .l1 { background: var(--pink-l); }
.levels .l2 { background: linear-gradient(90deg, #ffb347, var(--gold)); }
.levels .mx { background: linear-gradient(90deg, #ff6bd5, #ffd940, #59eba8, #38dbf2, #9f70ff); }
.gauge { padding: 26px; border-radius: 26px; background: radial-gradient(500px 260px at 30% 20%, #3c1d63, var(--panel)); border: 1px solid var(--line); }
.gauge img { width: 100%; height: auto; border-radius: 12px; }
.gauge figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }

.onis { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.oni-card {
  position: relative; border-radius: 26px; padding: 24px 24px 26px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(260px 220px at 50% 22%, rgba(255, 255, 255, .1), transparent 70%), var(--panel);
}
.oni-card.cat { background-color: #2b1d3c; }
.oni-card img { height: 210px; width: auto; margin: 0 auto 14px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); }
.oni-card h4 { margin: 0 0 10px; font-size: 21px; font-weight: 900; text-align: center; }
.oni-card.cat h4 { color: #ffc56b; }
.oni-card.witch h4 { color: #d9c2ff; }
.skill { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.skill .tag { display: inline-block; margin-right: 6px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 900; color: var(--ink); vertical-align: 1px; }
.skill .tag.act { background: var(--gold); }
.skill .tag.pas { background: var(--cyan); }
.skill b { color: var(--text); font-size: 15px; }

/* ステージと住人 */
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stage { background: var(--panel); border-radius: 26px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.stage > img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.stage-body { padding: 22px 24px 8px; flex: 1; }
.stage-no { font-size: 12px; font-weight: 900; letter-spacing: .2em; color: var(--gold); }
.stage h3 { margin: 4px 0 8px; font-size: 22px; font-weight: 900; }
.stage p { margin: 0; color: var(--muted); font-size: 14px; }
.residents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 14px 16px 22px; }
.residents figure { margin: 0; text-align: center; }
.residents img { height: 84px; width: auto; margin: 0 auto 6px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); transition: transform .2s; }
.residents figure:hover img { transform: translateY(-4px) rotate(-3deg); }
.residents figcaption { font-size: 12px; font-weight: 800; color: var(--text); line-height: 1.4; }
.stages-note { margin: 22px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

/* 遊びかた */
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mode { padding: 26px 24px 28px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }
.mode-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; }
.mode-ico svg { width: 28px; height: 28px; }
.mode:nth-child(1) .mode-ico { background: rgba(255, 217, 64, .16); color: var(--gold); }
.mode:nth-child(2) .mode-ico { background: rgba(255, 84, 163, .16); color: var(--pink-l); }
.mode:nth-child(3) .mode-ico { background: rgba(56, 219, 242, .16); color: var(--cyan); }
.mode:nth-child(4) .mode-ico { background: rgba(159, 112, 255, .2); color: #d9c2ff; }
.mode h3 { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.mode .sub { margin: 0 0 12px; font-size: 13px; font-weight: 800; color: var(--gold); }
.mode p { margin: 0; color: var(--muted); font-size: 14px; }
.mode b { color: var(--text); }
.replay { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: center; padding: 28px; border-radius: 26px; background: var(--panel); border: 1px solid var(--line); }
.replay img { border-radius: 14px; width: 100%; height: auto; }
.replay h3 { margin: 0 0 10px; font-size: 22px; font-weight: 900; }
.replay p { margin: 0; color: var(--muted); }

/* 画面 */
/* 画面の列は右端まで広げ、次の1枚が少し見えるようにする（横にスクロールできると分かるように） */
.gallery {
  --pad: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  display: grid; grid-auto-flow: column; grid-auto-columns: min(520px, 82vw); gap: 18px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); padding: 4px var(--pad) 22px; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.gallery-nav { display: flex; gap: 10px; margin-bottom: 18px; }
.gallery-nav button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer; display: grid; place-items: center; transition: background .15s;
}
.gallery-nav button:hover { background: var(--panel-2); }
.gallery-nav svg { width: 20px; height: 20px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; scroll-snap-align: center; text-align: left; }
.gallery img { border-radius: 14px; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); transition: transform .2s; }
.gallery button:hover img { transform: translateY(-3px); }
.gallery span { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; font-weight: 800; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: min(1280px, 94vw); width: 100%; }
dialog.lightbox::backdrop { background: rgba(8, 4, 16, .88); }
dialog.lightbox img { width: 100%; height: auto; border-radius: 14px; }
dialog.lightbox p { text-align: center; color: var(--text); font-weight: 800; margin: 12px 0 0; }
dialog.lightbox .close { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 20px; cursor: pointer; }

/* 操作 */
.tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 26px; }
.tabs button { border: 0; background: none; cursor: pointer; padding: 8px 20px; border-radius: 999px; font-weight: 900; font-size: 15px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--gold); color: var(--ink); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.controls[hidden] { display: none; }
.ctrl { padding: 24px 28px 26px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }
.ctrl h3 { margin: 0 0 14px; font-size: 19px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.ctrl h3 .role-tag { font-size: 11px; }
.ctrl.thief h3 .role-tag { background: var(--pink-l); }
.ctrl.oni h3 .role-tag { background: var(--cyan); }
.ctrl dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; align-items: baseline; }
.ctrl dt { white-space: nowrap; }
.ctrl dd { margin: 0; color: var(--muted); font-size: 15px; }
.ctrl-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; }

/* ダウンロード */
.download { position: relative; overflow: hidden; }
.download::before {
  content: ""; position: absolute; inset: 0; opacity: .22; background: url(media/stage2.webp) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(transparent, #000 40%, transparent); mask-image: linear-gradient(transparent, #000 40%, transparent);
}
.dl-box {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px;
  padding: 44px 48px; border-radius: 30px; background: rgba(42, 24, 70, .92); border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.dl-box .h2 { margin-bottom: 8px; }
.ver { display: inline-block; margin: 0 0 22px; font-weight: 800; font-size: 14px; color: var(--ink); background: var(--gold); padding: 2px 14px; border-radius: 999px; }
.dl-box .dl { flex-direction: column; align-items: stretch; max-width: 380px; }
.dl-box .muted { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.spec { margin: 0; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--line); }
.spec dt, .spec dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec dt { color: var(--muted); font-weight: 800; padding-right: 24px; }
details { margin-top: 12px; border-radius: 16px; background: rgba(23, 12, 41, .6); border: 1px solid var(--line); }
details summary { cursor: pointer; padding: 13px 18px; font-weight: 900; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 10px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); transition: transform .15s; }
details[open] summary::before { transform: rotate(45deg); }
details .inner { padding: 0 20px 16px 36px; color: var(--muted); font-size: 14px; }
details ol { margin: 0; padding-left: 1.2em; }
details li { margin: 4px 0; }
details b { color: var(--text); }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
code { background: #120a20; color: #ffe9a8; padding: 1px 6px; border-radius: 6px; font-size: .92em; }
pre { background: #120a20; color: #ffe9a8; padding: 10px 14px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; margin: 8px 0 0; }

/* フッター */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.foot a { color: var(--text); text-decoration: none; font-weight: 900; }
.foot a b { color: var(--mint); }

/* ---------- 狭い画面 */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav .btn.sm { margin-left: auto; }
  .modes { grid-template-columns: 1fr 1fr; }
  .stages { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip > :first-child { order: 0; }
  .dl-box { grid-template-columns: 1fr; padding: 32px 26px; gap: 30px; }
}
@media (max-width: 760px) {
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 6%, rgba(23, 12, 41, .78) 55%, rgba(23, 12, 41, .5)); }
  .hero-body { padding: 48px 0 28px; }
  .roles, .controls, .onis { grid-template-columns: 1fr; }
  .rule { grid-template-columns: 1fr; gap: 10px; }
  .replay { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .sec { padding: 76px 0; }
  .feature + .feature { margin-top: 76px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .modes { grid-template-columns: 1fr; }
  .btn { font-size: 17px; padding: 12px 20px 13px; }
  .dl .btn { flex: 1 1 100%; }
  .role-body { padding: 22px 22px 26px; }
  .ctrl { padding: 20px 20px 22px; }
  .ctrl dl { grid-template-columns: 1fr; gap: 2px; }
  .ctrl dd { margin-bottom: 10px; }
  .gallery { --pad: 16px; }
  .gallery-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
