/*
Theme Name:  Hangrys
Theme URI:   https://hangrys.jp
Description: ハングリーズ YouTube Shorts グルメ発見アプリ
Version:     1.0.0
Author:      Hangrys
Text Domain: hangrys
*/

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800;900&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

@font-face {
  font-family: "Yusei Magic";
  src: url("fonts/YuseiMagic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== DESIGN TOKENS ===== */
:root {
  --hangrys-red:       #FF1B1B;
  --hangrys-red-hover: #FF3D3D;
  --hangrys-red-press: #D90000;
  --hangrys-red-soft:  #4A1010;
  --hangrys-yellow:    #FFE619;
  --hangrys-pink:      #FFB6C8;

  --bg-base:  #0B0B0F;
  --bg-1:     #15151B;
  --bg-2:     #1E1E26;
  --bg-3:     #2A2A33;
  --bg-hover: #23232C;

  --border:        #2F2F38;
  --border-soft:   #22222A;
  --border-strong: #44444F;

  --fg-1:        #FAFAFA;
  --fg-2:        #B8B8C0;
  --fg-3:        #74747F;
  --fg-disabled: #4A4A55;
  --fg-on-red:   #FFFFFF;

  --shadow-sm:  0 1px 2px rgba(0,0,0,.6);
  --shadow-md:  0 4px 14px rgba(0,0,0,.55);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.55);
  --shadow-red: 0 8px 24px rgba(255,27,27,.35);

  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-pill:999px;

  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px;
  --s-6:24px; --s-7:32px; --s-8:40px; --s-9:56px; --s-10:72px;

  --font-display: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --font-sans:    "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  --font-hand:    "Yusei Magic", "M PLUS Rounded 1c", sans-serif;

  --topbar-h: 56px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg-base);
  color: var(--fg-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--hangrys-red); text-decoration: none; }
a:hover { color: var(--hangrys-red-hover); }
img { display: block; max-width: 100%; }
::selection { background: var(--hangrys-red); color: #fff; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(11,11,15,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  padding: 0 var(--s-6);
  gap: var(--s-6);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg-1); flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; }
.brand-word-img { height: 22px; width: auto; display: block; }
.brand-word { font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: -.02em; color: var(--fg-1); }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-soft);
  padding: var(--s-3) var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--bg-3);
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-chip:hover,
.filter-chip.is-active {
  background: var(--hangrys-red);
  color: var(--fg-on-red);
  border-color: var(--hangrys-red);
}
.filter-chip.is-active:hover { color: var(--fg-on-red); }

/* ===== VIDEO GRID ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-3);
  padding: var(--s-5) var(--s-6);
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-2); padding: var(--s-3); }
}
@media (min-width: 900px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (min-width: 1200px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ===== VIDEO TILE ===== */
.video-tile {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-1);
  cursor: pointer;
  border: 1px solid var(--border-soft);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  display: block;
}
.video-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.video-tile__thumb {
  position: relative;
  aspect-ratio: 9/16;
  overflow: hidden;
  background: var(--bg-2);
}
.video-tile__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.video-tile:hover .video-tile__thumb img { transform: scale(1.04); }
.video-tile__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .2s;
}
.video-tile:hover .video-tile__play { opacity: 1; }
.video-tile__play svg { width: 40px; height: 40px; fill: #fff; drop-shadow: 0 2px 6px rgba(0,0,0,.6); }
.video-tile__duration {
  position: absolute;
  bottom: var(--s-2);
  right: var(--s-2);
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-xs);
}
.video-tile__info {
  padding: var(--s-3) var(--s-3) var(--s-4);
}
.video-tile__area {
  font-size: 12px;
  font-weight: 700;
  color: var(--hangrys-red);
  margin-bottom: 4px;
  letter-spacing: .04em;
}
.video-tile__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== SINGLE VIDEO ===== */
.single-shorts {
  min-height: calc(100vh - var(--topbar-h));
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 900px) {
  .single-shorts { grid-template-columns: 400px 1fr; align-items: start; }
}

