:root {
  --ink: #302957;
  --muted: #77758e;
  --blue: #56c8e8;
  --blue-deep: #6254ad;
  --blue-soft: #e9f9fd;
  --pink: #e98abb;
  --pink-soft: #fdeaf4;
  --cream: #fffdfb;
  --white: #ffffff;
  --line: #e8eaf3;
  --shadow: 0 22px 60px rgba(63, 75, 122, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcff;
  font-family:
    "Avenir Next", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
    sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input[type="range"] {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  pointer-events: none;
  z-index: -2;
}

.ambient-one {
  width: 480px;
  height: 480px;
  top: -240px;
  right: -140px;
  background: rgba(111, 211, 235, 0.3);
}

.ambient-two {
  width: 380px;
  height: 380px;
  left: -220px;
  top: 480px;
  background: rgba(241, 166, 204, 0.34);
}

.site-header {
  width: min(1180px, calc(100% - 48px));
  min-height: 88px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 20;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  opacity: 0.55;
  background: linear-gradient(90deg, transparent, var(--blue), var(--pink), transparent);
}

body:not(.manage-mode) .site-header {
  grid-template-columns: 1fr auto auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 41px;
  height: 41px;
  border-radius: 50% 50% 18px 18px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #413775, #6a5db2);
  box-shadow: 0 8px 20px rgba(75, 61, 135, 0.25);
}

.brand-mark svg {
  width: 25px;
}

.brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 4px;
  letter-spacing: -0.04em;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
}

.brand small {
  color: var(--pink);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.collection-counts {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 12px;
  color: var(--muted);
  border: 1px solid rgba(98, 84, 173, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  backdrop-filter: blur(12px);
}

.collection-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.random-dice-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  color: #6557a8;
  border: 1px solid rgba(98, 84, 173, 0.13);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 248, 253, 0.84));
  box-shadow: 0 8px 22px rgba(74, 62, 128, 0.1);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.random-dice-button:hover {
  color: #d56eaa;
  transform: translateY(-2px) rotate(-3deg);
  box-shadow: 0 11px 25px rgba(95, 76, 157, 0.17);
}

.random-dice-button:active {
  transform: translateY(0) scale(0.94);
}

.random-dice-button:disabled {
  cursor: wait;
}

.random-dice-button svg {
  width: 31px;
  height: 31px;
  overflow: visible;
}

.random-dice-button .dice-cube {
  fill: rgba(238, 232, 250, 0.9);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.random-dice-button circle {
  fill: currentColor;
  stroke: none;
}

.random-dice-button .dice-spark {
  fill: #69cce6;
  stroke: none;
}

.random-dice-button .dice-spark-two {
  fill: #ec91c1;
}

.random-roll-overlay[hidden] {
  display: none;
}

.random-roll-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #4a407f;
  background: rgba(244, 247, 255, 0.7);
  backdrop-filter: blur(13px) saturate(1.08);
  opacity: 0;
  pointer-events: all;
}

.random-roll-overlay.is-rolling {
  animation: random-overlay-in 260ms ease forwards;
}

.random-roll-overlay.is-revealing {
  animation: random-overlay-out 340ms ease forwards;
}

.random-roll-aura {
  width: 150px;
  height: 150px;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 18%, rgba(105, 204, 230, 0.42) 38%, rgba(236, 145, 193, 0.25) 58%, transparent 72%);
  transform: translate(-50%, -58%);
  animation: random-aura 900ms ease-in-out infinite alternate;
}

.random-roll-die {
  width: 68px;
  height: 68px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
  padding: 12px;
  border: 2px solid rgba(98, 84, 173, 0.32);
  border-radius: 21px;
  background: linear-gradient(145deg, #fff, #e9f8fc 48%, #f8e6f1);
  box-shadow:
    0 18px 42px rgba(64, 51, 118, 0.22),
    inset 0 0 0 4px rgba(255, 255, 255, 0.6);
  animation: random-die-roll 900ms cubic-bezier(.3, .8, .3, 1) infinite;
}

.random-roll-die::before,
.random-roll-die::after {
  content: "✦";
  position: absolute;
  color: #6bcde6;
  font-size: 17px;
  animation: random-spark 650ms ease-in-out infinite alternate;
}

.random-roll-die::before {
  top: -25px;
  right: -23px;
}

.random-roll-die::after {
  bottom: -22px;
  left: -25px;
  color: #e783b9;
  animation-delay: -320ms;
}

.random-roll-die span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg, #60539f, #d675aa);
  box-shadow: 0 2px 5px rgba(65, 52, 119, 0.2);
}

.random-roll-die .top-left { grid-area: 1 / 1; }
.random-roll-die .top-right { grid-area: 1 / 3; }
.random-roll-die .middle-left { grid-area: 2 / 1; }
.random-roll-die .center { grid-area: 2 / 2; }
.random-roll-die .middle-right { grid-area: 2 / 3; }
.random-roll-die .bottom-left { grid-area: 3 / 1; }
.random-roll-die .bottom-right { grid-area: 3 / 3; }

.random-roll-overlay p {
  position: relative;
  margin: 30px 0 5px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.random-roll-overlay small {
  position: relative;
  color: #b36f9b;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

@keyframes random-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes random-overlay-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.035); }
}

