/* ==========================================================
   KINOTAKE+ visual prototype
   dark streaming UI / accent: yellow #f5c518, green #6db33f
   ========================================================== */

:root {
  --bg: #0b0b0b;
  --bg-raised: #161616;
  --bg-card: #1e1e1e;
  --text: #eeeeee;
  --text-sub: #c9c9c9;
  --text-dim: #a3a3a3;
  --yellow: #f5c518;
  --green: #6db33f;
  --white: #ffffff;
  --accent: var(--yellow);
  --accent-soft: rgba(245, 197, 24, 0.16);
  --accent-text: #111;
  --line: #2c2c2c;
  --radius: 8px;
  --header-h: 64px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "YuGothic", "Yu Gothic", "Noto Sans JP", sans-serif;
}

body[data-faction="takenoko"] {
  --accent: var(--green);
  --accent-soft: rgba(109, 179, 63, 0.18);
  --accent-text: #0b1a05;
}

body[data-faction="kinoko"] {
  --accent: var(--yellow);
  --accent-soft: rgba(245, 197, 24, 0.16);
  --accent-text: #111;
}

* {
  box-sizing: border-box;
}

html {
  /* prevent iOS Safari font boosting from reflowing manually wrapped text */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* hidden attribute must win over display rules on components */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}

img {
  max-width: 100%;
}
button {
  font-family: inherit;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-confirm {
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, var(--yellow), var(--green));
  position: relative;
  color: #111;
}

.btn-lg.btn-confirm {
  padding: 15px 60px;
}

.btn-confirm::after {
  content: "";
  border: solid black;
  border-width: 0 1px 1px 0;
  display: inline-block;
  padding: 4px;
  position: absolute;
  top: 50%;
  transform: rotate(-45deg) translateY(-50%);
  right: 10px;
}

body:not([data-faction="kinoko"]):not([data-faction="takenoko"]) .btn-primary {
  background: linear-gradient(120deg, var(--yellow), var(--green));
}

.btn-primary:hover {
  filter: brightness(1.12);
}

.btn-secondary {
  background: var(--green);
  color: #0b1a05;
}
.btn-secondary:hover {
  background: #7fc750;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.opening-skip {
  padding: 10px 30px;
}

.opening-skip .icon-skip {
  width: 14px;
  height: 14px;
}

.btn-lg {
  min-height: 52px;
  padding: 12px 40px;
  font-size: 18px;
}

.btn.is-active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* ---------- opening ---------- */

.opening {
  position: fixed;
  inset: 0;
  /* z-index: 100; */
  z-index: 9999;
  display: flex;
  align-items: safe center;
  justify-content: center;
  background: #000;
  /* background: #1A1A1A; */
  transition: opacity 0.8s ease;
  overflow-y: auto;
}
.opening.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.opening-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* gap: 18px; */
}
.opening-choice-logo {
  width: min(38vw, 170px);
  /* margin-bottom: 24px; */
  margin-bottom: 40px;
  opacity: 0.92;
}

.opening-choice .opening_text {
  font-size: 22px;
  margin-bottom: 10px;
  letter-spacing: 0.1em;
}

@media (max-width: 720px) {
  .opening-choice .opening_text {
    font-size: 18px;
  }
}

.opening-choice .opening_copy {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 50px;
}

@media (max-width: 720px) {
  .opening-choice .opening_copy {
    font-size: 12px;
    margin-bottom: 50px;
  }
}

