@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');

:root {
  --bg: #0d0f14;
  --bg-elev: #161922;
  --bg-elev-2: #1e222d;
  --border: #2b303c;
  --text: #e9ebf1;
  --text-dim: #8d93a3;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-dim: #7c5cff2b;
  --like: #ff5d8f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; display: block; }

.msym {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
  display: inline-block;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header: two-row, nav on top, search below */
.site-header {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px 6px;
  max-width: 1400px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 17px;
  color: var(--text);
  white-space: nowrap;
}
.logo .msym {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  font-size: 22px;
  padding: 4px;
}
.logo small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-dim);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.header-nav a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 7px 12px;
  border-radius: 999px;
}
.header-nav a .msym { font-size: 17px; }
.header-nav a:hover { color: var(--text); background: var(--bg-elev-2); }
.header-nav a.active { color: #fff; background: var(--accent); }
.header-bottom {
  padding: 8px 20px 14px;
  max-width: 1400px;
  margin: 0 auto;
}
.search-form {
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
}
.search-form .msym { color: var(--text-dim); font-size: 18px; }
.search-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
}
.search-form button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #fff;
  padding: 6px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Layout: main content left, discover panel right */
.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 20px 60px;
}
.layout-row {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.sidebar {
  width: 260px;
  flex-shrink: 0;
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.main {
  flex: 1;
  min-width: 0;
  order: 1;
}

.discover-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.discover-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 12px;
}
.discover-title .msym { color: var(--accent-2); font-size: 18px; }
.discover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.discover-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 11px;
}
.discover-item:hover { background: var(--bg-elev-2); color: var(--text); }
.discover-item img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elev-2);
  border: 2px solid var(--border);
}
.discover-empty { grid-column: 1/-1; color: var(--text-dim); font-size: 12px; text-align: center; padding: 10px 0; }
.see-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--accent-2);
  margin-top: 12px;
}
.see-more .msym { font-size: 15px; }
.trending-list { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trending-list a { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; border-radius: 8px; padding: 4px; }
.trending-list a:hover { background: var(--bg-elev-2); }
.trending-rank { font-size: 13px; font-weight: 800; color: var(--accent-2); min-width: 22px; flex-shrink: 0; }
.trending-list img { width: 48px; height: 32px; object-fit: cover; border-radius: 4px; background: var(--bg-elev-2); flex-shrink: 0; }
.trending-title { font-size: 12px; line-height: 1.4; }

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent-2); }

/* Hero: asymmetric big feature + strip */
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}
.hero-main {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-main .hero-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,15,20,0) 35%, rgba(13,15,20,.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.hero-badge .msym { font-size: 14px; }
.hero-title { font-weight: 700; font-size: 18px; line-height: 1.4; }
.hero-strip {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-strip-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elev-2);
  flex: 1;
}
.hero-strip-item img { width: 100%; height: 100%; object-fit: cover; }
.hero-strip-item span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(13,15,20,0), rgba(13,15,20,.9));
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 20px 10px 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 16px;
}

/* Tabs: segmented pill control */
.tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}
.tabs a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  border-radius: 999px;
}
.tabs a .msym { font-size: 17px; }
.tabs a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.tabs a:hover:not(.active) { color: var(--text); }

/* Video grid / cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 16px;
}
.video-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.video-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.video-card:hover .video-thumb img { transform: scale(1.04); }
.video-duration {
  position: absolute;
  right: 8px;
  top: 8px;
  background: rgba(13,15,20,.8);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
}
.favorite-btn {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(13,15,20,.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.favorite-btn:hover { background: rgba(13,15,20,.9); transform: scale(1.08); }
.favorite-btn .msym { font-size: 18px; }
.favorite-btn.active { color: var(--accent-2); }
.favorite-btn.detail {
  position: static;
  width: auto;
  height: auto;
  border-radius: 8px;
  padding: 6px 12px;
  gap: 6px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
}
.favorite-btn.detail:hover { background: var(--bg-elev); transform: none; }
.favorite-btn.detail.active { color: var(--accent-2); border-color: var(--accent-2); }
.favorite-btn.detail .msym { font-size: 16px; }
.video-body { padding: 12px 12px 14px; }
.video-title {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.video-author {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.video-author .msym { font-size: 14px; }
.video-stats-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.video-stats-row span { display: flex; align-items: center; gap: 4px; }
.video-stats-row .msym { font-size: 15px; }
.video-stats-row .like .msym { color: var(--like); }
.video-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-chip-sm {
  font-size: 10.5px;
  color: var(--accent-2);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}
.pagination a, .pagination span {
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0 8px;
}
.pagination a:hover { color: var(--text); border-color: var(--accent); }
.pagination .current { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }

/* Chip grid (characters/authors listing) */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.chip-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 8px;
  text-align: center;
}
.chip-card:hover { border-color: var(--accent); }
.chip-card img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  background: var(--bg-elev-2);
}
.chip-card .name { font-size: 13px; font-weight: 500; }
.chip-card .origin { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent-2); }
.tag-pill .msym { font-size: 15px; }

