/* サイトページ（トップ・規約など）。色・広告枠・ロゴは style.css を共用 */
a { color: #ffb067; }
a:hover { color: var(--gold); }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1772px; margin: 0 auto; padding: 12px 16px 0;
}
.site-header .brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.site-header .logo-lg { font-size: 28px; }
.site-header .logo-ko { font-size: 15px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--gold); }

.page { flex: 0 1 920px; min-width: 0; }
.article { line-height: 1.85; font-size: 16px; }
.article section, .page-body {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px 28px; margin-bottom: 20px;
}
.article h2 { font-size: 24px; margin: 0 0 12px; padding-left: 12px; border-left: 5px solid var(--accent); line-height: 1.4; }
.article h3 { font-size: 18px; margin: 24px 0 8px; color: var(--gold); }
.article p { margin: 0 0 12px; }
.article .ko { font-family: 'Noto Sans KR', sans-serif; font-weight: 700; }
.article .ad-slot { margin: 0 auto 20px; }
.page-body h1 { font-size: 28px; margin: 0 0 16px; }
.page-body h2 { font-size: 20px; margin: 28px 0 8px; }
.page-body .updated { color: var(--muted); font-size: 14px; }

/* ヒーロー */
.hero {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 16px; padding: 48px 24px 40px; margin-bottom: 20px; text-align: center;
}
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url(../img/bg-restaurant.webp) center / cover; filter: brightness(.6); }
.hero h1 { margin: 0; font-size: 64px; }
.hero .logo-ko { font-size: 26px; }
.hero .tagline { font-size: 40px; margin: 16px 0 0; }
.hero .catch { font-size: 20px; font-weight: 700; margin: 16px 0 8px; text-shadow: 0 2px 4px #000; }
.hero .sub { color: var(--text); margin: 0 auto 24px; max-width: 640px; text-shadow: 0 2px 4px #000; }
.cta {
  display: inline-block; padding: 14px 40px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 900;
  text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); transition: transform .1s;
}
.cta:hover { color: #fff; transform: translateY(-2px); }
.cta-note { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ランキング */
.rank-lead { font-size: 14px; color: var(--muted); }
.rank-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.rank-tab { display: grid; padding: 6px 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .25); font-size: 12px; font-weight: 700; color: var(--accent); line-height: 1.4; }
.rank-tab small { font-size: 14px; color: var(--text); }
.rank-tab:hover { border-color: var(--accent); }
.rank-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rank-tab.on small { color: #fff; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.rank-list .rank-no { width: 3em; text-align: center; font-weight: 700; color: var(--muted); }
.rank-list .top1 .rank-no, .rank-list .top2 .rank-no, .rank-list .top3 .rank-no { font-size: 20px; }
.rank-list .rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; letter-spacing: .15em; }
.rank-list .rank-score { font-variant-numeric: tabular-nums; }
.rank-list .top1 .rank-score { color: var(--gold); }
.rank-list .top2 .rank-score { color: #d9dde3; }
.rank-list .top3 .rank-score { color: #d7955b; }
.rank-list .me { outline: 2px solid var(--accent); }
.rank-list .rank-empty { justify-content: center; color: var(--muted); }

/* 表 */
.table-wrap { overflow-x: auto; margin: 0 0 12px; }
.article table { border-collapse: collapse; width: 100%; font-size: 15px; }
.article th, .article td { border: 1px solid var(--line); padding: 6px 10px; text-align: center; }
.article th { background: rgba(255, 255, 255, .06); }
.article td .ko { font-size: 22px; }

/* 文字の組み立て図 */
.compose { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 8px 0 16px; }
.compose div { background: rgba(0, 0, 0, .3); border-radius: 10px; padding: 10px 16px; text-align: center; }
.compose .ko { font-size: 26px; }
.compose small { display: block; color: var(--muted); font-size: 13px; }

/* 2ボレ式キーボード図 */
.kb-figure { display: grid; gap: 6px; justify-content: center; margin: 12px 0 8px; font-family: 'Noto Sans KR', sans-serif; }
.kb-figure .row { display: flex; gap: 6px; }
.kb-figure .row:nth-child(2) { margin-left: 18px; }
.kb-figure .row:nth-child(3) { margin-left: 40px; }
.kb-figure span {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; font-size: 20px; font-weight: 900; color: var(--ink); position: relative;
}
.kb-figure span i { position: absolute; right: 4px; bottom: 1px; font-size: 10px; font-style: normal; font-family: system-ui, sans-serif; color: #556; }
.kb-figure .c { background: var(--key-c); box-shadow: 0 3px 0 var(--key-c-edge); }
.kb-figure .v { background: var(--key-v); box-shadow: 0 3px 0 var(--key-v-edge); }
.legend { text-align: center; font-size: 14px; color: var(--muted); }
/* 指の担当図: キーの下の帯の色が担当の指、枠付きがホームポジション、F・J には突起 */
.kb-figure.fingers { --f1: #b388ff; --f2: #4fc3f7; --f3: #81c784; --f4: #ffb74d; position: relative; padding-bottom: 36px; }
.kb-figure.fingers span { box-shadow: 0 4px 0 var(--fc); }
.kb-figure.fingers .n { background: #d9d9d9; }
/* ゲーム画面と同じく 左手・中央（人差し指の内側）・右手 のブロックに分ける */
.kb-figure.fingers .row { gap: 16px; }
.kb-figure.fingers .blk { display: flex; gap: 6px; }
.kb-figure.fingers .home { outline: 3px solid #fff; outline-offset: 1px; }
.kb-figure.fingers .bump::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 40%; height: 3px; translate: -50% 0; border-radius: 2px; background: #555; }
.f1 { --fc: var(--f1); } .f2 { --fc: var(--f2); } .f3 { --fc: var(--f3); } .f4 { --fc: var(--f4); }
.legend b.f1 { color: #b388ff; } .legend b.f2 { color: #4fc3f7; } .legend b.f3 { color: #81c784; } .legend b.f4 { color: #ffb74d; }
.steps { padding-left: 1.6em; }
.steps li { margin-bottom: 6px; }
.steps b { color: var(--gold); }
.legend b.c { color: var(--key-c); }
.legend b.v { color: var(--key-v); }

/* コース一覧 */
.course-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.course-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 10px 14px; border-radius: 10px; background: rgba(0, 0, 0, .25); }
.course-list b { font-size: 18px; }
.course-list .lv { color: var(--accent); font-weight: 700; font-size: 13px; min-width: 6em; }
.course-list .desc { color: var(--muted); font-size: 14px; flex: 1 1 260px; }

.faq dt { font-weight: 700; margin-top: 12px; }
.faq dt::before { content: 'Q. '; color: var(--accent); }
.faq dd { margin: 4px 0 0; }
.faq dd::before { content: 'A. '; color: var(--good); font-weight: 700; }

/* フッター */
.site-footer { max-width: 920px; margin: 8px auto 0; padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }

@media (max-width: 700px) {
  .hero h1 { font-size: 44px; }
  .article section, .page-body { padding: 18px 16px; }
  .rank-tabs { grid-template-columns: repeat(3, 1fr); }
  .kb-figure span { width: 28px; height: 34px; font-size: 14px; border-radius: 6px; }
  .kb-figure span i { display: none; }
  .kb-figure .row { gap: 3px; }
  .kb-figure .row:nth-child(2) { margin-left: 10px; }
  .kb-figure .row:nth-child(3) { margin-left: 22px; }
  .kb-figure.fingers .row { gap: 8px; }
  .kb-figure.fingers .blk { gap: 3px; }
}

/* 言語切り替え（EN / JA）。今の言語は文字だけ、もう一方は別言語版へのリンク */
.lang-switch { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.lang-switch span { color: var(--text); }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; }
.lang-switch a:hover { color: var(--gold); border-color: var(--gold); }
.site-header .lang-switch { margin-left: auto; }
.lang-switch.in-game { position: absolute; right: 20px; top: 14px; text-shadow: 0 1px 2px #000; }
.lang-hint {
  flex: 1 0 100%; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 12px;
  border-radius: 10px; background: rgba(0, 0, 0, .35); font-size: 14px;
}
.lang-hint[hidden] { display: none; }
.lang-hint button { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.rank-reset { display: block; margin-top: 4px; color: var(--gold); font-weight: 700; }
.kb-figure .hands g { opacity: .45; } /* 色はゲーム画面と同じ。トップページは少し濃く */