@keyframes random-die-roll {
  0% { transform: translateY(8px) rotate(-14deg) scale(0.9); }
  45% { transform: translateY(-11px) rotate(165deg) scale(1.05); }
  100% { transform: translateY(8px) rotate(346deg) scale(0.9); }
}

@keyframes random-aura {
  from { opacity: 0.72; transform: translate(-50%, -58%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -58%) scale(1.16); }
}

@keyframes random-spark {
  from { opacity: 0.35; transform: scale(0.7) rotate(0); }
  to { opacity: 1; transform: scale(1.15) rotate(25deg); }
}

.collection-counts div {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.collection-counts strong {
  color: var(--blue-deep);
  font-family: Georgia, serif;
  font-size: 16px;
}

.collection-counts i {
  width: 1px;
  height: 18px;
  background: #e6def0;
}

.main-nav {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(226, 229, 240, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(64, 72, 112, 0.06);
}

.nav-button,
.manage-button {
  border: 0;
  cursor: pointer;
  transition: 180ms ease;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  color: var(--muted);
  background: transparent;
  border-radius: 999px;
  font-size: 13px;
}

.nav-button svg {
  width: 17px;
}

.nav-button.active {
  color: white;
  background: var(--white);
  background: linear-gradient(110deg, #5b50a7, #6c65b7);
  box-shadow: 0 5px 16px rgba(73, 60, 135, 0.2);
}

.manage-button {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 17px;
  color: white;
  background: linear-gradient(110deg, #e787b8, #dd77aa);
  border-radius: 13px;
  font-size: 13px;
  box-shadow: 0 9px 24px rgba(211, 102, 159, 0.22);
}

.manage-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(34, 36, 58, 0.24);
}

.manage-button svg {
  width: 16px;
}

main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  min-height: 500px;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  padding: 42px 48px 55px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(230, 232, 242, 0.9);
  border-radius: 34px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.82)),
    radial-gradient(circle at 70% 30%, #e5efff, transparent 42%);
  box-shadow: 0 24px 70px rgba(60, 73, 118, 0.09);
}

.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: 8%;
  top: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 223, 237, 0.7), transparent 68%);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--blue-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow span {
  width: 27px;
  height: 1px;
  background: var(--blue);
}

.hero h1 {
  margin: 25px 0 20px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1.25;
  letter-spacing: -0.06em;
  font-weight: 500;
}

.hero h1 em {
  color: var(--blue-deep);
  font-style: normal;
  position: relative;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink-soft);
  z-index: -1;
  transform: rotate(-1deg);
}

.hero-description {
  width: min(450px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
}

.hero-stats div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero-stats strong {
  font-family: Georgia, serif;
  font-size: 30px;
  color: var(--ink);
}

.hero-stats span {
  color: var(--muted);
  font-size: 12px;
}

.hero-stats i {
  width: 1px;
  height: 26px;
  background: var(--line);
}

.hero-art {
  min-height: 390px;
  position: relative;
  z-index: 2;
}

.book-card {
  position: absolute;
  border-radius: 8px 18px 18px 8px;
  box-shadow: 0 26px 48px rgba(63, 79, 130, 0.2);
}

.book-card::before {
  content: "";
  position: absolute;
  width: 8px;
  top: 0;
  bottom: 0;
  left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.48);
  border-right: 1px solid rgba(44, 65, 116, 0.08);
}

.book-front {
  width: 230px;
  height: 320px;
  left: 28%;
  top: 30px;
  z-index: 3;
  color: white;
  background:
    linear-gradient(rgba(101, 149, 232, 0.2), rgba(101, 149, 232, 0.15)),
    repeating-linear-gradient(30deg, transparent 0 20px, rgba(255, 255, 255, 0.04) 21px 22px),
    #75a4ed;
  transform: rotate(7deg);
}

.book-front svg {
  width: 125px;
  position: absolute;
  left: 55px;
  top: 105px;
  opacity: 0.82;
}

.book-front svg path:first-child {
  fill: rgba(255, 255, 255, 0.16);
}

.book-label {
  position: absolute;
  left: 32px;
  top: 30px;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

.book-front small {
  position: absolute;
  right: 25px;
  bottom: 24px;
  font-size: 8px;
  letter-spacing: 0.18em;
}

.book-back {
  width: 210px;
  height: 288px;
  left: 15%;
  top: 72px;
  color: #cb7f9d;
  background: #f9cfdf;
  transform: rotate(-10deg);
}

.book-back > span {
  position: absolute;
  left: 34px;
  top: 28px;
  font-family: Georgia, serif;
  font-size: 26px;
}

.book-lines {
  position: absolute;
  left: 35px;
  right: 24px;
  bottom: 30px;
  height: 65px;
  border-top: 1px solid rgba(164, 87, 118, 0.22);
  border-bottom: 1px solid rgba(164, 87, 118, 0.22);
}

.book-lines::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 31px;
  background: rgba(164, 87, 118, 0.22);
}

.art-orbit {
  position: absolute;
  border: 1px solid rgba(105, 152, 236, 0.18);
  border-radius: 50%;
}

.orbit-one {
  width: 380px;
  height: 220px;
  left: 5%;
  top: 95px;
  transform: rotate(-18deg);
}

.orbit-two {
  width: 320px;
  height: 170px;
  left: 18%;
  top: 112px;
  transform: rotate(32deg);
}

