:root {
  --ink: #14110f;
  --paper: #fff8e7;
  --paper-strong: #ffe9a9;
  --coral: #e84638;
  --teal: #0d7f82;
  --cyan: #16c3bc;
  --violet: #5946a8;
  --line: #14110f;
  --muted: #5e5953;
  --shadow: 10px 10px 0 rgba(20, 17, 15, 0.22);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 16px 16px, rgba(20, 17, 15, 0.12) 1.5px, transparent 2px) 0 0 / 28px 28px,
    linear-gradient(135deg, #fff8e7 0%, #f7edd0 42%, #ffe4df 100%);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 3px solid var(--line);
  background: rgba(255, 248, 231, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.header-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--coral);
  color: #fff;
  box-shadow: 4px 4px 0 var(--line);
}

.header-links {
  gap: 10px;
}

.header-links a {
  min-width: 62px;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.header-links a:hover {
  border-color: var(--line);
  background: #fff;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.58fr);
  gap: clamp(20px, 4vw, 48px);
  min-height: calc(100svh - 70px);
  padding: clamp(38px, 6vw, 82px) clamp(18px, 4vw, 58px) 34px;
  overflow: hidden;
  border-bottom: 4px solid var(--line);
  background:
    linear-gradient(90deg, rgba(20, 17, 15, 0.92) 0%, rgba(20, 17, 15, 0.72) 35%, rgba(20, 17, 15, 0.1) 72%),
    url("assets/hero-manga-magazine.png") center right / cover no-repeat;
  color: #fff8e7;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -5vw 0 auto;
  width: min(44vw, 520px);
  height: 54px;
  border: 4px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0 12px, var(--paper-strong) 12px 24px);
  transform: skewX(-18deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 760px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: clamp(13px, 1.6vw, 15px);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 0.98;
  font-weight: 950;
}

.hero h1 {
  max-width: 9em;
  font-size: clamp(56px, 10vw, 132px);
  text-shadow: 6px 6px 0 var(--coral), 10px 10px 0 var(--line);
}

.hero-lede {
  max-width: 620px;
  margin: 28px 0 0;
  color: #fff4d2;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.65;
  font-weight: 700;
}

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

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 108px;
  padding: 10px 16px;
  border: 3px solid var(--line);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--line);
}

.button:focus-visible {
  outline: 4px solid var(--cyan);
  outline-offset: 3px;
}

.button-primary {
  background: var(--coral);
  color: #fff;
}

.button-ghost {
  background: #fff8e7;
  color: var(--ink);
}

.button-required {
  position: relative;
  min-width: 178px;
  background: var(--paper-strong);
  color: var(--ink);
  transform: scale(1.04);
}

.button-required::after {
  content: "!";
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  margin-left: 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 15px;
  line-height: 1;
}

.button-light {
  background: #fff;
  color: var(--ink);
}

.hero-notice {
  position: relative;
  z-index: 1;
  align-self: end;
  max-width: 440px;
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.notice-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper-strong);
  font-size: 13px;
  font-weight: 900;
}

.hero-notice p,
.section-heading p,
.link-card p,
.site-footer p {
  margin: 0;
  line-height: 1.72;
}

.link-section {
  padding: clamp(38px, 6vw, 76px) clamp(18px, 4vw, 58px);
}

.tips-section {
  padding: clamp(18px, 4vw, 42px) clamp(18px, 4vw, 58px) clamp(42px, 7vw, 86px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  gap: 18px clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: 28px;
}

.section-heading .kicker {
  grid-column: 1 / -1;
  color: var(--teal);
}

.section-heading h2 {
  font-size: clamp(38px, 6vw, 78px);
}

.section-heading h2 span {
  display: inline-flex;
  align-items: center;
  margin-left: 14px;
  padding: 8px 14px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 4px 4px 0 var(--line);
  color: #fff;
  font-size: clamp(18px, 2.2vw, 30px);
  vertical-align: middle;
}

.section-heading p {
  color: var(--muted);
  font-weight: 700;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.link-card {
  position: relative;
  min-height: 0;
  padding: 22px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 231, 0.95)),
    radial-gradient(circle at top right, rgba(22, 195, 188, 0.24), transparent 42%);
  box-shadow: var(--shadow);
}

.link-card.is-recommended {
  border-width: 4px;
  box-shadow: 12px 12px 0 rgba(232, 70, 56, 0.36);
}

