:root {
  color-scheme: light;
  --bg: #eef7fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --text: #102033;
  --muted: #5f7188;
  --soft: #24384f;
  --line: rgba(78, 116, 152, 0.16);
  --cyan: #0ca6c7;
  --periwinkle: #4078df;
  --violet: #7b61d8;
  --shadow: rgba(35, 101, 140, 0.12);
  --content: min(1180px, calc(100vw - 4px));
  --main-column: 760px;
  --feed-ad-height: 120px;
  --side-ad-width: 250px;
  --side-ad-height: 250px;
  --font-sans: "Inter", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse at 16% 12%, rgba(12, 166, 199, 0.16), transparent 30rem),
    radial-gradient(ellipse at 86% 8%, rgba(123, 97, 216, 0.12), transparent 34rem),
    radial-gradient(ellipse at 70% 78%, rgba(64, 120, 223, 0.12), transparent 36rem),
    linear-gradient(180deg, #f6fbff 0%, #eef7fb 48%, #f8fbf8 100%);
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: -2;
  background-image:
    radial-gradient(circle, rgba(19, 61, 100, 0.1) 0 0.68px, transparent 1.12px),
    radial-gradient(circle, rgba(12, 166, 199, 0.1) 0 0.86px, transparent 1.4px),
    radial-gradient(circle, rgba(123, 97, 216, 0.08) 0 0.78px, transparent 1.32px);
  background-position: 22px 28px, 98px 68px, 164px 112px;
  background-size: 126px 148px, 232px 218px, 342px 316px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 82%);
}

body::after {
  z-index: -1;
  opacity: 0.72;
  background:
    linear-gradient(98deg, transparent 2%, rgba(12, 166, 199, 0.08) 18%, rgba(64, 120, 223, 0.1) 39%, rgba(123, 97, 216, 0.08) 54%, rgba(58, 152, 126, 0.07) 72%, transparent 96%);
  filter: blur(24px);
  transform: translateY(16vh) rotate(-7deg) scaleX(1.2);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

::selection {
  color: #ffffff;
  background: var(--cyan);
}

.archive-shell {
  width: var(--content);
  margin: 0 auto;
  padding: 22px 0 56px;
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--main-column)) var(--side-ad-width);
  gap: 4px;
  align-items: start;
  justify-content: start;
}

.archive-main {
  width: 100%;
  max-width: var(--main-column);
  min-width: 0;
}

.archive-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  flex: 0 0 var(--side-ad-width);
  width: var(--side-ad-width);
  min-width: var(--side-ad-width);
  max-width: var(--side-ad-width);
  height: var(--side-ad-height);
  min-height: var(--side-ad-height);
  max-height: var(--side-ad-height);
  overflow: hidden;
}

.ad-slot {
  width: 100%;
  overflow: hidden;
}

.ad-slot > div:first-child {
  width: 100%;
  height: 100%;
}

.ad-slot iframe {
  display: block;
  max-width: 100%;
}

