/* バズ名人！ — 共通のトークンと部品（正本＝design/DESIGN.md） */
:root {
  --ground: #EFF2F5;
  --surface: #FFFFFF;
  --ink: #16181D;
  --muted: #565D6A;
  --muted-2: #6A707C;
  --line: #D8DCE2;
  --brand: #FFD43B;
  --alert: #C2361F;
  --brand-press: #F2C200;
  --brand-soft: #FFF3C4;
  --ink-soft: #2A2D35;

  --font: "LINE Seed JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --fs-hero: clamp(34px, 5.2vw, 60px);
  --fs-h2: clamp(24px, 3vw, 36px);
  --fs-h3: 18px;
  --fs-body: 16px;
  --fs-small: 13px;
  --fs-num: clamp(40px, 6vw, 72px);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --r-input: 6px; --r-btn: 8px; --r-video: 10px; --r-card: 12px;
  --shadow-pop: 0 12px 32px rgb(22 24 29 / .14);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t: 200ms;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.8; letter-spacing: .03em;
  font-kerning: normal; text-autospace: normal;
  word-break: auto-phrase; overflow-wrap: anywhere;
}
img, video { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brand-press); text-decoration-thickness: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 800; font-feature-settings: "palt"; text-wrap: balance; }
h1 { font-size: var(--fs-hero); line-height: 1.18; letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.3; letter-spacing: -.01em; }
h3 { font-size: var(--fs-h3); line-height: 1.4; letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }
.ph { display: inline-block; max-width: 100%; }
.num { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.small { font-size: var(--fs-small); line-height: 1.6; letter-spacing: .02em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); }
@media (max-width: 600px) { .wrap { padding: 0 var(--s4); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ロゴ（下の3区切りの線＝秒割り） ---------- */
.logo { display: inline-flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); }
.logo b { white-space: nowrap; font-size: 21px; font-weight: 800; line-height: 1; letter-spacing: .02em; font-feature-settings: "palt"; }
.logo b .bang { display: inline-flex; justify-content: center; vertical-align: top; width: .34em; height: 1em; overflow: hidden; }   /* 全角の「！」は字面の左右に各約0.39emの空きがある→幅0.34emの窓の中央に字を置いて字面だけ見せる（どの字体でも全角の！は字面が中央＝代わりの字体でも欠けない。負のマージンだと字の箱が外へはみ出す）。2026-11-02 バズ名人！ */
.logo i { display: grid; grid-template-columns: 3fr 3fr 4fr; gap: 2px; height: 4px; }
.logo i::before, .logo i::after, .logo i span { content: ""; background: var(--brand); }
.logo i::before { background: var(--ink); }
.logo:hover { text-decoration: none; }

/* ---------- ヘッダ ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: var(--s5); font-size: 15px; }
.top nav a { text-decoration: none; white-space: nowrap; }
@media (max-width: 760px) { .top .pc, .top nav .pc { display: none; } }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--brand-press); text-decoration-thickness: 3px; }
@media (max-width: 760px) { .top nav .pc { display: none; } .top nav { gap: var(--s4); } }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 var(--s2);
  min-height: 48px; padding: 0 var(--s5); border-radius: var(--r-btn); border: 1px solid var(--ink);
  background: var(--surface); color: var(--ink); font: 700 16px/1.3 var(--font); letter-spacing: .02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:hover { background: var(--ground); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-press); border-color: var(--brand-press); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.dark:hover { background: var(--ink-soft); }
.btn.small { min-height: 36px; padding: 0 var(--s4); font-size: 14px; }
.btn.big { min-height: 56px; font-size: 17px; }
.btn.block { width: 100%; white-space: normal; line-height: 1.4; padding-top: var(--s2); padding-bottom: var(--s2); }
.btn[disabled], .btn.is-disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; transform: none; }
.btn .cost { display: inline-block; white-space: nowrap; font-weight: 400; font-size: 14px; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.textlink { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 入力 ---------- */
.field { display: grid; gap: var(--s2); }
.field > .lbl { font-weight: 700; font-size: 15px; line-height: 1.4; }
.field > .lbl small { font-weight: 400; color: var(--muted); font-size: var(--fs-small); margin-left: var(--s1); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-input);
  background: var(--surface); color: var(--ink); font: 400 16px/1.6 var(--font); letter-spacing: .02em; word-break: auto-phrase;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.textarea { resize: vertical; min-height: 96px; }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--muted); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--line); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.field.is-error .input { border-color: var(--alert); }
.field .err { color: var(--alert); font-size: 14px; line-height: 1.6; }
.hint { color: var(--muted); font-size: var(--fs-small); line-height: 1.6; }

/* チップ（秒数・画質などの択一） */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-input); background: var(--surface); font-size: 15px; cursor: pointer; transition: border-color var(--t) var(--ease); }
.chips span:hover { border-color: var(--muted); }
.chips input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--surface); font-weight: 700; }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* スイッチ */
.switch { display: inline-flex; align-items: center; gap: var(--s3); cursor: pointer; font-size: 15px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background var(--t) var(--ease); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); transition: transform var(--t) var(--ease); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(18px); background: var(--brand); }

/* ---------- 秒割りバー（記憶に残る1点） ---------- */
.beats { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.beats li { display: grid; grid-template-columns: 60px 1fr; gap: var(--s3); padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line); line-height: 1.5; position: relative; transition: background var(--t) var(--ease); }
.beats .t small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.beats .t { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; }
.beats li.on { background: var(--brand-soft); }
@media (max-width: 400px) { .beats li { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.beats li.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.beatbar { position: relative; display: flex; height: 8px; gap: 2px; margin-top: var(--s2); }
.beatbar span { background: var(--line); border-radius: 1px; }
.beatbar .head { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--ink); left: 0; border-radius: 2px; }
.beatbar span.on { background: var(--brand); }
.beatbar.labeled { height: auto; margin-top: var(--s2); }
.beatbar.labeled span { display: grid; gap: 0; background: var(--ground); border-radius: 4px; padding: var(--s2) var(--s3); font-size: 15px; font-weight: 700; line-height: 1.4; min-width: 0; }
@media (max-width: 600px) { .beatbar.labeled span { font-size: 13px; padding: var(--s2) 6px; } }
.beatbar.labeled small { font-size: 13px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 縦動画 ---------- */
.vid { position: relative; aspect-ratio: 9 / 16; background: var(--ink); border-radius: var(--r-video); overflow: hidden; }
.vid video, .vid img { width: 100%; height: 100%; object-fit: cover; }
.vid .tag { white-space: nowrap; position: absolute; left: var(--s2); top: var(--s2); background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 700; padding: 2px var(--s2); border-radius: 4px; letter-spacing: .04em; }

/* ---------- 面 ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s5); }
@media (max-width: 600px) { .panel { padding: var(--s4); } }
.rule { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }

/* ---------- フッタ ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: var(--s7) 0 var(--s6); margin-top: var(--s8); font-size: 14px; }
.foot .wrap { display: grid; gap: var(--s4); justify-items: start; }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }

/* ---------- 表 ---------- */
.tbl-scroll { overflow-x: auto; }
table.t { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--surface); font-size: 15px; line-height: 1.6; }
table.t th, table.t td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-weight: 700; color: var(--muted); font-size: 14px; white-space: nowrap; background: var(--ground); }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.hl td { background: var(--brand-soft); }

/* ---------- 通知 ---------- */
.note-box { border-left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input); padding: var(--s3) var(--s4); font-size: 15px; line-height: 1.7; }
.note-box.err { border-color: var(--alert); color: var(--ink); }
.note-box.err b { color: var(--alert); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
