.detail { max-width: 820px; margin: 0 auto; }

.dhero { position: relative; margin: -14px -16px 0; overflow: hidden; background: #141518; color: #fff; }
.dhero__bg {
  position: absolute; inset: -40px; width: calc(100% + 80px); max-width: none; height: calc(100% + 80px);
  object-fit: cover; filter: blur(22px); transform: scale(1.1);
}
.dhero::after { content: ''; position: absolute; inset: 0; background: rgba(20, 21, 24, .56); }
.dhero__in { position: relative; z-index: 1; display: flex; gap: 16px; padding: 16px 16px 46px; }
.dhero__poster {
  flex: none; width: 104px; height: 146px; border-radius: 8px;
  object-fit: cover; background: rgba(255, 255, 255, .08);
}
.dhero__poster.poster--none::after { border-left-color: rgba(255, 255, 255, .7); }
.dhero__text { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: 4px; }
.dhero__title { font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: .5px; overflow-wrap: anywhere; }
.dhero__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dhero__tags span {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; color: rgba(255, 255, 255, .88); background: rgba(255, 255, 255, .12);
}
.dhero__meta { margin-top: 9px; font-size: 13px; line-height: 18px; color: rgba(255, 255, 255, .66); }
.dhero__meta + .dhero__meta { margin-top: 4px; }
.dhero__pfs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 10px; }
.dhero__pf { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: rgba(255, 255, 255, .88); white-space: nowrap; }
.dhero__pf img { width: 18px; height: 18px; border-radius: 50%; }

