:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efede7;
  --text: #1d1c1a;
  --text-2: #5f5c55;
  --line: #e1ded6;
  --accent: #0f7b6c;
  --accent-ink: #ffffff;
  --accent-soft: #d9efe9;
  --wave: #c9c5bb;
  --wave-played: #0f7b6c;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --radius: 14px;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --surface: #1c1d20;
    --surface-2: #26272b;
    --text: #ecebe7;
    --text-2: #a3a19b;
    --line: #2f3034;
    --accent: #3cc4ac;
    --accent-ink: #0b1714;
    --accent-soft: #173a34;
    --wave: #45474d;
    --wave-played: #3cc4ac;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
}
a { color: var(--accent); }
img, svg { display: block; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 60px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: .04em;
  color: var(--text); text-decoration: none;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
}
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text-2); text-decoration: none; font-size: 14px;
  padding: 6px 10px; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.logo, .nav a { white-space: nowrap; }
.logo-mark { flex-shrink: 0; }
@media (max-width: 640px) {
  .nav a.hide-sm { display: none; }
  .nav a { font-size: 13px; padding: 6px 8px; }
}

/* ヒーロー */
.hero { padding: 48px 0 28px; }
.hero h1 {
  font-size: clamp(26px, 5vw, 40px); line-height: 1.35;
  margin: 0 0 12px; letter-spacing: .02em;
}
.hero h1 .h1-sub { font-size: .62em; color: var(--accent); }
.hero p { color: var(--text-2); margin: 0; max-width: 40em; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badge {
  font-size: 13px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text);
}
.badge.warn { background: var(--surface-2); }

.hero-search { margin-top: 24px; max-width: 560px; height: 50px; padding-right: 5px; }
.hero-search button {
  border: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700;
  height: 40px; padding: 0 18px; border-radius: 8px; cursor: pointer; flex-shrink: 0;
}