.shorts-embed {
  position: sticky;
  top: var(--topbar-h);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.shorts-embed__inner {
  position: relative;
  aspect-ratio: 9/16;
  background: #000;
  overflow: hidden;
}
.shorts-embed__inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.shorts-info {
  padding: var(--s-6);
}
.shorts-info__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--fg-1);
  line-height: 1.3;
  margin-bottom: var(--s-5);
}
.shorts-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}
.shorts-info__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s, color .12s;
}
a.shorts-info__tag:hover { background: var(--bg-hover); color: var(--fg-1); text-decoration: none; }
a.shorts-info__tag--area:hover { color: var(--hangrys-red-hover); }
.shorts-info__tag--area {
  background: var(--hangrys-red-soft);
  color: var(--hangrys-red);
}
.shorts-info__caption {
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-2);
  white-space: pre-line;
  border-top: 1px solid var(--border-soft);
  padding-top: var(--s-5);
}
.shorts-info__member {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  color: var(--fg-1);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
a.shorts-info__member:hover { border-color: var(--border-strong); background: var(--bg-3); }
.shorts-info__member-avatar {
  width: 44px; height: 44px; border-radius: 999px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-3); display: flex; align-items: flex-end; justify-content: center;
}
.shorts-info__member-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shorts-info__member-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-1);
}
.shorts-info__member-role {
  font-size: 12px;
  color: var(--fg-3);
}

/* ===== PAGINATION ===== */
.pagination {
  padding: var(--s-8) var(--s-6);
}
/* paginate_links(type:list) は <ul class="page-numbers"> を出力する */
.pagination ul,
.pagination .page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
}
.pagination li { display: flex; }
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--fg-2);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: background .15s;
  text-decoration: none;
}
.pagination a:hover { background: var(--bg-3); color: var(--fg-1); }
.pagination .current { background: var(--hangrys-red); color: #fff; border-color: var(--hangrys-red); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--s-10) var(--s-6);
  color: var(--fg-3);
  font-size: 15px;
}

/* ==========================================================
   FRONT PAGE (DISCOVER) + MEMBER PAGE
   Component styles scoped to <main class="main"> (fluid root).
   Mirrors the web UI kit landing layout.
   ========================================================== */
/* Fluid root: front-page & member-page both wrap content in <main class="main"> */
.main { font-size: 1.3vw; flex: 1; width: 100%; padding: 2em 10vw 5em; }
@media (max-width: 900px)  { .main { font-size: 3.7vw; } }
@media (min-width: 1800px) { .main { font-size: 23.4px; } }
@media (max-width: 320px)  { .main { font-size: 11.84px; } }

/* HERO */
.main .hero {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 2em; align-items: center;
  padding: 1.5em 0 2.5em;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2.5em;
}
.main .hero-eyebrow {
  font-family: var(--font-display); font-weight: 900; font-size: 112%;
  color: var(--hangrys-red); letter-spacing: .04em; margin-bottom: .75em;
}
.main .hero-title {
  font-family: var(--font-display); font-weight: 900; font-size: 450%; line-height: 1; letter-spacing: -.02em;
  margin: 0 0 .22em; color: var(--fg-1);
}
.main .hero-title em { color: var(--hangrys-red); font-style: normal; }
.main .hero-sub { color: var(--fg-2); font-size: 100%; line-height: 1.7; margin: 0 0 1.5em; max-width: 35em; }
.main .hero-yt { margin-bottom: 1.5em; min-height: 2.2em; }
.main .hero-cta { display: flex; gap: .75em; flex-wrap: wrap; }
.main .hero-mascots { display: flex; align-items: flex-end; justify-content: center; width: 100%; max-width: 26em; justify-self: center; }
.main .hero-mascots img { width: 38%; height: auto; }
.main .hero-mascots img:nth-child(1) { transform: translateX(14%) translateY(6%) rotate(-4deg); z-index: 1; }
.main .hero-mascots img:nth-child(2) { z-index: 2; transform: translateY(-4%); }
.main .hero-mascots img:nth-child(3) { transform: translateX(-14%) translateY(6%) rotate(4deg); z-index: 1; }
.main .hero-video { width: 100%; height: auto; display: block; border-radius: 18px; background: #000; }

/* BUTTONS */
.main .btn-primary, .main .btn-secondary {
  font-family: var(--font-sans); font-weight: 700; font-size: 87%;
  padding: .86em 1.55em; border-radius: 999px; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: .5em; line-height: 1;
  transition: all .12s ease; cursor: pointer; text-decoration: none;
}
.main .btn-primary { background: var(--hangrys-red); color: #fff; box-shadow: 0 .5em 1.5em rgba(255,27,27,.25); }
.main .btn-primary:hover { background: var(--hangrys-red-hover); }
.main .btn-secondary { background: transparent; color: var(--fg-1); border-color: var(--border-strong); }
.main .btn-secondary:hover { background: var(--bg-hover); }

/* SECTIONS */
.main .section { margin-bottom: 3em; }
.main .section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1em; }
.main .section-head h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 150%; letter-spacing: -.01em;
  margin: 0; color: var(--fg-1); display: inline-flex; align-items: center; gap: .5em;
}
.main .see-all { color: var(--fg-2); font-size: 81%; display: inline-flex; align-items: center; gap: .125em; cursor: pointer; }
.main .see-all:hover { color: var(--fg-1); }
.main .meta { color: var(--fg-3); font-size: 75%; font-family: "JetBrains Mono", monospace; letter-spacing: .04em; }