.opening-choice .opening_text_highlight {
  background: linear-gradient(90deg, var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.opening-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-reveal {
  position: relative;
  width: min(60vw, 300px);
}
.logo-reveal img {
  display: block;
  width: 100%;
}

.logo-base {
  filter: brightness(0.14) saturate(0.3);
}

.logo-lit {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(105deg, #000 42%, transparent 58%);
  mask-image: linear-gradient(105deg, #000 42%, transparent 58%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: logo-sweep 2.2s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  filter: drop-shadow(0 0 18px rgba(245, 197, 24, 0));
}

@keyframes logo-sweep {
  0% {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
  80% {
    filter: drop-shadow(0 0 22px rgba(245, 197, 24, 0.45));
  }
  100% {
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
    filter: drop-shadow(0 0 14px rgba(245, 197, 24, 0.25));
  }
}

.logo-flare {
  position: absolute;
  inset: -10%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  background-size: 260% 100%;
  background-repeat: no-repeat;
  background-position: 130% 0;
  animation: flare-sweep 2.2s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  pointer-events: none;
  mix-blend-mode: screen;
}

@keyframes flare-sweep {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -30% 0;
  }
}

.opening-skip {
  position: fixed;
  right: 24px;
  bottom: 24px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 28px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), rgba(11, 11, 11, 0.78));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
}
.header-logo img {
  /* height: 40px; */
  height: 30px;
  width: auto;
}
.header-logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(120deg, var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-link {
  position: relative;
  min-height: 44px;
  padding: 8px 16px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.header-link:hover {
  background: rgba(255, 255, 255, 0.1);
}
.header-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.header-link[target="_blank"] {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link[target="_blank"] .icon-window {
}

.header-nav--left .header-link {
  padding: 8px 30px;
}

.header-nav--left .header-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
}

.faction-switch {
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  position: relative;
}

body:not([data-faction="kinoko"]):not([data-faction="takenoko"]) .faction-switch {
  /* border-image: linear-gradient(120deg, var(--yellow), var(--green)) 1; */
  background: linear-gradient(120deg, var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border: none;
}

body:not([data-faction="kinoko"]):not([data-faction="takenoko"]) .faction-switch:hover {
  /* background: var(--accent-soft); */
  background: linear-gradient(120deg, var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body:not([data-faction="kinoko"]):not([data-faction="takenoko"]) .faction-switch::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(120deg, var(--yellow), var(--green));
  z-index: 5;
  content: "";
  /* position: absolute; */
  /* inset: 0; */
  border-radius: 6px;
  padding: 2px;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.faction-switch:hover::before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(120deg, var(--yellow), var(--green));
  opacity: 0.16;
}

.news-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: clamp(420px, 66vh, 760px);
  max-height: 760px;
  display: flex;
  align-items: flex-end;
  padding: 96px 48px 56px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #131313;
}
.hero-bg img {
  /* position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%; */
  position: absolute;
  inset: 0;
  width: 55%;
  margin-left: 45%;
  height: 100%;
  object-fit: cover;
  object-position: right 15%;
  right: 0;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* background: linear-gradient(to right, rgba(11, 11, 11, 0.96) 30%, rgba(11, 11, 11, 0.35) 70%, rgba(11, 11, 11, 0.55)), linear-gradient(to top, var(--bg) 0%, transparent 45%); */
  background: linear-gradient(to right, rgba(11, 11, 11, 0.96) 46%, rgba(11, 11, 11, 0.35) 55%, rgba(11, 11, 11, 0)), linear-gradient(to top, var(--bg) 0%, transparent 35%);
}

@media (max-width: 720px) {
  .hero-bg::after {
    background: linear-gradient(to top, rgba(11, 11, 11, 0.96) 30%, rgba(11, 11, 11, 0.35) 70%, rgba(11, 11, 11, 0)), linear-gradient(to top, var(--bg) 0%, transparent 35%);
  }
}

.hero-content {
  position: relative;
  max-width: 560px;
}

.hero-label {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.3;
}


.hero-meta {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy {
  margin: 0 0 24px;
  color: var(--text-sub);
  font-size: 17px;
  /* 説明文を2行に省略 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- rows ---------- */

.rows {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 8px 0 64px;
}

.row-title {
  margin: 0 0 14px;
  padding: 0 48px;
  font-size: 22px;
  font-weight: 700;
}
.row-title .row-accent {
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-right: 10px;
  border-radius: 3px;
  vertical-align: -0.12em;
}

.row-scroller {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 48px 26px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

/* ---------- cards ---------- */

.card {
  position: relative;
  /* flex: 0 0 190px; */
  flex: 0 0 calc(16.667% - 12px);
  aspect-ratio: 2 / 3;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.card--landscape {
  /* flex-basis: 320px; */
  flex-basis: calc(16.667% - 12px);
  aspect-ratio: 16 / 10;
}
.card:hover,
.card:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-thumb {
  position: absolute;
  inset: 0;
}
.card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: none;
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  /* 表示 */
  opacity: 1;
}
.card:hover .card-overlay,
.card:focus-visible .card-overlay {
  opacity: 1;
}

.card-title {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}
.card-meta {
  margin: 2px 0 0;
  color: var(--text-sub);
  font-size: 13px;
  text-align: left;
  /*  */
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.card-meta .row-accent {
  background: linear-gradient(120deg, var(--yellow), var(--green));
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-right: 6px;
  vertical-align: -0.12em;
}

/* grid (my page) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: start;
  gap: 16px;
}
.grid .card {
  flex: none;
  width: 100%;
}

/* ---------- generic pages ---------- */

.view {
  min-height: calc(100vh - var(--header-h));
}

.page-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

.page-title {
  margin: 0 0 28px;
  font-size: 32px;
  font-weight: 700;
}

.mypage-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.25), rgba(109, 179, 63, 0.25));
  font-size: 30px;
}
.mypage-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.mypage-note {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 14px;
}

.empty-note {
  color: var(--text-sub);
}

.mypage-profile + .row-title {
  padding: 0;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.news-item time {
  flex: none;
  color: var(--text-dim);
  font-size: 14px;
}
.news-item p {
  margin: 0;
  font-size: 16px;
}
.news-tag {
  flex: none;
  padding: 2px 10px;
  border-radius: 4px;
  background: #2e2e2e;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
}
.news-tag-new {
  background: var(--accent);
  color: var(--accent-text);
}

.news-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.news-banner-text {
  margin: 0;
  font-size: 16px;
}
.news-banner-text strong {
  color: var(--accent);
}
.news-banner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.news-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.news-banner-link:hover {
  background: rgba(0, 0, 0, 0.6);
}
.news-banner-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 70px 48px 70px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 14px;
  position: relative;
}
.site-footer p {
  margin: 0 0 4px;
}
.footer-copy {
  letter-spacing: 0.04em;
}

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  /* z-index: 80; */
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}
.modal-panel {
  position: relative;
  width: min(880px, 100%);
  border-radius: 12px;
  background: var(--bg-raised);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.modal-close:hover {
  background: rgba(0, 0, 0, 0.85);
}
.modal-close:focus-visible {
  outline: 2px solid var(--accent);
}

/* detail */

.detail-visual {
  position: relative;
  aspect-ratio: 16 / 8;
  background: #000;
  overflow: hidden;
}
.detail-visual-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px) brightness(0.4);
  transform: scale(1.2);
}
.detail-visual-fg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-visual--landscape .detail-visual-fg {
  object-fit: cover;
}
.detail-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-raised) 2%, transparent 30%);
}

/* dummy player */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.player-label {
  color: var(--text-sub);
  font-size: 16px;
  text-align: center;
}
.player-label .player-icon {
  display: block;
  margin-bottom: 8px;
  font-size: 56px;
  color: #fff;
}
.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 20px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}
.player-progress {
  position: relative;
  height: 4px;
  margin-bottom: 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}