/* Video detail */
.video-detail-player {
  background: #000;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-detail-player video, .video-detail-player iframe { width: 100%; height: 100%; border: none; }
.video-detail-player.image-link {
  aspect-ratio: auto;
  background: var(--bg-elev-2);
  display: block;
}
.video-detail-player.image-link a { display: block; position: relative; line-height: 0; }
.video-detail-player.image-link img { width: 100%; height: auto; display: block; }
.image-link-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  transition: transform .15s;
}
.image-link-play .msym { font-size: 40px; color: #fff; }
.video-detail-player.image-link a:hover .image-link-play { transform: translate(-50%, -50%) scale(1.08); }
.video-detail-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.video-detail-commentary { font-size: 14px; line-height: 1.7; color: var(--text); margin: 0 0 12px; }
.video-detail-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.video-detail-meta span { display: flex; align-items: center; gap: 4px; }
.video-detail-report { margin-bottom: 14px; }
.video-detail-report a {
  display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); font-size: 12px; text-decoration: none;
}
.video-detail-report a:hover { color: var(--text); text-decoration: underline; }
.video-detail-report .msym { font-size: 16px; }

.ranking-type-tabs { display: flex; gap: 8px; margin: 12px 0 14px; }
.ranking-type-tabs a {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 20px; font-size: 13px; font-weight: 600; text-decoration: none;
}
.ranking-type-tabs a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.ranking-intro { font-size: 13px; line-height: 1.7; color: var(--text-dim); margin: 0 0 16px; }
.ranking-month-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.ranking-month-nav a {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 5px 14px; font-size: 12px; text-decoration: none;
}
.ranking-month-nav a:hover { border-color: var(--accent); }
.ranking-month-nav a.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 500; }
.ranking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ranking-item {
  display: flex; gap: 12px; align-items: flex-start; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px;
}
.ranking-rank { font-size: 20px; font-weight: 800; color: var(--accent-2); min-width: 44px; text-align: center; flex-shrink: 0; }
.ranking-thumb { flex-shrink: 0; width: 140px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; display: block; }
.ranking-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ranking-body { min-width: 0; flex: 1; }
.ranking-title { display: block; color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; margin-bottom: 4px; }
.ranking-title:hover { color: var(--accent-2); }
.ranking-commentary { font-size: 12px; color: var(--text-dim); margin: 0 0 6px; line-height: 1.6; }
.ranking-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-dim); }
.ranking-stats span { display: flex; align-items: center; gap: 4px; }
@media (max-width: 560px) {
  .ranking-thumb { width: 96px; }
}
.video-detail-desc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.sample-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.sample-thumb-btn {
  display: block;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 0;
  cursor: pointer;
  background: var(--bg-elev-2);
}
.sample-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.sample-thumb-btn:hover img { transform: scale(1.06); }
@media (max-width: 860px) {
  .sample-thumbs { grid-template-columns: repeat(3, 1fr); }
}

.sample-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,9,12,.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* A class-level `display` declaration has the same specificity as the browser's built-in
   `[hidden] { display: none }` rule and comes later in the cascade, so it silently wins and
   the [hidden] attribute gets ignored. This rule has higher specificity than either, so
   toggling the hidden attribute from JS actually shows/hides the lightbox as intended. */