.spark,
.music-note {
  position: absolute;
  z-index: 5;
}

.spark-one {
  right: 13%;
  top: 55px;
  color: var(--pink);
  font-size: 27px;
}

.spark-two {
  left: 9%;
  bottom: 36px;
  color: var(--blue);
  font-size: 20px;
}

.music-note {
  right: 4%;
  bottom: 65px;
  color: var(--blue-deep);
  font-family: Georgia, serif;
  font-size: 34px;
  transform: rotate(12deg);
}

.content-shell {
  padding: 54px 0 100px;
}

.content-shell::before {
  content: "⚓";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  float: right;
  margin-top: 6px;
  color: var(--blue-deep);
  border: 1px solid rgba(98, 84, 173, 0.17);
  border-radius: 50%;
  background: white;
  font-size: 11px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(98, 84, 173, 0.1);
}

.section-heading h2 {
  margin: 8px 0 0;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.search-box {
  width: min(350px, 100%);
  height: 47px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #9a9caf;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 7px 22px rgba(68, 76, 112, 0.05);
  transition: 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(105, 152, 236, 0.65);
  box-shadow: 0 0 0 4px rgba(105, 152, 236, 0.1);
}

.search-box svg {
  width: 19px;
  flex: none;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #aaacbd;
}

.search-box kbd {
  padding: 3px 6px;
  color: #a5a7b8;
  border: 1px solid #ececf2;
  border-radius: 5px;
  background: #f8f8fb;
  font-family: inherit;
  font-size: 9px;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
  transition: 160ms ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--blue-deep);
  border-color: #cbdcfa;
  background: var(--blue-soft);
}

.manga-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.featured-manga {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 22px;
  width: 100%;
  margin: 34px 0 0;
  padding: 20px 22px;
  border: 1px solid rgba(98, 84, 173, 0.1);
  border-radius: 26px;
  background:
    radial-gradient(circle at 8% 0, rgba(102, 203, 229, 0.22), transparent 35%),
    radial-gradient(circle at 100% 70%, rgba(231, 130, 183, 0.2), transparent 36%),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 36px rgba(61, 68, 106, 0.07);
  backdrop-filter: blur(18px);
}

.featured-manga[hidden] {
  display: none;
}

.featured-copy {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3px 2px 0;
}

