/* 禁漫天堂 — 暖色暗色阅读器向，响应式 */
:root {
  --jm-bg: #14161c;
  --jm-surface: #1c2028;
  --jm-surface2: #242a34;
  --jm-line: #343b48;
  --jm-text: #f0e8e0;
  --jm-muted: #9a9aaa;
  --jm-fire: #ff6b35;
  --jm-fire-d: #e85a28;
  --jm-gold: #ffc857;
  --jm-ok: #5ecf8e;
  --jm-max: 1080px;
  --jm-r: 14px;
  --jm-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--jm-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--jm-text);
  background: var(--jm-bg);
}

a {
  color: #ffb89a;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.jm-wrap {
  width: min(100% - 26px, var(--jm-max));
  margin-inline: auto;
}

/* 顶栏：底边火焰线 */
.jm-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(20, 22, 28, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--jm-fire);
}

.jm-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
}

.jm-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.jm-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--jm-fire), var(--jm-gold));
  color: #1a0f08;
  font-weight: 900;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.jm-brand h1 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.jm-brand small {
  display: block;
  font-size: 0.7rem;
  color: var(--jm-muted);
  margin-top: 2px;
}

.jm-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  max-width: 100%;
  scrollbar-width: thin;
}

.jm-scroll a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--jm-surface2);
  border: 1px solid var(--jm-line);
  color: var(--jm-text);
  text-decoration: none;
}
.jm-scroll a:hover {
  border-color: var(--jm-fire);
  text-decoration: none;
}
.jm-scroll a.on {
  background: var(--jm-fire);
  border-color: var(--jm-fire);
  color: #1a0f08;
}

/* 首屏：左文右封 */
.jm-hero {
  padding: 26px 0 8px;
  background: radial-gradient(ellipse 80% 60% at 80% -10%, rgba(255, 107, 53, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 0% 20%, rgba(255, 200, 87, 0.08), transparent);
}

.jm-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: center;
}

@media (min-width: 860px) {
  .jm-hero-grid {
    grid-template-columns: 1fr 340px;
    gap: 36px;
  }
}

.jm-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--jm-gold);
  margin-bottom: 8px;
}

.jm-hero h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  line-height: 1.22;
  font-weight: 800;
}

.jm-hero-lead {
  margin: 0 0 18px;
  color: var(--jm-muted);
  font-size: 0.94rem;
}

.jm-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.jm-btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}
.jm-btn-p {
  background: var(--jm-fire);
  color: #1a0f08;
}
.jm-btn-p:hover {
  background: var(--jm-fire-d);
  color: #1a0f08;
  text-decoration: none;
}
.jm-btn-g {
  background: var(--jm-surface2);
  border: 1px solid var(--jm-line);
  color: var(--jm-text);
}
.jm-btn-g:hover {
  border-color: var(--jm-fire);
  text-decoration: none;
}

.jm-cover {
  border-radius: calc(var(--jm-r) + 4px);
  overflow: hidden;
  border: 1px solid var(--jm-line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  background: var(--jm-surface);
}

.jm-cover img {
  border-radius: 0;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 420px;
  object-fit: cover;
  margin: 0 auto;
}

.jm-cover figcaption {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--jm-muted);
  border-top: 1px solid var(--jm-line);
}

/* 主体：左 spine 装饰 + 右内容 */
.jm-page {
  padding: 18px 0 44px;
}

.jm-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 880px) {
  .jm-columns {
    grid-template-columns: 8px minmax(0, 1fr) 260px;
    gap: 18px;
    align-items: start;
  }
}

.jm-spine {
  display: none;
  background: linear-gradient(180deg, var(--jm-fire), var(--jm-gold));
  border-radius: 4px;
  min-height: 120px;
}

@media (min-width: 880px) {
  .jm-spine {
    display: block;
  }
}

.jm-maincol {
  min-width: 0;
}

.jm-sidecol {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jm-card {
  background: var(--jm-surface);
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-r);
  padding: 14px 16px;
}

.jm-card h3 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--jm-muted);
  font-weight: 700;
}

