/* banger.page のモック共通の外枠。各画面はこの上に組む。 */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,800&family=Noto+Sans+JP:wght@400;700&family=JetBrains+Mono:wght@400&display=swap");
@import url("./tokens.css");

:root {
  color-scheme: light dark;
  &:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
  &:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
  --page-max: 1200px;
  --gutter: var(--space-12);
  @media (width < 720px) { --gutter: var(--space-4); }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--signal-text); text-underline-offset: 0.2em; }
:focus-visible { outline: var(--border-focus) solid var(--focus); outline-offset: 2px; }
img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.875em; }
:not(pre) > code { padding: 0.1em 0.4em; border: var(--border-hairline) solid var(--line); border-radius: var(--radius-s); background: var(--surface); }

.wrap {
  width: 100%;
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* 丸いアバター。画像がなければ（読み込めなくても）頭文字 */
.avatar {
  position: relative; display: grid; place-items: center; flex: none; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--signal); color: var(--on-signal);
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.avatar--l { width: 72px; height: 72px; font-size: 32px; }
.avatar img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.avatar [hidden] { display: none; }

/* 名前と Pro の札。長い名前は折り返す */
.identity-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-width: 0; overflow-wrap: anywhere; }
.pro-badge {
  flex: none; padding: 2px 4px; border: 1px solid var(--signal-text); border-radius: var(--radius-s);
  background: transparent; color: var(--signal-text);
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.04em;
}

/* ロゴ: アイコンの下端を文字のベースラインに、高さを b のアセンダーにそろえる */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22em;
  color: var(--ink);
  text-decoration: none;
  font-size: 28px;
}
.logo__mark { width: 0.8em; height: 0.8em; align-self: baseline; translate: 0 0.07em; }
.logo__mark .glyph { fill: var(--ink); }
.logo__mark .dot { fill: var(--signal); }
.logo__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  line-height: 1;
  letter-spacing: 0;
}
.logo__word span:nth-child(1) { margin-right: -0.035em; }
.logo__word span:nth-child(2) { margin-right: -0.015em; }
.logo__word span:nth-child(3) { margin-right: -0.02em; }
.logo__word span:nth-child(4) { margin-right: -0.03em; }
.logo__word span:nth-child(5) { margin-right: -0.045em; }

/* ヘッダー */
.site-header { border-bottom: var(--border-hairline) solid var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 64px;
}
.site-nav { display: flex; align-items: center; gap: var(--space-6); min-width: 0; }
.site-nav .nav-user { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header .logo, .site-nav .btn { flex-shrink: 0; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 15px; }
.site-nav a:not(.btn):hover { text-decoration: underline; }
@media (width < 560px) { .site-nav .nav-optional { display: none; } }

/* ボタン。主ボタンの塗りは signal だが、その画面で signal を別の要素が持つときは ink にする */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-m);
  border: var(--border-hairline) solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 700 15px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { border-color: var(--ink); }
.btn--sm { min-height: 36px; padding: 0 var(--space-4); font-size: 14px; }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--ink:hover { background: color-mix(in oklab, var(--ink) 85%, var(--paper)); }
.btn--signal { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn--quiet { background: transparent; border-color: transparent; padding-inline: var(--space-2); }
.btn--quiet:hover { border-color: transparent; text-decoration: underline; }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* 見出し */
.display-l {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.heading-1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; }
.heading-2 { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.3; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.7; color: var(--ink-muted); }
.caption { font-size: 13px; line-height: 1.6; color: var(--ink-muted); }

/* 発表の枠: 16:9、radius-l、line の枠線 */
.deck-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: var(--border-hairline) solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  overflow: hidden;
}

/* 発表のカード */
.deck-card { display: grid; gap: var(--space-3); color: inherit; text-decoration: none; }
.deck-card .deck-frame { border-radius: var(--radius-m); transition: border-color 0.15s; }
.deck-card:hover .deck-frame { border-color: var(--line-strong); }
.deck-card__title { font-weight: 700; line-height: 1.5; }
.deck-card:hover .deck-card__title { text-decoration: underline; }
.deck-card__meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); }

/* フッター */
.site-footer { border-top: var(--border-hairline) solid var(--line); padding-block: var(--space-12); }
.site-footer .wrap { display: grid; gap: var(--space-6); grid-template-columns: 1fr auto; align-items: start; }
@media (width < 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); list-style: none; margin: 0; padding: 0; font-size: 14px; }
.footer-links a { color: var(--ink-muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* テーマの切り替え (2 状態: いまの見た目と逆へ) */
.theme-toggle .to-dark, .theme-toggle .to-light { display: none; }
:root:has(> head > meta[name="color-scheme"][content="light"]) .theme-toggle .to-dark { display: inline; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .to-light { display: inline; }
@media (prefers-color-scheme: light) { :root:has(> head > meta[name="color-scheme"][content="light dark"]) .theme-toggle .to-dark { display: inline; } }
@media (prefers-color-scheme: dark) { :root:has(> head > meta[name="color-scheme"][content="light dark"]) .theme-toggle .to-light { display: inline; } }

/* 見出しの前の停止点の印 */
.stop-mark::before {
  content: "";
  display: inline-block;
  width: max(8px, 0.36em); height: max(8px, 0.36em);
  margin-right: 0.45em;
  border-radius: 50%;
  background: var(--signal);
  vertical-align: 0.12em;
}
.deck-card:hover .deck-frame { border-color: var(--signal); }
.deck-card:hover .deck-card__title { color: var(--signal-text); }
.btn--signal:hover { background: color-mix(in oklab, var(--signal) 88%, var(--ink)); border-color: color-mix(in oklab, var(--signal) 88%, var(--ink)); }

/* 言語の切り替え (フッター) */
.lang-switch { display: flex; gap: var(--space-3); font-size: 14px; }
.lang-switch a { color: var(--ink-muted); }
.lang-switch [aria-current] { color: var(--ink); font-weight: 700; }
.site-footer .footer-links { align-items: center; }
.site-footer .legal-links { grid-column: 1 / -1; }