/* CHIP RAIL (genre) */
.main .chip-rail { display: flex; flex-wrap: wrap; gap: .5em; }
.main .chip {
  font-family: var(--font-sans); font-weight: 500; font-size: 81%;
  padding: .55em 1em; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-1); color: var(--fg-1);
  display: inline-flex; align-items: center; gap: .45em; transition: all .12s ease; text-decoration: none;
}
.main .chip:hover { border-color: var(--border-strong); }
.main .chip-count { font-family: "JetBrains Mono", monospace; font-size: 85%; color: var(--fg-3); }

/* REGION RAIL (area) */
.main .region-rail { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75em; }
.main .region-card {
  position: relative; aspect-ratio: 4/3;
  border-radius: 14px; border: 1px solid var(--border-soft); overflow: hidden;
  padding: .875em; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; text-align: left;
  transition: transform .15s ease, box-shadow .15s ease; text-decoration: none;
}
.main .region-card:hover { transform: translateY(-2px); box-shadow: 0 .75em 2em rgba(0,0,0,.5); }
.main .region-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent 60%); pointer-events: none;
}
.main .region-label, .main .region-count { position: relative; z-index: 1; }
.main .region-label { font-family: var(--font-display); font-weight: 800; font-size: 94%; }
.main .region-count { font-family: "JetBrains Mono", monospace; font-size: 69%; color: rgba(255,255,255,.7); margin-top: .15em; }

/* SERIES RAIL */
.main .series-rail { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75em; }
.main .series-card {
  position: relative; overflow: hidden; aspect-ratio: 1/1;
  border-radius: 14px; border: 1px solid var(--border-soft);
  padding: .875em; display: flex; flex-direction: column; justify-content: space-between;
  text-align: left; color: #fff; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.main .series-card:hover { transform: translateY(-3px); box-shadow: 0 1em 2.5em rgba(0,0,0,.5); border-color: var(--border-strong); }
.main .series-glyph {
  font-family: var(--font-display); font-weight: 900;
  font-size: 325%; line-height: 1; letter-spacing: -.04em;
  align-self: flex-start; mix-blend-mode: screen; opacity: .95;
}
.main .series-meta { position: relative; z-index: 1; }
.main .series-name { font-family: var(--font-display); font-weight: 800; font-size: 100%; line-height: 1.15; }
.main .series-count {
  position: absolute; top: .6em; right: .6em; z-index: 2;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  font-family: "JetBrains Mono", monospace; font-size: 62%; color: #fff;
  padding: .15em .5em; border-radius: 999px; letter-spacing: .04em;
}
.main .series-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 55%); pointer-events: none;
}

/* CREATORS */
.main .creators-mark { height: 2.2em; width: auto; vertical-align: middle; }
.main .creators-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25em; }
.main .creator-card {
  --accent: var(--hangrys-red);
  display: flex; flex-direction: column; text-align: left;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.main .creator-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 1em 2.5em rgba(0,0,0,.4); }