.quick { position: relative; z-index: 2; display: flex; align-items: center; margin: -28px 0 12px; padding: 14px 0; }
.quick__item { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.quick__item + .quick__item::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 32px; margin-top: -16px; background: var(--line);
}
.quick__v { font-size: 16px; font-weight: 600; line-height: 22px; white-space: nowrap; }
.quick__v.num { font-size: 18px; font-weight: 700; }
.quick__v small { font-size: 14px; font-weight: 400; color: var(--ink-3); }
.quick__v--pending { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.quick__item > .grade { height: 22px; min-width: 30px; font-size: 14px; }
.quick__k { font-size: 12px; line-height: 16px; color: var(--ink-3); }

.idx {
  container-type: inline-size;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 8px; margin-top: 16px;
}
.idx__main { display: flex; align-items: center; gap: clamp(6px, 3cqi, 10px); }
.idx__num { font-size: clamp(36px, 16cqi, 52px); font-weight: 700; line-height: 1; letter-spacing: -.5px; }
.idx__side { display: flex; gap: clamp(10px, 5.5cqi, 20px); padding-bottom: 2px; }
.idx__stat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.idx__stat span { font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; }
.idx__stat b { display: flex; align-items: center; gap: 3px; font-size: clamp(15px, 5.8cqi, 18px); font-weight: 700; line-height: 22px; white-space: nowrap; }
.idx__stat b i { font-size: 9px; font-style: normal; }
.idx__stat .is-up { color: var(--heat-ink); }
.idx__stat .is-down { color: var(--cool); }
.idx__stat .is-flat { color: var(--ink-3); font-weight: 600; font-size: 15px; }
.idx__stat .is-new { color: var(--heat-ink); font-size: 15px; }

.bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.idx + .bar { margin-top: 18px; }
.bar__k { flex: none; width: 56px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.bar__track { flex: 1; height: 6px; overflow: hidden; border-radius: 3px; background: var(--fill); }
.bar__track i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.bar__v { flex: none; width: 30px; text-align: right; font-size: 14px; font-weight: 700; }

.sec__row {
  display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sec__row b { font-size: 15px; font-weight: 600; line-height: 22px; }
.sec__row span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.sec__row i {
  width: 6px; height: 6px; transform: rotate(45deg);
  border-top: 1.5px solid var(--ink-3); border-right: 1.5px solid var(--ink-3);
}

.heatrow {
  position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-areas: "logo name num" "logo sub sub";
  align-items: center; column-gap: 12px; row-gap: 3px; padding: 12px 0;
}
.sec__head + .heatrow { margin-top: 4px; }
.heatrow:last-child { padding-bottom: 0; }
.heatrow + .heatrow::before { content: ''; position: absolute; top: 0; left: 44px; right: 0; height: 1px; background: var(--line); }
.heatrow__logo { grid-area: logo; width: 32px; height: 32px; border-radius: 50%; }
.heatrow__name { grid-area: name; display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.heatrow__name b { font-size: 15px; font-weight: 600; line-height: 20px; }
.heatrow__name small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.heatrow__num { grid-area: num; font-size: 22px; font-weight: 700; line-height: 26px; white-space: nowrap; }
.heatrow__num small { margin-left: 1px; font-size: 14px; font-weight: 600; }
.heatrow__sub { grid-area: sub; display: flex; flex-wrap: wrap; gap: 0 6px; font-size: 12px; line-height: 17px; color: var(--ink-3); }
.heatrow__sub b { font-weight: 600; color: var(--ink-2); }
.heatrow__sub .is-up { color: var(--heat-ink); }
.heatrow__sub .is-down { color: var(--cool); }
.heatrow__sep { color: var(--ink-4); }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
.kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px; border-radius: var(--r-md); background: var(--bg); }
.kpi__k { font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; }
.kpi__v { font-size: 20px; font-weight: 700; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__s { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.kpi__s b { font-weight: 700; }
.kpi__s .is-up { color: var(--heat-ink); }
.kpi__s .is-down { color: var(--cool); }
.kpi__s .is-flat, .kpi__s .is-new { color: var(--ink-2); }

.superlv {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 700; vertical-align: middle;
}
.superlv--silver { background: var(--fill-2); color: var(--ink-2); }
.superlv--gold { background: var(--gold-bg); color: var(--gold); }
.superlv--diamond { background: var(--cool-tag); color: var(--cool-ink); }

.ptog { display: flex; gap: 4px; margin: -4px -3px -4px 0; }
.ptog__item {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 2px solid transparent; border-radius: 50%; opacity: .45; transition: opacity .15s, border-color .15s;
}
.ptog__item.is-active { border-color: var(--ink); opacity: 1; }
.ptog__item img { width: 22px; height: 22px; border-radius: 50%; }

.dateswitch {
  display: flex; gap: 6px; margin: 12px -16px 0; padding: 0 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
}
.dateswitch::-webkit-scrollbar { display: none; }
.dateswitch__item {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px; border-radius: 15px; background: var(--fill); white-space: nowrap;
  transition: background .15s, color .15s;
}
.dateswitch__tag { font-size: 13px; color: var(--ink-2); }
.dateswitch__date { font: 12px var(--num); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.dateswitch__item.is-active { background: var(--ink); }
.dateswitch__item.is-active .dateswitch__tag { color: var(--on); font-weight: 600; }
.dateswitch__item.is-active .dateswitch__date { color: color-mix(in srgb, var(--on) 65%, transparent); }

.sec .chart { margin-top: 14px; }
.segment--fill { display: flex; width: 100%; margin-top: 12px; }
.chartnote { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }

.synopsis { margin-top: 10px; font-size: 15px; line-height: 1.8; color: var(--ink-2); }

.rels {
  display: flex; gap: 10px; margin: 12px -16px 0; padding: 0 16px;
  overflow-x: auto; scrollbar-width: none;
}
.rels::-webkit-scrollbar { display: none; }
.rels > li { flex: none; width: 96px; }
.rel { display: flex; flex-direction: column; }
.rel__poster { width: 96px; height: 134px; border-radius: 8px; object-fit: cover; background: var(--fill); }
.rel__title {
  margin-top: 8px; font-size: 13px; font-weight: 600; line-height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rel__sub { font-size: 12px; line-height: 16px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 768px) {
  .dhero { margin: 0; border-radius: var(--r); }
  .dhero__in { gap: 24px; padding: 28px 28px 60px; }
  .dhero__poster { width: 128px; height: 180px; border-radius: 10px; }
  .dhero__title { font-size: 30px; }
  .dhero__tags { margin-top: 12px; }
  .quick { margin: -32px 20px 16px; padding: 18px 0; }
  .sec { margin-bottom: 16px; }
  .kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: auto; }
  .kpi { padding: 14px 16px; }
  .heatrow { column-gap: 14px; padding: 14px 0; }
  .heatrow + .heatrow::before { left: 46px; }
  .heatrow__num { font-size: 24px; }
  .dateswitch { margin: 14px 0 0; padding: 0; }
  .rels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; padding: 0; overflow: visible; }
  .rels > li { width: auto; }
  .rel__poster { width: 100%; height: auto; aspect-ratio: 96 / 134; }
  @media (hover: hover) {
    .ptog__item:not(.is-active):hover { opacity: .75; }
    .dateswitch__item:not(.is-active):hover { background: var(--fill-2); }
    .rel:hover .rel__title { color: var(--heat-ink); }
  }
}

@media (max-width: 359px) {
  .kpi__v { font-size: 17px; }
  .heatrow__num { font-size: 19px; }
}