.jm-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jm-card li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--jm-line);
  font-size: 0.86rem;
}

.jm-card li:last-child {
  border-bottom: 0;
}

.jm-card a {
  color: var(--jm-text);
  font-weight: 600;
}

/* 长文 */
.jm-k {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--jm-fire);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.jm-maincol h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.jm-lead {
  margin: 0 0 16px;
  color: var(--jm-muted);
  font-size: 0.92rem;
}

.jm-article {
  background: var(--jm-surface);
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-r);
  padding: 20px 18px 22px;
  font-size: 0.94rem;
  color: #d4d0cc;
}

.jm-article p {
  margin: 0 0 1em;
  text-align: justify;
  text-justify: inter-ideograph;
}

.jm-article p:last-of-type {
  margin-bottom: 0;
}

.jm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.jm-tags span {
  font-size: 0.73rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--jm-surface2);
  border: 1px solid var(--jm-line);
  color: var(--jm-muted);
}

/* 卡片墙 */
.jm-sec {
  margin-top: 30px;
}

.jm-sec h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.jm-sec .jm-sub {
  margin: 0 0 14px;
  color: var(--jm-muted);
  font-size: 0.86rem;
}

.jm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 540px) {
  .jm-grid.g2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 820px) {
  .jm-grid.g3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.jm-tile {
  background: var(--jm-surface);
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s;
}
.jm-tile:hover {
  border-color: rgba(255, 107, 53, 0.45);
}

.jm-tile a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.jm-tile a:hover h3 {
  color: var(--jm-fire);
}

.jm-tile img {
  border-radius: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.jm-tile .in {
  padding: 12px 14px 16px;
  flex: 1;
}

.jm-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(255, 107, 53, 0.2);
  color: var(--jm-fire);
  margin-bottom: 6px;
  display: inline-block;
}

.jm-tile h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.jm-tile p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--jm-muted);
}

/* 内页 */
.jm-crumb {
  font-size: 0.84rem;
  color: var(--jm-muted);
  padding: 16px 0 6px;
}

.jm-h1 {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.jm-sum {
  color: var(--jm-muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
}

.jm-fig {
  border-radius: var(--jm-r);
  overflow: hidden;
  border: 1px solid var(--jm-line);
  margin-bottom: 20px;
  background: var(--jm-surface);
}

.jm-fig img {
  border-radius: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.jm-fig figcaption {
  padding: 8px 12px;
  font-size: 0.76rem;
  color: var(--jm-muted);
}

.jm-rows {
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-r);
  overflow: hidden;
  background: var(--jm-surface);
}

.jm-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--jm-line);
}

@media (min-width: 600px) {
  .jm-row {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }
}

.jm-row:last-child {
  border-bottom: 0;
}

.jm-row a.t {
  font-weight: 700;
  color: var(--jm-text);
  text-decoration: none;
}
.jm-row a.t:hover {
  color: var(--jm-fire);
}

.jm-row .m {
  font-size: 0.8rem;
  color: var(--jm-muted);
}

.jm-row .f {
  font-size: 0.75rem;
  color: var(--jm-ok);
  font-weight: 700;
  white-space: nowrap;
}

.jm-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-bottom: 36px;
}

@media (min-width: 720px) {
  .jm-entry {
    grid-template-columns: minmax(0, 260px) 1fr;
  }
}

.jm-note {
  background: var(--jm-surface);
  border: 1px solid var(--jm-line);
  border-radius: var(--jm-r);
  padding: 16px;
  font-size: 0.88rem;
  color: var(--jm-muted);
}

.jm-note h2 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--jm-gold);
}

.jm-foot {
  border-top: 1px solid var(--jm-line);
  padding: 22px 0;
  background: #0e1014;
}

.jm-foot p {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--jm-muted);
}

.jm-skip {
  position: absolute;
  left: -9999px;
  background: var(--jm-fire);
  color: #1a0f08;
  padding: 8px 12px;
  z-index: 100;
}
.jm-skip:focus {
  left: 8px;
  top: 8px;
}