.main .creator-card-avatar {
  position: relative; height: 9.5em;
  display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(90% 120% at 50% 0%, color-mix(in oklab, var(--accent) 38%, #15151B) 0%, #15151B 70%);
}
.main .creator-card-avatar img { height: 9em; width: auto; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.main .creator-card-body { padding: 1.1em 1.25em 1.35em; display: flex; flex-direction: column; gap: .25em; flex: 1; }
.main .creator-card-tag { font-family: "JetBrains Mono", monospace; font-size: 69%; letter-spacing: .06em; color: var(--accent); }
.main .creator-card-name { font-family: var(--font-display); font-weight: 900; font-size: 137%; color: var(--fg-1); }
.main .creator-card-bio { font-size: 81%; line-height: 1.6; color: var(--fg-2); margin: .4em 0 .9em; }
.main .creator-card-link { margin-top: auto; font-family: var(--font-sans); font-weight: 700; font-size: 81%; color: var(--fg-1); display: inline-flex; align-items: center; gap: .25em; }
.main .creator-card:hover .creator-card-link { color: var(--accent); }

/* MEMBER (CREATOR) PROFILE PAGE */
.main .creator-back {
  display: inline-flex; align-items: center; gap: .4em;
  color: var(--fg-2); font-family: var(--font-sans); font-weight: 600; font-size: 87%;
  padding: .4em 0; margin-bottom: 1em; text-decoration: none;
}
.main .creator-back:hover { color: var(--fg-1); }
.main .creator-hero {
  --accent: var(--hangrys-red);
  display: grid; grid-template-columns: auto 1fr; gap: 2em; align-items: center;
  padding: 2em 2.25em;
  border: 1px solid var(--border); border-radius: 22px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--accent) 30%, #15151B) 0%, #15151B 60%);
  margin-bottom: 2.25em;
}
.main .creator-hero-avatar {
  width: 11em; height: 11em; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25);
  border: 2px solid color-mix(in oklab, var(--accent) 55%, transparent);
  overflow: hidden;
}
.main .creator-hero-avatar img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.main .creator-hero-tag { font-family: "JetBrains Mono", monospace; font-size: 81%; letter-spacing: .06em; color: var(--accent); margin-bottom: .3em; }
.main .creator-hero-name { font-family: var(--font-display); font-weight: 900; font-size: 280%; line-height: 1; margin: 0 0 .15em; letter-spacing: -.02em; }
.main .creator-hero-bio { font-size: 100%; line-height: 1.7; color: var(--fg-1); margin: 0 0 1em; max-width: 40em; }
.main .creator-hero-stats { display: flex; gap: 1.5em; font-size: 87%; color: var(--fg-2); }
.main .creator-hero-stats strong { font-family: var(--font-display); font-weight: 800; color: var(--fg-1); font-size: 120%; }

/* VIDEO GRID (hot shorts) */
.main .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1em; }
.main .tile { cursor: pointer; transition: transform .15s ease; text-decoration: none; display: block; }
.main .tile-thumb {
  position: relative; aspect-ratio: 9/16;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--border-soft);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  transition: box-shadow .2s ease;
}
.main .tile:hover .tile-thumb { box-shadow: 0 1em 2.5em rgba(0,0,0,.55); }
.main .tile:hover .tile-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.main .tile-protect { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.85), transparent 50%); }
.main .tile-meta { position: absolute; left: .75em; right: .75em; bottom: .75em; color: #fff; }
.main .tile-region { font-family: "JetBrains Mono", monospace; font-size: 93%; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.main .tile-title { font-family: var(--font-display); font-weight: 800; font-size: 87%; line-height: 1.25; margin-top: .15em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.main .tile-dur {
  position: absolute; bottom: 3.75em; right: .6em; z-index: 1;
  background: rgba(0,0,0,.7); color: #fff; font-family: "JetBrains Mono", monospace; font-size: 62%; font-weight: 600;
  padding: .12em .4em; border-radius: 4px;
}
.main .tile-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.9);
  width: 3em; height: 3em; border-radius: 999px;
  background: rgba(0,0,0,.65); backdrop-filter: blur(8px);
  color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all .15s ease;
}
.main .tile-play svg { width: 1.25em; height: 1.25em; fill: #fff; }

/* Front-page responsive */
@media (max-width: 1100px) and (min-width: 901px) {
  .main .grid, .main .region-rail, .main .series-rail { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .main { padding: 1.5em 5vw 4em; }
  .main .hero { grid-template-columns: 1fr; padding: 1em 0 2em; gap: 1em; }
  .main .hero-mascots { order: -1; max-width: 18em; }
  .main .hero-title { font-size: 330%; }
  .main .region-rail, .main .series-rail { grid-template-columns: repeat(2, 1fr); }
  .main .grid { grid-template-columns: repeat(2, 1fr); }
  .main .creators-row { grid-template-columns: repeat(3, 1fr); gap: .6em; }
  .main .creator-card-bio, .main .creator-card-link { display: none; }
  .main .creator-card-avatar { height: 5.5em; }
  .main .creator-card-avatar img { height: 5em; }
  .main .creator-card-body { padding: .6em .6em .8em; }
  .main .creator-card-name { font-size: 90%; }
  .main .creator-card-tag { font-size: 50%; }
  .main .creator-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 1.25em; padding: 1.75em 1.25em; }
  .main .creator-hero-bio { margin-left: auto; margin-right: auto; }
  .main .creator-hero-stats { justify-content: center; }
}

/* ==========================================================
   TAXONOMY PAGE — player（VideoPlayer 準拠）+ random playlist
   ========================================================== */
.tax-player {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  padding: var(--s-6);
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 901px) {
  .tax-player { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
}

.tax-stage { position: sticky; top: calc(var(--topbar-h) + var(--s-4)); max-width: 460px; }
.tax-eyebrow {
  font-family: var(--font-sans); font-weight: 700; font-size: 12px;
  letter-spacing: .08em; color: var(--hangrys-red); margin-bottom: 4px;
}
.tax-heading {
  font-family: var(--font-display); font-weight: 900; font-size: 26px;
  line-height: 1.1; letter-spacing: -.02em; margin-bottom: var(--s-4);
  display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap;
}
.tax-count { font-family: "JetBrains Mono", monospace; font-size: 14px; color: var(--fg-3); font-weight: 600; }

/* PC: 高さに応じて動画サイズが可変（縦が低い画面でも全体が見える） */
.tax-stage .shorts-embed { position: static; width: fit-content; max-width: 100%; margin: 0; }
.tax-stage .shorts-embed__inner {
  aspect-ratio: 9/16;
  height: min(calc(100vh - 230px), 720px);
  width: auto;          /* 高さから 9:16 で算出 */
  max-width: 100%;
  container-type: size; container-name: taxframe;
}
/* TikTok 風スライド：切替時に次/前動画のサムネが上にかぶさってくる */
.tax-incoming {
  position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 3;
  background: #000 center/cover no-repeat;
  transform: translateY(100%);   /* 既定は画面外（下） */
  opacity: 1; pointer-events: none; will-change: transform, opacity;
  display: none;
}

/* iframe は中央タップで YouTube 操作（再生/停止）できるよう操作可能に */
.tax-iframe-wrap { position: absolute; inset: 0; z-index: 0; pointer-events: auto; }
.tax-iframe-wrap iframe, .tax-iframe-wrap #tax-yt {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 0;
}
/* カバークロップ：16:9 プレーヤーを 9:16 枠いっぱいに（黒帯解消） */
@container taxframe (max-aspect-ratio: 16/9) {
  .tax-iframe-wrap iframe { height: 100%; width: calc(100cqh * 16 / 9); }
}
@container taxframe (min-aspect-ratio: 16/9) {
  .tax-iframe-wrap iframe { width: 100%; height: calc(100cqw * 9 / 16); }
}
/* 左右の透明ガター：ここでスワイプ/ホイールを受ける（中央は YouTube に明け渡す） */
.tax-gutter { position: absolute; top: 3.2em; bottom: 4.5em; width: 30%; z-index: 4; touch-action: none; }
.tax-gutter-l { left: 0; }
.tax-gutter-r { right: 0; }

/* ミュート ON/OFF（PC・モバイル共通、YouTube操作バーの上に配置） */
.tax-mute {
  position: absolute; right: .7em; bottom: 3.8em; z-index: 6;
  display: inline-flex; flex-direction: column; align-items: center; gap: .2em;
  background: transparent; border: none; color: #fff; cursor: pointer;
  font-family: var(--font-sans); font-weight: 700; font-size: 11px;
}
.tax-mute svg { background: rgba(0,0,0,.55); border-radius: 999px; padding: .55em; box-sizing: content-box; backdrop-filter: blur(6px); }
.tax-mute.is-on { color: var(--hangrys-red); }
.tax-mute.is-on svg { background: rgba(255,27,27,.18); }

/* YouTube へのリンク（ミュートの上、同スタイル） */
.tax-yt-link {
  position: absolute; right: .7em; bottom: 11em; z-index: 6;
  display: inline-flex; flex-direction: column; align-items: center; gap: .2em;
  background: transparent; border: none; color: #fff; cursor: pointer; text-decoration: none;
  font-family: var(--font-sans); font-weight: 700; font-size: 11px;
}
.tax-yt-link svg { background: rgba(0,0,0,.55); border-radius: 999px; padding: .55em; box-sizing: content-box; backdrop-filter: blur(6px); }
.tax-yt-link:hover { color: var(--hangrys-red); }
.tax-yt-link:hover svg { background: rgba(255,27,27,.18); }

/* 動画上オーバーレイ（モバイルのみ表示） */
.tax-overlay { display: none; }

/* モバイル専用 UI は PC では非表示（@media より前に置く） */
.tax-close, .tax-info-toggle, .tax-rail, .tax-swipe-hint, .tax-side-close { display: none; }

/* 情報パネル＋プレイリスト */
.tax-side {
  background: var(--bg-1); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--topbar-h) - var(--s-8));
}
.tax-side-info { padding: var(--s-5); border-bottom: 1px solid var(--border-soft); }
.tax-side-area { font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .06em; color: var(--hangrys-red); }
.tax-side-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.3; margin: 4px 0 8px; color: var(--fg-1); }
.tax-side-link { font-size: 13px; font-weight: 600; }
.tax-caption {
  margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border-soft);
  font-size: 13px; line-height: 1.75; color: var(--fg-2); white-space: pre-line;
  max-height: 32vh; overflow-y: auto;
}