.player-progress::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28%;
  border-radius: 2px;
  background: var(--accent);
}
.player-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: 15px;
}
.player-buttons .player-time {
  margin-left: auto;
  color: var(--text-sub);
}

.detail-body {
  padding: 24px 32px 40px;
}

.detail-header {
  margin-bottom: 8px;
}
.detail-title {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.35;
}
.detail-meta {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 16px;
}
.detail-meta span + span {
  margin-left: 14px;
}

.detail-copy {
  margin: 0 0 24px;
  font-size: 17px;
  color: var(--text);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* フェードイン */
#detail-body .detail-visual-wrap,
#detail-body .detail-header,
#detail-body .detail-play,
#detail-body .detail-copy {
  opacity: 1;
  transition: opacity 0.2s ease; /* 0.5秒かけてふわっと変化する */
}

/* フェードアウト中の状態（透明にする） */
#detail-body.is-fadeout .detail-visual-wrap,
#detail-body.is-fadeout .detail-header,
#detail-body.is-fadeout .detail-play,
#detail-body.is-fadeout .detail-copy {
  opacity: 0;
}

/* reactions: main interactive block of the detail modal */
.reaction-sec {
  margin-top: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}
.reaction-sec-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}
.reaction-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 16px 10px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    transform 0.15s ease;
}
.reaction-btn:hover {
  border-color: var(--text-dim);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}
