:root {
  --pink: #FF3B9B;
  --purple: #7B37A8;
  --blue: #5BAADE;
  --dark: #1A1A1A;
  --dark2: #242424;
  --dark3: #2E2E2E;
  --yt-red: #EA0000;
  --header-2: #2C1A3E;
  --text: #F2F2F2;
  --text-2: #C4C4C4;
  --text-3: #9A9A9A;
  --line: #333333;
  --line-2: #474747;
  --accent-ink: #E00282;
  --accent-ink-hover: #C70073;
  --ok-ink: #9FD3F5;
  --warn: #F2B33D;
  --gold: #C9A227;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--dark);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}
h1, h2, h3 { text-wrap: balance; }
p, li, td, dd { text-wrap: pretty; }
a { color: var(--ok-ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
html.has-bar { scroll-padding-bottom: calc(220px + env(safe-area-inset-bottom)); }
html.cookie-pending.has-bar { scroll-padding-bottom: calc(220px + var(--cb-h, 0px) + env(safe-area-inset-bottom)); }
html.sheet-open { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header / nav */
.site-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--header-2) 100%);
  border-bottom: 2px solid var(--pink);
  padding: 18px 16px 14px;
  text-align: center;
}
.site-title {
  display: inline-block;
  padding: 6px 0;
  font-family: 'Oswald', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.site-subtitle { font-size: 13px; color: var(--text-3); letter-spacing: 1px; }
.site-nav { background: var(--dark2); border-bottom: 1px solid var(--line); text-align: center; font-size: 14px; }
.site-nav a { display: inline-block; padding: 11px 12px; color: var(--text-2); text-decoration: none; }
.site-nav a:hover { color: var(--pink); }

.container { max-width: 920px; margin: 0 auto; padding: 24px 16px 72px; }

/* hero */
.hero { text-align: center; padding: 8px 0 20px; }
.hero h1 { font-size: 26px; line-height: 1.45; font-weight: 700; margin-bottom: 10px; }
.hero p { color: var(--text-2); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; list-style: none; }
.chips li { font-size: 13px; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; }
@media (max-width: 480px) { .hero h1 { font-size: 21px; } }

.rename-note {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--dark2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.85;
}
.rename-note strong { color: var(--text); }
.rename-note a { color: var(--text); }

/* card */
.card { background: var(--dark2); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
@media (min-width: 640px) { .card { padding: 24px; } }
.section-title {
  font-family: 'Oswald', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* form */
.field-label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.input-row { display: flex; gap: 8px; }
@media (max-width: 480px) { .input-row { flex-direction: column; } }
.input, .select {
  width: 100%;
  min-height: 44px;
  background: var(--dark3);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.input:focus, .select:focus { border-color: var(--pink); outline: 2px solid transparent; box-shadow: 0 0 0 2px var(--blue); }
.input[aria-invalid="true"] { border-color: var(--warn); }
.input-row .input { flex: 1; }
.hint { font-size: 13px; color: var(--text-3); margin-top: 8px; min-height: 1.2em; }
.hint.is-error { color: var(--warn); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.chip-btn {
  min-height: 44px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--dark3);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.chip-btn:hover { border-color: var(--pink); color: var(--text); }
.consent { font-size: 13px; color: var(--text-3); margin-top: 12px; line-height: 1.7; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--accent-ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s, transform .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-ink-hover); }
.btn:active { transform: scale(.97); }
.btn[aria-busy="true"] { cursor: progress; }
.btn-ghost { background: var(--dark3); border-color: var(--line-2); color: var(--text-2); font-weight: 500; }
.btn-ghost:hover { background: var(--dark3); border-color: var(--pink); color: var(--text); }
.btn-sm { min-height: 44px; padding: 6px 12px; font-size: 14px; }

/* status */
.status { margin-top: 12px; padding: 10px 14px; border-radius: 6px; font-size: 14px; border: 1px solid var(--line-2); background: var(--dark3); color: var(--text-2); }
.status:empty { margin-top: 0; padding: 0; border-color: transparent; background: none; }
.status-error { border-color: var(--warn); color: var(--text); }
.status-info { border-color: var(--blue); }
.status .btn { margin-left: 8px; }

/* skeleton */
.skeleton { list-style: none; display: grid; gap: 10px; margin-top: 4px; }
.skeleton li { height: 76px; border-radius: 6px; background: linear-gradient(90deg, var(--dark3) 0%, var(--line) 50%, var(--dark3) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* channel head */
.ch-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ch-thumb { width: 56px; height: 56px; border-radius: 50%; flex: none; background: var(--dark3); }
.ch-name { font-size: 18px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.ch-name a { display: inline-block; padding: 10px 0; color: var(--text); text-decoration: none; }
.ch-name a:hover { color: var(--pink); }
.ch-meta { font-size: 13px; color: var(--text-3); }
.ch-meta strong { color: var(--text-2); font-weight: 500; }

/* filters */
.filters { border: 1px solid var(--line); border-radius: 8px; background: var(--dark); margin-bottom: 14px; }
.filters > summary { list-style: none; cursor: pointer; padding: 12px 14px; min-height: 44px; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: '＋'; content: '＋' / ''; color: var(--text-3); }
.filters[open] > summary::after { content: '−'; content: '−' / ''; }
.filters-active { font-size: 13px; color: var(--pink); font-weight: 500; margin-left: auto; margin-right: 10px; }
.filters-body { padding: 0 14px 14px; display: grid; gap: 12px; }
@media (min-width: 640px) { .filters-body { grid-template-columns: 2fr 1fr 1fr 1fr; align-items: end; } .filters-body .span-all { grid-column: 1 / -1; } }
.toggles { border: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.toggles legend { font-size: 14px; color: var(--text-2); margin-bottom: 4px; width: 100%; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--pink); }
.filters-foot { display: flex; justify-content: flex-end; }

/* SP filter sheet */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 86vh;
  max-height: 86dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line-2);
  border-radius: 14px 14px 0 0;
  background: var(--dark2);
  color: var(--text);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .5);
}
.sheet:not([open]) { display: none; }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .22s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(0, 0, 0, .6); }
.sheet-inner { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 10px; border-bottom: 1px solid var(--line); position: relative; }
.sheet-head::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 999px; background: var(--line-2); }
.sheet-title { font-size: 16px; font-weight: 700; }
.sheet-title:focus { outline: none; }
.sheet-title:focus-visible { outline: 2px solid var(--blue); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 14px; }
.sheet-body .filters-body { padding: 0 16px 16px; }
.sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn { width: 100%; font-variant-numeric: tabular-nums; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }

/* list */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px; color: var(--text-2); }
.list-head .btn-row { display: flex; gap: 8px; }
.vlist { list-style: none; display: grid; gap: 8px; }
.vi {
  display: grid;
  grid-template-columns: 44px 120px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 10px 8px 4px;
  background: var(--dark3);
  border: 1px solid transparent;
  border-radius: 6px;
  transition: border-color .15s;
}
.vi.is-on { border-color: var(--line-2); }
.vi:hover { border-color: var(--line-2); }
.vi-check { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.vi-check input { width: 20px; height: 20px; accent-color: var(--pink); cursor: pointer; }
.vi-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--dark2); }
.vi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vi-dur { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .82); color: #fff; font-size: 12px; font-weight: 500; padding: 0 5px; border-radius: 3px; line-height: 1.6; }
.vi-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); font-size: 15px; font-weight: 500; line-height: 1.45; min-height: 44px; text-decoration: none; overflow-wrap: anywhere; }
.vi-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.vi-meta { font-size: 13px; color: var(--text-3); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.badge { font-size: 12px; line-height: 1.5; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.badge-cap { border-color: var(--blue); color: var(--ok-ink); }
.badge-new { border-color: var(--warn); color: var(--warn); }
.badge-live { background: var(--yt-red); border-color: var(--yt-red); color: #fff; }
@media (max-width: 480px) {
  .vi { grid-template-columns: 44px 96px 1fr; gap: 8px; }
  .vi-title { font-size: 14px; }
}
.more { display: flex; justify-content: center; margin-top: 12px; }
.empty { text-align: center; padding: 28px 12px; color: var(--text-2); font-size: 15px; }
.empty .btn { margin-top: 12px; }

/* action bar */
html.cookie-pending .actionbar { bottom: var(--cb-h, 0px); padding-bottom: 12px; }
.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 14px -20px -20px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--dark2);
  border-top: 1px solid var(--line-2);
  border-radius: 0 0 8px 8px;
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) { .actionbar { margin: 16px -24px -24px; padding: 14px 24px; grid-template-columns: 1fr auto; align-items: center; } }
.meter-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
@media (max-width: 639px) { .meter-row .plan-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.meter-row .select { width: auto; min-height: 44px; padding: 6px 10px; font-size: 14px; }
.meter { flex: 1 1 60px; height: 6px; background: var(--dark3); border-radius: 999px; overflow: hidden; min-width: 32px; }
.meter > span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--blue); transition: transform .2s; }
.meter.is-over > span { background: var(--warn); }
.meter-text { font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter-text.is-over { color: var(--warn); }
.act-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.act-btns .btn { flex: 1 1 auto; }
#copy-fallback { width: 100%; min-height: 120px; margin-top: 12px; background: var(--dark); border: 1px solid var(--line-2); border-radius: 6px; padding: 10px; color: var(--text-2); font: 13px/1.5 ui-monospace, monospace; }

/* reading */
.prose p { color: var(--text-2); margin-bottom: 12px; line-height: 1.9; }
.prose p:last-child { margin-bottom: 0; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; color: var(--text); }
.prose strong { color: var(--text); }
.prose ol, .prose ul { padding-left: 1.4em; color: var(--text-2); margin-bottom: 12px; }
.prose li { margin-bottom: 8px; }
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 6px; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); line-height: 1.7; }
.spec thead th { background: var(--dark3); color: var(--text); font-weight: 700; font-size: 13px; }
.spec tbody tr:last-child td { border-bottom: 0; }
.spec q { quotes: none; font-style: italic; color: var(--text); }
.spec td:first-child { width: 34%; }
.spec.fit { min-width: 0; }
.src { font-size: 13px; color: var(--text-3); }
details.faq { background: var(--dark3); border-radius: 6px; margin-bottom: 8px; }
details.faq summary { cursor: pointer; padding: 12px 14px; min-height: 44px; font-weight: 700; font-size: 15px; }
details.faq[open] summary { color: var(--text); box-shadow: inset 3px 0 0 var(--pink); }
details.faq p { padding: 0 14px 14px; color: var(--text-2); font-size: 14px; line-height: 1.85; }