.featured-copy p {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.featured-copy h3 {
  margin: 0 0 7px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 28px;
  font-weight: 500;
}

.featured-copy span {
  max-width: 260px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.featured-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.featured-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px;
  color: inherit;
  text-align: left;
  border: 1px solid rgba(98, 84, 173, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: 180ms ease;
}

.featured-card:hover {
  transform: translateY(-2px);
  border-color: rgba(231, 130, 183, 0.28);
  box-shadow: 0 12px 26px rgba(61, 68, 106, 0.09);
}

.featured-thumb {
  width: 100%;
  height: 205px;
  position: relative;
  overflow: hidden;
  border: 3px solid white;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(102, 203, 229, 0.18), rgba(231, 130, 183, 0.16)),
    var(--blue-soft);
  box-shadow: 0 14px 30px rgba(56, 68, 110, 0.14);
}

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

.featured-card-copy {
  min-width: 0;
  display: block;
}

.featured-card-copy strong,
.featured-card-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-card-copy strong {
  margin-bottom: 6px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 22px;
  line-height: 1.35;
}

.featured-card-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #d7d3df;
  font-family: Georgia, serif;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.rating-stars span {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.rating-stars .filled {
  color: #ff77b7;
  text-shadow: 0 2px 9px rgba(231, 130, 183, 0.46);
}

.rating-stars .half {
  color: #d7d3df;
}

.rating-stars .half::before {
  content: "\2605";
  width: 50%;
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: #ff77b7;
  text-shadow: 0 2px 9px rgba(231, 130, 183, 0.46);
}

.rating-stars b {
  margin-left: 4px;
  padding: 1px 6px;
  color: #6557ad;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 700;
}

.card-rating {
  margin: -2px 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(102, 203, 229, 0.18), rgba(231, 130, 183, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.featured-rating {
  margin-top: 8px;
  font-size: 16px;
}

.manga-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
  margin-top: 34px;
}

.manga-pagination[hidden] {
  display: none;
}

.pagination-range {
  color: #9594a8;
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.pagination-range i {
  margin: 0 3px;
  color: #d5ccdf;
  font-style: normal;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(98, 84, 173, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 9px 25px rgba(61, 69, 110, 0.07);
  backdrop-filter: blur(12px);
}

.pagination-controls button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #78768e;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 11px;
  transition: 160ms ease;
}

.pagination-controls button:hover:not(:disabled):not(.active) {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.pagination-controls button.active {
  color: white;
  background: linear-gradient(145deg, #6557ad, #d979ae);
  box-shadow: 0 6px 14px rgba(103, 79, 161, 0.23);
}

.pagination-controls button:disabled {
  color: #cbc9d4;
  cursor: default;
}

.pagination-arrow svg {
  width: 14px;
}

.pagination-ellipsis {
  width: 23px;
  color: #aaa7b7;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.manga-card {
  min-width: 0;
  position: relative;
  padding: 0;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: cardIn 420ms both;
}

.manga-cover {
  aspect-ratio: 0.74;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 3px solid white;
  outline: 1px solid rgba(98, 84, 173, 0.08);
  background: var(--blue-soft);
  box-shadow: 0 13px 30px rgba(56, 68, 110, 0.1);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.manga-cover::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--pink), #6659ad);
}

.manga-card:hover .manga-cover {
  transform: translateY(-6px);
  box-shadow: 0 20px 38px rgba(56, 68, 110, 0.17);
}

.manga-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
}

.manga-card:hover img {
  transform: scale(1.035);
}

.manga-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(transparent, rgba(24, 29, 54, 0.32));
  pointer-events: none;
}

.manga-open {
  width: 100%;
  display: block;
  padding: 0;
  text-align: left;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.card-delete {
  position: absolute;
  right: 13px;
  top: 13px;
  z-index: 4;
  width: 30px;
  height: 30px;
  display: none;
  place-items: center;
  padding: 0;
  color: #c86496;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 14px rgba(57, 45, 92, 0.13);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  transition: 160ms ease;
}

.card-delete svg {
  width: 14px;
}

body.manage-mode .card-delete {
  display: grid;
}

body.manage-mode .manga-card:hover .card-delete,
body.manage-mode .card-delete:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.manga-index {
  position: absolute;
  left: 13px;
  top: 13px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 25px;
  padding: 0 7px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(33, 38, 67, 0.22);
  backdrop-filter: blur(8px);
  font-family: Georgia, serif;
  font-size: 10px;
}

.manga-info {
  padding: 14px 3px 0;
}

.manga-info h3 {
  margin: 0 0 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 18px;
  font-weight: 600;
}

.manga-info p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.manga-info p span:last-child {
  color: var(--blue-deep);
}

.placeholder-cover {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 24px 27px;
  color: white;
  overflow: hidden;
}

.placeholder-cover::before,
.placeholder-cover::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}

.placeholder-cover::before {
  width: 210px;
  height: 210px;
  right: -70px;
  top: 30%;
}

.placeholder-cover::after {
  width: 130px;
  height: 130px;
  right: -30px;
  top: 41%;
}

.placeholder-cover strong {
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.4;
  writing-mode: vertical-rl;
  letter-spacing: 0.12em;
}

.placeholder-cover small {
  font-size: 9px;
  letter-spacing: 0.18em;
}

.cover-blue {
  background: linear-gradient(145deg, #4f83d7, #9fc6f3);
}

.cover-pink {
  background: linear-gradient(145deg, #d987a8, #f6bed1);
}

.cover-night {
  background: linear-gradient(145deg, #242b4d, #596c9c);
}

.cover-mint {
  background: linear-gradient(145deg, #67a9ac, #b7ded4);
}

.music-intro {
  min-height: 150px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  margin: 12px 0 30px;
  padding: 24px 34px;
  overflow: hidden;
  border: 1px solid #e7eaf4;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 20%, rgba(235, 139, 186, 0.38), transparent 24%),
    linear-gradient(110deg, #eefbfe, #f9f4ff 58%, #fff8fb);
}

.vinyl {
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, #292c44 0 3px, #363950 4px 5px);
  box-shadow: 0 13px 28px rgba(38, 41, 65, 0.2);
}

.vinyl-ring {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
}

.vinyl-ring span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
}

.music-intro p {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.music-intro h3 {
  margin: 0 0 7px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 24px;
  font-weight: 500;
}

.music-intro > div:nth-child(2) > span {
  color: var(--muted);
  font-size: 11px;
}

.music-intro button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  color: white;
  border: 0;
  border-radius: 999px;
  background: var(--blue-deep);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(73, 118, 207, 0.23);
}

.music-intro button svg {
  width: 17px;
}

.music-intro button svg path,
.play-button .play-icon path {
  fill: currentColor;
  stroke: none;
}

.music-list-header,
.music-row {
  display: grid;
  grid-template-columns: 36px minmax(230px, 1.4fr) minmax(160px, 1fr) 70px 40px;
  align-items: center;
  gap: 12px;
}

.music-list-header {
  padding: 0 18px 10px;
  color: #a2a5b5;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.music-row {
  width: 100%;
  padding: 12px 18px;
  border-bottom: 1px solid #f0f1f6;
  text-align: left;
  background: transparent;
  transition: 160ms ease;
}

.music-row:hover,
.music-row.playing {
  border-color: transparent;
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 24px rgba(61, 70, 108, 0.07);
}

.music-row-main {
  display: contents;
  color: inherit;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.track-number {
  color: #a4a7b8;
  font-family: Georgia, serif;
  font-size: 11px;
}

.music-row.playing .track-number {
  color: var(--blue-deep);
}

.track-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-cover {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  color: white;
  background: linear-gradient(140deg, var(--blue), var(--pink));
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-cover span {
  font-family: Georgia, serif;
}

.track-copy {
  min-width: 0;
}

.track-copy strong,
.track-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-copy strong {
  margin-bottom: 4px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 14px;
  font-weight: 600;
}

.track-copy span,
.track-album,
.track-duration {
  color: var(--muted);
  font-size: 10px;
}

.row-play {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--blue-deep);
  border: 1px solid #dce7fa;
  border-radius: 50%;
}

.track-delete {
  width: 28px;
  height: 28px;
  display: none;
  place-items: center;
  padding: 0;
  color: #bd6994;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  opacity: 0.45;
  transition: 160ms ease;
}

body.manage-mode .track-delete {
  display: grid;
}

.track-delete:hover {
  opacity: 1;
  background: var(--pink-soft);
}

.track-delete svg {
  width: 14px;
}

.row-play svg {
  width: 13px;
}

.row-play path {
  fill: currentColor;
  stroke: none;
}

.empty-state {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: var(--blue-deep);
  border-radius: 20px;
  background: var(--blue-soft);
  font-family: Georgia, serif;
  font-size: 20px;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-weight: 500;
}

.empty-state p {
  margin: 0;
  font-size: 12px;
}

footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 35px 0 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9a9caf;
  border-top: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.footer-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.secret-entry {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #aaa6ba;
  border: 1px solid rgba(98, 84, 173, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  opacity: 0.55;
  transition: 180ms ease;
}

.secret-entry:hover {
  color: var(--blue-deep);
  opacity: 1;
  transform: translateY(-1px);
}

.secret-entry svg {
  width: 12px;
}

.footer-brand {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
}

.footer-brand span {
  color: var(--pink);
}

.player {
  --player-bg: rgba(44, 39, 79, 0.96);
  --player-text: #ffffff;
  --player-muted: #b7b4ca;
  --player-progress-bg: rgba(255, 255, 255, 0.16);
  width: 360px;
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 35;
  padding: 14px 16px 12px;
  color: var(--player-text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: var(--player-bg);
  backdrop-filter: blur(22px);
  box-shadow: 0 22px 55px rgba(27, 30, 52, 0.28);
  transition: transform 250ms ease, opacity 250ms ease;
}

.player.theme-aqua {
  --player-bg: linear-gradient(125deg, rgba(64, 53, 117, 0.96), rgba(72, 184, 215, 0.94));
}

.player.theme-pink {
  --player-bg: linear-gradient(125deg, rgba(109, 80, 151, 0.96), rgba(226, 121, 175, 0.95));
}

.player.theme-glass {
  --player-bg: rgba(255, 255, 255, 0.64);
  --player-text: #352e5c;
  --player-muted: #77718e;
  --player-progress-bg: rgba(70, 60, 116, 0.14);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 55px rgba(56, 48, 95, 0.18);
  backdrop-filter: blur(28px) saturate(150%);
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.player-theme-menu {
  position: absolute;
  right: 13px;
  top: 62px;
  z-index: 4;
  width: 130px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  color: #3d365f;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(30, 25, 58, 0.2);
  backdrop-filter: blur(18px);
}

.player-theme-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  color: inherit;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.player-theme-menu button:hover,
.player-theme-menu button.active {
  background: #f2effa;
}

.theme-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(54, 45, 94, 0.12);
}

.theme-dot.navy {
  background: #302957;
}

.theme-dot.aqua {
  background: linear-gradient(135deg, #6254ad, #56c8e8);
}

.theme-dot.pink {
  background: linear-gradient(135deg, #7659a9, #e98abb);
}

.theme-dot.glass {
  background: rgba(235, 246, 255, 0.9);
  border: 1px solid white;
}

.player.minimized {
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
}

.player-track {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 11px;
}

.player-cover {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  color: white;
  background: linear-gradient(145deg, var(--blue), var(--pink));
  font-family: Georgia, serif;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  min-width: 0;
}

.player-meta strong,
.player-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-meta strong {
  margin-bottom: 3px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 12px;
  font-weight: 500;
}

.player-meta span {
  color: var(--player-muted);
  font-size: 9px;
}

.icon-button,
.play-button {
  padding: 0;
  display: grid;
  place-items: center;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 17px;
}

.close-player {
  color: var(--player-muted);
}

.player-progress {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 7px;
  margin: 10px 0 5px;
  color: #898da5;
  font-size: 7px;
}

input[type="range"] {
  --range-progress: 0%;
  height: 3px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    var(--pink) var(--range-progress),
    var(--player-progress-bg, rgba(255, 255, 255, 0.16)) var(--range-progress)
  );
}

input[type="range"]::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  appearance: none;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

select {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
}

select:focus {
  border-color: rgba(102, 203, 229, 0.8);
  box-shadow: 0 0 0 4px rgba(102, 203, 229, 0.12);
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.check-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--pink);
}

.check-field span {
  margin: 0;
  color: var(--muted);
}

.compact-drop {
  margin-top: 12px;
  padding: 20px;
}

.compact-drop svg {
  width: 26px;
}

.player-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.player-controls > .icon-button {
  justify-self: start;
  color: var(--player-muted);
}

.center-controls {
  display: flex;
  align-items: center;
  gap: 17px;
}

.center-controls .icon-button {
  color: var(--player-text);
}

.play-button {
  width: 35px;
  height: 35px;
  color: var(--ink);
  border-radius: 50%;
  background: white;
}

.play-button svg {
  width: 16px;
}

.pause-icon {
  display: none;
}

.player.is-playing .play-icon {
  display: none;
}

.player.is-playing .pause-icon {
  display: block;
}

.volume-control {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--player-muted);
}

.volume-control svg {
  width: 14px;
}

.volume-control input {
  width: 45px;
}

.player-bubble {
  width: 52px;
  height: 52px;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 34;
  color: white;
  border: 3px solid white;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--pink));
  box-shadow: 0 12px 30px rgba(58, 69, 115, 0.24);
  cursor: pointer;
}

.player-bubble span {
  font-family: Georgia, serif;
  font-size: 20px;
}

dialog {
  padding: 0;
  color: var(--ink);
  border: 0;
}

dialog::backdrop {
  background: rgba(28, 31, 52, 0.48);
  backdrop-filter: blur(8px);
}

.detail-dialog {
  width: min(940px, calc(100% - 30px));
  height: min(760px, calc(100vh - 40px));
  height: min(760px, calc(100dvh - 40px));
  max-height: none;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.dialog-close svg {
  width: 16px;
}

.detail-dialog > .dialog-close {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 8;
  margin: 0;
  box-shadow: 0 7px 18px rgba(49, 40, 86, 0.1);
}

#mangaDetail {
  width: 100%;
  height: 100%;
}

.detail-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 40%) minmax(0, 60%);
  overflow: hidden;
}

.detail-cover {
  min-width: 0;
  min-height: 0;
  height: 100%;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid rgba(98, 84, 173, 0.1);
  background:
    linear-gradient(145deg, #dff5fb, #f7e6f1 56%, #e9e5f6);
}

.detail-cover .placeholder-cover {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.detail-cover-backdrop {
  width: calc(100% + 70px);
  height: calc(100% + 70px);
  position: absolute;
  inset: -35px;
  z-index: -3;
  object-fit: cover;
  object-position: center;
  filter: blur(25px) saturate(1.18);
  opacity: 0.62;
  transform: scale(1.08);
}

.detail-cover-tint {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(44, 37, 80, 0.1), rgba(255, 255, 255, 0.16)),
    linear-gradient(135deg, rgba(86, 200, 232, 0.14), rgba(233, 138, 187, 0.16));
  backdrop-filter: blur(3px);
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, rgba(48, 41, 87, 0.08), transparent 20%, transparent 80%, rgba(48, 41, 87, 0.1));
  box-shadow: inset 0 0 55px rgba(48, 41, 87, 0.12);
}

.detail-cover-image {
  width: auto;
  height: auto;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 36px);
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 14px;
  filter: drop-shadow(0 18px 30px rgba(29, 24, 58, 0.24));
}

.detail-cover .placeholder-cover {
  position: relative;
  z-index: 1;
  justify-self: stretch;
  align-self: stretch;
}

.detail-copy {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 65px 56px 50px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cf8fbc #f2eef8;
}

.detail-copy::-webkit-scrollbar {
  width: 9px;
}

.detail-copy::-webkit-scrollbar-track {
  margin: 12px 0;
  border-radius: 999px;
  background: #f2eef8;
}

.detail-copy::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid #f2eef8;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--pink));
}

.detail-copy::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #42b9dd, #dd72aa);
}

.detail-number {
  color: var(--pink);
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.detail-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.detail-edit-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  color: #746b9e;
  border: 1px solid rgba(98, 84, 173, 0.15);
  border-radius: 999px;
  background: rgba(246, 243, 252, 0.82);
  cursor: pointer;
  font-size: 9px;
  transition: 160ms ease;
}

.detail-edit-button:hover {
  color: var(--blue-deep);
  border-color: rgba(98, 84, 173, 0.28);
  background: #f1edfa;
  transform: translateY(-1px);
}

.detail-edit-button svg {
  width: 12px;
}

.detail-copy h2 {
  margin: 18px 0 8px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.detail-rating {
  margin: 0 0 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(102, 203, 229, 0.18), rgba(231, 130, 183, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.detail-author {
  margin: 0 0 24px;
  color: var(--blue-deep);
  font-size: 12px;
}

.detail-genre {
  display: inline-block;
  padding: 6px 11px;
  color: var(--blue-deep);
  border-radius: 999px;
  background: var(--blue-soft);
  font-size: 10px;
}

.detail-description {
  margin: 28px 0;
  color: #65697e;
  font-size: 13px;
  line-height: 2;
  white-space: pre-line;
}

.detail-quote {
  margin: 0;
  padding: 18px 20px;
  color: #55596f;
  border-left: 3px solid var(--pink);
  background: var(--pink-soft);
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 14px;
  line-height: 1.8;
}

.recommend-reason {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(231, 130, 183, 0.16);
  border-left: 3px solid rgba(231, 130, 183, 0.72);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(102, 203, 229, 0.08), transparent 38%),
    linear-gradient(135deg, rgba(255, 244, 250, 0.58), rgba(247, 253, 255, 0.54));
  box-shadow: 0 10px 24px rgba(78, 74, 118, 0.045);
}

.recommend-reason h3 {
  margin: 0 0 11px;
  display: inline-flex;
  padding: 4px 10px;
  color: #7b5abd;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(231, 130, 183, 0.18);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.recommend-reason p {
  margin: 0;
  color: #38354f;
  font-size: 14px;
  font-weight: 500;
  line-height: 2;
  white-space: pre-line;
}

.recommend-reason p + p {
  margin-top: 12px;
}

.favorite-scene {
  display: block;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(98, 84, 173, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 249, 255, 0.72));
  box-shadow: 0 12px 30px rgba(45, 50, 86, 0.055);
}

.favorite-scene span {
  display: block;
  margin: 0 0 13px;
  color: var(--pink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.favorite-scene img {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  object-fit: contain;
  border: 3px solid white;
  border-radius: 18px;
  background: #f5f7fc;
  box-shadow: 0 14px 32px rgba(45, 50, 86, 0.095);
}

.screenshot-title {
  margin: 34px 0 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.screenshot-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #9fcfe3 #f2eef8;
}

.screenshot-strip::-webkit-scrollbar {
  height: 7px;
}

.screenshot-strip::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f2eef8;
}

.screenshot-strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--pink));
}

.screenshot-strip img {
  width: 110px;
  height: 86px;
  flex: none;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
}

.manager-dialog {
  width: min(700px, calc(100% - 30px));
  max-height: min(820px, calc(100vh - 30px));
  overflow: auto;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.edit-dialog {
  width: min(640px, calc(100% - 30px));
  max-height: min(820px, calc(100vh - 30px));
  max-height: min(820px, calc(100dvh - 30px));
  overflow: auto;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: #cf8fbc #f2eef8;
}

.secret-gate-dialog {
  width: min(410px, calc(100% - 30px));
  overflow: visible;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(86, 200, 232, 0.15), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(233, 138, 187, 0.14), transparent 32%),
    #fff;
  box-shadow: 0 28px 80px rgba(38, 31, 73, 0.28);
}

.secret-gate-dialog > .dialog-close {
  position: absolute;
  right: 17px;
  top: 17px;
}

.secret-gate-dialog form {
  padding: 42px 38px 36px;
  text-align: center;
}

.secret-gate-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: white;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--blue-deep), var(--pink));
  box-shadow: 0 12px 28px rgba(98, 84, 173, 0.2);
  font-size: 20px;
}

