/* Hinan Games のページ: ロゴの 2 色（黄 #ddce32・墨 #404040）と、非常口の標識のような見た目。
   見出しは、ロゴの文字に合わせたドットの字（DotGothic16。中国語・韓国語は字が足りないので Noto Sans）。
   Hinan Lab のページ（トップ・プライバシーポリシー・404）は css/lab.css */
:root {
  --yellow: #ddce32;
  --ink: #404040;
  --yellow-deep: #cfc02a;
  --header: 64px;
  --max: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
  --pixel: "DotGothic16";
  --body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--body);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
html:lang(zh-Hans) { --body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; --pixel: "Noto Sans SC"; }
html:lang(zh-Hant) { --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif; --pixel: "Noto Sans TC"; }
html:lang(ko) { --body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; --pixel: "Noto Sans KR"; }
html:lang(ko) body { word-break: keep-all; }
.pixel { font-family: var(--pixel), var(--body); font-weight: 400; }
html:lang(zh-Hans) .pixel, html:lang(zh-Hant) .pixel, html:lang(ko) .pixel { font-weight: 700; }
[hidden] { display: none !important; }
/* 見た目には出さず、読み上げには残す */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--ink); color: var(--yellow); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* 読み込み中の画面: 黄色の全面に、文字なしのロゴとバー。バーは 1.4 秒で満ちる。
   js/site.js が、バーが満ちてページの読み込みも終わったら .done を付けて、フェードアウトさせる（JavaScript が動かなくても、5 秒で消える） */
.loader { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; background: var(--yellow); color: var(--ink); animation: loader-out 0.7s ease 5s forwards; }
/* 名前を変えて、始めからフェードアウトさせる（同じ名前だと、5 秒の待ちを数えた続きになり、すぐ消えてしまう） */
.loader.done { animation: loader-done 0.7s ease forwards; }
.loader-mark { width: 64px; height: 75px; }
.loader-bar { width: 140px; height: 10px; border: 2px solid var(--ink); }
.loader-bar span { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; animation: loader-fill 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes loader-fill { to { transform: scaleX(1); } }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
@keyframes loader-done { to { opacity: 0; visibility: hidden; } }

/* ヘッダー */
.header { position: sticky; top: 0; z-index: 10; background: var(--yellow); border-bottom: 3px solid var(--ink); }
.header .wrap { display: flex; align-items: center; gap: 28px; height: var(--header); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); }
.brand .mark { width: 26px; height: 31px; }
.brand .wordmark { width: 150px; height: 17px; }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a { text-decoration: none; white-space: nowrap; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.lang {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23404040'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  padding: 4px 28px 4px 10px;
  cursor: pointer;
}
.lang:hover { background-color: var(--yellow-deep); }


/* 区切り */
.section { padding: clamp(56px, 9vw, 96px) 0; }
.section + .section { border-top: 3px solid var(--ink); }
.section h2 { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 28px; padding: 4px 14px; background: var(--ink); color: var(--yellow); font-size: clamp(18px, 3vw, 22px); line-height: 1.5; }
.section h2::before { content: ""; width: 10px; height: 10px; background: currentColor; }
.text { max-width: 760px; margin: 0; font-size: 17px; }

/* ゲーム（墨の板） */
.game { background: var(--ink); color: var(--yellow); border: 3px solid var(--ink); }
.game .key { width: 100%; }
.game-body { padding: clamp(24px, 4vw, 40px); }
.game h3 { margin: 0; font-size: clamp(28px, 6vw, 44px); font-weight: 900; line-height: 1.25; letter-spacing: 0.02em; }
.game .sub { margin: 4px 0 0; font-size: 15px; opacity: 0.85; }
.release { display: inline-block; margin: 18px 0 0; padding: 2px 12px; background: var(--yellow); color: var(--ink); font-size: 15px; }
.game .desc { margin: 18px 0 0; max-width: 760px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 22px;
  text-align: center;
  border: 3px solid var(--yellow);
  color: var(--yellow);
  text-decoration: none;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.button::after { content: "→"; }
.button:hover, .button:focus-visible { background: var(--yellow); color: var(--ink); }
.button.primary { background: var(--yellow); color: var(--ink); }
.button.primary:hover, .button.primary:focus-visible { background: var(--yellow-deep); border-color: var(--yellow-deep); }
.game .note { margin: 14px 0 0; font-size: 14px; opacity: 0.85; max-width: 760px; }
.game h4 { margin: 0; padding: 0 clamp(24px, 4vw, 40px) 12px; font-size: 16px; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 clamp(24px, 4vw, 40px) clamp(24px, 4vw, 40px); }

/* お問い合わせ */
.links { list-style: none; margin: 24px 0 0; padding: 0; border-top: 3px solid var(--ink); max-width: 760px; }
.links li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ink); }
.links a { font-weight: 700; overflow-wrap: anywhere; }

main { flex: 1; }

/* フッター（墨） */
.footer { background: var(--ink); color: var(--yellow); font-size: 13px; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 28px; padding-bottom: 32px; }
.footer .mark { width: 22px; height: 26px; color: var(--yellow); margin-right: auto; }
.footer a { color: var(--yellow); text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 720px) {
  .header .wrap { gap: 14px; }
  .nav { display: none; }
  .brand .wordmark { width: 128px; height: 15px; }
  .shots { grid-template-columns: 1fr; }
  .buttons .button { flex: 1 1 100%; }
  .links li { grid-template-columns: 1fr; gap: 0; }
}