.reaction-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.reaction-btn.is-reacted.reaction-kinoko {
  border-color: var(--yellow);
  background: rgba(245, 197, 24, 0.12);
}
.reaction-btn.is-reacted.reaction-take {
  border-color: var(--green);
  background: rgba(109, 179, 63, 0.14);
}
.reaction-btn.is-reacted.reaction-choudo {
  border-color: #c98f4e;
  background: rgba(201, 143, 78, 0.14);
}
.reaction-emoji {
  font-size: 32px;
  line-height: 1.2;
}
.reaction-label {
  font-weight: 700;
}
.reaction-count {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.reaction-kinoko .reaction-count {
  color: var(--yellow);
}
.reaction-take .reaction-count {
  color: var(--green);
}
.reaction-choudo .reaction-count {
  color: #c98f4e;
}
.reaction-btn.is-bumped .reaction-count {
  animation: count-bump 0.3s ease;
}
@keyframes count-bump {
  40% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.reaction-note {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

/* share popup */
.share-wrap {
  position: relative;
}
.share-pop {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 8px;
  border-radius: 10px;
  background: #262626;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.share-pop[hidden] {
  display: none;
}
.share-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.share-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.share-icon-x {
  background: #000;
  border: 1px solid #444;
}
.share-icon-line {
  background: #06c755;
}
.share-icon-fb {
  background: #1877f2;
}
.share-icon-insta {
  background: #7638FA;
}
.share-icon-copy {
  background: #555;
}

/* faction select */
.faction-modal {
  position: fixed;
  inset: 0;
  /* z-index: 110; */
  z-index: 9999;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  overflow-y: auto;
}
.faction-panel {
  width: min(560px, 100%);
  padding: 40px 32px 32px;
  border-radius: 16px;
  background: var(--bg-raised);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  text-align: center;
  position: relative;
}
.faction-title {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
}
.faction-note {
  margin: 0 0 28px;
  color: var(--text-sub);
  font-size: 15px;
}
.faction-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 35px;
}
.faction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 12px 20px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--bg-card);
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    transform 0.15s ease;
}
.faction-btn:hover {
  transform: translateY(-2px);
}
.faction-btn-kinoko:hover,
.faction-btn-kinoko:focus-visible {
  border-color: var(--yellow);
  background: rgba(245, 197, 24, 0.12);
}
.faction-btn-takenoko:hover,
.faction-btn-takenoko:focus-visible {
  border-color: var(--green);
  background: rgba(109, 179, 63, 0.14);
}
.faction-btn:focus-visible {
  outline: none;
}
.faction-emoji {
  font-size: 44px;
  line-height: 1.2;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  width: max-content;
  max-width: calc(100vw - 32px);
  z-index: 120;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 999px;
  background: #f1f1f1;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
    z-index: 10001;
}
.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .site-header {
    padding: 0 16px;
  }
  .hero {
    padding: 130px 20px 40px;
    min-height: 56vh;
  }
  .hero-bg img {
    /* width: 78vw; */
    width: 100vw;
    margin: 0;
  }
  .row-title {
    padding: 0 20px;
    font-size: 17px;
    display: flex;
    align-items: center;
    flex-flow: row;
  }
  .row-scroller {
    padding: 10px 20px 22px;
  }
  .card {
    flex-basis: 150px;
  }
  .card--landscape {
    flex-basis: 240px;
  }
  .detail-body {
    padding: 20px 20px 32px;
  }
  .reaction-bar {
    grid-template-columns: 1fr;
  }
  .reaction-btn {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 18px;
  }
  .faction-options {
    grid-template-columns: 1fr;
  }
  .site-footer {
    padding: 24px 20px 40px;
    margin-bottom: 70px;
  }
}

/* ---------- mobile bottom tab bar ---------- */