.secret-gate-dialog h2 {
  margin: 9px 0 8px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 29px;
  font-weight: 500;
}

.secret-gate-dialog form > p:not(.section-kicker, .secret-gate-error) {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 11px;
}

.secret-gate-dialog label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.secret-gate-dialog label span {
  color: #60647a;
  font-size: 10px;
  font-weight: 700;
}

.secret-gate-dialog input {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fbfcff;
  text-align: center;
  letter-spacing: 0.22em;
}

.secret-gate-dialog input:focus {
  border-color: #afc9f6;
  box-shadow: 0 0 0 3px rgba(105, 152, 236, 0.09);
}

.secret-gate-error {
  margin: 9px 0 -7px;
  color: #c55e89;
  font-size: 10px;
}

.edit-dialog::-webkit-scrollbar {
  width: 8px;
}

.edit-dialog::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f2eef8;
}

.edit-dialog::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--pink));
}

.edit-dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 31px 36px 20px;
  border-bottom: 1px solid var(--line);
}

.edit-dialog-header h2 {
  margin: 7px 0 5px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 27px;
  font-weight: 500;
}

.edit-dialog-header > div > span {
  color: var(--muted);
  font-size: 10px;
}

.edit-form {
  padding: 26px 36px 36px;
}

.edit-preserve-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  padding: 10px 12px;
  color: #716a8c;
  border: 1px solid #e8e2f3;
  border-radius: 11px;
  background: #faf8fd;
  font-size: 9px;
}

