/* Vマッチ：配信サイト風のダークテーマ（Twitchを参考にした配色とレイアウト） */
body.vm {
  --bg: #0e0e10; --panel: #18181b; --panel2: #1f1f23; --line: #2f2f35; --ink: #efeff1; --quiet: #adadb8;
  --accent: #9147ff; --accent-h: #772ce8; --accent2: #bf94ff; --good: #00f593; --warn: #ffc44d; --off: #75757d;
  background: var(--bg); color: var(--ink);
}
body.vm .btn { background: var(--accent); border-radius: 6px; padding: 10px 16px; }
body.vm .btn:hover { background: var(--accent-h); }
body.vm .btn.sub { background: #2f2f35; border: 0; color: var(--ink); }
body.vm .btn.sub:hover { background: #3a3a42; }
body.vm .btn.warn { background: #b33a54; }
body.vm .btn.sm { padding: 7px 12px; font-size: 13px; }
body.vm .card-box, body.vm .item { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
body.vm input[type=text], body.vm input[type=search], body.vm input[type=url], body.vm input[type=date], body.vm select, body.vm textarea { background: #0e0e10; border: 2px solid #3a3a42; border-radius: 6px; color: var(--ink); }
body.vm input:focus, body.vm select:focus, body.vm textarea:focus { outline: none; border-color: var(--accent); }
body.vm .chip { border-color: #3a3a42; background: #2f2f35; color: var(--ink); border-radius: 999px; }
body.vm .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
body.vm p a, body.vm .muted a, body.vm label a, body.vm .empty a, body.vm .note a { color: var(--accent2); }
body.vm .cc, body.vm .box, body.vm .hero, body.vm .side a, body.vm .intro { color: var(--ink); }
body.vm .brand span { color: var(--accent); }

.topbar { position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.6); }
.topbar .brand { font-size: 20px; font-weight: 900; text-decoration: none; color: var(--ink); white-space: nowrap; }
.qbox { flex: 1; max-width: 420px; margin: 0 auto; }
.qbox input { width: 100%; padding: 8px 12px !important; font-size: 14px; }
.tright { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.tright .iconbtn { position: relative; width: 36px; height: 36px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; font-size: 18px; }
.tright .iconbtn:hover { background: #2f2f35; }
.tright .iconbtn b:not(:empty) { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #eb0400; color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; }
.tright .me { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; text-decoration: none; background: var(--accent); overflow: hidden; }
.tright .me img { width: 100%; height: 100%; object-fit: cover; }

.tabs { position: sticky; top: 52px; z-index: 25; display: flex; gap: 2px; overflow-x: auto; padding: 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs[hidden] { display: none; }
.tabs a { position: relative; padding: 10px 12px; color: var(--quiet); text-decoration: none; white-space: nowrap; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--accent2); border-bottom-color: var(--accent); }
.tabs b:not(:empty) { margin-left: 4px; padding: 0 5px; border-radius: 8px; background: #eb0400; color: #fff; font-size: 10px; }

.shell { display: flex; }
.side { display: none; }
.content { flex: 1; min-width: 0; padding: 16px 16px 60px; max-width: 1400px; margin: 0 auto; }
@media (min-width: 1000px) {
  .side { display: block; position: sticky; top: 52px; align-self: flex-start; width: 240px; height: calc(100vh - 52px); overflow-y: auto; background: var(--panel2); padding: 10px 0; flex: 0 0 240px; }
  .content { padding: 24px 32px 60px; }
}
.side h4 { margin: 8px 12px; font-size: 13px; text-transform: none; color: var(--ink); }
.side a { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 6px 12px; text-decoration: none; color: var(--ink); }
.side a:hover { background: #26262c; }
.side .av { width: 30px; height: 30px; border-radius: 50%; font-size: 13px; }
.side .nm { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .cat { font-size: 12px; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .st { font-size: 11px; color: var(--quiet); display: flex; align-items: center; gap: 4px; }
.side .st i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--good); }
.side .st i.conditional { background: var(--warn); } .side .st i.closed { background: var(--off); }

h1 { font-size: 26px; }
.sec { font-weight: 800; font-size: 18px; margin: 28px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.sec a { font-size: 13px; font-weight: 600; margin-left: auto; text-decoration: none; }
.sec .accent { color: var(--accent2); }
.muted { color: var(--quiet); }

/* アバター（アイコンがなければ1文字目） */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 800; background: hsl(var(--h, 270) 45% 38%); flex-shrink: 0; }
.av img { width: 100%; height: 100%; object-fit: cover; }

/* VTuberのカード（配信サイトのサムネ付きカード風） */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 12px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 14px 10px; } }
.cc { display: block; color: var(--ink); text-decoration: none; min-width: 0; }
.cc .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 20% 10%, hsl(var(--h) 60% 42%), hsl(calc(var(--h) + 40) 55% 18%) 70%); transition: transform .12s ease, box-shadow .12s ease; }
.cc:hover .thumb { transform: translate(4px, -4px); box-shadow: -4px 4px 0 var(--accent); }
.cc .thumb .big { width: 38%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); font-size: 28px; background: rgba(0,0,0,.25); }
.cc .badge { position: absolute; top: 8px; left: 8px; padding: 1px 6px; border-radius: 4px; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); }
.cc .badge.conditional { background: #b8860b; } .cc .badge.closed { background: #4a4a52; }
.cc .badge.smp { left: auto; right: 8px; background: rgba(0,0,0,.65); font-weight: 700; }
.cc .badge.card { left: auto; right: 8px; background: rgba(0,0,0,.65); }
.cc .viewers { position: absolute; bottom: 8px; left: 8px; padding: 1px 6px; border-radius: 4px; font-size: 12px; background: rgba(0,0,0,.7); }
.cc .meta { display: grid; grid-template-columns: 40px 1fr; gap: 10px; margin-top: 10px; }
.cc .meta .av { width: 40px; height: 40px; font-size: 16px; }
.cc .nm { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc .cat { font-size: 13px; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc .pills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.cc .pills span { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #2f2f35; color: var(--quiet); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 横スクロールの列 */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 260px); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
@media (max-width: 520px) { .rail { grid-auto-columns: 62%; } }

/* カテゴリー（縦長のタイル） */
.boxes { display: grid; grid-auto-flow: column; grid-auto-columns: 140px; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.boxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
.box { color: var(--ink); text-decoration: none; display: block; min-width: 0; }
.box .art { aspect-ratio: 3 / 4; border-radius: 6px; display: flex; align-items: flex-end; padding: 10px; font-weight: 900; font-size: 18px; line-height: 1.25; word-break: break-word;
  background: linear-gradient(160deg, hsl(var(--h) 70% 50%), hsl(calc(var(--h) + 50) 60% 20%)); transition: transform .12s ease, box-shadow .12s ease; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.box:hover .art { transform: translate(4px, -4px); box-shadow: -4px 4px 0 var(--accent); }
.box .bn { font-weight: 800; font-size: 14px; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box .bc { font-size: 12px; color: var(--quiet); }
.box .kind { display: inline-block; margin-top: 4px; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #2f2f35; color: var(--quiet); }

.hero { display: block; border-radius: 8px; padding: 20px; color: var(--ink); text-decoration: none; margin-bottom: 8px;
  background: linear-gradient(120deg, #5c16c5 0%, #1f1f23 70%); border: 1px solid var(--line); }
.hero .lbl { font-size: 12px; font-weight: 800; color: #fff; background: #eb0400; display: inline-block; padding: 1px 6px; border-radius: 4px; }
.hero b { display: block; font-size: 22px; margin: 8px 0 4px; }
.intro { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 16px; }
.intro b { font-size: 18px; }
.note { font-size: 12px; color: var(--quiet); margin: 8px 0; }
.kinds { display: flex; gap: 8px; margin: 4px 0 10px; }
.kinds .chip { text-decoration: none; }
.notice { display: block; padding: 12px 14px; border-radius: 8px; background: #2b1a4a; border: 1px solid var(--accent); color: var(--ink); text-decoration: none; margin-bottom: 12px; }

.cathead { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: end; margin-bottom: 12px; }
.cathead .art { aspect-ratio: 3 / 4; border-radius: 6px; background: linear-gradient(160deg, hsl(var(--h) 70% 50%), hsl(calc(var(--h) + 50) 60% 20%)); }

/* 既存の部品をこのテーマに合わせる */
.ucard { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin: 10px 0; color: var(--ink); }
.ucard > a { text-decoration: none; color: inherit; }
.ucard .av { width: 56px; height: 56px; font-size: 22px; }
.ucard .nm { font-weight: 800; }
.ucard .sub { font-size: 12px; color: var(--quiet); margin-top: 2px; }
.ucard .chips { margin-top: 6px; gap: 4px; display: flex; flex-wrap: wrap; }
.ucard > div:last-child { grid-column: 2; }
.ucard > div:last-child:empty { display: none; }
.chip.s { padding: 2px 8px; font-size: 12px; }
.chip.btn { cursor: pointer; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.open { background: var(--good); } .dot.conditional { background: var(--warn); } .dot.closed { background: var(--off); }
.pro { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--warn); color: #222; margin-left: 6px; vertical-align: middle; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item { padding: 14px; margin: 10px 0; }
.item a.ttl { color: var(--ink); font-weight: 800; text-decoration: none; font-size: 17px; }
.empty { color: var(--quiet); font-size: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.slotpick { display: flex; flex-wrap: wrap; gap: 8px; }
.slotpick button { padding: 10px 12px; border-radius: 6px; border: 2px solid #3a3a42; background: transparent; color: var(--ink); cursor: pointer; }
.slotpick button.on { border-color: var(--accent); background: #2b1a4a; }
.slots button.on, .slots div.cell.on { background: #5c2fb0; border-color: var(--accent2); }
.keybox { font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .04em; word-break: break-all; padding: 14px; border-radius: 6px; background: #0e0e10; border: 2px solid var(--accent); }
label.inline { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 14px; margin: 8px 0; }
.check { display: flex; gap: 10px; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2f2f35; color: var(--ink); padding: 12px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 40; max-width: 90vw; }
.toast.err { background: #5a2330; }
.status.open { color: var(--good); border-color: var(--good); }
.icon { border-color: var(--accent) !important; }
.wrap-auth { max-width: 460px; margin: 0 auto; }

.fit { margin-top: 6px; font-size: 13px; color: var(--accent2); }
.fitc { margin-top: 4px; font-size: 12px; color: var(--accent2); }
#wh button { cursor: pointer; }
#wh { max-width: 440px; } #wh button { aspect-ratio: 1.6; }

.content { max-width: 960px; }
.hero.topic { margin-bottom: 18px; }
.hero .sale { display: inline-block; margin: 6px 0; padding: 4px 10px; border-radius: 4px; background: #1b2838; color: #c7d5e0; font-weight: 700; font-size: 14px; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid hsl(var(--h) 60% 55%); text-decoration: none; color: var(--ink); }
.pcard:hover { background: var(--panel2); }
.pcard .k { font-size: 12px; color: var(--accent2); font-weight: 700; }
.pcard .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pcard .pills span { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #2f2f35; color: var(--quiet); }
.mebox { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.mebox .nm { font-size: 20px; font-weight: 800; }
.mebox .chip .dot { margin-right: 6px; }
.btn.big { padding: 16px 24px; font-size: 17px; font-weight: 800; }
.gacha { padding: 20px; border-radius: 10px; background: linear-gradient(135deg, #1f1238, #18181b 60%); border: 1px solid #3b2a63; min-height: 120px; }
.gacha-idle { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.gacha-idle .cap { color: var(--quiet); }
.gacha-hit { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.gacha-hit .nm { font-size: 20px; font-weight: 800; }
.gacha-hit.pop { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.gacha-roll { display: flex; justify-content: center; gap: 16px; padding: 20px 0; }
.capsule { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(#bf94ff 50%, #efeff1 50%); animation: bounce .5s infinite alternate; }
.capsule:nth-child(2) { animation-delay: .15s; background: linear-gradient(#9147ff 50%, #efeff1 50%); }
.capsule:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { from { transform: translateY(0) rotate(-15deg); } to { transform: translateY(-18px) rotate(15deg); } }
@media (prefers-reduced-motion: reduce) { .capsule, .gacha-hit.pop { animation: none; } }
.hero.topic { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mebox .kinds { flex-wrap: wrap; }
.mebox .chip { white-space: nowrap; }
.mebox .av.icon, .gacha-hit .av.icon { width: 72px; height: 72px; font-size: 26px; }
@media (max-width: 600px) { .mebox .av.icon, .gacha-hit .av.icon { width: 52px; height: 52px; font-size: 20px; } .gacha-hit .row .btn { white-space: nowrap; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stats a { text-decoration: none; transition: border-color .15s; }
.stats a:hover { border-color: var(--accent); }
.stats a { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; text-align: center; }
.stats a b { display: block; font-size: 26px; font-weight: 900; color: var(--accent2); }
.stats a span { font-size: 12px; color: var(--quiet); }
.cathead + .btn.big { margin-bottom: 8px; }
.stats a { color: var(--ink); }

.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff !important; color: #1f1f1f !important; }
.gbtn .g { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 900; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); color: #fff; }
.oldkey { margin-top: 10px; }
.oldkey summary { cursor: pointer; color: var(--quiet); padding: 8px 0; }
.err { color: #ff6b6b; }

.box .art, .cathead .art { position: relative; overflow: hidden; }
.box .art span { position: relative; z-index: 1; }
.box .art img.steam ~ span { display: none; }
img.steam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
img.steam.wide { object-position: center; }
.credit { font-size: 11px; color: var(--quiet); margin: 6px 0 0; }
.sm { font-size: 12px; }

.foot { text-align: center; padding: 24px 0 40px; font-size: 12px; color: var(--quiet); }
.foot a { color: var(--quiet); margin: 0 6px; }
.topbar .brand { display: flex; align-items: center; }

.offerbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; border-radius: 10px; background: linear-gradient(90deg, #9147ff, #6a2fd6); color: #fff !important; text-decoration: none; box-shadow: 0 0 0 2px #bf94ff55; }
.offerbar .ob-ic { font-size: 24px; }
.offerbar b { display: block; font-size: 16px; }
.offerbar .ob-d { font-size: 13px; opacity: .9; }
.offerbar .ob-go { margin-left: auto; font-weight: 800; white-space: nowrap; }
.chip.off { opacity: .45; }

.dmcheck{background:rgba(145,71,255,.12);border:1px solid rgba(145,71,255,.45);border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.6;margin:8px 0}
.okline{color:#3ecf8e;font-size:13px;margin:6px 0}
.gsub{border-top:1px solid var(--line,rgba(255,255,255,.1));margin-top:12px;padding-top:12px}
.gsub .gh{font-weight:700;font-size:14px;margin-bottom:4px}