.tab-bar {
  display: none;
}
.tab-item[data-nav="mypage"] {
  display: none;
}
@media (max-width: 640px) {
  .header-nav {
    /* display: none; */
  }
  .header-nav.header-nav--left,
  .header-nav .header-link {
    display: none;
  }
  .header-nav .header-link.faction-switch {
    display: block;
    min-height: 38px;
    padding: 6px 16px;
  }
  .site-header {
    padding: 0 16px;
  }
  .header-logo img {
    height: 32px;
  }
  .header-logo-text {
    font-size: 17px;
  }

  .tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    background: rgba(11, 11, 11, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tab-item {
    flex: 1;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* gap: 3px; */
    gap: 0;
    background: none;
    border: 0;
    color: #9a9a9a;
    font-size: 11px;
    cursor: pointer;
  }
  .tab-item .tab-label {
    line-height: 1.2;
  }
  .tab-item.is-active {
    color: var(--accent);
  }
  .tab-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }
  .tab-icon {
    font-size: 20px;
    line-height: 1;
  }

  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

/* ---------- opening video ---------- */

.opening-video {
  width: min(92vw, 960px);
  max-height: 78vh;
  object-fit: contain;
  background: #000;
  /* background: #1A1A1A; */
}

/* faction color emphasis on mobile tab bar */
@media (max-width: 640px) {
  .tab-bar {
    border-top: 2px solid var(--accent);
  }
  body[data-faction] .tab-bar {
    box-shadow: 0 -6px 18px -8px var(--accent);
  }
}

@media (max-width: 640px) {
  /* keep the toast above the fixed tab bar */
  .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

/* ---------- tab svg icons / avatar silhouettes / swap button ---------- */

.tab-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.avatar {
  border: 1px solid var(--accent);
}
.avatar img {
  height: 62%;
  width: auto;
  object-fit: contain;
}
.avatar-duo {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.avatar-duo img {
  height: 46%;
}

.btn-swap {
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 14px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
}

@media (max-width: 640px) {
  .opening-video {
    width: 130vw;
    height: 52vh;
    max-height: none;
    object-fit: contain;
  }
}

/* ---------- quick reactions (preset phrases) ---------- */

.reaction-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.reaction-btn--quick {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border-width: 1.5px;
}
.reaction-btn--quick .reaction-emoji {
  font-size: 20px;
}
.reaction-btn--quick .reaction-label {
  font-size: 14px;
}
.reaction-btn--quick .reaction-count {
  font-size: 16px;
  color: var(--text-dim, #9a9a9a);
}
.reaction-btn--quick.is-reacted {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.reaction-btn--quick.is-reacted .reaction-count {
  color: var(--accent);
}

/* faction silhouette in the mypage tab (color follows tab state) */
.tab-icon-sil {
  display: block;
  width: 20px;
  height: 22px;
  margin: 0 auto;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

/* faction-tinted tab bar background */
@media (max-width: 640px) {
  body[data-faction="kinoko"] .tab-bar {
    background: linear-gradient(to bottom, rgba(70, 56, 10, 0.97), rgba(42, 34, 7, 0.97));
  }
  body[data-faction="kinoko"] .tab-item {
    color: #cdbd8a;
  }
  body[data-faction="takenoko"] .tab-bar {
    background: linear-gradient(to bottom, rgba(38, 58, 20, 0.97), rgba(22, 35, 12, 0.97));
  }
  body[data-faction="takenoko"] .tab-item {
    color: #a9c78f;
  }
  body[data-faction] .tab-item.is-active {
    color: var(--accent);
  }
}

/* share button glyph */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.share-glyph {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- auto preview & episode list ---------- */

.detail-visual {
  position: relative;
  overflow: hidden;
}
.detail-visual-fg {
  animation: preview-zoom 16s ease-out forwards;
}
@keyframes preview-zoom {
  to {
    transform: scale(1.06);
  }
}

.preview-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #ddd;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  opacity: 0;
  animation: badge-in 0.5s ease 0.8s forwards;
}
@keyframes badge-in {
  to {
    opacity: 1;
  }
}

.ep-sec {
  margin-top: 26px;
}
.ep-sec-title {
  margin: 0 0 12px;
  font-size: 18px;
}
.ep-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ep-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.ep-item:hover {
  background: rgba(255, 255, 255, 0.09);
}
.ep-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ep-item.active {
  opacity: .7;
}
.ep-thumb {
  width: 108px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
}
.ep-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ep-title {
  font-weight: 700;
  font-size: 15px;
}
.ep-dur {
  font-size: 13px;
  color: var(--text-dim, #9a9a9a);
}
.ep-play {
  font-size: 14px;
  color: var(--text-dim, #9a9a9a);
  padding-right: 6px;
}
.ep-more {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-dim, #9a9a9a);
}

/* related shows in detail modal */
.related-sec {
  margin-top: 26px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.modal_bnr .modal_bnr_img {
  transition: transform 0.2s ease;
}

.related-card:hover .related-thumb,
.modal_bnr:hover .modal_bnr_img {
  transform: scale(1.04);
}
.related-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.related-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.2s ease;
}
.related-thumb--landscape {
  aspect-ratio: 16 / 10;
}
.related-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
@media (max-width: 720px) {
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .related-title {
    font-size: 12px;
  }
}

/* ---------- category view / header bell ---------- */

.category-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0 0 24px;
  overflow-x: hidden;
  width: max-content;
}
.category-chip {
  min-height: 44px;
  padding: 9px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.category-chip:hover {
  border-color: var(--text-dim, #9a9a9a);
}
.category-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.category-chips-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
  margin-bottom: 30px;
}

.header-bell {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  padding: 10px;
  cursor: pointer;
}
.header-bell svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 640px) {
  .header-bell {
    display: block;
  }
  .category-chips-wrap {
    overflow-x: auto;
    margin-bottom: 25px;
  }
}

/* ---------- about overlay (first visit) ---------- */

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: safe center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #171509, #0b0b0b 70%);
  overflow-y: auto;
}
.about-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 32px;
  max-width: 560px;
  text-align: center;
}
.about-logo {
  height: 84px;
  width: auto;
}
.about-text {
  margin: 0;
  min-height: 8.5em;
  max-width: 28em; /* line length in character units so any user text size wraps cleanly */
  font-size: 17px;
  line-height: 2.1;
  color: var(--text);
}
.about-text.is-in {
  animation: about-fade 0.6s ease;
}
@keyframes about-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.about-dots {
  /* display: flex; */
  display: none;
  gap: 8px;
}
.phone-panel .about-dots {
  display: flex;
  margin-bottom: 20px;
}
.about-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.about-dot.is-active {
  background: var(--accent);
}
@media (max-width: 640px) {
  .about-text {
    font-size: 13px;
  }
  .about-logo {
    height: 64px;
  }
}

/* avatar sizing fix: larger circle, clear margin around silhouette */
.avatar {
  width: 78px;
  height: 78px;
  flex: none;
}
.avatar img {
  height: 56%;
}
.avatar-duo img {
  height: 40%;
}

/* bolder faction tab bar (experiment: stronger tint) */
@media (max-width: 640px) {
  body[data-faction="kinoko"] .tab-bar {
    background: linear-gradient(to bottom, #7d5f0e, #4a3908);
  }
  body[data-faction="kinoko"] .tab-item {
    color: #e9d9a2;
  }
  body[data-faction="kinoko"] .tab-item.is-active {
    color: #fff;
  }
  body[data-faction="takenoko"] .tab-bar {
    background: linear-gradient(to bottom, #40691f, #274410);
  }
  body[data-faction="takenoko"] .tab-item {
    color: #cfe6b6;
  }
  body[data-faction="takenoko"] .tab-item.is-active {
    color: #fff;
  }
}

/* unify all cards to portrait 2:3 (landscape art center-cropped) */
.card--landscape {
  /* flex-basis: 190px; */
  flex-basis: calc(16.667% - 12px);
  aspect-ratio: 2 / 3;
}
@media (max-width: 720px) {
  .card--landscape {
    flex-basis: 150px;
  }
}
.related-thumb--landscape {
  aspect-ratio: 2 / 3;
}

/* about tweaks: larger logo, prev/next row */
.about-logo {
  height: 128px;
}
.about-nav {
  display: flex;
  gap: 12px;
}
@media (max-width: 640px) {
  .about-logo {
    height: 144px;
  }
}

/* subtle text links under mypage profile */
.mypage-links {
  display: flex;
  gap: 22px;
  margin: 12px 0 28px;
}
.text-link {
  background: none;
  border: 0;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-dim, #9a9a9a);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-link:hover {
  color: var(--accent);
}
.text-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* header icon group (sound toggle + bell, mobile) */
.header-icons {
  display: flex;
  align-items: center;
  display: none !important;
}
.snd-mute[hidden] {
  display: none;
}

/* row title links to its category listing */
.row-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.row-title-arrow {
  font-size: 12px;
  color: var(--text-dim, #9a9a9a);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.row-title-link:hover .row-title-arrow,
.row-title-link:focus-visible .row-title-arrow {
  opacity: 1;
  transform: none;
}
.row-title-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .row-title-arrow {
    opacity: 1;
    transform: none;
  }
}

/* ---------- netflix-style detail actions ---------- */

.detail-play {
  margin: 20px 0 16px;
}
.detail-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  font-size: 16px;
}
.detail-subactions {
  display: flex;
  gap: 20px;
  margin: 20px 0 4px;
}
.subaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 58px;
  padding: 6px 4px;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.subaction:hover {
  color: var(--accent);
}
.subaction:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.subaction-icon {
  font-size: 24px;
  line-height: 1;
}
.subaction .share-glyph {
  width: 24px;
  height: 24px;
}

/* sound toggle visible on PC too; icons sit right of nav */
.site-header {
  justify-content: flex-start;
}
@media (max-width: 720px) {
  .site-header {
    justify-content: space-between;
  }
}
.header-logo {
  margin-right: auto;
}
#sound-toggle {
  display: block;
}

/* faction modal: unified silhouette icons */
.faction-icon {
  display: block;
  height: 64px;
  width: auto;
  margin: 0 auto 10px;
}
.faction-btn-kinoko .faction-icon {
  filter: drop-shadow(0 0 12px rgba(245, 197, 24, 0.35));
}
.faction-btn-takenoko .faction-icon {
  filter: drop-shadow(0 0 12px rgba(109, 179, 63, 0.4));
}

/* fix: unselected avatar duo rendered at natural size (percent height had no basis) */
.avatar {
  overflow: hidden;
}
.avatar-duo {
  align-items: center;
  gap: 6px;
}
.avatar-duo img {
  height: 32px;
  width: auto;
}

/* orphan wrap fixes (2026-07-06 sweep) */
.row-title-link {
  /* white-space: nowrap; */
  word-break: break-all;
  text-align: left;
}
.related-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .ep-thumb {
    width: 92px;
  }
  .ep-title {
    font-size: 14px;
  }
}

/* avoid one-or-two character orphan lines where the browser supports it */
h1,
h2,
h3,
p,
.ep-title,
.reaction-label {
  text-wrap: pretty;
}

/* real demo video inside detail player */
.player--video {
  padding: 0;
  background: #000;
}
.player--video video {
  display: block;
  width: 100%;
  max-height: 62vh;
}

/* auto-playing muted preview in detail visual */
.detail-visual-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* keep share popup inside the viewport: anchor to the right edge of the button */
.share-pop {
  left: auto;
  right: 0;
}
.share-pop > *:nth-child(3) {
  display: none;
}
@media (max-width: 640px) {
  .share-pop {
    right: -8px;
  }
  .share-pop > *:nth-child(3) {
    display: flex;
  }
}

/* ---------- SP: fullscreen detail sheet with pinned video (netflix style) ---------- */

@media (max-width: 640px) {
  .modal {
    padding: 0;
  }
  .modal-panel {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    overflow: visible; /* required for position: sticky inside */
  }
  .detail-visual-wrap {
    /* position: sticky; */
    top: 0;
    z-index: 20;
    background: #000;
  }
  .detail-visual,
  .player {
    border-radius: 0;
  }
  .modal-close {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 30;
  }
}

/* overlay controls on the pinned preview */
.preview-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 10px;
}
.preview-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}
.preview-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}
.preview-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* hero "more info" button */
.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.more-glyph {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
}

/* ---------- comment section ---------- */

.comment-sec {
  margin-top: 26px;
}
.comment-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}
.comment-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.comment-text {
  margin: 0;
  font-size: 15px;
}
.comment-time {
  font-size: 12px;
  color: var(--text-dim, #9a9a9a);
  flex: none;
}
.comment-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.comment-input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  resize: none;
}
.comment-input:focus-visible {
  outline: 2px solid var(--accent);
}
.comment-submit {
  flex: none;
  align-self: flex-end;
  min-height: 44px;
}

/* keep 4 subaction labels on one line */
.subaction-label {
  white-space: nowrap;
}
.detail-subactions .choudo-btn,
.detail-subactions .share-wrap .subaction {
  flex-flow: wrap;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
}
.detail-subactions-wrap {
  /* overflow-x: auto; */
}
@media (max-width: 640px) {
  .detail-subactions .choudo-btn,
  .detail-subactions .share-wrap .subaction {
    font-size: 12px;
  }
  .detail-subactions {
  }
}
.detail-subactions .subaction-label {
}
.detail-subactions .subaction-cnt-label {
  background: linear-gradient(120deg, var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-left: 10px;
}

.detail-subactions .choudo-btn:hover,
.detail-subactions .share-wrap .subaction:hover {
  color: var(--text);
  opacity: 0.8;
}

@media (max-width: 640px) {
  .detail-subactions {
    gap: 16px;
    /* justify-content: space-between; */
    justify-content: flex-start;
    /* width: max-content; */
    margin-bottom: 10px;
  }
  .subaction {
    min-width: 0;
  }
  .subaction-label {
    font-size: 11px;
  }
}

/* inline silhouette inside the header faction button */
.sil-inline {
  display: inline-block;
  width: 15px;
  height: 17px;
  margin-right: 7px;
  vertical-align: -3px;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

/* left-aligned primary nav next to the logo */
.header-logo {
  margin-right: 0;
}
.header-nav--left {
  margin-left: 20px;
  margin-right: auto;
}

/* SP: pin sound/bell icons to the right edge */
@media (max-width: 640px) {
  .header-icons {
    margin-left: auto;
  }
}

/* CSS追記分 */
.faction-desc {
  font-size: 12px;
  margin-top: 35px;
}

.text-link#faction-later {
  background: none;
  border: 0;
  padding: 12px 0;
  font-size: 15px;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 10px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}
.text-link#faction-later:hover {
  opacity: 0.7;
}
.text-link#faction-later:focus-visible {
  outline: 10px solid var(--white);
  outline-offset: 10px;
}

