/* ゆびさき工房:夜の工房。墨色の地に、作品ごとの色(--gc)を差し色として使う */
:root {
  --bg: #121318;        /* 墨 */
  --panel: #1b1d25;     /* 作品カードの地 */
  --panel-2: #23262f;
  --line: rgba(241, 236, 226, 0.1);
  --text: #f1ece2;      /* 和紙のような生成り */
  --muted: #a9a59b;
  --accent: #f2b544;    /* 工房の灯り */
  --font-d: "Dela Gothic One", "Hiragino Kaku Gothic StdN", "Yu Gothic", sans-serif;
  --font-b: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.8 var(--font-b);
  padding-top: env(safe-area-inset-top, 0px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.3; margin: 0; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.wrap.narrow { max-width: 760px; }

/* ---------- ヘッダー ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(18, 19, 24, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 20px/1 var(--font-d); letter-spacing: 0.04em; }
.logo .mark { width: 30px; height: 30px; color: var(--accent); }
.nav { display: flex; gap: 18px; font-size: 14px; font-weight: 700; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }

/* ---------- ボタン ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font: 700 16px/1 var(--font-b);
  text-decoration: none; border-radius: 4px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn.play { background: var(--text); color: var(--bg); clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); padding-right: 32px; }
.btn.play:hover { background: var(--gc, var(--accent)); transform: translateY(-1px); }
.btn.big { min-height: 56px; font-size: 18px; padding-left: 28px; padding-right: 40px; }
.btn.ghost { border: 1.5px solid var(--line); color: var(--text); background: transparent; font-size: 14px; min-height: 44px; }
.btn.ghost:hover { border-color: var(--text); }
.btn.is-soon { color: var(--muted); cursor: default; }
.text-link { font-weight: 700; color: var(--text); text-underline-offset: 6px; text-decoration-thickness: 1.5px; }

/* ---------- ヒーロー(注目作品) ---------- */
.hero, .game-hero { padding-block: 48px 40px; background:
  radial-gradient(ellipse 70% 60% at 85% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.game-hero { background: radial-gradient(ellipse 70% 60% at 85% 20%, color-mix(in srgb, var(--gc) 14%, transparent), transparent 70%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
.hero-text { min-width: 0; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--gc, var(--accent)); }
.eyebrow a { color: inherit; }
.hero h1, .game-hero h1 { font: 400 clamp(40px, 7vw, 68px)/1.15 var(--font-d); letter-spacing: 0.02em; }
.hero-catch { margin: 14px 0 0; font-size: clamp(18px, 2.6vw, 22px); font-weight: 700; }
.hero-lead { margin: 14px 0 0; color: var(--muted); max-width: 34em; }
.free { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.hero-img { display: block; position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--gc, var(--accent)) 45%, transparent); transform: rotate(1.5deg); max-width: 380px; justify-self: center; width: 100%; }
.hero-img img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

/* ---------- セクション見出し ---------- */
.section { padding-block: 56px; border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head h2 { font: 400 clamp(32px, 5vw, 44px)/1 var(--font-d); letter-spacing: 0.04em; }
.sec-head p { margin: 0; color: var(--muted); font-weight: 700; letter-spacing: 0.2em; font-size: 13px; }

/* ---------- 作品カード ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card-img { position: relative; display: block; border-bottom: 3px solid var(--gc); }
.card-img img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 40%; width: 100%; transition: transform 0.3s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.badge { position: absolute; top: 12px; right: 12px; background: var(--gc); color: var(--bg); font: 400 13px/1 var(--font-d); padding: 7px 12px; border-radius: 999px; letter-spacing: 0.06em; }
.num { position: absolute; right: 12px; bottom: 6px; font: 400 44px/1 var(--font-d); color: transparent; -webkit-text-stroke: 1.5px rgba(241, 236, 226, 0.7); }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 22px; }
.card-body h3 a { text-decoration: none; }
.genre { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.genre::before { content: "◆ "; color: var(--gc); }
.catch { margin: 10px 0 0; flex: 1; }
.card .actions { margin-top: 18px; }
.card .btn.play { --gc: inherit; }
.soon { border-style: dashed; background: transparent; display: grid; place-items: center; min-height: 260px; }
.soon-in { text-align: center; padding: 24px; color: var(--muted); }
.soon-title { font: 400 22px/1.4 var(--font-d); color: var(--text); margin: 0 0 8px; }

/* ---------- お知らせ ---------- */
.topics { list-style: none; margin: 0; padding: 0; }
.topics li { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.topics time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); font-size: 14px; }
.topics .tag { font-size: 12px; font-weight: 700; color: var(--accent); }
.topics p { margin: 0; min-width: 0; }
.about { margin: 0; }

/* ---------- ゲームページ ---------- */
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px 20px; margin: 28px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.spec div { min-width: 0; }
.spec dt { font-size: 12px; color: var(--muted); font-weight: 700; }
.spec dd { margin: 2px 0 0; font-weight: 700; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px 18px 64px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 16px; font: 400 26px/1 var(--font-d); color: var(--gc, var(--accent)); }
.steps h3 { font-size: 17px; }
.steps p { margin: 6px 0 0; color: var(--muted); }
.tips-head { margin: 32px 0 10px; font-size: 17px; }
.tips, .plain { margin: 0; padding-left: 1.3em; }
.tips li, .plain li { margin: 6px 0; }

/* ---------- 文書ページ ---------- */
.doc h3 { margin: 28px 0 8px; font-size: 18px; }
.doc p { margin: 0 0 10px; }
.table { margin: 0; }
.table div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.table dt { color: var(--muted); font-weight: 700; }
.table dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.date { color: var(--muted); font-size: 14px; margin-top: 24px !important; }

/* ---------- フッター ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.foot-brand { margin: 0; font: 400 18px/1 var(--font-d); color: var(--text); }
.foot-brand span { font: 700 11px/1 var(--font-b); color: var(--muted); margin-left: 10px; letter-spacing: 0.1em; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-nav a { color: var(--muted); }
.copy { margin: 0; width: 100%; font-size: 12px; }

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; }
  .hero-img { max-width: 300px; order: -1; transform: rotate(0); }
  .hero, .game-hero { padding-block: 28px 32px; }
  .nav { gap: 14px; font-size: 13px; }
  .head-in { padding-block: 8px; }
  .section { padding-block: 44px; }
  .table div { grid-template-columns: 1fr; gap: 2px; }
  .topics li { grid-template-columns: auto 1fr; }
  .topics p { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