/* 見出し */
.section-title { font-size: 20px; margin: 36px 0 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.more { font-size: 14px; text-decoration: none; white-space: nowrap; }

/* ジャンル：グループのボタン（トップ・すべてのジャンル） */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.group-btn {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.group-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.group-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.gb-name { font-weight: 700; font-size: 15px; }
.gb-count { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.group-btn .chev { color: var(--text-2); flex-shrink: 0; }
.group-btn:hover .chev { color: var(--accent); }
.group-btn.is-soon .genre-icon { background: var(--surface-2); color: var(--text-2); }
.group-btn.is-soon .gb-name { color: var(--text-2); }
.group-btn.is-more { background: transparent; border-style: dashed; box-shadow: none; }
.group-btn.is-more .genre-icon { background: var(--surface-2); color: var(--text); }
.genre-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
}
.genre-icon.sm { width: 26px; height: 26px; border-radius: 7px; }
.genre-icon.lg { width: 48px; height: 48px; border-radius: 13px; }

/* グループのページ：ジャンルのタイル */
.group-title { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.group-title h1 { margin: 0 !important; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 18px; }
.genre-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 40px 16px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: border-color .15s;
}
a.genre-tile:hover { border-color: var(--accent); }
.genre-tile .chev { position: absolute; right: 14px; top: 50%; translate: 0 -50%; color: var(--text-2); }
a.genre-tile:hover .chev { color: var(--accent); }
.gt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gt-name { font-weight: 700; font-size: 16px; }
.gt-count {
  font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 1px 10px;
}
.gt-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.genre-tile.is-soon { background: transparent; border-style: dashed; box-shadow: none; }
.genre-tile.is-soon .gt-name { color: var(--text-2); }
.genre-tile.is-soon .gt-count { color: var(--text-2); background: var(--surface-2); }
.genre-tile.is-soon .gt-desc { opacity: .7; }
/* ジャンルのページ */
.crumbs { font-size: 13px; color: var(--text-2); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--text-2); }
.page-head { padding: 14px 0 6px; }
.page-head h1 { font-size: clamp(24px, 4.5vw, 32px); margin: 0 0 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head p { color: var(--text-2); margin: 0; max-width: 46em; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2) !important; margin-bottom: 6px !important; }
.count-pill { font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 12px; }
.cat-tabs {
  display: flex; gap: 6px; overflow-x: auto; margin: 18px 0 4px; padding-bottom: 4px;
  scrollbar-width: thin;
}
.cat-tabs > a, .cat-tabs > span {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 10px; font-size: 14px; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.cat-tabs > a span, .cat-tabs > span span { font-size: 12px; color: var(--text-2); }
.cat-tabs > a:hover { border-color: var(--accent); }
.cat-tabs > a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cat-tabs > a[aria-current="page"] span { color: inherit; opacity: .8; }
.cat-tabs > .soon { color: var(--text-2); opacity: .55; border-style: dashed; }
.sid a { color: var(--text-2); }
.sid a:hover { color: var(--accent); }

/* 広告枠（試作用の目印） */
.ad-slot {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  color: var(--text-2); font-size: 12px; text-align: center;
  padding: 26px 12px; margin: 20px 0; background: var(--surface);
}

/* 検索・絞り込み */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 8px 0 14px;
}
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px; height: 42px;
}
.search input {
  border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; width: 100%;
}
.search:focus-within { border-color: var(--accent); }
select {
  height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; padding: 0 10px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; cursor: pointer;
}
.chip span { color: var(--text-2); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[aria-pressed="true"] span { color: inherit; opacity: .7; }
.result-count { color: var(--text-2); font-size: 13px; margin: 0 0 10px; }

/* 素材カード */
.list { display: grid; gap: 10px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px;
  display: grid; grid-template-columns: 48px 1fr auto; gap: 6px 14px; align-items: center;
}
.card.playing { border-color: var(--accent); }
.play {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; grid-row: span 2;
}
.play:focus-visible, .chip:focus-visible, .btn:focus-visible, .seg button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.meta { min-width: 0; }
.title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.title { font-weight: 700; font-size: 16px; margin: 0; }
.sid { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.desc { color: var(--text-2); font-size: 13px; margin: 2px 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag {
  font-size: 11px; color: var(--text-2); background: var(--surface-2);
  border-radius: 6px; padding: 1px 8px; border: 0; cursor: pointer; font-family: inherit;
}
.wave-row { grid-column: 2 / 4; display: flex; align-items: center; gap: 12px; }
canvas.wave { flex: 1; height: 40px; width: 100%; cursor: pointer; min-width: 0; }
.time { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; grid-row: 1; grid-column: 3; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 2px; }
.seg button {
  white-space: nowrap; flex-shrink: 0;
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 12px;
  padding: 3px 10px; border-radius: 6px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 9px; padding: 6px 12px; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.dls { display: flex; gap: 6px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn small { color: var(--text-2); }
@media (max-width: 640px) {
  .card { grid-template-columns: 44px 1fr; }
  .play { width: 44px; height: 44px; grid-row: auto; }
  .actions { grid-column: 1 / -1; grid-row: auto; flex-direction: row; justify-content: space-between; flex-wrap: wrap; }
  .seg { flex-shrink: 0; }
  .btn { padding: 6px 10px; }
  .wave-row { grid-column: 1 / -1; }
}
.empty { text-align: center; color: var(--text-2); padding: 40px 0; }

/* 文章ページ */
.doc { max-width: 760px; padding: 40px 0 24px; }
.doc h1 { font-size: 28px; margin: 0 0 6px; }
.doc .updated { color: var(--text-2); font-size: 13px; margin: 0 0 28px; }
.doc h2 { font-size: 19px; margin: 34px 0 8px; padding-top: 4px; }
.doc li { margin: 4px 0; }
.box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin: 16px 0;
}
.todo {
  background: #fff4cc; color: #5a4300; border-radius: 6px; padding: 0 6px; font-size: .92em;
}
@media (prefers-color-scheme: dark) { .todo { background: #4a3c08; color: #ffe7a0; } }
table.simple { border-collapse: collapse; width: 100%; font-size: 14px; }
table.simple th, table.simple td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
table.simple th:last-child, table.simple td:last-child { white-space: nowrap; }
.ok { color: var(--accent); font-weight: 700; }
.ng { color: #c2453d; font-weight: 700; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 40px; color: var(--text-2); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-footer a { color: var(--text-2); }