.link-card:nth-child(2) {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 231, 0.95)),
    radial-gradient(circle at top right, rgba(232, 70, 56, 0.22), transparent 44%);
}

.link-card:nth-child(3) {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 231, 0.95)),
    radial-gradient(circle at top right, rgba(89, 70, 168, 0.22), transparent 44%);
}

.link-card:nth-child(4) {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 231, 0.95)),
    radial-gradient(circle at top right, rgba(255, 233, 169, 0.62), transparent 44%);
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0 0 18px;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 233, 169, 0.78), rgba(22, 195, 188, 0.28)),
    repeating-linear-gradient(45deg, rgba(20, 17, 15, 0.08) 0 8px, transparent 8px 16px);
}

.card-cover::before {
  content: "配图";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(20, 17, 15, 0.56);
  font-size: 24px;
  font-weight: 950;
}

.card-cover img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-index {
  width: 54px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  box-shadow: 4px 4px 0 var(--line);
  font-weight: 950;
}

.site-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 6px 12px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff8e7;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 14px;
  font-weight: 950;
}

.is-recommended .site-badge {
  background: var(--coral);
  color: #fff;
}

.link-card:nth-child(2) .card-index,
.link-card:nth-child(4) .card-index {
  background: var(--coral);
}

.link-card h3 {
  overflow-wrap: anywhere;
  margin: 0 0 12px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1;
}

.link-card p {
  color: var(--muted);
  font-weight: 700;
}

.card-actions {
  margin-top: 28px;
}

.tips-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.tip-panel {
  padding: clamp(20px, 3vw, 34px);
  border: 3px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.96);
  box-shadow: var(--shadow);
}

.notice-panel {
  display: flex;
  flex-direction: column;
}

.tip-panel p {
  margin: 0;
  line-height: 1.78;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
}

.notice-illustration {
  position: relative;
  margin: auto 0 0;
  padding-top: clamp(24px, 5vw, 46px);
}

.notice-illustration img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 7px 7px 0 rgba(20, 17, 15, 0.2);
}

.warm-panel {
  background:
    linear-gradient(135deg, rgba(255, 233, 169, 0.96), rgba(255, 248, 231, 0.96)),
    radial-gradient(circle at top right, rgba(232, 70, 56, 0.28), transparent 40%);
}

.warm-label {
  background: var(--coral);
  color: #fff;
}

.plugin-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.plugin-list li {
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
  line-height: 1.58;
  font-weight: 750;
}

.site-footer {
  padding: 24px clamp(18px, 4vw, 58px) 34px;
  border-top: 3px solid var(--line);
  background: var(--ink);
  color: #fff8e7;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(320px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: 5px 5px 0 var(--line);
  color: var(--ink);
  font-weight: 900;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.age-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 17, 15, 0.72);
  backdrop-filter: blur(6px);
}

.age-modal.is-visible {
  display: flex;
}

.age-dialog {
  width: min(560px, 100%);
  padding: clamp(22px, 4vw, 36px);
  border: 4px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.98), rgba(255, 233, 169, 0.98)),
    radial-gradient(circle at top right, rgba(232, 70, 56, 0.22), transparent 42%);
  box-shadow: 12px 12px 0 rgba(20, 17, 15, 0.38);
}

.age-dialog h2 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
}

.age-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.7;
}

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

.age-actions .button {
  flex: 1 1 170px;
}

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

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

  .notice-illustration {
    margin-top: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-notice {
    align-self: start;
  }
}

@media (max-width: 700px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
  }

  .header-links {
    width: 100%;
  }

  .header-links a {
    flex: 1;
  }

  .hero {
    padding-top: 42px;
    background:
      linear-gradient(180deg, rgba(20, 17, 15, 0.94) 0%, rgba(20, 17, 15, 0.74) 58%, rgba(20, 17, 15, 0.28) 100%),
      url("assets/hero-manga-magazine.png") center top / cover no-repeat;
  }

  .hero h1 {
    max-width: 6em;
    font-size: clamp(48px, 17vw, 76px);
    text-shadow: 4px 4px 0 var(--coral), 7px 7px 0 var(--line);
  }

  .hero-lede {
    font-size: 17px;
  }

  .section-heading,
  .link-grid {
    grid-template-columns: 1fr;
  }

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

  .link-card {
    min-height: 0;
  }

  .button {
    flex: 1 1 128px;
  }

  .notice-illustration img {
    max-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