/* 公式SNS */

.site-footer .election {
  width: 170px;
  position: absolute;
  right: 30px;
  bottom: 10px;
  z-index: 1;
  pointer-events: all;
  filter: drop-shadow(6px 6px 8px rgba(0, 0, 0, 0.2));
  animation: electionBadge 2s infinite alternate;
}
@media screen and (max-width: 750px) {
  .site-footer .election {
    width: 100vw;
    right: 0;
    bottom: -72px;
    filter: none;
    animation: none;
  }
}
.site-footer .election .list {
  display: flex;
  margin: 0;
  padding: 0;
}
.site-footer .election .list li {
  width: 50%;
  list-style: none;
}
@media screen and (hover: hover) and (pointer: fine) {
  .site-footer .election .list a {
    transition: opacity 0.3s;
  }
}
@media screen and (hover: hover) and (pointer: fine) {
  @supports (filter: brightness(100%)) {
    .site-footer .election .list a {
      transition-property: filter;
    }
  }
}
@media screen and (hover: hover) and (pointer: fine) {
  .site-footer .election .list a:hover {
    opacity: 0.8;
  }
}
@media screen and (hover: hover) and (pointer: fine) {
  @supports (filter: brightness(100%)) {
    .site-footer .election .list a:hover {
      filter: brightness(110%);
      opacity: 1;
    }
  }
}

