/* ベース: リセット・変数・全体レイアウト */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b0714;
  --bg-panel: #171028;
  --bg-panel2: #1f1636;
  --fg: #f0e9ff;
  --fg-dim: #9d8fc0;
  --accent: #ff4d9d;
  --accent2: #38c6ff;
  --ok: #7dff6a;
  --border: #3a2a60;
  --party: 0.3; /* 照明の強さ 0..1 (fx.jsが更新) */
  font-size: 15px;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  min-height: 100%;
}

#app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 4px 2px;
}
#topbar h1 {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #ff4d9d, #ffc53d, #38c6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
#topbar h1 .sub {
  font-size: 0.65rem;
  color: var(--fg-dim);
  -webkit-text-fill-color: var(--fg-dim);
  margin-left: 6px;
}

.site-brand { min-width: 0; }
.site-return {
  display: inline-block;
  padding: 2px 0;
  color: var(--fg-dim);
  font-size: .72rem;
  line-height: 1.5;
  text-decoration: none;
}
.site-return:hover { color: var(--fg); text-decoration: underline; }
.site-return:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; border-radius: 2px; }

#course-tabs { display: flex; gap: 6px; margin-left: auto; }
.language-control select {
  background: var(--bg-panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tab {
  background: var(--bg-panel);
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { color: var(--fg); }
.tab.active {
  background: linear-gradient(90deg, #ff4d9d33, #38c6ff33);
  color: var(--fg);
  border-color: var(--accent);
}

#credit {
  color: var(--fg-dim);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

button { font-family: inherit; color: inherit; }
button:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 720px) {
  :root { font-size: 14px; }
  .site-brand { flex-basis: 100%; }
  #topbar h1 { flex-basis: 100%; font-size: 1rem; white-space: normal; }
  #topbar h1 .sub { display: block; margin: 2px 0 0; }
  #course-tabs { margin-left: 0; }
}