/* シングル：プレイリストが無いので情報全体をスクロール領域に */
.single-mode .tax-side-info { flex: 1; min-height: 0; overflow-y: auto; }
.single-mode .tax-caption { max-height: none; overflow: visible; }
.single-mode .shorts-info__member { margin-top: var(--s-4); }

.tax-playlist-head {
  font-family: var(--font-sans); font-weight: 700; font-size: 13px;
  color: var(--fg-2); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border-soft);
}
.tax-pl-list { overflow-y: auto; flex: 1; }
.tax-pl-item {
  display: flex; gap: var(--s-3); width: 100%;
  padding: var(--s-2) var(--s-3); background: transparent; border: none;
  text-align: left; cursor: pointer; color: var(--fg-1);
  border-bottom: 1px solid var(--border-soft); transition: background .12s;
}
.tax-pl-item:hover { background: var(--bg-hover); }
.tax-pl-item.is-current { background: var(--hangrys-red-soft); box-shadow: inset 3px 0 0 var(--hangrys-red); }
.tax-pl-thumb {
  position: relative; flex: 0 0 54px; width: 54px; height: 80px;
  border-radius: var(--r-sm); overflow: hidden; background: var(--bg-2);
  background-size: cover; background-position: center;
}
.tax-pl-dur {
  position: absolute; bottom: 3px; right: 3px;
  background: rgba(0,0,0,.75); color: #fff; font-family: "JetBrains Mono", monospace;
  font-size: 10px; padding: 1px 4px; border-radius: 3px;
}
.tax-pl-meta { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tax-pl-area { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .04em; color: var(--hangrys-red); }
.tax-pl-title {
  font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--fg-1); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== TAXONOMY — mobile full-screen player ===== */
@media (max-width: 900px) {
  .tax-player {
    position: fixed; inset: 0; z-index: 200;
    grid-template-columns: 1fr; gap: 0; padding: 0; max-width: none; margin: 0;
    background: #000;
  }
  .tax-stage { position: static; height: 100dvh; max-width: none; }
  .tax-stage-head { display: none; }

  .tax-stage .shorts-embed { width: 100vw; max-width: none; margin: 0; }
  .tax-stage .shorts-embed__inner {
    height: 100dvh; width: 100vw; aspect-ratio: auto; max-width: none; border-radius: 0;
    /* container-type / cover-crop はベース定義を継承 */
  }

  .tax-stage .shorts-embed__inner::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, transparent 34%),
                linear-gradient(to bottom, rgba(0,0,0,.45), transparent 18%);
  }

  /* もどる */
  .tax-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: max(.75em, env(safe-area-inset-top, .75em)); left: .75em; z-index: 6;
    width: 2.4em; height: 2.4em; border-radius: 999px;
    background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.18); color: #fff;
    font-size: 20px; backdrop-filter: blur(6px);
  }
  /* 概要トグル */
  .tax-info-toggle {
    display: inline-flex; align-items: center; gap: .35em;
    position: absolute; top: max(.75em, env(safe-area-inset-top, .75em)); right: .75em; z-index: 6;
    padding: .5em .95em; border-radius: 999px;
    background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.18); color: #fff;
    font-family: var(--font-sans); font-weight: 700; font-size: 12px; backdrop-filter: blur(6px);
  }

  /* ミュートはアクションとして右下（やや上に） */
  .tax-mute { right: .6em; bottom: max(5.2em, calc(env(safe-area-inset-bottom, 0px) + 5.2em)); }
  .tax-mute svg { padding: .7em; width: 26px; height: 26px; }
  .tax-yt-link { right: .6em; bottom: max(13em, calc(env(safe-area-inset-bottom, 0px) + 13em)); }
  .tax-yt-link svg { padding: .7em; width: 26px; height: 26px; }

  /* 動画下オーバーレイ */
  .tax-overlay {
    display: block; position: absolute; left: 1em; right: 4.8em;
    bottom: 2em; z-index: 5;
    color: #fff; pointer-events: none;
  }
  .tax-ov-area { font-family: "JetBrains Mono", monospace; font-size: 12px; color: rgba(255,255,255,.85); }
  .tax-ov-title { font-size: 16px; font-weight: 800; margin-top: 2px; text-shadow: 0 1px 4px rgba(0,0,0,.6); line-height: 1.3; }

  /* 位置インジケータ */
  .tax-rail {
    display: flex; position: absolute; top: 50%; right: .4em; transform: translateY(-50%);
    z-index: 5; flex-direction: column; gap: .35em; pointer-events: none;
  }
  .tax-rail-dot { width: 3px; height: .8em; border-radius: 3px; background: rgba(255,255,255,.3); transition: background .2s, height .2s; }
  .tax-rail-dot.on { background: var(--hangrys-red); height: 1.4em; }

  /* スワイプヒント */
  .tax-swipe-hint {
    display: inline-flex; align-items: center; gap: .35em;
    position: absolute; top: 4em; left: 50%; transform: translateX(-50%); z-index: 5;
    background: rgba(0,0,0,.55); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.14);
    color: #fff; font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .04em;
    padding: .45em .8em; border-radius: 999px; pointer-events: none;
    animation: taxHint 5s ease forwards;
  }
  @keyframes taxHint { 0%,60%{opacity:1;} 100%{opacity:0;} }

  /* 情報パネル → ボトムシート */
  .tax-side {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
    max-height: 78dvh; border: none; border-radius: 16px 16px 0 0;
    transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  }
  .tax-side.open { transform: translateY(0); }
  .tax-side-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: .6em; right: .6em; z-index: 1;
    width: 2em; height: 2em; border-radius: 999px;
    background: var(--bg-3); border: 1px solid var(--border); color: var(--fg-1); font-size: 16px;
  }
  .tax-caption { max-height: 28vh; }
}