.site-footer .election img {
  max-width: 100%;
  vertical-align: top;
}

@keyframes electionBadge {
  0% {
    transform: rotate(-5deg);
  }

  100% {
    transform: rotate(5deg);
  }
}

/* コンテンツ */
#links .card--landscape {
  aspect-ratio: 4 / 2;
  flex-basis: 23%;
}
@media (max-width: 720px) {
  #links .card--landscape {
    flex-basis: 70%;
  }
}

/* コメント非表示 */
.comment-sec .ep-sec-title,
.comment-sec .comment-list,
.comment-sec .comment-form {
  display: none !important;
}

/* ティザーサイト用 */
@font-face {
  font-family: "DIN_m";
  src:
    url("../assets/fonts/din-m.woff2") format("woff2"),
    url("../assets/fonts/din-m.woff") format("woff");
  font-weight: 500;
}
.opening_date,
.opening_coming {
  font-family: "DIN_m";
  letter-spacing: 0.2em;
}
.opening_date {
  font-size: 20px;
  margin-bottom: 10px;
}

.opening_coming {
  font-size: 30px;
  display: inline-block;
  position: relative;
}

.opening_coming::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: 105%;
  height: 45%;
  background: linear-gradient(90deg, #f5c518 0%, #cfdb33 50%, #7ecc4a 100%);
  filter: blur(15px);
  opacity: 0.5;
  z-index: -1;
}