.edit-preserve-note svg {
  width: 16px;
  flex: none;
  color: var(--blue-deep);
}

.manager-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 32px 36px 20px;
}

.manager-header h2 {
  margin: 7px 0 5px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 29px;
  font-weight: 500;
}

.manager-header > div > span {
  color: var(--muted);
  font-size: 10px;
}

.manager-tabs {
  display: flex;
  gap: 8px;
  padding: 0 36px 16px;
  border-bottom: 1px solid var(--line);
}

.manager-tabs button {
  padding: 8px 14px;
  color: var(--muted);
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.manager-tabs button.active {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.upload-form {
  padding: 26px 36px 36px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-grid label > span {
  color: #60647a;
  font-size: 10px;
  font-weight: 700;
}

.form-grid label > small {
  color: #9a9caf;
  font-size: 9px;
  line-height: 1.6;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  padding: 11px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #fbfcff;
  font-size: 12px;
  resize: vertical;
}

.form-grid input:focus,
.form-grid textarea:focus {
  border-color: #afc9f6;
  box-shadow: 0 0 0 3px rgba(105, 152, 236, 0.09);
}

.full-field {
  grid-column: 1 / -1;
}

.drop-zone {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cbd8ef;
  border-radius: 16px;
  background: #f8fbff;
  cursor: pointer;
  transition: 180ms ease;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-zone svg {
  width: 27px;
  margin-bottom: 4px;
  color: var(--blue-deep);
}

.drop-zone strong {
  color: var(--ink);
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 14px;
  font-weight: 500;
}

.drop-zone span {
  font-size: 10px;
}

.drop-zone small {
  color: #a4a7b8;
  font-size: 9px;
}

.submit-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 13px;
  color: white;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(100deg, var(--blue-deep), #7a9fe4);
  box-shadow: 0 10px 24px rgba(73, 118, 207, 0.2);
  cursor: pointer;
}

.submit-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.submit-button svg {
  width: 15px;
}

.library-manager {
  padding: 24px 36px 36px;
}

.publish-panel {
  padding: 36px;
  text-align: center;
}

.publish-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 17px;
  color: white;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--blue-deep), var(--pink));
  box-shadow: 0 13px 28px rgba(98, 84, 173, 0.2);
}

.publish-icon svg {
  width: 27px;
}

.publish-panel h3 {
  margin: 8px 0 10px;
  font-family: Georgia, "STSong", "Songti SC", serif;
  font-size: 25px;
  font-weight: 500;
}

.publish-panel > p:not(.section-kicker) {
  max-width: 490px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.publish-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0 6px;
}

.publish-summary div {
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbff;
}

.publish-summary strong,
.publish-summary span {
  display: block;
}

.publish-summary strong {
  margin-bottom: 4px;
  color: var(--blue-deep);
  font-family: Georgia, serif;
  font-size: 21px;
}

.publish-summary span,
.publish-note {
  color: var(--muted);
  font-size: 9px;
}

.publish-note {
  display: block;
  margin-top: 12px;
}

.publish-error {
  margin: 12px 0 0 !important;
  padding: 10px 12px;
  color: #a94f79 !important;
  border: 1px solid #f0c9da;
  border-radius: 10px;
  background: #fff5f9;
  font-size: 10px !important;
  text-align: left;
  word-break: break-word;
}

.library-manager > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.manager-item {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.manager-thumb {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--blue), var(--pink));
  font-family: Georgia, serif;
}

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