/* footer */
footer { background: var(--dark2); border-top: 1px solid var(--line); padding: 24px 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--text-2); text-decoration: none; }
.foot-links a:hover { color: var(--pink); }
.yt-attribution { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }

/* toast */
html.cookie-pending .toast { bottom: calc(var(--cb-h, 0px) + 24px); }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--dark3);
  border: 1px solid var(--blue);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 50;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { border-color: var(--warn); }

.act-guide { margin-top: 10px; font-size: 13px; color: var(--text-3); }

@media (forced-colors: active) {
  .site-title { background: none; -webkit-text-fill-color: currentColor; }
}

/* sister sites */
.kappy-net { max-width: 780px; margin: 24px auto 16px; padding: 18px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.kappy-net-label { font-size: 12px; color: var(--text-3); letter-spacing: 2px; margin-bottom: 12px; }
.kappy-net-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kappy-net-list a { display: inline-flex; align-items: center; padding: 6px 12px; min-height: 44px; background: var(--dark); border: 1px solid var(--line); border-radius: 4px; color: var(--text-2); text-decoration: none; font-size: 12px; transition: border-color .2s ease, color .2s ease; }
.kappy-net-list a:hover { border-color: var(--line-2); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* iOS Safari が 16px 未満の入力欄で自動拡大するのを防ぐ */
@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: max(16px, 1em) !important; }
}
