/* Targeted UX layer: document-like information surfaces without changing the game identity. */

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgb(255 107 181 / 85%);
  outline-offset: 4px;
}

.notion-page {
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 4%), transparent 45%),
    #15151b;
  box-shadow: 0 24px 70px rgb(0 0 0 / 28%);
}

.news-detail.notion-page {
  min-height: 320px;
  padding: clamp(1.4rem, 4vw, 2.7rem);
}

.news-detail[data-empty="true"] {
  min-height: 180px;
}

.news-detail[data-empty="true"] .notion-page-heading,
.news-detail[data-empty="true"] .notion-properties {
  display: none;
}

.notion-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.notion-page-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notion-page-status {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.25rem 0.62rem;
  border-radius: 999px;
  background: rgb(77 171 118 / 14%);
  color: #8bd6a8;
  font-size: 0.72rem;
  font-weight: 700;
}

.notion-page-status::before {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.notion-properties {
  margin: 0 0 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.notion-properties > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.3fr) 1fr;
  align-items: baseline;
  gap: 1rem;
}

.notion-properties dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.notion-properties dd.news-detail-date {
  margin: 0;
  color: var(--text);
  font-size: 0.85rem;
}

.news-detail-title {
  max-width: 24ch;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  letter-spacing: -0.025em;
}

.news-detail-body {
  max-width: 70ch;
}

.news-item {
  position: relative;
}

.news-item.is-active::before {
  position: absolute;
  top: 0.85rem;
  bottom: 0.85rem;
  left: -0.3rem;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.download-resource {
  padding: clamp(1.3rem, 4vw, 2rem);
}

.download-description {
  max-width: 62ch;
  margin: -0.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.notion-disclosure {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #15151b;
}

.notion-disclosure summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.3rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s var(--ease);
}

.notion-disclosure summary::-webkit-details-marker {
  display: none;
}

.notion-disclosure summary::before {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: rgb(255 255 255 / 5%);
  color: var(--accent-soft);
  content: "›";
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.2s var(--ease);
}

.notion-disclosure[open] summary::before {
  transform: rotate(90deg);
}

.notion-disclosure summary:hover {
  background: rgb(255 255 255 / 3%);
}

.notion-disclosure summary span {
  display: grid;
}

.notion-disclosure summary strong {
  color: var(--text);
  font-size: 1rem;
}

.notion-disclosure summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.notion-disclosure-content {
  padding: 0 1.3rem 1.4rem 3.8rem;
  border-top: 1px solid var(--line);
}

.notion-disclosure-content .download-list {
  padding-top: 1.2rem;
}

.download-list a[target="_blank"]:not(.social-icon)::after {
  margin-inline-start: 0.4em;
  color: var(--muted);
  content: "↗";
  font-size: 0.8em;
}

@media (max-width: 900px) {
  .section-news .container {
    padding-inline: 14px;
  }

  .section-news .section-head {
    margin-bottom: 1.25rem;
    padding-inline: 4px;
  }

  .news-layout {
    gap: 1rem;
  }

  .news-list {
    display: flex;
    overflow-x: auto;
    gap: 0.7rem;
    margin-inline: -14px;
    padding: 0.7rem 14px 1rem;
    border: 0;
    background: linear-gradient(90deg, rgb(255 255 255 / 3%), transparent);
    scrollbar-color: rgb(233 30 140 / 48%) transparent;
    scrollbar-width: thin;
    scroll-padding-inline: 14px;
    scroll-snap-type: x proximity;
  }

  .news-item {
    min-width: min(78vw, 318px);
    min-height: 104px;
    align-content: start;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgb(255 255 255 / 9%);
    border-radius: 14px;
    background: #121218;
    box-shadow: 0 12px 30px rgb(0 0 0 / 18%);
    scroll-snap-align: start;
  }

  .news-item-date {
    width: max-content;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgb(233 30 140 / 12%);
    font-size: 0.72rem;
  }

  .news-item-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.92rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .news-item.is-active {
    border-color: rgb(255 107 181 / 52%);
    background:
      linear-gradient(145deg, rgb(233 30 140 / 14%), transparent 55%),
      #15151b;
  }

  .news-item.is-active::before {
    inset: 0.75rem auto 0.75rem 0;
    width: 3px;
    height: auto;
  }

  .news-detail.notion-page {
    border-radius: 14px;
  }
}

@media (max-width: 560px) {
  .notion-page-heading {
    align-items: flex-start;
  }

  .news-detail.notion-page {
    min-height: 280px;
    padding: 1.1rem;
    box-shadow: 0 18px 45px rgb(0 0 0 / 24%);
  }

  .news-detail-title {
    max-width: none;
    font-size: clamp(1.35rem, 7vw, 1.8rem);
    line-height: 1.35;
  }

  .news-detail-body {
    font-size: 0.94rem;
    line-height: 1.8;
  }

  .news-detail-body p {
    margin-block: 0 1rem;
  }

  .notion-properties > div {
    grid-template-columns: 5.5rem 1fr;
  }

  .notion-disclosure-content {
    padding-left: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notion-disclosure summary::before {
    transition: none;
  }
}

.news-source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  color: #8fb9ff;
  font-weight: 700;
  text-decoration: none;
}

.news-source-link::after {
  content: "↗";
}

.news-source-link:hover,
.news-source-link:focus-visible {
  color: #fff;
  text-decoration: underline;
}