.manager-item strong,
.manager-item span {
  display: block;
}

.manager-item strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.manager-item span {
  color: var(--muted);
  font-size: 9px;
}

.delete-button {
  padding: 7px 10px;
  color: #cc6589;
  border: 1px solid #f2ccda;
  border-radius: 9px;
  background: #fff7fa;
  cursor: pointer;
  font-size: 9px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 100;
  padding: 11px 17px;
  color: white;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 10px 28px rgba(34, 36, 58, 0.22);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    gap: 14px;
  }

  .main-nav {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 40;
    transform: translateX(-50%);
    box-shadow: 0 13px 38px rgba(41, 48, 80, 0.18);
  }

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

  .hero-art {
    display: none;
  }

  .manga-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .featured-manga {
    grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.3fr);
    width: 100%;
    margin: 28px 0 0;
  }

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

  .featured-thumb {
    height: 190px;
  }

  .player {
    bottom: 82px;
  }

  .player-bubble {
    bottom: 84px;
  }

  footer {
    padding-bottom: 170px;
  }

  .footer-end {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    height: 74px;
  }

  .brand small {
    display: none;
  }

  .collection-counts {
    gap: 7px;
    padding: 6px 9px;
  }

  .collection-counts span {
    display: none;
  }

  .collection-tools {
    gap: 5px;
  }

  .random-dice-button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .random-dice-button svg {
    width: 27px;
    height: 27px;
  }

  .manage-button {
    padding: 10px 13px;
  }

  .hero {
    min-height: 410px;
    padding: 42px 28px;
    border-radius: 25px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .content-shell {
    padding: 40px 0 78px;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .manga-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 13px;
  }

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

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

  .featured-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .featured-thumb {
    height: 165px;
  }

  .manga-pagination {
    gap: 8px;
    margin-top: 27px;
  }

  .pagination-range {
    display: none;
  }

  .pagination-controls {
    max-width: 100%;
    overflow-x: auto;
  }

  .manga-info h3 {
    font-size: 15px;
  }

  .manga-info p {
    flex-direction: column;
    gap: 3px;
  }

  .card-delete {
    opacity: 1;
    transform: none;
  }

  .publish-panel {
    padding: 30px 22px;
  }

  .music-intro {
    grid-template-columns: auto 1fr;
    padding: 20px;
  }

  .vinyl {
    width: 74px;
    height: 74px;
  }

  .vinyl-ring {
    width: 31px;
    height: 31px;
  }

  .music-intro button {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
  }

  .music-list-header {
    display: none;
  }

  .music-row {
    grid-template-columns: 25px 1fr 34px;
    padding: 12px 6px;
  }

  .track-album,
  .track-duration {
    display: none;
  }

  .player {
    width: calc(100% - 28px);
    right: 14px;
  }

  .volume-control input {
    display: none;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 42%) minmax(0, 58%);
  }

  .detail-dialog {
    width: min(94vw, 560px);
    height: min(88vh, 780px);
    height: min(88dvh, 780px);
  }

  .detail-cover {
    min-height: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(98, 84, 173, 0.1);
  }

  .detail-cover-image {
    width: auto;
    height: auto;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 20px);
    border-radius: 11px;
  }

  .detail-copy {
    padding: 32px 25px 38px;
  }

  .detail-copy h2 {
    font-size: 31px;
  }

  .manager-header,
  .edit-dialog-header,
  .upload-form,
  .edit-form,
  .library-manager {
    padding-left: 22px;
    padding-right: 22px;
  }

  .manager-tabs {
    padding-left: 22px;
    padding-right: 22px;
    overflow-x: auto;
  }

  .manager-tabs button {
    white-space: nowrap;
  }

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

  .full-field {
    grid-column: auto;
  }

  footer {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .random-roll-die,
  .random-roll-aura,
  .random-roll-die::before,
  .random-roll-die::after {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}
