:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2346e8;
  --brand-soft: #eef2ff;
  --free: #0f9d6b;
  --free-soft: #e7f7f0;
  --paid: #d4214f;
  --paid-soft: #fdecf1;
  --sample: #c2710c;
  --sample-soft: #fff4e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.logo-name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; line-height: 1.1; }
.logo-name span { color: var(--brand); }
.logo-sub { font-size: 9px; letter-spacing: .14em; color: var(--muted); font-weight: 600; }
.search { flex: 1; max-width: 420px; position: relative; }
.search input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px 0 40px; background: #f8fafc; font: inherit; font-size: 14px; }
.search input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); background: #fff; }
.search svg { position: absolute; left: 14px; top: 12px; color: var(--muted); }
.header-actions { margin-left: auto; display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn:hover { filter: brightness(.97); }

/* list */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0 20px; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.pills { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.pill { border: 0; background: transparent; border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pill[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 60px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .search, .btn-hide-sm { display: none; }
  .site-header .wrap { height: 64px; }
}

.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.1); }
.cover { position: relative; min-height: 170px; padding: 18px 20px 14px; color: #fff; display: flex; flex-direction: column; background-size: cover; background-position: center; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,40,0), rgba(10,14,40,.25)); pointer-events: none; }
.cover > * { position: relative; z-index: 1; }
.cover .cat { font-size: 11px; font-weight: 700; opacity: .85; }
.cover .title { font-size: 18px; font-weight: 800; line-height: 1.45; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover .meta { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.cover.g0 { background-color: #2b2f7a; background-image: linear-gradient(135deg, #2b2f7a, #3b2c8f); }
.cover.g1 { background-color: #3a2a9c; background-image: linear-gradient(135deg, #4c2fc0, #231f63); }
.cover.g2 { background-color: #1d6b4a; background-image: linear-gradient(135deg, #1f7a52, #14503a); }
.cover.g3 { background-color: #1e3a8a; background-image: linear-gradient(135deg, #1e40af, #172554); }
.cover.g4 { background-color: #7c2d5a; background-image: linear-gradient(135deg, #9d2f6b, #4a1d3f); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; font-size: 12px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-free { background: var(--free-soft); color: var(--free); }
.badge-paid { background: var(--paid-soft); color: var(--paid); }
.badge-sample { background: var(--sample-soft); color: var(--sample); }
.lock { display: inline-flex; align-items: center; gap: 4px; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* watch */
.back { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.crumbs { font-size: 12px; color: var(--muted); margin: 24px 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs b { color: var(--brand); font-weight: 600; }
.player { background: #0b1022; border-radius: 18px; padding: 14px; box-shadow: 0 10px 30px rgba(11,16,34,.25); }
.player-bar { display: flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 2px 6px 12px; }
.player-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; }
.player video { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 12px; background: #000; }
.locked { aspect-ratio: 16 / 9; border-radius: 12px; display: grid; place-items: center; text-align: center; color: #e2e8f0; background: radial-gradient(circle at 30% 20%, #25306b, #0b1022 70%); padding: 24px; }
.locked h2 { margin: 12px 0 6px; font-size: 20px; }
.locked p { margin: 0 0 16px; color: #94a3b8; font-size: 14px; }
.info { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 20px 0 60px; }
.info-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.chip { background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; border-radius: 8px; padding: 4px 10px; }
.info h1 { font-size: 26px; line-height: 1.45; margin: 12px 0 16px; letter-spacing: -.01em; }
.info h3 { font-size: 15px; margin: 20px 0 6px; }
.info .desc { white-space: pre-wrap; color: #334155; }
@media (max-width: 620px) { .info h1 { font-size: 20px; } .player { padding: 8px; border-radius: 12px; } }

/* login */
.user-mail { align-self: center; font-size: 13px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-box { max-width: 420px; margin: 56px auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 32px; }
.auth-box h1 { font-size: 22px; margin: 0 0 6px; }
.auth-box p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.auth-box label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.auth-box input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font: inherit; font-size: 16px; }
.auth-box input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.auth-box input.code { font-size: 28px; letter-spacing: .5em; text-align: center; font-weight: 800; }
.auth-box .btn { width: 100%; justify-content: center; height: 48px; margin-top: 16px; }
.auth-box .err { color: var(--paid); font-size: 13px; min-height: 1.2em; margin: 8px 0 0; }
.auth-box .link { background: none; border: 0; color: var(--brand); font-size: 13px; padding: 0; margin-top: 14px; }
.auth-box .link:disabled { color: var(--muted); }
@media (max-width: 900px) { .back { display: none; } }