/* OP ボタン */
.about-nav .btn-primary {
  min-height: 60px;
  padding: 12px 75px;
  background: linear-gradient(120deg, var(--yellow), var(--green));
}

/* ホーム画面追加用 */
#about-skip,
#phone-skip,
#change-btn {
  background: none;
  border: 0;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 10px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  opacity: 0.7;
  font-size: 12px;
  font-weight: 400;
}

.about-panel {
  padding: 32px 10px;
}

.phone-panel {
  display: none;
}

.phone-title {
  font-size: 22px;
  margin-bottom: 0;
  letter-spacing: 0.1em;
  font-weight: 500;
  position: relative;
}

#phone_panel .phone-title::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  width: 25%;
  height: 120%;
  background: linear-gradient(90deg, #f5c518 0%, #cfdb33 50%, #7ecc4a 100%);
  filter: blur(15px);
  opacity: 0.2;
  z-index: -1;
}

.phone-title .phone-choice-highlight {
  background: linear-gradient(90deg, var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.phone-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
  max-width: 560px;
  text-align: center;
}

.phone-logo {
  position: relative;
}

.phone-text span {
  display: block;
  font-size: 12px;
}

.phone-logo::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: 105%;
  height: 100%;
  background: linear-gradient(90deg, #f5c518 0%, #cfdb33 50%, #7ecc4a 100%);
  filter: blur(15px);
  opacity: 0.5;
  z-index: -1;
}

.phone-logo img {
  height: 128px;
}

.phone-nav {
  display: flex;
  gap: 12px;
  flex-flow: column;
}

.phone-nav .btn-lg {
  min-height: 70px;
  padding: 12px 40px;
  position: relative;
  font-size: 16px;
  letter-spacing: 0.05em;
}

.phone-nav .btn-lg::after {
  content: "";
  border: solid #ffffff;
  border-width: 0 1px 1px 0;
  display: inline-block;
  padding: 4px;
  position: absolute;
  top: 50%;
  transform: rotate(-45deg) translateY(-50%);
  right: 10px;
}

.phone-slide-img.is-in,
.phone-slide-text.is-in {
  animation: about-fade 0.6s ease;
}

.phone-slide-img img {
  height: 240px;
}

.phone-slide-text {
  display: flex;
  flex-flow: column;
  align-items: center;
  font-weight: 500;
  margin-bottom: 15px;
}

.phone-slide-text .phone-slide-text-highlight {
  background: linear-gradient(90deg, var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.links .row-title .row-accent {
  background: linear-gradient(120deg, var(--yellow), var(--green));
}

[data-faction="takenoko"] .links .row-title .row-accent,
[data-faction="kinoko"] .links .row-title .row-accent {
  background: var(--accent);
}


/*  */
.detail-visual-video .vjs-big-play-button {
  display: none !important;
}

/* プレビュー表示時はブライトコープ標準の再生ボタンやバーを隠す */
.detail-visual-video .vjs-big-play-button,
.detail-visual-video .vjs-control-bar {
  display: none !important;
}

/* 全画面になった時だけ標準バーを表示したい場合 */
.detail-visual-video.vjs-fullscreen .vjs-control-bar {
  display: flex !important;
}

/* 1. 操作バーの表示アニメーションを高速化（1秒 → 0.15秒に短縮） */
.main-video .vjs-control-bar {
  transition: opacity 0.15s ease-out, visibility 0.15s ease-out !important;
}

/* 2. スマホ特有の300msタップ遅延を解消する */
.main-video,
.main-video * {
  touch-action: manipulation; /* ダブルタップ拡大判定の待ち時間を無効化 */
}

/* 3. ボタンのタップ可能エリアを少し広げて押しやすくする（指での誤タップ防止） */
.main-video .vjs-button {
  min-width: 44px;
  min-height: 44px;
}