/* 哔咔漫画 bicac.monster — original design system */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+QingKe+HuangYou&display=swap");

:root {
  --ink: #14212b;
  --ink-soft: #3a4a56;
  --mist: #eef5f8;
  --paper: #f8fcfd;
  --aqua: #1b9aaa;
  --aqua-deep: #0f6f7c;
  --coral: #ef6f4c;
  --coral-hot: #e25530;
  --sun: #f4b942;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 40px rgba(20, 33, 43, 0.1);
  --radius: 22px;
  --nav-h: 64px;
  --dock-offset: 0px;
  --font-display: "ZCOOL QingKe HuangYou", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(27, 154, 170, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(239, 111, 76, 0.16), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(244, 185, 66, 0.12), transparent 60%),
    linear-gradient(180deg, #eaf4f7 0%, var(--mist) 40%, #f3f8fa 100%);
  background-attachment: fixed;
  line-height: 1.75;
  font-size: 16px;
  padding-bottom: var(--dock-offset);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--aqua-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral-hot);
}

.tome-wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* —— top promo —— */
.tome-promo {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(27, 154, 170, 0.12);
  padding: 12px 0 8px;
}

.tome-promo-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 8px;
}

.tome-ad-cell {
  width: 70px;
  text-align: center;
}

.tome-ad-cell img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(20, 33, 43, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tome-ad-cell a:hover img {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 22px rgba(20, 33, 43, 0.16);
}

.tome-ad-cap {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— navigation —— */
.tome-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(248, 252, 253, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20, 33, 43, 0.06);
}

.tome-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.tome-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.tome-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(27, 154, 170, 0.25);
}

.tome-brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.tome-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: rgba(27, 154, 170, 0.1);
  cursor: pointer;
  flex-shrink: 0;
}

.tome-burger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--aqua-deep);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.tome-burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.tome-burger.is-open span:nth-child(2) {
  opacity: 0;
}

.tome-burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.tome-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tome-menu a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

.tome-menu a:hover,
.tome-menu a.is-on {
  color: var(--aqua-deep);
}

@media (max-width: 860px) {
  .tome-burger {
    display: inline-flex;
  }

  .tome-nav {
    height: auto;
    min-height: var(--nav-h);
    align-items: stretch;
  }

  .tome-nav-inner {
    flex-wrap: wrap;
    row-gap: 0;
    padding: 10px 0;
    position: relative;
  }

  .tome-menu {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(27, 154, 170, 0.14);
    box-shadow: 0 12px 28px rgba(20, 33, 43, 0.1);
  }

  .tome-menu.is-open {
    display: flex;
  }

  .tome-menu li a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .tome-menu li a:hover,
  .tome-menu li a.is-on {
    background: rgba(27, 154, 170, 0.08);
  }
}

/* —— sticky download dock —— */
.tome-sticky-dock {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 35;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(239, 111, 76, 0.18);
  box-shadow: 0 8px 24px rgba(20, 33, 43, 0.08);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  padding: 8px 12px;
}

.tome-sticky-dock.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.tome-dock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(100%, var(--max));
  margin-inline: auto;
  justify-items: center;
}

.tome-dock-item img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(20, 33, 43, 0.1);
}

@media (min-width: 768px) {
  .tome-dock-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

main.tome-dock-pad {
  transition: padding-top 0.28s ease;
}

/* —— hero —— */
.tome-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 36px;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
}

.tome-hero::before {
  content: "";
  position: absolute;
  inset: -20% 20% auto -30%;
  height: 70%;
  background: conic-gradient(from 210deg, rgba(27, 154, 170, 0.22), rgba(239, 111, 76, 0.18), rgba(244, 185, 66, 0.12), transparent 70%);
  filter: blur(40px);
  animation: tome-drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.tome-hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -15%;
  width: 55%;
  height: 60%;
  background: radial-gradient(circle, rgba(27, 154, 170, 0.2), transparent 65%);
  animation: tome-pulse 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tome-drift {
  from {
    transform: translate(0, 0) rotate(0deg);
  }
  to {
    transform: translate(40px, 30px) rotate(12deg);
  }
}

@keyframes tome-pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.tome-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
}

.tome-hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}

.tome-hero-copy p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 36em;
}

.tome-hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--aqua-deep);
}

.tome-hero-mark img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.tome-hero-visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: #fff;
}

.tome-hero-visual img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
  animation: tome-float 6s ease-in-out infinite;
}

@keyframes tome-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (min-width: 900px) {
  .tome-hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
  .tome-hero-visual img {
    max-height: 560px;
  }
}

/* —— sections —— */
.tome-section {
  padding: 42px 0;
}

.tome-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  margin: 0 0 10px;
  line-height: 1.3;
}

.tome-section h3 {
  font-size: 1.15rem;
  margin: 1.4em 0 0.5em;
  color: var(--aqua-deep);
}

.tome-lead {
  color: var(--ink-soft);
  margin: 0 0 22px;
  max-width: 46em;
}

.tome-prose p {
  margin: 0 0 1em;
  text-align: justify;
  word-break: break-word;
}

.tome-prose p:last-child {
  margin-bottom: 0;
}

/* —— split layouts —— */
.tome-split {
  display: grid;
  gap: 22px;
  align-items: center;
  margin: 28px 0;
}

