/* ひのこのゲーム: トップ(上の絵・ゲームの一覧・仲間・note)と、ゲームの上の帯 */
:root {
  --paper: #fff7ea;
  --card: #fffdf8;
  --ink: #3b2a22;
  --soft: #7a6052;
  --ember: #e0562b;
  --ember-dark: #b8401c;
  --line: #3b2a22;
  --pale: #f3e2cc;
  --band: #2a1c16;
  --band-ink: #ffe8d4;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
a { color: var(--ember-dark); }
img { display: block; max-width: 100%; height: auto; }

/* トップ */
body.top { background: var(--paper); color: var(--ink); line-height: 1.8; }
.menu, .hello, main, footer { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.menu { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 10px; font-weight: bold; }
.menu a { text-decoration: none; }
.menu-home { color: var(--ember-dark); font-size: 1.05rem; letter-spacing: .04em; }
.menu-links { display: flex; gap: 18px; font-size: .92rem; }
.menu-links a { color: var(--ink); }
.menu-links a:hover { color: var(--ember-dark); text-decoration: underline; }

/* 上の絵と、あいさつ */
.hello-art { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; object-position: 50% 62%; border: 3px solid var(--line); border-radius: 18px; }
.hello-body { display: flex; gap: 22px; align-items: flex-start; padding: 0 12px; }
.hello-icon { flex: none; width: 128px; height: 128px; margin-top: -52px; border-radius: 50%; border: 4px solid var(--paper); box-shadow: 0 0 0 3px var(--line); background: #13184a; }
.hello-text { padding-top: 14px; }
.hello h1 { margin: 0; font-size: 2rem; line-height: 1.3; color: var(--ember-dark); letter-spacing: .04em; }
.hello-lead { margin: .25em 0 .4em; font-size: 1.15rem; font-weight: bold; }
.hello-text p:last-child { margin: 0; color: var(--soft); }

/* 見出し */
section { margin-top: 44px; }
h2 { font-size: 1.35rem; margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ember); flex: none; align-self: center; }
h2 small { font-size: .85rem; font-weight: normal; color: var(--soft); }

/* ゲームのカード */
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.game { background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--pale); display: flex; flex-direction: column; overflow: hidden; }
.game-art { position: relative; display: block; aspect-ratio: 16 / 9; border-bottom: 2px solid var(--line); background: var(--pale); }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: .1em .7em; border-radius: 999px; border: 2px solid var(--line); font-size: .8rem; font-weight: bold; background: #fff; color: var(--ink); }
.tag.new { background: var(--ember); color: #fff; }
.tag.first { background: #ffe27a; }
.game-body { padding: 12px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.game-date { margin: 0; font-size: .8rem; color: var(--soft); }
.game h3 { margin: 0 0 .3em; font-size: 1.2rem; line-height: 1.4; }
.game h3 a { color: var(--ink); text-decoration: none; }
.game h3 a:hover { color: var(--ember-dark); text-decoration: underline; }
.game-body > p { margin: 0 0 .7em; font-size: .95rem; }
.facts { margin: 0 0 .8em; padding: 8px 12px; border-radius: 10px; background: var(--paper); font-size: .88rem; line-height: 1.6; }
.facts div { display: flex; gap: 10px; }
.facts dt { flex: none; width: 5.6em; color: var(--soft); }
.facts dd { margin: 0; }
.facts .pc-only dd { color: var(--ember-dark); font-weight: bold; }
.game .say { display: flex; align-items: center; gap: 10px; margin: 0 0 1em; font-size: .9rem; }
.say img { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); }
.say span { position: relative; padding: .35em .8em; border-radius: 12px; background: #fff; border: 2px solid var(--pale); }
.actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.button { display: inline-block; padding: .45em 1.5em; border-radius: 999px; border: 2px solid var(--line); background: var(--ember); color: #fff; font-weight: bold; text-decoration: none; box-shadow: 0 3px 0 var(--line); }
.button:hover { background: var(--ember-dark); }
.button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.button.sub { background: #fff; color: var(--ember-dark); }
.button.sub:hover { background: #fff1e6; }

/* ひのこと仲間 */
.friends { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.friends li { text-align: center; }
.friends img { width: 128px; height: 128px; margin: 0 auto 6px; border-radius: 50%; border: 2px solid var(--line); background: #fff; object-fit: cover; }
.friends h3 { margin: 0; font-size: 1.05rem; }
.friends p { margin: .2em 0 0; font-size: .88rem; line-height: 1.7; text-align: left; }

/* note への入口 */
.note-box { display: flex; gap: 20px; align-items: center; padding: 20px 24px; background: var(--card); border: 2px dashed var(--line); border-radius: 16px; }
.note-box img { flex: none; width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--line); }
.note-box h2 { margin-bottom: 4px; }
.note-box h2::before { display: none; }
.note-box p { margin: 0 0 12px; }

footer { padding-top: 36px; padding-bottom: 40px; font-size: .85rem; color: var(--soft); }
footer p { margin: .2em 0; }

/* 無いページ */
.missing main { padding-top: 60px; text-align: center; }
.missing main img { width: 160px; margin: 0 auto; border-radius: 50%; border: 2px solid var(--line); }

@media (max-width: 760px) {
  .friends { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .menu-links { gap: 12px; font-size: .85rem; }
  .menu-home { font-size: .95rem; }
  .hello-art { aspect-ratio: 4 / 3; object-position: 50% 70%; border-radius: 14px; }
  .hello-body { flex-direction: column; align-items: center; text-align: center; padding: 0; gap: 0; }
  .hello-icon { width: 104px; height: 104px; margin-top: -44px; }
  .hello-text { padding-top: 8px; }
  .hello h1 { font-size: 1.7rem; }
  .hello-lead { font-size: 1.05rem; }
  .hello-text p:last-child { text-align: left; }
  .games { grid-template-columns: 1fr; }
  .friends img { width: 104px; height: 104px; }
  .note-box { flex-direction: column; text-align: center; padding: 18px; }
  .note-box h2 { justify-content: center; }
}

/* ゲームの上の帯: 細く、暗く。遊ぶ所はその下の全部 */
body.play { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #000; overflow: hidden; }
.band { flex: none; height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; background: var(--band); font-size: 13px; line-height: 1; white-space: nowrap; overflow: hidden; }
.band a { color: var(--band-ink); text-decoration: none; opacity: .85; }
.band a:hover { opacity: 1; text-decoration: underline; }
.band .article { overflow: hidden; text-overflow: ellipsis; }
#game { flex: 1; width: 100%; border: 0; display: block; background: #000; }
#game[hidden] { display: none; }

/* パソコンだけのゲームを、スマホで開いたとき */
.pc-note { flex: 1; overflow: auto; padding: 40px 24px; background: var(--paper); color: var(--ink); text-align: center; line-height: 1.8; }
.pc-note[hidden] { display: none; }
.pc-note img { width: 132px; margin: 0 auto 12px; border-radius: 50%; border: 2px solid var(--line); }
.pc-note p { max-width: 26em; margin: 0 auto 14px; }
.pc-note .link { border: 0; background: none; color: var(--soft); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
