:root {
  --bg: #111111;
  --bg-elevated: #171717;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --red: #e50914;
  --orange: #ff8c1a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --content-width: 1440px;
  --hero-height: 560px;
  --hero-image-width: 68%;
  --hero-card-min-width: 220px;
  --hero-card-max-width: 360px;
  --thumb-ratio: 16 / 9;
  --thumb-min-height: 170px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(229, 9, 20, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 140, 26, 0.16), transparent 24%),
    linear-gradient(180deg, #181818 0%, #111111 100%);
  color: var(--text);
  font-family: "Noto Sans JP", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.bg-orb { position: fixed; width: 34rem; height: 34rem; filter: blur(90px); opacity: 0.16; z-index: -1; pointer-events: none; }
.orb-left { top: -8rem; left: -8rem; background: #e50914; }
.orb-right { top: 12rem; right: -10rem; background: #ff8c1a; }
.site-header {
  position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 1rem; align-items: center; padding: 1.2rem 2rem; background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(24px); border-bottom: 1px solid var(--line);
}
.category-tray {
  position: sticky;
  top: 88px;
  z-index: 45;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  padding: 0.8rem 0 0.2rem;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.94), rgba(17, 17, 17, 0.72));
  backdrop-filter: blur(18px);
}
.category-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.category-chip:hover,
.category-chip.active {
  transform: translateY(-1px);
  background: rgba(255, 140, 26, 0.18);
  border-color: rgba(255, 140, 26, 0.45);
}
.site-header.compact { grid-template-columns: auto auto; justify-content: space-between; }
.brand-block, .brand-inline { display: flex; align-items: center; gap: 0.9rem; }
.brand-block { color: inherit; text-decoration: none; }
.brand-block:hover .brand-name,
.brand-block:focus-visible .brand-name { opacity: 0.92; }
.brand-badge {
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--red), var(--orange)); color: white; font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem; font-weight: 700; box-shadow: 0 10px 30px rgba(229, 9, 20, 0.28);
}
.brand-name, .section-heading h2, .detail-copy h1 { font-family: "Space Grotesk", sans-serif; margin: 0; }
.brand-name { font-size: 1.25rem; }
.eyebrow { margin: 0 0 0.2rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; }
.eyebrow.accent { color: #ffd2a5; }
.search-shell { position: relative; }
.search-input {
  width: 100%; border: 1px solid transparent; border-radius: 999px; padding: 0.95rem 1.2rem;
  background: rgba(255, 255, 255, 0.08); color: white; outline: none; transition: border-color 180ms ease, background 180ms ease;
}
.search-input:focus { border-color: rgba(255, 140, 26, 0.55); background: rgba(255, 255, 255, 0.12); }
.autocomplete-list {
  position: absolute; top: calc(100% + 0.6rem); left: 0; right: 0; padding: 0.5rem; border-radius: 1rem;
  background: rgba(24, 24, 24, 0.98); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.autocomplete-list button {
  width: 100%; text-align: left; background: transparent; color: white; border: 0; border-radius: 0.8rem; padding: 0.8rem 0.9rem; cursor: pointer;
}
.autocomplete-list button:hover { background: rgba(255, 255, 255, 0.08); }
.hidden { display: none !important; }
.top-nav, .hero-actions, .detail-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.nav-chip, .secondary-button, .primary-button {
  border-radius: 999px; padding: 0.82rem 1.2rem; border: 0; cursor: pointer; transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.nav-chip { color: white; background: transparent; border: 1px solid var(--line); }
.nav-chip.active, .nav-chip:hover { background: rgba(255, 255, 255, 0.12); }
.primary-button { background: linear-gradient(135deg, var(--red), #ff3a27); color: white; box-shadow: 0 14px 40px rgba(229, 9, 20, 0.28); }
.secondary-button { background: rgba(255, 255, 255, 0.08); color: white; border: 1px solid var(--line); }
.primary-button:hover, .secondary-button:hover, .nav-chip:hover { transform: translateY(-1px); }
.page-shell { width: min(calc(100% - 2rem), var(--content-width)); margin: 0 auto; padding: 1.5rem 0 4rem; }
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, var(--hero-image-width)) minmax(320px, 1fr); min-height: var(--hero-height); height: var(--hero-height); margin-top: 0.8rem;
  border-radius: 30px; background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-media { position: relative; min-height: 100%; height: 100%; background: #191919; }
.hero-slides { width: 100%; height: 100%; min-height: 100%; }
.hero-image, .thumbnail { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; background: #202020; }
.hero-overlay {
  position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17, 17, 17, 0.1), rgba(17, 17, 17, 0.85)), linear-gradient(0deg, rgba(17, 17, 17, 0.2), transparent); z-index: 1;
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: 3rem; z-index: 2; }
.hero-copy h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.hero-copy p, .detail-description { color: var(--text-soft); font-size: 1rem; line-height: 1.7; }
#heroDescription {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta, .card-metadata, .section-status { color: var(--text-soft); font-size: 0.92rem; }
.content-section { margin-top: 2.3rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.rows-container { display: grid; gap: 1.4rem; }
.row-shell { display: grid; gap: 0.85rem; }
.row-shell h3 { margin: 0; font-size: 1.2rem; }
.card-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(var(--hero-card-min-width), 24vw, var(--hero-card-max-width)); gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: thin;
}
.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.video-card { transform: translateY(0) scale(1); transition: transform 220ms ease, box-shadow 220ms ease; }
.video-card:hover { transform: translateY(-4px) scale(1.03); }
.video-card:hover .card-overlay { opacity: 1; }
.thumbnail-shell {
  position: relative; aspect-ratio: var(--thumb-ratio); min-height: var(--thumb-min-height); border-radius: 1.2rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08); background: #202020; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.thumbnail-gradient { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(17, 17, 17, 0.85)); }
.card-overlay {
  position: absolute; inset: 0; display: flex; align-items: end; justify-content: space-between; padding: 1rem; opacity: 0; transition: opacity 220ms ease;
}
.icon-button { width: 2.8rem; height: 2.8rem; border-radius: 999px; border: 0; cursor: pointer; }
.play-button { background: white; }
.favorite-button { background: rgba(17, 17, 17, 0.8); color: white; border: 1px solid rgba(255, 255, 255, 0.16); }
.duration-pill { position: absolute; right: 0.8rem; bottom: 0.8rem; border-radius: 999px; padding: 0.3rem 0.55rem; background: rgba(0, 0, 0, 0.78); font-size: 0.8rem; }
.card-copy { padding: 0.8rem 0.2rem 0.2rem; min-height: 4.9rem; }
.card-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7rem;
}
.card-metadata {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grid-sentinel { padding: 1.2rem; text-align: center; color: var(--text-soft); }
.detail-layout { display: grid; gap: 2rem; }
.player-panel { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 1.6rem; align-items: start; }
.player-shell { overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: black; box-shadow: var(--shadow); }
.detail-iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.detail-video { width: 100%; aspect-ratio: 16 / 9; display: block; background: black; }
.detail-copy { padding: 1rem 0.4rem; }
.detail-copy h1 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.skeleton { position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%); animation: shimmer 1.6s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr; }
  .category-tray { top: 150px; width: min(calc(100% - 1rem), var(--content-width)); }
  .hero, .player-panel { grid-template-columns: 1fr; }
  .hero { height: auto; min-height: 0; }
  .hero-media { min-height: 320px; height: 320px; }
  .hero-copy { padding: 2rem; }
}
@media (max-width: 760px) {
  .site-header { padding: 1rem; }
  .page-shell { width: min(calc(100% - 1rem), var(--content-width)); }
  .category-tray { top: 190px; }
  .hero { min-height: 0; }
  .hero-media { min-height: 240px; height: 240px; }
  .hero-copy h2 { font-size: 2.2rem; }
  .top-nav { overflow-x: auto; padding-bottom: 0.4rem; }
  .card-row { grid-auto-columns: 74vw; }
  .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .search-grid { grid-template-columns: 1fr; }
  .hero-actions, .detail-actions, .section-heading { flex-direction: column; align-items: start; }
}
