.hero {
  position: relative;
  padding-block: clamp(34px, 5vw, 62px) clamp(28px, 4vw, 50px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  width: 960px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.2), transparent 72%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-2);
  font-size: 12.5px;
  font-weight: 600;
}

.hero-badge b {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--g-brand);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  background: var(--g-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 46ch;
  margin-top: 16px;
  color: var(--fg-2);
  font-size: clamp(14.5px, 1.15vw, 16px);
  line-height: 1.9;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  display: grid;
  gap: 2px;
}

.hero-stats dt {
  color: var(--fg-3);
  font-size: 12px;
  font-weight: 600;
}

.hero-stats dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  color: var(--fg);
}

.hero-stats dd span {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
}

.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background: var(--surface-3);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 13, 0) 40%, rgba(8, 8, 13, 0.78) 100%);
}

.hero-media-note {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: #f2f1f9;
  font-size: 13px;
  font-weight: 700;
}

.hero-media-note .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 61, 104, 0.9);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.hero-media-note .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
  animation: pulse 1.8s infinite ease-in-out;
}

.hero-media-note small {
  color: rgba(242, 241, 249, 0.72);
  font-weight: 600;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  gap: clamp(13px, 1.8vw, 20px);
}

.grid-cards--wide {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.marquee-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 13px;
  color: var(--fg-2);
}

.marquee-bar b {
  color: var(--fg);
}

.marquee-bar .bar-tag {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 61, 104, 0.14);
  color: #ff8aa2;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.feature {
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-2) 100%);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.feature:hover {
  border-color: rgba(255, 61, 104, 0.35);
  transform: translateY(-3px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: rgba(255, 61, 104, 0.12);
  border: 1px solid rgba(255, 61, 104, 0.28);
  color: var(--brand);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature h3 {
  font-size: 15.5px;
}

.feature p {
  margin-top: 8px;
  color: var(--fg-2);
  font-size: 13.5px;
  line-height: 1.8;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.cal-day {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 12px 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.cal-day.is-today {
  border-color: rgba(255, 61, 104, 0.5);
  background: linear-gradient(180deg, rgba(255, 61, 104, 0.09), var(--surface) 45%);
}

.cal-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px dashed var(--line-2);
}

.cal-day-head b {
  font-size: 13.5px;
}

.cal-day-head span {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.cal-items {
  display: grid;
  gap: 8px;
}

.cal-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.cal-item img {
  flex: none;
  width: 39px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-3);
}

.cal-item-body {
  min-width: 0;
}

.cal-item-body a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
}

.cal-item-body a:hover {
  color: var(--brand);
}

.cal-item-body small {
  display: block;
  margin-top: 2px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11px;
}

.cal-empty {
  margin: auto 0;
  padding: 10px 0;
  color: var(--fg-3);
  font-size: 12px;
  line-height: 1.7;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px 22px;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 12px 9px 9px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.rank-row:hover {
  background: var(--surface);
  border-color: var(--line);
}

.rank-row img {
  flex: none;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-3);
}

.rank-no {
  flex: none;
  width: 22px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.rank-row:nth-child(1) .rank-no {
  color: var(--gold);
}

.rank-row:nth-child(2) .rank-no {
  color: #d5d7e6;
}

.rank-row:nth-child(3) .rank-no {
  color: #c98f5c;
}

.rank-body {
  min-width: 0;
  flex: 1;
}

.rank-body a {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-body a:hover {
  color: var(--brand);
}

.rank-body small {
  color: var(--fg-3);
  font-size: 12px;
}

.rank-score {
  flex: none;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.timeline {
  display: grid;
  gap: 0;
  border-left: 1px solid var(--line-2);
  margin-left: 6px;
  padding-left: 22px;
}

.timeline-item {
  position: relative;
  padding-block: 13px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-2);
}

.timeline-item:first-child::before {
  background: var(--g-brand);
  box-shadow: 0 0 0 3px rgba(255, 61, 104, 0.2);
}

.timeline-date {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.timeline-item p {
  margin-top: 3px;
  color: var(--fg-2);
  font-size: 13.5px;
}

.timeline-item a {
  font-weight: 700;
  color: var(--fg);
}

.timeline-item a:hover {
  color: var(--brand);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-group > span {
  color: var(--fg-3);
  font-size: 12.5px;
  font-weight: 700;
}

.filter-input {
  flex: 1 1 220px;
  min-width: 160px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 13.5px;
}

.filter-input:focus {
  outline: none;
  border-color: rgba(255, 61, 104, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 61, 104, 0.13);
}

.filter-sort {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 13.5px;
  cursor: pointer;
}

.results-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 14px;
  color: var(--fg-3);
  font-size: 13px;
}

.results-count b {
  color: var(--fg);
  font-family: var(--font-mono);
}

.empty-state {
  display: none;
  padding: 54px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--fg-2);
}

.empty-state.is-visible {
  display: block;
}

.empty-state b {
  display: block;
  margin-bottom: 6px;
  color: var(--fg);
  font-size: 15px;
}

.is-hidden {
  display: none !important;
}

.detail-top {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(22px, 3vw, 36px);
}

.detail-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface-3);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-headline h1 {
  font-size: clamp(23px, 3.2vw, 34px);
}

.detail-ja {
  margin-top: 8px;
  color: var(--fg-3);
  font-size: 13.5px;
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-2);
  font-size: 12.5px;
  font-weight: 600;
}

.meta-chip b {
  color: var(--fg);
  font-family: var(--font-mono);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-block {
  padding-block: clamp(24px, 3.4vw, 38px);
  border-top: 1px solid var(--line);
}

.detail-block:first-of-type {
  border-top: 0;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 18px;
}

.block-title::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 99px;
  background: var(--g-brand);
}

.prose p {
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.95;
}

.prose p + p {
  margin-top: 14px;
}

.prose strong {
  color: var(--fg);
}

.hl-list {
  display: grid;
  gap: 10px;
}

.hl-list li {
  position: relative;
  padding-left: 24px;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.85;
}

.hl-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--g-brand);
}