.sample-lightbox[hidden] { display: none; }
.sample-lightbox-stage {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
}
.sample-lightbox-stage img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 6px; }
.sample-lightbox-close, .sample-lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255,255,255,.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
}
.sample-lightbox-close:hover, .sample-lightbox-nav:hover { background: rgba(255,255,255,.18); }
.sample-lightbox-close { top: 16px; right: 16px; width: 42px; height: 42px; }
.sample-lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.sample-lightbox-nav.prev { left: 16px; }
.sample-lightbox-nav.next { right: 16px; }
.sample-lightbox-close .msym, .sample-lightbox-nav .msym { font-size: 26px; }
.sample-lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
}
@media (max-width: 640px) {
  .sample-lightbox-nav { width: 42px; height: 42px; }
  .sample-lightbox-nav.prev { left: 6px; }
  .sample-lightbox-nav.next { right: 6px; }
}

.section-heading {
  font-size: 14px;
  font-weight: 700;
  margin: 26px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

/* Contact form */
.contact-form {
  max-width: 560px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.contact-field { margin-bottom: 18px; }
.contact-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.contact-field .req { font-size: 10px; color: var(--like); border: 1px solid var(--like); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.contact-field input, .contact-field textarea, .contact-field select {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.contact-field textarea { resize: vertical; }
.legal-doc { max-width: 760px; font-size: 13px; line-height: 1.9; color: var(--text-dim); }
.legal-doc h2 { font-size: 15px; color: var(--text); margin: 28px 0 10px; }
.legal-doc h2:first-of-type { margin-top: 10px; }
.legal-doc ul { padding-left: 20px; margin: 8px 0; }
.legal-doc a { color: var(--accent-2); }
.legal-updated { margin-top: 32px; font-size: 12px; color: var(--text-dim); }
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-alert {
  max-width: 560px;
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.7;
}
.contact-alert.success { background: #1e5c3a33; border: 1px solid #1e5c3a; color: #7be3a0; }
.contact-alert.error { background: #b3253f33; border: 1px solid #b3253f; color: #ff9fb0; }
.contact-alert ul { margin: 0; padding-left: 18px; }

.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--text-dim);
}
.empty-state .msym { font-size: 40px; display: block; margin: 0 auto 10px; }

/* Ad slots */
.ad-slot { width: 100%; }
.ad-slot-sp { display: none; }
.ad-slot-pc {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 20px;
}
.ad-slot-pc .ad-unit { min-width: 300px; min-height: 250px; }
.ad-unit {
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot[data-slot="sp_header_below"],
.ad-slot[data-slot="sp_player_above"],
.ad-slot[data-slot="sp_player_below"],
.ad-slot[data-slot="sp_paging_above"] {
  margin-bottom: 16px;
}
.ad-slot[data-slot="sp_header_below"] .ad-unit,
.ad-slot[data-slot="sp_player_above"] .ad-unit,
.ad-slot[data-slot="sp_player_below"] .ad-unit,
.ad-slot[data-slot="sp_paging_above"] .ad-unit {
  min-height: 90px;
}
/* Floating/anchor ad scripts position themselves (usually position:fixed) — never box or clip this slot. */
.ad-slot[data-slot="sp_floating"] {
  display: contents;
}
.ad-slot[data-slot="sp_floating"] .ad-unit {
  all: unset;
  display: contents;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}
footer.site-footer a { color: var(--text-dim); margin: 0 8px; }

@media (max-width: 1100px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .chip-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .layout-row { flex-direction: column; }
  .sidebar { width: 100%; order: 2; }
  .discover-panel { display: none; }
  /* 今週の人気動画だけは例外的にSPでも表示する — サイドバー自体がPCでしか出ない構成のため、
     このウィジェット経由の内部リンク・回遊がSP訪問者には一切機能していなかった。表示位置は
     .sidebar(order:2 = メインコンテンツの下)のまま。 */
  .discover-panel.trending-panel { display: block; }
  .hero { grid-template-columns: 1fr; }
  .hero-strip { flex-direction: row; }
  /* Was display:none — with .discover-panel (the sidebar's キャラ/作者 shortcuts) also hidden
     at this width, that left mobile visitors with literally no way to reach キャラ一覧・作者
     一覧・タグ一覧・原作一覧・マイページ short of scrolling all the way to the footer. Keep it
     visible as a horizontally-scrollable strip instead of hiding it — dropped onto its own full
     width row (rather than squeezed next to the logo) so more than one tab is visible at once. */
  .header-top { flex-wrap: wrap; }
  .header-nav { flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav a { flex-shrink: 0; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .chip-grid { grid-template-columns: repeat(3, 1fr); }
  .ad-slot-sp { display: block; }
  .ad-slot-pc { display: none; }
}