.ad-slot--feed {
  height: var(--feed-ad-height);
  margin: 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ad-slot--list-top {
  width: 100%;
  max-width: 100%;
}

.ad-slot--list-top-fluid {
  height: auto;
  min-height: 0;
  margin: 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ad-slot--feed > div:first-child,
.ad-slot--feed iframe {
  width: 100% !important;
  height: var(--feed-ad-height) !important;
}

.ad-slot--list-top-fluid > div:first-child {
  height: auto;
  min-height: 0;
}

.ad-slot--list-top-fluid iframe {
  height: auto;
  max-height: none;
}

.ad-slot--list-mid,
.ad-slot--grid-mid {
  margin: 6px 0;
}

.ad-slot--grid-mid {
  grid-column: 1 / -1;
}

.ad-slot--detail-title {
  margin-bottom: 24px;
}

.ad-slot--side {
  width: var(--side-ad-width);
  min-width: var(--side-ad-width);
  max-width: var(--side-ad-width);
  height: var(--side-ad-height);
  min-height: var(--side-ad-height);
  max-height: var(--side-ad-height);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ad-slot--side > div:first-child,
.ad-slot--side iframe {
  width: var(--side-ad-width) !important;
  height: var(--side-ad-height) !important;
}

.ad-slot--detail-side {
  flex: 0 0 auto;
}

.ad-slot--mobile-screen {
  display: none;
}

.ad-slot__screen-body {
  width: min(78vw, 360px);
  height: min(86vh, 640px);
  max-height: calc(100vh - 84px);
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(5, 16, 32, 0.34);
}

.ad-slot__screen-body > div {
  width: 100%;
  height: 100%;
}

.ad-slot__close {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  z-index: 1;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 0 12px;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  background: rgba(16, 32, 51, 0.62);
  backdrop-filter: blur(10px);
}

.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  margin-bottom: clamp(34px, 7vw, 76px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 44px;
}

.brand img {
  display: block;
  width: clamp(104px, 10vw, 128px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

.brand-topic {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-left: 1px solid rgba(78, 116, 152, 0.22);
  padding-left: 14px;
  color: #17314b;
  font-size: 20px;
  font-weight: 750;
  line-height: 1;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.top-nav a,
.back-link {
  border: 1px solid rgba(78, 116, 152, 0.18);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 26px rgba(35, 101, 140, 0.08);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.top-nav a:hover,
.back-link:hover {
  color: #0b6075;
  border-color: rgba(12, 166, 199, 0.32);
  background: rgba(236, 251, 255, 0.94);
}

.hero {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0;
  color: #0b8ca8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.detail-title {
  margin: 0;
  color: #102033;
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 760;
  line-height: 1.03;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.archive-meta {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.row,
.card,
.detail-panel,
.empty {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 255, 0.9));
  box-shadow: 0 18px 50px rgba(35, 101, 140, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  padding: 18px 20px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.row > div:first-child {
  min-width: 0;
}

.row:hover,
.card:hover {
  border-color: rgba(12, 166, 199, 0.34);
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ffffff, #effbff);
  box-shadow: 0 22px 58px rgba(35, 101, 140, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.title {
  margin-bottom: 7px;
  color: #132c45;
  font-weight: 750;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.sub,
.snippet,
.summary,
.views,
.foot,
.meta {
  color: var(--muted);
}

.sub,
.snippet,
.summary {
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.snippet {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.views {
  font-size: 13px;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  overflow: hidden;
  border-radius: 18px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  color: var(--muted);
  background: linear-gradient(135deg, #e9f6fb, #f4f0ff);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.body {
  padding: 16px;
}

.summary {
  min-height: 48px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
}

.empty {
  border-style: dashed;
  border-radius: 18px;
  padding: 44px 22px;
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(35, 101, 140, 0.08);
}

.pagination a:hover,
.pagination .active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #0ca6c7, #4078df);
}

.detail-shell {
  width: var(--content);
}

.detail-panel {
  border-radius: 22px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-title {
  margin-bottom: 14px;
  font-size: clamp(30px, 5vw, 52px);
}

.meta {
  display: flex;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  font-size: 14px;
}

.source {
  color: #0b8ca8;
}

.lyrics,
.content {
  color: var(--soft);
  font-size: 16px;
  line-height: 1.9;
}

.lyrics {
  min-height: 220px;
  border: 1px solid rgba(78, 116, 152, 0.14);
  border-radius: 18px;
  padding: 22px;
  white-space: pre-wrap;
  background: linear-gradient(180deg, #f8fcff, #f2f8fb);
}

.content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(35, 101, 140, 0.16);
}

.content p {
  margin: 0 0 16px;
}

@media (max-width: 1160px) {
  :root {
    --side-ad-width: 250px;
    --side-ad-height: 250px;
  }

  .archive-layout {
    grid-template-columns: minmax(0, 1fr) var(--side-ad-width);
    gap: 16px;
  }
}

@media (max-width: 720px) {
  .archive-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 16px;
  }

  .archive-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .archive-sidebar {
    display: none;
  }

  .ad-slot--feed {
    height: var(--feed-ad-height);
  }

  html.is-mobile-device .ad-slot--mobile-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 56px 18px 24px;
    overflow: hidden;
    background: rgba(16, 32, 51, 0.58);
    backdrop-filter: blur(8px);
  }

  .ad-slot__screen-body {
    width: min(78vw, 360px);
    height: min(86vh, 640px);
  }

  .site-top {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 40px;
  }

  .brand {
    gap: 12px;
  }

  .brand img {
    width: 96px;
  }

  .brand-topic {
    min-height: 28px;
    padding-left: 12px;
    font-size: 18px;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .views {
    white-space: normal;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .foot {
    flex-direction: column;
  }

  .detail-panel {
    border-radius: 18px;
    padding: 20px;
  }

  .lyrics {
    padding: 16px;
  }
}