.ep-table td {
  vertical-align: middle;
}

.ep-no {
  font-family: var(--font-mono);
  color: var(--fg);
  font-weight: 700;
}

.ep-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.ep-mark:hover {
  color: var(--fg);
  border-color: var(--fg-3);
}

.ep-mark.is-on {
  background: rgba(55, 217, 155, 0.14);
  border-color: rgba(55, 217, 155, 0.5);
  color: var(--green);
}

.progress-track {
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--g-brand);
  transition: width 0.4s var(--ease);
}

.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.sub-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.sub-card h3 {
  font-size: 16px;
}

.sub-card p {
  flex: 1;
  color: var(--fg-2);
  font-size: 13.5px;
  line-height: 1.85;
}

.code-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
}

.code-line code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--fg);
  border-color: rgba(255, 61, 104, 0.45);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 44px);
  align-items: start;
}

.about-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.side-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.side-card h3 {
  font-size: 14.5px;
  margin-bottom: 10px;
}

.side-card dl {
  display: grid;
  gap: 9px;
  margin: 0;
  font-size: 13px;
}

.side-card dt {
  color: var(--fg-3);
}

.side-card dd {
  margin: 0 0 4px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  word-break: break-all;
}

.side-card dd a {
  color: var(--brand);
}

.error-page {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-block: clamp(60px, 10vw, 130px);
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(64px, 14vw, 132px);
  font-weight: 900;
  line-height: 1;
  background: var(--g-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  max-width: 48ch;
  color: var(--fg-2);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.pagination-note {
  margin-top: 26px;
  color: var(--fg-3);
  font-size: 13px;
  text-align: center;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(24px, 3.4vw, 38px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    radial-gradient(520px 220px at 8% -30%, rgba(255, 61, 104, 0.28), transparent 70%),
    radial-gradient(520px 240px at 96% 130%, rgba(139, 92, 246, 0.26), transparent 72%),
    var(--surface);
}

.cta h2 {
  font-size: clamp(20px, 2.6vw, 27px);
}

.cta p {
  max-width: 52ch;
  margin-top: 8px;
  color: var(--fg-2);
  font-size: 14px;
}

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

.split-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(18px, 2.6vw, 34px);
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    aspect-ratio: 16 / 9;
  }

  .calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .detail-top {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-side {
    position: static;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }
}

@media (max-width: 720px) {
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-cover {
    width: min(200px, 56%);
  }

  .rank-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .calendar-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