.tome-split.reverse .tome-split-media {
  order: -1;
}

@media (min-width: 800px) {
  .tome-split {
    grid-template-columns: 1fr 1fr;
  }
  .tome-split.reverse .tome-split-media {
    order: 0;
  }
  .tome-split.reverse .tome-split-text {
    order: -1;
  }
}

.tome-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.tome-frame img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 480px;
  object-fit: cover;
  object-position: top;
}

/* —— mosaic cards —— */
.tome-mosaic {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

@media (min-width: 700px) {
  .tome-mosaic {
    grid-template-columns: repeat(2, 1fr);
  }
  .tome-mosaic .tome-tile:nth-child(3) {
    grid-column: span 2;
  }
}

.tome-tile {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tome-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(20, 33, 43, 0.12);
}

.tome-tile h3 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.tome-tile img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 14px;
  aspect-ratio: 9 / 16;
  max-height: 360px;
  object-fit: cover;
  object-position: top;
}

/* —— ribbon strip —— */
.tome-ribbon {
  margin: 32px 0;
  padding: 28px 22px;
  border-radius: 28px;
  background: linear-gradient(125deg, rgba(27, 154, 170, 0.92), rgba(15, 111, 124, 0.95) 45%, rgba(239, 111, 76, 0.88));
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.tome-ribbon::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 60%);
  pointer-events: none;
}

.tome-ribbon h2,
.tome-ribbon h3 {
  color: #fff;
  position: relative;
  z-index: 1;
}

.tome-ribbon p {
  position: relative;
  z-index: 1;
  margin: 0 0 1em;
  opacity: 0.95;
}

.tome-ribbon a {
  color: #fff;
  font-weight: 700;
}

/* —— feature row —— */
.tome-pillars {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

@media (min-width: 720px) {
  .tome-pillars {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tome-pillar {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(27, 154, 170, 0.28);
}

.tome-pillar strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--coral-hot);
}

/* —— CTA band —— */
.tome-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.tome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tome-btn-coral {
  background: linear-gradient(135deg, var(--coral), var(--coral-hot));
  color: #fff;
  box-shadow: 0 10px 24px rgba(226, 85, 48, 0.28);
}

.tome-btn-coral:hover {
  color: #fff;
  transform: translateY(-2px);
}

.tome-btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--aqua-deep);
  border: 1px solid rgba(27, 154, 170, 0.35);
}

.tome-btn-ghost:hover {
  color: var(--coral-hot);
}

/* —— breadcrumb —— */
.tome-crumb {
  padding: 18px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.tome-crumb a {
  text-decoration: none;
}

.tome-crumb span {
  margin: 0 6px;
  opacity: 0.5;
}

/* —— legal pages —— */
.tome-legal {
  padding: 12px 0 48px;
}

.tome-legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 8px 0 16px;
}

.tome-legal h2 {
  font-size: 1.25rem;
  margin: 1.6em 0 0.6em;
  color: var(--aqua-deep);
  border-left: 4px solid var(--coral);
  padding-left: 12px;
}

.tome-legal p,
.tome-legal li {
  color: var(--ink-soft);
}

.tome-legal ul {
  padding-left: 1.2em;
}

/* —— status pages —— */
.tome-status {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 0;
}

.tome-status-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 7rem);
  line-height: 1;
  background: linear-gradient(120deg, var(--aqua), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}

.tome-status h1 {
  font-family: var(--font-display);
  margin: 8px 0 12px;
}

/* —— footer —— */
.tome-foot {
  margin-top: 40px;
  padding: 36px 0 28px;
  background: rgba(20, 33, 43, 0.92);
  color: rgba(255, 255, 255, 0.82);
}

.tome-foot a {
  color: #9ad7e0;
  text-decoration: none;
}

.tome-foot a:hover {
  color: #ffc4b5;
}

.tome-foot-grid {
  display: grid;
  gap: 22px;
}

@media (min-width: 700px) {
  .tome-foot-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.tome-foot h3 {
  font-family: var(--font-display);
  color: #fff;
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.tome-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tome-foot li {
  margin-bottom: 8px;
}

.tome-copy {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  opacity: 0.75;
  text-align: center;
}

/* —— reveal motion —— */
.tome-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.tome-reveal.is-in {
  opacity: 1;
  transform: none;
}

.tome-reveal.delay-1 {
  transition-delay: 0.08s;
}
.tome-reveal.delay-2 {
  transition-delay: 0.16s;
}
.tome-reveal.delay-3 {
  transition-delay: 0.24s;
}

/* —— gallery strip —— */
.tome-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 42%);
  gap: 12px;
  overflow-x: auto;
  padding: 8px 2px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.tome-gallery figure {
  margin: 0;
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.tome-gallery img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

.tome-gallery figcaption {
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .tome-gallery {
    grid-auto-flow: dense;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: unset;
    overflow: visible;
  }
}

/* —— timeline —— */
.tome-timeline {
  border-left: 3px solid rgba(27, 154, 170, 0.35);
  margin: 24px 0 24px 8px;
  padding-left: 18px;
}

.tome-timeline article {
  position: relative;
  margin-bottom: 22px;
}

.tome-timeline article::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(239, 111, 76, 0.2);
}

.tome-timeline h3 {
  margin: 0 0 6px;
  color: var(--ink);
}
