:root {
  color-scheme: dark;
  --bg: #05060a;
  --panel: #0b0d14;
  --panel-2: #111420;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --muted: #a1a1aa;
  --accent: #7c3aed;
  --accent-2: #3b82f6;
  --accent-3: #38bdf8;
  --danger: #ff5570;
  --sidebar: 252px;
  --topbar: 88px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition-fast: 0.18s ease;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -12%, rgba(124, 58, 237, 0.22), transparent 45%),
    radial-gradient(circle at 85% -15%, rgba(56, 189, 248, 0.16), transparent 38%),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

:where(button, [role="button"], input, textarea, a, .comic-card-main, .continue-cover, .continue-info):focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.85);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

button {
  color: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--topbar);
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(320px, 560px) auto;
  gap: 20px;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 10, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.logo,
.top-actions,
.sidebar,
.bottom-nav,
.chapter-row,
.comic-card,
.nav-icon,
.reader-controls {
  display: flex;
  align-items: center;
}

.logo {
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 800;
  font-size: 1.45rem;
  cursor: pointer;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-cat {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
  background: rgba(10, 13, 22, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 20px rgba(124, 58, 237, 0.22);
}

.brand-cat[data-sidebar-toggle] {
  cursor: pointer;
}

.cat-ear {
  position: absolute;
  top: -9px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #0a0d16;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cat-ear-left {
  left: 5px;
  transform: rotate(-32deg);
}

.cat-ear-right {
  right: 5px;
  transform: rotate(32deg);
}

.cat-eye {
  position: absolute;
  top: 12px;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

.cat-eye-left {
  left: 10px;
  background: linear-gradient(180deg, #9b6bff, #7c3aed);
}

.cat-eye-right {
  right: 10px;
  background: linear-gradient(180deg, #6ad8ff, #3b82f6);
}

.cat-nose {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 6px;
  height: 4px;
  border-radius: 4px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.95), rgba(59, 130, 246, 0.9));
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
  box-shadow: 0 0 35px rgba(124, 58, 237, 0.35);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-weight: 900;
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: 1;
  letter-spacing: 0;
  color: #f8fafc;
}

.wordmark span:last-child {
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: #10121a;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.search-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.search-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search:focus-within {
  border-color: rgba(124, 58, 237, 0.75);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search input::placeholder {
  color: rgba(161, 161, 170, 0.92);
}

.top-actions {
  justify-content: flex-end;
  gap: 12px;
}

.create-button,
.icon-button,
.avatar,
.nav-icon {
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}

.create-button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  border-color: rgba(170, 142, 255, 0.5);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.35);
  font-weight: 800;
  transition:
    filter 200ms ease,
    box-shadow 220ms ease,
    transform 180ms ease,
    border-color 200ms ease;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: rgba(248, 250, 252, 0.9);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
  font-size: 1.45rem;
  line-height: 1;
}

.icon-button:hover {
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.notification-button {
  position: relative;
}

.bell-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.42);
}

.mobile-search-btn {
  display: none;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  font-weight: 800;
}

.guest-badge {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.sidebar {
  display: flex;
  position: fixed;
  z-index: 15;
  top: var(--topbar);
  bottom: 0;
  left: 0;
  width: var(--sidebar);
  flex-direction: column;
  gap: 7px;
  padding: 10px 14px 10px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #080a10 0%, #0b0e16 100%);
  box-shadow: inset -1px 0 0 rgba(124, 58, 237, 0.06);
  overflow: hidden;
}

.sidebar-stack {
  display: grid;
  gap: 5px;
}

.sidebar-group {
  display: grid;
  gap: 2px;
}

.sidebar-divider {
  height: 1px;
  width: 100%;
  margin: 2px 0;
  background: linear-gradient(90deg, transparent 0%, rgba(148, 163, 184, 0.2) 16%, rgba(148, 163, 184, 0.2) 84%, transparent 100%);
}

.sidebar-divider-bottom {
  margin-top: 2px;
}

.nav-icon {
  justify-content: flex-start;
  gap: 11px;
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 220ms ease,
    transform 180ms ease,
    color 200ms ease;
}

.nav-symbol {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: rgba(226, 232, 240, 0.72);
}

.nav-symbol svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon small {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
  color: rgba(248, 250, 252, 0.78);
}

.nav-icon:hover,
.nav-icon.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(59, 130, 246, 0.1));
  border-color: rgba(139, 92, 246, 0.28);
  box-shadow: 0 0 6px rgba(124, 58, 237, 0.1);
}

.nav-icon.active {
  border-color: rgba(139, 92, 246, 0.38);
  box-shadow:
    0 0 12px rgba(124, 58, 237, 0.14),
    inset 0 0 0 1px rgba(167, 139, 250, 0.18);
}

.nav-icon:not(.active):hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: transparent;
  box-shadow: none;
}

.nav-icon:hover .nav-symbol,
.nav-icon.active .nav-symbol,
.nav-icon:hover small,
.nav-icon.active small {
  color: #ffffff;
}

.nav-icon:hover {
  transform: translateY(-0.5px);
}

.nav-icon-soon {
  cursor: default;
}

.nav-icon-soon:hover {
  transform: none;
}

.soon-badge {
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 6px;
  border: 1px solid rgba(139, 92, 246, 0.32);
  background: rgba(124, 58, 237, 0.12);
  color: rgba(220, 196, 255, 0.92);
  font-size: 0.58rem;
  font-weight: 800;
}

.sidebar-cta {
  position: relative;
  margin-top: 2px;
  padding: 80px 12px 10px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.16), transparent 56%),
    linear-gradient(180deg, #121726, #0d111d);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.cta-mascot {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 58px;
  pointer-events: none;
}

.cta-mascot img {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 118%;
  height: 132%;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.34)) drop-shadow(0 0 16px rgba(124, 58, 237, 0.22));
  transform: translate(-50%, -50%);
}

.cta-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.45);
}

.cta-spark-a {
  top: 10px;
  left: 20px;
}

.cta-spark-b {
  bottom: 10px;
  right: 20px;
}

.cta-spark-c {
  top: 18px;
  right: 12px;
}

.cta-spark-d {
  bottom: 18px;
  left: 12px;
}

.discovery-home {
  display: grid;
  gap: 20px;
}

.chip-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip-row button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #111318;
  color: #d4d4d8;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    color 200ms ease,
    box-shadow 220ms ease,
    transform 180ms ease;
}

.chip-row button:first-child {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.3);
}

.chip-row button:hover {
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(124, 58, 237, 0.14);
  color: #f8fafc;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.16);
  transform: translateY(-1px);
}

.featured-hero {
  position: relative;
  min-height: 280px;
  height: clamp(280px, 32vw, 320px);
  max-height: 320px;
  border: 1px solid rgba(155, 92, 255, 0.2);
  border-radius: 24px;
  overflow: hidden;
  background: #0b0d14;
  transition:
    border-color 220ms ease,
    box-shadow 240ms ease;
}

.featured-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 240ms ease, filter 240ms ease;
}

.featured-hero .cover,
.featured-hero .image-cover {
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

.featured-hero:hover {
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.32),
    0 0 18px rgba(124, 58, 237, 0.16);
}

.featured-hero:hover img {
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.04);
}

.featured-hero .cover::before,
.featured-hero .cover span {
  display: none;
}

.featured-hero .image-cover::after {
  display: none;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.82) 24%,
    rgba(0, 0, 0, 0.52) 52%,
    rgba(0, 0, 0, 0.22) 76%,
    rgba(0, 0, 0, 0.06) 100%
  );
  max-width: min(56%, 640px);
}

.featured-overlay h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.9vw, 2.55rem);
  line-height: 1.05;
}

.featured-overlay .meta {
  color: rgba(235, 238, 255, 0.82);
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.featured-description {
  margin: 0;
  color: rgba(235, 238, 255, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(235, 238, 255, 0.86);
}

.featured-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-icon {
  font-size: 0.82rem;
  opacity: 0.9;
}

.featured-stats strong {
  color: #ffffff;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-plus {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 200ms ease,
    box-shadow 220ms ease,
    background 180ms ease;
}

.read-button {
  color: #ffffff;
  font-weight: 800;
}

.featured-plus:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.22);
}

.discovery-section {
  display: grid;
  gap: 12px;
}

.discovery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.discovery-head h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
}

.discovery-head .meta {
  font-size: 0.84rem;
  font-weight: 700;
}

.discovery-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.mini-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  background: #111420;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 240ms ease;
}

.mini-card button {
  position: relative;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.3);
}

.mini-card .mini-meta {
  padding: 10px 10px 11px;
  display: grid;
  gap: 5px;
}

.mini-meta strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.mini-meta .meta {
  font-size: 0.8rem;
  line-height: 1.2;
  color: rgba(161, 161, 170, 0.92);
}

.mini-card .cover {
  border-radius: 0;
  aspect-ratio: 180 / 170;
}

.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.32),
    0 0 14px rgba(124, 58, 237, 0.12);
}

.trending-placeholder {
  position: relative;
  aspect-ratio: 180 / 170;
  border-radius: 0;
  box-shadow: none;
}

.trending-placeholder::before {
  display: none;
}

.trending-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.78));
}

.trending-placeholder span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  font-size: 0.86rem;
  line-height: 1.1;
}

.trending-cosmic {
  background:
    radial-gradient(circle at 72% 22%, rgba(150, 183, 255, 0.48), transparent 34%),
    linear-gradient(140deg, #0a1328, #2c3f90 54%, #5f7cf0);
}

.trending-ember {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 216, 129, 0.42), transparent 30%),
    linear-gradient(145deg, #2a0e08, #8e3a1c 58%, #d47b27);
}

.trending-eclipse {
  background:
    radial-gradient(circle at 60% 24%, rgba(178, 135, 255, 0.46), transparent 34%),
    linear-gradient(145deg, #120b24, #31135c 56%, #6a2fb6);
}

.trending-cyber {
  background:
    radial-gradient(circle at 70% 24%, rgba(91, 229, 255, 0.46), transparent 34%),
    linear-gradient(145deg, #061222, #0f3a63 54%, #1e7abb);
}

.sidebar-cta p {
  margin: 0;
}

.sidebar-cta-title {
  margin-bottom: 6px !important;
  font-size: 1.05rem;
  line-height: 1.04;
  font-weight: 800;
  color: #f8fafc;
}

.sidebar-cta-copy {
  margin-bottom: 8px !important;
  font-size: 0.74rem;
  color: #a1a1aa;
  line-height: 1.35;
}

.sidebar-cta button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition:
    filter 200ms ease,
    box-shadow 220ms ease,
    transform 180ms ease;
}

.create-button:hover,
.sidebar-cta button:hover,
.read-button:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.28);
  transform: translateY(-1px);
}

.sidebar-utilities {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.utility-item {
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 9px 11px;
  line-height: 1;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(161, 161, 170, 0.9);
  font-size: 14px;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.utility-item small {
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: rgba(161, 161, 170, 0.9);
}

.utility-item .nav-symbol {
  width: 16px;
  height: 16px;
  color: rgba(161, 161, 170, 0.9);
}

.utility-item .nav-symbol svg {
  width: 16px;
  height: 16px;
}

.utility-item:hover,
.utility-item:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(241, 245, 249, 0.95);
}

.utility-item:hover .nav-symbol,
.utility-item:focus-visible .nav-symbol,
.utility-item:hover small,
.utility-item:focus-visible small {
  color: rgba(241, 245, 249, 0.95);
}

.sidebar-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding-top: 6px;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(226, 232, 240, 0.82);
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon:hover,
.social-icon:focus-visible {
  border-color: rgba(139, 92, 246, 0.34);
  background: rgba(124, 58, 237, 0.14);
  color: #ffffff;
  transform: translateY(-1px);
}

.app-shell {
  min-height: 100vh;
  padding: calc(var(--topbar) + 30px) 30px 66px calc(var(--sidebar) + 30px);
  touch-action: manipulation;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h1,
.comic-info h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1;
}

.section-head p,
.comic-info p,
.empty-state p,
.meta {
  color: var(--muted);
}

.section-head p {
  margin: 9px 0 0;
}

.compact-head {
  margin-bottom: 14px;
}

.compact-head h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.compact-head p {
  margin-top: 7px;
}

.continue-section {
  margin-bottom: 28px;
}

.continue-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.continue-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(155, 92, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(155, 92, 255, 0.1), transparent 58%),
    rgba(17, 17, 24, 0.78);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.continue-card:hover {
  border-color: rgba(155, 92, 255, 0.48);
  background:
    linear-gradient(135deg, rgba(155, 92, 255, 0.16), transparent 58%),
    rgba(17, 17, 24, 0.92);
  transform: translateY(-2px);
}

.continue-cover,
.continue-info {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.continue-cover {
  width: 88px;
  padding: 0;
}

.continue-cover .cover {
  width: 88px;
  box-shadow: none;
}

.continue-cover .cover span {
  display: none;
}

.continue-info {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
}

.continue-info span {
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.continue-info strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-info small {
  color: rgba(170, 168, 189, 0.76);
  font-size: 0.84rem;
  font-weight: 800;
}

.section-empty-card {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 122px;
  padding: 14px;
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.15), transparent 60%),
    rgba(17, 20, 32, 0.72);
}

.section-empty-card strong {
  font-size: 0.98rem;
}

.section-empty-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.following-page-shell {
  padding-bottom: 48px;
}

.following-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 1320px);
  margin-inline: auto;
}

.following-creator-strip,
.following-tag-strip,
.following-feed-section,
.following-empty {
  min-width: 0;
}

.following-creator-row {
  display: flex;
  gap: 18px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px 2px 8px;
}

.following-creator-row::-webkit-scrollbar {
  display: none;
}

.following-creator {
  display: grid;
  flex: 0 0 82px;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(248, 250, 252, 0.9);
  cursor: pointer;
}

.following-creator img {
  width: 66px;
  height: 66px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: var(--panel-2);
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.2),
    0 12px 28px rgba(0, 0, 0, 0.26);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 220ms ease;
}

.following-creator span {
  display: block;
  width: 100%;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.following-creator:hover img,
.following-creator:focus-visible img {
  border-color: rgba(124, 58, 237, 0.54);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(124, 58, 237, 0.2);
  transform: translateY(-2px);
}

.following-tag-strip .chip-row {
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
}

.following-tag-strip .chip-row button:first-child {
  background: #111318;
  color: #d4d4d8;
  box-shadow: none;
}

.following-tag-strip .chip-row button.active {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.3);
}

.following-feed-section {
  margin-top: 2px;
}

.following-feed-grid {
  overflow: visible;
}

.following-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  min-height: min(540px, calc(100vh - var(--topbar) - 120px));
  padding: clamp(28px, 5vw, 56px);
  border: 1px dashed rgba(139, 92, 246, 0.36);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0, rgba(124, 58, 237, 0.18), transparent 42%),
    rgba(10, 13, 24, 0.74);
  text-align: center;
}

.following-empty img {
  width: min(178px, 44vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.35));
}

.following-empty h2 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.08;
}

.following-empty p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.following-empty .primary-button {
  min-height: 46px;
  padding-inline: 22px;
  border-radius: 10px;
}

.library-page-shell {
  padding-bottom: 48px;
}

.library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.library-head h1 {
  margin: 0;
  font-size: clamp(2rem, 3.1vw, 3rem);
  line-height: 1;
}

.library-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.library-new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding-inline: 18px;
  border-radius: 10px;
  white-space: nowrap;
}

.library-new-button span {
  font-size: 1.1rem;
  line-height: 1;
}

.library-selector-capsule {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 10% 0, rgba(124, 58, 237, 0.18), transparent 38%),
    rgba(10, 13, 24, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(124, 58, 237, 0.1);
  backdrop-filter: blur(16px);
}

.library-tab-row {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.library-tab-row::-webkit-scrollbar {
  display: none;
}

.library-tab-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  max-width: 180px;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(17, 19, 28, 0.82);
  color: rgba(212, 212, 216, 0.94);
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 200ms ease,
    transform 160ms ease;
}

.library-tab-row button span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-tab-row button.active {
  border-color: rgba(167, 139, 250, 0.46);
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.28);
}

.library-tab-row button:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.45);
}

.library-feed-grid .library-empty {
  grid-column: 1 / -1;
}

.library-feed-grid .profile-story-card {
  min-width: 0;
}

.library-feed-grid .profile-story-card .cover {
  aspect-ratio: 180 / 170;
}

.library-collection-modal {
  width: min(440px, calc(100vw - 32px));
}

.library-collection-form {
  display: grid;
  gap: 14px;
}

.library-collection-form label {
  display: grid;
  gap: 8px;
  color: rgba(226, 232, 240, 0.82);
  font-weight: 800;
}

.library-collection-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: 0;
  padding: 0 14px;
  background: rgba(8, 10, 18, 0.82);
  color: #fff;
}

.library-collection-form input:focus {
  border-color: rgba(124, 58, 237, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
}

.empty-mascot {
  position: relative;
  width: 30px;
  height: 24px;
  border-radius: 10px;
  background: radial-gradient(circle at 55% 24%, rgba(18, 24, 40, 0.92), #090c16 72%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    0 0 12px rgba(124, 58, 237, 0.2);
}

.empty-mascot-ear {
  position: absolute;
  top: -6px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #0a0d16;
}

.empty-mascot-ear.left { left: 5px; transform: rotate(-24deg); }
.empty-mascot-ear.right { right: 5px; transform: rotate(24deg); }

.empty-mascot-eye {
  position: absolute;
  top: 9px;
  width: 4px;
  height: 6px;
  border-radius: 50%;
}

.empty-mascot-eye.left { left: 9px; background: linear-gradient(180deg, #9b6bff, #7c3aed); }
.empty-mascot-eye.right { right: 9px; background: linear-gradient(180deg, #79deff, #3b82f6); }

.empty-mascot-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.45);
}

.empty-mascot-spark.a {
  top: -4px;
  right: -2px;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 28px 20px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 12%, rgba(124, 58, 237, 0.16) 45%, rgba(56, 189, 248, 0.14) 55%, transparent 88%);
  transform: translateX(-120%);
  animation: pageShimmer 1.5s ease-in-out infinite;
}

.skeleton-cover { aspect-ratio: 3 / 4; }
.skeleton-title { height: 16px; width: 72%; }
.skeleton-meta { height: 12px; width: 54%; opacity: 0.8; }
.skeleton-card-meta {
  display: grid;
  gap: 7px;
  padding: 0;
}
.skeleton-mini-cover { aspect-ratio: 180 / 170; border-radius: 0; }
.skeleton-continue-cover { width: 88px; height: 116px; }
.skeleton-hero { width: 100%; height: 100%; border-radius: 0; }

.mini-card-skeleton {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
}

.continue-card-skeleton {
  min-height: 120px;
}

.comic-card {
  position: relative;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    transform 220ms ease;
}

.comic-card:hover {
  transform: translateY(-4px);
}

.comic-card:active {
  transform: translateY(-1px) scale(0.99);
}

.comic-card.is-deleting {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
}

.comic-card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #101018;
}

.comic-card-main {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.comic-card-meta {
  gap: 7px;
}

.stats {
  color: rgba(161, 161, 170, 0.92);
}

.cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.24), transparent 24%),
    linear-gradient(145deg, var(--cover-a), var(--cover-b));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
  transform: translateZ(0);
  transition:
    transform 240ms ease,
    box-shadow 240ms ease,
    filter 240ms ease;
}

.comic-card:hover .cover {
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.035);
}

.cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
}

.cover span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  font-weight: 900;
  font-size: clamp(1.15rem, 2.2vw, 1.8rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.image-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.84)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), transparent 38%);
}

.image-cover span {
  z-index: 2;
}

.comic-card h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.22;
}

.comic-page-cover {
  position: relative;
}

.comic-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
}

.comic-menu-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 7, 10, 0.62);
  color: var(--text);
  cursor: pointer;
  list-style: none;
  opacity: 0;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.comic-menu-button::-webkit-details-marker {
  display: none;
}

.comic-card:hover .comic-menu-button,
.comic-page-cover:hover .comic-menu-button,
.comic-actions[open] .comic-menu-button {
  opacity: 1;
}

.comic-menu-button:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(17, 17, 24, 0.92);
  transform: scale(1.04);
}

.comic-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 160px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 23, 32, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transform-origin: top right;
  animation: menuFadeIn 160ms ease;
}

.comic-actions[open] .comic-menu {
  display: grid;
}

.comic-menu button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.comic-menu button:hover {
  background: rgba(255, 255, 255, 0.07);
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.studio-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.studio-prefix {
  color: rgba(170, 168, 189, 0.72);
  font-weight: 650;
}

.studio-line-large {
  margin: 14px 0 4px;
  color: var(--text);
  font-size: 1rem;
}

.studio-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--panel-2);
  object-fit: cover;
}

.studio-line-large .studio-avatar {
  width: 42px;
  height: 42px;
}

.stats {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  color: rgba(170, 168, 189, 0.72);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.comic-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 760px);
  gap: 34px;
  align-items: start;
  margin-bottom: 34px;
}

.comic-hero .cover {
  width: 100%;
}

.comic-info {
  padding-bottom: 10px;
}

.comic-info p {
  max-width: 68ch;
  line-height: 1.7;
}

.comic-description-block {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.comic-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
  margin: 0;
}

.comic-description.is-expanded {
  display: block;
  overflow: visible;
}

.description-toggle {
  justify-self: start;
  min-height: 36px;
  padding: 0 14px;
}

.primary-button,
.secondary-button,
.upload-form button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button,
.upload-form button {
  background: var(--accent);
  color: #08060d;
}

.read-button {
  color: #ffffff;
}

.secondary-button {
  background: var(--panel-2);
  border-color: var(--line);
}

.chapters {
  display: grid;
  gap: 10px;
}

.manage-comic {
  max-width: 920px;
  padding-top: 10px;
}

.manage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.manage-head h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
}

.manage-head span {
  color: var(--muted);
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-uploader {
  display: grid;
  gap: 20px;
}

.chapter-uploader h3 {
  margin: 0;
  font-size: 1.35rem;
}

.chapter-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 24;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06050a;
  box-shadow: 0 14px 46px rgba(155, 92, 255, 0.42);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.chapter-fab:hover {
  transform: translateY(-1px);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease;
}

.modal-shell.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.chapter-modal {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 20px;
  padding: 26px;
  border: 1px solid rgba(155, 92, 255, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(155, 92, 255, 0.16), transparent 52%),
    #151520;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  transform: translateY(8px) scale(0.98);
  transition: transform 180ms ease;
}

.modal-shell.is-open .chapter-modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
}

.modal-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 12px;
}

.chapter-uploader p {
  margin: 8px 0 0;
  color: var(--muted);
}

.chapter-row {
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 68px;
  padding: 0 10px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: left;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.chapter-row:hover {
  border-color: rgba(155, 92, 255, 0.7);
}

.chapter-row.is-deleting {
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
}

.chapter-open {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chapter-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chapter-complete {
  color: #37e2a4;
  font-size: 0.78rem;
  font-weight: 700;
}

.open-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(155, 92, 255, 0.45);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--text);
  background: rgba(155, 92, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 900;
}

.chapter-actions {
  position: relative;
  flex: 0 0 auto;
}

.chapter-menu-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.chapter-menu-button::-webkit-details-marker {
  display: none;
}

.chapter-menu-button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chapter-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 150px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171720;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.chapter-menu.is-open,
.chapter-actions[open] .chapter-menu {
  display: grid;
}

.chapter-menu button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.chapter-menu button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
}

.chapter-menu button:disabled {
  color: #6f6d7e;
}

.danger-text {
  color: var(--danger) !important;
}

.danger-modal {
  border-color: rgba(255, 85, 112, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 85, 112, 0.16), transparent 52%),
    #151520;
}

.delete-target {
  margin: 0;
  color: var(--text);
  font-weight: 900;
}

.chapter-next-number {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.chapter-next-number strong {
  color: var(--text);
}

.danger-button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--danger);
  color: #170408;
  font-weight: 900;
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(320px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(55, 226, 164, 0.36);
  border-radius: 8px;
  background: rgba(17, 17, 24, 0.94);
  color: var(--text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reader {
  margin: calc(var(--topbar) * -1 - 32px) -32px -48px calc(var(--sidebar) * -1 - 32px);
  min-height: 100vh;
  padding: 92px 18px 42px;
  background: #000;
}

body.reader-route {
  background:
    radial-gradient(circle at 62% 0%, rgba(52, 84, 185, 0.13), transparent 38%),
    radial-gradient(circle at 18% 18%, rgba(124, 58, 237, 0.11), transparent 32%),
    #05060a;
}

body.reader-route .topbar {
  left: 0;
  right: auto;
  width: var(--sidebar);
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

body.reader-route .topbar .search,
body.reader-route .topbar .top-actions {
  display: none;
}

body.reader-route .topbar .logo {
  position: static;
  width: auto;
  height: var(--topbar);
  padding: 0 28px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 7, 12, 0.96), rgba(8, 10, 16, 0.94));
  pointer-events: auto;
}

.reader-page-shell {
  padding: 24px 24px 44px calc(var(--sidebar) + 34px) !important;
}

.reader-page-shell .reader {
  display: grid;
  gap: 28px;
  min-height: calc(100vh - 68px);
  margin: 0;
  padding: 0;
  background: transparent;
}

.reader-topbar {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(360px, 620px);
  gap: 28px;
  align-items: center;
  padding-right: 330px;
}

.reader-creator-card,
.reader-page-shell .reader-controls,
.reader-progress-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 11, 20, 0.78);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.reader-creator-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 12px;
}

.reader-creator-card img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(124, 58, 237, 0.5);
}

.reader-creator-card span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.reader-creator-card strong {
  color: #fff;
  font-size: 1.1rem;
}

.reader-creator-card i {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #63a5ff);
  color: #fff;
  font-size: 0.6rem;
  font-style: normal;
}

.reader-creator-card small,
.reader-progress-panel p {
  color: rgba(226, 232, 240, 0.74);
}

.reader-creator-card button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(124, 58, 237, 0.64);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.12);
  color: #b98cff;
  font-weight: 850;
  cursor: pointer;
}

.reader-page-shell .reader-controls {
  position: static;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 22px 26px;
  border-radius: 12px;
  background: rgba(9, 11, 20, 0.78);
}

.reader-page-shell .reader-controls button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 9px;
  background: rgba(12, 15, 26, 0.88);
}

.reader-page-shell .reader-controls .reader-next-button {
  border: 0;
  background: linear-gradient(135deg, #7c3aed, #5fa5ff);
  color: #fff;
}

.reader-topbar svg,
.reader-action-rail svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reader-progress-panel {
  position: fixed;
  top: 32px;
  right: 34px;
  z-index: 21;
  display: grid;
  gap: 14px;
  width: min(330px, calc(100vw - var(--sidebar) - 64px));
  padding: 12px 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.reader-progress-panel h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.reader-progress-panel h2 span {
  color: #a970ff;
}

.reader-page-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.reader-page-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #5fa5ff);
}

.reader-progress-panel p {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
}

.reader-mobile-status-row {
  display: contents;
}

.reader-progress-percent {
  display: none;
}

.reader-page-shell .reader-stage {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(124, 58, 237, 0.36);
  border-radius: 18px;
  overflow: hidden;
  background: #05060a;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.025);
}

.reader-page-shell .reader-scroll {
  height: auto;
  max-height: calc(100vh - 196px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.5) rgba(255, 255, 255, 0.06);
}

.reader-page-shell .reader-scroll::-webkit-scrollbar {
  width: 10px;
}

.reader-page-shell .reader-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.reader-page-shell .reader-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.55);
}

.reader-page-shell .reader-content {
  gap: 0;
  padding: 0;
}

.reader-page-shell .chapter-page-image {
  width: 100%;
  margin: 0 auto;
}

.reader-page-shell .pdf-reader {
  height: calc(100vh - 196px);
  min-height: 620px;
  border: 0;
  border-radius: 18px;
}

.reader-action-rail {
  position: fixed;
  top: 50%;
  right: 78px;
  z-index: 18;
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateY(-42%);
}

.reader-action-rail button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0;
  width: 54px;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(248, 250, 252, 0.96);
  cursor: pointer;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
  transition:
    color 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.reader-action-rail button::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.28) 48%, transparent 72%);
  opacity: 0.92;
  pointer-events: none;
}

.reader-action-rail svg {
  filter:
    drop-shadow(0 0 1px rgba(0, 0, 0, 1))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 10px rgba(0, 0, 0, 0.7));
  stroke-width: 2.35;
}

.reader-action-rail button:hover {
  background: transparent;
  color: #fff;
  filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.38));
  transform: translateY(-2px);
}

.reader-action-rail button.active svg {
  color: #7c3aed;
  filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.55));
}

.reader-action-rail span {
  display: none;
}

@media (max-width: 1450px) {
  .reader-page-shell {
    padding-right: 20px !important;
    padding-left: calc(var(--sidebar) + 24px) !important;
  }

  .reader-topbar {
    grid-template-columns: minmax(240px, 300px) minmax(320px, 1fr);
    gap: 14px;
    padding-right: 290px;
  }

  .reader-page-shell .reader-controls {
    padding: 16px 18px;
  }

  .reader-page-shell .reader-controls button {
    min-height: 46px;
    padding: 0 12px;
  }

  .reader-progress-panel h2 {
    font-size: 1rem;
  }

  .reader-progress-panel {
    width: 280px;
  }

  .reader-action-rail {
    right: 64px;
  }
}

@media (max-width: 1220px) {
  .reader-page-shell {
    padding-right: 32px !important;
  }

  .reader-topbar {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .reader-creator-card {
    width: min(100%, 420px);
  }

  .reader-progress-panel {
    position: static;
    width: 100%;
    padding: 4px 2px 0;
  }

  .reader-action-rail {
    top: auto;
    right: 42px;
    bottom: 26px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(66px, auto);
    transform: none;
  }
}

@media (min-width: 768px) {
  body.reader-route {
    overflow-x: hidden;
    background:
      radial-gradient(circle at 50% -18%, rgba(124, 58, 237, 0.18), transparent 36%),
      radial-gradient(circle at 16% 44%, rgba(59, 130, 246, 0.1), transparent 32%),
      #030409;
  }

  body.reader-route .bottom-nav {
    display: none !important;
  }

  body.reader-route .topbar {
    display: grid;
  }

  body.reader-route .sidebar {
    display: flex;
  }

  body.reader-route .app-shell.reader-page-shell {
    min-height: 100vh;
    padding:
      20px
      clamp(92px, 8.4vw, 132px)
      32px
      calc(var(--sidebar) + clamp(22px, 2.2vw, 34px)) !important;
    background: transparent;
  }

  body.reader-route .reader-page-shell .reader {
    width: min(100%, 1040px);
    margin: 0 auto;
    display: grid;
    gap: 22px;
    min-height: auto;
    padding: 0;
    background: transparent;
  }

  body.reader-route .reader-topbar {
    position: sticky;
    top: 14px;
    z-index: 22;
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(250px, 1fr) minmax(230px, 300px);
    gap: 14px;
    align-items: stretch;
    padding: 0;
    max-height: 96px;
    overflow: hidden;
    background: transparent;
    backdrop-filter: none;
    transition:
      max-height 220ms ease,
      opacity 180ms ease,
      padding 220ms ease,
      transform 220ms ease;
    will-change: max-height, transform, opacity;
  }

  body.reader-route .reader-creator-card,
  body.reader-route .reader-progress-panel,
  body.reader-route .reader-page-shell .reader-controls,
  body.reader-route .reader-action-rail {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
      rgba(10, 13, 24, 0.82);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 16px 42px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
  }

  body.reader-route .reader-creator-card {
    width: 100%;
    min-height: 72px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 15px;
  }

  body.reader-route .reader-creator-card img {
    width: 48px;
    height: 48px;
    border-width: 1px;
  }

  body.reader-route .reader-creator-card strong {
    font-size: 0.96rem;
    line-height: 1.15;
  }

  body.reader-route .reader-creator-card small {
    font-size: 0.78rem;
  }

  body.reader-route .reader-creator-card button {
    min-height: 38px;
    padding: 0 17px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #675dff);
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.25);
  }

  body.reader-route .reader-page-shell .reader-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: center;
    gap: 9px;
    min-height: 72px;
    padding: 10px;
    border-radius: 15px;
  }

  body.reader-route .reader-page-shell .reader-controls button {
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
  }

  body.reader-route .reader-progress-panel {
    position: static;
    width: 100%;
    min-height: 72px;
    align-content: center;
    gap: 9px;
    padding: 11px 13px;
    border-radius: 15px;
  }

  body.reader-route .reader-progress-panel h2 {
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.reader-route .reader-progress-panel p {
    font-size: 0.78rem;
  }

  body.reader-route .reader-page-shell .reader-stage {
    position: relative;
    width: min(100%, 980px);
    justify-self: center;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.reader-route .reader-page-shell .reader-scroll {
    max-height: none;
    overflow: visible;
  }

  body.reader-route .reader-page-shell .reader-content {
    display: grid;
    gap: 16px;
    padding: 0 0 20px;
  }

  body.reader-route .reader-page-shell .chapter-page-image {
    width: min(100%, 860px);
    border: 1px solid rgba(124, 58, 237, 0.38);
    border-radius: 18px;
    background: #070913;
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(255, 255, 255, 0.025);
  }

  body.reader-route .reader-page-shell .pdf-reader {
    height: calc(100vh - 122px);
    min-height: 620px;
    border-radius: 18px;
  }
}

@media (min-width: 768px) and (max-width: 1439px) {
  body.reader-route.reader-top-hidden .reader-topbar {
    max-height: 0;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    transform: translateY(-120%);
    visibility: hidden;
  }
}

@media (min-width: 1024px) {
  body.reader-route .reader-page-shell .reader {
    padding-right: 0;
  }

  body.reader-route .reader-action-rail {
    position: fixed;
    top: 50%;
    right: clamp(20px, 3vw, 42px);
    bottom: auto;
    z-index: 24;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 76px;
    padding: 12px 9px;
    border-radius: 22px;
    transform: translateY(-50%);
  }

  body.reader-route .reader-action-rail button:nth-child(n + 5) {
    display: none;
  }

  body.reader-route .reader-action-rail button {
    width: 100%;
    min-height: 70px;
    border-radius: 16px;
    gap: 7px;
    color: rgba(226, 232, 240, 0.78);
  }

  body.reader-route .reader-action-rail button::before {
    display: none;
  }

  body.reader-route .reader-action-rail svg {
    width: 23px;
    height: 23px;
    filter: none;
  }

  body.reader-route .reader-action-rail span {
    display: block;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body.reader-route .app-shell.reader-page-shell {
    padding: 18px 18px 98px calc(var(--sidebar) + 18px) !important;
  }

  body.reader-route .reader-page-shell .reader {
    width: min(100%, 760px);
    gap: 18px;
  }

  body.reader-route .reader-topbar {
    position: sticky;
    top: 10px;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    max-height: 250px;
  }

  body.reader-route .reader-creator-card {
    min-height: 66px;
  }

  body.reader-route .reader-page-shell .reader-controls {
    order: 3;
    min-height: 62px;
    padding: 8px;
  }

  body.reader-route .reader-progress-panel {
    min-height: 66px;
  }

  body.reader-route .reader-page-shell .reader-stage {
    order: 5;
    width: 100%;
  }

  body.reader-route .reader-page-shell .chapter-page-image {
    width: 100%;
    border-radius: 16px;
  }

  body.reader-route .reader-action-rail {
    order: 4;
    position: static;
    z-index: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding: 8px;
    border-radius: 21px;
    transform: none;
  }

  body.reader-route .reader-action-rail button:nth-child(n + 5) {
    display: none;
  }

  body.reader-route .reader-action-rail button {
    width: auto;
    min-height: 50px;
    border-radius: 14px;
    gap: 4px;
  }

  body.reader-route .reader-action-rail button::before {
    display: none;
  }

  body.reader-route .reader-action-rail svg {
    width: 20px;
    height: 20px;
    filter: none;
  }

  body.reader-route .reader-action-rail span {
    display: block;
    font-size: 0.68rem;
    font-weight: 650;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body.reader-route .reader-mobile-status-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.reader-route .reader-creator-card {
    box-sizing: border-box;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-height: 66px;
  }

  body.reader-route .reader-creator-card img {
    grid-row: 1 / 3;
    align-self: center;
  }

  body.reader-route .reader-creator-card span {
    align-self: end;
    gap: 0;
  }

  body.reader-route .reader-creator-card small {
    display: none;
  }

  body.reader-route .reader-creator-card button {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    align-self: start;
    min-height: 28px;
    padding: 0 13px;
    font-size: 0.74rem;
  }

  body.reader-route .reader-progress-panel {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    min-height: 66px;
    gap: 7px 10px;
  }

  body.reader-route .reader-progress-panel h2 {
    grid-column: 1;
  }

  body.reader-route .reader-comic-title,
  body.reader-route .reader-title-separator {
    display: none;
  }

  body.reader-route .reader-progress-percent {
    display: block;
    grid-column: 2;
    color: #f8fafc;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
  }

  body.reader-route .reader-page-progress {
    grid-column: 1 / -1;
  }

  body.reader-route .reader-progress-panel p {
    display: none;
  }

  body.reader-route .reader-page-shell .reader-controls {
    grid-column: 1 / -1;
    order: 3;
  }
}

.reader-controls {
  position: sticky;
  top: 14px;
  z-index: 12;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 auto 12px;
  width: fit-content;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.reader-exit-fab {
  position: fixed;
  top: 14px;
  right: 14px;
  display: none;
  z-index: 16;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #f1eff7;
  font-size: 1.12rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0.9;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    background 220ms ease;
}

.reader-exit-fab:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.72);
}

.reader-stage {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.reader-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.reader-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 220ms ease;
}

.pdf-reader {
  display: block;
  width: 100%;
  height: calc(100vh - 150px);
  min-height: 620px;
  margin: 0 auto;
  border: 1px solid #1f1f2b;
  border-radius: 8px;
  background: #111118;
}

.reader-scroll {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.reader-content {
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: 10px;
  padding: 8px 0 16px;
  overflow: visible;
}

.chapter-page-image {
  width: 100%;
  height: auto;
  display: block;
}

.preload-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.reader-fullscreen {
  overflow-y: auto;
  overflow-x: hidden;
}

.reader-fullscreen .topbar,
.reader-fullscreen .sidebar,
.reader-fullscreen .bottom-nav {
  display: none;
}

.reader-fullscreen .app-shell {
  padding: 0;
}

.reader-fullscreen .reader {
  position: fixed;
  inset: 0;
  z-index: 100;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  padding: 0;
  background: #000;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.reader-fullscreen .normal-reader-controls {
  display: none;
}

.reader-fullscreen .reader-exit-fab {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: fixed !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  right: 12px !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
  width: 44px !important;
  height: 44px !important;
  background: #ff2d55 !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

.reader-fullscreen .reader-stage {
  width: 100%;
  height: auto;
  min-height: 100vh;
  margin: 0;
}

.reader-fullscreen .pdf-reader {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #000;
}

.reader-fullscreen.image-reader-mode .reader-scroll {
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.upload-shell,
.empty-state,
.auth-shell {
  max-width: 760px;
}

body[data-auth-screen="true"] {
  overflow: auto;
  background:
    radial-gradient(circle at 26% 46%, rgba(111, 38, 255, 0.25), transparent 34%),
    radial-gradient(circle at 73% 16%, rgba(58, 145, 255, 0.16), transparent 30%),
    #05060d;
}

body[data-auth-screen="true"] .topbar,
body[data-auth-screen="true"] .sidebar,
body[data-auth-screen="true"] .bottom-nav {
  display: none !important;
}

/* Local auth utility fallback for renderLogin(). Keep scoped: this replaces the
   former runtime Tailwind CDN dependency without changing auth markup or flow. */
body[data-auth-screen="true"] {
  overflow: hidden !important;
  background: #11131c !important;
  color: #e1e1ef;
}

body[data-auth-screen="true"] .topbar,
body[data-auth-screen="true"] .sidebar,
body[data-auth-screen="true"] .bottom-nav,
body[data-auth-screen="true"]:not(.reader-route) .topbar,
body[data-auth-screen="true"]:not(.reader-route)[data-sidebar-state="collapsed"] .topbar,
body[data-auth-screen="true"][data-active-route="profile"] .topbar,
body[data-auth-screen="true"][data-active-route="upload"] .topbar,
body[data-auth-screen="true"][data-active-route="following"] .topbar,
body[data-auth-screen="true"][data-active-route="library"] .topbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body[data-auth-screen="true"] #app {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

body[data-auth-screen="true"] #app.h-screen {
  height: 100vh !important;
  min-height: 100vh !important;
}

body[data-auth-screen="true"] #app.w-full,
body[data-auth-screen="true"] #app .w-full {
  width: 100% !important;
}

body[data-auth-screen="true"] #app.flex {
  display: flex !important;
}

body[data-auth-screen="true"] #app.overflow-hidden,
body[data-auth-screen="true"] #app .overflow-hidden {
  overflow: hidden !important;
}

body[data-auth-screen="true"] #app.bg-background,
body[data-auth-screen="true"] #app .bg-background {
  background: #11131c !important;
}

[data-auth-root] {
  min-height: 100%;
  color: #e1e1ef;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-auth-root] .hidden { display: none !important; }
[data-auth-root] .block { display: block !important; }
[data-auth-root] .flex { display: flex !important; }
[data-auth-root] .flex-col { flex-direction: column !important; }
[data-auth-root] .flex-wrap { flex-wrap: wrap !important; }
[data-auth-root] .flex-1 { flex: 1 1 0% !important; }
[data-auth-root] .flex-grow { flex-grow: 1 !important; }
[data-auth-root] .flex-shrink { flex-shrink: 1 !important; }
[data-auth-root] .items-center { align-items: center !important; }
[data-auth-root] .items-stretch { align-items: stretch !important; }
[data-auth-root] .justify-center { justify-content: center !important; }
[data-auth-root] .justify-between { justify-content: space-between !important; }
[data-auth-root] .relative { position: relative !important; }
[data-auth-root] .absolute { position: absolute !important; }
[data-auth-root] .inset-0 { inset: 0 !important; }
[data-auth-root] .z-0 { z-index: 0 !important; }
[data-auth-root] .z-10 { z-index: 10 !important; }
[data-auth-root] .overflow-hidden { overflow: hidden !important; }
[data-auth-root] .overflow-y-auto { overflow-y: auto !important; }

[data-auth-root] .w-full { width: 100% !important; }
[data-auth-root] .w-auto { width: auto !important; }
[data-auth-root] .w-10 { width: 2.5rem !important; }
[data-auth-root] .w-24 { width: 6rem !important; }
[data-auth-root] .w-28 { width: 7rem !important; }
[data-auth-root] .w-72 { width: 18rem !important; }
[data-auth-root] .h-full { height: 100% !important; }
[data-auth-root] .h-1\.5 { height: 0.375rem !important; }
[data-auth-root] .h-8 { height: 2rem !important; }
[data-auth-root] .h-10 { height: 2.5rem !important; }
[data-auth-root] .h-24 { height: 6rem !important; }
[data-auth-root] .h-28 { height: 7rem !important; }
[data-auth-root] .h-72 { height: 18rem !important; }
[data-auth-root] .max-w-md { max-width: 28rem !important; }
[data-auth-root] .max-w-lg { max-width: 32rem !important; }

[data-auth-root] .m-0 { margin: 0 !important; }
[data-auth-root] .mx-auto { margin-left: auto !important; margin-right: auto !important; }
[data-auth-root] .mx-4 { margin-left: 1rem !important; margin-right: 1rem !important; }
[data-auth-root] .my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
[data-auth-root] .mt-4 { margin-top: 1rem !important; }
[data-auth-root] .mt-6 { margin-top: 1.5rem !important; }
[data-auth-root] .mt-8 { margin-top: 2rem !important; }
[data-auth-root] .mb-1 { margin-bottom: 0.25rem !important; }
[data-auth-root] .mb-2 { margin-bottom: 0.5rem !important; }
[data-auth-root] .mb-4 { margin-bottom: 1rem !important; }
[data-auth-root] .mb-6 { margin-bottom: 1.5rem !important; }
[data-auth-root] .mb-8 { margin-bottom: 2rem !important; }
[data-auth-root] .ml-3 { margin-left: 0.75rem !important; }
[data-auth-root] .p-6 { padding: 1.5rem !important; }
[data-auth-root] .px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
[data-auth-root] .px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
[data-auth-root] .px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
[data-auth-root] .py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
[data-auth-root] .py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
[data-auth-root] .py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
[data-auth-root] .py-3\.5 { padding-top: 0.875rem !important; padding-bottom: 0.875rem !important; }
[data-auth-root] .pt-6 { padding-top: 1.5rem !important; }
[data-auth-root] .gap-1 { gap: 0.25rem !important; }
[data-auth-root] .gap-1\.5 { gap: 0.375rem !important; }
[data-auth-root] .gap-2 { gap: 0.5rem !important; }
[data-auth-root] .gap-3 { gap: 0.75rem !important; }
[data-auth-root] .gap-4 { gap: 1rem !important; }
[data-auth-root] .gap-6 { gap: 1.5rem !important; }

[data-auth-root] .object-contain { object-fit: contain !important; }
[data-auth-root] .object-cover { object-fit: cover !important; }
[data-auth-root] .opacity-60 { opacity: 0.6 !important; }
[data-auth-root] .opacity-80 { opacity: 0.8 !important; }
[data-auth-root] .select-none { user-select: none !important; }
[data-auth-root] .cursor-pointer { cursor: pointer !important; }

[data-auth-root] .rounded { border-radius: 0.25rem !important; }
[data-auth-root] .rounded-xl { border-radius: 0.75rem !important; }
[data-auth-root] .rounded-full { border-radius: 9999px !important; }
[data-auth-root] .border { border-width: 1px !important; border-style: solid !important; }
[data-auth-root] .border-l { border-left-width: 1px !important; border-left-style: solid !important; }
[data-auth-root] .border-t { border-top-width: 1px !important; border-top-style: solid !important; }
[data-auth-root] .border-outline-variant\/10 { border-color: rgba(73, 68, 84, 0.1) !important; }
[data-auth-root] .border-outline-variant\/20 { border-color: rgba(73, 68, 84, 0.2) !important; }

[data-auth-root] .bg-background { background-color: #11131c !important; }
[data-auth-root] .bg-surface { background-color: #11131c !important; }
[data-auth-root] .bg-surface-container { background-color: #1d1f29 !important; }
[data-auth-root] .bg-surface-container-low { background-color: #191b24 !important; }
[data-auth-root] .bg-surface-variant { background-color: #32343e !important; }
[data-auth-root] .bg-primary { background-color: #d0bcff !important; }
[data-auth-root] .bg-transparent { background-color: transparent !important; }
[data-auth-root] .bg-gradient-to-r { background-image: linear-gradient(to right, var(--auth-gradient-from, transparent), var(--auth-gradient-to, transparent)) !important; }
[data-auth-root] .from-primary { --auth-gradient-from: #d0bcff; }
[data-auth-root] .from-transparent { --auth-gradient-from: transparent; }
[data-auth-root] .to-secondary { --auth-gradient-to: #c4c1fb; }
[data-auth-root] .to-surface { --auth-gradient-to: #11131c; }
[data-auth-root] .bg-clip-text { -webkit-background-clip: text !important; background-clip: text !important; }

[data-auth-root] .text-on-primary { color: #3c0091 !important; }
[data-auth-root] .text-on-surface { color: #e1e1ef !important; }
[data-auth-root] .text-on-surface-variant { color: #cbc3d7 !important; }
[data-auth-root] .text-outline { color: #958ea0 !important; }
[data-auth-root] .text-primary { color: #d0bcff !important; }
[data-auth-root] .text-error { color: #ffb4ab !important; }
[data-auth-root] .text-transparent { color: transparent !important; }
[data-auth-root] .placeholder\:text-outline::placeholder { color: #958ea0 !important; }

[data-auth-root] .text-center { text-align: center !important; }
[data-auth-root] .text-\[10px\] { font-size: 10px !important; }
[data-auth-root] .text-\[18px\] { font-size: 18px !important; }
[data-auth-root] .text-\[20px\] { font-size: 20px !important; }
[data-auth-root] .text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
[data-auth-root] .text-body-sm { font-size: 12px !important; line-height: 16px !important; }
[data-auth-root] .text-body-md { font-size: 14px !important; line-height: 20px !important; }
[data-auth-root] .text-body-lg { font-size: 16px !important; line-height: 24px !important; }
[data-auth-root] .text-label-bold { font-size: 12px !important; line-height: 16px !important; font-weight: 700 !important; }
[data-auth-root] .text-headline-md { font-size: 24px !important; line-height: 32px !important; }
[data-auth-root] .text-display-lg { font-size: 36px !important; line-height: 44px !important; }
[data-auth-root] .font-black { font-weight: 900 !important; }
[data-auth-root] .font-bold { font-weight: 700 !important; }
[data-auth-root] .font-extrabold { font-weight: 800 !important; }
[data-auth-root] .font-semibold { font-weight: 600 !important; }
[data-auth-root] .tracking-tight { letter-spacing: -0.02em !important; }
[data-auth-root] .leading-tight { line-height: 1.25 !important; }
[data-auth-root] .leading-relaxed { line-height: 1.625 !important; }

[data-auth-root] .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3) !important; }
[data-auth-root] .shadow-primary\/20 { box-shadow: 0 10px 24px rgba(208, 188, 255, 0.2) !important; }
[data-auth-root] .drop-shadow-\[0_0_50px_rgba\(139\,92\,246\,0\.4\)\] { filter: drop-shadow(0 0 50px rgba(139, 92, 246, 0.4)) !important; }

[data-auth-root] .transition-all { transition-property: all !important; }
[data-auth-root] .transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important; }
[data-auth-root] .duration-200 { transition-duration: 200ms !important; }
[data-auth-root] .duration-300 { transition-duration: 300ms !important; }
[data-auth-root] .hover\:underline:hover { text-decoration-line: underline !important; }
[data-auth-root] .hover\:bg-primary-container:hover { background-color: #a078ff !important; }
[data-auth-root] .hover\:bg-surface-container:hover { background-color: #1d1f29 !important; }
[data-auth-root] .hover\:bg-surface-container-high:hover { background-color: #282933 !important; }
[data-auth-root] .hover\:text-on-surface:hover { color: #e1e1ef !important; }
[data-auth-root] .focus\:outline-none:focus { outline: 2px solid transparent !important; outline-offset: 2px !important; }
[data-auth-root] .focus\:ring-primary:focus { box-shadow: 0 0 0 2px rgba(208, 188, 255, 0.35) !important; }

[data-auth-root] button {
  background-color: transparent;
  border: 0;
}

[data-auth-root] button.border {
  border-width: 1px !important;
}

[data-auth-root] input {
  min-width: 0;
}

[data-auth-root] .input-focus-glow input {
  appearance: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

[data-auth-root] .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

@media (max-width: 1023px) {
  [data-auth-root] main {
    min-height: 100vh;
  }
}

@media (min-width: 1024px) {
  [data-auth-root] .lg\:flex { display: flex !important; }
  [data-auth-root] .lg\:w-96 { width: 24rem !important; }
  [data-auth-root] .lg\:h-96 { height: 24rem !important; }
[data-auth-root] .lg\:w-\[480px\] {
    width: 480px !important;
    flex: 0 0 480px !important;
  }
}

[data-auth-root] [data-auth-panel][style*="display: none"] {
  display: none !important;
}

body[data-auth-screen="true"] #app [data-auth-root] [data-auth-panel][style*="display: none"],
body[data-auth-screen="true"] #app [data-auth-root] [data-auth-panel][style*="display:none"] {
  display: none !important;
}

.signedout-page-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0 !important;
}

.app-shell.signedout-page-shell {
  padding: 0 !important;
}

.signedout-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  color: #f7f7fb;
}

.signedout-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
  gap: clamp(28px, 4vw, 72px);
  width: min(1540px, calc(100vw - 44px));
  min-height: calc(100vh - 44px);
  overflow: hidden;
  padding: clamp(34px, 4vw, 62px) clamp(34px, 5vw, 78px) 70px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background:
    radial-gradient(circle at 34% 34%, rgba(121, 57, 255, 0.2), transparent 31%),
    radial-gradient(circle at 8% 85%, rgba(93, 40, 255, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(10, 11, 24, 0.96), rgba(3, 5, 13, 0.98));
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.48);
}

.signedout-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(168, 121, 255, 0.95) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(112, 169, 255, 0.75) 0 1px, transparent 1.5px);
  background-position: 9% 19%, 32% 36%;
  background-size: 150px 150px, 230px 230px;
  opacity: 0.55;
}

.signedout-language {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(15, 17, 33, 0.86);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
}

.signedout-moon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: -5px 0 0 #ffffff inset;
}

.signedout-story,
.signedout-panel-wrap {
  position: relative;
  z-index: 1;
}

.signedout-story {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 690px;
}

.signedout-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 950;
  letter-spacing: 0;
}

.signedout-brand img {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.55));
}

.signedout-brand span span,
.signedout-copy h1 span,
.signedout-create button,
.signedout-link,
.signedout-terms button {
  color: #9b6bff;
}

.signedout-copy {
  max-width: 560px;
  margin-top: clamp(42px, 6vh, 72px);
}

.signedout-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5.1vw, 4.55rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.signedout-copy p {
  max-width: 380px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  line-height: 1.55;
}

.signedout-visual {
  position: relative;
  min-height: 430px;
}

.signedout-cat {
  position: absolute;
  left: 31%;
  bottom: 76px;
  width: clamp(230px, 24vw, 360px);
  aspect-ratio: 1 / 0.92;
  border-radius: 48% 48% 44% 44%;
  background:
    radial-gradient(circle at 34% 39%, rgba(160, 92, 255, 0.62) 0 7%, transparent 8%),
    radial-gradient(circle at 64% 39%, rgba(86, 177, 255, 0.82) 0 7%, transparent 8%),
    radial-gradient(circle at 52% 85%, rgba(93, 38, 178, 0.56), transparent 31%),
    linear-gradient(145deg, #0d0d18, #05050b 70%);
  box-shadow:
    0 0 58px rgba(137, 73, 255, 0.42),
    0 28px 70px rgba(0, 0, 0, 0.58);
}

.cat-ear {
  position: absolute;
  top: -18%;
  width: 30%;
  height: 36%;
  border: 2px solid rgba(162, 96, 255, 0.72);
  border-radius: 10px 90% 12px 90%;
  background: linear-gradient(145deg, #111122, #1f0f3d 64%, #9b5cff);
}

.cat-ear.left {
  left: 12%;
  transform: rotate(-22deg);
}

.cat-ear.right {
  right: 12%;
  transform: rotate(22deg) scaleX(-1);
}

.cat-eye {
  position: absolute;
  top: 38%;
  width: 18%;
  height: 24%;
  border-radius: 50%;
  box-shadow: 0 0 22px currentColor;
}

.cat-eye.left {
  left: 29%;
  color: #9b5cff;
  background: radial-gradient(circle at 60% 24%, #fff 0 10%, transparent 11%), #9b5cff;
}

.cat-eye.right {
  right: 29%;
  color: #58b7ff;
  background: radial-gradient(circle at 58% 22%, #fff 0 10%, transparent 11%), #58b7ff;
}

.cat-nose {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 20px;
  height: 14px;
  border-radius: 50% 50% 60% 60%;
  background: #b76dff;
  transform: translateX(-50%);
}

.cat-whisker {
  position: absolute;
  top: 62%;
  width: 35%;
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
}

.whisker-a {
  left: -7%;
  transform: rotate(-4deg);
}

.whisker-b {
  right: -7%;
  transform: rotate(4deg);
}

.signedout-ring {
  position: absolute;
  left: 18%;
  right: 16%;
  bottom: 34px;
  height: 92px;
  border: 2px solid rgba(154, 89, 255, 0.8);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(100, 42, 255, 0.3), transparent 63%);
  box-shadow: 0 0 38px rgba(126, 62, 255, 0.46);
}

.signedout-star {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #b88cff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  box-shadow: 0 0 16px rgba(159, 105, 255, 0.9);
}

.star-a { left: 16%; top: 15%; }
.star-b { left: 59%; top: 8%; }
.star-c { right: 18%; top: 36%; }

.signedout-panel {
  position: absolute;
  width: clamp(86px, 10vw, 140px);
  aspect-ratio: 0.72;
  border: 2px solid rgba(126, 74, 255, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(rgba(58, 33, 116, 0.12), rgba(15, 9, 37, 0.82)),
    linear-gradient(135deg, rgba(93, 167, 255, 0.38), rgba(12, 13, 28, 0.9));
  box-shadow: 0 14px 36px rgba(18, 9, 52, 0.6);
}

.panel-a {
  left: 7%;
  top: 34%;
  transform: rotate(-14deg);
}

.panel-b {
  right: 18%;
  top: 5%;
  transform: rotate(18deg);
}

.panel-c {
  right: 5%;
  bottom: 120px;
  transform: rotate(12deg);
}

.signedout-comic-card {
  position: absolute;
  left: 23%;
  bottom: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: 190px minmax(180px, 1fr);
  align-items: center;
  width: min(470px, 72%);
  min-height: 122px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(164, 93, 255, 0.85);
  border-radius: 10px;
  background: rgba(13, 10, 28, 0.78);
  color: #fff;
  text-align: left;
  box-shadow: 0 0 32px rgba(126, 56, 255, 0.52);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.signedout-comic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 42px rgba(126, 56, 255, 0.64);
}

.signedout-comic-cover {
  width: 100%;
  height: 122px;
}

.signedout-comic-cover .cover {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.signedout-comic-card span:last-child {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
}

.signedout-comic-card strong {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.2;
}

.signedout-comic-card small {
  color: #b986ff;
  font-weight: 800;
}

.signedout-panel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 58px;
}

.signedout-login-card {
  width: min(100%, 620px);
  display: grid;
  gap: 24px;
  padding: clamp(34px, 4vw, 50px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(94, 116, 255, 0.12), transparent 35%),
    rgba(14, 16, 31, 0.82);
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.signedout-card-head h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.signedout-card-head p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.18rem;
}

.signedout-field {
  display: grid;
  gap: 10px;
  font-weight: 800;
}

.signedout-input {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  min-height: 64px;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 13px;
  background: rgba(8, 10, 22, 0.64);
  color: rgba(255, 255, 255, 0.6);
  transition: border-color 190ms ease, box-shadow 190ms ease;
}

.signedout-input:focus-within {
  border-color: rgba(151, 93, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(132, 75, 255, 0.16);
}

.signedout-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.signedout-input input::placeholder {
  color: rgba(226, 232, 240, 0.56);
}

.signedout-input-icon,
.signedout-eye {
  display: grid;
  place-items: center;
}

.signedout-input-icon svg,
.signedout-eye svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signedout-eye,
.signedout-link,
.signedout-create button,
.signedout-skip,
.signedout-terms button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.signedout-eye {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
}

.signedout-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.signedout-remember {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.signedout-remember input {
  position: absolute;
  opacity: 0;
}

.signedout-remember span {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #7654ff, #5c7cff);
  box-shadow: 0 8px 22px rgba(102, 90, 255, 0.32);
}

.signedout-remember span::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 8px;
  height: 14px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.signedout-link,
.signedout-create button {
  font-weight: 900;
}

.signedout-login-button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 66px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #7f2dff 0%, #7a55ff 48%, #51a7ff 100%);
  color: #fff;
  font-size: 1.26rem;
  font-weight: 950;
  box-shadow: 0 18px 44px rgba(83, 110, 255, 0.33);
  cursor: pointer;
  transition: filter 190ms ease, transform 190ms ease;
}

.signedout-login-button:hover,
.signedout-google:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.signedout-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.7);
}

.signedout-divider::before,
.signedout-divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.signedout-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(9, 11, 24, 0.54);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 900;
  cursor: pointer;
  transition: filter 190ms ease, transform 190ms ease, border-color 190ms ease;
}

.signedout-google span {
  color: #4285f4;
  font-size: 1.7rem;
  font-weight: 950;
}

.signedout-create {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  text-align: center;
}

.signedout-skip {
  width: max-content;
  margin: -8px auto 0;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 800;
}

.signedout-skip:hover,
.signedout-link:hover,
.signedout-create button:hover,
.signedout-terms button:hover {
  color: #6fb2ff;
}

.signedout-terms {
  position: absolute;
  left: 50%;
  bottom: 27px;
  z-index: 2;
  width: min(720px, calc(100% - 48px));
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 1rem;
}

@media (max-width: 1180px) {
  .signedout-frame {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 86px;
  }

  .signedout-story {
    min-height: 560px;
  }

  .signedout-copy {
    margin-top: 34px;
  }

  .signedout-panel-wrap {
    padding-top: 0;
  }

  .signedout-login-card {
    width: min(100%, 720px);
    margin: 0 auto;
  }

  .signedout-visual {
    min-height: 320px;
  }

  .signedout-cat {
    left: 38%;
    bottom: 62px;
    width: clamp(210px, 30vw, 310px);
  }

  .signedout-comic-card {
    left: 25%;
    width: min(450px, 58%);
  }
}

@media (max-width: 760px) {
  .signedout-shell {
    padding: 12px;
  }

  .signedout-frame {
    width: 100%;
    min-height: calc(100vh - 24px);
    padding: 24px 18px 82px;
    border-radius: 16px;
  }

  .signedout-language {
    position: static;
    justify-self: end;
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .signedout-story {
    min-height: auto;
  }

  .signedout-brand {
    font-size: 2rem;
  }

  .signedout-brand img {
    width: 56px;
    height: 56px;
  }

  .signedout-copy {
    margin-top: 30px;
  }

  .signedout-copy h1 {
    font-size: clamp(2.55rem, 13vw, 3.4rem);
  }

  .signedout-copy p {
    margin-top: 18px;
    font-size: 1.04rem;
  }

  .signedout-visual {
    min-height: 260px;
    margin-top: 10px;
  }

  .signedout-cat {
    left: 50%;
    bottom: 58px;
    width: min(58vw, 230px);
    transform: translateX(-50%);
  }

  .signedout-ring {
    left: 13%;
    right: 13%;
    bottom: 28px;
    height: 58px;
  }

  .signedout-panel {
    width: 72px;
  }

  .panel-b {
    right: 7%;
  }

  .panel-c {
    display: none;
  }

  .signedout-comic-card {
    left: 50%;
    bottom: 0;
    grid-template-columns: 104px 1fr;
    width: min(360px, 92%);
    min-height: 86px;
    transform: translateX(-50%);
  }

  .signedout-comic-card:hover {
    transform: translateX(-50%) translateY(-2px);
  }

  .signedout-comic-cover {
    height: 86px;
  }

  .signedout-comic-card span:last-child {
    gap: 6px;
    padding: 12px;
  }

  .signedout-comic-card strong {
    font-size: 1rem;
  }

  .signedout-login-card {
    gap: 18px;
    padding: 24px 18px;
    border-radius: 15px;
  }

  .signedout-card-head h2 {
    font-size: 2rem;
  }

  .signedout-card-head p,
  .signedout-create {
    font-size: 0.98rem;
  }

  .signedout-input,
  .signedout-google,
  .signedout-login-button {
    min-height: 56px;
  }

  .signedout-form-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .signedout-terms {
    bottom: 20px;
    font-size: 0.84rem;
  }
}

@media (max-height: 780px) and (min-width: 1181px) {
  .signedout-frame {
    padding-top: 30px;
    padding-bottom: 48px;
  }

  .signedout-story {
    min-height: 590px;
  }

  .signedout-copy {
    margin-top: 30px;
  }

  .signedout-copy h1 {
    font-size: clamp(2.7rem, 4.2vw, 3.7rem);
  }

  .signedout-visual {
    min-height: 355px;
  }

  .signedout-login-card {
    gap: 17px;
    padding: 30px 36px;
  }

  .signedout-input,
  .signedout-google,
  .signedout-login-button {
    min-height: 56px;
  }

  .signedout-card-head h2 {
    font-size: 2.25rem;
  }
}

.profile-shell {
  max-width: 1080px;
}

.auth-form {
  max-width: 520px;
}

.profile-head {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid rgba(155, 92, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(155, 92, 255, 0.16), transparent 55%),
    rgba(17, 17, 24, 0.82);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.32);
}

.profile-avatar-ring {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 42px rgba(155, 92, 255, 0.28);
}

.profile-avatar {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 4px solid #111118;
  background: var(--panel-2);
  object-fit: cover;
}

.profile-head h1 {
  margin: 4px 0 6px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1;
}

.profile-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.profile-logout {
  min-width: 110px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 12px;
  margin-bottom: 32px;
}

.profile-stats div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 17, 24, 0.78);
}

.profile-stats strong {
  font-size: 1.7rem;
  line-height: 1;
}

.profile-stats span,
.profile-note {
  color: var(--muted);
  font-weight: 700;
}

.profile-my-comics {
  margin-top: 26px;
}

.profile-grid {
  margin-bottom: 24px;
}

.profile-page-shell {
  padding-bottom: 48px;
}

.profile-shell {
  max-width: none;
}

.profile-hero-card,
.profile-tabs,
.profile-content-section,
.profile-side-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(10, 13, 24, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.profile-hero-card {
  position: relative;
  min-height: 304px;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 0, rgba(124, 58, 237, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(12, 15, 33, 0.9), rgba(8, 10, 18, 0.96));
}

.profile-banner-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 20, 0.18), rgba(8, 9, 20, 0.88)),
    radial-gradient(circle at 63% 16%, rgba(55, 90, 190, 0.42), transparent 30%),
    linear-gradient(145deg, #080a18 0%, #101844 54%, #080914 100%);
}

.profile-banner-art::before {
  content: "";
  position: absolute;
  inset: auto -8% 0 30%;
  height: 60%;
  background:
    linear-gradient(135deg, transparent 0 35%, rgba(33, 39, 74, 0.92) 36% 42%, transparent 43%),
    linear-gradient(155deg, transparent 0 48%, rgba(17, 23, 48, 0.95) 49% 55%, transparent 56%);
  opacity: 0.82;
}

.profile-banner-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(129, 169, 255, 0.75) 0 1px, transparent 1.5px);
  background-size: 210px 150px;
  opacity: 0.42;
}

.profile-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 180px minmax(280px, 1fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: 26px;
  min-height: 304px;
  padding: 28px 38px;
}

.profile-avatar-wrap {
  position: relative;
  align-self: start;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 164px;
  height: 164px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: #101420;
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.22),
    0 22px 52px rgba(0, 0, 0, 0.42);
  object-fit: cover;
}

.profile-avatar-fallback {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 950;
  background:
    radial-gradient(circle at 30% 25%, rgba(124, 58, 237, 0.54), transparent 32%),
    linear-gradient(135deg, #0d1020, #151b31);
}

.profile-edit-avatar {
  position: absolute;
  right: 3px;
  bottom: 13px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(18, 20, 32, 0.96);
  color: #fff;
  cursor: pointer;
}

.profile-edit-avatar svg,
.profile-meta-row svg,
.profile-tabs svg,
.profile-share-button svg,
.profile-summary-list svg,
.profile-continue-info small svg,
.profile-library-meta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-identity h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: clamp(2rem, 3vw, 2.55rem);
  line-height: 1.05;
}

.profile-verified {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #7aa7ff);
  color: #fff;
  font-size: 0.9rem;
}

.profile-handle,
.profile-bio,
.profile-meta-row,
.profile-tabs button,
.profile-summary-list dt,
.profile-activity-list small {
  color: rgba(226, 232, 240, 0.78);
}

.profile-handle {
  margin: 0 0 22px;
  font-weight: 700;
}

.profile-bio {
  margin: 0 0 22px;
  max-width: 470px;
  line-height: 1.55;
}

.profile-meta-row,
.profile-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.profile-meta-row span,
.profile-summary-list dt,
.profile-continue-info small,
.profile-library-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-action-row {
  grid-column: 2 / 3;
  align-self: start;
  margin-top: 24px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    rgba(5, 7, 16, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.profile-edit-button,
.profile-share-button,
.profile-logout-button,
.profile-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 13px;
  font-size: 0.92rem;
  font-weight: 680;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: none;
}

.profile-edit-button svg,
.profile-share-button svg,
.profile-logout-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-edit-button {
  min-width: 128px;
  border-color: rgba(183, 160, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 44%),
    linear-gradient(135deg, #7c3aed 0%, #6574ff 100%);
  color: #fff;
  box-shadow:
    0 12px 26px rgba(124, 58, 237, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.profile-share-button {
  min-width: 156px;
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(8, 10, 20, 0.82);
  color: rgba(248, 250, 252, 0.92);
}

.profile-logout-button {
  min-width: 104px;
  border-color: rgba(248, 113, 113, 0.24);
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.11), rgba(248, 113, 113, 0.035)),
    rgba(18, 9, 16, 0.72);
  color: #fed7d7;
}

.profile-logout-button:hover {
  border-color: rgba(248, 113, 113, 0.48);
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.16), rgba(248, 113, 113, 0.055)),
    rgba(28, 11, 19, 0.78);
}

.profile-more-button {
  min-width: 54px;
  padding: 0;
  font-size: 1.2rem;
}

.profile-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: end;
  margin-bottom: 48px;
}

.profile-hero-stats div {
  display: grid;
  gap: 6px;
  padding: 0 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.profile-hero-stats div:first-child {
  border-left: 0;
}

.profile-hero-stats strong {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1;
  white-space: nowrap;
}

.profile-hero-stats span {
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.95rem;
}

.profile-tabs {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  margin-top: 18px;
  padding: 0 28px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: rgba(5, 7, 13, 0.28);
  box-shadow: none;
  scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar {
  display: none;
}

.profile-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border: 0;
  background: transparent;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.profile-tabs button.active {
  color: #fff;
}

.profile-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #9b5cff);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.55);
}

.profile-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  margin-top: 28px;
}

.profile-page-shell .profile-content-grid {
  grid-template-columns: minmax(0, 1fr);
}

.profile-panel {
  display: grid;
  gap: 22px;
}

.profile-panel[hidden] {
  display: none !important;
}

.profile-story-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.profile-story-card .mini-meta {
  min-height: 98px;
}

.profile-mini-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.profile-mini-progress span {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #67a5ff);
}

.profile-mini-progress strong {
  font-size: 0.78rem;
}

.profile-main-column,
.profile-side-column {
  display: grid;
  gap: 22px;
}

.profile-content-section,
.profile-side-card {
  border-radius: 10px;
}

.profile-content-section {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.profile-section-head,
.profile-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-section-head h2,
.profile-side-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.profile-section-head button,
.profile-side-head button {
  border: 0;
  background: transparent;
  color: #a970ff;
  font-weight: 900;
  cursor: pointer;
}

.profile-continue-card,
.profile-library-card {
  position: relative;
  display: grid;
  align-items: center;
  gap: 22px;
  min-height: 174px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(22, 28, 50, 0.72), rgba(9, 12, 22, 0.86)),
    rgba(12, 14, 23, 0.9);
}

.profile-continue-card {
  grid-template-columns: 194px minmax(0, 1fr) 122px 22px;
}

.profile-library-card {
  grid-template-columns: 170px minmax(0, 1fr) 122px 22px;
}

.profile-cover-button {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.profile-cover-button .cover {
  min-height: 0;
  height: 132px;
  border-radius: 8px;
}

.profile-library-card .profile-cover-button .cover {
  height: 140px;
}

.profile-continue-info,
.profile-library-info {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.profile-continue-info h3,
.profile-library-info h3 {
  margin: 0;
  font-size: 1.25rem;
}

.profile-continue-info p,
.profile-library-info p,
.profile-library-meta,
.profile-continue-info small {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
}

.profile-progress-row {
  display: grid;
  grid-template-columns: minmax(140px, 300px) auto;
  align-items: center;
  gap: 16px;
}

.profile-progress-row span {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-progress-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #67a5ff);
}

.profile-continue-button,
.profile-read-button {
  justify-self: end;
  min-width: 116px;
  min-height: 46px;
  border-radius: 9px;
}

.profile-read-button {
  color: #b684ff;
  background: rgba(8, 10, 18, 0.74);
}

.profile-card-menu {
  align-self: start;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.68);
  font-size: 1.2rem;
  cursor: pointer;
}

.profile-library-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
}

.profile-side-card {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(18, 22, 39, 0.88), rgba(7, 10, 19, 0.92)),
    rgba(9, 11, 20, 0.9);
}

.profile-summary-list {
  display: grid;
  gap: 15px;
  margin: 18px 0 0;
}

.profile-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-summary-list dt,
.profile-summary-list dd {
  margin: 0;
}

.profile-summary-list dd {
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.profile-activity-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.profile-activity-list article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
}

.profile-activity-cover {
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 10px;
}

.profile-activity-cover .cover {
  height: 100%;
  min-height: 0;
  border-radius: 0;
}

.profile-activity-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(124, 58, 237, 0.12);
  color: #ff4fb2;
  font-size: 1.35rem;
}

.profile-activity-icon.comment {
  color: #78a8ff;
}

.profile-activity-list p {
  margin: 0;
  color: rgba(248, 250, 252, 0.88);
  line-height: 1.35;
}

.profile-activity-list strong,
.profile-activity-list small {
  display: block;
}

.profile-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.profile-badges span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.04);
  color: #9b5cff;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.24);
}

.profile-badges span:nth-child(2) {
  color: #4fb3ff;
}

.profile-badges span:nth-child(3) {
  color: #ffd45a;
}

.profile-badges span:nth-child(4) {
  color: #4ade80;
}

.explore-page-shell {
  padding-bottom: 48px;
}

.explore-shell {
  display: grid;
  gap: 22px;
}

.explore-hero,
.explore-filter-bar,
.explore-genre-card,
.explore-comic-card,
.explore-coming-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(10, 13, 24, 0.74);
}

.explore-hero {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background:
    radial-gradient(circle at 70% 32%, rgba(126, 58, 255, 0.34), transparent 32%),
    linear-gradient(135deg, rgba(13, 15, 34, 0.96), rgba(7, 8, 18, 0.98));
}

.explore-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(175, 125, 255, 0.9) 0 1px, transparent 1.5px);
  background-size: 130px 100px;
  opacity: 0.48;
}

.explore-hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 24px 32px;
}

.explore-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  line-height: 1;
}

.explore-hero-copy p {
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 1.08rem;
}

.explore-hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.explore-panel {
  position: absolute;
  width: 116px;
  aspect-ratio: 0.72;
  border: 2px solid rgba(124, 58, 237, 0.7);
  border-radius: 7px;
  background:
    linear-gradient(rgba(91, 55, 178, 0.2), rgba(9, 10, 22, 0.78)),
    linear-gradient(135deg, rgba(85, 156, 255, 0.35), rgba(16, 11, 42, 0.9));
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.24);
}

.explore-panel.panel-one {
  right: 350px;
  top: 26px;
  transform: rotate(12deg);
}

.explore-panel.panel-two {
  right: 106px;
  top: 28px;
  transform: rotate(-12deg);
}

.explore-panel.panel-three {
  right: 236px;
  top: 54px;
  width: 54px;
  transform: rotate(8deg);
}

.explore-cat-face {
  position: absolute;
  right: 205px;
  bottom: -34px;
  width: 168px;
  height: 142px;
  border-radius: 50% 50% 42% 42%;
  background:
    radial-gradient(circle at 35% 47%, #9b5cff 0 9%, transparent 10%),
    radial-gradient(circle at 65% 47%, #62b6ff 0 9%, transparent 10%),
    linear-gradient(145deg, #0a0b14, #03040a 72%);
  box-shadow: 0 0 44px rgba(124, 58, 237, 0.42);
}

.explore-cat-face::before,
.explore-cat-face::after {
  content: "";
  position: absolute;
  top: -34px;
  width: 54px;
  height: 58px;
  border: 2px solid rgba(124, 58, 237, 0.72);
  border-radius: 9px 90% 12px 90%;
  background: linear-gradient(145deg, #111122, #1f0f3d 64%, #9b5cff);
}

.explore-cat-face::before {
  left: 26px;
  transform: rotate(-22deg);
}

.explore-cat-face::after {
  right: 26px;
  transform: rotate(22deg) scaleX(-1);
}

.explore-filter-bar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) repeat(4, max-content);
  gap: 16px;
  margin-top: -28px;
  padding: 14px;
  border-radius: 0 0 16px 16px;
  background: rgba(8, 10, 18, 0.82);
}

.explore-search,
.explore-filter-bar button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(12, 15, 25, 0.92);
  color: rgba(248, 250, 252, 0.9);
  font-weight: 850;
}

.explore-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.explore-search input::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

.explore-filter-bar button {
  cursor: pointer;
  transition: border-color 190ms ease, filter 190ms ease, transform 190ms ease;
}

.explore-filter-bar button:hover,
.explore-genre-card:hover,
.explore-comic-card:hover {
  border-color: rgba(124, 58, 237, 0.42);
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.my-comics-page-shell {
  padding-top: 30px;
}

body[data-active-route="library"] .topbar {
  left: 0;
  right: auto;
  width: var(--sidebar);
  grid-template-columns: 1fr;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

body[data-active-route="library"] .topbar .search,
body[data-active-route="library"] .topbar .top-actions {
  display: none;
}

body[data-active-route="library"] .topbar .logo {
  position: static;
  width: auto;
  height: var(--topbar);
  padding: 0 28px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 7, 12, 0.96), rgba(8, 10, 16, 0.94));
  pointer-events: auto;
}

.my-comics-shell {
  display: grid;
  gap: 20px;
}

.my-comics-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.my-comics-head h1 {
  margin: 0;
  font-size: clamp(2.6rem, 4vw, 3.45rem);
  line-height: 0.95;
  letter-spacing: 0;
  background: linear-gradient(135deg, #fff, #a987ff 66%, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.my-comics-head p {
  margin: 18px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 1.1rem;
}

.my-comics-head-actions,
.my-comics-tools,
.my-comic-actions,
.my-comic-metrics,
.my-comics-pagination {
  display: flex;
  align-items: center;
}

.my-comics-head-actions {
  gap: 18px;
}

.my-comics-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #a020f0, #2387ff);
  color: #fff;
  font-weight: 850;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.28);
  transition: filter 180ms ease, transform 180ms ease;
}

.my-comics-create:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.my-comics-create span {
  font-size: 1.45rem;
  line-height: 0;
}

.my-comics-avatar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.9);
  cursor: pointer;
}

.my-comics-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.my-comics-avatar svg,
.my-comics-search svg,
.my-comics-status svg,
.my-comic-metrics svg,
.my-comic-empty-card svg,
.my-comics-pagination svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.my-comics-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.my-comics-tabs {
  display: flex;
  gap: clamp(24px, 4vw, 54px);
  min-width: 0;
}

.my-comics-tabs button {
  position: relative;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  font-size: 1rem;
  cursor: pointer;
}

.my-comics-tabs button.active {
  color: #d38cff;
}

.my-comics-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -17px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a855f7, #7c3aed);
}

.my-comics-tools {
  gap: 16px;
}

.my-comics-search,
.my-comics-status {
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(13, 15, 27, 0.86);
  color: rgba(226, 232, 240, 0.72);
}

.my-comics-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  width: min(390px, 32vw);
  padding: 0 16px;
}

.my-comics-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 0.98rem;
}

.my-comics-status {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.my-comics-stats {
  display: flex;
  gap: 14px;
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.9rem;
}

.my-comics-stats span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.my-comics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.my-comic-card,
.my-comic-empty-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(13, 15, 27, 0.82);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.my-comic-card {
  transition: transform 190ms ease, border-color 190ms ease, filter 190ms ease;
}

.my-comic-card:hover {
  border-color: rgba(124, 58, 237, 0.42);
  filter: brightness(1.05);
  transform: translateY(-3px);
}

.my-comic-cover {
  position: relative;
  display: block;
  width: 100%;
  height: 188px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #080a12;
  cursor: pointer;
}

.my-comic-cover .cover {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.my-comic-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.64));
  pointer-events: none;
}

.my-comic-status {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 850;
}

.my-comic-status.published {
  background: rgba(22, 163, 74, 0.82);
  color: #dcfce7;
}

.my-comic-status.draft {
  background: rgba(161, 98, 7, 0.82);
  color: #fde68a;
}

.my-comic-body {
  display: grid;
  gap: 11px;
  padding: 16px;
}

.my-comic-body h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-comic-body p,
.my-comic-body small {
  margin: 0;
  color: rgba(226, 232, 240, 0.68);
}

.my-comic-metrics {
  gap: 24px;
  color: rgba(226, 232, 240, 0.76);
}

.my-comic-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.my-comic-metrics span:nth-child(2) svg {
  color: #fbbf24;
}

.my-comic-actions {
  gap: 10px;
  margin-top: 4px;
}

.my-comic-actions button {
  flex: 1;
  min-height: 40px;
  border-radius: 7px;
}

.my-comic-actions .secondary-button {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.my-comic-actions .my-comic-more {
  flex: 0 0 58px;
  font-size: 1.1rem;
}

.my-comic-empty-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 424px;
  padding: 28px;
  border-style: dashed;
  background: rgba(8, 10, 18, 0.62);
  text-align: center;
}

.my-comic-empty-card > svg {
  width: 52px;
  height: 52px;
  color: #7c3aed;
}

.my-comic-empty-card h2 {
  margin: 0;
  font-size: 1.05rem;
}

.my-comic-empty-card p {
  max-width: 220px;
  margin: 0;
  color: rgba(226, 232, 240, 0.62);
}

.my-comic-empty-card .my-comics-create {
  min-height: 48px;
  margin-top: 12px;
  padding: 0 24px;
}

.my-comics-pagination {
  justify-content: center;
  gap: 10px;
}

.my-comics-pagination button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.72);
}

.my-comics-pagination button.active {
  border: 0;
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: #fff;
}

@media (max-width: 1320px) {
  .following-shell {
    width: 100%;
  }

  .following-creator-row {
    gap: 16px;
  }

  .following-feed-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .my-comics-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }

  .my-comics-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .my-comics-search {
    width: min(420px, 100%);
  }
}

@media (max-width: 1023px) {
  .library-head {
    align-items: start;
  }

  .library-tab-row button {
    max-width: 160px;
  }

  .following-shell {
    gap: 16px;
  }

  .following-feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .following-creator {
    flex-basis: 76px;
  }

  .following-creator img {
    width: 60px;
    height: 60px;
  }

  body[data-active-route="library"] .topbar {
    inset: 0 0 auto 0;
    width: auto;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 6, 10, 0.86);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    pointer-events: auto;
  }

  body[data-active-route="library"] .topbar .search,
  body[data-active-route="library"] .topbar .top-actions {
    display: flex;
  }

  body[data-active-route="library"] .topbar .logo {
    width: auto;
    height: auto;
    padding: 0;
    border-right: 0;
    background: transparent;
  }
}

.explore-search svg,
.explore-filter-bar svg,
.explore-view-toggle svg,
.explore-card-stats svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.explore-section {
  display: grid;
  gap: 14px;
}

.explore-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.explore-section-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.explore-section-head > button {
  border: 0;
  background: transparent;
  color: #a970ff;
  font-weight: 900;
  cursor: pointer;
}

.explore-genre-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(126px, 1fr));
  gap: 16px;
}

.explore-genre-card {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 146px;
  overflow: hidden;
  padding: 16px;
  border-radius: 9px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 190ms ease, filter 190ms ease, border-color 190ms ease;
}

.explore-genre-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 55% 28%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(180deg, transparent 24%, rgba(0, 0, 0, 0.66));
}

.explore-genre-card strong,
.explore-genre-card small,
.genre-symbol {
  position: relative;
  z-index: 1;
}

.explore-genre-card strong {
  font-size: 1.06rem;
}

.explore-genre-card small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.84);
}

.genre-symbol {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 54px;
  height: 54px;
  transform: translateX(-50%);
  border-radius: 16px;
  opacity: 0.9;
}

.genre-sword { background: linear-gradient(135deg, #22105a, #2c174d); }
.genre-blades { background: linear-gradient(135deg, #3a1010, #671e1e); }
.genre-heart { background: linear-gradient(135deg, #41122f, #96295c); }
.genre-planet { background: linear-gradient(135deg, #102a52, #0a3a69); }
.genre-castle { background: linear-gradient(135deg, #42110e, #792312); }
.genre-smile { background: linear-gradient(135deg, #4a2d0b, #8a5d16); }
.genre-cup { background: linear-gradient(135deg, #0d403e, #12605c); }
.genre-temple { background: linear-gradient(135deg, #22105a, #16143f); }

.genre-symbol::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: currentColor;
  color: rgba(255, 255, 255, 0.75);
  clip-path: polygon(50% 0, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0 50%, 35% 35%);
}

.explore-view-toggle {
  display: flex;
  gap: 8px;
}

.explore-view-toggle button {
  display: grid;
  place-items: center;
  width: 50px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(10, 13, 24, 0.84);
  color: rgba(226, 232, 240, 0.78);
  cursor: pointer;
}

.explore-view-toggle button.active {
  color: #fff;
  border-color: rgba(124, 58, 237, 0.48);
  background: rgba(124, 58, 237, 0.28);
}

.explore-comic-grid {
  display: grid;
  grid-template-columns: 310px 270px;
  gap: 20px;
  align-items: stretch;
}

.explore-comic-card {
  overflow: hidden;
  border-radius: 9px;
  background: rgba(13, 16, 26, 0.9);
  transition: transform 190ms ease, filter 190ms ease, border-color 190ms ease;
}

.explore-comic-cover {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.explore-comic-cover .cover {
  height: 260px;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.explore-save {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 9, 16, 0.7);
  color: #fff;
}

.explore-save svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.explore-comic-info {
  display: grid;
  gap: 11px;
  padding: 18px 16px;
}

.explore-comic-info h3 {
  margin: 0;
  font-size: 1.2rem;
}

.explore-comic-info p,
.explore-card-stats {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
}

.mini-verified {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #75a5ff);
  color: #fff;
  font-size: 0.65rem;
}

.explore-tags,
.explore-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.explore-tags span {
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.2);
  color: #b98cff;
  font-size: 0.84rem;
  font-weight: 800;
}

.explore-card-stats {
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.explore-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.explore-coming-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 364px;
  padding: 24px;
  border-style: dashed;
  border-radius: 9px;
  background: rgba(11, 14, 26, 0.66);
  text-align: center;
}

.coming-cat {
  position: relative;
  width: 88px;
  height: 68px;
  opacity: 0.55;
}

.coming-cat::before {
  content: "";
  position: absolute;
  inset: 10px 8px 0;
  border: 2px solid rgba(157, 129, 255, 0.5);
  border-radius: 14px;
}

.coming-cat::after {
  content: "o_o";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(167, 139, 250, 0.74);
  font-size: 1.5rem;
  font-weight: 900;
}

.explore-coming-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.explore-coming-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.45;
}

.explore-coming-card .primary-button {
  min-height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #5fa5ff);
}

@media (max-width: 1320px) {
  .explore-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .explore-genre-row {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .explore-genre-row::-webkit-scrollbar {
    display: none;
  }

  .explore-genre-card {
    flex: 0 0 154px;
  }

  .profile-hero-inner {
    grid-template-columns: 150px minmax(280px, 1fr);
  }

  .profile-avatar {
    width: 138px;
    height: 138px;
  }

  .profile-hero-stats {
    grid-column: 1 / -1;
    margin: 6px 0 0;
  }

  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .profile-side-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .explore-cat-face {
    right: 80px;
  }

  .explore-panel.panel-one {
    right: 236px;
  }

  .explore-panel.panel-two {
    right: 18px;
  }

  .explore-filter-bar {
    grid-template-columns: 1fr;
  }

  .explore-comic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-hero-inner {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .profile-avatar-wrap {
    justify-self: start;
  }

  .profile-action-row {
    grid-column: 1 / -1;
  }

  .profile-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .profile-hero-stats div {
    border-left: 0;
    border-radius: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.045);
  }

  .profile-side-column {
    grid-template-columns: 1fr;
  }

  .profile-continue-card,
  .profile-library-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .profile-continue-button,
  .profile-read-button {
    grid-column: 2;
    justify-self: start;
  }

  .profile-card-menu {
    position: absolute;
    top: 16px;
    right: 16px;
  }
}

@media (max-width: 767px) {
  .library-page-shell {
    padding-top: 92px;
  }

  .library-head {
    display: grid;
    gap: 14px;
  }

  .library-head h1 {
    font-size: 2rem;
  }

  .library-head p {
    font-size: 0.92rem;
  }

  .library-new-button {
    width: 100%;
    min-height: 44px;
  }

  .library-selector-capsule {
    margin-inline: -2px;
    padding: 8px;
    border-radius: 22px;
  }

  .library-tab-row {
    gap: 8px;
  }

  .library-tab-row button {
    max-width: 142px;
    min-height: 36px;
    padding-inline: 13px;
    font-size: 0.84rem;
  }

  .library-feed-grid .profile-story-card .mini-meta {
    min-height: 86px;
  }

  .following-page-shell {
    padding-top: 92px;
  }

  .following-shell {
    gap: 14px;
  }

  .following-creator-row {
    gap: 12px;
    margin-inline: -2px;
    padding-bottom: 6px;
  }

  .following-creator {
    flex-basis: 68px;
  }

  .following-creator img {
    width: 54px;
    height: 54px;
  }

  .following-creator span {
    font-size: 0.76rem;
  }

  .following-tag-strip .chip-row {
    gap: 8px;
  }

  .following-tag-strip .chip-row button {
    min-height: 36px;
    padding-inline: 14px;
    font-size: 0.84rem;
  }

  .following-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }

  .following-empty {
    min-height: calc(100vh - 230px);
    padding: 28px 18px;
    border-radius: 14px;
  }

  .explore-page-shell {
    padding-top: 88px;
  }

  .explore-shell {
    gap: 22px;
  }

  .explore-hero {
    min-height: 210px;
    border-radius: 14px 14px 0 0;
  }

  .explore-hero-copy {
    padding: 22px;
  }

  .explore-hero-copy h1 {
    font-size: 2.25rem;
  }

  .explore-hero-copy p {
    max-width: 220px;
    font-size: 0.98rem;
  }

  .explore-cat-face {
    right: 22px;
    bottom: -22px;
    width: 116px;
    height: 98px;
  }

  .explore-cat-face::before,
  .explore-cat-face::after {
    top: -24px;
    width: 38px;
    height: 42px;
  }

  .explore-panel.panel-one {
    right: 135px;
    top: 104px;
    width: 70px;
  }

  .explore-panel.panel-two {
    right: -8px;
    top: 82px;
    width: 76px;
  }

  .explore-panel.panel-three {
    display: none;
  }

  .explore-filter-bar {
    margin-top: -22px;
    padding: 12px;
  }

  .explore-filter-bar button:nth-of-type(n + 3) {
    display: none;
  }

  .explore-search,
  .explore-filter-bar button {
    min-height: 44px;
    font-size: 0.92rem;
  }

  .explore-section-head h2 {
    font-size: 1.25rem;
  }

  .explore-genre-card {
    flex-basis: 138px;
    min-height: 138px;
  }

  .explore-comic-cover .cover {
    height: 238px;
  }

  .explore-coming-card {
    min-height: 260px;
  }

  .profile-page-shell {
    padding-top: 88px;
  }

  .profile-hero-card {
    min-height: 0;
    border-radius: 14px;
  }

  .profile-hero-inner {
    gap: 18px;
    padding: 20px;
  }

  .profile-avatar {
    width: 112px;
    height: 112px;
  }

  .profile-edit-avatar {
    width: 34px;
    height: 34px;
    bottom: 4px;
  }

  .profile-identity h1 {
    font-size: 2rem;
  }

  .profile-bio br {
    display: none;
  }

  .profile-action-row {
    gap: 10px;
  }

  .profile-edit-button,
  .profile-share-button,
  .profile-logout-button {
    flex: 1 1 160px;
  }

  .profile-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-tabs {
    margin-inline: -16px;
    padding: 0 16px;
    gap: 16px;
  }

  .profile-tabs button {
    min-height: 58px;
    font-size: 0.92rem;
  }

  .profile-content-grid,
  .profile-main-column,
  .profile-side-column {
    gap: 16px;
  }

  .profile-content-section,
  .profile-side-card {
    padding: 16px;
  }

  .profile-continue-card,
  .profile-library-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
  }

  .profile-cover-button .cover,
  .profile-library-card .profile-cover-button .cover {
    height: 118px;
  }

  .profile-continue-info h3,
  .profile-library-info h3 {
    font-size: 1rem;
  }

  .profile-progress-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .profile-continue-button,
  .profile-read-button {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .profile-library-meta {
    gap: 10px;
    font-size: 0.85rem;
  }
}

@media (max-width: 767px) {
  body[data-active-route="profile"] {
    overflow-x: hidden;
    background:
      radial-gradient(circle at 50% -12%, rgba(124, 58, 237, 0.2), transparent 34%),
      #05060b;
  }

  body[data-active-route="profile"] .topbar {
    height: 72px;
    padding: 0 16px;
    border-bottom-color: rgba(255, 255, 255, 0.055);
    background:
      linear-gradient(180deg, rgba(5, 6, 12, 0.98), rgba(5, 6, 12, 0.9)),
      rgba(5, 6, 12, 0.94);
    backdrop-filter: blur(18px);
  }

  body[data-active-route="profile"] .brand-lockup {
    gap: 9px;
  }

  body[data-active-route="profile"] .brand-cat {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 13px rgba(124, 58, 237, 0.42));
  }

  body[data-active-route="profile"] .wordmark {
    font-size: 1.26rem;
  }

  body[data-active-route="profile"] .top-actions {
    gap: 8px;
  }

  body[data-active-route="profile"] .top-actions .icon-button,
  body[data-active-route="profile"] .avatar {
    width: 40px;
    height: 40px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(13, 15, 25, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  }

  body[data-active-route="profile"] .app-shell.profile-page-shell {
    padding: 82px 14px calc(112px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  body[data-active-route="profile"] .profile-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body[data-active-route="profile"] .profile-hero-card,
  body[data-active-route="profile"] .profile-tabs,
  body[data-active-route="profile"] .profile-content-section,
  body[data-active-route="profile"] .profile-side-card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(13, 16, 28, 0.84);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  }

  body[data-active-route="profile"] .profile-hero-card {
    min-height: 0;
    border-radius: 20px;
    overflow: hidden;
  }

  body[data-active-route="profile"] .profile-banner-art {
    background:
      radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.2), transparent 34%),
      radial-gradient(circle at 14% 2%, rgba(124, 58, 237, 0.32), transparent 38%),
      linear-gradient(145deg, #0b0d1c 0%, #111735 56%, #070812 100%);
  }

  body[data-active-route="profile"] .profile-banner-art::before {
    inset: auto -18% -8% 38%;
    height: 48%;
    opacity: 0.46;
  }

  body[data-active-route="profile"] .profile-banner-art::after {
    background-size: 150px 110px;
    opacity: 0.22;
  }

  body[data-active-route="profile"] .profile-hero-inner {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 16px;
  }

  body[data-active-route="profile"] .profile-avatar-wrap {
    align-self: start;
    justify-self: start;
  }

  body[data-active-route="profile"] .profile-avatar {
    width: 82px;
    height: 82px;
    border-width: 2px;
    box-shadow:
      0 0 0 1px rgba(124, 58, 237, 0.24),
      0 16px 34px rgba(0, 0, 0, 0.36);
  }

  body[data-active-route="profile"] .profile-edit-avatar {
    right: -2px;
    bottom: -2px;
    width: 30px;
    height: 30px;
  }

  body[data-active-route="profile"] .profile-edit-avatar svg {
    width: 15px;
    height: 15px;
  }

  body[data-active-route="profile"] .profile-identity {
    min-width: 0;
    overflow: hidden;
  }

  body[data-active-route="profile"] .profile-identity h1 {
    display: flex;
    max-width: 100%;
    margin: 2px 0 4px;
    overflow: hidden;
    font-size: 1.58rem;
    font-weight: 700;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="profile"] .profile-verified {
    width: 23px;
    height: 23px;
    font-size: 0.78rem;
  }

  body[data-active-route="profile"] .profile-handle {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
  }

  body[data-active-route="profile"] .profile-bio {
    display: -webkit-box;
    max-width: 100%;
    margin: 0 0 10px;
    overflow: hidden;
    color: rgba(226, 232, 240, 0.76);
    font-size: 0.86rem;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-route="profile"] .profile-bio br {
    display: none;
  }

  body[data-active-route="profile"] .profile-meta-row {
    display: flex;
    gap: 8px;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-meta-row::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="profile"] .profile-meta-row span {
    flex: 0 0 auto;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.78rem;
  }

  body[data-active-route="profile"] .profile-meta-row svg {
    width: 14px;
    height: 14px;
  }

  body[data-active-route="profile"] .profile-action-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 4px;
    padding: 7px;
    border-radius: 16px;
    max-width: 100%;
  }

  body[data-active-route="profile"] .profile-edit-button,
  body[data-active-route="profile"] .profile-share-button,
  body[data-active-route="profile"] .profile-logout-button,
  body[data-active-route="profile"] .profile-more-button {
    min-width: 0;
    width: 100%;
    min-height: 38px;
    gap: 5px;
    padding: 0 7px;
    border-radius: 11px;
    font-size: 0.7rem;
    font-weight: 640;
  }

  body[data-active-route="profile"] .profile-edit-button svg,
  body[data-active-route="profile"] .profile-share-button svg,
  body[data-active-route="profile"] .profile-logout-button svg {
    width: 13px;
    height: 13px;
  }

  body[data-active-route="profile"] .profile-edit-button {
    grid-column: auto;
    color: #fff;
  }

  body[data-active-route="profile"] .profile-share-button {
    justify-content: center;
  }

  body[data-active-route="profile"] .profile-share-button svg {
    display: block;
  }

  body[data-active-route="profile"] .profile-logout-button {
    color: #fecaca;
  }

  body[data-active-route="profile"] .profile-more-button {
    display: none;
  }

  body[data-active-route="profile"] .profile-hero-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 4px 0 0;
  }

  body[data-active-route="profile"] .profile-hero-stats div {
    gap: 4px;
    min-width: 0;
    min-height: 62px;
    padding: 10px 6px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    text-align: center;
  }

  body[data-active-route="profile"] .profile-hero-stats strong {
    font-size: 1.08rem;
    font-weight: 700;
  }

  body[data-active-route="profile"] .profile-hero-stats span {
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="profile"] .profile-tabs {
    position: sticky;
    top: 72px;
    z-index: 12;
    display: flex;
    gap: 8px;
    margin: 0 -14px;
    padding: 8px 14px 9px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(5, 6, 12, 0.9);
    backdrop-filter: blur(18px);
  }

  body[data-active-route="profile"] .profile-tabs button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 999px;
    background: rgba(16, 19, 31, 0.86);
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.8rem;
    font-weight: 600;
  }

  body[data-active-route="profile"] .profile-tabs button.active {
    border-color: rgba(124, 58, 237, 0.7);
    background: linear-gradient(135deg, #7c3aed, #5f7cff);
    color: #fff;
  }

  body[data-active-route="profile"] .profile-tabs button.active::after {
    display: none;
  }

  body[data-active-route="profile"] .profile-tabs svg {
    width: 15px;
    height: 15px;
  }

  body[data-active-route="profile"] .profile-content-grid,
  body[data-active-route="profile"] .profile-main-column,
  body[data-active-route="profile"] .profile-side-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    margin-top: 0;
  }

  body[data-active-route="profile"] .profile-content-section,
  body[data-active-route="profile"] .profile-side-card {
    gap: 12px;
    padding: 14px;
    border-radius: 17px;
  }

  body[data-active-route="profile"] .profile-section-head,
  body[data-active-route="profile"] .profile-side-head {
    gap: 10px;
  }

  body[data-active-route="profile"] .profile-section-head h2,
  body[data-active-route="profile"] .profile-side-card h3 {
    font-size: 1rem;
    font-weight: 650;
  }

  body[data-active-route="profile"] .profile-section-head button,
  body[data-active-route="profile"] .profile-side-head button {
    font-size: 0.78rem;
    font-weight: 600;
  }

  body[data-active-route="profile"] .profile-continue-card,
  body[data-active-route="profile"] .profile-library-card {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 11px;
    min-height: 118px;
    padding: 10px;
    border-radius: 15px;
  }

  body[data-active-route="profile"] .profile-cover-button {
    align-self: stretch;
    border-radius: 12px;
  }

  body[data-active-route="profile"] .profile-cover-button .cover,
  body[data-active-route="profile"] .profile-library-card .profile-cover-button .cover {
    width: 72px;
    height: 96px;
    border-radius: 12px;
  }

  body[data-active-route="profile"] .profile-continue-info,
  body[data-active-route="profile"] .profile-library-info {
    gap: 6px;
  }

  body[data-active-route="profile"] .profile-continue-info h3,
  body[data-active-route="profile"] .profile-library-info h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.96rem;
    font-weight: 650;
    line-height: 1.24;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-route="profile"] .profile-continue-info p,
  body[data-active-route="profile"] .profile-library-info p,
  body[data-active-route="profile"] .profile-continue-info small,
  body[data-active-route="profile"] .profile-library-meta {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  body[data-active-route="profile"] .profile-progress-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  body[data-active-route="profile"] .profile-progress-row strong {
    font-size: 0.78rem;
  }

  body[data-active-route="profile"] .profile-continue-button,
  body[data-active-route="profile"] .profile-read-button {
    grid-column: auto;
    align-self: center;
    justify-self: end;
    width: auto;
    min-width: 58px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 650;
  }

  body[data-active-route="profile"] .profile-card-menu {
    position: absolute;
    top: 10px;
    right: 9px;
    font-size: 1rem;
  }

  body[data-active-route="profile"] .profile-library-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-library-meta::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="profile"] .profile-library-meta span {
    flex: 0 0 auto;
  }

  body[data-active-route="profile"] .profile-summary-list {
    display: flex;
    gap: 9px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-summary-list::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="profile"] .profile-summary-list div {
    flex: 0 0 132px;
    display: grid;
    gap: 6px;
    min-height: 72px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.038);
  }

  body[data-active-route="profile"] .profile-summary-list dt {
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="profile"] .profile-summary-list dd {
    font-size: 1rem;
    font-weight: 700;
  }

  body[data-active-route="profile"] .profile-summary-list svg {
    width: 14px;
    height: 14px;
  }

  body[data-active-route="profile"] .profile-activity-list {
    gap: 10px;
    margin-top: 12px;
  }

  body[data-active-route="profile"] .profile-activity-list article {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  body[data-active-route="profile"] .profile-activity-cover,
  body[data-active-route="profile"] .profile-activity-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 1rem;
  }

  body[data-active-route="profile"] .profile-activity-list p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.84rem;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-route="profile"] .profile-activity-list strong {
    font-weight: 650;
  }

  body[data-active-route="profile"] .profile-activity-list small {
    margin-top: 2px;
    font-size: 0.72rem;
  }

  body[data-active-route="profile"] .profile-badges {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-badges::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="profile"] .profile-badges span {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-width: 1px;
  }

  body[data-active-route="profile"] .bottom-nav {
    min-height: 72px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: rgba(8, 10, 17, 0.95);
  }

  body[data-active-route="profile"] .bottom-nav button {
    min-height: 52px;
    gap: 3px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-route="profile"] .bottom-nav button.active {
    color: #8b5cf6;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-route="profile"] .bottom-nav small {
    font-size: 0.64rem;
    font-weight: 550;
  }

  body[data-active-route="profile"] .bottom-nav .upload-tab {
    min-height: 56px;
    margin-top: -12px;
  }

  body[data-active-route="profile"] .bottom-nav .upload-tab .nav-glyph {
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 5px rgba(8, 10, 17, 0.95);
  }
}

@media (min-width: 768px) and (max-width: 820px) {
  body[data-active-route="profile"] {
    overflow-x: hidden;
  }

  body[data-active-route="profile"] .app-shell.profile-page-shell {
    padding-right: 16px;
    padding-left: 16px;
    overflow-x: hidden;
  }

  body[data-active-route="profile"] .profile-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body[data-active-route="profile"] .profile-hero-card {
    min-height: 0;
    border-radius: 22px;
    overflow: hidden;
  }

  body[data-active-route="profile"] .profile-hero-inner {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
    min-height: 0;
    padding: 28px 32px 28px;
  }

  body[data-active-route="profile"] .profile-avatar-wrap {
    align-self: start;
    justify-self: start;
  }

  body[data-active-route="profile"] .profile-avatar {
    width: 116px;
    height: 116px;
    border-width: 3px;
  }

  body[data-active-route="profile"] .profile-edit-avatar {
    right: 2px;
    bottom: 2px;
    width: 36px;
    height: 36px;
  }

  body[data-active-route="profile"] .profile-identity {
    min-width: 0;
    overflow: hidden;
  }

  body[data-active-route="profile"] .profile-identity h1 {
    max-width: 100%;
    margin: 0 0 5px;
    overflow: hidden;
    font-size: clamp(2rem, 4.9vw, 2.35rem);
    font-weight: 760;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="profile"] .profile-verified {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  body[data-active-route="profile"] .profile-handle {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 620;
  }

  body[data-active-route="profile"] .profile-bio {
    display: -webkit-box;
    max-width: 100%;
    margin: 0 0 14px;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-route="profile"] .profile-bio br {
    display: none;
  }

  body[data-active-route="profile"] .profile-meta-row {
    gap: 10px;
    margin: 0 0 2px;
    flex-wrap: nowrap;
  }

  body[data-active-route="profile"] .profile-meta-row span {
    min-height: 34px;
    padding: 0 13px;
    font-size: 0.84rem;
  }

  body[data-active-route="profile"] .profile-action-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
    padding: 8px;
    border-radius: 18px;
    max-width: 100%;
  }

  body[data-active-route="profile"] .profile-edit-button,
  body[data-active-route="profile"] .profile-share-button,
  body[data-active-route="profile"] .profile-logout-button {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    border-radius: 13px;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.1;
  }

  body[data-active-route="profile"] .profile-edit-button {
    grid-column: auto;
    color: #fff;
  }

  body[data-active-route="profile"] .profile-share-button {
    justify-content: center;
  }

  body[data-active-route="profile"] .profile-share-button svg {
    display: block;
  }

  body[data-active-route="profile"] .profile-more-button {
    display: none;
  }

  body[data-active-route="profile"] .profile-hero-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 0;
  }

  body[data-active-route="profile"] .profile-hero-stats div {
    min-width: 0;
    min-height: 66px;
    padding: 10px 8px;
    border-radius: 16px;
  }

  body[data-active-route="profile"] .profile-hero-stats strong {
    font-size: 1.18rem;
    font-weight: 760;
  }

  body[data-active-route="profile"] .profile-hero-stats span {
    overflow: hidden;
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 768px) {
  body[data-active-route="profile"] {
    overflow-x: hidden;
    background:
      radial-gradient(circle at 50% -18%, rgba(124, 58, 237, 0.16), transparent 34%),
      #05060b;
  }

  body[data-active-route="profile"] .app-shell.profile-page-shell {
    width: min(100%, 1480px);
    margin-inline: auto;
    padding: 98px clamp(18px, 2.4vw, 34px) 56px;
    overflow-x: hidden;
  }

  body[data-active-route="profile"] .profile-shell {
    container-type: inline-size;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    min-width: 0;
  }

  body[data-active-route="profile"] .profile-hero-card,
  body[data-active-route="profile"] .profile-tabs,
  body[data-active-route="profile"] .profile-content-section,
  body[data-active-route="profile"] .profile-side-card {
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(13, 16, 28, 0.84);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  }

  body[data-active-route="profile"] .profile-hero-card {
    min-height: 0;
    overflow: hidden;
  }

  body[data-active-route="profile"] .profile-hero-inner {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
    min-height: 0;
    padding: 24px;
  }

  body[data-active-route="profile"] .profile-avatar {
    width: 116px;
    height: 116px;
  }

  body[data-active-route="profile"] .profile-identity {
    min-width: 0;
  }

  body[data-active-route="profile"] .profile-identity h1 {
    max-width: 100%;
    margin: 0 0 6px;
    overflow: hidden;
    font-size: clamp(2rem, 3vw, 2.42rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="profile"] .profile-handle {
    margin: 0 0 10px;
  }

  body[data-active-route="profile"] .profile-bio {
    display: -webkit-box;
    max-width: 620px;
    margin: 0 0 14px;
    overflow: hidden;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-route="profile"] .profile-bio br {
    display: none;
  }

  body[data-active-route="profile"] .profile-meta-row {
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-meta-row::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="profile"] .profile-meta-row span {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.84rem;
  }

  body[data-active-route="profile"] .profile-action-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(132px, 1fr) minmax(142px, 1fr) minmax(94px, 0.7fr);
    gap: 10px;
    max-width: 100%;
    margin-top: 0;
    padding: 8px;
    border-radius: 18px;
  }

  body[data-active-route="profile"] .profile-edit-button,
  body[data-active-route="profile"] .profile-share-button,
  body[data-active-route="profile"] .profile-logout-button,
  body[data-active-route="profile"] .profile-more-button {
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-active-route="profile"] .profile-more-button {
    display: none;
  }

  body[data-active-route="profile"] .profile-hero-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
  }

  body[data-active-route="profile"] .profile-hero-stats div {
    min-width: 0;
    min-height: 66px;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    text-align: center;
  }

  body[data-active-route="profile"] .profile-hero-stats strong {
    font-size: 1.18rem;
    font-weight: 760;
  }

  body[data-active-route="profile"] .profile-hero-stats span {
    overflow: hidden;
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="profile"] .profile-tabs {
    display: flex;
    gap: 9px;
    margin: 0;
    padding: 10px;
    border-width: 1px;
    border-radius: 18px;
    background: rgba(8, 10, 18, 0.76);
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-tabs button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 999px;
    background: rgba(16, 19, 31, 0.86);
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.84rem;
    font-weight: 650;
  }

  body[data-active-route="profile"] .profile-tabs button.active {
    border-color: rgba(124, 58, 237, 0.7);
    background: linear-gradient(135deg, #7c3aed, #5f7cff);
    color: #fff;
  }

  body[data-active-route="profile"] .profile-tabs button.active::after {
    display: none;
  }

  body[data-active-route="profile"] .profile-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
  }

  body[data-active-route="profile"] .profile-main-column,
  body[data-active-route="profile"] .profile-side-column {
    display: contents;
  }

  body[data-active-route="profile"] .profile-content-section,
  body[data-active-route="profile"] .profile-side-card {
    min-width: 0;
    padding: 16px;
    border-radius: 18px;
  }

  body[data-active-route="profile"] .profile-section-head h2,
  body[data-active-route="profile"] .profile-side-card h3 {
    font-size: 1.05rem;
    font-weight: 680;
  }

  body[data-active-route="profile"] .profile-continue-card,
  body[data-active-route="profile"] .profile-library-card {
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 122px;
    padding: 11px;
    border-radius: 16px;
  }

  body[data-active-route="profile"] .profile-cover-button,
  body[data-active-route="profile"] .profile-cover-button .cover,
  body[data-active-route="profile"] .profile-library-card .profile-cover-button .cover {
    width: 82px;
    height: 104px;
    border-radius: 12px;
  }

  body[data-active-route="profile"] .profile-continue-info,
  body[data-active-route="profile"] .profile-library-info {
    gap: 7px;
  }

  body[data-active-route="profile"] .profile-continue-info h3,
  body[data-active-route="profile"] .profile-library-info h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 680;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-route="profile"] .profile-progress-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body[data-active-route="profile"] .profile-continue-button,
  body[data-active-route="profile"] .profile-read-button {
    align-self: center;
    justify-self: end;
    min-width: 68px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 680;
  }

  body[data-active-route="profile"] .profile-card-menu {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  body[data-active-route="profile"] .profile-library-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    margin-top: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-library-meta::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="profile"] .profile-library-meta span {
    flex: 0 0 auto;
  }

  body[data-active-route="profile"] .profile-summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  body[data-active-route="profile"] .profile-summary-list div {
    display: grid;
    gap: 7px;
    min-height: 74px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.038);
  }

  body[data-active-route="profile"] .profile-summary-list dt {
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    font-size: 0.74rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="profile"] .profile-summary-list dd {
    font-size: 1rem;
    font-weight: 760;
  }

  body[data-active-route="profile"] .profile-activity-list {
    gap: 10px;
    margin-top: 12px;
  }

  body[data-active-route="profile"] .profile-activity-list article {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
  }

  body[data-active-route="profile"] .profile-activity-cover,
  body[data-active-route="profile"] .profile-activity-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 1rem;
  }

  body[data-active-route="profile"] .profile-activity-list p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body[data-active-route="profile"] .profile-badges {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="profile"] .profile-badges::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="profile"] .profile-badges span {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-width: 1px;
  }
}

@container (min-width: 720px) {
  body[data-active-route="profile"] .profile-hero-inner {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  body[data-active-route="profile"] .profile-hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container (min-width: 1020px) {
  body[data-active-route="profile"] .profile-action-row {
    max-width: min(100%, 520px);
  }

  body[data-active-route="profile"] .profile-content-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    grid-auto-flow: dense;
  }

  body[data-active-route="profile"] .profile-main-column,
  body[data-active-route="profile"] .profile-side-column {
    display: contents;
  }

  body[data-active-route="profile"] .profile-main-column > .profile-content-section {
    grid-column: span 7;
  }

  body[data-active-route="profile"] .profile-side-column > .profile-side-card {
    grid-column: span 5;
  }

  body[data-active-route="profile"] .profile-side-column > .profile-side-card:first-child {
    grid-row: span 2;
  }

  body[data-active-route="profile"] .profile-summary-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (min-width: 1040px) {
  body[data-active-route="profile"] .profile-hero-inner {
    grid-template-columns: 128px minmax(380px, 1fr) minmax(292px, 360px);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 18px 22px;
    padding: 26px 28px;
  }

  body[data-active-route="profile"] .profile-avatar {
    width: 128px;
    height: 128px;
  }

  body[data-active-route="profile"] .profile-avatar-wrap {
    grid-row: 1 / 3;
  }

  body[data-active-route="profile"] .profile-identity {
    grid-column: 2;
  }

  body[data-active-route="profile"] .profile-action-row {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    width: min(100%, 430px);
  }

  body[data-active-route="profile"] .profile-hero-stats {
    grid-column: 3;
    grid-row: 1 / 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: stretch;
  }

  body[data-active-route="profile"] .profile-hero-stats div {
    min-height: 78px;
    align-content: center;
  }
}

@supports not (container-type: inline-size) {
  @media (min-width: 1400px) {
    body[data-active-route="profile"] .profile-hero-inner {
      grid-template-columns: 128px minmax(380px, 1fr) minmax(292px, 360px);
      grid-template-rows: auto auto;
      align-items: start;
      gap: 18px 22px;
      padding: 26px 28px;
    }

    body[data-active-route="profile"] .profile-avatar {
      width: 128px;
      height: 128px;
    }

    body[data-active-route="profile"] .profile-avatar-wrap {
      grid-row: 1 / 3;
    }

    body[data-active-route="profile"] .profile-identity {
      grid-column: 2;
    }

    body[data-active-route="profile"] .profile-action-row {
      grid-column: 2;
      grid-row: 2;
      align-self: end;
      width: min(100%, 430px);
    }

    body[data-active-route="profile"] .profile-hero-stats {
      grid-column: 3;
      grid-row: 1 / 3;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-self: stretch;
    }

    body[data-active-route="profile"] .profile-hero-stats div {
      min-height: 78px;
      align-content: center;
    }

    body[data-active-route="profile"] .profile-content-grid {
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 18px;
      grid-auto-flow: dense;
    }

    body[data-active-route="profile"] .profile-main-column,
    body[data-active-route="profile"] .profile-side-column {
      display: contents;
    }

    body[data-active-route="profile"] .profile-main-column > .profile-content-section {
      grid-column: span 7;
    }

    body[data-active-route="profile"] .profile-side-column > .profile-side-card {
      grid-column: span 5;
    }

    body[data-active-route="profile"] .profile-side-column > .profile-side-card:first-child {
      grid-row: span 2;
    }
  }
}

@media (min-width: 768px) and (max-width: 1179px) {
  body[data-active-route="profile"] .profile-action-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-active-route="profile"] .profile-edit-button,
  body[data-active-route="profile"] .profile-share-button,
  body[data-active-route="profile"] .profile-logout-button {
    min-height: 44px;
    font-size: 0.84rem;
  }
}

.upload-form {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.compact-form {
  grid-template-columns: 1fr;
  align-items: start;
  padding: 0;
  border: 0;
  background: transparent;
}

.compact-form .form-status {
  grid-column: 1 / -1;
}

.compact-form .modal-actions button {
  min-height: 50px;
  width: 100%;
}

.compact-form .modal-actions button[type="submit"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.auth-switch {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.upload-form fieldset {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.upload-form fieldset:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.upload-form legend {
  padding: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.field span,
.studio-note {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.studio-note {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #09090d;
  color: var(--text);
  padding: 13px 14px;
  outline: 0;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bottom-nav {
  display: none;
}

body[data-owner="false"] .owner-only {
  display: none;
}

@media (max-width: 780px) {
  :root {
    --topbar: 66px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }

  .logo {
    gap: 8px;
    font-size: 1.2rem;
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-cat {
    width: 40px;
    height: 40px;
  }

  .wordmark {
    font-size: 1.28rem;
  }

  .sidebar,
  .top-actions .owner-only {
    display: none;
  }

  .topbar {
    height: 66px;
    grid-template-columns: 1fr auto;
    align-content: stretch;
    border-bottom: 1px solid rgba(154, 124, 255, 0.24);
  }

  .app-shell {
    padding: 92px 16px 158px;
  }

  .discovery-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-hero {
    min-height: 220px;
  }

  .search {
    display: none;
  }

  .mobile-search-btn {
    display: grid;
  }

  .top-actions .icon-button {
    width: 38px;
    height: 38px;
    border-radius: 999px;
  }

  .comic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }

  .continue-row {
    grid-template-columns: 1fr;
  }

  .comic-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }

  .profile-head {
    grid-template-columns: auto 1fr;
  }

  .profile-logout {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comic-hero .cover {
    max-width: 220px;
  }

  .comic-description {
    -webkit-line-clamp: 5;
  }

  .comic-menu-button {
    opacity: 1;
  }

  .reader-route .topbar {
    display: none;
  }

  .reader-route .search {
    display: none;
  }

  .reader-route .app-shell {
    padding: 0;
  }

  .reader {
    margin: 0;
    padding: 0 4px 18px;
  }

  .reader-controls {
    position: sticky;
    top: 0;
    z-index: 8;
    margin-bottom: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(3, 3, 7, 0.84);
    backdrop-filter: blur(6px);
    gap: 4px;
  }

  .reader-controls .secondary-button {
    min-height: 30px;
    min-width: 58px;
    padding: 4px 6px;
    font-size: 0.72rem;
  }

  .pdf-reader {
    height: calc(100vh - 220px);
    min-height: 520px;
  }

  .reader-content {
    max-width: 100%;
    gap: 4px;
    padding: 0 0 10px;
  }

  .reader-scroll {
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 40px);
  }

  .comic-info {
    padding-bottom: 2px;
  }

  .comic-info .meta {
    margin-bottom: 2px;
  }

  .comic-info h1 {
    margin: 4px 0;
    line-height: 1.08;
  }

  .comic-description-block {
    margin-top: 4px;
    gap: 8px;
  }

  .manage-comic {
    padding-top: 4px;
  }

  .manage-head {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .reader-fullscreen .reader {
    margin: 0;
    padding: 0;
  }

  .reader-fullscreen .reader-exit-fab {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: fixed !important;
    top: max(12px, env(safe-area-inset-top)) !important;
    right: 12px !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
    width: 44px !important;
    height: 44px !important;
    transform: none !important;
    background: #ff2d55 !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
  }

  .reader-fullscreen .pdf-reader {
    height: 100vh;
    min-height: 0;
  }

  .bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 78px;
    padding: 9px 8px max(9px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(12, 14, 25, 0.82);
    box-shadow:
      0 -1px 0 rgba(155, 92, 255, 0.16),
      0 -18px 46px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
  }

  .bottom-nav button {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 58px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    opacity: 0.76;
    cursor: pointer;
    transition:
      opacity 170ms ease,
      color 170ms ease,
      background 170ms ease,
      border-color 170ms ease,
      transform 120ms ease;
  }

  .bottom-nav button:hover,
  .bottom-nav button.active {
    opacity: 1;
  }

  .bottom-nav button.active {
    color: var(--text);
    border-color: rgba(155, 92, 255, 0.34);
    background: rgba(155, 92, 255, 0.18);
    box-shadow: inset 0 0 18px rgba(155, 92, 255, 0.08);
  }

  .bottom-nav button:active {
    transform: scale(0.94);
  }

  .nav-glyph {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
  }

  .nav-glyph svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .bottom-nav button.active .nav-glyph {
    color: var(--accent-2);
  }

  .bottom-nav small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
  }

  .bottom-nav .bottom-nav-soon {
    cursor: default;
    opacity: 0.62;
  }

  .bottom-nav .bottom-nav-soon:active {
    transform: none;
  }

  .bottom-soon-badge {
    position: absolute;
    top: 5px;
    right: 6px;
    padding: 2px 5px;
    border: 1px solid rgba(139, 92, 246, 0.34);
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.18);
    color: rgba(220, 196, 255, 0.96);
    font-size: 0.5rem;
    font-weight: 850;
    line-height: 1;
  }

  .bottom-nav .upload-tab {
    position: relative;
    z-index: 1;
    min-height: 64px;
    margin-top: -24px;
    color: #08060d;
    opacity: 1;
    border: 0;
    background: transparent;
  }

  .bottom-nav .upload-tab .nav-glyph {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--accent), #4f95ff);
    box-shadow:
      0 14px 36px rgba(155, 92, 255, 0.42),
      0 0 0 6px rgba(12, 14, 25, 0.9);
  }

  .bottom-nav .upload-tab .nav-glyph svg {
    width: 25px;
    height: 25px;
    stroke-width: 2.6;
  }

  .bottom-nav .upload-tab small {
    color: var(--text);
    opacity: 0.86;
  }

  .bottom-nav .upload-tab.active {
    background: transparent;
    box-shadow: none;
  }

  .bottom-nav .upload-tab.active .nav-glyph {
    filter: saturate(1.18) brightness(1.05);
    box-shadow:
      0 16px 42px rgba(35, 213, 255, 0.34),
      0 0 0 6px rgba(20, 20, 30, 0.82);
  }

  .chapter-fab {
    right: 18px;
    bottom: 88px;
    width: 56px;
    height: 56px;
  }

  .toast {
    right: 16px;
    bottom: 86px;
  }

  .modal-shell {
    align-items: end;
    padding: 16px;
  }

  .compact-form {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}

.reader-route .bottom-nav {
  display: none !important;
}

@keyframes pageShimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -20% 0;
  }
}

@keyframes uploadPulse {
  0% {
    opacity: 0.7;
    transform: scaleX(0.7);
    transform-origin: left;
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
    transform-origin: left;
  }
  100% {
    opacity: 0.78;
    transform: scaleX(0.75);
    transform-origin: left;
  }
}

@media (min-width: 460px) and (max-width: 780px) {
  .app-shell {
    padding-bottom: 148px;
  }

  .bottom-nav {
    inset: auto auto 18px 50%;
    width: min(520px, calc(100% - 36px));
    min-height: 70px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    transform: translateX(-50%);
    box-shadow:
      0 18px 54px rgba(0, 0, 0, 0.42),
      0 0 0 1px rgba(155, 92, 255, 0.08);
  }

  .bottom-nav button {
    min-height: 52px;
    gap: 3px;
  }

  .nav-glyph {
    width: 21px;
    height: 21px;
  }

  .nav-glyph svg {
    width: 20px;
    height: 20px;
  }

  .bottom-nav small {
    font-size: 0.66rem;
  }

  .bottom-nav .upload-tab {
    min-height: 58px;
    margin-top: -20px;
  }

  .bottom-nav .upload-tab .nav-glyph {
    width: 44px;
    height: 44px;
    box-shadow:
      0 12px 28px rgba(155, 92, 255, 0.32),
      0 0 0 5px rgba(20, 20, 30, 0.82);
  }

  .bottom-nav .upload-tab .nav-glyph svg {
    width: 23px;
    height: 23px;
  }

  .bottom-nav .upload-tab.active .nav-glyph {
    box-shadow:
      0 14px 32px rgba(35, 213, 255, 0.28),
      0 0 0 5px rgba(20, 20, 30, 0.82);
  }
}

.upload-processing {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.18), transparent 62%),
    rgba(17, 20, 32, 0.72);
}

.upload-processing-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-processing-head p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(248, 250, 252, 0.92);
}

.upload-cat {
  position: relative;
  width: 28px;
  height: 22px;
  border-radius: 10px;
  background: radial-gradient(circle at 55% 24%, rgba(18, 24, 40, 0.92), #090c16 72%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    0 0 10px rgba(124, 58, 237, 0.2);
}

.upload-cat-ear {
  position: absolute;
  top: -6px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #0a0d16;
}

.upload-cat-ear.left { left: 4px; transform: rotate(-24deg); }
.upload-cat-ear.right { right: 4px; transform: rotate(24deg); }
.upload-cat-eye {
  position: absolute;
  top: 8px;
  width: 4px;
  height: 6px;
  border-radius: 50%;
}
.upload-cat-eye.left { left: 8px; background: linear-gradient(180deg, #9b6bff, #7c3aed); }
.upload-cat-eye.right { right: 8px; background: linear-gradient(180deg, #79deff, #3b82f6); }

.upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.upload-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  transition: width 260ms ease;
}

.upload-progress-fill[data-indeterminate="true"] {
  animation: uploadPulse 1.4s ease-in-out infinite;
}

.upload-studio-sidebar {
  display: none;
}

.upload-studio-surface {
  min-width: 0;
}

.upload-studio-brand img,
.upload-creator-mini img {
  display: block;
  object-fit: contain;
}

.upload-studio-nav button,
.upload-upgrade-card button,
.upload-tag-add,
.upload-chapter-row button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.upload-studio-nav svg,
.upload-head-actions svg,
.upload-card-icon svg,
.upload-chapter-row svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-page-shell {
  padding-top: 28px;
}

.upload-workspace {
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
}

.upload-page-head,
.upload-head-actions,
.upload-layout,
.upload-steps,
.upload-step,
.upload-card-head,
.upload-progress-body,
.upload-summary-cover,
.upload-summary-list div {
  display: flex;
  align-items: center;
}

.upload-page-head {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.upload-page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

.upload-page-head p {
  margin: 10px 0 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: 1rem;
}

.upload-head-actions {
  justify-content: flex-end;
  gap: 16px;
}

.upload-drafts-button,
.upload-save-draft {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(17, 20, 32, 0.86);
  color: #f8fafc;
  font-weight: 800;
  cursor: pointer;
}

.upload-drafts-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
}

.upload-notification-count {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
}

.upload-profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(56, 189, 248, 0.42);
  background: #111420;
}

.upload-layout {
  align-items: flex-start;
  gap: 28px;
}

.upload-main-column {
  flex: 1 1 auto;
  min-width: 0;
}

.upload-side-column {
  flex: 0 0 380px;
  display: grid;
  gap: 16px;
  position: sticky;
  top: 22px;
}

.upload-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  justify-content: stretch;
  margin-bottom: 14px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background:
    linear-gradient(90deg, rgba(124, 58, 237, 0.16), transparent 38%),
    rgba(11, 14, 24, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.upload-step {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
}

.upload-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px;
  right: -18px;
  width: 34px;
  height: 1px;
  border-top: 1px dashed rgba(148, 163, 184, 0.38);
}

.upload-step span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.44);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
}

.upload-step.is-active span {
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed, #6d5df6);
  box-shadow: 0 0 26px rgba(124, 58, 237, 0.45);
}

.upload-step strong,
.upload-step small {
  display: block;
  min-width: 0;
}

.upload-step strong {
  font-size: 0.92rem;
}

.upload-step small {
  margin-top: 5px;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.78rem;
}

.upload-designer-form {
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.upload-card,
.upload-progress-card,
.upload-summary-card,
.upload-tips {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.12), transparent 40%),
    rgba(10, 14, 25, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.upload-card {
  padding: 24px;
  border-radius: 9px;
}

.upload-card-head {
  gap: 16px;
  margin-bottom: 24px;
}

.upload-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.16);
  box-shadow: 0 0 22px rgba(124, 58, 237, 0.32);
  font-size: 0.7rem;
  font-weight: 900;
}

.upload-card-head h2,
.upload-progress-card h2,
.upload-summary-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.upload-card-head p {
  margin: 6px 0 0;
  color: rgba(203, 213, 225, 0.86);
}

.upload-form-grid,
.upload-cover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 28px;
}

.upload-field {
  position: relative;
  margin-bottom: 18px;
}

.upload-field-full {
  grid-column: 1 / -1;
}

.upload-field > span,
.upload-cover-label span,
.upload-ai-title span {
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 850;
}

.upload-field strong,
.upload-cover-label strong {
  color: #fb7185;
}

.upload-field small,
.upload-cover-label small,
.upload-ai-field p {
  color: rgba(203, 213, 225, 0.78);
  font-weight: 500;
}

.upload-field input,
.upload-field textarea,
.upload-select {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 18, 30, 0.88);
  color: #f8fafc;
  padding: 0 14px;
}

.upload-field textarea {
  min-height: 82px;
  padding-top: 14px;
}

.upload-field em {
  position: absolute;
  right: 14px;
  bottom: 13px;
  color: rgba(203, 213, 225, 0.82);
  font-size: 0.78rem;
  font-style: normal;
}

.upload-field .upload-input-check {
  bottom: 37px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.9);
  color: #111827;
  font-size: 0.62rem;
  font-weight: 900;
}

.upload-form .upload-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  background: rgba(14, 18, 30, 0.88);
  color: rgba(203, 213, 225, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}

.upload-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.upload-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.24);
  color: #d8b4fe;
  font-size: 0.76rem;
  font-weight: 800;
}

.upload-ai-field {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 2px;
}

.upload-ai-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.upload-ai-title small {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.44);
  border-radius: 50%;
  color: rgba(203, 213, 225, 0.9);
}

.upload-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-toggle span {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.34);
  background: rgba(15, 23, 42, 0.9);
}

.upload-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f8fafc;
  transition: transform 180ms ease, background 180ms ease;
}

.upload-toggle input:checked + span {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
}

.upload-toggle input:checked + span::after {
  transform: translateX(20px);
}

.upload-toggle strong {
  color: rgba(241, 245, 249, 0.9);
  font-size: 0.82rem;
}

.upload-cover-label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.upload-cover-drop {
  min-height: 124px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 20px;
  border: 1px dashed rgba(124, 58, 237, 0.9);
  border-radius: 8px;
  background: rgba(10, 14, 25, 0.8);
  cursor: pointer;
  text-align: center;
}

.upload-cover-drop input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-cover-drop > span {
  color: #8b5cf6;
  font-size: 0.78rem;
  font-weight: 900;
}

.upload-cover-drop strong {
  color: #ffffff;
  font-size: 0.9rem;
}

.upload-cover-drop small {
  color: rgba(203, 213, 225, 0.78);
}

.upload-tips {
  align-self: end;
  padding: 18px 22px;
  border-radius: 8px;
}

.upload-tips h3 {
  margin: 0 0 12px;
  font-size: 0.96rem;
}

.upload-tips ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: rgba(203, 213, 225, 0.84);
  font-size: 0.84rem;
}

.upload-progress-card,
.upload-summary-card {
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  padding: 24px;
}

.upload-progress-body {
  gap: 20px;
  margin-top: 18px;
}

.upload-ring {
  --progress: 0;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0b0f1c 54%, transparent 56%),
    conic-gradient(#7c3aed calc(var(--progress) * 1%), rgba(148, 163, 184, 0.28) 0);
}

.upload-ring span {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.upload-progress-body p {
  margin: 0;
  color: #f8fafc;
  line-height: 1.45;
}

.upload-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b5cf6;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.7);
}

.upload-spark-one {
  top: 34px;
  right: 58px;
}

.upload-spark-two {
  top: 52px;
  right: 38px;
}

.upload-summary-cover {
  gap: 16px;
  min-height: 142px;
  margin: 16px 0 18px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}

.upload-summary-art {
  width: 110px;
  height: 130px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(31, 41, 55, 0.8);
  color: rgba(203, 213, 225, 0.82);
  font-weight: 900;
}

.upload-summary-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-summary-cover p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: rgba(203, 213, 225, 0.84);
  text-overflow: ellipsis;
}

.upload-summary-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.upload-summary-list div {
  justify-content: space-between;
  gap: 18px;
}

.upload-summary-list dt {
  color: #f8fafc;
}

.upload-summary-list dd {
  margin: 0;
  color: rgba(248, 250, 252, 0.92);
  text-align: right;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #facc15;
}

.upload-save-draft,
.upload-next-button,
.upload-submit-mobile {
  width: 100%;
}

.upload-save-draft {
  margin-top: 20px;
  background: rgba(9, 12, 22, 0.86);
  border-color: rgba(124, 58, 237, 0.85);
}

.upload-next-button,
.upload-submit-mobile {
  min-height: 60px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed 0%, #684cf6 48%, #38bdf8 100%);
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 900;
  box-shadow:
    0 16px 38px rgba(124, 58, 237, 0.34),
    inset 0 -2px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.upload-submit-mobile {
  display: none;
}

body[data-active-route="upload"] .topbar {
  left: 0;
  right: auto;
  width: var(--sidebar);
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

body[data-active-route="upload"] .topbar .search,
body[data-active-route="upload"] .topbar .top-actions {
  display: none;
}

body[data-active-route="upload"] .topbar .logo {
  left: 0;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  body[data-active-route="upload"] .app-shell {
    padding-top: 28px;
  }
}

@media (max-width: 1280px) {
  .upload-layout {
    gap: 20px;
  }

  .upload-side-column {
    flex-basis: 330px;
  }

  .upload-form-grid,
  .upload-cover-row {
    gap: 16px;
  }
}

@media (max-width: 1120px) {
  .upload-layout {
    display: grid;
  }

  .upload-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-next-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1023px) {
  body[data-active-route="upload"] .topbar {
    inset: 0 0 auto 0;
    width: auto;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 6, 10, 0.86);
    pointer-events: auto;
  }

  body[data-active-route="upload"] .topbar .top-actions {
    display: flex;
  }
}

@media (max-width: 767px) {
  .upload-page-shell {
    padding-top: 88px;
  }

  .upload-page-head,
  .upload-layout,
  .upload-form-grid,
  .upload-cover-row,
  .upload-side-column {
    display: grid;
    grid-template-columns: 1fr;
  }

  .upload-page-head {
    gap: 16px;
  }

  .upload-head-actions {
    justify-content: start;
  }

  .upload-steps {
    display: flex;
    overflow-x: auto;
    justify-content: start;
  }

  .upload-step {
    min-width: 178px;
  }

  .upload-card {
    padding: 18px;
  }

  .upload-side-column {
    gap: 14px;
  }

  .upload-next-button {
    display: none;
  }

  .upload-submit-mobile {
    display: block;
  }
}

@media (min-width: 768px) {
  body[data-active-route="upload"] {
    background:
      radial-gradient(circle at 58% 0%, rgba(139, 92, 246, 0.24), transparent 30%),
      radial-gradient(circle at 88% 20%, rgba(59, 130, 246, 0.1), transparent 28%),
      #050816;
  }

  body[data-active-route="upload"] .app-shell {
    width: 100%;
    padding: 24px;
  }

  .upload-page-shell {
    padding-top: 24px;
  }

  .upload-workspace {
    max-width: 1180px;
  }

  .upload-page-head {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .upload-page-head h1 {
    font-size: clamp(2rem, 3.6vw, 2.7rem);
  }

  .upload-page-head p {
    color: rgba(248, 250, 252, 0.74);
  }

  .upload-head-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .upload-drafts-button,
  .upload-save-draft {
    min-height: 46px;
    border-radius: 12px;
    background: rgba(10, 14, 25, 0.78);
    backdrop-filter: blur(16px);
  }

  .upload-head-publish {
    width: auto;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 0.92rem;
  }

  .upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .upload-main-column {
    min-width: 0;
  }

  .upload-designer-form {
    display: grid;
    gap: 18px;
  }

  .upload-card,
  .upload-summary-card {
    border-radius: 24px;
    background:
      radial-gradient(circle at 88% 0%, rgba(139, 92, 246, 0.16), transparent 38%),
      linear-gradient(180deg, rgba(10, 14, 25, 0.9), rgba(6, 10, 20, 0.88));
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
      0 24px 80px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
  }

  .upload-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
  }

  .upload-mascot-banner {
    position: absolute;
    top: -34px;
    right: clamp(24px, 8vw, 120px);
    width: 270px;
    height: 136px;
    pointer-events: none;
  }

  .upload-mascot-banner span {
    position: absolute;
    inset: 34px 0 0;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.44), transparent 68%);
    filter: blur(6px);
  }

  .upload-mascot-banner img {
    position: relative;
    width: 210px;
    height: 150px;
    object-fit: contain;
    margin-left: 44px;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5));
  }

  .upload-card-head {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
  }

  .upload-card-head-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .upload-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 0;
  }

  .upload-identity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
    gap: 18px;
  }

  .upload-identity-left,
  .upload-identity-right {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
  }

  .upload-field {
    margin-bottom: 0;
  }

  .upload-field input,
  .upload-field textarea,
  .upload-select {
    min-height: 52px;
    border-radius: 13px;
    background: rgba(5, 8, 18, 0.68);
    border-color: rgba(255, 255, 255, 0.11);
  }

  .upload-field textarea {
    min-height: 154px;
  }

  .upload-cover-drop {
    min-height: 132px;
    border-radius: 16px;
    background: rgba(5, 8, 18, 0.58);
  }

  .upload-cover-preview-inline {
    min-height: 122px;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(5, 8, 18, 0.58);
  }

  .upload-cover-preview-inline .upload-summary-art {
    width: 128px;
    height: 96px;
    border-radius: 12px;
  }

  .upload-cover-preview-inline p {
    margin: 0;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 800;
  }

  .upload-details-grid {
    align-items: stretch;
  }

  .upload-tags {
    min-height: 52px;
    align-items: center;
    margin-top: 8px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(5, 8, 18, 0.52);
  }

  .upload-tags span {
    padding: 9px 13px;
    border: 1px solid rgba(168, 85, 247, 0.36);
    background: rgba(88, 28, 135, 0.38);
  }

  .upload-tag-add {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px dashed rgba(168, 85, 247, 0.7);
    border-radius: 999px;
    background: rgba(88, 28, 135, 0.18);
    color: #c084fc;
    font-weight: 900;
  }

  .upload-ai-field {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: rgba(5, 8, 18, 0.48);
  }

  .upload-chapters-card {
    display: grid;
    gap: 14px;
  }

  .upload-chapter-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
  }

  .upload-chapter-row {
    display: grid;
    grid-template-columns: 22px 42px 78px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 10px 14px;
    background: rgba(5, 8, 18, 0.42);
  }

  .upload-chapter-row + .upload-chapter-row {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .upload-drag-handle,
  .upload-chapter-number {
    color: #c084fc;
    font-weight: 900;
  }

  .upload-chapter-thumb {
    width: 72px;
    height: 48px;
    border-radius: 10px;
    background:
      radial-gradient(circle at 64% 30%, #f97316 0 8%, transparent 10%),
      linear-gradient(135deg, #1e1b4b, #6d28d9 50%, #020617);
  }

  .upload-chapter-thumb.second {
    background:
      radial-gradient(circle at 50% 20%, #8b5cf6 0 8%, transparent 10%),
      linear-gradient(135deg, #020617, #312e81 48%, #4c1d95);
  }

  .upload-chapter-row strong,
  .upload-chapter-row small {
    display: block;
  }

  .upload-chapter-row small {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.64);
  }

  .upload-page-pill {
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(88, 28, 135, 0.44);
    color: #ddd6fe;
    font-size: 0.78rem;
    font-weight: 850;
  }

  .upload-chapter-row button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: transparent;
    color: rgba(248, 250, 252, 0.86);
  }

  .upload-chapter-drop {
    min-height: 76px;
    grid-template-columns: auto minmax(0, auto);
    justify-content: center;
    text-align: left;
  }

  .upload-processing,
  .upload-designer-form > .form-status {
    max-width: none;
  }

  .upload-side-column {
    position: static;
    display: block;
  }

  .upload-summary-card {
    display: grid;
    gap: 14px;
  }

  .upload-summary-card h2,
  .upload-summary-card h3,
  .upload-summary-creator {
    margin: 0;
  }

  .upload-summary-card h3 {
    font-size: 1.35rem;
  }

  .upload-summary-creator {
    color: rgba(226, 232, 240, 0.78);
  }

  .upload-summary-cover {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
  }

  .upload-summary-card > .upload-summary-cover .upload-summary-art {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 11;
    border-radius: 18px;
  }

  .upload-summary-list {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (min-width: 1200px) {
  .upload-studio-surface {
    padding: 0;
  }

  .upload-workspace {
    max-width: 1460px;
  }

  .upload-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    align-items: start;
  }

  .upload-side-column {
    position: sticky;
    top: 28px;
  }

  .upload-identity-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .upload-workspace {
    width: min(100%, 980px);
  }

  .upload-preview-action,
  .upload-profile-avatar,
  .upload-head-actions .notification-button {
    display: none;
  }
}

@media (min-width: 768px) {
  body[data-active-route="upload"] .upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  body[data-active-route="upload"] .upload-side-column {
    position: static;
    display: block;
    width: 100%;
  }
}

@media (min-width: 1200px) {
  body[data-active-route="upload"] .upload-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 24px;
  }

  body[data-active-route="upload"] .upload-side-column {
    position: sticky;
    top: 28px;
    width: auto;
    min-width: 0;
  }
}

/* Upload studio breakpoint corrections: keep the app sidebar untouched and contain mobile art. */
@media (max-width: 767px) {
  body[data-active-route="upload"] .upload-card,
  body[data-active-route="upload"] .upload-card * {
    box-sizing: border-box;
    max-width: 100%;
  }

  body[data-active-route="upload"] .upload-mascot-banner {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  body[data-active-route="upload"] .upload-mascot-banner img {
    width: min(68vw, 260px);
    height: auto;
  }

  body[data-active-route="upload"] .upload-identity-grid,
  body[data-active-route="upload"] .upload-identity-left,
  body[data-active-route="upload"] .upload-identity-right,
  body[data-active-route="upload"] .upload-form-grid,
  body[data-active-route="upload"] .upload-details-grid {
    width: 100%;
    min-width: 0;
  }

  body[data-active-route="upload"] .upload-cover-preview-inline {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body[data-active-route="upload"] .app-shell {
    padding: 24px;
  }
}

@media (min-width: 1024px) {
  body[data-active-route="upload"] .app-shell {
    padding: 28px 24px 72px calc(var(--sidebar) + 24px);
  }
}

/* ===== Final responsive hardening ===== */

/* Desktop: 1024px+ (explicit premium spacing) */
@media (min-width: 1024px) {
  :root {
    --sidebar: 268px;
    --topbar: 88px;
  }

  body {
    background:
      radial-gradient(circle at 50% -12%, rgba(46, 82, 180, 0.13), transparent 34%),
      radial-gradient(circle at 12% 16%, rgba(124, 58, 237, 0.13), transparent 32%),
      #05060a;
  }

  .topbar {
    left: var(--sidebar);
    grid-template-columns: minmax(420px, 600px) minmax(0, 1fr);
    gap: 28px;
    padding: 0 28px 0 34px;
    background: rgba(5, 6, 10, 0.82);
    box-shadow: none;
  }

  .logo {
    position: absolute;
    z-index: 30;
    top: 0;
    left: calc(-1 * var(--sidebar));
    width: var(--sidebar);
    height: var(--topbar);
    padding: 0 28px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(6, 7, 12, 0.96), rgba(8, 10, 16, 0.94));
  }

  .brand-cat {
    width: 46px;
    height: 46px;
  }

  .wordmark {
    font-size: 1.62rem;
  }

  .search {
    width: min(100%, 600px);
    height: 52px;
    border-radius: 14px;
    background: rgba(15, 17, 26, 0.94);
  }

  .top-actions {
    gap: 14px;
  }

  .guest-badge {
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.86rem;
  }

  .create-button {
    min-width: 106px;
    min-height: 50px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed 0%, #5b6df6 55%, #38bdf8 100%);
  }

  .icon-button,
  .avatar {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
  }

  .avatar {
    font-size: 1rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }

  .sidebar {
    top: 0;
    height: 100vh;
    width: var(--sidebar);
    align-items: stretch;
    gap: 0;
    padding: calc(var(--topbar) + 14px) 21px 16px;
    background:
      linear-gradient(180deg, rgba(7, 9, 15, 0.98), rgba(7, 10, 18, 0.98)),
      #070911;
    box-shadow:
      inset -1px 0 0 rgba(255, 255, 255, 0.035),
      16px 0 40px rgba(0, 0, 0, 0.18);
    overflow-y: hidden;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.34) transparent;
  }

  .sidebar::-webkit-scrollbar {
    width: 6px;
  }

  .sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  .sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.34);
  }

  .sidebar-stack {
    flex: 0 0 auto;
    gap: clamp(4px, 0.8vh, 8px);
    padding: 0 6px;
  }

  .sidebar-group {
    gap: clamp(2px, 0.65vh, 6px);
  }

  .sidebar-divider {
    width: calc(100% - 8px);
    margin: clamp(5px, 1vh, 8px) 4px;
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-icon {
    height: clamp(39px, 5vh, 46px);
    gap: 20px;
    padding: 0 16px;
    border-radius: 9px;
    color: rgba(226, 232, 240, 0.76);
  }

  .nav-symbol,
  .nav-symbol svg {
    width: 21px;
    height: 21px;
  }

  .nav-icon small {
    font-size: 0.96rem;
    color: rgba(248, 250, 252, 0.78);
  }

  .nav-icon.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.26), rgba(59, 130, 246, 0.1));
    border-color: rgba(139, 92, 246, 0.58);
    box-shadow:
      0 0 20px rgba(124, 58, 237, 0.22),
      inset 0 0 0 1px rgba(167, 139, 250, 0.12);
  }

  .nav-icon:not(.active):hover {
    background: rgba(255, 255, 255, 0.045);
  }

  .soon-badge {
    padding: 3px 9px;
    font-size: 0.68rem;
  }

  .sidebar-cta {
    flex: 0 0 auto;
    margin-top: clamp(8px, 1.6vh, 14px);
    padding: clamp(74px, 9.5vh, 90px) 16px 10px;
    min-height: clamp(190px, 23vh, 226px);
    border-radius: 9px;
    background:
      radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.48), transparent 34%),
      radial-gradient(circle at 78% 8%, rgba(56, 189, 248, 0.18), transparent 28%),
      linear-gradient(180deg, rgba(34, 19, 71, 0.94), rgba(14, 18, 32, 0.96));
  }

  .cta-mascot {
    top: clamp(8px, 1.4vh, 12px);
    width: clamp(84px, 12vh, 112px);
    height: clamp(64px, 9vh, 82px);
  }

  .cta-mascot::before {
    top: 58%;
    width: 70%;
    height: 42%;
    border-radius: 52px 52px 34px 34px;
    background:
      radial-gradient(circle at 28% 30%, rgba(124, 58, 237, 0.2), transparent 24%),
      radial-gradient(circle at 72% 30%, rgba(56, 189, 248, 0.16), transparent 24%),
      linear-gradient(180deg, #11182a, #090c16 72%);
  }

  .cta-mascot::after {
    top: 14%;
    width: 66%;
    height: 62%;
  }

  .cta-cat-ear {
    top: 7%;
    width: 18%;
    height: 23%;
    border-radius: 9px;
  }

  .cta-cat-ear-left {
    left: 31%;
  }

  .cta-cat-ear-right {
    right: 31%;
  }

  .cta-cat-eye {
    top: 39%;
    width: 11%;
    height: 18%;
  }

  .cta-cat-eye-left {
    left: 29%;
  }

  .cta-cat-eye-right {
    right: 29%;
  }

  .cta-spark {
    width: 6px;
    height: 6px;
  }

  .sidebar-cta-title {
    max-width: 160px;
    margin-bottom: 8px !important;
    font-size: clamp(1.08rem, 2.2vh, 1.35rem);
    line-height: 0.98;
  }

  .sidebar-cta-copy {
    margin-bottom: 14px !important;
    font-size: clamp(0.78rem, 1.4vh, 0.86rem);
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.88);
  }

  .sidebar-cta button {
    min-height: clamp(38px, 5vh, 44px);
    border-radius: 8px;
    font-size: 0.92rem;
  }

  .sidebar-divider-bottom {
    flex: 0 0 auto;
    margin-top: clamp(8px, 1.6vh, 14px);
  }

  .sidebar-utilities {
    flex: 0 0 auto;
    margin-top: 0;
    gap: clamp(4px, 0.8vh, 8px);
    padding-top: 4px;
    border-top: 0;
  }

  .utility-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(34px, 4.4vh, 40px);
    gap: 14px;
    padding: 0 16px;
    border-radius: 9px;
  }

  .utility-item small {
    font-size: 0.92rem;
    font-weight: 650;
  }

  .sidebar-social {
    flex: 0 0 auto;
    gap: 10px;
    padding-top: clamp(4px, 0.8vh, 8px);
  }

  .social-icon {
    width: clamp(34px, 4.4vh, 38px);
    height: clamp(34px, 4.4vh, 38px);
  }

  .app-shell {
    padding: calc(var(--topbar) + 14px) 34px 72px calc(var(--sidebar) + 34px);
  }

  .home-shell {
    max-width: none;
  }

  .discovery-home {
    gap: 20px;
  }

  .chip-row {
    gap: 14px;
    flex-wrap: nowrap;
    align-items: center;
    overflow: hidden;
  }

  .chip-row button {
    flex: 0 0 auto;
    min-width: 78px;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    background: rgba(13, 15, 23, 0.9);
  }

  .chip-row button:first-child {
    min-width: 76px;
    background: linear-gradient(135deg, #7c3aed 0%, #6268f2 58%, #38bdf8 100%);
  }

  .featured-hero {
    min-height: 390px;
    height: min(390px, calc(100vh - 292px));
    max-height: 390px;
    border-radius: 16px;
    border-color: rgba(139, 92, 246, 0.34);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.025),
      0 22px 60px rgba(0, 0, 0, 0.22);
  }

  .featured-hero .cover img,
  .featured-hero .image-cover img {
    object-position: center center;
  }

  .featured-overlay {
    max-width: min(49%, 640px);
    padding: 0 38px;
    gap: 12px;
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.86) 30%, rgba(0, 0, 0, 0.56) 61%, rgba(0, 0, 0, 0.08) 100%);
  }

  .featured-overlay h2 {
    font-size: clamp(2.4rem, 3.15vw, 3.15rem);
    letter-spacing: 0;
  }

  .featured-description {
    font-size: 1rem;
    line-height: 1.45;
  }

  .featured-stats {
    gap: 15px;
    font-size: 0.98rem;
    font-weight: 700;
  }

  .featured-actions {
    margin-top: 16px;
    gap: 14px;
  }

  .featured-actions .read-button {
    min-height: 54px;
    padding: 0 30px;
    border-radius: 9px;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed 0%, #6d4bed 60%, #4f8cff 100%);
  }

  .featured-plus {
    width: 54px;
    height: 54px;
    font-size: 1.8rem;
  }

  .discovery-section {
    gap: 18px;
  }

  .discovery-head h2 {
    font-size: 1.42rem;
  }

  .discovery-row {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    min-height: 312px;
  }

  .mini-card {
    width: 190px;
    flex: 0 0 190px;
    border-radius: 9px;
    background: rgba(15, 18, 28, 0.9);
  }

  .mini-card .cover {
    aspect-ratio: 3 / 4;
  }

  .mini-card .cover span {
    font-size: 1.45rem;
  }

  .mini-card .mini-meta {
    padding: 12px 14px 13px;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .mini-meta strong {
    grid-column: 1 / -1;
    font-size: 0.98rem;
  }

  .mini-meta .meta {
    font-size: 0.84rem;
  }

  .rank-badge {
    top: 12px;
    left: 12px;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .home-secondary-section {
    display: none;
  }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .sidebar {
    padding-top: calc(var(--topbar) + 10px);
    padding-bottom: 8px;
  }

  .logo {
    height: 78px;
  }

  .sidebar-stack {
    gap: 3px;
  }

  .sidebar-group {
    gap: 1px;
  }

  .sidebar-divider {
    margin: 4px;
  }

  .nav-icon {
    height: 34px;
  }

  .nav-symbol,
  .nav-symbol svg {
    width: 18px;
    height: 18px;
  }

  .nav-icon small {
    font-size: 0.9rem;
  }

  .sidebar-cta {
    margin-top: 6px;
    min-height: 188px;
    padding: 70px 16px 10px;
  }

  .cta-mascot {
    width: 88px;
    height: 64px;
  }

  .sidebar-cta-title {
    max-width: 170px;
    font-size: 1.05rem;
  }

  .sidebar-cta-copy {
    margin-bottom: 8px !important;
    font-size: 0.7rem;
    line-height: 1.24;
  }

  .sidebar-cta button {
    min-height: 32px;
    font-size: 0.82rem;
  }

  .sidebar-divider-bottom {
    margin-top: 8px;
  }

  .sidebar-utilities {
    gap: 2px;
  }

  .utility-item {
    min-height: 30px;
  }

  .sidebar-social {
    gap: 6px;
    padding-top: 4px;
  }

  .social-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
}

@media (min-width: 1024px) and (max-height: 690px) {
  .sidebar {
    padding-top: 84px;
    padding-bottom: 8px;
  }

  .sidebar-stack {
    gap: 2px;
    padding: 0 4px;
  }

  .nav-icon {
    height: 34px;
  }

  .sidebar-cta {
    min-height: 190px;
    padding: 60px 14px 10px;
  }

  .cta-mascot {
    top: 8px;
    width: 70px;
    height: 48px;
  }

  .sidebar-cta-title {
    font-size: 1rem;
  }

  .sidebar-cta-copy {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .sidebar-cta button {
    min-height: 32px;
    font-size: 0.82rem;
  }

  .utility-item {
    min-height: 30px;
  }

  .sidebar-social {
    gap: 5px;
  }

  .social-icon {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 1024px) and (max-height: 620px) {
  .sidebar {
    padding-top: 78px;
    padding-bottom: 6px;
  }

  .logo {
    height: 70px;
  }

  .sidebar-stack {
    gap: 1px;
  }

  .sidebar-divider {
    margin: 2px 4px;
  }

  .nav-icon {
    height: 30px;
  }

  .nav-icon small {
    font-size: 0.84rem;
  }

  .soon-badge {
    padding: 2px 7px;
    font-size: 0.62rem;
  }

  .sidebar-cta {
    margin-top: 6px;
    min-height: 164px;
    padding-top: 46px;
    padding-bottom: 8px;
  }

  .cta-mascot {
    top: 6px;
    width: 54px;
    height: 38px;
  }

  .sidebar-cta-title {
    margin-bottom: 5px !important;
    font-size: 0.95rem;
  }

  .sidebar-cta-copy {
    margin-bottom: 7px !important;
    font-size: 0.68rem;
  }

  .sidebar-cta button {
    min-height: 30px;
    font-size: 0.78rem;
  }

  .sidebar-divider-bottom {
    margin-top: 5px;
  }

  .utility-item {
    min-height: 27px;
  }

  .sidebar-social {
    gap: 4px;
  }

  .social-icon {
    width: 26px;
    height: 26px;
  }
}

@media (min-width: 1024px) and (max-height: 560px) {
  .sidebar {
    overflow-y: auto;
  }
}

/* Tablet: 768px-1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --topbar: 78px;
    --sidebar: 96px;
  }

  .topbar {
    grid-template-columns: auto minmax(260px, 1fr) auto;
    gap: 14px;
    padding: 0 18px;
  }

  .search {
    width: 100%;
    min-width: 0;
    height: 46px;
    border-radius: 14px;
  }

  .sidebar {
    width: var(--sidebar);
    padding: 16px 10px;
    gap: 10px;
  }

  .nav-icon {
    justify-content: center;
    padding: 0;
  }

  .nav-icon small,
  .soon-badge,
  .utility-item small,
  .sidebar-cta-title,
  .sidebar-cta-copy {
    display: none;
  }

  .sidebar-cta {
    padding: 14px 10px;
    border-radius: 16px;
  }

  .sidebar-cta .cta-mascot {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto 10px;
  }

  .sidebar-cta button {
    min-height: 38px;
    font-size: 0.82rem;
    padding: 0 8px;
  }

  .sidebar-utilities {
    gap: 8px;
  }

  .utility-item {
    justify-content: center;
    padding: 0;
    min-height: 38px;
    border-radius: 10px;
  }

  .sidebar-social {
    display: none;
  }

  .app-shell {
    padding: calc(var(--topbar) + 20px) 20px 94px calc(var(--sidebar) + 20px);
  }

  .discovery-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .comic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .featured-hero {
    min-height: 260px;
    height: 280px;
    max-height: 300px;
  }

  .featured-overlay {
    max-width: min(66%, 580px);
    padding: 22px;
  }

  .bottom-nav {
    display: none !important;
  }
}

/* Mobile: below 768px */
@media (max-width: 767px) {
  :root {
    --topbar: 66px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
    height: var(--topbar);
  }

  .logo {
    font-size: 1.05rem;
  }

  .brand-lockup {
    gap: 8px;
  }

  .brand-cat {
    width: 34px;
    height: 34px;
  }

  .wordmark {
    font-size: 1.16rem;
  }

  .sidebar {
    display: none !important;
  }

  .search {
    display: none !important;
  }

  .top-actions {
    gap: 8px;
  }

  .guest-badge {
    display: none;
  }

  .create-button {
    display: none !important;
  }

  .mobile-search-btn {
    display: grid;
  }

  .app-shell {
    padding: 88px 16px calc(154px + env(safe-area-inset-bottom));
  }

  .comic-hero {
    padding-bottom: 26px;
  }

  .comic-hero .cover {
    max-width: 168px;
  }

  .chip-row {
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .chip-row::-webkit-scrollbar {
    display: none;
  }

  .chip-row button {
    min-height: 34px;
    padding: 0 13px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .featured-hero {
    min-height: 220px;
    height: 238px;
    max-height: 260px;
    border-radius: 22px;
  }

  .featured-overlay {
    max-width: min(84%, 420px);
    padding: 18px;
    gap: 8px;
  }

  .featured-overlay h2 {
    font-size: clamp(1.62rem, 6.4vw, 1.88rem);
    line-height: 1.04;
  }

  .featured-stats {
    font-size: 0.76rem;
    gap: 8px;
    flex-wrap: wrap;
  }

  .featured-description {
    -webkit-line-clamp: 2;
    font-size: 0.86rem;
  }

  .read-button {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .featured-plus {
    display: none;
  }

  .discovery-head h2 {
    font-size: 1.25rem;
  }

  .discovery-section {
    gap: 12px;
    margin-top: 2px;
  }

  .discovery-home {
    gap: 22px;
  }

  .discovery-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    grid-template-columns: none;
    padding-bottom: 2px;
  }

  .discovery-row::-webkit-scrollbar {
    display: none;
  }

  .discovery-row .mini-card {
    flex: 0 0 142px;
    width: 142px;
    gap: 12px;
  }

  .discovery-home .comic-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    grid-template-columns: none;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .discovery-home .comic-grid::-webkit-scrollbar {
    display: none;
  }

  .discovery-home .comic-grid .comic-card {
    flex: 0 0 138px;
    width: 138px;
    gap: 10px;
  }

  .discovery-home .comic-grid .comic-card h2 {
    font-size: 0.86rem;
  }

  .continue-section {
    margin-bottom: 0;
  }

  .continue-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .continue-card {
    min-height: 84px;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    border-radius: 12px;
  }

  .continue-cover,
  .continue-cover .cover {
    width: 68px;
  }

  .mini-card,
  .comic-card,
  .continue-card {
    touch-action: manipulation;
  }

  .bottom-nav {
    display: grid !important;
    min-height: 80px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }

  .bottom-nav .upload-tab {
    min-height: 62px;
    margin-top: -18px;
  }

  .bottom-nav .upload-tab .nav-glyph {
    width: 54px;
    height: 54px;
  }

  .bottom-nav button {
    min-height: 56px;
  }

  .bottom-nav small {
    font-size: 0.66rem;
  }
}

@media (max-width: 767px) {
  .my-comics-page-shell {
    padding-top: 88px;
    padding-bottom: calc(150px + env(safe-area-inset-bottom));
  }

  .my-comics-head,
  .my-comics-toolbar {
    grid-template-columns: 1fr;
  }

  .my-comics-head-actions,
  .my-comics-tools,
  .my-comics-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .my-comics-head h1 {
    font-size: 2.35rem;
  }

  .my-comics-create {
    min-height: 46px;
    padding: 0 18px;
    white-space: nowrap;
  }

  .my-comics-grid {
    grid-template-columns: 1fr;
  }

  .my-comic-cover {
    height: 190px;
  }

  .my-comics-status {
    flex: 0 0 auto;
  }

  .my-comics-search {
    min-width: 260px;
  }

  body.reader-route .bottom-nav {
    display: none !important;
  }

  .reader-page-shell {
    padding: 76px 12px 24px !important;
  }

  .reader-page-shell .reader {
    gap: 14px;
    min-height: auto;
  }

  .reader-topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reader-creator-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    width: 100%;
    min-height: 70px;
    padding: 10px;
  }

  .reader-creator-card img {
    width: 48px;
    height: 48px;
  }

  .reader-creator-card strong {
    font-size: 0.95rem;
  }

  .reader-creator-card button {
    min-height: 36px;
    padding: 0 12px;
  }

  .reader-page-shell .reader-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .reader-page-shell .reader-controls button {
    justify-content: center;
    min-height: 42px;
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .reader-progress-panel {
    padding: 0 2px;
    gap: 10px;
  }

  .reader-progress-panel h2 {
    font-size: 0.96rem;
  }

  .reader-progress-panel p {
    font-size: 0.82rem;
  }

  .reader-page-shell .reader-stage {
    border-radius: 12px;
  }

  .reader-page-shell .reader-scroll {
    max-height: none;
    overflow: visible;
  }

  .reader-page-shell .pdf-reader {
    height: 72vh;
    min-height: 520px;
  }

  .reader-action-rail {
    position: sticky;
    right: auto;
    bottom: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(5, 6, 10, 0.62);
    backdrop-filter: blur(12px);
  }

  .reader-action-rail button {
    width: auto;
    min-height: 56px;
    gap: 4px;
  }
}

.home-desktop-feed {
  display: contents;
}

.mobile-home-feed {
  display: none;
}

@media (max-width: 767px) {
  body.reader-route,
  body.reader-route.image-reader-mode {
    overflow-x: hidden;
    background: #030409;
  }

  body.reader-route .topbar,
  body.reader-route .sidebar,
  body.reader-route .bottom-nav {
    display: none !important;
  }

  body.reader-route .app-shell.reader-page-shell {
    min-height: 100svh;
    padding: 0 !important;
    background: #030409;
  }

  body.reader-route .reader-page-shell .reader {
    display: grid;
    gap: 8px;
    align-content: start;
    grid-auto-rows: max-content;
    min-height: 100svh;
    margin: 0;
    padding:
      calc(8px + env(safe-area-inset-top))
      8px
      calc(76px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 50% -16%, rgba(124, 58, 237, 0.18), transparent 34%),
      #030409;
  }

  body.reader-route .reader-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    gap: 7px;
    align-content: start;
    align-items: stretch;
    height: auto;
    min-height: 0;
    max-height: 230px;
    overflow: hidden;
    padding: 0 0 7px;
    background:
      linear-gradient(180deg, rgba(3, 4, 9, 0.98) 0%, rgba(3, 4, 9, 0.88) 72%, transparent 100%);
    backdrop-filter: blur(16px);
    transition:
      max-height 220ms ease,
      opacity 180ms ease,
      padding 220ms ease,
      transform 220ms ease;
    will-change: max-height, transform, opacity;
  }

  body.reader-route.reader-top-hidden .reader-topbar {
    max-height: 0;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    transform: translateY(-120%);
    visibility: hidden;
  }

  body.reader-route .reader-creator-card {
    order: 1;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 8px 9px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
      rgba(10, 13, 24, 0.86);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 12px 28px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px);
  }

  body.reader-route .reader-creator-card img {
    width: 42px;
    height: 42px;
    border-width: 1px;
  }

  body.reader-route .reader-creator-card span {
    gap: 2px;
  }

  body.reader-route .reader-creator-card strong {
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.reader-route .reader-creator-card small {
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.reader-route .reader-creator-card i {
    width: 14px;
    height: 14px;
    font-size: 0.55rem;
  }

  body.reader-route .reader-creator-card button {
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 750;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #675dff);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.25);
  }

  body.reader-route .reader-progress-panel {
    position: static;
    order: 2;
    width: 100%;
    gap: 7px;
    padding: 10px 11px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
      rgba(10, 13, 24, 0.86);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 12px 28px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
  }

  body.reader-route .reader-progress-panel h2 {
    overflow: hidden;
    margin: 0;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.22;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.reader-route .reader-page-progress {
    height: 3px;
    background: rgba(148, 163, 184, 0.18);
  }

  body.reader-route .reader-progress-panel p {
    margin: 0;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.7rem;
    line-height: 1;
  }

  body.reader-route .reader-page-shell .reader-controls {
    order: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 15px;
    background: rgba(8, 10, 18, 0.72);
    box-shadow: none;
    backdrop-filter: blur(16px);
  }

  body.reader-route .reader-page-shell .reader-controls button {
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    gap: 5px;
    padding: 0 7px;
    border-radius: 11px;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1;
  }

  body.reader-route .reader-page-shell .reader-controls svg {
    width: 14px;
    height: 14px;
  }

  body.reader-route .reader-page-shell .reader-stage {
    width: 100%;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.reader-route.image-reader-mode .reader-page-shell .reader-scroll {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.reader-route .reader-page-shell .reader-content {
    display: grid;
    gap: 8px;
    padding: 0;
  }

  body.reader-route .reader-page-shell .chapter-page-image {
    width: 100%;
    border-radius: 8px;
    background: #05060a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
  }

  body.reader-route .reader-page-shell .pdf-reader {
    height: calc(100svh - 118px);
    min-height: 0;
    border-radius: 8px;
  }

  body.reader-route .reader-action-rail {
    position: fixed;
    z-index: 24;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: auto;
    margin: 0;
    padding: 7px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 19px;
    background:
      linear-gradient(180deg, rgba(16, 20, 33, 0.94), rgba(7, 9, 17, 0.96)),
      rgba(8, 10, 18, 0.86);
    box-shadow:
      0 -14px 36px rgba(0, 0, 0, 0.46),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    transform: none;
  }

  body.reader-route .reader-action-rail button:nth-child(n + 5) {
    display: none;
  }

  body.reader-route .reader-action-rail button {
    display: grid;
    place-items: center;
    gap: 3px;
    width: auto;
    min-height: 44px;
    border-radius: 13px;
    color: rgba(226, 232, 240, 0.74);
  }

  body.reader-route .reader-action-rail button.active,
  body.reader-route .reader-action-rail button:hover {
    color: #fff;
    background: rgba(124, 58, 237, 0.14);
  }

  body.reader-route .reader-action-rail svg {
    width: 19px;
    height: 19px;
    filter: none;
  }

  body.reader-route .reader-action-rail span {
    display: block;
    font-size: 0.64rem;
    font-weight: 650;
    line-height: 1;
  }

  body[data-active-route="home"] {
    overflow-x: hidden;
    background:
      radial-gradient(circle at 50% -14%, rgba(124, 58, 237, 0.2), transparent 34%),
      #05060b;
  }

  body[data-active-route="home"] .topbar {
    height: 72px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background:
      linear-gradient(180deg, rgba(5, 6, 12, 0.98), rgba(5, 6, 12, 0.9)),
      rgba(5, 6, 12, 0.94);
    backdrop-filter: blur(18px);
  }

  body[data-active-route="home"] .brand-lockup {
    gap: 9px;
  }

  body[data-active-route="home"] .brand-cat {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 13px rgba(124, 58, 237, 0.42));
  }

  body[data-active-route="home"] .wordmark {
    font-size: 1.26rem;
  }

  body[data-active-route="home"] .top-actions {
    gap: 8px;
  }

  body[data-active-route="home"] .mobile-search-btn {
    order: 1;
  }

  body[data-active-route="home"] .notification-button {
    order: 2;
  }

  body[data-active-route="home"] .avatar {
    order: 3;
  }

  body[data-active-route="home"] .top-actions .icon-button,
  body[data-active-route="home"] .avatar {
    width: 40px;
    height: 40px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(13, 15, 25, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  }

  body[data-active-route="home"] .notification-dot {
    top: 8px;
    right: 9px;
  }

  body[data-active-route="home"] .app-shell.home-shell {
    padding: 78px 0 calc(132px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  body[data-active-route="home"] .home-desktop-feed {
    display: none !important;
  }

  body[data-active-route="home"] .mobile-home-feed {
    display: grid;
    gap: 22px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .mobile-section {
    min-width: 0;
    padding: 0 16px;
  }

  .mobile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 24px;
    margin-bottom: 10px;
  }

  .mobile-section-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.1;
  }

  .mobile-section-head span {
    flex: 0 0 auto;
    color: #a983ff;
    font-size: 0.82rem;
    font-weight: 600;
  }

  .mobile-section-head span:empty {
    display: none;
  }

  .mobile-continue-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 112px;
    padding: 10px;
    border: 1px solid rgba(155, 92, 255, 0.22);
    border-radius: 20px;
    overflow: hidden;
    background:
      radial-gradient(circle at 92% 50%, rgba(59, 130, 246, 0.18), transparent 34%),
      linear-gradient(135deg, rgba(17, 20, 36, 0.94), rgba(8, 9, 16, 0.98));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  }

  .mobile-continue-empty {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 92px;
  }

  .mobile-empty-orb {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background:
      radial-gradient(circle at 38% 36%, rgba(147, 112, 255, 0.86), transparent 18%),
      radial-gradient(circle at 68% 36%, rgba(96, 165, 250, 0.86), transparent 18%),
      linear-gradient(145deg, #15101f, #080a12);
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.22);
  }

  .mobile-continue-empty strong,
  .mobile-continue-body strong,
  .mobile-trending-info strong,
  .mobile-new-info strong,
  .mobile-creator-cta strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-continue-empty p,
  .mobile-creator-cta p,
  .mobile-more-card p {
    margin: 5px 0 0;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .mobile-continue-cover,
  .mobile-continue-body button,
  .mobile-trending-cover,
  .mobile-trending-info,
  .mobile-new-thumb,
  .mobile-new-info {
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }

  .mobile-continue-cover {
    width: 76px;
    height: 92px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
  }

  .mobile-continue-cover .cover,
  .mobile-continue-cover .image-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 16px;
    box-shadow: none;
  }

  .mobile-continue-body {
    display: grid;
    gap: 11px;
    min-width: 0;
  }

  .mobile-continue-body button {
    display: grid;
    gap: 4px;
    padding: 0;
  }

  .mobile-continue-body span,
  .mobile-trending-info span,
  .mobile-new-info span {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #bfa7ff;
    font-size: 0.86rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-progress-row {
    display: grid;
    grid-template-columns: minmax(64px, 1fr) auto;
    align-items: center;
    gap: 9px;
  }

  .mobile-progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
  }

  .mobile-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #60a5fa);
  }

  .mobile-progress-row small {
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.76rem;
    font-weight: 600;
  }

  .mobile-continue-cta,
  .mobile-read-now,
  .mobile-new-read,
  .mobile-creator-cta button {
    border: 0;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition:
      filter 180ms ease,
      transform 180ms ease,
      box-shadow 200ms ease;
  }

  .mobile-continue-cta {
    min-width: 92px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #4f95ff);
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.22);
  }

  .mobile-continue-cta:active,
  .mobile-read-now:active,
  .mobile-new-read:active,
  .mobile-creator-cta button:active {
    transform: scale(0.97);
  }

  .mobile-feature-card {
    position: relative;
    min-height: 238px;
    height: 246px;
    border: 1px solid rgba(155, 92, 255, 0.46);
    border-radius: 24px;
    overflow: hidden;
    background: #080a12;
    box-shadow:
      0 22px 54px rgba(0, 0, 0, 0.34),
      inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  }

  .mobile-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(90deg, rgba(5, 6, 12, 0.96) 0%, rgba(5, 6, 12, 0.88) 39%, rgba(5, 6, 12, 0.34) 70%, rgba(5, 6, 12, 0.08) 100%),
      linear-gradient(0deg, rgba(5, 6, 12, 0.28), transparent 45%);
    pointer-events: none;
  }

  .mobile-feature-art {
    position: absolute;
    inset: 0;
  }

  .mobile-feature-art .cover,
  .mobile-feature-art .image-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-feature-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-feature-art .cover::before,
  .mobile-feature-art .cover span,
  .mobile-feature-art .image-cover::after {
    display: none !important;
  }

  .mobile-feature-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    width: 72%;
    height: 100%;
    padding: 18px;
  }

  .mobile-feature-badge {
    display: inline-grid;
    min-height: 28px;
    place-items: center;
    padding: 0 11px;
    border: 1px solid rgba(167, 139, 250, 0.45);
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.22);
    color: #ddd6fe;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  .mobile-feature-content h2 {
    display: -webkit-box;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.75rem;
    line-height: 1.02;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .mobile-feature-tags:empty {
    display: none;
  }

  .mobile-feature-tags span {
    display: inline-grid;
    min-height: 28px;
    place-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
    font-size: 0.76rem;
    font-weight: 600;
  }

  .mobile-feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    color: rgba(241, 245, 249, 0.86);
    font-size: 0.78rem;
    font-weight: 500;
  }

  .mobile-read-now {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 13px;
    background: linear-gradient(135deg, #7c3aed, #4f95ff);
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.26);
  }

  .mobile-feature-empty {
    display: grid;
    align-content: center;
    gap: 8px;
    height: auto;
    min-height: 132px;
    padding: 18px;
  }

  .mobile-feature-empty strong {
    color: #ffffff;
  }

  .mobile-feature-empty p {
    margin: 0;
    color: rgba(226, 232, 240, 0.72);
  }

  .mobile-chip-rail {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-inline: -16px;
    padding: 2px 16px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .mobile-chip-rail::-webkit-scrollbar,
  .mobile-trending-rail::-webkit-scrollbar {
    display: none;
  }

  .mobile-chip-rail button {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    background: rgba(17, 20, 32, 0.84);
    color: rgba(241, 245, 249, 0.92);
    font-size: 0.82rem;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    transition:
      border-color 180ms ease,
      background 180ms ease,
      transform 180ms ease;
  }

  .mobile-chip-rail button.active {
    border-color: rgba(167, 139, 250, 0.68);
    background: linear-gradient(135deg, #7c3aed, #4f95ff);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.24);
  }

  .mobile-trending-rail {
    display: flex;
    gap: 14px;
    margin-inline: -16px;
    padding: 0 16px 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .mobile-trending-card {
    flex: 0 0 min(78vw, 292px);
    max-width: 292px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 19px;
    background:
      linear-gradient(180deg, rgba(17, 20, 32, 0.95), rgba(8, 9, 16, 0.98));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
    scroll-snap-align: start;
  }

  .mobile-trending-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    overflow: hidden;
  }

  .mobile-trending-cover .cover,
  .mobile-trending-cover .image-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-trending-cover .cover span {
    font-size: 1rem;
  }

  .mobile-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    min-width: 31px;
    height: 31px;
    place-items: center;
    padding: 0 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #60a5fa);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.28);
  }

  .mobile-trending-info {
    display: grid;
    width: 100%;
    gap: 5px;
    padding: 12px;
  }

  .mobile-trending-info strong {
    font-size: 1rem;
    line-height: 1.16;
  }

  .mobile-trending-info small,
  .mobile-new-info small {
    min-width: 0;
    overflow: hidden;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.78rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-new-list {
    display: grid;
    gap: 10px;
  }

  .mobile-new-chapter {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 86px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 17px;
    background: rgba(13, 15, 25, 0.84);
  }

  .mobile-new-thumb {
    width: 62px;
    height: 66px;
    padding: 0;
    overflow: hidden;
    border-radius: 13px;
  }

  .mobile-new-thumb .cover,
  .mobile-new-thumb .image-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 13px;
    box-shadow: none;
  }

  .mobile-new-info {
    display: grid;
    gap: 4px;
    padding: 0;
  }

  .mobile-new-info strong {
    font-size: 0.94rem;
  }

  .mobile-new-read {
    min-width: 62px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid rgba(155, 92, 255, 0.5);
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.14);
    color: #c4b5fd;
  }

  .mobile-more-card {
    display: grid;
    gap: 7px;
    min-height: 132px;
    align-content: center;
    padding: 18px;
    border: 1px dashed rgba(155, 92, 255, 0.34);
    border-radius: 19px;
    background: rgba(12, 14, 24, 0.72);
    color: #ffffff;
  }

  .mobile-creator-cta {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 108px;
    padding: 15px;
    border: 1px solid rgba(155, 92, 255, 0.45);
    border-radius: 21px;
    overflow: hidden;
    background:
      linear-gradient(135deg, rgba(47, 21, 85, 0.84), rgba(15, 18, 32, 0.96) 62%),
      #0d0f19;
  }

  .mobile-creator-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(196, 181, 253, 0.52);
    border-radius: 17px;
    color: #d8b4fe;
    font-size: 1.7rem;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.18);
  }

  .mobile-creator-cta button {
    position: relative;
    z-index: 2;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 13px;
    background: linear-gradient(135deg, #7c3aed, #4f95ff);
  }

  .mobile-creator-art {
    position: absolute;
    inset: 0 0 0 46%;
    opacity: 0.18;
    pointer-events: none;
  }

  .mobile-creator-art .cover,
  .mobile-creator-art .image-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-creator-art .cover::before,
  .mobile-creator-art .cover span,
  .mobile-creator-art .image-cover::after {
    display: none;
  }

  .mobile-home-skeleton .mobile-continue-card,
  .mobile-home-skeleton .mobile-feature-card,
  .mobile-home-skeleton .mobile-trending-card {
    pointer-events: none;
  }

  .mobile-skeleton-cover,
  .mobile-skeleton-panel,
  .mobile-skeleton-tall,
  .mobile-skeleton-lines span {
    display: block;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.055));
    background-size: 220% 100%;
    animation: skeletonPulse 1.35s ease-in-out infinite;
  }

  .mobile-skeleton-cover {
    width: 76px;
    height: 92px;
  }

  .mobile-skeleton-lines {
    display: grid;
    gap: 9px;
  }

  .mobile-skeleton-lines span {
    width: 100%;
    height: 12px;
  }

  .mobile-skeleton-lines span:nth-child(2) {
    width: 72%;
  }

  .mobile-skeleton-lines span:nth-child(3) {
    width: 54%;
  }

  .mobile-skeleton-panel {
    width: 100%;
    height: 100%;
  }

  .mobile-skeleton-tall {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  body[data-active-route="home"] .bottom-nav {
    min-height: 76px;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    border-top-color: rgba(155, 92, 255, 0.18);
    border-radius: 22px 22px 0 0;
    background: rgba(9, 11, 20, 0.9);
    backdrop-filter: blur(20px);
  }

  body[data-active-route="home"] .bottom-nav button {
    min-height: 54px;
    border-radius: 18px;
  }

  body[data-active-route="home"] .bottom-nav button.active {
    border-color: transparent;
    background: transparent;
    color: #9b6bff;
    box-shadow: none;
  }

  body[data-active-route="home"] .bottom-nav .upload-tab {
    min-height: 62px;
    margin-top: -18px;
  }

  body[data-active-route="home"] .bottom-nav .upload-tab .nav-glyph {
    width: 50px;
    height: 50px;
  }

  body[data-active-route="home"] .bottom-soon-badge {
    display: none;
  }

  body[data-active-route="home"] .bottom-nav .bottom-nav-soon {
    cursor: pointer;
    opacity: 0.76;
  }
}

@media (max-width: 390px) {
  body[data-active-route="home"] .app-shell.home-shell {
    padding-top: 74px;
  }

  .mobile-home-feed {
    gap: 20px;
  }

  .mobile-section {
    padding-inline: 14px;
  }

  .mobile-chip-rail,
  .mobile-trending-rail {
    margin-inline: -14px;
    padding-inline: 14px;
    scroll-padding-inline: 14px;
  }

  .mobile-feature-card {
    height: 236px;
  }

  .mobile-feature-content {
    width: 74%;
    padding: 16px;
  }

  .mobile-feature-content h2 {
    font-size: 1.62rem;
  }

  .mobile-trending-card {
    flex-basis: min(78vw, 280px);
  }
}

@media (max-width: 360px) {
  body[data-active-route="home"] .topbar {
    height: 66px;
    padding-inline: 12px;
  }

  body[data-active-route="home"] .brand-cat {
    width: 33px;
    height: 33px;
  }

  body[data-active-route="home"] .wordmark {
    font-size: 1.1rem;
  }

  body[data-active-route="home"] .top-actions {
    gap: 6px;
  }

  body[data-active-route="home"] .top-actions .icon-button,
  body[data-active-route="home"] .avatar {
    width: 36px;
    height: 36px;
  }

  body[data-active-route="home"] .app-shell.home-shell {
    padding-top: 68px;
    padding-bottom: calc(122px + env(safe-area-inset-bottom));
  }

  .mobile-home-feed {
    gap: 18px;
  }

  .mobile-section {
    padding-inline: 12px;
  }

  .mobile-section-head {
    margin-bottom: 9px;
  }

  .mobile-section-head h2 {
    font-size: 1rem;
  }

  .mobile-continue-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    min-height: 118px;
  }

  .mobile-continue-cover,
  .mobile-skeleton-cover {
    width: 64px;
    height: 84px;
  }

  .mobile-continue-cta {
    grid-column: 2;
    justify-self: start;
    min-width: 104px;
    min-height: 34px;
    margin-top: -2px;
  }

  .mobile-feature-card {
    height: 222px;
    border-radius: 21px;
  }

  .mobile-feature-content {
    width: 80%;
    gap: 8px;
    padding: 14px;
  }

  .mobile-feature-badge {
    min-height: 25px;
    font-size: 0.68rem;
  }

  .mobile-feature-content h2 {
    font-size: 1.42rem;
  }

  .mobile-feature-meta {
    font-size: 0.72rem;
  }

  .mobile-feature-meta span:nth-child(2) {
    display: none;
  }

  .mobile-read-now {
    min-height: 38px;
    padding-inline: 15px;
  }

  .mobile-chip-rail,
  .mobile-trending-rail {
    margin-inline: -12px;
    padding-inline: 12px;
    scroll-padding-inline: 12px;
  }

  .mobile-chip-rail button {
    min-height: 36px;
    padding-inline: 13px;
    font-size: 0.78rem;
  }

  .mobile-trending-card {
    flex-basis: min(78vw, 260px);
  }

  .mobile-new-chapter {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px;
  }

  .mobile-new-thumb {
    width: 56px;
    height: 60px;
  }

  .mobile-new-read {
    min-width: 54px;
    min-height: 34px;
    font-size: 0.78rem;
  }

  .mobile-creator-cta {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
  }

  .mobile-creator-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 320px) {
  body[data-active-route="home"] .topbar {
    padding-inline: 10px;
  }

  body[data-active-route="home"] .wordmark {
    font-size: 1rem;
  }

  body[data-active-route="home"] .top-actions {
    gap: 5px;
  }

  body[data-active-route="home"] .top-actions .icon-button,
  body[data-active-route="home"] .avatar {
    width: 34px;
    height: 34px;
  }

  .mobile-feature-card {
    height: 214px;
  }

  .mobile-feature-content {
    width: 84%;
    padding: 12px;
  }

  .mobile-feature-content h2 {
    font-size: 1.28rem;
  }

  .mobile-feature-tags span {
    min-height: 25px;
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .mobile-trending-card {
    flex-basis: 252px;
    max-width: calc(100vw - 46px);
  }

  .mobile-new-chapter {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .mobile-new-read {
    grid-column: 2;
    justify-self: start;
  }

  .mobile-creator-cta {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .mobile-creator-cta button {
    grid-column: 2;
    justify-self: start;
    min-height: 36px;
  }
}

/* Mobile home hard-reset skeleton: structure and proportions first. */
@media (max-width: 767px) {
  body[data-active-route="home"] {
    overflow-x: hidden;
    background: #05060b;
  }

  body[data-active-route="home"] .topbar {
    height: 68px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(5, 6, 11, 0.96);
    backdrop-filter: blur(14px);
  }

  body[data-active-route="home"] .logo {
    min-width: 0;
  }

  body[data-active-route="home"] .brand-lockup {
    gap: 8px;
  }

  body[data-active-route="home"] .brand-cat {
    width: 34px;
    height: 34px;
    filter: none;
  }

  body[data-active-route="home"] .wordmark {
    font-size: 1.12rem;
    letter-spacing: 0;
  }

  body[data-active-route="home"] .top-actions {
    gap: 8px;
  }

  body[data-active-route="home"] .mobile-search-btn {
    order: 1;
  }

  body[data-active-route="home"] .notification-button {
    order: 2;
  }

  body[data-active-route="home"] .avatar {
    order: 3;
  }

  body[data-active-route="home"] .top-actions .icon-button,
  body[data-active-route="home"] .avatar {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #10131d;
    box-shadow: none;
  }

  body[data-active-route="home"] .notification-dot {
    top: 8px;
    right: 8px;
  }

  body[data-active-route="home"] .app-shell.home-shell {
    padding: 82px 0 calc(112px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  body[data-active-route="home"] .home-desktop-feed {
    display: none !important;
  }

  body[data-active-route="home"] .mobile-home-feed {
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .mh-section {
    min-width: 0;
    padding: 0 14px;
  }

  .mh-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 22px;
    margin-bottom: 8px;
  }

  .mh-section-head h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.1;
  }

  .mh-section-head span {
    color: #a78bfa;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .mh-continue-card,
  .mh-feature-card,
  .mh-chapter-row,
  .mh-creator-cta,
  .mh-empty-card {
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: #10131d;
  }

  .mh-continue-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 98px;
    padding: 9px;
    border-radius: 16px;
    overflow: hidden;
  }

  .mh-empty-card {
    color: #f8fafc;
  }

  .mh-empty-card span,
  .mh-continue-copy span,
  .mh-chapter-copy span,
  .mh-trending-copy small,
  .mh-creator-cta span {
    color: rgba(226, 232, 240, 0.68);
  }

  .mh-thumb,
  .mh-continue-copy button,
  .mh-trending-cover,
  .mh-trending-copy,
  .mh-chapter-thumb,
  .mh-chapter-copy {
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }

  .mh-thumb,
  .mh-empty-thumb,
  .mh-skeleton-thumb {
    width: 70px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
  }

  .mh-empty-thumb {
    background: #171b28;
  }

  .mh-thumb .cover,
  .mh-thumb .image-cover,
  .mh-chapter-thumb .cover,
  .mh-chapter-thumb .image-cover,
  .mh-trending-cover .cover,
  .mh-trending-cover .image-cover,
  .mh-feature-media .cover,
  .mh-feature-media .image-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: inherit;
    box-shadow: none;
  }

  .mh-thumb .cover::before,
  .mh-thumb .cover span,
  .mh-chapter-thumb .cover::before,
  .mh-chapter-thumb .cover span,
  .mh-feature-media .cover::before,
  .mh-feature-media .cover span,
  .mh-feature-media .image-cover::after {
    display: none !important;
  }

  .mh-continue-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
  }

  .mh-continue-copy button {
    display: grid;
    gap: 3px;
    padding: 0;
  }

  .mh-continue-copy strong,
  .mh-feature-copy h2,
  .mh-trending-copy strong,
  .mh-chapter-copy strong,
  .mh-creator-cta strong {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mh-continue-copy strong {
    font-size: 0.98rem;
  }

  .mh-continue-copy span {
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mh-progress {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
  }

  .mh-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #8b5cf6;
  }

  .mh-continue-cta,
  .mh-read-cta,
  .mh-row-read,
  .mh-creator-cta button {
    border: 0;
    border-radius: 999px;
    background: #7c3aed;
    color: #ffffff;
    font-weight: 650;
    cursor: pointer;
  }

  .mh-continue-cta {
    min-width: 82px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .mh-feature-card {
    position: relative;
    height: 218px;
    border-radius: 18px;
    overflow: hidden;
  }

  .mh-feature-media {
    position: absolute;
    inset: 0;
    border-radius: inherit;
  }

  .mh-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mh-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 6, 11, 0.92) 0%, rgba(5, 6, 11, 0.72) 47%, rgba(5, 6, 11, 0.18) 100%);
    pointer-events: none;
  }

  .mh-feature-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    gap: 8px;
    width: 68%;
    height: 100%;
    padding: 16px;
  }

  .mh-badge {
    width: max-content;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid rgba(167, 139, 250, 0.45);
    border-radius: 999px;
    color: #ddd6fe;
    font-size: 0.66rem;
    font-weight: 650;
    text-transform: uppercase;
  }

  .mh-feature-copy h2 {
    display: -webkit-box;
    margin: 0;
    font-size: 1.38rem;
    font-weight: 650;
    line-height: 1.08;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mh-feature-copy p {
    margin: 0;
    overflow: hidden;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mh-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 9px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
  }

  .mh-read-cta {
    width: max-content;
    min-height: 36px;
    padding: 0 15px;
    font-size: 0.82rem;
  }

  .mh-chip-section {
    padding: 0;
  }

  .mh-chip-rail {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    height: 48px;
    padding: 4px 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .mh-chip-rail::-webkit-scrollbar,
  .mh-trending-rail::-webkit-scrollbar {
    display: none;
  }

  .mh-chip-rail button {
    flex: 0 0 auto;
    min-width: max-content;
    height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: #10131d;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .mh-chip-rail button.active {
    border-color: #7c3aed;
    background: #7c3aed;
    font-weight: 650;
  }

  .mh-trending-rail {
    display: flex;
    gap: 12px;
    margin-inline: -14px;
    padding: 0 14px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .mh-trending-card,
  .mh-trending-empty {
    flex: 0 0 164px;
    width: 164px;
    min-height: 248px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    overflow: hidden;
    background: #10131d;
    scroll-snap-align: start;
  }

  .mh-trending-cover {
    position: relative;
    display: block;
    width: 100%;
    height: 190px;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
  }

  .mh-trending-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mh-trending-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    min-width: 26px;
    height: 26px;
    place-items: center;
    padding: 0 7px;
    border-radius: 8px;
    background: #7c3aed;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 650;
  }

  .mh-trending-copy {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 10px;
  }

  .mh-trending-copy strong {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.14;
  }

  .mh-trending-copy small {
    overflow: hidden;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mh-chapter-list {
    display: grid;
    gap: 9px;
  }

  .mh-chapter-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 82px;
    padding: 8px;
    border-radius: 14px;
  }

  .mh-chapter-thumb {
    width: 56px;
    height: 62px;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
  }

  .mh-chapter-copy {
    display: grid;
    gap: 3px;
    padding: 0;
  }

  .mh-chapter-copy strong {
    font-size: 0.9rem;
    font-weight: 600;
  }

  .mh-chapter-copy span,
  .mh-chapter-copy small {
    overflow: hidden;
    font-size: 0.76rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mh-chapter-copy small {
    color: rgba(226, 232, 240, 0.55);
  }

  .mh-row-read {
    min-width: 54px;
    min-height: 34px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid rgba(124, 58, 237, 0.65);
    color: #c4b5fd;
    font-size: 0.78rem;
    font-weight: 650;
  }

  .mh-creator-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 14px;
    border-radius: 16px;
  }

  .mh-creator-cta div {
    min-width: 0;
  }

  .mh-creator-cta strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 650;
  }

  .mh-creator-cta span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mh-creator-cta button {
    min-width: 64px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .mh-skeleton,
  .mh-skeleton-stack span {
    display: block;
    background: #171b28;
  }

  .mh-skeleton-stack {
    display: grid;
    gap: 8px;
  }

  .mh-skeleton-stack span {
    width: 100%;
    height: 11px;
    border-radius: 999px;
  }

  .mh-skeleton-stack span:nth-child(2) {
    width: 72%;
  }

  .mh-skeleton-stack span:nth-child(3) {
    width: 54%;
  }

  .mh-skeleton-fill {
    width: 100%;
    height: 100%;
  }

  .mh-skeleton-cover {
    width: 100%;
    height: 190px;
  }

  body[data-active-route="home"] .bottom-nav {
    min-height: 72px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: rgba(8, 10, 17, 0.95);
  }

  body[data-active-route="home"] .bottom-nav button {
    min-height: 52px;
    gap: 3px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-route="home"] .bottom-nav button.active {
    color: #8b5cf6;
    background: transparent;
    box-shadow: none;
  }

  body[data-active-route="home"] .bottom-nav small {
    font-size: 0.64rem;
    font-weight: 550;
  }

  body[data-active-route="home"] .bottom-nav .upload-tab {
    min-height: 56px;
    margin-top: -12px;
  }

  body[data-active-route="home"] .bottom-nav .upload-tab .nav-glyph {
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 5px rgba(8, 10, 17, 0.95);
  }

  body[data-active-route="home"] .bottom-soon-badge {
    display: none;
  }
}

@media (max-width: 375px) {
  body[data-active-route="home"] .app-shell.home-shell {
    padding-top: 78px;
  }

  body[data-active-route="home"] .mobile-home-feed {
    gap: 16px;
  }

  .mh-section {
    padding-inline: 12px;
  }

  .mh-chip-rail {
    padding-inline: 12px;
  }

  .mh-trending-rail {
    margin-inline: -12px;
    padding-inline: 12px;
    scroll-padding-inline: 12px;
  }

  .mh-continue-card {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    min-height: 94px;
  }

  .mh-thumb,
  .mh-empty-thumb,
  .mh-skeleton-thumb {
    width: 64px;
    height: 74px;
  }

  .mh-feature-card {
    height: 206px;
  }

  .mh-feature-copy {
    width: 72%;
    padding: 14px;
  }

  .mh-trending-card,
  .mh-trending-empty {
    flex-basis: 156px;
    width: 156px;
    min-height: 238px;
  }

  .mh-trending-cover,
  .mh-skeleton-cover {
    height: 180px;
  }
}

@media (max-width: 360px) {
  body[data-active-route="home"] .topbar {
    height: 64px;
    padding-inline: 10px;
  }

  body[data-active-route="home"] .brand-cat {
    width: 31px;
    height: 31px;
  }

  body[data-active-route="home"] .wordmark {
    font-size: 1rem;
  }

  body[data-active-route="home"] .top-actions {
    gap: 6px;
  }

  body[data-active-route="home"] .top-actions .icon-button,
  body[data-active-route="home"] .avatar {
    width: 34px;
    height: 34px;
  }

  body[data-active-route="home"] .app-shell.home-shell {
    padding-top: 72px;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .mh-section-head h2 {
    font-size: 0.96rem;
  }

  .mh-continue-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 9px;
  }

  .mh-thumb,
  .mh-empty-thumb,
  .mh-skeleton-thumb {
    width: 58px;
    height: 68px;
  }

  .mh-continue-cta {
    grid-column: 2;
    justify-self: start;
    min-width: 92px;
    min-height: 32px;
    font-size: 0.76rem;
  }

  .mh-feature-card {
    height: 200px;
  }

  .mh-feature-copy {
    width: 76%;
    gap: 7px;
    padding: 13px;
  }

  .mh-feature-copy h2 {
    font-size: 1.2rem;
  }

  .mh-meta span:nth-child(2) {
    display: none;
  }

  .mh-trending-card,
  .mh-trending-empty {
    flex-basis: 148px;
    width: 148px;
    min-height: 226px;
  }

  .mh-trending-cover,
  .mh-skeleton-cover {
    height: 170px;
  }

  .mh-chapter-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mh-chapter-thumb {
    width: 52px;
    height: 58px;
  }
}

@media (max-width: 320px) {
  .mh-section {
    padding-inline: 10px;
  }

  .mh-chip-rail {
    padding-inline: 10px;
  }

  .mh-trending-rail {
    margin-inline: -10px;
    padding-inline: 10px;
    scroll-padding-inline: 10px;
  }

  .mh-feature-card {
    height: 192px;
  }

  .mh-feature-copy {
    width: 82%;
    padding: 12px;
  }

  .mh-feature-copy h2 {
    font-size: 1.08rem;
  }

  .mh-read-cta {
    min-height: 32px;
    padding-inline: 12px;
  }

  .mh-trending-card,
  .mh-trending-empty {
    flex-basis: 142px;
    width: 142px;
    min-height: 218px;
  }

  .mh-trending-cover,
  .mh-skeleton-cover {
    height: 162px;
  }

  .mh-chapter-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .mh-row-read {
    grid-column: 2;
    justify-self: start;
    min-height: 30px;
  }
}

/* ComicHub mobile authentication flow */
.auth-mobile-page-shell {
  padding: 0 !important;
}

.auth-flow {
  position: relative;
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at 48% 14%, rgba(124, 58, 237, 0.32), transparent 31%),
    radial-gradient(circle at 88% 6%, rgba(59, 130, 246, 0.14), transparent 28%),
    radial-gradient(circle at 8% 62%, rgba(124, 58, 237, 0.11), transparent 34%),
    linear-gradient(180deg, #080916 0%, #05060b 68%, #03040a 100%);
}

.auth-flow::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 6, 11, 0.22), rgba(5, 6, 11, 0.82) 72%),
    url("/assets/auth-universe-bg.png"),
    linear-gradient(135deg, transparent 0 28%, rgba(255, 255, 255, 0.035) 28% 29%, transparent 29% 100%),
    linear-gradient(35deg, transparent 0 62%, rgba(124, 58, 237, 0.08) 62% 63%, transparent 63% 100%);
  background-position:
    center,
    center,
    center,
    center;
  background-size:
    cover,
    cover,
    auto,
    auto;
  opacity: 0.58;
}

.auth-flow::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 13%, rgba(124, 58, 237, 0.18), transparent 31%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, 0.56) 100%);
  opacity: 0.82;
}

.auth-world {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-world::before,
.auth-world::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(167, 139, 250, 0.16);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.09), rgba(96, 165, 250, 0.025)),
    rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 28px rgba(124, 58, 237, 0.06);
}

.auth-world::before {
  left: -20px;
  top: 86px;
  width: 86px;
  height: 128px;
  border-radius: 12px;
  transform: rotate(-16deg);
}

.auth-world::after {
  right: -22px;
  top: 188px;
  width: 78px;
  height: 112px;
  border-radius: 12px;
  transform: rotate(15deg);
}

.auth-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.8);
}

.auth-star.a { left: 16%; top: 22%; }
.auth-star.b { right: 17%; top: 34%; }
.auth-star.c { left: 74%; top: 12%; }

.auth-panel-shape {
  position: absolute;
  width: 82px;
  height: 112px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.045);
}

.auth-panel-shape.a {
  left: -24px;
  top: 95px;
  transform: rotate(-16deg);
}

.auth-panel-shape.b {
  right: -30px;
  top: 210px;
  transform: rotate(14deg);
}

.auth-screen {
  position: relative;
  z-index: 1;
  display: none;
  width: 100%;
  min-height: 100svh;
  padding: max(14px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom));
}

.auth-screen.is-active {
  display: grid;
}

.auth-entry-screen {
  grid-template-rows: auto 184px auto auto auto;
  align-content: start;
  gap: 15px;
}

.auth-form-screen,
.auth-reset-screen,
.auth-guest-screen {
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 12px;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

.auth-language-pill,
.auth-back-button,
.auth-email-button,
.auth-secondary-button,
.auth-google-button,
.auth-primary-button,
.auth-subtle-link,
.auth-eye-button,
.auth-options-row button,
.auth-switch-copy button,
.auth-legal button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.auth-language-pill,
.auth-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(15, 18, 30, 0.74);
  color: rgba(248, 250, 252, 0.92);
}

.auth-language-pill {
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.22);
}

.auth-language-pill svg,
.auth-back-button svg,
.auth-input-icon svg,
.auth-eye-button svg,
.auth-email-button svg,
.auth-secondary-button svg,
.auth-primary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-back-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.auth-entry-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}

.auth-entry-art::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 176px;
  height: 44px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.26), transparent 66%);
  box-shadow:
    0 0 42px rgba(124, 58, 237, 0.22),
    inset 0 0 20px rgba(96, 165, 250, 0.08);
  transform: translateX(-50%);
}

.auth-entry-art::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.11), transparent 62%);
  transform: translateX(-50%);
  filter: blur(2px);
}

.auth-comic-shadow {
  position: absolute;
  right: 9%;
  bottom: 14px;
  width: 128px;
  height: 168px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 12px;
  opacity: 0.3;
  transform: rotate(9deg);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34);
}

.auth-comic-shadow .cover,
.auth-comic-shadow .image-cover,
.auth-mini-comic .cover,
.auth-mini-comic .image-cover {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

.auth-comic-shadow .cover::before,
.auth-comic-shadow .cover span,
.auth-comic-shadow .image-cover::after,
.auth-mini-comic .cover::before,
.auth-mini-comic .cover span,
.auth-mini-comic .image-cover::after {
  display: none !important;
}

.auth-cat {
  position: relative;
  width: 136px;
  aspect-ratio: 1;
  filter:
    drop-shadow(0 0 26px rgba(124, 58, 237, 0.36))
    drop-shadow(0 18px 28px rgba(0, 0, 0, 0.34));
  z-index: 1;
}

.auth-cat img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-cat.large {
  width: 172px;
}

.auth-cat.peek {
  width: 118px;
}

.auth-cat.guest {
  width: 148px;
}

.auth-cat-ear {
  position: absolute;
  top: -20%;
  width: 31%;
  height: 38%;
  border: 2px solid rgba(167, 139, 250, 0.75);
  border-radius: 12px 88% 14px 86%;
  background: linear-gradient(145deg, #111323, #2d1858);
}

.auth-cat-ear.left {
  left: 12%;
  transform: rotate(-22deg);
}

.auth-cat-ear.right {
  right: 12%;
  transform: rotate(22deg) scaleX(-1);
}

.auth-cat-eye {
  position: absolute;
  top: 38%;
  width: 18%;
  height: 25%;
  border-radius: 50%;
}

.auth-cat-eye.left {
  left: 29%;
  background: radial-gradient(circle at 60% 24%, #fff 0 10%, transparent 11%), #8b5cf6;
}

.auth-cat-eye.right {
  right: 29%;
  background: radial-gradient(circle at 58% 22%, #fff 0 10%, transparent 11%), #60a5fa;
}

.auth-cat-nose {
  position: absolute;
  left: 50%;
  top: 63%;
  width: 12px;
  height: 9px;
  border-radius: 50%;
  background: #c084fc;
  transform: translateX(-50%);
}

.auth-cat-paw {
  position: absolute;
  display: none;
  bottom: -10px;
  width: 28px;
  height: 20px;
  border: 2px solid rgba(167, 139, 250, 0.72);
  border-radius: 999px;
  background: #080a12;
}

.auth-cat-paw.left { left: 14px; }
.auth-cat-paw.right { right: 14px; }

.auth-peek {
  display: grid;
  justify-items: center;
  height: 82px;
  margin-bottom: -24px;
  overflow: hidden;
}

.auth-peek .auth-cat {
  transform: translateY(-8px);
}

.auth-brand-block {
  display: grid;
  gap: 13px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  color: #ffffff;
  font-size: 1.72rem;
  font-weight: 950;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.auth-brand img {
  width: 136px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(124, 58, 237, 0.35));
}

.auth-brand > span {
  display: none;
}

.auth-brand span span,
.auth-brand-block h1 span,
.auth-switch-copy button,
.auth-options-row button,
.auth-legal button {
  color: #9b6bff;
}

.auth-brand-block h1 {
  max-width: 310px;
  margin: 0;
  color: #ffffff;
  font-size: 2.42rem;
  line-height: 1.06;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.auth-brand-block p {
  max-width: 280px;
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.98rem;
  line-height: 1.5;
}

.auth-action-stack {
  display: grid;
  gap: 11px;
}

.auth-google-button,
.auth-primary-button,
.auth-email-button,
.auth-secondary-button {
  min-height: 54px;
  border-radius: 16px;
}

.auth-google-button,
.auth-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #7c3aed, #60a5fa);
  color: #ffffff;
  font-weight: 900;
  box-shadow:
    0 18px 52px rgba(80, 89, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}

.auth-google-button span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #4285f4;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.auth-secondary-button,
.auth-email-button {
  display: grid;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(15, 18, 30, 0.72);
  color: #f8fafc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.auth-secondary-button {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  min-height: 60px;
  padding: 0 16px;
  text-align: left;
}

.auth-secondary-button strong,
.auth-secondary-button small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-secondary-button small {
  margin-top: 3px;
  color: rgba(226, 232, 240, 0.6);
  font-size: 0.78rem;
}

.auth-email-button {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 16px;
  font-weight: 850;
}

.auth-google-button:hover,
.auth-primary-button:hover,
.auth-secondary-button:hover,
.auth-email-button:hover {
  transform: translateY(-1px);
}

.auth-google-button:hover,
.auth-primary-button:hover {
  filter: brightness(1.06);
  box-shadow:
    0 22px 62px rgba(80, 89, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-secondary-button:hover,
.auth-email-button:hover {
  border-color: rgba(167, 139, 250, 0.28);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.11), rgba(96, 165, 250, 0.035)),
    rgba(15, 18, 30, 0.78);
}

.auth-divider-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.auth-divider-line::before,
.auth-divider-line::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-legal {
  margin: 0;
  color: rgba(226, 232, 240, 0.55);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

.auth-legal button {
  padding: 0;
  background: transparent;
  font-weight: 800;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(22, 25, 42, 0.82), rgba(8, 10, 20, 0.88)),
    rgba(13, 16, 28, 0.82);
  backdrop-filter: blur(16px);
  box-shadow:
    0 28px 88px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(124, 58, 237, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-form-screen .auth-card {
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.58),
    0 0 54px rgba(124, 58, 237, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.auth-card-head {
  display: grid;
  gap: 8px;
}

.auth-card-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.95rem;
  line-height: 1.08;
}

.auth-card-head p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.94rem;
  line-height: 1.5;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 850;
}

.auth-input-shell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(6, 8, 16, 0.68);
  color: rgba(226, 232, 240, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-input-shell:focus-within {
  border-color: rgba(139, 92, 246, 0.72);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.13);
}

.auth-input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 650;
}

.auth-input-shell input::placeholder {
  color: rgba(226, 232, 240, 0.46);
}

.auth-eye-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.58);
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
}

.auth-options-row button,
.auth-switch-copy button,
.auth-subtle-link {
  padding: 0;
  background: transparent;
  color: #a78bfa;
  font-weight: 850;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(248, 250, 252, 0.9);
  font-weight: 800;
}

.auth-check input {
  position: absolute;
  opacity: 0;
}

.auth-check span {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #7c3aed;
}

.auth-check span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-primary-button {
  width: 100%;
  padding: 0 18px;
  font-size: 0.98rem;
}

.auth-switch-copy {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.86rem;
  text-align: center;
}

.auth-subtle-link {
  justify-self: center;
  min-height: 30px;
  color: rgba(226, 232, 240, 0.62);
}

.auth-status {
  min-height: 18px;
  margin: 0;
  color: #fca5a5;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: center;
}

.auth-reset-card {
  margin-top: 44px;
}

.auth-reset-icon {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  justify-self: center;
  border-radius: 28px;
  background: linear-gradient(135deg, #7c3aed, #60a5fa);
  color: #080a12;
}

.auth-reset-icon svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #090b12;
  stroke-width: 1.8;
}

.auth-guest-art {
  position: relative;
  display: grid;
  min-height: 168px;
  place-items: center;
}

.auth-mini-comic {
  position: absolute;
  right: 44px;
  bottom: 12px;
  width: 82px;
  height: 108px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 10px;
  opacity: 0.36;
  transform: rotate(10deg);
}

.auth-guest-card {
  align-self: start;
}

.auth-benefits {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.9rem;
}

.auth-benefits li span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8b5cf6;
}

@media (min-width: 431px) {
  .auth-flow {
    min-height: min(100vh, 920px);
    border-inline: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  }
}

@media (max-width: 390px) {
  .auth-screen {
    padding-inline: 18px;
  }

  .auth-entry-screen {
    grid-template-rows: auto 178px auto auto auto;
    gap: 14px;
  }

  .auth-brand-block h1 {
    font-size: 2.32rem;
  }

  .auth-cat.large {
    width: 130px;
  }

  .auth-card {
    padding: 16px;
    gap: 13px;
  }

  .auth-card-head h2 {
    font-size: 1.78rem;
  }
}

@media (max-width: 360px) {
  .auth-screen {
    padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }

  .auth-entry-screen {
    grid-template-rows: auto 150px auto auto auto;
    gap: 12px;
  }

  .auth-language-pill {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 0.74rem;
  }

  .auth-back-button {
    width: 36px;
    height: 36px;
  }

  .auth-brand {
    font-size: 1.55rem;
  }

  .auth-brand img {
    width: 42px;
    height: 42px;
  }

  .auth-brand-block {
    gap: 12px;
  }

  .auth-brand-block h1 {
    font-size: 2.05rem;
  }

  .auth-brand-block p {
    font-size: 0.9rem;
  }

  .auth-cat.large {
    width: 112px;
  }

  .auth-comic-shadow {
    width: 104px;
    height: 138px;
  }

  .auth-action-stack {
    gap: 10px;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button {
    min-height: 50px;
  }

  .auth-secondary-button {
    min-height: 56px;
  }

  .auth-form-screen,
  .auth-reset-screen,
  .auth-guest-screen {
    gap: 10px;
  }

  .auth-peek {
    height: 62px;
    margin-bottom: -21px;
  }

  .auth-cat.peek {
    width: 88px;
  }

  .auth-card {
    border-radius: 18px;
    padding: 14px;
    gap: 12px;
  }

  .auth-card-head h2 {
    font-size: 1.62rem;
  }

  .auth-card-head p {
    font-size: 0.86rem;
  }

  .auth-input-shell {
    min-height: 46px;
    border-radius: 13px;
  }

  .auth-options-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .auth-reset-card {
    margin-top: 22px;
  }

  .auth-guest-art {
    min-height: 142px;
  }
}

@media (max-width: 320px) {
  .auth-screen {
    padding-inline: 12px;
  }

  .auth-entry-screen {
    grid-template-rows: auto 124px auto auto auto;
    gap: 10px;
  }

  .auth-brand-block h1 {
    font-size: 1.78rem;
  }

  .auth-brand-block p {
    font-size: 0.82rem;
  }

  .auth-cat.large {
    width: 96px;
  }

  .auth-comic-shadow {
    width: 88px;
    height: 118px;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button {
    min-height: 46px;
    border-radius: 14px;
    font-size: 0.88rem;
  }

  .auth-secondary-button {
    min-height: 52px;
    padding-inline: 12px;
  }

  .auth-secondary-button small {
    font-size: 0.72rem;
  }

  .auth-card {
    padding: 12px;
  }

  .auth-card-head h2 {
    font-size: 1.46rem;
  }

  .auth-field {
    gap: 5px;
    font-size: 0.78rem;
  }

  .auth-input-shell {
    min-height: 44px;
  }

  .auth-reset-icon {
    width: 66px;
    height: 66px;
    border-radius: 22px;
  }

  .auth-benefits {
    gap: 8px;
  }

  .auth-benefits li {
    font-size: 0.82rem;
  }
}

/* ComiKat premium mobile auth polish */
.auth-flow {
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100svh;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 10%, rgba(143, 80, 255, 0.38), transparent 29%),
    radial-gradient(circle at 90% 2%, rgba(80, 133, 255, 0.18), transparent 24%),
    radial-gradient(circle at 12% 74%, rgba(183, 54, 255, 0.12), transparent 33%),
    linear-gradient(180deg, #050611 0%, #070817 46%, #03040b 100%);
}

.auth-flow::before {
  opacity: 0.68;
  background:
    linear-gradient(180deg, rgba(3, 4, 11, 0.12), rgba(3, 4, 11, 0.88) 72%),
    url("/assets/auth-universe-bg.png"),
    radial-gradient(circle at 24% 20%, rgba(168, 85, 247, 0.16), transparent 28%),
    radial-gradient(circle at 76% 34%, rgba(96, 165, 250, 0.12), transparent 25%);
  background-size: cover, cover, auto, auto;
}

.auth-flow::after {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 27%, transparent 0 32%, rgba(0, 0, 0, 0.36) 78%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    linear-gradient(90deg, rgba(124, 58, 237, 0.18), transparent 9% 91%, rgba(96, 165, 250, 0.12));
}

.auth-screen {
  width: 100%;
  min-width: 0;
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) 22px max(18px, env(safe-area-inset-bottom));
}

.auth-entry-screen {
  grid-template-rows: auto minmax(206px, 30svh) auto auto auto;
  gap: 15px;
}

.auth-form-screen,
.auth-reset-screen,
.auth-guest-screen {
  grid-template-rows: auto auto 1fr;
  gap: 0;
}

.auth-form-screen,
.auth-reset-screen {
  align-content: start;
}

.auth-topbar {
  min-width: 0;
  min-height: 42px;
}

.auth-mini-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.auth-mini-brand img {
  width: 118px;
  max-width: 38vw;
  height: 40px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.44));
}

.auth-language-pill,
.auth-back-button {
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(8, 10, 22, 0.72);
  color: #ffffff;
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 32px rgba(0, 0, 0, 0.28);
}

.auth-back-button {
  width: 42px;
  height: 42px;
}

.auth-entry-art {
  min-height: 0;
  align-self: stretch;
  overflow: visible;
}

.auth-entry-art::before {
  bottom: 14px;
  width: min(78%, 275px);
  height: 76px;
  border: 0;
  background:
    radial-gradient(ellipse at center, rgba(167, 139, 250, 0.45), transparent 68%),
    radial-gradient(ellipse at center, rgba(96, 165, 250, 0.18), transparent 74%);
  filter: blur(2px);
}

.auth-entry-art::after {
  top: 5%;
  width: min(88%, 320px);
  height: min(88%, 300px);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.26), transparent 64%);
}

.auth-cat {
  width: 148px;
  filter:
    drop-shadow(0 0 28px rgba(139, 92, 246, 0.54))
    drop-shadow(0 24px 32px rgba(0, 0, 0, 0.42));
}

.auth-cat.entry {
  width: min(76vw, 298px);
  transform: translateY(8px);
}

.auth-cat.login {
  width: min(40vw, 158px);
  transform: translateY(18px);
}

.auth-cat.signup {
  width: min(44vw, 176px);
  transform: translate(22px, 16px) rotate(3deg);
}

.auth-cat.forgot {
  width: min(39vw, 154px);
}

.auth-cat.guest {
  width: min(82vw, 292px);
}

.auth-hello-bubble {
  position: absolute;
  left: 7px;
  bottom: 34px;
  z-index: 2;
  max-width: 118px;
  padding: 10px 12px;
  border: 1px solid rgba(192, 132, 252, 0.5);
  border-radius: 16px;
  background: rgba(24, 14, 49, 0.72);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.75rem;
  line-height: 1.35;
  box-shadow:
    0 0 30px rgba(139, 92, 246, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.auth-hello-bubble strong {
  display: block;
  color: #ffffff;
}

.auth-brand-block {
  gap: 9px;
  text-align: center;
  justify-items: center;
}

.auth-brand-block h1 {
  max-width: 350px;
  font-size: clamp(2rem, 10.2vw, 2.72rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-brand-block h1 span {
  color: #8b5cf6;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.72);
}

.auth-brand-block p {
  max-width: 310px;
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.98rem;
}

.auth-action-stack {
  gap: 12px;
  min-width: 0;
}

.auth-google-button,
.auth-primary-button,
.auth-email-button,
.auth-secondary-button {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border-radius: 16px;
  font-size: 0.94rem;
}

.auth-google-button,
.auth-primary-button {
  display: grid;
  grid-template-columns: 34px minmax(0, auto) 24px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #8a28ff 0%, #8d39ff 42%, #5a7cff 100%);
  box-shadow:
    0 18px 50px rgba(93, 79, 255, 0.38),
    0 0 0 1px rgba(139, 92, 246, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.auth-google-button.is-light {
  background:
    linear-gradient(180deg, #ffffff, #f2efff);
  color: #101223;
  box-shadow:
    0 20px 54px rgba(167, 139, 250, 0.32),
    0 0 34px rgba(255, 255, 255, 0.18);
}

.auth-google-button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-google-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #4285f4;
  font-weight: 950;
}

.auth-google-button > svg,
.auth-primary-button > svg {
  justify-self: end;
  width: 23px;
  height: 23px;
}

.auth-secondary-button,
.auth-email-button {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    rgba(12, 14, 29, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 15px 38px rgba(0, 0, 0, 0.28);
}

.auth-email-button {
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  border-color: rgba(192, 132, 252, 0.62);
  color: #ffffff;
}

.auth-secondary-button svg,
.auth-email-button svg {
  color: rgba(248, 250, 252, 0.9);
}

.auth-single-button {
  display: flex;
  justify-content: center;
  padding: 0 18px;
  text-align: center;
  font-weight: 900;
}

.auth-divider-line {
  text-transform: none;
  color: rgba(248, 250, 252, 0.72);
}

.auth-entry-footer {
  display: grid;
  gap: 8px;
}

.auth-card {
  position: relative;
  z-index: 2;
  align-self: start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-top: -4px;
  padding: 20px;
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(20, 18, 42, 0.84), rgba(5, 6, 17, 0.86)),
    rgba(7, 8, 18, 0.7);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 54px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.auth-form-screen .auth-card {
  margin-top: -2px;
  padding-top: 24px;
}

.auth-screen[data-auth-panel="signup"] .auth-card {
  gap: 9px;
  padding: 17px;
  padding-top: 22px;
}

.auth-screen[data-auth-panel="signup"] .auth-card-head {
  gap: 5px;
}

.auth-screen[data-auth-panel="signup"] .auth-input-shell {
  min-height: 43px;
}

.auth-screen[data-auth-panel="signup"] .auth-google-button,
.auth-screen[data-auth-panel="signup"] .auth-primary-button {
  min-height: 48px;
}

.auth-screen[data-auth-panel="signup"] .auth-divider-line {
  margin-block: 0;
}

.auth-card-head h2 {
  font-size: clamp(1.56rem, 6.5vw, 1.9rem);
  line-height: 1.08;
}

.auth-card-head p {
  color: rgba(248, 250, 252, 0.76);
  font-size: 0.9rem;
}

.auth-peek {
  position: relative;
  z-index: 1;
  height: 112px;
  margin-bottom: -26px;
  overflow: visible;
  pointer-events: none;
}

.auth-peek-tall {
  height: 118px;
  margin-bottom: -28px;
}

.auth-field {
  gap: 6px;
  font-size: 0.8rem;
}

.auth-input-shell {
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(7, 8, 19, 0.74);
}

.auth-input-shell:focus-within {
  border-color: rgba(192, 132, 252, 0.88);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.15),
    0 0 24px rgba(139, 92, 246, 0.22);
}

.auth-input-shell input {
  font-size: 0.84rem;
  font-weight: 750;
}

.auth-input-shell input::placeholder {
  color: rgba(226, 232, 240, 0.5);
}

.auth-options-row {
  min-width: 0;
  color: rgba(248, 250, 252, 0.88);
}

.auth-check {
  min-width: 0;
  white-space: nowrap;
}

.auth-check span {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.38);
}

.auth-primary-button {
  grid-template-columns: minmax(0, auto) 24px;
  font-weight: 950;
}

.auth-guest-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #ffffff;
  font-weight: 900;
}

.auth-guest-link svg {
  width: 18px;
  height: 18px;
}

.auth-strength {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, 26px);
  align-items: center;
  gap: 7px;
  margin-block: -4px -2px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.73rem;
}

.auth-strength span {
  min-width: 0;
}

.auth-strength strong {
  color: #37f47d;
}

.auth-strength i {
  height: 5px;
  border-radius: 99px;
  background: #37f47d;
  box-shadow: 0 0 12px rgba(55, 244, 125, 0.42);
}

.auth-reset-hero {
  position: relative;
  display: grid;
  min-height: 142px;
  place-items: center;
}

.auth-question-mark {
  position: absolute;
  right: 17%;
  top: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(192, 132, 252, 0.58);
  border-radius: 50%;
  background: rgba(32, 18, 67, 0.78);
  color: #c084fc;
  font-size: 1.45rem;
  font-weight: 950;
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.38);
}

.auth-reset-card {
  margin-top: -4px;
}

.auth-guest-art {
  min-height: 224px;
  margin-top: -8px;
  overflow: hidden;
}

.auth-guest-card {
  margin-top: -18px;
}

.auth-benefits {
  gap: 12px;
}

.auth-benefits li {
  min-width: 0;
  gap: 11px;
  color: rgba(248, 250, 252, 0.88);
}

.auth-benefits li svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 2px;
  border: 1px solid rgba(216, 180, 254, 0.45);
  border-radius: 6px;
  color: #d8b4fe;
}

.auth-benefits li span {
  width: auto;
  height: auto;
  min-width: 0;
  border-radius: 0;
  background: transparent;
}

@media (max-width: 390px) {
  .auth-screen {
    padding-inline: 18px;
  }

  .auth-entry-screen {
    grid-template-rows: auto minmax(210px, 31svh) auto auto auto;
    gap: 13px;
  }

  .auth-card {
    padding: 19px;
    border-radius: 24px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-card {
    padding: 15px;
    padding-top: 20px;
    gap: 8px;
  }

  .auth-cat.entry {
    width: min(76vw, 278px);
  }

  .auth-cat.login {
    width: min(42vw, 160px);
  }

  .auth-peek {
    height: 124px;
  }

  .auth-guest-art {
    min-height: 230px;
  }
}

@media (max-width: 360px) {
  .auth-screen {
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }

  .auth-entry-screen {
    grid-template-rows: auto minmax(178px, 29svh) auto auto auto;
    gap: 11px;
  }

  .auth-mini-brand img {
    width: 106px;
    height: 36px;
  }

  .auth-brand-block h1 {
    font-size: 2rem;
  }

  .auth-brand-block p {
    font-size: 0.89rem;
  }

  .auth-cat.entry {
    width: min(75vw, 236px);
  }

  .auth-hello-bubble {
    max-width: 104px;
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button,
  .auth-secondary-button {
    min-height: 52px;
    border-radius: 16px;
    font-size: 0.9rem;
  }

  .auth-card {
    gap: 11px;
    padding: 15px;
    border-radius: 21px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-card {
    padding: 12px;
    padding-top: 18px;
    gap: 7px;
  }

  .auth-card-head h2 {
    font-size: 1.58rem;
  }

  .auth-input-shell {
    min-height: 47px;
  }

  .auth-options-row {
    font-size: 0.74rem;
  }

  .auth-strength {
    grid-template-columns: minmax(0, 1fr) repeat(4, 20px);
    font-size: 0.67rem;
  }

  .auth-reset-hero {
    min-height: 142px;
  }

  .auth-guest-art {
    min-height: 194px;
  }
}

@media (max-width: 320px) {
  .auth-screen {
    padding-inline: 12px;
  }

  .auth-entry-screen {
    grid-template-rows: auto minmax(154px, 25svh) auto auto auto;
    gap: 9px;
  }

  .auth-language-pill {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 0.7rem;
  }

  .auth-mini-brand img {
    width: 94px;
  }

  .auth-brand-block h1 {
    font-size: 1.68rem;
  }

  .auth-brand-block p {
    font-size: 0.8rem;
  }

  .auth-cat.entry {
    width: min(74vw, 202px);
  }

  .auth-hello-bubble {
    bottom: 19px;
    max-width: 92px;
    padding: 7px 8px;
  }

  .auth-action-stack {
    gap: 8px;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button,
  .auth-secondary-button {
    min-height: 46px;
    font-size: 0.82rem;
  }

  .auth-google-button,
  .auth-primary-button {
    grid-template-columns: 28px minmax(0, auto) 18px;
    gap: 8px;
  }

  .auth-google-mark {
    width: 26px;
    height: 26px;
  }

  .auth-card {
    padding: 12px;
    gap: 9px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-card {
    padding: 10px;
    padding-top: 16px;
    gap: 6px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-input-shell {
    min-height: 39px;
  }

  .auth-peek {
    height: 94px;
    margin-bottom: -24px;
  }

  .auth-cat.login {
    width: 122px;
  }

  .auth-cat.signup {
    width: 134px;
    transform: translate(18px, 20px) rotate(3deg);
  }

  .auth-card-head h2 {
    font-size: 1.36rem;
  }

  .auth-card-head p,
  .auth-switch-copy,
  .auth-benefits li {
    font-size: 0.78rem;
  }

  .auth-field {
    font-size: 0.72rem;
  }

  .auth-input-shell {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    min-height: 42px;
    padding-inline: 10px;
  }

  .auth-input-shell input {
    font-size: 0.78rem;
  }

  .auth-options-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .auth-strength {
    grid-template-columns: minmax(0, 1fr) repeat(4, 14px);
  }

  .auth-reset-hero {
    min-height: 120px;
  }

  .auth-cat.forgot {
    width: 132px;
  }

  .auth-question-mark {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .auth-guest-art {
    min-height: 154px;
  }

  .auth-guest-card {
    margin-top: -10px;
  }
}

/* ComiKat auth system rebuild */
body[data-auth-screen="true"] {
  overflow-x: hidden;
  background: #050814;
}

body[data-auth-screen="true"] .topbar,
body[data-auth-screen="true"] .sidebar,
body[data-auth-screen="true"] .bottom-nav {
  display: none !important;
}

.auth-mobile-page-shell {
  display: block;
  width: 100%;
  min-height: 100svh;
  padding: 0 !important;
  overflow-x: hidden;
  background: #050814;
}

.auth-flow {
  --auth-x: clamp(14px, 5vw, 22px);
  --auth-card-width: min(88vw, 360px);
  --auth-card-bg: rgba(10, 10, 24, 0.84);
  --auth-border: rgba(255, 255, 255, 0.08);
  --auth-muted: rgba(237, 242, 255, 0.76);
  position: relative;
  isolation: isolate;
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 18%, rgba(139, 92, 246, 0.3), transparent 42%),
    radial-gradient(circle at 82% 28%, rgba(96, 165, 250, 0.14), transparent 28%),
    radial-gradient(circle at 18% 78%, rgba(147, 51, 234, 0.13), transparent 34%),
    #050814;
}

.auth-flow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 8, 20, 0.18), rgba(5, 8, 20, 0.9)),
    url("/assets/auth-universe-bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  filter: saturate(1.15) contrast(1.05);
}

.auth-flow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.13) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 22%, rgba(196, 181, 253, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 52%, rgba(255, 255, 255, 0.12) 0 1px, transparent 2px),
    radial-gradient(circle at 20% 62%, rgba(168, 85, 247, 0.2) 0 1px, transparent 2px),
    radial-gradient(ellipse at center, transparent 44%, rgba(0, 0, 0, 0.56) 100%);
  background-size: 100% 100%;
}

.auth-world {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.auth-world::before,
.auth-world::after,
.auth-panel-shape {
  content: "";
  position: absolute;
  width: 106px;
  height: 150px;
  border: 1px solid rgba(167, 139, 250, 0.13);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(96, 165, 250, 0.02)),
    rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 30px rgba(139, 92, 246, 0.07);
  filter: blur(0.2px);
  opacity: 0.72;
}

.auth-world::before {
  left: -42px;
  top: 82px;
  transform: rotate(-18deg);
}

.auth-world::after {
  right: -48px;
  top: 162px;
  transform: rotate(17deg);
}

.auth-panel-shape.a {
  left: 18px;
  bottom: 118px;
  transform: rotate(12deg);
}

.auth-panel-shape.b {
  right: 20px;
  bottom: 72px;
  transform: rotate(-11deg);
}

.auth-star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c4b5fd;
  box-shadow: 0 0 16px rgba(196, 181, 253, 0.85);
}

.auth-star.a { left: 16%; top: 19%; }
.auth-star.b { right: 18%; top: 31%; }
.auth-star.c { left: 76%; top: 10%; }
.auth-star.d { left: 18%; bottom: 26%; }

.auth-screen {
  position: relative;
  display: none;
  width: 100%;
  min-height: 100svh;
  padding:
    calc(env(safe-area-inset-top) + 18px)
    var(--auth-x)
    calc(env(safe-area-inset-bottom) + 18px);
  overflow: hidden;
}

.auth-screen.is-active {
  display: block;
}

.auth-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
}

.auth-mini-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.auth-mini-brand img {
  width: 118px;
  max-width: 42vw;
  height: 38px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.45));
}

.auth-language-pill,
.auth-back-button,
.auth-email-button,
.auth-secondary-button,
.auth-google-button,
.auth-primary-button,
.auth-subtle-link,
.auth-eye-button,
.auth-options-row button,
.auth-switch-copy button,
.auth-legal button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.auth-language-pill,
.auth-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
  backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.24);
}

.auth-language-pill {
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-back-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.auth-language-pill svg,
.auth-back-button svg,
.auth-input-icon svg,
.auth-eye-button svg,
.auth-email-button svg,
.auth-secondary-button svg,
.auth-primary-button svg,
.auth-google-button svg,
.auth-benefits svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-visual {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.auth-cat {
  display: block;
  width: 160px;
  aspect-ratio: 1;
  filter:
    drop-shadow(0 0 28px rgba(139, 92, 246, 0.5))
    drop-shadow(0 22px 34px rgba(0, 0, 0, 0.46));
}

.auth-cat img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-entry-art {
  top: clamp(58px, 8svh, 84px);
  left: 50%;
  display: grid;
  place-items: center;
  width: min(82vw, 330px);
  height: clamp(178px, 29svh, 252px);
  transform: translateX(-50%);
}

.auth-entry-art::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 82%;
  height: 78px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(167, 139, 250, 0.48), transparent 66%),
    radial-gradient(ellipse at center, rgba(96, 165, 250, 0.2), transparent 76%);
  transform: translateX(-50%);
  filter: blur(2px);
}

.auth-entry-art::after {
  content: "";
  position: absolute;
  inset: 6% 0 auto;
  height: 82%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 66%);
  z-index: -1;
}

.auth-cat.entry {
  width: clamp(194px, 58vw, 252px);
}

.auth-hello-bubble {
  position: absolute;
  left: 0;
  bottom: 34px;
  z-index: 3;
  max-width: 118px;
  padding: 10px 12px;
  border: 1px solid rgba(192, 132, 252, 0.46);
  border-radius: 16px;
  background: rgba(21, 14, 43, 0.72);
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.73rem;
  line-height: 1.35;
  box-shadow:
    0 0 28px rgba(139, 92, 246, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.auth-hello-bubble strong {
  display: block;
  color: #ffffff;
}

.auth-entry-copy {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: clamp(232px, 36svh, 292px) auto 0;
  text-align: center;
}

.auth-brand-block h1 {
  max-width: 348px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.9rem, 8.5vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.auth-brand-block h1 span {
  color: #8b5cf6;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.74);
}

.auth-brand-block p {
  max-width: 310px;
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.92rem;
  line-height: 1.42;
}

.auth-entry-actions {
  position: relative;
  z-index: 3;
  display: grid;
  width: var(--auth-card-width);
  margin: 16px auto 0;
  gap: 10px;
}

.auth-entry-footer {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 7px;
  width: var(--auth-card-width);
  margin: 11px auto 0;
}

.auth-entry-screen .auth-google-button,
.auth-entry-screen .auth-email-button,
.auth-entry-screen .auth-secondary-button {
  min-height: 52px;
}

.auth-card {
  position: relative;
  z-index: 3;
  display: grid;
  width: var(--auth-card-width);
  margin: 0 auto;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  background: var(--auth-card-bg);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.54),
    0 0 54px rgba(139, 92, 246, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.auth-form-screen .auth-card {
  margin-top: clamp(140px, 24svh, 178px);
}

.auth-reset-screen .auth-card {
  margin-top: clamp(232px, 38svh, 298px);
}

.auth-guest-screen .auth-card {
  margin-top: clamp(286px, 46svh, 360px);
}

.auth-peek {
  top: clamp(70px, 10svh, 94px);
  left: 50%;
  width: min(52vw, 202px);
  height: clamp(122px, 21svh, 156px);
  display: grid;
  place-items: center;
  transform: translateX(-50%);
}

.auth-cat.login {
  width: clamp(150px, 42vw, 180px);
}

.auth-cat.signup {
  width: clamp(166px, 47vw, 206px);
}

.auth-reset-hero {
  top: clamp(82px, 14svh, 126px);
  left: 50%;
  display: grid;
  place-items: center;
  width: min(68vw, 240px);
  height: 148px;
  transform: translateX(-50%);
}

.auth-cat.forgot {
  width: clamp(126px, 36vw, 156px);
}

.auth-question-mark {
  position: absolute;
  right: 14%;
  top: 4px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(192, 132, 252, 0.56);
  border-radius: 50%;
  background: rgba(32, 18, 67, 0.76);
  color: #c084fc;
  font-size: 1.2rem;
  font-weight: 950;
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.35);
}

.auth-guest-art {
  top: clamp(72px, 10svh, 102px);
  left: 50%;
  display: grid;
  place-items: center;
  width: min(88vw, 350px);
  height: clamp(210px, 34svh, 280px);
  transform: translateX(-50%);
  overflow: hidden;
}

.auth-cat.guest {
  width: clamp(230px, 76vw, 310px);
}

.auth-card-head {
  display: grid;
  gap: 12px;
}

.auth-card-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.72rem, 7.2vw, 2rem);
  line-height: 1.08;
  font-weight: 900;
}

.auth-card-head p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 850;
}

.auth-input-shell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(226, 232, 240, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-input-shell:focus-within {
  border-color: rgba(167, 139, 250, 0.64);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.12),
    0 0 24px rgba(139, 92, 246, 0.16);
}

.auth-input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
}

.auth-input-shell input::placeholder {
  color: rgba(226, 232, 240, 0.48);
}

.auth-eye-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.62);
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.8rem;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 850;
  white-space: nowrap;
}

.auth-check input {
  position: absolute;
  opacity: 0;
}

.auth-check span {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, #8b5cf6, #6d7cff);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
}

.auth-check span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-google-button,
.auth-primary-button,
.auth-email-button,
.auth-secondary-button {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 900;
}

.auth-primary-button,
.auth-google-button {
  display: grid;
  grid-template-columns: 32px minmax(0, auto) 24px;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-primary-button {
  background: linear-gradient(135deg, #8b5cf6, #6d7cff);
  box-shadow:
    0 18px 48px rgba(109, 124, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.auth-google-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.auth-google-button.is-light {
  background: linear-gradient(180deg, #ffffff, #f4f0ff);
  color: #101223;
  box-shadow:
    0 20px 54px rgba(167, 139, 250, 0.27),
    0 0 34px rgba(255, 255, 255, 0.14);
}

.auth-google-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #4285f4;
  font-weight: 950;
}

.auth-google-button strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-secondary-button,
.auth-email-button {
  display: grid;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.auth-secondary-button {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 0 16px;
  text-align: left;
}

.auth-secondary-button strong,
.auth-secondary-button small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-secondary-button small {
  margin-top: 3px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.78rem;
}

.auth-email-button {
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  gap: 10px;
  padding: 0 16px;
}

.auth-single-button {
  display: flex;
  justify-content: center;
  padding: 0 18px;
  text-align: center;
}

.auth-divider-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: rgba(226, 232, 240, 0.6);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.auth-divider-line::before,
.auth-divider-line::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-options-row button,
.auth-switch-copy button,
.auth-subtle-link,
.auth-legal button {
  padding: 0;
  background: transparent;
  color: #a78bfa;
  font-weight: 850;
}

.auth-switch-copy,
.auth-legal,
.auth-status {
  margin: 0;
  text-align: center;
}

.auth-switch-copy {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.86rem;
  line-height: 1.42;
}

.auth-legal {
  color: rgba(226, 232, 240, 0.55);
  font-size: 0.72rem;
  line-height: 1.45;
}

.auth-subtle-link,
.auth-guest-link {
  justify-self: center;
  min-height: 28px;
}

.auth-guest-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
}

.auth-status {
  min-height: 18px;
  color: #fca5a5;
  font-size: 0.75rem;
  line-height: 1.35;
}

.auth-strength {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, 24px);
  align-items: center;
  gap: 7px;
  margin-block: -4px -2px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.72rem;
}

.auth-strength strong {
  color: #fca5a5;
}

.auth-strength i {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.auth-strength i.is-filled {
  background: #fca5a5;
  box-shadow: 0 0 12px rgba(252, 165, 165, 0.35);
}

.auth-strength.is-okay strong {
  color: #facc15;
}

.auth-strength.is-okay i.is-filled {
  background: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.auth-strength.is-good strong {
  color: #7dd3fc;
}

.auth-strength.is-good i.is-filled {
  background: #7dd3fc;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.35);
}

.auth-strength.is-strong strong {
  color: #37f47d;
}

.auth-strength.is-strong i.is-filled {
  background: #37f47d;
  box-shadow: 0 0 12px rgba(55, 244, 125, 0.42);
}

.profile-setup-flow {
  min-height: 100svh;
  align-content: center;
}

.profile-setup-screen {
  display: grid;
  min-height: 100svh;
  align-items: center;
  padding: clamp(28px, 5vw, 72px) var(--auth-x);
}

.profile-setup-card {
  justify-self: center;
  width: min(92vw, 460px);
  margin: 0;
  gap: 13px;
  padding: clamp(24px, 3.2vw, 34px);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(14, 14, 31, 0.94), rgba(17, 17, 38, 0.86)),
    rgba(8, 8, 20, 0.92);
}

.profile-setup-card .auth-card-head h2 {
  font-size: clamp(2.15rem, 5vw, 3rem);
  letter-spacing: 0;
}

.profile-setup-card .auth-card-head p {
  max-width: 33ch;
}

.profile-setup-provider {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 16px;
  background: rgba(125, 211, 252, 0.07);
  color: #ffffff;
}

.profile-setup-provider strong,
.profile-setup-provider small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-setup-provider strong {
  font-size: 0.86rem;
  font-weight: 900;
}

.profile-setup-provider small {
  margin-top: 2px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 0.76rem;
}

.profile-setup-hint {
  color: rgba(226, 232, 240, 0.54);
  font-size: 0.72rem;
  line-height: 1.35;
}

.profile-setup-strength {
  margin-block: -2px 0;
}

.profile-setup-mascot {
  position: fixed;
  z-index: 1;
  left: max(-28px, 5vw);
  bottom: max(-92px, -9vw);
  width: min(48vw, 620px);
  pointer-events: none;
  filter: drop-shadow(0 36px 70px rgba(0, 0, 0, 0.46));
}

.profile-setup-mascot img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 860px) {
  .profile-setup-card {
    justify-self: end;
    margin-right: clamp(28px, 7vw, 100px);
  }
}

@media (max-width: 700px) {
  .profile-setup-screen {
    align-items: start;
    padding-top: clamp(28px, 8svh, 54px);
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .profile-setup-card {
    width: min(92vw, 390px);
    gap: 12px;
  }

  .profile-setup-card .auth-card-head h2 {
    font-size: clamp(2rem, 10vw, 2.55rem);
  }

  .profile-setup-mascot {
    left: 50%;
    bottom: -110px;
    width: min(92vw, 430px);
    opacity: 0.42;
    transform: translateX(-50%);
  }
}

.auth-benefits {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(248, 250, 252, 0.88);
  font-size: 0.9rem;
}

.auth-benefits li svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 2px;
  border: 1px solid rgba(216, 180, 254, 0.45);
  border-radius: 6px;
  color: #d8b4fe;
}

@media (max-width: 390px) {
  .auth-flow {
    --auth-x: 18px;
    --auth-card-width: min(90vw, 348px);
  }

  .auth-entry-copy {
    margin-top: clamp(226px, 35svh, 282px);
  }

  .auth-form-screen .auth-card {
    margin-top: clamp(132px, 23svh, 166px);
  }

  .auth-card {
    padding: 22px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-card {
    gap: 9px;
    padding: 18px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-input-shell {
    min-height: 47px;
  }
}

@media (max-width: 360px) {
  .auth-flow {
    --auth-x: 14px;
    --auth-card-width: min(92vw, 332px);
  }

  .auth-mini-brand img {
    width: 106px;
    height: 36px;
  }

  .auth-entry-art {
    top: 70px;
    height: 210px;
  }

  .auth-cat.entry {
    width: clamp(194px, 68vw, 236px);
  }

  .auth-entry-copy {
    margin-top: 250px;
  }

  .auth-brand-block h1 {
    font-size: 2rem;
  }

  .auth-brand-block p,
  .auth-card-head p {
    font-size: 0.9rem;
  }

  .auth-card {
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
  }

  .auth-card-head h2 {
    font-size: 1.62rem;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button,
  .auth-secondary-button {
    min-height: 52px;
    font-size: 0.9rem;
  }

  .auth-input-shell {
    min-height: 48px;
  }

  .auth-options-row {
    font-size: 0.74rem;
  }

  .auth-screen[data-auth-panel="signup"] .auth-card {
    gap: 7px;
    padding: 12px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-input-shell {
    min-height: 41px;
  }
}

@media (max-width: 320px) {
  .auth-flow {
    --auth-x: 12px;
    --auth-card-width: min(92vw, 296px);
  }

  .auth-screen {
    padding-top: calc(env(safe-area-inset-top) + 14px);
  }

  .auth-language-pill {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 0.7rem;
  }

  .auth-back-button {
    width: 38px;
    height: 38px;
  }

  .auth-mini-brand img {
    width: 94px;
  }

  .auth-entry-art {
    top: 62px;
    height: 178px;
  }

  .auth-cat.entry {
    width: 188px;
  }

  .auth-hello-bubble {
    left: 2px;
    bottom: 24px;
    max-width: 90px;
    padding: 7px 8px;
    font-size: 0.66rem;
  }

  .auth-entry-copy {
    margin-top: 214px;
    gap: 8px;
  }

  .auth-brand-block h1 {
    font-size: 1.68rem;
  }

  .auth-brand-block p {
    font-size: 0.8rem;
  }

  .auth-entry-actions {
    gap: 8px;
    margin-top: 14px;
  }

  .auth-form-screen .auth-card {
    margin-top: 118px;
  }

  .auth-peek {
    top: 58px;
    height: 110px;
  }

  .auth-cat.login {
    width: 132px;
  }

  .auth-cat.signup {
    width: 142px;
  }

  .auth-card {
    gap: 9px;
    padding: 12px;
    border-radius: 22px;
  }

  .auth-card-head {
    gap: 7px;
  }

  .auth-card-head h2 {
    font-size: 1.38rem;
  }

  .auth-card-head p,
  .auth-switch-copy,
  .auth-benefits li {
    font-size: 0.78rem;
  }

  .auth-field {
    gap: 5px;
    font-size: 0.72rem;
  }

  .auth-input-shell {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    min-height: 41px;
    padding-inline: 10px;
  }

  .auth-input-shell input {
    font-size: 0.78rem;
  }

  .auth-options-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button,
  .auth-secondary-button {
    min-height: 44px;
    font-size: 0.82rem;
  }

  .auth-google-button,
  .auth-primary-button {
    grid-template-columns: 26px minmax(0, auto) 18px;
    gap: 8px;
  }

  .auth-google-mark {
    width: 26px;
    height: 26px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-card {
    gap: 6px;
    padding: 10px;
  }

  .auth-screen[data-auth-panel="signup"] .auth-input-shell {
    min-height: 38px;
  }

  .auth-strength {
    grid-template-columns: minmax(0, 1fr) repeat(4, 14px);
    font-size: 0.66rem;
  }

  .auth-reset-screen .auth-card {
    margin-top: 208px;
  }

  .auth-reset-hero {
    top: 70px;
    height: 126px;
  }

  .auth-cat.forgot {
    width: 124px;
  }

  .auth-guest-screen .auth-card {
    margin-top: 236px;
  }

  .auth-guest-art {
    top: 64px;
    height: 180px;
  }

  .auth-cat.guest {
    width: 226px;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  body[data-auth-screen="true"],
  .auth-mobile-page-shell {
    min-height: 100vh;
  }

  .auth-flow {
    --auth-x: clamp(26px, 5.2vw, 42px);
    --auth-card-width: min(46vw, 340px);
    width: 100%;
    max-width: none;
    min-height: 100vh;
    background:
      radial-gradient(circle at 30% 34%, rgba(139, 92, 246, 0.34), transparent 38%),
      radial-gradient(circle at 78% 30%, rgba(96, 165, 250, 0.16), transparent 30%),
      radial-gradient(circle at 54% 86%, rgba(147, 51, 234, 0.12), transparent 40%),
      #050814;
  }

  .auth-flow::before {
    background-size: cover;
    background-position: center;
    opacity: 0.27;
  }

  .auth-world::before {
    left: 7vw;
    top: 16vh;
    width: 132px;
    height: 186px;
  }

  .auth-world::after {
    right: 5vw;
    top: 18vh;
    width: 122px;
    height: 172px;
  }

  .auth-panel-shape.a {
    left: 38vw;
    bottom: 10vh;
    width: 116px;
    height: 164px;
  }

  .auth-panel-shape.b {
    right: 18vw;
    bottom: 8vh;
    width: 104px;
    height: 148px;
  }

  .auth-screen {
    min-height: 100vh;
    padding:
      calc(env(safe-area-inset-top) + 24px)
      var(--auth-x)
      calc(env(safe-area-inset-bottom) + 24px);
  }

  .auth-mini-brand img {
    width: 132px;
    max-width: 22vw;
    height: 44px;
  }

  .auth-language-pill {
    min-height: 38px;
    padding-inline: 14px;
  }

  .auth-entry-art {
    top: 17vh;
    left: 29%;
    width: min(40vw, 300px);
    height: min(42vh, 310px);
    transform: translateX(-50%);
  }

  .auth-cat.entry {
    width: clamp(220px, 36vw, 292px);
  }

  .auth-hello-bubble {
    left: -1%;
    bottom: 18%;
  }

  .auth-entry-copy {
    position: absolute;
    left: var(--auth-x);
    top: 58vh;
    justify-items: start;
    width: min(43vw, 360px);
    margin: 0;
    text-align: left;
  }

  .auth-brand-block h1 {
    max-width: 360px;
    font-size: clamp(2.35rem, 6vw, 3rem);
    line-height: 1.04;
  }

  .auth-brand-block p {
    max-width: 310px;
    font-size: 0.98rem;
  }

  .auth-entry-actions {
    position: absolute;
    right: var(--auth-x);
    top: 36vh;
    width: var(--auth-card-width);
    margin: 0;
  }

  .auth-entry-footer {
    position: absolute;
    right: var(--auth-x);
    top: min(calc(36vh + 286px), calc(100vh - 118px));
    width: var(--auth-card-width);
    margin: 0;
  }

  .auth-form-screen .auth-card,
  .auth-reset-screen .auth-card,
  .auth-guest-screen .auth-card {
    position: absolute;
    right: var(--auth-x);
    top: 50%;
    width: var(--auth-card-width);
    max-height: calc(100vh - 84px);
    margin: 0;
    overflow: visible;
    transform: translateY(-50%);
  }

  .auth-card {
    gap: 12px;
    padding: 20px;
  }

  .auth-card-head h2 {
    font-size: clamp(1.72rem, 4vw, 2rem);
  }

  .auth-card-head p {
    font-size: 0.92rem;
  }

  .auth-input-shell {
    min-height: 48px;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button,
  .auth-secondary-button {
    min-height: 52px;
  }

  .auth-peek {
    top: 50%;
    left: 28%;
    width: min(38vw, 286px);
    height: min(48vh, 330px);
    transform: translate(-50%, -50%);
  }

  .auth-cat.login {
    width: clamp(210px, 34vw, 286px);
  }

  .auth-cat.signup {
    width: clamp(196px, 31vw, 260px);
  }

  .auth-reset-hero {
    top: 50%;
    left: 28%;
    width: min(34vw, 250px);
    height: min(40vh, 260px);
    transform: translate(-50%, -54%);
  }

  .auth-cat.forgot {
    width: clamp(150px, 24vw, 200px);
  }

  .auth-guest-art {
    top: 50%;
    left: 28%;
    width: min(42vw, 320px);
    height: min(48vh, 340px);
    transform: translate(-50%, -50%);
  }

  .auth-cat.guest {
    width: clamp(250px, 39vw, 320px);
  }
}

@media (min-width: 640px) and (max-width: 699px) {
  .auth-flow {
    --auth-card-width: min(44vw, 300px);
  }

  .auth-entry-art,
  .auth-peek,
  .auth-reset-hero,
  .auth-guest-art {
    left: 27%;
  }

  .auth-cat.entry {
    width: clamp(204px, 35vw, 250px);
  }

  .auth-entry-copy {
    top: 57vh;
    width: min(42vw, 300px);
  }

  .auth-brand-block h1 {
    font-size: clamp(2rem, 5.8vw, 2.45rem);
  }

  .auth-brand-block p {
    font-size: 0.88rem;
  }

  .auth-entry-actions {
    top: 35vh;
  }

  .auth-entry-footer {
    top: min(calc(35vh + 268px), calc(100vh - 112px));
  }

  .auth-card {
    gap: 10px;
    padding: 18px;
  }

  .auth-card-head {
    gap: 8px;
  }

  .auth-card-head h2 {
    font-size: 1.62rem;
  }

  .auth-input-shell {
    min-height: 44px;
  }

  .auth-google-button,
  .auth-primary-button,
  .auth-email-button,
  .auth-secondary-button {
    min-height: 48px;
    font-size: 0.9rem;
  }
}

@media (min-width: 768px) {
  body[data-auth-screen="true"],
  .auth-mobile-page-shell {
    min-height: 100vh;
  }

  .auth-flow {
    --auth-x: clamp(32px, 5vw, 72px);
    --auth-card-width: min(39vw, 430px);
    width: 100%;
    max-width: none;
    min-height: 100vh;
    background:
      radial-gradient(circle at 31% 34%, rgba(139, 92, 246, 0.34), transparent 36%),
      radial-gradient(circle at 78% 32%, rgba(96, 165, 250, 0.17), transparent 29%),
      radial-gradient(circle at 56% 86%, rgba(147, 51, 234, 0.12), transparent 38%),
      #050814;
  }

  .auth-flow::before {
    background-size: cover;
    background-position: center;
    opacity: 0.26;
  }

  .auth-world::before {
    left: 4vw;
    top: 15vh;
    width: 150px;
    height: 210px;
  }

  .auth-world::after {
    right: 7vw;
    top: 16vh;
    width: 136px;
    height: 190px;
  }

  .auth-panel-shape.a {
    left: 29vw;
    bottom: 12vh;
    width: 130px;
    height: 184px;
  }

  .auth-panel-shape.b {
    right: 30vw;
    bottom: 8vh;
    width: 118px;
    height: 166px;
  }

  .auth-screen {
    min-height: 100vh;
    padding:
      calc(env(safe-area-inset-top) + 28px)
      var(--auth-x)
      calc(env(safe-area-inset-bottom) + 28px);
  }

  .auth-screen.is-active {
    display: block;
  }

  .auth-topbar {
    min-height: 48px;
  }

  .auth-mini-brand img {
    width: 148px;
    max-width: 18vw;
    height: 48px;
  }

  .auth-language-pill {
    min-height: 40px;
    padding-inline: 15px;
  }

  .auth-entry-art {
    top: 12vh;
    left: 28%;
    width: min(38vw, 430px);
    height: min(48vh, 390px);
  }

  .auth-cat.entry {
    width: clamp(300px, 32vw, 420px);
  }

  .auth-hello-bubble {
    left: 4%;
    bottom: 20%;
  }

  .auth-entry-copy {
    position: absolute;
    left: var(--auth-x);
    top: 54vh;
    justify-items: start;
    width: min(38vw, 500px);
    margin: 0;
    text-align: left;
  }

  .auth-brand-block h1 {
    max-width: 500px;
    font-size: clamp(3rem, 5vw, 5.15rem);
    line-height: 1.02;
  }

  .auth-brand-block p {
    max-width: 430px;
    font-size: clamp(1rem, 1.25vw, 1.18rem);
  }

  .auth-entry-actions {
    position: absolute;
    right: var(--auth-x);
    top: 31vh;
    width: var(--auth-card-width);
    margin: 0;
  }

  .auth-entry-footer {
    position: absolute;
    right: var(--auth-x);
    top: calc(31vh + 282px);
    width: var(--auth-card-width);
    margin: 0;
  }

  .auth-form-screen .auth-card,
  .auth-reset-screen .auth-card,
  .auth-guest-screen .auth-card {
    position: absolute;
    right: var(--auth-x);
    top: 50%;
    width: var(--auth-card-width);
    max-height: none;
    margin: 0;
    overflow: visible;
    transform: translateY(-50%);
  }

  .auth-card {
    padding: 26px;
  }

  .auth-card-head h2 {
    font-size: clamp(1.9rem, 2.4vw, 2.42rem);
  }

  .auth-card-head p {
    font-size: 1rem;
  }

  .auth-peek {
    top: 50%;
    left: 31%;
    right: auto;
    width: min(40vw, 460px);
    height: min(58vh, 470px);
    transform: translate(-50%, -50%);
  }

  .auth-cat.login {
    width: clamp(300px, 32vw, 450px);
  }

  .auth-cat.signup {
    width: clamp(250px, 28vw, 380px);
  }

  .auth-reset-hero {
    top: 50%;
    left: 28%;
    width: min(34vw, 380px);
    height: 260px;
    transform: translate(-50%, -58%);
  }

  .auth-cat.forgot {
    width: clamp(170px, 20vw, 250px);
  }

  .auth-question-mark {
    right: 18%;
    top: 4%;
  }

  .auth-guest-art {
    top: 50%;
    left: 28%;
    width: min(42vw, 520px);
    height: min(56vh, 460px);
    transform: translate(-50%, -50%);
  }

  .auth-cat.guest {
    width: clamp(330px, 38vw, 500px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .auth-flow {
    --auth-x: clamp(28px, 4vw, 44px);
    --auth-card-width: min(45vw, 380px);
  }

  .auth-entry-art {
    left: 29%;
    top: 13vh;
    width: 42vw;
  }

  .auth-cat.entry {
    width: clamp(250px, 36vw, 340px);
  }

  .auth-entry-copy {
    top: 53vh;
    width: 42vw;
  }

  .auth-brand-block h1 {
    font-size: clamp(2.45rem, 5vw, 3.5rem);
  }

  .auth-entry-actions {
    top: 29vh;
  }

  .auth-entry-footer {
    top: calc(29vh + 276px);
  }

  .auth-card {
    padding: 22px;
  }

  .auth-peek {
    left: 28%;
    width: min(40vw, 360px);
    height: min(48vh, 360px);
  }

  .auth-cat.login {
    width: clamp(230px, 34vw, 330px);
  }

  .auth-cat.signup {
    width: clamp(210px, 30vw, 300px);
  }

  .auth-reset-hero,
  .auth-guest-art {
    left: 27%;
  }

  .auth-cat.guest {
    width: clamp(280px, 38vw, 390px);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .auth-flow {
    --auth-x: clamp(54px, 6vw, 88px);
    --auth-card-width: min(37vw, 410px);
  }

  .auth-entry-art,
  .auth-reset-hero,
  .auth-guest-art,
  .auth-peek {
    left: 30%;
  }

  .auth-entry-copy {
    top: 55vh;
  }
}

@media (min-width: 1280px) {
  .auth-flow {
    --auth-x: clamp(84px, 8vw, 150px);
    --auth-card-width: 430px;
  }

  .auth-entry-art,
  .auth-reset-hero,
  .auth-guest-art,
  .auth-peek {
    left: 32%;
  }

  .auth-entry-copy {
    left: var(--auth-x);
    top: 55vh;
  }
}

@media (max-width: 639px) {
  .auth-entry-screen {
    padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
  }

  .auth-entry-art {
    top: clamp(52px, 7svh, 70px);
    height: clamp(160px, 26svh, 220px);
  }

  .auth-cat.entry {
    width: clamp(174px, 52vw, 222px);
  }

  .auth-hello-bubble {
    bottom: clamp(22px, 4svh, 34px);
    max-width: 102px;
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .auth-entry-copy {
    gap: 8px;
    margin-top: clamp(214px, 33svh, 272px);
  }

  .auth-brand-block h1 {
    max-width: min(86vw, 340px);
    font-size: clamp(1.72rem, 7.4vw, 2.22rem);
    line-height: 1.06;
  }

  .auth-brand-block p {
    max-width: min(82vw, 300px);
    font-size: clamp(0.8rem, 3.7vw, 0.92rem);
    line-height: 1.36;
  }

  .auth-entry-actions {
    gap: 8px;
    margin-top: 13px;
  }

  .auth-entry-screen .auth-google-button,
  .auth-entry-screen .auth-email-button,
  .auth-entry-screen .auth-secondary-button {
    min-height: 48px;
    border-radius: 15px;
    font-size: 0.88rem;
  }

  .auth-entry-screen .auth-secondary-button small {
    display: none;
  }

  .auth-entry-footer {
    gap: 5px;
    margin-top: 8px;
  }

  .auth-entry-footer .auth-switch-copy {
    font-size: 0.78rem;
  }

  .auth-entry-footer .auth-legal {
    font-size: 0.66rem;
    line-height: 1.28;
  }
}

@media (min-width: 432px) and (max-width: 639px) {
  .auth-flow {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  .auth-flow {
    --auth-x: clamp(30px, 5vw, 54px);
    --auth-card-width: min(42vw, 360px);
  }

  .auth-entry-art {
    top: 12vh;
    left: 28%;
    height: min(40vh, 340px);
  }

  .auth-cat.entry {
    width: clamp(240px, 31vw, 318px);
  }

  .auth-entry-copy {
    top: 50vh;
  }

  .auth-brand-block h1 {
    font-size: clamp(2.5rem, 4.8vw, 3.4rem);
  }

  .auth-entry-actions {
    top: 28vh;
  }

  .auth-entry-footer {
    top: calc(28vh + 260px);
  }
}

/* Comic detail page */
.comic-detail-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 1220px);
}

.comic-detail-shell::before {
  content: "";
  position: fixed;
  inset: var(--topbar) 0 0 var(--sidebar);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 10%, rgba(124, 58, 237, 0.18), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(59, 130, 246, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(10, 12, 23, 0.2), rgba(5, 6, 10, 0.9) 54%);
}

.comic-detail-shell .comic-detail-hero {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(190px, 278px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(24px, 4vw, 46px);
  min-height: 480px;
  margin-bottom: 26px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(14, 16, 31, 0.92), rgba(6, 7, 13, 0.94) 58%),
    rgba(12, 14, 26, 0.78);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.comic-detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  transform: scale(1.08);
  filter: blur(18px) saturate(1.12);
  pointer-events: none;
}

.comic-detail-backdrop::after {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(90deg, rgba(5, 6, 10, 0.98) 0%, rgba(5, 6, 10, 0.68) 42%, rgba(5, 6, 10, 0.88) 100%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.1), rgba(5, 6, 10, 0.94) 82%);
}

.comic-detail-backdrop .cover,
.comic-detail-backdrop .image-cover {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.comic-detail-backdrop .cover::before,
.comic-detail-backdrop .cover span,
.comic-detail-backdrop .image-cover::after {
  display: none;
}

.comic-detail-cover,
.comic-detail-info {
  position: relative;
  z-index: 1;
}

.comic-detail-cover {
  display: grid;
  justify-items: center;
  align-self: center;
}

.comic-detail-cover .cover {
  width: min(100%, 246px);
  border-radius: 22px;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(155, 92, 255, 0.16),
    0 0 40px rgba(124, 58, 237, 0.24);
}

.comic-detail-cover .image-cover span {
  display: none;
}

.comic-detail-cover .image-cover::after {
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.35));
}

.comic-detail-info {
  display: grid;
  gap: 16px;
  align-self: center;
  max-width: 660px;
  min-width: 0;
}

.comic-detail-kicker,
.comic-detail-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.comic-detail-kicker {
  gap: 8px;
}

.comic-detail-kicker span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid rgba(155, 92, 255, 0.32);
  background: rgba(124, 58, 237, 0.13);
  color: #c7b6ff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.comic-detail-info h1 {
  margin: 0;
  max-width: 12ch;
  color: #ffffff;
  font-size: clamp(2.85rem, 6vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.comic-detail-creator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(248, 250, 252, 0.78);
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.comic-detail-creator .studio-avatar {
  width: 34px;
  height: 34px;
}

.comic-detail-creator strong {
  color: #ffffff;
}

.comic-detail-stats {
  gap: 8px;
}

.comic-detail-stats span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.88rem;
  font-weight: 800;
}

.comic-detail-description-block {
  margin-top: 0;
  max-width: 60ch;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(4, 6, 13, 0.42);
  backdrop-filter: blur(14px);
}

.comic-detail-description-block .comic-description {
  -webkit-line-clamp: 4;
  color: rgba(248, 250, 252, 0.78);
  font-size: 0.98rem;
  line-height: 1.62;
}

.comic-detail-description-block .comic-description.is-expanded {
  -webkit-line-clamp: unset;
}

.comic-detail-description-block .description-toggle {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #c7b6ff;
}

.comic-detail-actions {
  display: grid;
  grid-template-columns: minmax(0, 240px) auto;
  gap: 12px;
  align-items: center;
}

.comic-detail-read-button {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #8b3dff, #3b82f6);
  color: #ffffff;
  box-shadow: 0 18px 50px rgba(80, 89, 255, 0.32);
  transition:
    transform 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}

.comic-detail-read-button small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
}

.comic-detail-read-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 22px 62px rgba(80, 89, 255, 0.4);
}

.comic-detail-save-button {
  min-width: 94px;
  min-height: 58px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(248, 250, 252, 0.9);
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.comic-detail-save-button:hover {
  transform: translateY(-1px);
  border-color: rgba(155, 92, 255, 0.36);
  background: rgba(255, 255, 255, 0.11);
}

.comic-detail-save-button[aria-pressed="true"] {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.16);
  color: #d8ccff;
}

.comic-detail-chapters {
  width: min(100%, 920px);
  max-width: none;
  padding-top: 0;
}

.comic-detail-chapters .manage-head {
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: 0;
}

.comic-detail-chapters .manage-head h2 {
  font-size: clamp(1.42rem, 2.2vw, 1.8rem);
}

.comic-detail-chapters .chapters {
  gap: 12px;
}

.comic-detail-chapters .chapter-row {
  min-height: 78px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(17, 20, 32, 0.84), rgba(8, 10, 18, 0.9)),
    rgba(17, 20, 32, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.comic-detail-chapters .chapter-row:hover {
  border-color: rgba(155, 92, 255, 0.42);
  transform: translateY(-1px);
}

.comic-detail-chapters .chapter-open {
  min-height: 78px;
  padding: 14px;
}

.chapter-number {
  flex: 0 0 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.16);
  color: #c7b6ff;
  font-size: 0.82rem;
  font-weight: 900;
}

.comic-detail-chapters .chapter-text strong {
  color: #ffffff;
  font-size: 1rem;
}

.comic-detail-chapters .chapter-text small {
  color: rgba(161, 161, 170, 0.86);
  font-weight: 750;
}

.comic-detail-chapters .chapter-complete {
  color: #37e2a4;
}

.comic-detail-chapters .open-pill {
  border-radius: 999px;
  padding: 9px 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(59, 130, 246, 0.95));
  color: #ffffff;
  font-weight: 900;
}

@media (max-width: 767px) {
  .comic-detail-shell {
    width: 100%;
    padding: 84px 16px calc(132px + env(safe-area-inset-bottom));
  }

  .comic-detail-shell::before {
    inset: 0;
    background:
      radial-gradient(circle at 18% 0%, rgba(124, 58, 237, 0.18), transparent 36%),
      radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(7, 8, 15, 0.28), rgba(5, 6, 10, 0.98));
  }

  .comic-detail-shell .comic-detail-hero {
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: 0;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: 24px;
  }

  .comic-detail-backdrop {
    inset: 0 0 34% 0;
    opacity: 0.42;
    filter: blur(14px) saturate(1.16);
  }

  .comic-detail-backdrop::after {
    background:
      linear-gradient(180deg, rgba(5, 6, 10, 0.18), rgba(5, 6, 10, 0.9) 76%, rgba(5, 6, 10, 0.98)),
      linear-gradient(90deg, rgba(5, 6, 10, 0.88), rgba(5, 6, 10, 0.2), rgba(5, 6, 10, 0.88));
  }

  .comic-detail-cover {
    justify-self: center;
    padding-top: 4px;
  }

  .comic-detail-cover .cover {
    width: min(45vw, 162px);
    border-radius: 20px;
  }

  .comic-detail-info {
    gap: 9px;
  }

  .comic-detail-kicker {
    justify-content: center;
  }

  .comic-detail-kicker span {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .comic-detail-info h1 {
    max-width: 100%;
    font-size: clamp(1.62rem, 6.8vw, 2.08rem);
    line-height: 1;
    text-align: center;
  }

  .comic-detail-creator {
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    padding: 6px 10px 6px 6px;
    font-size: 0.82rem;
  }

  .comic-detail-creator .studio-avatar {
    width: 30px;
    height: 30px;
  }

  .comic-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .comic-detail-stats span {
    justify-content: center;
    min-width: 0;
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.7rem;
    text-align: center;
  }

  .comic-detail-description-block {
    padding: 10px;
    border-radius: 16px;
  }

  .comic-detail-description-block .comic-description {
    -webkit-line-clamp: 2;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .comic-detail-description-block .description-toggle {
    min-height: 30px;
    font-size: 0.8rem;
  }

  .comic-detail-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .comic-detail-read-button {
    min-height: 50px;
    border-radius: 16px;
  }

  .comic-detail-save-button {
    min-width: 76px;
    min-height: 50px;
    border-radius: 16px;
  }

  .comic-detail-chapters {
    width: 100%;
  }

  .comic-detail-chapters .manage-head {
    margin-bottom: 12px;
  }

  .comic-detail-chapters .manage-head h2 {
    font-size: 1.3rem;
  }

  .comic-detail-chapters .manage-head span {
    font-size: 0.84rem;
  }

  .comic-detail-chapters .chapter-open {
    min-height: 74px;
    gap: 10px;
    padding: 12px;
  }

  .chapter-number {
    flex-basis: 78px;
    min-height: 38px;
    font-size: 0.74rem;
  }

  .comic-detail-chapters .open-pill {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

@media (max-width: 360px) {
  .comic-detail-shell {
    padding-inline: 14px;
  }

  .comic-detail-shell .comic-detail-hero {
    padding: 14px;
    border-radius: 22px;
  }

  .comic-detail-cover .cover {
    width: min(43vw, 150px);
    border-radius: 18px;
  }

  .comic-detail-info h1 {
    font-size: clamp(1.62rem, 7.4vw, 2rem);
  }

  .comic-detail-creator {
    padding-right: 10px;
    font-size: 0.8rem;
  }

  .comic-detail-stats {
    gap: 6px;
  }

  .comic-detail-stats span {
    min-height: 34px;
    font-size: 0.68rem;
  }

  .comic-detail-actions {
    grid-template-columns: 1fr;
  }

  .comic-detail-save-button {
    width: 100%;
  }

  .chapter-number {
    flex-basis: 66px;
    font-size: 0.68rem;
  }

  .comic-detail-chapters .chapter-text strong {
    font-size: 0.92rem;
  }
}

@media (max-width: 330px) {
  .comic-detail-shell {
    padding: 78px 12px calc(128px + env(safe-area-inset-bottom));
  }

  .comic-detail-cover .cover {
    width: min(42vw, 136px);
  }

  .comic-detail-kicker span {
    font-size: 0.64rem;
  }

  .comic-detail-description-block .comic-description {
    font-size: 0.84rem;
  }

  .comic-detail-chapters .chapter-open {
    padding: 10px;
  }

  .comic-detail-chapters .open-pill {
    padding: 7px 10px;
  }
}

/* ===== ComiKat Mobile Upload Wizard ===== */
@media (max-width: 767px) {
  body[data-active-route="upload"] {
    overflow-x: hidden;
    background:
      radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.22), transparent 34%),
      radial-gradient(circle at 92% 18%, rgba(96, 165, 250, 0.1), transparent 28%),
      #030711;
  }

  body[data-active-route="upload"] .topbar,
  body[data-active-route="upload"] .bottom-nav,
  body[data-active-route="upload"] .sidebar {
    display: none;
  }

  body[data-active-route="upload"] .app-shell.mobile-upload-page {
    width: 100%;
    min-height: 100vh;
    padding: 0;
  }

  .mobile-upload-flow,
  .mobile-upload-flow * {
    box-sizing: border-box;
  }

  .mobile-upload-flow {
    position: relative;
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    padding: calc(18px + env(safe-area-inset-top)) clamp(14px, 4vw, 18px) calc(24px + env(safe-area-inset-bottom));
    color: #f8fafc;
    background:
      linear-gradient(180deg, rgba(5, 8, 20, 0.1), rgba(2, 6, 17, 0.96)),
      radial-gradient(circle at 50% 24%, rgba(124, 58, 237, 0.2), transparent 42%),
      #050816;
  }

  .mobile-upload-flow::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(120deg, transparent 10%, rgba(139, 92, 246, 0.08) 11%, transparent 18%),
      linear-gradient(70deg, transparent 70%, rgba(59, 130, 246, 0.08) 72%, transparent 84%);
    opacity: 0.62;
  }

  .mobile-upload-bg span {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(196, 181, 253, 0.95);
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.9);
  }

  .mobile-upload-bg span:nth-child(1) { top: 14%; left: 18%; }
  .mobile-upload-bg span:nth-child(2) { top: 28%; right: 9%; width: 7px; height: 7px; }
  .mobile-upload-bg span:nth-child(3) { top: 55%; left: 8%; }
  .mobile-upload-bg span:nth-child(4) { bottom: 16%; right: 18%; }

  .mobile-upload-header,
  .mobile-upload-progress,
  .mobile-upload-form {
    position: relative;
    z-index: 1;
  }

  .mobile-upload-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin-bottom: 24px;
  }

  .mobile-upload-header h1 {
    margin: 0;
    font-size: clamp(1.28rem, 6vw, 1.55rem);
    line-height: 1;
    text-align: center;
    letter-spacing: 0;
  }

  .mobile-upload-back,
  .mobile-upload-draft,
  .mobile-upload-progress button,
  .mobile-upload-primary,
  .mobile-upload-secondary,
  .mobile-outline-button,
  .mobile-selected-chips button,
  .mobile-genre-options button,
  .mobile-chapter-list button {
    border: 0;
    font: inherit;
    cursor: pointer;
  }

  .mobile-upload-flow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-upload-back {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
  }

  .mobile-upload-draft {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0 0 0 8px;
    background: transparent;
    color: #c084fc;
    font-weight: 900;
    white-space: nowrap;
  }

  .mobile-upload-draft svg {
    width: 18px;
    height: 18px;
  }

  .mobile-upload-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 22px;
  }

  .mobile-upload-progress::before {
    content: "";
    position: absolute;
    left: 16.5%;
    right: 16.5%;
    top: 28px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #a855f7 calc((var(--upload-progress, 0) + 1) * 25%), rgba(148, 163, 184, 0.22) 0);
  }

  .mobile-upload-flow[data-upload-step-current="1"] { --upload-progress: 0; }
  .mobile-upload-flow[data-upload-step-current="2"] { --upload-progress: 2; }
  .mobile-upload-flow[data-upload-step-current="3"] { --upload-progress: 4; }

  .mobile-upload-progress button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 76px;
    background: transparent;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 750;
  }

  .mobile-upload-progress span {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.42);
    background: rgba(3, 7, 18, 0.9);
    color: #e5e7eb;
    font-size: 1.1rem;
    font-weight: 900;
  }

  .mobile-upload-progress button.is-active span {
    border-color: transparent;
    background: linear-gradient(135deg, #a855f7, #6d5df6);
    box-shadow: 0 0 26px rgba(168, 85, 247, 0.62);
  }

  .mobile-upload-progress button.is-active strong,
  .mobile-upload-progress button.is-complete strong {
    color: #e9d5ff;
  }

  .mobile-upload-form,
  .mobile-upload-step,
  .mobile-upload-card {
    display: grid;
    gap: 14px;
  }

  .mobile-upload-step[hidden] {
    display: none;
  }

  .mobile-upload-step.is-active {
    animation: mobileUploadIn 180ms ease-out;
  }

  @keyframes mobileUploadIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .mobile-upload-hero {
    position: relative;
    min-height: 118px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44%;
    align-items: center;
    overflow: hidden;
    padding: 20px 16px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 22px;
    background:
      radial-gradient(circle at 78% 30%, rgba(168, 85, 247, 0.34), transparent 35%),
      linear-gradient(135deg, rgba(10, 14, 25, 0.92), rgba(20, 10, 52, 0.76));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .mobile-upload-hero h2 {
    margin: 0;
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.18;
    letter-spacing: 0;
  }

  .mobile-upload-hero h2 span,
  .mobile-cover-section strong,
  .mobile-card-title strong {
    color: #fb7185;
  }

  .mobile-upload-hero p {
    margin: 12px 0 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: clamp(0.95rem, 4vw, 1.08rem);
    line-height: 1.45;
  }

  .mobile-upload-hero img {
    position: absolute;
    right: -12px;
    bottom: -18px;
    width: min(45vw, 190px);
    max-height: 152px;
    object-fit: contain;
    filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.55));
  }

  .mobile-upload-hero-details img {
    width: min(48vw, 198px);
  }

  .mobile-upload-hero-publish {
    min-height: 150px;
    border: 0;
    background: transparent;
    padding: 12px 2px;
  }

  .mobile-upload-hero-publish img {
    right: 6px;
    bottom: -4px;
    width: min(38vw, 160px);
  }

  .mobile-upload-card {
    padding: 20px 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background:
      radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.09), transparent 36%),
      rgba(7, 12, 24, 0.86);
    box-shadow:
      0 20px 56px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
  }

  .mobile-field {
    position: relative;
    display: grid;
    gap: 10px;
    min-width: 0;
  }

  .mobile-field > span,
  .mobile-cover-section h3,
  .mobile-card-title h3,
  .mobile-ai-card h3,
  .mobile-review-card > h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 900;
  }

  .mobile-field > span svg,
  .mobile-review-card > h3 svg,
  .mobile-card-title h3 svg {
    color: #c084fc;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.64);
    color: #f8fafc;
    padding: 0 42px 0 16px;
    font-size: 1rem;
    outline: 0;
  }

  .mobile-field textarea {
    min-height: 126px;
    padding-top: 16px;
    resize: vertical;
  }

  .mobile-field input:focus,
  .mobile-field textarea:focus,
  .mobile-field select:focus,
  .mobile-tag-box input:focus {
    border-color: rgba(168, 85, 247, 0.75);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14);
  }

  .mobile-field em {
    position: absolute;
    right: 14px;
    bottom: 18px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.86rem;
    font-style: normal;
  }

  .mobile-field small,
  .mobile-cover-section p,
  .mobile-card-title span,
  .mobile-ai-card p,
  .mobile-ai-card small,
  .mobile-tip {
    margin: 0;
    color: rgba(203, 213, 225, 0.78);
    line-height: 1.45;
  }

  .mobile-cover-section {
    display: grid;
    gap: 14px;
    padding-top: 4px;
  }

  .mobile-cover-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(112px, 0.92fr);
    gap: 12px;
  }

  .mobile-upload-drop {
    min-width: 0;
    min-height: 148px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 16px 12px;
    border: 1px dashed rgba(168, 85, 247, 0.86);
    border-radius: 18px;
    background: rgba(8, 12, 24, 0.72);
    text-align: center;
    color: #e9d5ff;
  }

  .mobile-upload-drop input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .mobile-upload-drop svg {
    width: 38px;
    height: 38px;
    color: #c084fc;
  }

  .mobile-upload-drop b,
  .mobile-upload-drop small {
    display: block;
  }

  .mobile-cover-preview,
  .mobile-review-cover {
    min-height: 148px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background:
      radial-gradient(circle at 50% 28%, rgba(249, 115, 22, 0.46), transparent 11%),
      linear-gradient(135deg, #1e1b4b, #6d28d9 54%, #020617);
    color: rgba(226, 232, 240, 0.78);
    font-weight: 900;
  }

  .mobile-cover-preview img,
  .mobile-review-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-upload-primary,
  .mobile-upload-secondary {
    width: 100%;
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 18px;
    font-size: 1.08rem;
    font-weight: 950;
  }

  .mobile-upload-primary {
    margin-top: 4px;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 48%, #6d7cff 100%);
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(124, 58, 237, 0.36);
  }

  .mobile-upload-primary svg {
    width: 26px;
    height: 26px;
  }

  .mobile-upload-secondary {
    background: rgba(8, 12, 24, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #f8fafc;
  }

  .mobile-card-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }

  .mobile-chip-section {
    display: grid;
    gap: 12px;
  }

  .mobile-selected-chips,
  .mobile-genre-options,
  .mobile-review-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
  }

  .mobile-selected-chips button,
  .mobile-review-chips span {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(168, 85, 247, 0.55);
    background: rgba(88, 28, 135, 0.44);
    color: #f0abfc;
    font-weight: 900;
  }

  .mobile-genre-options button {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(8, 12, 24, 0.68);
    color: rgba(248, 250, 252, 0.9);
    font-weight: 800;
  }

  .mobile-tag-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(3, 7, 18, 0.58);
  }

  .mobile-tag-box input {
    flex: 1 1 120px;
    min-height: 40px;
    border: 0;
    padding: 0 8px;
    background: transparent;
  }

  .mobile-ai-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(8, 12, 24, 0.72);
  }

  .mobile-ai-card small {
    grid-column: 1 / -1;
    padding: 12px;
    border-radius: 14px;
    background: rgba(88, 28, 135, 0.2);
  }

  .mobile-ai-card h3 span {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.9rem;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-toggle input {
    position: absolute;
    opacity: 0;
  }

  .mobile-toggle span {
    position: relative;
    width: 58px;
    height: 34px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  }

  .mobile-toggle span::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
  }

  .mobile-toggle input:not(:checked) + span {
    background: rgba(30, 41, 59, 0.86);
  }

  .mobile-toggle input:not(:checked) + span::after {
    right: 28px;
  }

  .mobile-card-title-row h3 {
    gap: 10px;
  }

  .mobile-card-title-row h3 span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    color: #d8b4fe;
  }

  .mobile-outline-button {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(168, 85, 247, 0.42);
    border-radius: 14px;
    background: rgba(88, 28, 135, 0.24);
    color: #c084fc;
    font-weight: 900;
  }

  .mobile-chapter-list {
    display: grid;
    gap: 10px;
  }

  .mobile-chapter-list article {
    display: grid;
    grid-template-columns: 24px 68px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 12px;
    min-height: 94px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(3, 7, 18, 0.54);
  }

  .mobile-chapter-list i {
    color: rgba(226, 232, 240, 0.82);
    font-style: normal;
    font-weight: 900;
  }

  .mobile-chapter-thumb {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    background:
      radial-gradient(circle at 62% 28%, #f97316 0 12%, transparent 14%),
      linear-gradient(135deg, #1e1b4b, #6d28d9 54%, #020617);
  }

  .mobile-chapter-thumb.second {
    background:
      radial-gradient(circle at 48% 22%, #a855f7 0 10%, transparent 12%),
      linear-gradient(135deg, #020617, #312e81 48%, #4c1d95);
  }

  .mobile-chapter-list strong,
  .mobile-chapter-list small,
  .mobile-chapter-list span {
    display: block;
  }

  .mobile-chapter-list small,
  .mobile-chapter-list span {
    color: rgba(203, 213, 225, 0.76);
  }

  .mobile-chapter-list strong {
    margin: 5px 0;
    color: #ffffff;
  }

  .mobile-chapter-list button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: transparent;
    color: rgba(226, 232, 240, 0.88);
  }

  .mobile-chapter-drop {
    min-height: 116px;
  }

  .mobile-tip {
    text-align: center;
  }

  .mobile-review-card > h3 {
    margin-bottom: 2px;
  }

  .mobile-review-body {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: rgba(3, 7, 18, 0.5);
  }

  .mobile-review-cover {
    min-height: 0;
    width: 104px;
    height: 128px;
  }

  .mobile-review-body h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1.22rem;
    line-height: 1.15;
  }

  .mobile-review-body p {
    margin: 8px 0 12px;
    color: rgba(226, 232, 240, 0.82);
  }

  .mobile-review-chips span {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .mobile-review-stats {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin: 0;
    padding: 0;
  }

  .mobile-review-stats div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }

  .mobile-review-stats dt {
    color: rgba(226, 232, 240, 0.76);
  }

  .mobile-review-stats dd {
    margin: 0;
    color: #f8fafc;
    text-align: right;
  }

  .mobile-upload-processing {
    border-radius: 18px;
    padding: 14px;
    background: rgba(8, 12, 24, 0.78);
  }

  .mobile-upload-form > .form-status {
    min-height: 22px;
    color: #fca5a5;
    text-align: center;
    font-weight: 800;
  }
}

@media (max-width: 374px) {
  .mobile-upload-flow {
    padding-inline: 12px;
  }

  .mobile-upload-header {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .mobile-upload-back {
    width: 44px;
    height: 44px;
  }

  .mobile-upload-draft span {
    font-size: 0.9rem;
  }

  .mobile-upload-progress span {
    width: 50px;
    height: 50px;
  }

  .mobile-upload-hero {
    grid-template-columns: minmax(0, 1fr) 38%;
    padding: 18px 14px;
  }

  .mobile-upload-hero img {
    right: -24px;
    width: 178px;
  }

  .mobile-cover-grid {
    grid-template-columns: 1fr;
  }

  .mobile-cover-preview {
    min-height: 154px;
  }

  .mobile-review-body {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .mobile-review-cover {
    width: 92px;
    height: 116px;
  }
}

/* Compact mobile upload header/stepper: keeps the wizard premium without wasting viewport height. */
@media (max-width: 767px) {
  .mobile-upload-flow {
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .mobile-upload-header {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 44px;
    margin-bottom: 14px;
  }

  .mobile-upload-header h1 {
    font-size: clamp(1.18rem, 5.2vw, 1.42rem);
  }

  .mobile-upload-back {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .mobile-upload-back svg {
    width: 19px;
    height: 19px;
  }

  .mobile-upload-draft {
    min-height: 40px;
    gap: 5px;
    font-size: 0.92rem;
  }

  .mobile-upload-draft svg {
    width: 17px;
    height: 17px;
  }

  .mobile-upload-progress {
    margin-bottom: 14px;
  }

  .mobile-upload-progress::before {
    left: 17%;
    right: 17%;
    top: 20px;
    height: 2px;
  }

  .mobile-upload-progress button {
    min-height: 58px;
    gap: 5px;
    font-size: 0.86rem;
  }

  .mobile-upload-progress span {
    width: 42px;
    height: 42px;
    border-width: 1.5px;
    font-size: 0.96rem;
  }

  .mobile-upload-progress button.is-active span {
    box-shadow:
      0 0 18px rgba(168, 85, 247, 0.58),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .mobile-upload-form,
  .mobile-upload-step,
  .mobile-upload-card {
    gap: 12px;
  }

  .mobile-upload-hero {
    min-height: 108px;
    padding: 17px 14px;
    border-radius: 20px;
  }

  .mobile-upload-hero h2 {
    font-size: clamp(1.38rem, 6.2vw, 1.74rem);
    line-height: 1.14;
    max-width: 68%;
  }

  .mobile-upload-hero p {
    max-width: 64%;
    margin-top: 9px;
    font-size: clamp(0.88rem, 3.6vw, 0.98rem);
    line-height: 1.42;
  }

  .mobile-upload-hero img {
    right: -18px;
    bottom: -20px;
    width: min(42vw, 168px);
    max-height: 138px;
  }

  .mobile-upload-hero-details img {
    width: min(44vw, 174px);
  }

  .mobile-upload-hero-publish {
    min-height: 122px;
    padding: 8px 2px;
  }

  .mobile-upload-hero-publish h2,
  .mobile-upload-hero-publish p {
    max-width: 68%;
  }

  .mobile-upload-hero-publish img {
    width: min(35vw, 142px);
    bottom: -6px;
  }
}

@media (max-width: 374px) {
  .mobile-upload-progress button {
    font-size: 0.8rem;
  }

  .mobile-upload-progress span {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .mobile-upload-progress::before {
    top: 18px;
  }

  .mobile-upload-hero h2 {
    max-width: 66%;
    font-size: clamp(1.28rem, 6vw, 1.56rem);
  }

  .mobile-upload-hero p {
    max-width: 62%;
    font-size: 0.86rem;
  }
}

/* Reference-matched mobile upload polish. */
@media (max-width: 767px) {
  .mobile-upload-flow {
    max-width: 430px;
    padding: calc(22px + env(safe-area-inset-top)) clamp(14px, 3.8vw, 16px) calc(20px + env(safe-area-inset-bottom));
  }

  .mobile-upload-header {
    grid-template-columns: 52px minmax(0, 1fr) 96px;
    min-height: 56px;
    margin-bottom: 22px;
  }

  .mobile-upload-header h1 {
    font-size: clamp(1.32rem, 5.5vw, 1.55rem);
    font-weight: 950;
  }

  .mobile-upload-back {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .mobile-upload-draft {
    min-height: 44px;
    justify-content: flex-end;
    color: #c084fc;
    font-size: 0.95rem;
    font-weight: 950;
  }

  .mobile-upload-progress {
    margin-bottom: 20px;
  }

  .mobile-upload-progress::before {
    left: 16%;
    right: 16%;
    top: 27px;
    height: 3px;
    background: linear-gradient(90deg, #a855f7 calc((var(--upload-progress, 0) + 1) * 25%), rgba(71, 85, 105, 0.5) 0);
  }

  .mobile-upload-progress button {
    min-height: 76px;
    gap: 8px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.96rem;
  }

  .mobile-upload-progress span {
    width: 56px;
    height: 56px;
    border-width: 2px;
    font-size: 1.12rem;
  }

  .mobile-upload-progress button.is-active span {
    box-shadow:
      0 0 28px rgba(168, 85, 247, 0.62),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }

  .mobile-upload-form,
  .mobile-upload-step {
    gap: 14px;
  }

  .mobile-upload-hero {
    min-height: 119px;
    padding: 20px 16px;
    border-radius: 21px;
    grid-template-columns: minmax(0, 1fr) 42%;
  }

  .mobile-upload-hero h2 {
    max-width: 68%;
    font-size: clamp(1.5rem, 6.7vw, 1.88rem);
    line-height: 1.18;
  }

  .mobile-upload-hero p {
    max-width: 64%;
    margin-top: 11px;
    font-size: clamp(0.95rem, 3.9vw, 1.04rem);
    line-height: 1.48;
  }

  .mobile-upload-hero img {
    right: -14px;
    bottom: -20px;
    width: min(45vw, 185px);
    max-height: 152px;
  }

  .mobile-upload-card {
    gap: 16px;
    padding: 18px 14px 20px;
    border-radius: 22px;
  }

  .mobile-field {
    gap: 9px;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    min-height: 54px;
    border-radius: 13px;
  }

  .mobile-field textarea {
    min-height: 120px;
  }

  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(112px, 0.92fr);
    gap: 12px;
  }

  .mobile-upload-drop,
  .mobile-cover-preview {
    min-height: 136px;
  }

  .mobile-upload-primary {
    min-height: 58px;
    border-radius: 16px;
  }
}

@media (max-width: 374px) {
  .mobile-upload-header {
    grid-template-columns: 46px minmax(0, 1fr) 84px;
    margin-bottom: 16px;
  }

  .mobile-upload-draft {
    font-size: 0.84rem;
  }

  .mobile-upload-progress {
    margin-bottom: 16px;
  }

  .mobile-upload-progress::before {
    top: 23px;
  }

  .mobile-upload-progress button {
    min-height: 66px;
    font-size: 0.82rem;
  }

  .mobile-upload-progress span {
    width: 48px;
    height: 48px;
  }

  .mobile-upload-hero {
    min-height: 112px;
  }

  .mobile-upload-hero h2 {
    font-size: clamp(1.34rem, 6.2vw, 1.62rem);
  }

  .mobile-upload-hero p {
    font-size: 0.88rem;
  }
}

/* Compact tab-panel architecture for upload: phone-first, bottom-nav aware. */
@media (max-width: 767px) {
  body[data-active-route="upload"] .bottom-nav {
    display: flex;
  }

  body[data-active-route="upload"] .app-shell.mobile-upload-page {
    padding: 0;
  }

  .mobile-upload-flow {
    max-width: 430px;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: visible;
    padding:
      calc(12px + env(safe-area-inset-top))
      clamp(12px, 3.6vw, 16px)
      calc(164px + env(safe-area-inset-bottom));
  }

  .mobile-upload-header {
    grid-template-columns: 40px minmax(0, 1fr) 92px;
    min-height: 42px;
    gap: 8px;
    margin-bottom: 10px;
  }

  .mobile-upload-header h1 {
    font-size: clamp(1.1rem, 4.9vw, 1.28rem);
  }

  .mobile-upload-back {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .mobile-upload-draft {
    min-height: 38px;
    font-size: 0.86rem;
  }

  .mobile-upload-draft svg {
    width: 16px;
    height: 16px;
  }

  .mobile-upload-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(7, 12, 24, 0.74);
    backdrop-filter: blur(16px);
  }

  .mobile-upload-progress::before {
    display: none;
  }

  .mobile-upload-progress button {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 14px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.82rem;
    font-weight: 900;
  }

  .mobile-upload-progress span {
    width: 22px;
    height: 22px;
    border-width: 1px;
    font-size: 0.72rem;
    background: rgba(15, 23, 42, 0.9);
  }

  .mobile-upload-progress button.is-active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(99, 102, 241, 0.92));
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.25);
  }

  .mobile-upload-progress button.is-active span {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
  }

  .mobile-upload-progress button.is-complete {
    color: #e9d5ff;
  }

  .mobile-upload-form,
  .mobile-upload-step,
  .mobile-upload-card {
    gap: 10px;
  }

  .mobile-upload-step {
    padding-bottom: 78px;
  }

  .mobile-upload-hero {
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) 76px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .mobile-upload-hero h2 {
    max-width: 100%;
    font-size: clamp(1rem, 4.5vw, 1.22rem);
    line-height: 1.08;
  }

  .mobile-upload-hero p {
    max-width: 100%;
    margin-top: 5px;
    font-size: 0.78rem;
    line-height: 1.28;
  }

  .mobile-upload-hero img,
  .mobile-upload-hero-details img,
  .mobile-upload-hero-publish img {
    right: -8px;
    bottom: -16px;
    width: 96px;
    max-height: 96px;
  }

  .mobile-upload-hero-publish {
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    background:
      radial-gradient(circle at 78% 30%, rgba(168, 85, 247, 0.28), transparent 35%),
      linear-gradient(135deg, rgba(10, 14, 25, 0.9), rgba(20, 10, 52, 0.68));
  }

  .mobile-upload-hero-publish h2,
  .mobile-upload-hero-publish p {
    max-width: calc(100% - 88px);
  }

  .mobile-upload-card {
    padding: 12px;
    border-radius: 18px;
    gap: 10px;
  }

  .mobile-field {
    gap: 6px;
  }

  .mobile-field > span,
  .mobile-cover-section h3,
  .mobile-card-title h3,
  .mobile-ai-card h3,
  .mobile-review-card > h3 {
    gap: 8px;
    font-size: 0.86rem;
  }

  .mobile-field > span svg,
  .mobile-review-card > h3 svg,
  .mobile-card-title h3 svg {
    width: 17px;
    height: 17px;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    min-height: 44px;
    border-radius: 12px;
    padding-left: 12px;
    padding-right: 40px;
    font-size: 0.92rem;
  }

  .mobile-field textarea {
    min-height: 76px;
    padding-top: 12px;
  }

  .mobile-field em {
    right: 12px;
    bottom: 13px;
    font-size: 0.72rem;
  }

  .mobile-field small,
  .mobile-cover-section p,
  .mobile-card-title span,
  .mobile-ai-card p,
  .mobile-ai-card small,
  .mobile-tip {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .mobile-cover-section {
    gap: 8px;
    padding-top: 0;
  }

  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 9px;
  }

  .mobile-upload-drop,
  .mobile-cover-preview {
    min-height: 88px;
    border-radius: 14px;
  }

  .mobile-upload-drop {
    gap: 4px;
    padding: 10px;
  }

  .mobile-upload-drop svg {
    width: 27px;
    height: 27px;
  }

  .mobile-upload-drop b {
    font-size: 0.86rem;
  }

  .mobile-upload-drop small {
    font-size: 0.7rem;
  }

  .mobile-upload-primary {
    position: fixed;
    z-index: 35;
    left: 50%;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: min(398px, calc(100vw - 28px));
    min-height: 54px;
    margin: 0;
    border-radius: 17px;
    transform: translateX(-50%);
    box-shadow:
      0 18px 44px rgba(124, 58, 237, 0.42),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }

  .mobile-upload-primary svg {
    width: 22px;
    height: 22px;
  }

  .mobile-chip-section {
    gap: 8px;
  }

  .mobile-selected-chips,
  .mobile-genre-options,
  .mobile-review-chips {
    gap: 7px;
  }

  .mobile-selected-chips button,
  .mobile-review-chips span,
  .mobile-genre-options button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.78rem;
    border-radius: 12px;
  }

  .mobile-tag-box {
    min-height: 48px;
    padding: 6px;
    border-radius: 14px;
  }

  .mobile-ai-card {
    gap: 8px 10px;
    padding: 12px;
    border-radius: 16px;
  }

  .mobile-ai-card small {
    padding: 9px;
  }

  .mobile-toggle span {
    width: 50px;
    height: 30px;
  }

  .mobile-toggle span::after {
    top: 4px;
    width: 22px;
    height: 22px;
  }

  .mobile-toggle input:not(:checked) + span::after {
    right: 24px;
  }

  .mobile-card-title-row {
    align-items: center;
  }

  .mobile-outline-button {
    min-height: 38px;
    padding: 0 11px;
    border-radius: 12px;
    font-size: 0.8rem;
  }

  .mobile-chapter-list {
    gap: 7px;
  }

  .mobile-chapter-list article {
    grid-template-columns: 18px 52px minmax(0, 1fr) 30px;
    gap: 9px;
    min-height: 70px;
    padding: 8px;
    border-radius: 14px;
  }

  .mobile-chapter-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
  }

  .mobile-chapter-list strong {
    margin: 2px 0;
    font-size: 0.9rem;
  }

  .mobile-chapter-list small,
  .mobile-chapter-list span {
    font-size: 0.76rem;
  }

  .mobile-chapter-list button {
    width: 30px;
    height: 30px;
  }

  .mobile-chapter-drop {
    min-height: 72px;
  }

  .mobile-review-body {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
    border-radius: 14px;
  }

  .mobile-review-cover {
    width: 76px;
    height: 94px;
    border-radius: 12px;
  }

  .mobile-review-body h4 {
    font-size: 1rem;
  }

  .mobile-review-body p {
    margin: 5px 0 8px;
    font-size: 0.8rem;
  }

  .mobile-review-stats {
    gap: 6px;
    font-size: 0.82rem;
  }

  .mobile-upload-secondary {
    min-height: 44px;
    border-radius: 14px;
    font-size: 0.9rem;
  }

  .mobile-upload-form > .form-status {
    position: fixed;
    z-index: 36;
    left: 50%;
    bottom: calc(146px + env(safe-area-inset-bottom));
    width: min(398px, calc(100vw - 28px));
    min-height: 0;
    transform: translateX(-50%);
    pointer-events: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  }
}

@media (max-width: 374px) {
  .mobile-upload-flow {
    padding-inline: 10px;
  }

  .mobile-upload-header {
    grid-template-columns: 38px minmax(0, 1fr) 78px;
  }

  .mobile-upload-draft span {
    font-size: 0.74rem;
  }

  .mobile-upload-progress {
    gap: 4px;
    padding: 4px;
  }

  .mobile-upload-progress button {
    min-height: 36px;
    gap: 4px;
    font-size: 0.74rem;
  }

  .mobile-upload-progress span {
    width: 19px;
    height: 19px;
    font-size: 0.66rem;
  }

  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) 94px;
  }

  .mobile-upload-primary {
    width: calc(100vw - 20px);
  }
}

/* Upload focused compact layout: fixed action bar, no global nav, no control overlap. */
@media (max-width: 767px) {
  body[data-active-route="upload"] .bottom-nav {
    display: none !important;
  }

  body[data-active-route="upload"] {
    overflow: hidden;
  }

  .mobile-upload-flow {
    height: 100svh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
    padding:
      calc(10px + env(safe-area-inset-top))
      clamp(12px, 3.4vw, 15px)
      0;
  }

  .mobile-upload-header {
    min-height: 38px;
    margin-bottom: 0;
    grid-template-columns: 38px minmax(0, 1fr) 98px;
  }

  .mobile-upload-header h1 {
    font-size: clamp(1.08rem, 4.7vw, 1.24rem);
  }

  .mobile-upload-back {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .mobile-upload-draft {
    min-height: 36px;
    padding: 0 8px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 999px;
    background: rgba(88, 28, 135, 0.2);
    color: #e9d5ff;
    font-size: 0.84rem;
    box-shadow: 0 0 18px rgba(124, 58, 237, 0.14);
  }

  .mobile-upload-progress {
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 4px;
    border-radius: 16px;
  }

  .mobile-upload-progress button {
    min-height: 32px;
    gap: 5px;
    border-radius: 12px;
    font-size: 0.78rem;
  }

  .mobile-upload-progress span {
    width: 18px;
    height: 18px;
    font-size: 0.62rem;
  }

  .mobile-upload-form {
    min-height: 0;
    overflow: hidden;
  }

  .mobile-upload-step {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    scrollbar-width: none;
  }

  .mobile-upload-step::-webkit-scrollbar {
    display: none;
  }

  .mobile-upload-hero {
    min-height: 52px;
    grid-template-columns: minmax(0, 1fr) 58px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .mobile-upload-hero h2 {
    font-size: clamp(0.94rem, 4.1vw, 1.1rem);
    line-height: 1.08;
  }

  .mobile-upload-hero p {
    margin-top: 3px;
    font-size: 0.72rem;
    line-height: 1.22;
  }

  .mobile-upload-hero img,
  .mobile-upload-hero-details img,
  .mobile-upload-hero-publish img {
    right: -6px;
    bottom: -12px;
    width: 72px;
    max-height: 72px;
  }

  .mobile-upload-hero-publish {
    min-height: 52px;
    padding: 8px 10px;
  }

  .mobile-upload-hero-publish h2,
  .mobile-upload-hero-publish p {
    max-width: calc(100% - 60px);
  }

  .mobile-upload-card {
    padding: 10px;
    gap: 8px;
    border-radius: 16px;
  }

  .mobile-field {
    gap: 5px;
  }

  .mobile-field > span,
  .mobile-cover-section h3,
  .mobile-card-title h3,
  .mobile-ai-card h3,
  .mobile-review-card > h3 {
    font-size: 0.8rem;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    min-height: 40px;
    border-radius: 11px;
    padding-inline: 10px 38px;
    font-size: 0.88rem;
  }

  .mobile-field textarea {
    min-height: 68px;
    max-height: 68px;
    padding-top: 10px;
    transition: max-height 160ms ease, min-height 160ms ease;
  }

  .mobile-field textarea:focus {
    min-height: 104px;
    max-height: 104px;
  }

  .mobile-field em {
    bottom: 11px;
    font-size: 0.68rem;
  }

  .mobile-cover-section {
    gap: 7px;
  }

  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
  }

  .mobile-upload-drop,
  .mobile-cover-preview {
    min-height: 76px;
  }

  .mobile-upload-drop {
    gap: 3px;
    padding: 8px;
  }

  .mobile-upload-drop svg {
    width: 23px;
    height: 23px;
  }

  .mobile-upload-drop b {
    font-size: 0.8rem;
  }

  .mobile-upload-drop small {
    font-size: 0.66rem;
  }

  .mobile-selected-chips button,
  .mobile-review-chips span,
  .mobile-genre-options button {
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .mobile-tag-box {
    min-height: 42px;
  }

  .mobile-ai-card {
    padding: 10px;
  }

  .mobile-ai-card small {
    padding: 7px;
  }

  .mobile-upload-actions {
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: min(402px, calc(100vw - 24px));
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background:
      linear-gradient(180deg, rgba(8, 12, 24, 0.82), rgba(3, 7, 18, 0.94));
    box-shadow:
      0 -16px 46px rgba(0, 0, 0, 0.48),
      0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(20px);
    transform: translateX(-50%);
  }

  .mobile-upload-actions-publish {
    grid-template-columns: minmax(0, 1fr) 116px;
  }

  .mobile-upload-primary {
    position: static;
    width: 100%;
    min-height: 48px;
    transform: none;
    border-radius: 15px;
  }

  .mobile-upload-secondary {
    min-height: 48px;
    border-radius: 15px;
    font-size: 0.84rem;
  }

  .mobile-upload-form > .form-status {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .mobile-upload-processing[hidden] {
    display: none;
  }
}

@media (max-width: 374px) {
  .mobile-upload-flow {
    padding-inline: 10px;
  }

  .mobile-upload-header {
    grid-template-columns: 36px minmax(0, 1fr) 84px;
  }

  .mobile-upload-draft {
    padding-inline: 7px;
    font-size: 0.74rem;
  }

  .mobile-upload-progress button {
    font-size: 0.7rem;
  }

  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .mobile-upload-actions {
    width: calc(100vw - 20px);
    padding: 8px;
  }

  .mobile-upload-actions-publish {
    grid-template-columns: 1fr;
  }
}

/* Final density pass: tighten rhythm without changing the visual system. */
@media (max-width: 767px) {
  .mobile-upload-flow {
    gap: 6px;
    padding-top: calc(8px + env(safe-area-inset-top));
  }

  .mobile-upload-header {
    min-height: 34px;
    grid-template-columns: 36px minmax(0, 1fr) 88px;
    gap: 6px;
  }

  .mobile-upload-header h1 {
    font-size: clamp(1.02rem, 4.4vw, 1.18rem);
  }

  .mobile-upload-back {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .mobile-upload-back svg {
    width: 17px;
    height: 17px;
  }

  .mobile-upload-draft {
    min-height: 32px;
    padding: 0 9px;
    gap: 4px;
    border-color: rgba(168, 85, 247, 0.22);
    background: rgba(88, 28, 135, 0.14);
    font-size: 0.78rem;
    box-shadow: none;
  }

  .mobile-upload-draft svg {
    width: 14px;
    height: 14px;
  }

  .mobile-upload-progress {
    height: 36px;
    min-height: 36px;
    padding: 3px;
    border-radius: 14px;
  }

  .mobile-upload-progress button {
    min-height: 28px;
    gap: 4px;
    border-radius: 11px;
    font-size: 0.74rem;
  }

  .mobile-upload-progress span {
    width: 16px;
    height: 16px;
    font-size: 0.58rem;
  }

  .mobile-upload-step {
    display: grid;
    align-content: start;
    gap: 8px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .mobile-upload-step[hidden] {
    display: none;
  }

  .mobile-upload-hero {
    min-height: 46px;
    padding: 7px 9px;
    grid-template-columns: minmax(0, 1fr) 52px;
    border-radius: 14px;
  }

  .mobile-upload-hero h2 {
    font-size: clamp(0.88rem, 3.9vw, 1rem);
    line-height: 1.05;
  }

  .mobile-upload-hero p {
    margin-top: 2px;
    font-size: 0.66rem;
    line-height: 1.18;
  }

  .mobile-upload-hero img,
  .mobile-upload-hero-details img,
  .mobile-upload-hero-publish img {
    right: -5px;
    bottom: -10px;
    width: 62px;
    max-height: 62px;
  }

  .mobile-upload-hero-publish {
    min-height: 46px;
    padding: 7px 9px;
    border-radius: 14px;
  }

  .mobile-upload-card {
    padding: 8px;
    gap: 7px;
    border-radius: 15px;
  }

  .mobile-field {
    gap: 4px;
  }

  .mobile-field > span,
  .mobile-cover-section h3,
  .mobile-card-title h3,
  .mobile-ai-card h3,
  .mobile-review-card > h3 {
    gap: 7px;
    font-size: 0.76rem;
  }

  .mobile-field > span svg,
  .mobile-review-card > h3 svg,
  .mobile-card-title h3 svg {
    width: 15px;
    height: 15px;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    min-height: 38px;
    border-radius: 10px;
    padding-inline: 10px 36px;
    font-size: 0.84rem;
  }

  .mobile-field textarea {
    min-height: 58px;
    max-height: 58px;
    padding-top: 9px;
  }

  .mobile-field textarea:focus {
    min-height: 92px;
    max-height: 92px;
  }

  .mobile-field em {
    right: 10px;
    bottom: 10px;
    font-size: 0.64rem;
  }

  .mobile-field small,
  .mobile-cover-section p,
  .mobile-card-title span,
  .mobile-ai-card p,
  .mobile-ai-card small,
  .mobile-tip {
    font-size: 0.7rem;
    line-height: 1.22;
  }

  .mobile-cover-section {
    gap: 6px;
  }

  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 7px;
  }

  .mobile-upload-drop,
  .mobile-cover-preview {
    min-height: 66px;
    border-radius: 12px;
  }

  .mobile-upload-drop {
    padding: 7px;
  }

  .mobile-upload-drop svg {
    width: 20px;
    height: 20px;
  }

  .mobile-upload-drop b {
    font-size: 0.74rem;
  }

  .mobile-upload-drop small {
    font-size: 0.6rem;
  }

  .mobile-cover-preview {
    position: relative;
    align-content: end;
    padding: 6px;
    font-size: 0.66rem;
  }

  .mobile-cover-preview span {
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.58);
    color: rgba(248, 250, 252, 0.86);
  }

  .mobile-upload-actions {
    width: min(396px, calc(100vw - 22px));
    padding: 8px;
    border-radius: 19px;
  }

  .mobile-upload-primary {
    min-height: 44px;
    border-radius: 14px;
    font-size: 0.98rem;
  }

  .mobile-upload-primary svg {
    width: 20px;
    height: 20px;
  }

  .mobile-upload-secondary {
    min-height: 44px;
    border-radius: 14px;
  }
}

@media (max-width: 374px) {
  .mobile-upload-header {
    grid-template-columns: 34px minmax(0, 1fr) 74px;
  }

  .mobile-upload-draft {
    padding-inline: 6px;
    font-size: 0.68rem;
  }

  .mobile-upload-progress button {
    font-size: 0.68rem;
  }

  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) 76px;
  }
}

/* Upload Comic final mobile composition: cover-first production screen. */
@media (max-width: 767px) {
  body[data-active-route="upload"] {
    background: #0D0D12;
    color: #F0F0F0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  }

  body[data-active-route="upload"] .topbar,
  body[data-active-route="upload"] .sidebar,
  body[data-active-route="upload"] .bottom-nav {
    display: none !important;
  }

  .mobile-upload-flow {
    --upload-purple: #7C3AED;
    --upload-purple-2: #A855F7;
    height: 100svh;
    max-width: 430px;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top)) 16px 0;
    background:
      radial-gradient(circle at 50% 16%, rgba(124, 58, 237, 0.2), transparent 32%),
      radial-gradient(circle at 100% 4%, rgba(168, 85, 247, 0.14), transparent 24%),
      #0D0D12;
  }

  .mobile-upload-header {
    min-height: 40px;
    grid-template-columns: 40px minmax(0, 1fr) 96px;
    margin: 0;
  }

  .mobile-upload-header h1 {
    color: #F0F0F0;
    font-size: 1.18rem;
    font-weight: 850;
  }

  .mobile-upload-back {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
  }

  .mobile-upload-draft {
    min-height: 34px;
    justify-self: end;
    padding: 0 10px;
    border: 1px solid rgba(124, 58, 237, 0.7);
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    color: #A855F7;
    font-size: 0.78rem;
    font-weight: 800;
  }

  .mobile-upload-progress {
    position: relative;
    height: 58px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .mobile-upload-progress::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 16.8%;
    right: 16.8%;
    height: 2px;
    display: block;
    border-radius: 999px;
    background:
      linear-gradient(90deg, var(--upload-purple) calc((var(--upload-progress, 0) + 1) * 25%), rgba(136, 136, 136, 0.34) 0);
  }

  .mobile-upload-progress button {
    position: relative;
    min-height: 58px;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 5px;
    padding: 0;
    background: transparent;
    color: #888;
    font-size: 0.76rem;
    font-weight: 700;
  }

  .mobile-upload-progress span {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(136, 136, 136, 0.62);
    border-radius: 50%;
    background: #141421;
    color: #888;
    font-size: 0.88rem;
    font-weight: 800;
  }

  .mobile-upload-progress strong {
    color: #888;
    font-weight: 700;
  }

  .mobile-upload-progress button.is-active {
    background: transparent;
    box-shadow: none;
  }

  .mobile-upload-progress button.is-active span {
    border-color: transparent;
    background: var(--upload-purple);
    color: #fff;
    box-shadow: 0 0 18px rgba(124, 58, 237, 0.5);
  }

  .mobile-upload-progress button.is-active strong,
  .mobile-upload-progress button.is-complete strong {
    color: var(--upload-purple-2);
    font-weight: 850;
  }

  .mobile-upload-progress button.is-complete span {
    border-color: var(--upload-purple);
    color: #F0F0F0;
  }

  .mobile-upload-form {
    min-height: 0;
    overflow: hidden;
  }

  .mobile-upload-step {
    height: 100%;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 14px;
    overflow-y: auto;
    padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  }

  .mobile-upload-step[hidden] {
    display: none;
  }

  .mobile-cover-top {
    position: relative;
    margin: 0;
    padding: 0;
  }

  .mobile-cover-top::before {
    content: "";
    position: absolute;
    inset: 18px 18px -8px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(168, 85, 247, 0.18));
    filter: blur(22px);
  }

  .mobile-cover-hero-zone {
    position: relative;
    min-height: 200px;
    display: block;
    border: 1.5px dashed rgba(124, 58, 237, 0.9);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(26, 26, 46, 0.62);
  }

  .mobile-cover-hero-zone input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .mobile-cover-hero-zone.has-cover {
    border-style: solid;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.35);
  }

  .mobile-cover-preview {
    width: 100%;
    min-height: 200px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(circle at center, rgba(124, 58, 237, 0.16), transparent 46%),
      #1A1A2E;
    color: #F0F0F0;
    text-align: center;
  }

  .mobile-cover-preview svg {
    width: 42px;
    height: 42px;
    color: var(--upload-purple);
  }

  .mobile-cover-preview b {
    color: #F0F0F0;
    font-size: 1rem;
    font-weight: 850;
  }

  .mobile-cover-preview small {
    color: #888;
    font-size: 0.78rem;
  }

  .mobile-cover-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  .mobile-cover-change {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    min-height: 30px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.92);
    color: white;
    font-size: 0.74rem;
    font-weight: 850;
  }

  .mobile-cover-hero-zone.has-cover .mobile-cover-change {
    display: inline-flex;
  }

  .mobile-upload-card {
    position: relative;
    gap: 16px;
    padding: 20px;
    border: 1px solid #ffffff15;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  .mobile-details-head {
    min-height: 48px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-details-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--upload-purple-2);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-details-kicker svg {
    width: 16px;
    height: 16px;
  }

  .mobile-details-mascot {
    position: relative;
    width: 92px;
    min-height: 52px;
    flex: 0 0 auto;
  }

  .mobile-details-mascot img {
    position: absolute;
    right: 0;
    bottom: -5px;
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(124, 58, 237, 0.45));
  }

  .mobile-details-mascot span {
    position: absolute;
    right: 40px;
    top: 0;
    width: 82px;
    padding: 5px 7px;
    border: 1px solid rgba(168, 85, 247, 0.32);
    border-radius: 10px;
    background: rgba(13, 13, 18, 0.84);
    color: rgba(240, 240, 240, 0.9);
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .mobile-field {
    gap: 8px;
  }

  .mobile-field > span {
    gap: 8px;
    color: #F0F0F0;
    font-size: 0.88rem;
    font-weight: 800;
  }

  .mobile-field > span svg {
    width: 17px;
    height: 17px;
    color: var(--upload-purple-2);
  }

  .mobile-field strong {
    color: var(--upload-purple-2);
  }

  .mobile-field small {
    color: #888;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    min-height: 48px;
    border: 1px solid #2A2A3E;
    border-radius: 12px;
    background: #1A1A2E;
    color: #F0F0F0;
    padding: 14px 42px 14px 16px;
    font-size: 0.94rem;
  }

  .mobile-field input::placeholder,
  .mobile-field textarea::placeholder {
    color: #555;
    font-style: italic;
  }

  .mobile-field input:focus,
  .mobile-field textarea:focus,
  .mobile-field select:focus,
  .mobile-tag-box input:focus {
    border-color: var(--upload-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14), 0 0 18px rgba(124, 58, 237, 0.18);
  }

  .mobile-field textarea {
    min-height: 104px;
    max-height: none;
    resize: vertical;
  }

  .mobile-field textarea:focus {
    min-height: 120px;
    max-height: none;
  }

  .mobile-field em {
    right: 12px;
    bottom: 10px;
    color: #888;
    font-size: 0.72rem;
  }

  .mobile-auto-chip {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #888;
    font-size: 0.72rem;
  }

  .mobile-auto-chip svg {
    width: 13px;
    height: 13px;
    color: #888;
  }

  .mobile-upload-actions {
    width: min(398px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .mobile-upload-primary {
    min-height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    color: white;
    font-size: 1rem;
    font-weight: 850;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    transition: transform 120ms ease, box-shadow 120ms ease;
  }

  .mobile-upload-primary:active {
    transform: scale(0.985);
    box-shadow: 0 2px 14px rgba(124, 58, 237, 0.42);
  }

  .mobile-upload-form > .form-status {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 374px) {
  .mobile-upload-flow {
    padding-inline: 12px;
  }

  .mobile-upload-header {
    grid-template-columns: 38px minmax(0, 1fr) 84px;
  }

  .mobile-upload-draft {
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .mobile-cover-hero-zone,
  .mobile-cover-preview {
    min-height: 178px;
  }

  .mobile-cover-preview img {
    height: 178px;
  }

  .mobile-upload-card {
    padding: 16px;
  }
}

/* All-screen upload app additions. */
@media (max-width: 767px) {
  .mobile-rating-section,
  .mobile-schedule-section {
    display: grid;
    gap: 10px;
  }

  .mobile-rating-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-rating-grid button,
  .mobile-visibility-grid button {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 10px;
    border: 1px solid #2a2545;
    border-radius: 12px;
    background: #1C1830;
    color: #FFFFFF;
    text-align: left;
  }

  .mobile-rating-grid button.is-selected,
  .mobile-visibility-grid button.is-selected {
    border-color: #7B3FE4;
    background: #1a0f3a;
    box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.12);
  }

  .mobile-rating-grid b,
  .mobile-visibility-grid b,
  .mobile-monetize-row b {
    font-size: 0.82rem;
  }

  .mobile-rating-grid small,
  .mobile-visibility-grid small,
  .mobile-monetize-row small {
    color: #6B7280;
    font-size: 0.7rem;
  }

  .mobile-segment-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .mobile-segment-row::-webkit-scrollbar {
    display: none;
  }

  .mobile-segment-row button {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 12px;
    border: 1px solid #2a2545;
    border-radius: 999px;
    background: #1C1830;
    color: #6B7280;
    font-weight: 750;
  }

  .mobile-segment-row button.is-active {
    border-color: #7B3FE4;
    background: #7B3FE4;
    color: #fff;
  }

  .mobile-pages-grid,
  .mobile-visibility-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-number-field {
    display: grid;
    gap: 7px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 750;
  }

  .mobile-number-field div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    overflow: hidden;
    border: 1px solid #2a2545;
    border-radius: 12px;
    background: #1C1830;
  }

  .mobile-number-field button {
    border: 0;
    background: rgba(123, 63, 228, 0.14);
    color: #A78BFA;
    font-weight: 900;
  }

  .mobile-number-field input {
    min-width: 0;
    border: 0;
    background: transparent;
    color: white;
    text-align: center;
  }

  .mobile-file-list {
    display: grid;
    gap: 8px;
  }

  .mobile-file-list article {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #1e1a3a;
    border-radius: 12px;
    background: #1C1830;
  }

  .mobile-file-list svg {
    color: #A78BFA;
  }

  .mobile-file-list b,
  .mobile-file-list small {
    display: block;
  }

  .mobile-file-list b {
    color: #fff;
    font-size: 0.82rem;
  }

  .mobile-file-list small {
    color: #6B7280;
    font-size: 0.7rem;
  }

  .mobile-file-list i {
    display: block;
    height: 4px;
    margin-top: 6px;
    border-radius: 999px;
    background: #7B3FE4;
  }

  .mobile-file-list strong,
  .mobile-checklist .ok {
    color: #22C55E;
  }

  .mobile-publish-options {
    gap: 12px;
  }

  .mobile-visibility-grid button {
    min-height: 68px;
  }

  .mobile-visibility-grid svg {
    width: 18px;
    height: 18px;
    color: #A78BFA;
  }

  .mobile-monetize-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid #1e1a3a;
    border-radius: 12px;
    background: #1C1830;
  }

  .mobile-checklist {
    border-top: 1px solid #1e1a3a;
    padding-top: 10px;
  }

  .mobile-checklist summary {
    color: #fff;
    font-weight: 800;
    cursor: pointer;
  }

  .mobile-checklist p {
    margin: 8px 0 0;
    color: #C4B5FD;
    font-size: 0.8rem;
  }

  .mobile-checklist .bad {
    color: #EF4444;
  }

  .mobile-upload-actions-publish {
    grid-template-columns: 1fr;
  }

  .mobile-upload-actions-publish .mobile-upload-secondary {
    border: 1.5px solid #7B3FE4;
    background: transparent;
    color: #A78BFA;
  }

  .upload-success-shell {
    min-height: 100vh;
    padding: 0;
  }

  body[data-active-route="upload"] .upload-success-shell ~ .bottom-nav,
  .upload-success-shell .bottom-nav {
    display: none !important;
  }

  .upload-success-screen {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 14px;
    padding: 28px 18px;
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 40%, #2D1A6E33, transparent 70%),
      #0D0B1A;
    color: #fff;
    text-align: center;
  }

  .upload-confetti span {
    position: absolute;
    top: -20px;
    width: 7px;
    height: 14px;
    border-radius: 2px;
    animation: uploadConfetti 1.8s ease-in-out infinite;
  }

  .upload-confetti span:nth-child(1) { left: 14%; background: #7B3FE4; animation-delay: 0s; }
  .upload-confetti span:nth-child(2) { left: 28%; background: #F0C040; animation-delay: .2s; }
  .upload-confetti span:nth-child(3) { left: 44%; background: #FF6EC7; animation-delay: .05s; }
  .upload-confetti span:nth-child(4) { left: 61%; background: #7B3FE4; animation-delay: .3s; }
  .upload-confetti span:nth-child(5) { left: 74%; background: #F0C040; animation-delay: .12s; }
  .upload-confetti span:nth-child(6) { left: 88%; background: #FF6EC7; animation-delay: .26s; }

  @keyframes uploadConfetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    12% { opacity: 1; }
    100% { transform: translateY(100svh) rotate(260deg); opacity: 0; }
  }

  .upload-success-check {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border: 2px solid #22C55E;
    border-radius: 50%;
    background: #0f3320;
    color: #22C55E;
    animation: uploadCheckIn 420ms cubic-bezier(.18, .9, .2, 1.2);
  }

  @keyframes uploadCheckIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
  }

  .upload-success-check svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
  }

  .upload-success-screen h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 850;
  }

  .upload-success-screen h2 {
    margin: 0;
    color: #A78BFA;
    font-size: 1.12rem;
  }

  .upload-success-screen p {
    margin: 0;
    color: #6B7280;
  }

  .upload-success-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 354px);
  }

  .upload-success-stats span {
    padding: 10px 6px;
    border: 1px solid #1e1a3a;
    border-radius: 12px;
    background: #141228;
    color: #C4B5FD;
    font-size: 0.78rem;
  }

  .upload-success-actions {
    width: min(100%, 354px);
    display: grid;
    gap: 10px;
    margin-top: 8px;
  }

  .upload-success-link {
    min-height: 42px;
    border: 0;
    background: transparent;
    color: #6B7280;
    font-weight: 800;
  }

  body[data-active-route="my-comics"] {
    background: #0D0B1A;
  }

  body[data-active-route="my-comics"] .topbar,
  body[data-active-route="my-comics"] .sidebar {
    display: none;
  }

  .my-comics-page-shell {
    padding: 14px 12px 120px;
  }

  .my-comics-shell {
    max-width: 390px;
    gap: 12px;
  }

  .my-comics-head {
    align-items: center;
  }

  .my-comics-head p,
  .my-comics-stats,
  .my-comics-tools,
  .my-comics-pagination {
    display: none;
  }

  .my-comics-head h1 {
    font-size: 1.1rem;
  }

  .my-comics-create {
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    padding: 0;
  }

  .my-comics-create:not(.my-comic-empty-card .my-comics-create) {
    font-size: 0;
  }

  .my-comics-create span {
    font-size: 1.25rem;
  }

  .my-comics-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .my-comics-tabs button {
    flex: 0 0 auto;
    border-radius: 999px;
    background: transparent;
    color: #6B7280;
  }

  .my-comics-tabs button.active {
    background: #7B3FE4;
    color: white;
  }

  .my-comics-grid {
    display: grid;
    gap: 10px;
  }

  .my-comic-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid #1e1a3a;
    border-radius: 16px;
    background: #141228;
  }

  .my-comic-cover {
    width: 64px;
    min-height: 86px;
    border-radius: 10px;
  }

  .my-comic-body {
    min-width: 0;
  }

  .my-comic-body h2 {
    margin: 0;
    color: white;
    font-size: 0.94rem;
  }

  .my-comic-body p,
  .my-comic-body small {
    color: #6B7280;
    font-size: 0.75rem;
  }

  .my-comic-actions {
    display: none;
  }
}

/* Reference-style responsive upload wizard. */
@media (max-width: 767px) {
  body[data-active-route="upload"] {
    min-width: 0;
    overflow-x: hidden;
    background: radial-gradient(circle at 70% 9%, rgba(124, 58, 237, 0.2), transparent 30%), #020611;
  }

  body[data-active-route="upload"] .topbar,
  body[data-active-route="upload"] .sidebar,
  body[data-active-route="upload"] .bottom-nav {
    display: none !important;
  }

  .mobile-upload-page {
    min-height: 100svh;
    padding: 0;
    background: transparent;
  }

  .mobile-upload-flow {
    --upload-purple: #8b3dff;
    --upload-purple-2: #c45cff;
    --upload-line: rgba(125, 146, 184, 0.22);
    width: min(100%, 630px);
    max-width: 630px;
    min-height: 100svh;
    height: auto;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: clamp(16px, 3vw, 24px);
    padding: calc(18px + env(safe-area-inset-top)) clamp(14px, 4vw, 28px) calc(18px + env(safe-area-inset-bottom));
    background: radial-gradient(circle at 50% 2%, rgba(139, 61, 255, 0.18), transparent 24%), linear-gradient(180deg, rgba(2, 6, 17, 0.95), rgba(2, 6, 17, 0.98));
    color: #f8fafc;
  }

  .mobile-upload-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(86px, auto);
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin: 0;
  }

  .mobile-upload-header h1 {
    min-width: 0;
    color: #ffffff;
    font-size: clamp(1.12rem, 4vw, 1.45rem);
    font-weight: 850;
    text-align: center;
    letter-spacing: 0;
  }

  .mobile-upload-back {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.66);
    color: #ffffff;
  }

  .mobile-upload-draft {
    justify-self: end;
    min-height: 40px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #c45cff;
    font-size: clamp(0.78rem, 3.2vw, 0.95rem);
    font-weight: 850;
    white-space: nowrap;
  }

  .mobile-upload-progress {
    position: relative;
    height: 82px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .mobile-upload-progress::before {
    content: "";
    position: absolute;
    top: 27px;
    left: 16.666%;
    right: 16.666%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--upload-purple) calc((var(--upload-progress, 0) + 1) * 25%), rgba(71, 85, 105, 0.55) 0);
  }

  .mobile-upload-progress button {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    min-width: 0;
    min-height: 78px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(226, 232, 240, 0.76);
    font-size: clamp(0.78rem, 3.1vw, 1rem);
    font-weight: 650;
  }

  .mobile-upload-progress span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(148, 163, 184, 0.5);
    border-radius: 50%;
    background: #080d19;
    color: #e5e7eb;
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 850;
    box-shadow: 0 0 0 5px #020611;
  }

  .mobile-upload-progress strong {
    color: inherit;
    font-weight: 760;
  }

  .mobile-upload-progress button.is-active span {
    border-color: rgba(255, 255, 255, 0.26);
    background: linear-gradient(135deg, #8b3dff, #a855f7);
    color: #ffffff;
    box-shadow: 0 0 0 5px #020611, 0 0 26px rgba(168, 85, 247, 0.72);
  }

  .mobile-upload-progress button.is-active strong,
  .mobile-upload-progress button.is-complete strong {
    color: #f0abfc;
  }

  .mobile-upload-form {
    min-height: 0;
    overflow: visible;
  }

  .mobile-upload-step {
    display: grid;
    align-content: start;
    gap: clamp(14px, 3vw, 20px);
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  }

  .mobile-upload-step[hidden] {
    display: none;
  }

  .mobile-upload-hero {
    position: relative;
    min-height: clamp(160px, 33vw, 220px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(128px, 38%);
    align-items: center;
    overflow: hidden;
    padding: clamp(20px, 5vw, 30px);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 16px;
    background: radial-gradient(circle at 72% 48%, rgba(139, 61, 255, 0.42), transparent 36%), linear-gradient(135deg, rgba(10, 15, 29, 0.98), rgba(34, 15, 70, 0.86));
  }

  .mobile-upload-hero h2 {
    max-width: 12ch;
    color: #ffffff;
    font-size: clamp(1.8rem, 7vw, 2.75rem);
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: 0;
  }

  .mobile-upload-hero p {
    max-width: 26ch;
    margin-top: 14px;
    color: rgba(241, 245, 249, 0.9);
    font-size: clamp(1rem, 3.7vw, 1.28rem);
    line-height: 1.45;
  }

  .mobile-upload-hero img {
    position: absolute;
    right: clamp(-10px, -2vw, 0px);
    bottom: -14px;
    width: min(42%, 220px);
    max-height: 112%;
    object-fit: contain;
    filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.36));
  }

  .mobile-upload-card {
    display: grid;
    gap: clamp(16px, 3vw, 22px);
    padding: clamp(20px, 4vw, 28px);
    border: 1px solid var(--upload-line);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(9, 18, 35, 0.92), rgba(4, 10, 22, 0.94));
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.24);
  }

  .mobile-field {
    position: relative;
    display: grid;
    gap: 10px;
  }

  .mobile-field > span,
  .mobile-cover-section h3,
  .mobile-card-title h3,
  .mobile-ai-card h3,
  .mobile-review-card > h3 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: clamp(0.98rem, 3.4vw, 1.15rem);
    font-weight: 850;
    letter-spacing: 0;
  }

  .mobile-field > span svg,
  .mobile-card-title svg,
  .mobile-review-card > h3 svg,
  .mobile-tip svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: #c45cff;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(3, 7, 18, 0.72);
    color: #f8fafc;
    padding: 15px 58px 15px 18px;
    font-size: clamp(0.98rem, 3.5vw, 1.12rem);
  }

  .mobile-field textarea {
    min-height: 132px;
    resize: vertical;
  }

  .mobile-field em {
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: rgba(203, 213, 225, 0.8);
    font-size: 0.84rem;
    font-style: normal;
  }

  .mobile-auto-chip {
    color: rgba(203, 213, 225, 0.84);
    font-size: 0.88rem;
  }

  .mobile-cover-section {
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
  }

  .mobile-cover-section p {
    margin: -4px 0 6px;
    color: rgba(203, 213, 225, 0.82);
    font-size: 0.95rem;
  }

  .mobile-cover-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(128px, 42%);
    gap: clamp(12px, 3vw, 22px);
    align-items: stretch;
  }

  .mobile-cover-hero-zone {
    position: relative;
    display: grid;
    min-height: clamp(190px, 39vw, 250px);
    overflow: hidden;
    border: 1.5px dashed rgba(196, 92, 255, 0.82);
    border-radius: 14px;
    background: rgba(10, 15, 29, 0.7);
  }

  .mobile-cover-hero-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
  }

  .mobile-cover-preview,
  .mobile-upload-drop {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    min-height: inherit;
    padding: 18px;
    border-radius: 14px;
    color: #e9d5ff;
    text-align: center;
  }

  .mobile-cover-preview img,
  .mobile-review-cover img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
  }

  .mobile-cover-sample {
    min-height: clamp(190px, 39vw, 250px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: radial-gradient(circle at 62% 26%, #f97316 0 7%, transparent 8%), linear-gradient(145deg, #1e1b4b, #4c1d95 52%, #111827);
  }

  .mobile-card-title,
  .mobile-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  .mobile-card-title span {
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .mobile-selected-chips,
  .mobile-genre-options,
  .mobile-review-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .mobile-selected-chips button,
  .mobile-review-chips span {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(196, 92, 255, 0.65);
    border-radius: 14px;
    background: rgba(126, 34, 206, 0.24);
    color: #f0abfc;
    font-size: clamp(0.9rem, 3.2vw, 1rem);
    font-weight: 800;
  }

  .mobile-genre-options button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.48);
    color: #e5e7eb;
    font-size: clamp(0.9rem, 3.2vw, 1rem);
  }

  .mobile-tag-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(3, 7, 18, 0.72);
  }

  .mobile-tag-box input {
    flex: 1 1 120px;
    min-height: 38px;
    padding: 0 4px;
    border: 0;
    background: transparent;
  }

  .mobile-ai-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: clamp(18px, 4vw, 24px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.44);
  }

  .mobile-ai-card p,
  .mobile-ai-card small {
    color: rgba(226, 232, 240, 0.88);
    font-size: clamp(0.92rem, 3.2vw, 1rem);
    line-height: 1.45;
  }

  .mobile-ai-card small {
    grid-column: 1 / -1;
    padding: 14px;
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 12px;
    background: rgba(88, 28, 135, 0.16);
  }

  .mobile-toggle span {
    width: 64px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
  }

  .mobile-chapter-list {
    display: grid;
    gap: 14px;
  }

  .mobile-chapter-list article {
    display: grid;
    grid-template-columns: 28px 82px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.44);
  }

  .mobile-chapter-list article.is-uploading {
    align-items: start;
  }

  .mobile-chapter-list article.is-complete {
    grid-template-columns: 22px 58px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 8px 10px;
    transition: min-height 220ms ease, padding 220ms ease, gap 220ms ease;
  }

  .mobile-chapter-list article.is-complete .mobile-chapter-thumb {
    width: 58px;
    min-width: 58px;
  }

  .mobile-chapter-list i::before {
    content: "|||";
    color: rgba(226, 232, 240, 0.78);
    font-style: normal;
    letter-spacing: -2px;
  }

  .mobile-chapter-thumb {
    aspect-ratio: 1;
    border-radius: 10px;
    background: radial-gradient(circle at 70% 22%, #f97316 0 9%, transparent 10%), linear-gradient(145deg, #1e1b4b, #6d28d9 58%, #020617);
  }

  .mobile-chapter-thumb.second {
    background: radial-gradient(circle at 50% 18%, #c084fc 0 7%, transparent 8%), linear-gradient(145deg, #111827, #312e81 58%, #020617);
  }

  .mobile-chapter-list span,
  .mobile-chapter-list small {
    display: block;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.94rem;
  }

  .mobile-chapter-list strong {
    display: block;
    margin: 4px 0;
    color: #ffffff;
    font-size: clamp(1rem, 3.7vw, 1.12rem);
    line-height: 1.2;
  }

  .mobile-chapter-list button,
  .mobile-add-mini {
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #cbd5e1;
  }

  .mobile-chapter-progress {
    position: relative;
    display: grid;
    grid-template-columns: auto auto;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.68rem;
    font-weight: 800;
  }

  .mobile-chapter-progress::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.58);
  }

  .mobile-chapter-progress span {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #c45cff);
    box-shadow: 0 0 14px rgba(196, 92, 255, 0.75);
    animation: chapterProgressFill 1.55s ease-out forwards;
  }

  .mobile-chapter-list article.is-complete .mobile-chapter-progress {
    display: none;
  }

  .mobile-chapter-progress em {
    font-style: normal;
  }

  .mobile-chapter-progress em + em {
    justify-self: end;
  }

  @keyframes chapterProgressFill {
    from { width: 0; }
    to { width: 100%; }
  }

  .mobile-add-mini {
    grid-auto-flow: column;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(196, 92, 255, 0.38);
    border-radius: 14px;
    color: #c45cff;
    font-size: 0.92rem;
    font-weight: 850;
    white-space: nowrap;
    cursor: pointer;
  }

  .mobile-add-mini input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
  }

  .mobile-chapter-drop {
    min-height: 112px;
    border: 1.5px dashed rgba(196, 92, 255, 0.84);
    background: rgba(15, 23, 42, 0.38);
  }

  .mobile-empty-chapter-drop {
    position: relative;
    min-height: 148px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 9px;
    padding: 18px;
    border: 1.5px dashed rgba(196, 92, 255, 0.78);
    border-radius: 14px;
    background:
      radial-gradient(circle at 50% 18%, rgba(196, 92, 255, 0.2), transparent 42%),
      rgba(15, 23, 42, 0.4);
    color: #f5d0fe;
    text-align: center;
    cursor: pointer;
  }

  .mobile-empty-chapter-drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }

  .mobile-empty-chapter-drop span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(196, 92, 255, 0.5);
    border-radius: 50%;
    background: rgba(126, 34, 206, 0.26);
  }

  .mobile-empty-chapter-drop svg {
    width: 22px;
    height: 22px;
    color: #c45cff;
  }

  .mobile-empty-chapter-drop b {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
  }

  .mobile-empty-chapter-drop small {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.82rem;
  }

  .mobile-tip {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.9rem;
    text-align: center;
  }

  .mobile-review-body {
    display: grid;
    grid-template-columns: minmax(100px, 29%) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
  }

  .mobile-review-cover {
    aspect-ratio: 1;
    min-height: 0;
    border-radius: 10px;
    background: radial-gradient(circle at 68% 18%, #f97316 0 8%, transparent 9%), linear-gradient(145deg, #1e1b4b, #581c87 58%, #020617);
  }

  .mobile-review-body h4 {
    color: #ffffff;
    font-size: clamp(1.18rem, 4vw, 1.48rem);
    line-height: 1.15;
  }

  .mobile-review-body p {
    margin: 8px 0 14px;
    color: rgba(226, 232, 240, 0.9);
  }

  .mobile-review-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0;
  }

  .mobile-review-stats div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(226, 232, 240, 0.86);
    font-size: 0.9rem;
  }

  .mobile-upload-actions {
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: min(100% - 28px, 574px);
    display: grid;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: translateX(-50%);
  }

  .mobile-upload-primary,
  .mobile-upload-secondary {
    width: 100%;
    min-height: 66px;
    display: inline-grid;
    grid-auto-flow: column;
    place-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    font-size: clamp(1.05rem, 4vw, 1.28rem);
    font-weight: 900;
  }

  .mobile-upload-primary {
    border: 0;
    background: linear-gradient(135deg, #7c3aed, #8b3dff 55%, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.35);
  }

  .mobile-upload-primary svg {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 50%;
    background: #ffffff;
    color: #7c3aed;
  }

  .mobile-upload-secondary {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(3, 7, 18, 0.8);
    color: #ffffff;
  }
}

@media (max-width: 374px) {
  .mobile-upload-flow {
    padding-inline: 10px;
  }

  .mobile-upload-header {
    grid-template-columns: 42px minmax(0, 1fr) 78px;
    gap: 6px;
  }

  .mobile-upload-back {
    width: 42px;
    height: 42px;
  }

  .mobile-upload-draft {
    font-size: 0.72rem;
  }

  .mobile-upload-progress span {
    width: 48px;
    height: 48px;
  }

  .mobile-upload-progress::before {
    top: 23px;
  }

  .mobile-upload-hero {
    grid-template-columns: minmax(0, 1fr) 110px;
    min-height: 150px;
    padding: 18px;
  }

  .mobile-upload-hero img {
    width: 42%;
  }

  .mobile-cover-grid,
  .mobile-review-body {
    grid-template-columns: 1fr;
  }

  .mobile-cover-sample {
    min-height: 132px;
  }

  .mobile-chapter-list article {
    grid-template-columns: 22px 66px minmax(0, 1fr) 28px;
    gap: 10px;
    padding: 10px;
  }

  .mobile-card-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-review-stats {
    grid-template-columns: 1fr;
  }

  .mobile-upload-primary,
  .mobile-upload-secondary {
    min-height: 58px;
  }
}

/* Upload mobile vertical compression pass. */
@media (max-width: 767px) {
  .mobile-upload-flow {
    gap: clamp(8px, 2.4vw, 14px);
    padding: calc(10px + env(safe-area-inset-top)) clamp(10px, 3.2vw, 22px) calc(12px + env(safe-area-inset-bottom));
  }

  .mobile-upload-header {
    grid-template-columns: 42px minmax(0, 1fr) minmax(76px, auto);
    min-height: 42px;
  }

  .mobile-upload-header h1 {
    font-size: clamp(1rem, 3.8vw, 1.28rem);
  }

  .mobile-upload-back {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .mobile-upload-draft {
    min-height: 34px;
    font-size: clamp(0.7rem, 2.9vw, 0.86rem);
  }

  .mobile-upload-progress {
    height: 64px;
  }

  .mobile-upload-progress::before {
    top: 22px;
    height: 3px;
  }

  .mobile-upload-progress button {
    min-height: 62px;
    gap: 5px;
    font-size: clamp(0.7rem, 2.8vw, 0.9rem);
  }

  .mobile-upload-progress span {
    width: 46px;
    height: 46px;
    font-size: clamp(0.9rem, 3.4vw, 1.1rem);
    box-shadow: 0 0 0 4px #020611;
  }

  .mobile-upload-step {
    gap: clamp(10px, 2.4vw, 14px);
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .mobile-upload-hero {
    min-height: clamp(122px, 25vw, 168px);
    padding: clamp(14px, 3.5vw, 22px);
  }

  .mobile-upload-hero h2 {
    font-size: clamp(1.36rem, 5.8vw, 2.25rem);
    line-height: 1.08;
  }

  .mobile-upload-hero p {
    max-width: 24ch;
    margin-top: 8px;
    font-size: clamp(0.86rem, 3.1vw, 1.08rem);
    line-height: 1.34;
  }

  .mobile-upload-hero img {
    bottom: -10px;
    width: min(38%, 178px);
  }

  .mobile-upload-card {
    gap: clamp(10px, 2.4vw, 16px);
    padding: clamp(14px, 3.3vw, 22px);
    border-radius: 14px;
  }

  .mobile-field {
    gap: 6px;
  }

  .mobile-field > span,
  .mobile-cover-section h3,
  .mobile-card-title h3,
  .mobile-ai-card h3,
  .mobile-review-card > h3 {
    gap: 8px;
    font-size: clamp(0.86rem, 3vw, 1rem);
  }

  .mobile-field > span svg,
  .mobile-card-title svg,
  .mobile-review-card > h3 svg,
  .mobile-tip svg {
    width: 18px;
    height: 18px;
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    min-height: 48px;
    padding: 12px 48px 12px 14px;
    font-size: clamp(0.88rem, 3.1vw, 1rem);
  }

  .mobile-field textarea {
    min-height: 88px;
  }

  .mobile-field em {
    right: 14px;
    bottom: 12px;
    font-size: 0.74rem;
  }

  .mobile-auto-chip {
    font-size: 0.74rem;
  }

  .mobile-cover-section {
    gap: 7px;
    padding-top: 12px;
  }

  .mobile-cover-section p {
    margin: -2px 0 2px;
    font-size: 0.84rem;
  }

  .mobile-cover-hero-zone,
  .mobile-cover-sample {
    min-height: clamp(130px, 30vw, 190px);
  }

  .mobile-cover-preview,
  .mobile-upload-drop {
    gap: 5px;
    padding: 12px;
  }

  .mobile-cover-preview b,
  .mobile-upload-drop b {
    font-size: 0.86rem;
  }

  .mobile-cover-preview small,
  .mobile-upload-drop small {
    font-size: 0.72rem;
  }

  .mobile-chip-section {
    display: grid;
    gap: 9px;
  }

  .mobile-selected-chips,
  .mobile-genre-options,
  .mobile-review-chips {
    gap: 7px;
  }

  .mobile-selected-chips button,
  .mobile-review-chips span {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 11px;
    font-size: clamp(0.8rem, 2.9vw, 0.92rem);
  }

  .mobile-genre-options button {
    min-height: 34px;
    padding: 0 12px;
    font-size: clamp(0.8rem, 2.9vw, 0.92rem);
  }

  .mobile-tag-box {
    min-height: 48px;
    gap: 7px;
    padding: 7px;
  }

  .mobile-ai-card {
    gap: 9px;
    padding: clamp(12px, 3vw, 16px);
  }

  .mobile-ai-card p,
  .mobile-ai-card small {
    font-size: clamp(0.82rem, 2.9vw, 0.92rem);
    line-height: 1.3;
  }

  .mobile-ai-card small {
    padding: 10px;
  }

  .mobile-toggle span {
    width: 54px;
    height: 30px;
  }

  .mobile-chapter-list {
    gap: 9px;
  }

  .mobile-chapter-list article {
    grid-template-columns: 22px 66px minmax(0, 1fr) 28px;
    gap: 10px;
    padding: 10px;
  }

  .mobile-chapter-list span,
  .mobile-chapter-list small {
    font-size: 0.82rem;
  }

  .mobile-chapter-list strong {
    margin: 2px 0;
    font-size: clamp(0.92rem, 3.1vw, 1rem);
  }

  .mobile-add-mini {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 0.82rem;
  }

  .mobile-chapter-drop {
    min-height: 82px;
  }

  .mobile-tip {
    font-size: 0.78rem;
  }

  .mobile-review-body {
    gap: 11px;
    padding: 10px;
  }

  .mobile-review-body h4 {
    font-size: clamp(1rem, 3.4vw, 1.24rem);
  }

  .mobile-review-body p {
    margin: 5px 0 9px;
    font-size: 0.88rem;
  }

  .mobile-review-stats {
    gap: 6px 12px;
  }

  .mobile-review-stats div {
    font-size: 0.8rem;
  }

  .mobile-upload-actions {
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(100% - 20px, 560px);
  }

  .mobile-upload-primary,
  .mobile-upload-secondary {
    min-height: 54px;
    border-radius: 14px;
    font-size: clamp(0.96rem, 3.4vw, 1.12rem);
  }

  .mobile-upload-primary svg {
    width: 26px;
    height: 26px;
    padding: 5px;
  }
}

@media (max-width: 374px) {
  .mobile-upload-flow {
    padding-inline: 8px;
  }

  .mobile-upload-header {
    grid-template-columns: 38px minmax(0, 1fr) 70px;
  }

  .mobile-upload-back {
    width: 38px;
    height: 38px;
  }

  .mobile-upload-progress {
    height: 58px;
  }

  .mobile-upload-progress span {
    width: 42px;
    height: 42px;
  }

  .mobile-upload-progress::before {
    top: 20px;
  }

  .mobile-upload-hero {
    min-height: 112px;
    padding: 12px;
  }

  .mobile-upload-hero img {
    width: 34%;
  }

  .mobile-cover-sample {
    display: none;
  }

  .mobile-cover-grid {
    grid-template-columns: 1fr;
  }

  .mobile-cover-hero-zone {
    min-height: 116px;
  }

  .mobile-chapter-list article {
    grid-template-columns: 18px 54px minmax(0, 1fr) 24px;
    gap: 8px;
    padding: 8px;
  }

  .mobile-review-body {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .mobile-review-chips {
    display: none;
  }

  .mobile-upload-actions-publish {
    gap: 8px;
  }

  .mobile-upload-primary,
  .mobile-upload-secondary {
    min-height: 50px;
  }
}

/* Upload mobile second compression pass: reduce scroll depth on 320-630px screens. */
@media (max-width: 767px) {
  .mobile-upload-flow {
    gap: 7px;
    padding-top: calc(8px + env(safe-area-inset-top));
  }

  .mobile-upload-header {
    min-height: 38px;
  }

  .mobile-upload-back {
    width: 38px;
    height: 38px;
  }

  .mobile-upload-progress {
    height: 54px;
  }

  .mobile-upload-progress::before {
    top: 18px;
  }

  .mobile-upload-progress button {
    min-height: 54px;
    gap: 4px;
  }

  .mobile-upload-progress span {
    width: 38px;
    height: 38px;
    box-shadow: 0 0 0 3px #020611;
  }

  .mobile-upload-step {
    gap: 9px;
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  .mobile-upload-hero {
    min-height: clamp(96px, 18vw, 136px);
    padding: clamp(11px, 2.8vw, 18px);
  }

  .mobile-upload-hero h2 {
    max-width: 13ch;
    font-size: clamp(1.2rem, 4.8vw, 1.82rem);
  }

  .mobile-upload-hero p {
    margin-top: 5px;
    font-size: clamp(0.78rem, 2.7vw, 0.96rem);
    line-height: 1.24;
  }

  .mobile-upload-hero img {
    width: min(32%, 144px);
  }

  .mobile-upload-card {
    gap: 9px;
    padding: clamp(11px, 2.8vw, 17px);
  }

  .mobile-field input,
  .mobile-field textarea,
  .mobile-field select,
  .mobile-tag-box input {
    min-height: 43px;
    padding-block: 9px;
  }

  .mobile-field textarea {
    min-height: 72px;
  }

  .mobile-cover-section {
    padding-top: 8px;
  }

  .mobile-cover-hero-zone,
  .mobile-cover-sample {
    min-height: clamp(104px, 22vw, 150px);
  }

  .mobile-genre-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .mobile-genre-options::-webkit-scrollbar {
    display: none;
  }

  .mobile-genre-options button {
    flex: 0 0 auto;
  }

  .mobile-selected-chips button,
  .mobile-review-chips span,
  .mobile-genre-options button {
    min-height: 30px;
    padding-inline: 10px;
  }

  .mobile-card-title span {
    font-size: 0.78rem;
  }

  .mobile-tag-box {
    min-height: 42px;
  }

  .mobile-ai-card {
    padding: 10px;
  }

  .mobile-ai-card small {
    padding: 8px;
  }

  .mobile-chapter-list article {
    grid-template-columns: 18px 56px minmax(0, 1fr) 24px;
    gap: 8px;
    padding: 8px;
  }

  .mobile-chapter-list article.is-complete {
    grid-template-columns: 18px 52px minmax(0, 1fr) 24px;
    min-height: 68px;
    padding: 7px 8px;
  }

  .mobile-chapter-list article.is-complete .mobile-chapter-thumb {
    width: 52px;
    min-width: 52px;
  }

  .mobile-chapter-progress {
    margin-top: 5px;
    padding-top: 7px;
  }

  .mobile-chapter-list span,
  .mobile-chapter-list small {
    font-size: 0.76rem;
  }

  .mobile-chapter-list strong {
    font-size: 0.9rem;
  }

  .mobile-chapter-drop {
    min-height: 64px;
  }

  .mobile-tip {
    display: none;
  }

  .mobile-review-body {
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 8px;
  }

  .mobile-review-body h4 {
    font-size: clamp(0.94rem, 3vw, 1.12rem);
  }

  .mobile-review-body p {
    margin: 3px 0 6px;
  }

  .mobile-review-stats div {
    font-size: 0.74rem;
  }

  .mobile-upload-primary {
    min-height: 48px;
  }

  .mobile-upload-secondary {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .mobile-upload-actions-publish {
    gap: 7px;
  }
}

@media (min-width: 375px) and (max-width: 767px) {
  .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 32%);
  }

  .mobile-review-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 374px) {
  .mobile-upload-hero {
    min-height: 92px;
  }

  .mobile-upload-hero p {
    max-width: 20ch;
  }

  .mobile-selected-chips,
  .mobile-tag-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-selected-chips::-webkit-scrollbar,
  .mobile-tag-chips::-webkit-scrollbar {
    display: none;
  }

  .mobile-selected-chips button,
  .mobile-tag-chips button {
    flex: 0 0 auto;
  }

  .mobile-review-body {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .mobile-review-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Upload mobile final fit pass. */
@media (max-width: 767px) {
  .mobile-cover-hero-zone,
  .mobile-cover-sample {
    min-height: clamp(88px, 18vw, 118px);
  }

  .mobile-upload-hero-publish,
  .mobile-upload-hero-identity {
    min-height: clamp(88px, 16vw, 118px);
  }

  .mobile-upload-hero-publish h2,
  .mobile-upload-hero-identity h2 {
    font-size: clamp(1.12rem, 4.2vw, 1.56rem);
  }

  .mobile-upload-hero-publish p,
  .mobile-upload-hero-identity p {
    font-size: clamp(0.74rem, 2.4vw, 0.88rem);
  }

  .mobile-chapter-list article {
    grid-template-columns: 16px 48px minmax(0, 1fr) 22px;
    padding: 7px;
  }

  .mobile-chapter-drop {
    min-height: 64px;
    grid-template-columns: 34px minmax(0, auto);
    justify-content: center;
    text-align: left;
    border-style: dashed;
    border-radius: 12px;
  }

  .mobile-empty-chapter-drop {
    min-height: 112px;
    gap: 6px;
    padding: 14px;
  }

  .mobile-empty-chapter-drop span {
    width: 34px;
    height: 34px;
  }

  .mobile-empty-chapter-drop b {
    font-size: 0.92rem;
  }

  .mobile-empty-chapter-drop small {
    font-size: 0.74rem;
  }

  .mobile-chapter-drop svg {
    width: 24px;
    height: 24px;
  }

  .mobile-chapter-drop b,
  .mobile-chapter-drop small {
    justify-self: start;
  }

  .mobile-chapter-card,
  .mobile-review-card {
    gap: 7px;
  }

  .mobile-review-body {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
  }

  .mobile-review-stats {
    gap: 4px 8px;
  }

  .mobile-upload-actions-publish {
    gap: 5px;
  }

  .mobile-upload-actions-publish .mobile-upload-primary {
    min-height: 44px;
  }

  .mobile-upload-actions-publish .mobile-upload-secondary {
    min-height: 36px;
  }
}

@media (min-width: 500px) and (max-width: 767px) {
  .mobile-cover-sample {
    display: none;
  }

  .mobile-cover-grid {
    grid-template-columns: 1fr;
  }

  .mobile-review-chips {
    display: none;
  }
}

@media (max-width: 767px) {
  .mobile-upload-step {
    padding-bottom: calc(54px + env(safe-area-inset-bottom));
  }

  .mobile-upload-actions {
    bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .mobile-upload-hero-identity,
  .mobile-upload-hero-publish {
    min-height: 80px;
  }

  .mobile-upload-hero img {
    width: min(28%, 126px);
  }

  .mobile-cover-hero-zone,
  .mobile-cover-sample {
    min-height: 78px;
  }

  .mobile-upload-card {
    gap: 7px;
  }

  .mobile-upload-actions-publish .mobile-upload-primary {
    min-height: 50px;
    font-size: clamp(0.98rem, 3.4vw, 1.12rem);
  }

  .mobile-upload-actions-publish .mobile-upload-primary svg {
    width: 30px;
    height: 30px;
    padding: 4px;
  }

}

@media (min-width: 500px) and (max-width: 767px) {
  .mobile-cover-hero-zone {
    min-height: 70px;
  }

  .mobile-review-body {
    grid-template-columns: 60px minmax(0, 1fr);
  }
}

@media (min-width: 500px) and (max-width: 767px) {
  .mobile-upload-hero-identity {
    min-height: 62px;
  }

  .mobile-upload-step {
    padding-bottom: calc(46px + env(safe-area-inset-bottom));
  }
}

/* Upload route must remain scrollable on short mobile viewports. */
@media (max-width: 767px) {
  html:has(body[data-active-route="upload"]),
  body[data-active-route="upload"] {
    min-height: 100%;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
  }

  body[data-active-route="upload"] .mobile-upload-flow,
  body[data-active-route="upload"] .mobile-upload-form,
  body[data-active-route="upload"] .mobile-upload-step {
    overflow-y: visible !important;
    max-height: none !important;
  }

  body[data-active-route="upload"] .mobile-upload-flow {
    height: 100svh !important;
    min-height: 100svh;
    grid-template-rows: auto auto max-content !important;
    align-content: start;
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    scrollbar-width: none;
  }

  body[data-active-route="upload"] .mobile-upload-flow::-webkit-scrollbar {
    display: none;
    width: 0;
  }

  body[data-active-route="upload"] .mobile-upload-flow::-webkit-scrollbar-thumb {
    background: transparent;
  }
}

/* Keep enough real scroll range below fixed upload actions. */
@media (max-width: 767px) {
  body[data-active-route="upload"] .mobile-upload-step {
    padding-bottom: calc(156px + env(safe-area-inset-bottom)) !important;
  }

  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="3"] {
    padding-bottom: calc(172px + env(safe-area-inset-bottom)) !important;
  }

  body[data-active-route="upload"] .mobile-upload-form,
  body[data-active-route="upload"] .mobile-upload-step {
    height: auto !important;
  }

  body[data-active-route="upload"] .mobile-upload-step::after {
    content: "";
    display: block;
    height: 96px;
  }

  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="3"]::after {
    height: 116px;
  }
}

/* Reference-style publish review summary. */
@media (max-width: 767px) {
  .mobile-review-card {
    gap: 12px;
  }

  .mobile-review-card > h3 {
    color: #ffffff;
    font-size: clamp(1rem, 3.7vw, 1.18rem);
  }

  .mobile-review-card > h3 svg {
    width: 24px;
    height: 24px;
    color: #c084fc;
  }

  .mobile-review-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(156px, 0.88fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(3, 7, 18, 0.34);
  }

  .mobile-review-body {
    display: grid;
    grid-template-columns: clamp(86px, 28vw, 136px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-review-cover {
    width: 100%;
    aspect-ratio: 1;
    min-height: 0;
    border-radius: 8px;
    overflow: hidden;
  }

  .mobile-review-copy {
    min-width: 0;
  }

  .mobile-review-body h4 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1rem, 4vw, 1.38rem);
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .mobile-review-body p {
    margin: 8px 0 12px;
    color: rgba(226, 232, 240, 0.9);
    font-size: clamp(0.82rem, 3.1vw, 1rem);
    line-height: 1.25;
  }

  .mobile-review-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mobile-review-chips span {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: clamp(0.68rem, 2.6vw, 0.82rem);
  }

  .mobile-review-stats {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding-left: 14px;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
  }

  .mobile-review-stats div,
  .mobile-review-stats div:nth-child(n + 3) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: rgba(226, 232, 240, 0.9);
    font-size: clamp(0.78rem, 3vw, 0.96rem);
  }

  .mobile-review-stats dt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: rgba(226, 232, 240, 0.92);
  }

  .mobile-review-stats dt svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: #d8b4fe;
  }

  .mobile-review-stats dt span,
  .mobile-review-stats dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .mobile-review-stats dd {
    margin: 0;
    color: #f8fafc;
    text-align: right;
    white-space: nowrap;
  }

  .mobile-status-dot,
  .mobile-ready-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    flex: 0 0 auto;
    border-radius: 50%;
  }

  .mobile-status-dot {
    background: #facc15;
  }

  .mobile-ready-dot {
    margin-right: 6px;
    background: #66e36f;
    box-shadow: 0 0 10px rgba(102, 227, 111, 0.55);
  }
}

@media (max-width: 430px) {
  .mobile-review-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mobile-review-stats {
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }
}

@media (max-width: 374px) {
  .mobile-review-panel {
    padding: 10px;
  }

  .mobile-review-body {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .mobile-review-chips span {
    min-height: 24px;
    padding: 0 8px;
  }

  .mobile-review-stats {
    gap: 7px;
  }
}

/* Keep upload hero text and mascot from colliding on every mobile width. */
@media (max-width: 767px) {
  body[data-active-route="upload"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-hero-identity,
  body[data-active-route="upload"] .mobile-upload-hero-details,
  body[data-active-route="upload"] .mobile-upload-hero-publish {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(82px, 28vw, 136px);
    align-items: center;
    gap: clamp(8px, 2.8vw, 18px);
    min-height: clamp(118px, 31vw, 152px) !important;
    padding: clamp(16px, 4.3vw, 28px) clamp(14px, 4vw, 26px) !important;
    overflow: hidden;
  }

  body[data-active-route="upload"] .mobile-upload-hero > div {
    position: relative;
    z-index: 1;
    min-width: 0;
    max-width: 100%;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2,
  body[data-active-route="upload"] .mobile-upload-hero-identity h2,
  body[data-active-route="upload"] .mobile-upload-hero-details h2,
  body[data-active-route="upload"] .mobile-upload-hero-publish h2 {
    max-width: none;
    margin: 0;
    font-size: clamp(1.32rem, 6.35vw, 2.14rem) !important;
    line-height: 1.12;
    letter-spacing: 0;
    text-wrap: balance;
  }

  body[data-active-route="upload"] .mobile-hero-line {
    display: block;
    white-space: nowrap;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2 i {
    color: #c45cff;
    font-style: normal;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2 span,
  body[data-active-route="upload"] .mobile-upload-hero h2 i {
    font-size: inherit;
  }

  body[data-active-route="upload"] .mobile-upload-hero p,
  body[data-active-route="upload"] .mobile-upload-hero-identity p,
  body[data-active-route="upload"] .mobile-upload-hero-details p,
  body[data-active-route="upload"] .mobile-upload-hero-publish p {
    display: block !important;
    max-width: 24ch;
    margin: clamp(7px, 2vw, 12px) 0 0;
    font-size: clamp(0.8rem, 3.2vw, 1.04rem) !important;
    line-height: 1.42;
  }

  body[data-active-route="upload"] .mobile-upload-hero img,
  body[data-active-route="upload"] .mobile-upload-hero-details img,
  body[data-active-route="upload"] .mobile-upload-hero-publish img {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 0;
    align-self: end;
    justify-self: end;
    width: 100% !important;
    max-width: clamp(82px, 28vw, 136px);
    max-height: clamp(98px, 30vw, 148px);
    object-fit: contain;
    transform: none !important;
    pointer-events: none;
  }
}

@media (max-width: 359px) {
  body[data-active-route="upload"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-hero-identity,
  body[data-active-route="upload"] .mobile-upload-hero-details,
  body[data-active-route="upload"] .mobile-upload-hero-publish {
    grid-template-columns: minmax(0, 1fr) 78px;
    min-height: 112px !important;
    padding: 14px 12px !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2,
  body[data-active-route="upload"] .mobile-upload-hero-identity h2,
  body[data-active-route="upload"] .mobile-upload-hero-details h2,
  body[data-active-route="upload"] .mobile-upload-hero-publish h2 {
    font-size: clamp(1.18rem, 6vw, 1.34rem) !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero p,
  body[data-active-route="upload"] .mobile-upload-hero-identity p,
  body[data-active-route="upload"] .mobile-upload-hero-details p,
  body[data-active-route="upload"] .mobile-upload-hero-publish p {
    max-width: 22ch;
    font-size: 0.76rem !important;
    line-height: 1.35;
  }

  body[data-active-route="upload"] .mobile-upload-hero img,
  body[data-active-route="upload"] .mobile-upload-hero-details img,
  body[data-active-route="upload"] .mobile-upload-hero-publish img {
    max-width: 78px;
    max-height: 102px;
  }
}

/* Final upload hero sizing: content must fit before the mascot is clipped. */
@media (max-width: 767px) {
  body[data-active-route="upload"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-hero-identity,
  body[data-active-route="upload"] .mobile-upload-hero-details,
  body[data-active-route="upload"] .mobile-upload-hero-publish {
    height: auto !important;
    min-height: clamp(136px, 32vw, 188px) !important;
    grid-template-columns: minmax(0, 1fr) clamp(92px, 31vw, 158px);
    padding: clamp(17px, 4.2vw, 26px) clamp(13px, 4vw, 24px) !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2,
  body[data-active-route="upload"] .mobile-upload-hero-identity h2,
  body[data-active-route="upload"] .mobile-upload-hero-details h2,
  body[data-active-route="upload"] .mobile-upload-hero-publish h2 {
    font-size: clamp(1.22rem, 5.6vw, 1.72rem) !important;
    line-height: 1.12;
  }

  body[data-active-route="upload"] .mobile-upload-hero p,
  body[data-active-route="upload"] .mobile-upload-hero-identity p,
  body[data-active-route="upload"] .mobile-upload-hero-details p,
  body[data-active-route="upload"] .mobile-upload-hero-publish p {
    max-width: clamp(20ch, 43vw, 29ch);
    font-size: clamp(0.78rem, 2.95vw, 0.98rem) !important;
    line-height: 1.42;
  }

  body[data-active-route="upload"] .mobile-upload-hero img,
  body[data-active-route="upload"] .mobile-upload-hero-details img,
  body[data-active-route="upload"] .mobile-upload-hero-publish img {
    max-width: clamp(92px, 31vw, 158px);
    max-height: clamp(112px, 33vw, 172px);
  }
}

@media (max-width: 359px) {
  body[data-active-route="upload"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-hero-identity,
  body[data-active-route="upload"] .mobile-upload-hero-details,
  body[data-active-route="upload"] .mobile-upload-hero-publish {
    grid-template-columns: minmax(0, 1fr) 90px;
    min-height: 136px !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero img,
  body[data-active-route="upload"] .mobile-upload-hero-details img,
  body[data-active-route="upload"] .mobile-upload-hero-publish img {
    max-width: 90px;
    max-height: 118px;
  }
}

/* Ultra-narrow phones: stack widgets instead of hiding content in sideways strips. */
@media (max-width: 280px) {
  body[data-active-route="upload"] .mobile-upload-flow {
    padding-inline: 8px !important;
  }

  body[data-active-route="upload"] .mobile-upload-header {
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    gap: 6px;
    margin-bottom: 14px;
  }

  body[data-active-route="upload"] .mobile-upload-back {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  body[data-active-route="upload"] .mobile-upload-draft {
    width: 28px;
    min-height: 38px;
    padding: 0;
    justify-content: center;
  }

  body[data-active-route="upload"] .mobile-upload-draft span {
    display: none;
  }

  body[data-active-route="upload"] .mobile-upload-progress {
    margin-bottom: 12px;
  }

  body[data-active-route="upload"] .mobile-upload-progress button {
    min-height: 58px;
    gap: 5px;
    font-size: 0.72rem;
  }

  body[data-active-route="upload"] .mobile-upload-progress span {
    width: 38px;
    height: 38px;
    font-size: 0.88rem;
  }

  body[data-active-route="upload"] .mobile-upload-progress::before {
    top: 19px;
  }

  body[data-active-route="upload"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-hero-identity,
  body[data-active-route="upload"] .mobile-upload-hero-details,
  body[data-active-route="upload"] .mobile-upload-hero-publish {
    grid-template-columns: minmax(0, 1fr) 72px;
    min-height: 144px !important;
    gap: 6px;
    padding: 12px !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2,
  body[data-active-route="upload"] .mobile-upload-hero-identity h2,
  body[data-active-route="upload"] .mobile-upload-hero-details h2,
  body[data-active-route="upload"] .mobile-upload-hero-publish h2 {
    font-size: 1.02rem !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero p,
  body[data-active-route="upload"] .mobile-upload-hero-identity p,
  body[data-active-route="upload"] .mobile-upload-hero-details p,
  body[data-active-route="upload"] .mobile-upload-hero-publish p {
    max-width: 18ch;
    font-size: 0.68rem !important;
    line-height: 1.3;
  }

  body[data-active-route="upload"] .mobile-upload-hero img,
  body[data-active-route="upload"] .mobile-upload-hero-details img,
  body[data-active-route="upload"] .mobile-upload-hero-publish img {
    max-width: 72px;
    max-height: 96px;
  }

  body[data-active-route="upload"] .mobile-upload-card {
    gap: 10px;
    padding: 10px !important;
    border-radius: 14px;
  }

  body[data-active-route="upload"] .mobile-card-title {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 3px;
  }

  body[data-active-route="upload"] .mobile-card-title h3,
  body[data-active-route="upload"] .mobile-ai-card h3 {
    font-size: 0.92rem;
    line-height: 1.15;
  }

  body[data-active-route="upload"] .mobile-card-title span {
    font-size: 0.68rem;
  }

  body[data-active-route="upload"] .mobile-selected-chips,
  body[data-active-route="upload"] .mobile-tag-chips,
  body[data-active-route="upload"] .mobile-genre-options {
    flex-wrap: wrap !important;
    overflow: visible !important;
    gap: 6px;
    padding-bottom: 0;
  }

  body[data-active-route="upload"] .mobile-selected-chips button,
  body[data-active-route="upload"] .mobile-tag-chips button,
  body[data-active-route="upload"] .mobile-genre-options button {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0;
    min-height: 30px;
    padding-inline: 7px;
    font-size: 0.76rem;
    line-height: 1.1;
    white-space: normal;
  }

  body[data-active-route="upload"] .mobile-tag-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    min-height: 0;
    padding: 7px;
    border-radius: 12px;
  }

  body[data-active-route="upload"] .mobile-tag-box input {
    width: 100%;
    min-height: 34px;
    padding-inline: 4px;
    font-size: 0.82rem;
  }

  body[data-active-route="upload"] .mobile-ai-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
  }

  body[data-active-route="upload"] .mobile-ai-card p,
  body[data-active-route="upload"] .mobile-ai-card small {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  body[data-active-route="upload"] .mobile-toggle {
    justify-self: start;
  }

  body[data-active-route="upload"] .mobile-toggle span {
    width: 48px;
    height: 28px;
  }

  body[data-active-route="upload"] .mobile-toggle span::after {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 340px) {
  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="2"] .mobile-upload-hero {
    min-height: 150px !important;
  }

  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="2"] .mobile-genre-options {
    flex-wrap: wrap !important;
    overflow: visible !important;
    padding-bottom: 0;
  }

  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="2"] .mobile-tag-chips {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }

  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="2"] .mobile-genre-options button {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0;
    white-space: normal;
  }

  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="2"] .mobile-tag-chips button {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0;
  }
}

/* Tablet/desktop upload workspace: all steps visible on one creator page. */
@media (min-width: 768px) {
  body[data-active-route="upload"] {
    --upload-shell-gap: clamp(14px, 1.4vw, 22px);
    background:
      radial-gradient(circle at 48% -6%, rgba(124, 58, 237, 0.26), transparent 30%),
      radial-gradient(circle at 92% 16%, rgba(96, 165, 250, 0.12), transparent 26%),
      #050816;
  }

  body[data-active-route="upload"] .mobile-upload-page,
  body[data-active-route="upload"] .mobile-upload-flow {
    display: none !important;
  }

  body[data-active-route="upload"] .app-shell.upload-page-shell {
    width: 100%;
    min-height: 100vh;
    padding: 22px var(--upload-shell-gap) 56px var(--upload-shell-gap);
  }

  body[data-active-route="upload"] .upload-workspace {
    width: min(100%, 1420px);
    margin-inline: auto;
  }

  body[data-active-route="upload"] .upload-page-head {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: start;
    gap: var(--upload-shell-gap);
    margin-bottom: 16px;
  }

  body[data-active-route="upload"] .upload-page-head h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.5rem, 2.2vw, 2.05rem);
    line-height: 1.04;
    letter-spacing: 0;
    white-space: nowrap;
  }

  body[data-active-route="upload"] .upload-page-head p {
    max-width: 58ch;
    margin: 6px 0 0;
    color: rgba(226, 232, 240, 0.86);
    font-size: clamp(0.82rem, 1vw, 0.96rem);
    line-height: 1.35;
  }

  body[data-active-route="upload"] .upload-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  body[data-active-route="upload"] .upload-drafts-button,
  body[data-active-route="upload"] .upload-save-draft {
    min-height: 40px;
    padding-inline: 14px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  body[data-active-route="upload"] .upload-head-publish {
    width: auto;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  body[data-active-route="upload"] .upload-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--upload-shell-gap);
    align-items: start;
  }

  body[data-active-route="upload"] .upload-designer-form {
    display: grid;
    gap: var(--upload-shell-gap);
  }

  body[data-active-route="upload"] .upload-card,
  body[data-active-route="upload"] .upload-summary-card {
    border-radius: 14px;
    border-color: rgba(148, 163, 184, 0.14);
    background:
      radial-gradient(circle at 88% 0%, rgba(139, 92, 246, 0.12), transparent 38%),
      linear-gradient(180deg, rgba(10, 14, 25, 0.9), rgba(6, 10, 20, 0.88));
    box-shadow:
      0 18px 54px rgba(0, 0, 0, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.045);
  }

  body[data-active-route="upload"] .upload-card {
    padding: clamp(14px, 1.35vw, 20px);
  }

  body[data-active-route="upload"] .upload-card-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  body[data-active-route="upload"] .upload-card-head h2,
  body[data-active-route="upload"] .upload-summary-card h2 {
    font-size: clamp(1rem, 1.15vw, 1.16rem);
  }

  body[data-active-route="upload"] .upload-card-head p {
    margin-top: 4px;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  body[data-active-route="upload"] .upload-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  body[data-active-route="upload"] .upload-mascot-banner {
    top: -34px;
    right: clamp(12px, 8vw, 104px);
    width: clamp(180px, 24vw, 260px);
    height: 118px;
  }

  body[data-active-route="upload"] .upload-mascot-banner img {
    width: clamp(140px, 18vw, 204px);
    height: 132px;
    margin-left: clamp(34px, 5vw, 58px);
  }

  body[data-active-route="upload"] .upload-identity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body[data-active-route="upload"] .upload-identity-left,
  body[data-active-route="upload"] .upload-identity-right,
  body[data-active-route="upload"] .upload-details-grid {
    display: grid;
    gap: 12px;
  }

  body[data-active-route="upload"] .upload-form-grid,
  body[data-active-route="upload"] .upload-details-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-active-route="upload"] .upload-field {
    margin: 0;
  }

  body[data-active-route="upload"] .upload-field > span,
  body[data-active-route="upload"] .upload-cover-label span,
  body[data-active-route="upload"] .upload-ai-title span {
    font-size: 0.78rem;
  }

  body[data-active-route="upload"] .upload-field input,
  body[data-active-route="upload"] .upload-field textarea,
  body[data-active-route="upload"] .upload-select {
    min-height: 40px;
    padding-inline: 12px;
    border-radius: 9px;
    font-size: 0.86rem;
  }

  body[data-active-route="upload"] .upload-field textarea {
    min-height: 112px;
    padding-top: 11px;
  }

  body[data-active-route="upload"] .upload-field em {
    right: 12px;
    bottom: 11px;
    font-size: 0.72rem;
  }

  body[data-active-route="upload"] .upload-field .upload-input-check {
    bottom: 28px;
    width: 18px;
    height: 18px;
    font-size: 0.54rem;
  }

  body[data-active-route="upload"] .upload-cover-label {
    margin-bottom: 8px;
  }

  body[data-active-route="upload"] .upload-cover-drop {
    min-height: 94px;
    gap: 5px;
    padding: 14px;
    border-radius: 12px;
  }

  body[data-active-route="upload"] .upload-cover-preview-inline {
    min-height: 88px;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
  }

  body[data-active-route="upload"] .upload-cover-preview-inline .upload-summary-art {
    width: 112px;
    height: 72px;
    border-radius: 10px;
  }

  body[data-active-route="upload"] .upload-tags {
    min-height: 42px;
    gap: 7px;
    margin-top: 6px;
    padding: 6px;
    border-radius: 11px;
  }

  body[data-active-route="upload"] .upload-tags span {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  body[data-active-route="upload"] .upload-tag-add {
    min-height: 30px;
    padding-inline: 11px;
    border-radius: 10px;
    font-size: 0.78rem;
  }

  body[data-active-route="upload"] .upload-ai-field {
    gap: 8px;
    padding: 11px;
    border-radius: 12px;
  }

  body[data-active-route="upload"] .upload-ai-field p,
  body[data-active-route="upload"] .upload-toggle strong {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  body[data-active-route="upload"] .upload-toggle span {
    width: 42px;
    height: 24px;
  }

  body[data-active-route="upload"] .upload-toggle span::after {
    width: 16px;
    height: 16px;
  }

  body[data-active-route="upload"] .upload-chapter-list {
    border-radius: 12px;
  }

  body[data-active-route="upload"] .upload-chapter-row {
    grid-template-columns: 18px 36px 62px minmax(0, 1fr) auto auto;
    min-height: 62px;
    gap: 10px;
    padding: 8px 10px;
  }

  body[data-active-route="upload"] .upload-chapter-thumb {
    width: 62px;
    height: 40px;
    border-radius: 8px;
  }

  body[data-active-route="upload"] .upload-page-pill {
    padding: 6px 8px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  body[data-active-route="upload"] .upload-chapter-row button {
    width: 32px;
    height: 32px;
  }

  body[data-active-route="upload"] .upload-chapter-drop {
    min-height: 58px;
  }

  body[data-active-route="upload"] .upload-side-column {
    position: static;
    width: 100%;
  }

  body[data-active-route="upload"] .upload-summary-card {
    display: grid;
    gap: 12px;
    padding: clamp(14px, 1.35vw, 18px);
  }

  body[data-active-route="upload"] .upload-summary-cover {
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  body[data-active-route="upload"] .upload-summary-card > .upload-summary-cover .upload-summary-art {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 11;
    border-radius: 12px;
  }

  body[data-active-route="upload"] .upload-summary-card h3 {
    margin: 0;
    font-size: clamp(1.12rem, 1.6vw, 1.4rem);
    line-height: 1.15;
  }

  body[data-active-route="upload"] .upload-summary-creator {
    margin: -6px 0 0;
    font-size: 0.86rem;
  }

  body[data-active-route="upload"] .upload-summary-list {
    gap: 9px;
    padding-top: 8px;
  }

  body[data-active-route="upload"] .upload-summary-list div {
    font-size: 0.86rem;
  }

  body[data-active-route="upload"] .upload-next-button,
  body[data-active-route="upload"] .upload-save-draft {
    min-height: 44px;
    margin-top: 0;
    border-radius: 10px;
    font-size: 0.9rem;
  }
}

@media (min-width: 1024px) {
  body[data-active-route="upload"] {
    --sidebar: 238px;
  }

  body[data-active-route="upload"] .app-shell.upload-page-shell {
    padding-left: calc(var(--sidebar) + var(--upload-shell-gap));
  }

  body[data-active-route="upload"] .topbar,
  body[data-active-route="upload"] .logo {
    width: var(--sidebar);
  }

  body[data-active-route="upload"] .sidebar {
    width: var(--sidebar);
  }
}

@media (min-width: 980px) {
  body[data-active-route="upload"] .upload-identity-grid,
  body[data-active-route="upload"] .upload-details-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.95fr);
  }
}

@media (min-width: 768px) and (max-width: 979px) {
  body[data-active-route="upload"] .upload-identity-card .upload-card-head {
    padding-right: 134px;
  }

  body[data-active-route="upload"] .upload-mascot-banner {
    top: -22px;
    right: 14px;
    width: 132px;
    height: 96px;
  }

  body[data-active-route="upload"] .upload-mascot-banner span {
    inset: 28px 0 4px;
  }

  body[data-active-route="upload"] .upload-mascot-banner img {
    width: 104px;
    height: 104px;
    margin-left: 24px;
  }
}

/* Wide upload uses the same current mobile template, shown as one continuous page. */
@media (min-width: 768px) {
  body[data-active-route="upload"] .app-shell.upload-page-shell.mobile-upload-page {
    display: block !important;
    width: 100%;
    min-height: 100vh;
    padding: 22px clamp(16px, 2vw, 28px) 64px clamp(16px, 2vw, 28px);
  }

  body[data-active-route="upload"] .mobile-upload-page,
  body[data-active-route="upload"] .mobile-upload-flow {
    display: block !important;
  }

  body[data-active-route="upload"] .mobile-upload-flow {
    width: min(100%, 1180px);
    min-height: auto !important;
    height: auto !important;
    margin-inline: auto;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent;
  }

  body[data-active-route="upload"] .mobile-upload-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
  }

  body[data-active-route="upload"] .mobile-upload-header {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    max-width: none;
    margin-bottom: 18px;
  }

  body[data-active-route="upload"] .mobile-upload-header h1 {
    font-size: clamp(1.65rem, 2.2vw, 2.1rem);
  }

  body[data-active-route="upload"] .mobile-upload-progress {
    max-width: min(760px, 72vw);
    margin: 0 auto 18px;
  }

  body[data-active-route="upload"] .mobile-upload-progress {
    display: none !important;
  }

  body[data-active-route="upload"] .mobile-upload-progress button {
    cursor: pointer;
  }

  body[data-active-route="upload"] .mobile-upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  body[data-active-route="upload"] .mobile-upload-step,
  body[data-active-route="upload"] .mobile-upload-step[hidden] {
    display: grid !important;
    gap: 14px;
    height: auto !important;
    max-height: none !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  body[data-active-route="upload"] .mobile-upload-step::after {
    display: none !important;
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Identity"] .mobile-upload-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Identity"] .mobile-field-area,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Identity"] .mobile-cover-section {
    grid-column: span 1;
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Details"] .mobile-upload-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Details"] .mobile-select-field,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Details"] .mobile-ai-card {
    align-self: stretch;
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Publish"] {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    align-items: start;
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Publish"] .mobile-upload-hero {
    grid-column: 1 / -1;
  }

  body[data-active-route="upload"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-hero-identity,
  body[data-active-route="upload"] .mobile-upload-hero-details,
  body[data-active-route="upload"] .mobile-upload-hero-publish {
    min-height: clamp(126px, 15vw, 168px) !important;
    grid-template-columns: minmax(0, 1fr) clamp(112px, 17vw, 178px);
    padding: clamp(18px, 2.2vw, 28px) !important;
    border-radius: 18px;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2,
  body[data-active-route="upload"] .mobile-upload-hero-identity h2,
  body[data-active-route="upload"] .mobile-upload-hero-details h2,
  body[data-active-route="upload"] .mobile-upload-hero-publish h2 {
    font-size: clamp(1.35rem, 2.7vw, 2.35rem) !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero img,
  body[data-active-route="upload"] .mobile-upload-hero-details img,
  body[data-active-route="upload"] .mobile-upload-hero-publish img {
    max-width: clamp(112px, 17vw, 178px);
    max-height: clamp(126px, 17vw, 184px);
  }

  body[data-active-route="upload"] .mobile-upload-card {
    border-radius: 16px;
    padding: clamp(16px, 1.8vw, 22px);
  }

  body[data-active-route="upload"] .mobile-field input,
  body[data-active-route="upload"] .mobile-field textarea,
  body[data-active-route="upload"] .mobile-field select {
    min-height: 48px;
  }

  body[data-active-route="upload"] .mobile-field textarea {
    min-height: 118px;
  }

  body[data-active-route="upload"] .mobile-cover-grid {
    grid-template-columns: minmax(0, 1fr) minmax(128px, 34%);
  }

  body[data-active-route="upload"] .mobile-cover-hero-zone,
  body[data-active-route="upload"] .mobile-cover-sample {
    min-height: 148px;
  }

  body[data-active-route="upload"] .mobile-upload-actions {
    position: static;
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="1"] > .mobile-upload-actions,
  body[data-active-route="upload"] .mobile-upload-step[data-upload-step="2"] > .mobile-upload-actions {
    display: none;
  }

  body[data-active-route="upload"] .mobile-upload-actions-publish {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  body[data-active-route="upload"] .app-shell.upload-page-shell.mobile-upload-page {
    padding-left: calc(var(--sidebar) + clamp(18px, 2vw, 28px));
  }
}

@media (min-width: 1280px) {
  body[data-active-route="upload"] .mobile-upload-flow {
    width: min(100%, 1180px);
  }
}

@media (min-width: 768px) and (max-width: 979px) {
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Identity"] .mobile-upload-card,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Details"] .mobile-upload-card,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Publish"] {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  body[data-active-route="upload"] .mobile-upload-flow,
  body[data-active-route="upload"] .mobile-upload-flow * {
    box-sizing: border-box;
  }

  body[data-active-route="upload"] .mobile-upload-flow {
    position: relative;
    isolation: isolate;
    color: #f8fafc;
  }

  body[data-active-route="upload"] .mobile-upload-flow button,
  body[data-active-route="upload"] .mobile-upload-flow input,
  body[data-active-route="upload"] .mobile-upload-flow textarea,
  body[data-active-route="upload"] .mobile-upload-flow select {
    font: inherit;
  }

  body[data-active-route="upload"] .mobile-upload-back,
  body[data-active-route="upload"] .mobile-upload-draft,
  body[data-active-route="upload"] .mobile-upload-progress button,
  body[data-active-route="upload"] .mobile-upload-primary,
  body[data-active-route="upload"] .mobile-upload-secondary,
  body[data-active-route="upload"] .mobile-selected-chips button,
  body[data-active-route="upload"] .mobile-genre-options button,
  body[data-active-route="upload"] .mobile-chapter-list button,
  body[data-active-route="upload"] .mobile-add-mini {
    border: 0;
    cursor: pointer;
  }

  body[data-active-route="upload"] .mobile-upload-flow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body[data-active-route="upload"] .mobile-upload-header {
    display: grid;
    align-items: center;
    gap: 12px;
  }

  body[data-active-route="upload"] .mobile-upload-back {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.74);
    color: #ffffff;
  }

  body[data-active-route="upload"] .mobile-upload-draft {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.28);
    background: rgba(15, 23, 42, 0.62);
    color: #c084fc;
    font-weight: 900;
  }

  body[data-active-route="upload"] .mobile-upload-progress {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  body[data-active-route="upload"] .mobile-upload-progress::before {
    content: "";
    position: absolute;
    left: 16.5%;
    right: 16.5%;
    top: 25px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #a855f7, rgba(148, 163, 184, 0.22));
  }

  body[data-active-route="upload"] .mobile-upload-progress button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 7px;
    min-height: 68px;
    background: transparent;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 800;
  }

  body[data-active-route="upload"] .mobile-upload-progress button span {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.42);
    background: rgba(3, 7, 18, 0.92);
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 900;
  }

  body[data-active-route="upload"] .mobile-upload-progress button.is-active span,
  body[data-active-route="upload"] .mobile-upload-progress button.is-complete span {
    border-color: transparent;
    background: linear-gradient(135deg, #a855f7, #6d5df6);
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.5);
  }

  body[data-active-route="upload"] .mobile-upload-progress strong {
    color: #e9d5ff;
  }

  body[data-active-route="upload"] .mobile-upload-card,
  body[data-active-route="upload"] .mobile-upload-hero {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
      radial-gradient(circle at 88% 0%, rgba(139, 92, 246, 0.15), transparent 38%),
      linear-gradient(180deg, rgba(10, 14, 25, 0.92), rgba(6, 10, 20, 0.9));
    box-shadow:
      0 18px 54px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.045);
  }

  body[data-active-route="upload"] .mobile-upload-card {
    display: grid;
    gap: 14px;
  }

  body[data-active-route="upload"] .mobile-upload-hero {
    position: relative;
    display: grid !important;
    align-items: center;
    gap: 16px;
    overflow: hidden;
  }

  body[data-active-route="upload"] .mobile-upload-hero > div {
    position: relative;
    z-index: 1;
    min-width: 0;
  }

  body[data-active-route="upload"] .mobile-hero-line {
    display: block;
    white-space: nowrap;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: 0;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2 i {
    color: #c45cff;
    font-style: normal;
  }

  body[data-active-route="upload"] .mobile-upload-hero p {
    max-width: 34ch;
    margin: 10px 0 0;
    color: rgba(226, 232, 240, 0.86);
    font-size: clamp(0.86rem, 1.1vw, 1rem);
    line-height: 1.45;
  }

  body[data-active-route="upload"] .mobile-upload-hero img {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    justify-self: end;
    align-self: end;
    width: 100% !important;
    object-fit: contain;
    filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.45));
  }

  body[data-active-route="upload"] .mobile-field {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  body[data-active-route="upload"] .mobile-field > span,
  body[data-active-route="upload"] .mobile-cover-section h3,
  body[data-active-route="upload"] .mobile-card-title h3,
  body[data-active-route="upload"] .mobile-ai-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 900;
  }

  body[data-active-route="upload"] .mobile-field > span svg,
  body[data-active-route="upload"] .mobile-card-title svg {
    color: #c45cff;
  }

  body[data-active-route="upload"] .mobile-field strong,
  body[data-active-route="upload"] .mobile-card-title strong,
  body[data-active-route="upload"] .mobile-cover-section strong {
    color: #fb7185;
  }

  body[data-active-route="upload"] .mobile-field input,
  body[data-active-route="upload"] .mobile-field textarea,
  body[data-active-route="upload"] .mobile-field select,
  body[data-active-route="upload"] .mobile-tag-box input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(3, 7, 18, 0.58);
    color: #f8fafc;
    padding: 0 14px;
    outline: 0;
  }

  body[data-active-route="upload"] .mobile-field textarea {
    padding-top: 12px;
    resize: vertical;
  }

  body[data-active-route="upload"] .mobile-field em {
    position: absolute;
    right: 14px;
    bottom: 12px;
    color: rgba(203, 213, 225, 0.78);
    font-size: 0.75rem;
    font-style: normal;
  }

  body[data-active-route="upload"] .mobile-auto-chip {
    color: rgba(203, 213, 225, 0.74);
    font-size: 0.78rem;
  }

  body[data-active-route="upload"] .mobile-cover-section {
    display: grid;
    gap: 8px;
  }

  body[data-active-route="upload"] .mobile-cover-section p {
    margin: 0;
    color: rgba(203, 213, 225, 0.76);
  }

  body[data-active-route="upload"] .mobile-cover-grid {
    display: grid;
    gap: 12px;
  }

  body[data-active-route="upload"] .mobile-cover-hero-zone,
  body[data-active-route="upload"] .mobile-cover-preview {
    position: relative;
    display: grid;
    place-items: center;
    gap: 8px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(3, 7, 18, 0.5);
    text-align: center;
  }

  body[data-active-route="upload"] .mobile-cover-hero-zone {
    border-style: dashed;
    border-color: rgba(168, 85, 247, 0.72);
    cursor: pointer;
  }

  body[data-active-route="upload"] .mobile-cover-hero-zone input,
  body[data-active-route="upload"] .mobile-empty-chapter-drop input,
  body[data-active-route="upload"] .mobile-add-mini input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  body[data-active-route="upload"] .mobile-cover-preview img,
  body[data-active-route="upload"] .mobile-review-cover img,
  body[data-active-route="upload"] .mobile-review-body img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body[data-active-route="upload"] .mobile-cover-change {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.78);
    color: #e9d5ff;
    font-size: 0.72rem;
    font-weight: 900;
  }

  body[data-active-route="upload"] .mobile-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  body[data-active-route="upload"] .mobile-card-title span {
    color: rgba(203, 213, 225, 0.76);
    font-size: 0.82rem;
  }

  body[data-active-route="upload"] .mobile-chip-section {
    display: grid;
    align-content: start;
    gap: 10px;
  }

  body[data-active-route="upload"] .mobile-selected-chips,
  body[data-active-route="upload"] .mobile-genre-options,
  body[data-active-route="upload"] .mobile-review-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body[data-active-route="upload"] .mobile-selected-chips button,
  body[data-active-route="upload"] .mobile-review-chips span,
  body[data-active-route="upload"] .mobile-genre-options button {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(168, 85, 247, 0.36);
    background: rgba(88, 28, 135, 0.34);
    color: #e9d5ff;
    font-size: 0.82rem;
    font-weight: 850;
  }

  body[data-active-route="upload"] .mobile-genre-options button {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(3, 7, 18, 0.45);
    color: rgba(248, 250, 252, 0.9);
  }

  body[data-active-route="upload"] .mobile-tag-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(3, 7, 18, 0.5);
  }

  body[data-active-route="upload"] .mobile-tag-box input {
    flex: 1 1 140px;
    min-height: 34px;
    border: 0;
    background: transparent;
  }

  body[data-active-route="upload"] .mobile-ai-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.42);
  }

  body[data-active-route="upload"] .mobile-ai-card p {
    margin: 6px 0 0;
    color: rgba(226, 232, 240, 0.82);
  }

  body[data-active-route="upload"] .mobile-ai-card small {
    grid-column: 1 / -1;
    padding: 10px;
    border-radius: 12px;
    background: rgba(88, 28, 135, 0.2);
    color: rgba(226, 232, 240, 0.8);
  }

  body[data-active-route="upload"] .mobile-toggle {
    display: block;
  }

  body[data-active-route="upload"] .mobile-toggle input {
    position: absolute;
    opacity: 0;
  }

  body[data-active-route="upload"] .mobile-toggle span {
    position: relative;
    width: 54px;
    height: 30px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
  }

  body[data-active-route="upload"] .mobile-toggle span::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
  }

  body[data-active-route="upload"] .mobile-chapter-card,
  body[data-active-route="upload"] .mobile-review-card {
    align-content: start;
  }

  body[data-active-route="upload"] .mobile-add-mini {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.4);
    background: rgba(88, 28, 135, 0.18);
    color: #c084fc;
    font-weight: 900;
  }

  body[data-active-route="upload"] .mobile-empty-chapter-drop {
    position: relative;
    min-height: 120px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 18px;
    border: 1px dashed rgba(168, 85, 247, 0.72);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.5);
    color: #e9d5ff;
    text-align: center;
    cursor: pointer;
  }

  body[data-active-route="upload"] .mobile-empty-chapter-drop span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(168, 85, 247, 0.5);
  }

  body[data-active-route="upload"] .mobile-chapter-list {
    display: grid;
    gap: 10px;
  }

  body[data-active-route="upload"] .mobile-chapter-list article {
    display: grid;
    grid-template-columns: 20px 68px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 12px;
    min-height: 84px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.42);
  }

  body[data-active-route="upload"] .mobile-chapter-thumb {
    width: 68px;
    aspect-ratio: 1;
    border-radius: 10px;
    background:
      radial-gradient(circle at 68% 26%, #f97316 0 8%, transparent 10%),
      linear-gradient(135deg, #1e1b4b, #6d28d9 50%, #020617);
  }

  body[data-active-route="upload"] .mobile-chapter-thumb.second {
    background:
      radial-gradient(circle at 50% 20%, #8b5cf6 0 8%, transparent 10%),
      linear-gradient(135deg, #020617, #312e81 48%, #4c1d95);
  }

  body[data-active-route="upload"] .mobile-chapter-list span,
  body[data-active-route="upload"] .mobile-chapter-list small {
    display: block;
    color: rgba(226, 232, 240, 0.76);
  }

  body[data-active-route="upload"] .mobile-chapter-list strong {
    display: block;
    margin: 4px 0;
    color: #ffffff;
  }

  body[data-active-route="upload"] .mobile-tip {
    margin: 0;
    color: rgba(226, 232, 240, 0.74);
  }

  body[data-active-route="upload"] .mobile-review-card > h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #ffffff;
  }

  body[data-active-route="upload"] .mobile-review-panel {
    display: grid;
    gap: 14px;
  }

  body[data-active-route="upload"] .mobile-review-body {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.36);
  }

  body[data-active-route="upload"] .mobile-review-cover {
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.8);
  }

  body[data-active-route="upload"] .mobile-review-copy h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1.18;
  }

  body[data-active-route="upload"] .mobile-review-copy p {
    margin: 7px 0 10px;
    color: rgba(226, 232, 240, 0.82);
  }

  body[data-active-route="upload"] .mobile-review-stats {
    display: grid;
    gap: 10px;
    margin: 0;
  }

  body[data-active-route="upload"] .mobile-review-stats div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  body[data-active-route="upload"] .mobile-review-stats dt {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(226, 232, 240, 0.86);
  }

  body[data-active-route="upload"] .mobile-review-stats dd {
    margin: 0;
    color: #ffffff;
    text-align: right;
  }

  body[data-active-route="upload"] .mobile-status-dot,
  body[data-active-route="upload"] .mobile-ready-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    background: #facc15;
  }

  body[data-active-route="upload"] .mobile-upload-primary,
  body[data-active-route="upload"] .mobile-upload-secondary {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 950;
  }

  body[data-active-route="upload"] .mobile-upload-primary {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #7c2cff 54%, #4f8cff);
    box-shadow: 0 18px 42px rgba(124, 58, 237, 0.34);
  }

  body[data-active-route="upload"] .mobile-upload-secondary {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(3, 7, 18, 0.5);
  }

  body[data-active-route="upload"] .mobile-upload-processing,
  body[data-active-route="upload"] .form-status {
    max-width: none;
  }
}

@media (min-width: 1280px) {
  body[data-active-route="upload"] {
    --upload-shell-gap: 14px;
  }

  body[data-active-route="upload"] .app-shell.upload-page-shell {
    padding-top: 18px;
  }

  body[data-active-route="upload"] .upload-page-head {
    margin-bottom: 12px;
  }

  body[data-active-route="upload"] .upload-layout {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
    gap: var(--upload-shell-gap);
  }

  body[data-active-route="upload"] .upload-card {
    padding: 14px;
  }

  body[data-active-route="upload"] .upload-card-head {
    margin-bottom: 9px;
  }

  body[data-active-route="upload"] .upload-field input,
  body[data-active-route="upload"] .upload-field textarea,
  body[data-active-route="upload"] .upload-select {
    min-height: 36px;
  }

  body[data-active-route="upload"] .upload-field textarea {
    min-height: 84px;
  }

  body[data-active-route="upload"] .upload-identity-left,
  body[data-active-route="upload"] .upload-identity-right,
  body[data-active-route="upload"] .upload-details-grid {
    gap: 9px;
  }

  body[data-active-route="upload"] .upload-cover-drop {
    min-height: 74px;
    padding: 10px;
  }

  body[data-active-route="upload"] .upload-cover-preview-inline {
    min-height: 72px;
    grid-template-columns: 96px minmax(0, 1fr);
  }

  body[data-active-route="upload"] .upload-cover-preview-inline .upload-summary-art {
    width: 96px;
    height: 56px;
  }

  body[data-active-route="upload"] .upload-tags {
    min-height: 36px;
    margin-top: 5px;
    padding: 5px;
  }

  body[data-active-route="upload"] .upload-tags span {
    padding: 6px 9px;
  }

  body[data-active-route="upload"] .upload-ai-field {
    padding: 9px;
  }

  body[data-active-route="upload"] .upload-side-column {
    position: sticky;
    top: 18px;
  }

  body[data-active-route="upload"] .upload-summary-card {
    max-height: calc(100vh - 44px);
    overflow: auto;
    scrollbar-width: thin;
  }
}

@media (min-width: 1500px) {
  body[data-active-route="upload"] {
    --sidebar: 238px;
  }

  body[data-active-route="upload"] .upload-layout {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  }
}

@media (min-width: 768px) {
  body[data-active-route="upload"] .mobile-upload-progress {
    display: none !important;
  }

  body[data-active-route="upload"] .mobile-upload-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-route="upload"] .mobile-upload-step {
    grid-column: 1 / -1 !important;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  body[data-active-route="upload"] .app-shell.upload-page-shell.mobile-upload-page {
    padding-top: calc(var(--topbar) + clamp(14px, 3vw, 24px));
    padding-right: clamp(14px, 3vw, 24px);
    padding-left: calc(var(--sidebar) + clamp(14px, 3vw, 24px));
  }

  body[data-active-route="upload"] .mobile-upload-flow {
    width: min(100%, 760px);
  }

  body[data-active-route="upload"] .mobile-upload-header {
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  body[data-active-route="upload"] .mobile-upload-header h1 {
    min-width: 0;
    font-size: clamp(1.45rem, 3.6vw, 1.9rem);
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Identity"] .mobile-upload-card,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Details"] .mobile-upload-card,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Publish"],
  body[data-active-route="upload"] .mobile-cover-grid,
  body[data-active-route="upload"] .mobile-review-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body[data-active-route="upload"] .mobile-upload-step[aria-label="Identity"] .mobile-field-area,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Identity"] .mobile-cover-section,
  body[data-active-route="upload"] .mobile-upload-step[aria-label="Publish"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-actions-publish {
    grid-column: 1 / -1 !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero,
  body[data-active-route="upload"] .mobile-upload-hero-identity,
  body[data-active-route="upload"] .mobile-upload-hero-details,
  body[data-active-route="upload"] .mobile-upload-hero-publish {
    grid-template-columns: minmax(0, 1fr) clamp(120px, 24vw, 170px) !important;
    min-height: clamp(132px, 20vw, 172px) !important;
    overflow: hidden !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero h2,
  body[data-active-route="upload"] .mobile-upload-hero-identity h2,
  body[data-active-route="upload"] .mobile-upload-hero-details h2,
  body[data-active-route="upload"] .mobile-upload-hero-publish h2 {
    font-size: clamp(1.35rem, 4.4vw, 2rem) !important;
  }

  body[data-active-route="upload"] .mobile-upload-hero img,
  body[data-active-route="upload"] .mobile-upload-hero-details img,
  body[data-active-route="upload"] .mobile-upload-hero-publish img {
    width: clamp(118px, 24vw, 170px) !important;
    max-width: 100% !important;
    max-height: clamp(132px, 22vw, 178px) !important;
  }

  body[data-active-route="upload"] .mobile-cover-preview,
  body[data-active-route="upload"] .mobile-cover-sample {
    min-height: 180px;
  }

  body[data-active-route="upload"] .mobile-review-cover {
    width: min(210px, 100%);
    justify-self: center;
  }
}

@media (min-width: 768px) {
  .topbar,
  .sidebar,
  .app-shell,
  .logo {
    transition:
      left 220ms ease,
      width 220ms ease,
      padding 220ms ease,
      transform 220ms ease,
      opacity 180ms ease;
  }

  body[data-sidebar-state="collapsed"] .app-shell {
    padding-left: clamp(18px, 2vw, 34px) !important;
  }

  body[data-sidebar-state="collapsed"][data-active-route="upload"] .app-shell.upload-page-shell.mobile-upload-page {
    padding-top: calc(var(--topbar) + clamp(14px, 2vw, 26px)) !important;
    padding-left: clamp(14px, 3vw, 28px) !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body {
    --sidebar: 76px;
  }
}

@media (min-width: 768px) {
  body[data-sidebar-state="collapsed"] {
    --sidebar: 76px;
  }

  body[data-sidebar-state="collapsed"] .sidebar,
  body[data-sidebar-state="collapsed"] .topbar,
  body[data-sidebar-state="collapsed"] .app-shell,
  body[data-sidebar-state="collapsed"] .logo,
  body[data-sidebar-state="collapsed"] .brand-lockup,
  body[data-sidebar-state="collapsed"] .brand-cat,
  body[data-sidebar-state="collapsed"] .nav-icon,
  body[data-sidebar-state="collapsed"] .utility-item,
  body[data-sidebar-state="collapsed"] .sidebar-stack {
    transition:
      left 220ms ease,
      width 220ms ease,
      padding 220ms ease,
      transform 220ms ease,
      opacity 180ms ease,
      background 180ms ease,
      border-color 180ms ease;
  }

  body[data-sidebar-state="collapsed"] .sidebar {
    display: flex !important;
    width: var(--sidebar) !important;
    padding: 12px 10px !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    align-items: center;
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 2%, rgba(124, 58, 237, 0.28), transparent 32%),
      radial-gradient(circle at 20% 42%, rgba(59, 130, 246, 0.16), transparent 36%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent 28%),
      linear-gradient(180deg, rgba(12, 15, 28, 0.98), rgba(4, 6, 13, 0.98));
    box-shadow:
      inset -1px 0 0 rgba(139, 92, 246, 0.28),
      inset 1px 0 0 rgba(255, 255, 255, 0.055),
      12px 0 40px rgba(0, 0, 0, 0.28),
      0 0 26px rgba(124, 58, 237, 0.1);
  }

  body[data-sidebar-state="collapsed"] .brand-lockup {
    display: grid;
    place-items: center;
    gap: 0;
  }

  body[data-sidebar-state="collapsed"] .brand-cat {
    width: 44px !important;
    height: 44px !important;
    border-radius: 15px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.11),
      0 14px 30px rgba(124, 58, 237, 0.24);
  }

  body[data-sidebar-state="collapsed"] .wordmark,
  body[data-sidebar-state="collapsed"] .nav-icon small,
  body[data-sidebar-state="collapsed"] .utility-item small,
  body[data-sidebar-state="collapsed"] .sidebar-cta,
  body[data-sidebar-state="collapsed"] .sidebar-divider-bottom {
    display: none !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-stack,
  body[data-sidebar-state="collapsed"] .sidebar-group,
  body[data-sidebar-state="collapsed"] .sidebar-utilities {
    width: 100%;
    place-items: center;
  }

  body[data-sidebar-state="collapsed"] .sidebar-social {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 6px;
    width: 100%;
    padding-top: 6px;
  }

  body[data-sidebar-state="collapsed"] .sidebar-stack {
    gap: 8px;
  }

  body[data-sidebar-state="collapsed"] .sidebar-group {
    gap: 8px;
  }

  body[data-sidebar-state="collapsed"] .sidebar-divider {
    width: 34px;
    margin: 6px auto;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.24), transparent);
  }

  body[data-sidebar-state="collapsed"] .nav-icon,
  body[data-sidebar-state="collapsed"] .utility-item,
  body[data-sidebar-state="collapsed"] .social-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(226, 232, 240, 0.72);
  }

  body[data-sidebar-state="collapsed"] .nav-symbol,
  body[data-sidebar-state="collapsed"] .nav-symbol svg {
    width: 21px;
    height: 21px;
  }

  body[data-sidebar-state="collapsed"] .nav-icon.active {
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.52), rgba(59, 130, 246, 0.28)),
      rgba(255, 255, 255, 0.06);
    border-color: rgba(167, 139, 250, 0.42);
    box-shadow:
      0 12px 26px rgba(124, 58, 237, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  body[data-sidebar-state="collapsed"] .soon-badge {
    position: absolute;
    top: 4px;
    right: 3px;
    min-width: 9px;
    width: 9px;
    height: 9px;
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    color: transparent;
  }

  body[data-sidebar-state="collapsed"] .app-shell {
    padding-left: calc(var(--sidebar) + clamp(18px, 2vw, 34px)) !important;
  }

  body[data-sidebar-state="collapsed"][data-active-route="upload"] .app-shell.upload-page-shell.mobile-upload-page {
    padding-left: calc(var(--sidebar) + clamp(14px, 3vw, 28px)) !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .topbar {
    left: 0 !important;
    right: auto !important;
    width: var(--sidebar) !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    border-right: 1px solid rgba(148, 163, 184, 0.12) !important;
    border-bottom: 0 !important;
    background: rgba(5, 6, 10, 0.96) !important;
    box-shadow: none !important;
    backdrop-filter: blur(16px) !important;
  }

  .topbar .logo,
  body.reader-route .topbar .logo {
    display: grid !important;
    place-items: center;
    width: var(--sidebar) !important;
    height: var(--topbar) !important;
    padding: 0 !important;
    border-right: 0 !important;
    background: transparent !important;
  }

  .brand-lockup {
    display: grid;
    place-items: center;
    gap: 0;
  }

  .brand-cat {
    width: 44px !important;
    height: 44px !important;
    border-radius: 15px;
  }

  .wordmark,
  body.reader-route .wordmark,
  .topbar .search,
  .topbar .top-actions,
  .nav-icon small,
  .utility-item small,
  .sidebar-cta,
  .sidebar-divider-bottom {
    display: none !important;
  }

  .sidebar-social {
    display: none !important;
  }

  .sidebar {
    display: flex !important;
    width: var(--sidebar) !important;
    padding: 12px 10px !important;
    align-items: center;
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 2%, rgba(124, 58, 237, 0.28), transparent 32%),
      radial-gradient(circle at 20% 42%, rgba(59, 130, 246, 0.16), transparent 36%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent 28%),
      linear-gradient(180deg, rgba(12, 15, 28, 0.98), rgba(4, 6, 13, 0.98));
    box-shadow:
      inset -1px 0 0 rgba(139, 92, 246, 0.28),
      inset 1px 0 0 rgba(255, 255, 255, 0.055),
      12px 0 40px rgba(0, 0, 0, 0.28),
      0 0 26px rgba(124, 58, 237, 0.1);
  }

  .sidebar-stack,
  .sidebar-group,
  .sidebar-utilities {
    width: 100%;
    place-items: center;
  }

  .sidebar-stack {
    gap: 8px;
  }

  .sidebar-group {
    gap: 8px;
  }

  .sidebar-divider {
    width: 34px;
    margin: 6px auto;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.24), transparent);
  }

  .nav-icon,
  .utility-item {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(226, 232, 240, 0.72);
  }

  .nav-symbol,
  .nav-symbol svg {
    width: 21px;
    height: 21px;
  }

  .nav-icon.active {
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.52), rgba(59, 130, 246, 0.28)),
      rgba(255, 255, 255, 0.06);
    border-color: rgba(167, 139, 250, 0.42);
    box-shadow:
      0 12px 26px rgba(124, 58, 237, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .soon-badge {
    position: absolute;
    top: 4px;
    right: 3px;
    min-width: 9px;
    width: 9px;
    height: 9px;
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    color: transparent;
  }

  .app-shell {
    padding-left: calc(var(--sidebar) + clamp(14px, 3vw, 24px)) !important;
  }

  body:not(.reader-route) .topbar {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    grid-template-columns: minmax(170px, 230px) minmax(220px, 1fr) auto !important;
    gap: clamp(12px, 2vw, 18px) !important;
    padding: 0 clamp(16px, 2.4vw, 24px) !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    background: rgba(5, 6, 10, 0.88) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(18px) !important;
  }

  body:not(.reader-route) .topbar .logo {
    display: flex !important;
    place-items: initial;
    justify-content: flex-start;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border-right: 0 !important;
    background: transparent !important;
  }

  body:not(.reader-route) .brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  body:not(.reader-route) .wordmark {
    display: inline-flex !important;
    font-size: clamp(1.25rem, 2.3vw, 1.5rem);
  }

  body:not(.reader-route) .topbar .search,
  body:not(.reader-route) .topbar .top-actions {
    display: flex !important;
  }

  body:not(.reader-route) .sidebar {
    top: var(--topbar);
    height: calc(100vh - var(--topbar));
  }
}

@media (min-width: 768px) {
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar {
    left: var(--sidebar) !important;
    right: 0 !important;
    width: calc(100% - var(--sidebar)) !important;
    grid-template-columns: minmax(320px, 560px) minmax(0, 1fr) auto !important;
    gap: clamp(14px, 1.5vw, 22px) !important;
    padding: 0 clamp(18px, 2vw, 28px) !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    background: rgba(5, 6, 10, 0.9) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(18px) !important;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .logo {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 26;
    display: grid !important;
    place-items: center;
    justify-content: center;
    width: var(--sidebar) !important;
    height: var(--topbar) !important;
    padding: 0 !important;
    border-right: 0 !important;
    background:
      radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.24), transparent 46%),
      linear-gradient(180deg, rgba(12, 15, 28, 0.98), rgba(4, 6, 13, 0.98)) !important;
    transform: translateX(calc(-1 * var(--sidebar))) !important;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .brand-lockup {
    display: grid;
    place-items: center;
    gap: 0;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .brand-cat {
    width: 46px !important;
    height: 46px !important;
    border-radius: 16px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.11),
      0 14px 30px rgba(124, 58, 237, 0.24);
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .wordmark {
    display: none !important;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .search,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .top-actions {
    display: flex !important;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .search {
    grid-column: 1;
    width: min(100%, 560px) !important;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .top-actions {
    grid-column: 3;
    justify-self: end;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .sidebar {
    top: 0;
    height: 100vh;
    padding-top: calc(var(--topbar) + 14px) !important;
    background:
      radial-gradient(circle at 50% 2%, rgba(124, 58, 237, 0.28), transparent 32%),
      radial-gradient(circle at 20% 42%, rgba(59, 130, 246, 0.16), transparent 36%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.055), transparent 28%),
      linear-gradient(180deg, rgba(12, 15, 28, 0.98), rgba(4, 6, 13, 0.98)) !important;
  }

  body:not(.reader-route)[data-sidebar-state="collapsed"] .app-shell {
    padding-left: calc(var(--sidebar) + clamp(18px, 1.6vw, 26px)) !important;
  }
}

@media (min-width: 768px) {
  body[data-active-route="home"] .app-shell.home-shell {
    padding-top: calc(var(--topbar) + clamp(16px, 2vw, 28px));
  }

  body[data-active-route="home"] .home-desktop-feed {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    grid-template-areas:
      "continue chapters"
      "main chapters";
    gap: clamp(14px, 1.5vw, 22px);
    width: min(100%, 1320px);
    margin-inline: auto;
  }

  body[data-active-route="home"] .discovery-home {
    grid-area: main;
    display: grid;
    gap: 14px;
    min-width: 0;
  }

  body[data-active-route="home"] .continue-section.home-secondary-section {
    grid-area: continue;
    min-width: 0;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section {
    grid-area: chapters;
    min-width: 0;
    align-self: start;
  }

  body[data-active-route="home"] .compact-head,
  body[data-active-route="home"] .discovery-head {
    min-height: 30px;
    margin: 0;
  }

  body[data-active-route="home"] .compact-head h2,
  body[data-active-route="home"] .discovery-head h2 {
    font-size: clamp(1rem, 1.25vw, 1.2rem);
  }

  body[data-active-route="home"] .compact-head p {
    display: none;
  }

  body[data-active-route="home"] .continue-row {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 8px;
  }

  body[data-active-route="home"] .continue-card {
    min-height: 86px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background:
      radial-gradient(circle at 92% 12%, rgba(124, 58, 237, 0.16), transparent 34%),
      rgba(16, 19, 29, 0.94);
  }

  body[data-active-route="home"] .continue-cover {
    width: 72px;
    height: 72px;
  }

  body[data-active-route="home"] .continue-cover .cover,
  body[data-active-route="home"] .continue-cover .image-cover {
    height: 100%;
    border-radius: 12px;
    aspect-ratio: auto;
  }

  body[data-active-route="home"] .continue-info {
    align-content: center;
    min-width: 0;
  }

  body[data-active-route="home"] .chip-row {
    order: 2;
    gap: 8px;
    padding: 0;
  }

  body[data-active-route="home"] .chip-row button {
    min-height: 34px;
    padding-inline: 13px;
    font-size: 0.82rem;
  }

  body[data-active-route="home"] .featured-hero {
    order: 1;
    min-height: 0;
    height: clamp(190px, 22vw, 260px);
    max-height: 260px;
    border-radius: 18px;
  }

  body[data-active-route="home"] .featured-overlay {
    max-width: min(68%, 520px);
    padding: clamp(16px, 2vw, 22px);
    gap: 8px;
  }

  body[data-active-route="home"] .featured-overlay h2 {
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    line-height: 1.08;
  }

  body[data-active-route="home"] .featured-description {
    -webkit-line-clamp: 2;
    font-size: 0.88rem;
  }

  body[data-active-route="home"] .featured-stats {
    gap: 8px;
    font-size: 0.78rem;
  }

  body[data-active-route="home"] .featured-actions .read-button {
    min-height: 38px;
    padding-inline: 15px;
    font-size: 0.86rem;
  }

  body[data-active-route="home"] .featured-plus {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  body[data-active-route="home"] .discovery-home > .discovery-section {
    order: 3;
  }

  body[data-active-route="home"] .discovery-row {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 12px;
  }

  body[data-active-route="home"] .mini-card {
    border-radius: 14px;
  }

  body[data-active-route="home"] .mini-card .cover,
  body[data-active-route="home"] .trending-placeholder {
    aspect-ratio: 4 / 3;
  }

  body[data-active-route="home"] .mini-card .mini-meta {
    padding: 8px 9px 10px;
    gap: 3px;
  }

  body[data-active-route="home"] .mini-meta strong {
    display: block;
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="home"] .mini-meta .meta {
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="home"] .rank-badge {
    min-width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 0.72rem;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
    border-radius: 14px;
    background: rgba(16, 19, 29, 0.92);
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card-cover,
  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card-main {
    min-width: 0;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card-cover {
    width: 64px;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card-cover .cover,
  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card-cover .image-cover {
    width: 64px;
    height: 72px;
    border-radius: 10px;
    aspect-ratio: auto;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card-meta {
    align-content: center;
    padding: 0;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .comic-card-meta h2 {
    font-size: 0.92rem;
    line-height: 1.15;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .studio {
    margin: 2px 0;
  }

  body[data-active-route="home"] .discovery-section.home-secondary-section .stats {
    font-size: 0.72rem;
  }
}

/* Premium desktop/laptop sidebar system */
@media (min-width: 1024px) {
  :root {
    --sidebar: 256px;
    --sb-pad: 16px;
    --sb-gap: 8px;
    --sb-brand-logo: 44px;
    --sb-wordmark: 28px;
    --sb-brand-gap: 8px;
    --sb-nav-row: 44px;
    --sb-space-row: 40px;
    --sb-nav-icon: 18px;
    --sb-nav-text: 15px;
    --sb-cta-height: 170px;
    --sb-cta-mascot: 72px;
    --sb-cta-title: 18px;
    --sb-cta-body: 13px;
    --sb-cta-button: 40px;
    --sb-support-row: 32px;
    --sb-support-icon: 16px;
    --sb-community-icon: 36px;
  }

  body[data-sidebar-state="collapsed"] {
    --sidebar: 256px;
  }

  .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 100 !important;
    display: flex !important;
    width: var(--sidebar) !important;
    height: 100vh !important;
    min-width: 250px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--sb-gap) !important;
    padding: var(--sb-pad) !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    border-right: 1px solid rgba(167, 139, 250, 0.16) !important;
    background:
      radial-gradient(circle at 20% 4%, rgba(124, 58, 237, 0.22), transparent 28%),
      radial-gradient(circle at 88% 42%, rgba(68, 70, 229, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(5, 6, 10, 0.98), rgba(10, 11, 18, 0.98) 48%, rgba(5, 6, 10, 0.99)) !important;
    box-shadow:
      inset -1px 0 0 rgba(255, 255, 255, 0.04),
      inset -20px 0 40px rgba(124, 58, 237, 0.06),
      20px 0 52px rgba(0, 0, 0, 0.34) !important;
    backdrop-filter: blur(18px);
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.55) rgba(255, 255, 255, 0.04);
  }

  .sidebar::-webkit-scrollbar {
    width: 4px;
  }

  .sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
  }

  .sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.82), rgba(168, 85, 247, 0.58));
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.28);
  }

  .sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.9), rgba(76, 70, 229, 0.7));
  }

  .sidebar-brand {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--sb-brand-gap);
    min-width: 0;
    padding: 4px 0 8px;
    background:
      linear-gradient(180deg, rgba(5, 6, 10, 0.98), rgba(5, 6, 10, 0.76));
  }

  .sidebar-brand-logo {
    display: grid;
    flex: 0 0 var(--sb-brand-logo);
    width: var(--sb-brand-logo);
    height: var(--sb-brand-logo);
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.48);
    border-radius: 16px;
    background:
      radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.13), transparent 44%),
      linear-gradient(145deg, rgba(24, 20, 46, 0.98), rgba(6, 7, 14, 0.98));
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 0 24px rgba(124, 58, 237, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.13);
  }

  .sidebar-brand-logo img {
    width: 88%;
    height: 88%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.36));
  }

  .sidebar-brand-wordmark {
    display: inline-flex;
    min-width: 0;
    white-space: nowrap;
    color: #ffffff;
    font-size: var(--sb-wordmark);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .sidebar-brand-wordmark span:last-child {
    color: #a855f7;
    text-shadow: 0 0 18px rgba(168, 85, 247, 0.42);
  }

  .sidebar-stack,
  .sidebar-group,
  .sidebar-utilities {
    display: grid !important;
    width: 100% !important;
    place-items: stretch !important;
  }

  .sidebar-stack {
    flex: 0 0 auto;
    gap: var(--sb-gap) !important;
    padding: 0 !important;
  }

  .sidebar-group {
    gap: 4px !important;
  }

  .sidebar-section-label {
    margin: 0 0 4px;
    padding: 0 12px;
    color: rgba(203, 188, 255, 0.72);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .sidebar-divider,
  .sidebar-divider-bottom {
    flex: 0 0 auto;
    width: 100% !important;
    height: 1px !important;
    margin: 4px 0 !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), rgba(168, 85, 247, 0.18), rgba(255, 255, 255, 0.05), transparent) !important;
  }

  .nav-icon,
  body[data-sidebar-state="collapsed"] .nav-icon {
    position: relative;
    display: flex !important;
    width: 100% !important;
    min-width: 0;
    height: var(--sb-nav-row) !important;
    min-height: var(--sb-nav-row) !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 0 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.035) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.025) !important;
    color: rgba(255, 255, 255, 0.68) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
    cursor: pointer;
    transition:
      background 160ms ease,
      border-color 160ms ease,
      box-shadow 160ms ease,
      color 160ms ease,
      filter 160ms ease;
  }

  .sidebar-space-nav .nav-icon {
    height: var(--sb-space-row) !important;
    min-height: var(--sb-space-row) !important;
  }

  .nav-icon small,
  body[data-sidebar-state="collapsed"] .nav-icon small {
    display: block !important;
    min-width: 0;
    overflow: hidden;
    color: inherit !important;
    font-size: var(--sb-nav-text) !important;
    font-weight: 650;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-symbol,
  .nav-symbol svg,
  body[data-sidebar-state="collapsed"] .nav-symbol,
  body[data-sidebar-state="collapsed"] .nav-symbol svg {
    width: var(--sb-nav-icon) !important;
    height: var(--sb-nav-icon) !important;
    color: currentColor !important;
    stroke-width: 2;
  }

  .nav-icon:hover,
  .nav-icon:focus-visible,
  .nav-icon:not(.active):hover {
    background: rgba(124, 58, 237, 0.13) !important;
    border-color: rgba(168, 85, 247, 0.28) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 18px rgba(124, 58, 237, 0.18) !important;
    filter: brightness(1.06);
    transform: none !important;
  }

  .nav-icon.active,
  body[data-sidebar-state="collapsed"] .nav-icon.active {
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.54), rgba(76, 70, 229, 0.24)),
      rgba(23, 14, 44, 0.92) !important;
    border-color: rgba(168, 85, 247, 0.72) !important;
    color: #ffffff !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.13),
      0 0 0 1px rgba(124, 58, 237, 0.18),
      0 0 26px rgba(124, 58, 237, 0.34) !important;
  }

  .soon-badge,
  body[data-sidebar-state="collapsed"] .soon-badge {
    position: static !important;
    display: inline-flex !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    margin-left: auto;
    padding: 2px 8px !important;
    overflow: visible !important;
    border: 1px solid rgba(168, 85, 247, 0.44);
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.18);
    color: rgba(232, 221, 255, 0.88) !important;
    font-size: 10px !important;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.18);
  }

  .sidebar-cta,
  body[data-sidebar-state="collapsed"] .sidebar-cta {
    position: relative;
    display: grid !important;
    flex: 0 0 var(--sb-cta-height);
    min-height: 0 !important;
    height: var(--sb-cta-height);
    align-content: end;
    gap: 4px;
    margin: 0 !important;
    padding: 16px !important;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    border-radius: 24px !important;
    background:
      radial-gradient(circle at 76% 10%, rgba(255, 255, 255, 0.14), transparent 18%),
      radial-gradient(circle at 48% 24%, rgba(124, 58, 237, 0.42), transparent 38%),
      linear-gradient(180deg, rgba(37, 20, 72, 0.92), rgba(14, 13, 28, 0.96)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.11),
      0 16px 36px rgba(0, 0, 0, 0.34),
      0 0 28px rgba(124, 58, 237, 0.22) !important;
  }

  .cta-mascot {
    position: absolute !important;
    top: 8px !important;
    left: 16px !important;
    right: auto !important;
    width: var(--sb-cta-mascot) !important;
    height: var(--sb-cta-mascot) !important;
    transform: none !important;
  }

  .cta-mascot::before,
  .cta-mascot::after {
    display: none !important;
  }

  .cta-mascot img {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    filter:
      drop-shadow(0 12px 22px rgba(0, 0, 0, 0.34))
      drop-shadow(0 0 16px rgba(168, 85, 247, 0.34));
    transform: none !important;
  }

  .sidebar-cta-title {
    max-width: 100%;
    margin: 0 !important;
    color: #ffffff;
    font-size: var(--sb-cta-title) !important;
    font-weight: 900;
    line-height: 1.04;
  }

  .sidebar-cta-copy {
    margin: 0 !important;
    color: rgba(232, 226, 255, 0.78) !important;
    font-size: var(--sb-cta-body) !important;
    line-height: 1.35;
  }

  .sidebar-cta button {
    display: inline-flex;
    width: 100%;
    min-height: var(--sb-cta-button) !important;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #7c3aed, #a855f7 48%, #4f8cff) !important;
    color: #ffffff;
    font-weight: 900;
    box-shadow:
      0 12px 24px rgba(124, 58, 237, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .sidebar-support {
    display: grid;
    flex: 0 0 auto;
    gap: var(--sb-gap);
    min-width: 0;
  }

  .sidebar-utilities {
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 0 !important;
  }

  .utility-item,
  body[data-sidebar-state="collapsed"] .utility-item {
    display: flex !important;
    width: 100% !important;
    height: var(--sb-support-row) !important;
    min-height: var(--sb-support-row) !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 0 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.035) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.018) !important;
    color: rgba(255, 255, 255, 0.6) !important;
  }

  .utility-item small,
  body[data-sidebar-state="collapsed"] .utility-item small {
    display: block !important;
    color: inherit !important;
    font-size: 14px !important;
    font-weight: 650;
  }

  .utility-item .nav-symbol,
  .utility-item .nav-symbol svg {
    width: var(--sb-support-icon) !important;
    height: var(--sb-support-icon) !important;
  }

  .utility-item:hover,
  .utility-item:focus-visible {
    background: rgba(124, 58, 237, 0.1) !important;
    border-color: rgba(168, 85, 247, 0.22) !important;
    color: rgba(255, 255, 255, 0.86) !important;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.16) !important;
  }

  .sidebar-social {
    display: grid !important;
    gap: 8px !important;
    width: 100%;
    padding: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.018);
  }

  .sidebar-social p {
    margin: 0;
    color: rgba(232, 226, 255, 0.72);
    font-size: 13px;
    font-weight: 650;
    text-align: center;
  }

  .sidebar-social-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .social-icon,
  body[data-sidebar-state="collapsed"] .social-icon {
    display: grid !important;
    width: var(--sb-community-icon) !important;
    height: var(--sb-community-icon) !important;
    min-height: var(--sb-community-icon) !important;
    place-items: center;
    padding: 0 !important;
    border-radius: 14px !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
  }

  .social-icon svg {
    width: calc(var(--sb-community-icon) * 0.46) !important;
    height: calc(var(--sb-community-icon) * 0.46) !important;
  }

  .social-discord {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  }

  .social-reddit {
    background: linear-gradient(135deg, #ef4444, #f97316) !important;
  }

  .social-instagram {
    background: linear-gradient(135deg, #7c3aed, #ec4899 54%, #f97316) !important;
  }

  .social-icon:hover,
  .social-icon:focus-visible {
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow:
      0 0 18px rgba(168, 85, 247, 0.28),
      0 10px 20px rgba(0, 0, 0, 0.22) !important;
    transform: none !important;
    filter: brightness(1.08);
  }

  .topbar .logo {
    display: none !important;
  }

  .bottom-nav {
    display: none !important;
  }

  .topbar,
  body:not(.reader-route) .topbar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar {
    left: var(--sidebar) !important;
    right: 0 !important;
    width: calc(100% - var(--sidebar)) !important;
    grid-template-columns: minmax(240px, 600px) minmax(0, 1fr) auto !important;
    padding-left: 28px !important;
  }

  .app-shell,
  body[data-sidebar-state="collapsed"] .app-shell,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .app-shell {
    padding-left: calc(var(--sidebar) + 28px) !important;
  }
}

@media (min-width: 1024px) {
  :root {
    --sidebar: 280px;
    --sb-pad: 20px;
    --sb-gap: 12px;
    --sb-brand-logo: 48px;
    --sb-wordmark: 32px;
    --sb-brand-gap: 12px;
    --sb-nav-row: 48px;
    --sb-space-row: 44px;
    --sb-nav-icon: 20px;
    --sb-nav-text: 16px;
    --sb-cta-height: 180px;
    --sb-cta-mascot: 82px;
    --sb-cta-title: 20px;
    --sb-community-icon: 38px;
  }
}

@media (min-width: 1024px) {
  :root {
    --sidebar: 300px;
    --sb-pad: 24px;
    --sb-gap: 16px;
    --sb-brand-logo: 54px;
    --sb-wordmark: 36px;
    --sb-brand-gap: 16px;
    --sb-nav-row: 52px;
    --sb-space-row: 48px;
    --sb-nav-icon: 22px;
    --sb-nav-text: 17px;
    --sb-cta-height: 190px;
    --sb-cta-mascot: 92px;
    --sb-cta-title: 22px;
    --sb-cta-body: 14px;
    --sb-cta-button: 44px;
    --sb-support-row: 36px;
    --sb-support-icon: 18px;
    --sb-community-icon: 44px;
  }
}

@media (min-width: 1200px) {
  :root {
    --sidebar: 320px;
    --sb-pad: 28px;
    --sb-gap: 20px;
    --sb-brand-logo: 60px;
    --sb-wordmark: 40px;
    --sb-brand-gap: 20px;
    --sb-nav-icon: 24px;
    --sb-nav-text: 18px;
    --sb-cta-title: 24px;
  }
}

@media (min-width: 760px) and (min-height: 1180px) {
  :root {
    --sb-nav-row: 58px;
    --sb-space-row: 54px;
    --sb-cta-height: 230px;
    --sb-cta-mascot: 110px;
    --sb-cta-title: 28px;
    --sb-cta-button: 52px;
    --sb-support-row: 44px;
    --sb-community-icon: 52px;
  }
}

@media (min-width: 760px) and (min-height: 900px) and (max-height: 979px) {
  :root {
    --sb-pad: 12px;
    --sb-gap: 4px;
    --sb-brand-logo: 44px;
    --sb-wordmark: 28px;
    --sb-brand-gap: 8px;
    --sb-nav-row: 36px;
    --sb-space-row: 34px;
    --sb-nav-icon: 18px;
    --sb-nav-text: 15px;
    --sb-cta-height: 144px;
    --sb-cta-mascot: 60px;
    --sb-cta-title: 18px;
    --sb-cta-button: 36px;
    --sb-support-row: 30px;
    --sb-support-icon: 16px;
    --sb-community-icon: 36px;
  }

  .sidebar {
    overflow-y: hidden !important;
  }

  .sidebar-cta-copy {
    display: none !important;
  }

  .sidebar-section-label {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .sidebar-social {
    gap: 4px !important;
    padding: 4px !important;
  }

  .sidebar-social p {
    font-size: 12px;
  }
}

@media (min-width: 760px) and (min-height: 980px) and (max-height: 1179px) {
  :root {
    --sb-pad: 16px;
    --sb-gap: 8px;
    --sb-nav-row: 40px;
    --sb-space-row: 38px;
    --sb-cta-height: 160px;
    --sb-cta-mascot: 68px;
    --sb-cta-title: 20px;
    --sb-cta-button: 40px;
    --sb-support-row: 32px;
    --sb-community-icon: 40px;
  }

  .sidebar {
    overflow-y: hidden !important;
  }

  .sidebar-cta-copy {
    display: none !important;
  }
}

@media (min-width: 760px) and (max-height: 899px) {
  :root {
    --sb-pad: 16px;
    --sb-gap: 8px;
    --sb-nav-row: 44px;
    --sb-space-row: 40px;
    --sb-cta-height: 170px;
    --sb-cta-mascot: 72px;
    --sb-cta-title: 18px;
    --sb-cta-button: 40px;
    --sb-support-row: 32px;
    --sb-community-icon: 36px;
  }

  .sidebar {
    overflow-y: auto !important;
    padding-right: 12px !important;
  }

  .sidebar-cta-copy {
    display: none !important;
  }
}

@media (max-width: 759px) {
  .sidebar-brand {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  body[data-active-route="home"] .home-desktop-feed {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  }

  body[data-active-route="home"] .discovery-row {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

.desktop-dashboard-home {
  display: none;
}

@media (min-width: 768px) {
  body[data-active-route="home"] .home-desktop-feed {
    display: block !important;
    width: min(100%, 1360px);
    margin-inline: auto;
  }

  body[data-active-route="home"] .home-desktop-feed > :not(.desktop-dashboard-home) {
    display: none !important;
  }

  body[data-active-route="home"] .desktop-dashboard-home {
    display: grid;
    gap: clamp(14px, 1.4vw, 20px);
  }

  body[data-active-route="home"] .desktop-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.98fr) minmax(330px, 0.9fr);
    gap: clamp(14px, 1.4vw, 20px);
    align-items: start;
  }

  body[data-active-route="home"] .desktop-dashboard-left,
  body[data-active-route="home"] .desktop-dashboard-right,
  body[data-active-route="home"] .desktop-dashboard-trending {
    min-width: 0;
  }

  body[data-active-route="home"] .desktop-dashboard-left,
  body[data-active-route="home"] .desktop-dashboard-right {
    display: grid;
    gap: 12px;
  }

  body[data-active-route="home"] .desktop-dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 26px;
  }

  body[data-active-route="home"] .desktop-dash-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.1;
  }

  body[data-active-route="home"] .desktop-dash-head button {
    border: 0;
    background: transparent;
    color: #c084fc;
    font-weight: 850;
    cursor: pointer;
  }

  body[data-active-route="home"] .desktop-dash-continue,
  body[data-active-route="home"] .desktop-dash-feature,
  body[data-active-route="home"] .desktop-dashboard-right,
  body[data-active-route="home"] .desktop-dash-chapter,
  body[data-active-route="home"] .desktop-dash-trending-card,
  body[data-active-route="home"] .desktop-dash-empty {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
      radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(12, 16, 28, 0.94), rgba(8, 11, 20, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  }

  body[data-active-route="home"] .desktop-dash-continue {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 126px;
    padding: 12px;
    border-radius: 16px;
  }

  body[data-active-route="home"] .desktop-dash-cover,
  body[data-active-route="home"] .desktop-dash-chapter-art,
  body[data-active-route="home"] .desktop-dash-feature-art,
  body[data-active-route="home"] .desktop-dash-trending-art {
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  body[data-active-route="home"] .desktop-dash-cover,
  body[data-active-route="home"] .desktop-dash-cover .cover,
  body[data-active-route="home"] .desktop-dash-cover .image-cover {
    width: 92px;
    height: 92px;
    border-radius: 12px;
    aspect-ratio: auto;
  }

  body[data-active-route="home"] .desktop-dash-copy,
  body[data-active-route="home"] .desktop-dash-chapter-copy,
  body[data-active-route="home"] .desktop-dash-trending-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }

  body[data-active-route="home"] .desktop-dash-progress {
    display: block;
    width: min(100%, 280px);
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
  }

  body[data-active-route="home"] .desktop-dash-progress span {
    display: block;
    width: 54%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #c084fc);
  }

  body[data-active-route="home"] .desktop-dash-copy strong,
  body[data-active-route="home"] .desktop-dash-feature-copy h2,
  body[data-active-route="home"] .desktop-dash-chapter-copy strong,
  body[data-active-route="home"] .desktop-dash-trending-copy strong {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="home"] .desktop-dash-copy span,
  body[data-active-route="home"] .desktop-dash-copy small,
  body[data-active-route="home"] .desktop-dash-feature-copy p,
  body[data-active-route="home"] .desktop-dash-chapter-copy span,
  body[data-active-route="home"] .desktop-dash-chapter-copy small,
  body[data-active-route="home"] .desktop-dash-trending-copy small {
    min-width: 0;
    overflow: hidden;
    color: rgba(203, 213, 225, 0.76);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-active-route="home"] .desktop-dash-read,
  body[data-active-route="home"] .desktop-dash-row-read,
  body[data-active-route="home"] .desktop-dash-feature-copy > button {
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(168, 85, 247, 0.48);
    border-radius: 10px;
    background: rgba(88, 28, 135, 0.18);
    color: #e9d5ff;
    font-weight: 850;
    cursor: pointer;
  }

  body[data-active-route="home"] .desktop-dash-feature {
    display: grid;
    grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border-radius: 16px;
  }

  body[data-active-route="home"] .desktop-dash-feature-art,
  body[data-active-route="home"] .desktop-dash-feature-art .cover,
  body[data-active-route="home"] .desktop-dash-feature-art .image-cover {
    width: 100%;
    height: 190px;
    border-radius: 12px;
    aspect-ratio: auto;
  }

  body[data-active-route="home"] .desktop-dash-feature-copy {
    display: grid;
    align-content: center;
    gap: 9px;
    min-width: 0;
  }

  body[data-active-route="home"] .desktop-dash-feature-copy > span {
    width: max-content;
    padding: 4px 8px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 999px;
    color: #d8b4fe;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  body[data-active-route="home"] .desktop-dash-feature-copy h2 {
    margin: 0;
    font-size: clamp(1.25rem, 1.7vw, 1.7rem);
  }

  body[data-active-route="home"] .desktop-dash-tags,
  body[data-active-route="home"] .desktop-dash-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  body[data-active-route="home"] .desktop-dash-tags small {
    padding: 5px 8px;
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 999px;
    color: #c084fc;
  }

  body[data-active-route="home"] .desktop-dashboard-right {
    padding: 18px;
    border-radius: 16px;
  }

  body[data-active-route="home"] .desktop-dash-chapters {
    display: grid;
    gap: 10px;
  }

  body[data-active-route="home"] .desktop-dash-chapter {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 9px;
    border-radius: 14px;
  }

  body[data-active-route="home"] .desktop-dash-chapter-art,
  body[data-active-route="home"] .desktop-dash-chapter-art .cover,
  body[data-active-route="home"] .desktop-dash-chapter-art .image-cover {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    aspect-ratio: auto;
  }

  body[data-active-route="home"] .desktop-dashboard-trending {
    display: grid;
    gap: 12px;
  }

  body[data-active-route="home"] .desktop-dash-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-active-route="home"] .desktop-dash-chips::-webkit-scrollbar {
    display: none;
  }

  body[data-active-route="home"] .desktop-dash-chips button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 15px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    font-weight: 850;
  }

  body[data-active-route="home"] .desktop-dash-chips button:first-child {
    border-color: transparent;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
  }

  body[data-active-route="home"] .desktop-dash-trending-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(128px, 1fr));
    gap: 14px;
  }

  body[data-active-route="home"] .desktop-dash-trending-card {
    overflow: hidden;
    border-radius: 12px;
  }

  body[data-active-route="home"] .desktop-dash-trending-art {
    position: relative;
    width: 100%;
  }

  body[data-active-route="home"] .desktop-dash-trending-art .cover,
  body[data-active-route="home"] .desktop-dash-trending-art .image-cover {
    width: 100%;
    height: 154px;
    border-radius: 0;
    aspect-ratio: auto;
  }

  body[data-active-route="home"] .desktop-dash-trending-art > span {
    position: absolute;
    top: 8px;
    left: 8px;
    min-width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: #ffffff;
    font-weight: 900;
  }

  body[data-active-route="home"] .desktop-dash-trending-copy {
    padding: 10px;
  }
}

@media (min-width: 768px) and (max-width: 1280px) {
  body[data-active-route="home"] .desktop-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  }

  body[data-active-route="home"] .desktop-dash-trending-grid {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }
}

@media (min-width: 768px) {
  body[data-active-route="home"] .desktop-dashboard-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: stretch;
  }

  body[data-active-route="home"] .desktop-dashboard-left {
    grid-template-rows: auto auto auto minmax(clamp(230px, 21vw, 330px), 1fr);
  }

  body[data-active-route="home"] .desktop-dashboard-right {
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
  }

  body[data-active-route="home"] .desktop-dash-chapters {
    grid-template-rows: repeat(4, minmax(0, 1fr));
    height: 100%;
    min-height: 0;
  }

  body[data-active-route="home"] .desktop-dash-feature {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(190px, 42%) minmax(0, 1fr);
    align-items: stretch;
    min-height: clamp(230px, 21vw, 330px);
    height: 100%;
    padding: clamp(12px, 1.2vw, 16px);
    border-radius: 18px;
    background:
      linear-gradient(90deg, rgba(8, 11, 20, 0.1), rgba(8, 11, 20, 0.82) 50%, rgba(26, 15, 54, 0.92)),
      radial-gradient(circle at 34% 44%, rgba(168, 85, 247, 0.2), transparent 42%),
      linear-gradient(135deg, rgba(14, 18, 31, 0.96), rgba(18, 14, 35, 0.96));
  }

  body[data-active-route="home"] .desktop-dash-feature::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(3, 7, 18, 0.44));
  }

  body[data-active-route="home"] .desktop-dash-feature-art {
    position: relative;
    z-index: 1;
    align-self: stretch;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  }

  body[data-active-route="home"] .desktop-dash-feature-art,
  body[data-active-route="home"] .desktop-dash-feature-art .cover,
  body[data-active-route="home"] .desktop-dash-feature-art .image-cover {
    width: 100%;
    height: 100%;
    min-height: clamp(206px, 19vw, 302px);
    aspect-ratio: auto;
  }

  body[data-active-route="home"] .desktop-dash-feature-art .cover,
  body[data-active-route="home"] .desktop-dash-feature-art .image-cover {
    border-radius: 16px;
    object-fit: cover;
  }

  body[data-active-route="home"] .desktop-dash-feature-copy {
    position: relative;
    z-index: 1;
    align-content: center;
    gap: clamp(8px, 0.9vw, 12px);
    padding: clamp(4px, 0.8vw, 10px) clamp(2px, 0.6vw, 8px);
  }

  body[data-active-route="home"] .desktop-dash-feature-copy h2 {
    font-size: clamp(1.28rem, 2vw, 2.05rem);
    line-height: 1.05;
    white-space: normal;
  }

  body[data-active-route="home"] .desktop-dash-feature-copy p {
    font-size: clamp(0.9rem, 1.1vw, 1.04rem);
  }

  body[data-active-route="home"] .desktop-dash-feature-copy > button {
    width: min(100%, 330px);
    justify-self: start;
    min-height: clamp(38px, 3.1vw, 48px);
    border-radius: 12px;
  }

  body[data-active-route="home"] .desktop-dash-chapter {
    min-height: 0;
    height: 100%;
    border-radius: 16px;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  body[data-active-route="home"] .desktop-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  }

  body[data-active-route="home"] .desktop-dash-feature {
    grid-template-columns: minmax(150px, 38%) minmax(0, 1fr);
    min-height: clamp(218px, 28vw, 292px);
  }

  body[data-active-route="home"] .desktop-dash-feature-art,
  body[data-active-route="home"] .desktop-dash-feature-art .cover,
  body[data-active-route="home"] .desktop-dash-feature-art .image-cover {
    min-height: clamp(190px, 25vw, 264px);
  }
}

@media (min-width: 768px) {
  body[data-active-route="home"] .desktop-dash-feature {
    isolation: isolate;
    display: block;
    min-height: clamp(248px, 23vw, 360px);
    padding: 0;
    border-radius: 22px;
    background: rgba(8, 11, 20, 0.94);
  }

  body[data-active-route="home"] .desktop-dash-feature-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
  }

  body[data-active-route="home"] .desktop-dash-feature-art::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(3, 7, 18, 0.64) 34%, rgba(3, 7, 18, 0.12) 72%),
      linear-gradient(180deg, rgba(3, 7, 18, 0.12), rgba(3, 7, 18, 0.34));
  }

  body[data-active-route="home"] .desktop-dash-feature-art,
  body[data-active-route="home"] .desktop-dash-feature-art .cover,
  body[data-active-route="home"] .desktop-dash-feature-art .image-cover {
    min-height: 0;
    height: 100%;
    border-radius: inherit;
  }

  body[data-active-route="home"] .desktop-dash-feature-art .cover,
  body[data-active-route="home"] .desktop-dash-feature-art .image-cover {
    object-fit: cover;
  }

  body[data-active-route="home"] .desktop-dash-feature-copy {
    position: relative;
    z-index: 1;
    width: min(58%, 500px);
    min-height: clamp(248px, 23vw, 360px);
    align-content: center;
    padding: clamp(24px, 3vw, 42px);
  }

  body[data-active-route="home"] .desktop-dash-feature-copy > span {
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(10px);
  }

  body[data-active-route="home"] .desktop-dash-feature-copy h2 {
    font-size: clamp(1.6rem, 3vw, 3rem);
    line-height: 1.04;
    white-space: normal;
  }

  body[data-active-route="home"] .desktop-dash-feature-copy p {
    color: rgba(226, 232, 240, 0.82);
    font-size: clamp(1rem, 1.3vw, 1.22rem);
  }

  body[data-active-route="home"] .desktop-dash-tags {
    display: none;
  }

  body[data-active-route="home"] .desktop-dash-meta {
    gap: 12px;
    color: rgba(226, 232, 240, 0.82);
    font-size: clamp(0.92rem, 1.2vw, 1.1rem);
  }

  body[data-active-route="home"] .desktop-dash-feature-copy > button {
    width: max-content;
    min-width: clamp(150px, 13vw, 190px);
    min-height: clamp(48px, 4vw, 62px);
    padding-inline: clamp(24px, 2.4vw, 34px);
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 18px 34px rgba(124, 58, 237, 0.28);
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  body[data-active-route="home"] .desktop-dash-feature-copy {
    width: min(68%, 470px);
    padding: clamp(20px, 2.4vw, 32px);
  }

  body[data-active-route="home"] .desktop-dash-feature-copy h2 {
    font-size: clamp(1.45rem, 3.2vw, 2.35rem);
  }
}

/* Sidebar typography tuning from compact premium reference */
@media (min-width: 760px) {
  :root {
    --sb-brand-logo: 46px;
    --sb-wordmark: 26px;
    --sb-brand-gap: 12px;
    --sb-nav-row: 40px;
    --sb-space-row: 38px;
    --sb-nav-icon: 18px;
    --sb-nav-text: 14px;
    --sb-cta-height: 160px;
    --sb-cta-mascot: 68px;
    --sb-cta-title: 18px;
    --sb-cta-body: 12px;
    --sb-cta-button: 38px;
    --sb-support-row: 32px;
    --sb-support-icon: 16px;
    --sb-community-icon: 36px;
  }

  .sidebar-section-label {
    font-size: 10px !important;
    letter-spacing: 0.14em;
  }

  .nav-icon small,
  body[data-sidebar-state="collapsed"] .nav-icon small {
    font-size: var(--sb-nav-text) !important;
    font-weight: 650 !important;
  }

  .sidebar-brand-wordmark {
    font-size: var(--sb-wordmark) !important;
    font-weight: 900;
  }

  .sidebar-cta-title {
    font-size: var(--sb-cta-title) !important;
    line-height: 1.08;
  }

  .sidebar-cta-copy {
    font-size: var(--sb-cta-body) !important;
  }

  .sidebar-cta button {
    font-size: 13px !important;
  }

  .utility-item small,
  body[data-sidebar-state="collapsed"] .utility-item small {
    font-size: 12px !important;
    font-weight: 600 !important;
  }

  .sidebar-social p {
    font-size: 11px !important;
  }
}

@media (min-width: 900px) {
  :root {
    --sb-brand-logo: 48px;
    --sb-wordmark: 28px;
    --sb-nav-row: 42px;
    --sb-space-row: 40px;
    --sb-nav-text: 14px;
    --sb-cta-height: 166px;
    --sb-cta-mascot: 72px;
    --sb-cta-title: 18px;
    --sb-community-icon: 38px;
  }
}

@media (min-width: 1200px) {
  :root {
    --sb-brand-logo: 50px;
    --sb-wordmark: 30px;
    --sb-brand-gap: 14px;
    --sb-nav-row: 44px;
    --sb-space-row: 40px;
    --sb-nav-icon: 19px;
    --sb-nav-text: 14px;
    --sb-cta-height: 176px;
    --sb-cta-mascot: 78px;
    --sb-cta-title: 19px;
    --sb-cta-body: 12px;
    --sb-cta-button: 40px;
    --sb-community-icon: 40px;
  }
}

@media (min-width: 760px) and (max-height: 899px) {
  :root {
    --sb-brand-logo: 42px;
    --sb-wordmark: 24px;
    --sb-nav-row: 38px;
    --sb-space-row: 36px;
    --sb-nav-text: 13px;
    --sb-cta-height: 148px;
    --sb-cta-mascot: 60px;
    --sb-cta-title: 17px;
    --sb-cta-button: 36px;
    --sb-community-icon: 34px;
  }
}

@media (min-width: 760px) and (min-height: 900px) and (max-height: 979px) {
  :root {
    --sb-pad: 12px;
    --sb-gap: 4px;
    --sb-brand-logo: 42px;
    --sb-wordmark: 24px;
    --sb-brand-gap: 8px;
    --sb-nav-row: 36px;
    --sb-space-row: 34px;
    --sb-nav-icon: 17px;
    --sb-nav-text: 13px;
    --sb-cta-height: 128px;
    --sb-cta-mascot: 52px;
    --sb-cta-title: 17px;
    --sb-cta-button: 34px;
    --sb-support-row: 28px;
    --sb-support-icon: 15px;
    --sb-community-icon: 34px;
  }

  .sidebar {
    overflow-y: hidden !important;
  }

  .sidebar-cta-copy {
    display: none !important;
  }

  .sidebar-social {
    gap: 4px !important;
    padding: 4px !important;
  }
}

/* Sidebar brand header should behave like a flush app rail header */
@media (min-width: 760px) {
  :root {
    --topbar: 80px;
  }

  .sidebar-brand {
    top: calc(var(--sb-pad) * -1) !important;
    height: var(--topbar) !important;
    min-height: var(--topbar) !important;
    margin: calc(var(--sb-pad) * -1) calc(var(--sb-pad) * -1) 4px !important;
    padding: 0 var(--sb-pad) !important;
    border-bottom: 1px solid rgba(167, 139, 250, 0.14);
    background:
      radial-gradient(circle at 46px 50%, rgba(124, 58, 237, 0.28), transparent 54px),
      linear-gradient(180deg, rgba(5, 6, 10, 0.98), rgba(5, 6, 10, 0.94)) !important;
    box-shadow:
      inset -1px 0 0 rgba(255, 255, 255, 0.035),
      0 1px 0 rgba(255, 255, 255, 0.025);
  }

  .sidebar-brand-logo {
    border-radius: 14px;
  }

  .sidebar {
    padding-top: var(--sb-pad) !important;
  }
}

/* Calm sidebar brand surface: no mascot glow, no harsh seam */
@media (min-width: 760px) {
  .sidebar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .sidebar {
    border-right-color: rgba(255, 255, 255, 0.045) !important;
    box-shadow:
      inset -1px 0 0 rgba(255, 255, 255, 0.018),
      14px 0 34px rgba(0, 0, 0, 0.24) !important;
  }

  .sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, 0.055) !important;
    background: #05060a !important;
    box-shadow: none !important;
  }

  .sidebar-brand-logo {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: #0a0b12 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 8px 18px rgba(0, 0, 0, 0.32) !important;
  }

  .sidebar-brand-logo img {
    filter: none !important;
  }

  .sidebar-brand-wordmark {
    text-shadow: none !important;
  }

  .sidebar-brand-wordmark span:last-child {
    text-shadow: none !important;
  }

  .topbar,
  body:not(.reader-route) .topbar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar {
    border-left: 0 !important;
    background: #05060a !important;
  }
}

/* Flush-align sidebar brand with the main header rail */
@media (min-width: 760px) {
  .sidebar {
    padding-top: var(--topbar) !important;
    overflow-y: hidden !important;
  }

  .sidebar-stack {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.55) rgba(255, 255, 255, 0.04);
  }

  .sidebar-stack::-webkit-scrollbar {
    width: 4px;
  }

  .sidebar-stack::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
  }

  .sidebar-stack::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.82), rgba(168, 85, 247, 0.58));
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.28);
  }

  .sidebar-stack::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.9), rgba(76, 70, 229, 0.7));
  }

  .sidebar-brand {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--topbar) !important;
    min-height: var(--topbar) !important;
    margin: 0 !important;
    padding: 0 var(--sb-pad) !important;
    border-bottom: 1px solid rgba(167, 139, 250, 0.14);
  }

  .sidebar-stack {
    padding-top: 4px !important;
  }
}

@media (min-width: 760px) and (min-height: 900px) {
  .sidebar-stack {
    overflow-y: hidden !important;
  }
}

@media (min-width: 760px) and (max-height: 899px) {
  .sidebar-stack {
    overflow-y: auto !important;
    padding-right: 4px !important;
  }
}

@media (min-width: 760px) and (min-height: 900px) and (max-height: 979px) {
  :root {
    --sb-cta-height: 116px;
    --sb-cta-mascot: 48px;
    --sb-support-row: 26px;
    --sb-community-icon: 32px;
  }

  .sidebar-brand {
    margin-bottom: 0 !important;
  }
}

/* Final sidebar seam cleanup: dark brand, no mascot glow, quiet content edge */
@media (min-width: 760px) {
  .sidebar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .sidebar {
    border-right-color: transparent !important;
    box-shadow: none !important;
  }

  .sidebar::after,
  .sidebar::before {
    opacity: 0 !important;
  }

  .sidebar-brand {
    background: #05060a !important;
    border-bottom-color: rgba(255, 255, 255, 0.045) !important;
    box-shadow: none !important;
  }

  .sidebar-brand-logo {
    background: #080910 !important;
    border-color: rgba(255, 255, 255, 0.075) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
  }

  .sidebar-brand-logo img {
    filter: none !important;
  }

  .sidebar-brand-wordmark,
  .sidebar-brand-wordmark span:last-child {
    text-shadow: none !important;
  }

  .topbar,
  body:not(.reader-route) .topbar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar {
    border-left: 0 !important;
    box-shadow: none !important;
  }
}

/* Sidebar footer polish: compact support rows and cleaner community actions */
@media (min-width: 760px) {
  .sidebar-support {
    gap: 8px !important;
  }

  .sidebar-utilities {
    display: grid !important;
    gap: 6px !important;
  }

  .sidebar-utilities .sidebar-section-label {
    margin: 0 0 2px !important;
  }

  .utility-item,
  body[data-sidebar-state="collapsed"] .utility-item {
    height: 36px !important;
    min-height: 36px !important;
    gap: 10px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.014) !important;
  }

  .utility-item small,
  body[data-sidebar-state="collapsed"] .utility-item small {
    font-size: 13px !important;
    font-weight: 650 !important;
  }

  .sidebar-social {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.012) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
  }

  .sidebar-social p {
    display: none !important;
  }

  .sidebar-social-row {
    width: 100%;
    justify-content: center !important;
    gap: 12px !important;
  }

  .social-icon,
  body[data-sidebar-state="collapsed"] .social-icon {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 13px !important;
    box-shadow: none !important;
  }
}

/* Sidebar scroll fix: keep navigation, CTA, support, and social in one flow */
@media (min-width: 760px) {
  .sidebar-stack,
  body[data-sidebar-state="collapsed"] .sidebar-stack {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  .sidebar-stack::-webkit-scrollbar {
    display: none !important;
  }

  .sidebar-cta {
    margin-top: var(--sb-gap) !important;
  }
}

/* Tablet rail and laptop collapsed sidebar */
@media (min-width: 760px) and (max-width: 1023px),
  (min-width: 1024px) {
  .sidebar-brand {
    cursor: pointer;
    user-select: none;
  }

  .sidebar-brand:focus-visible {
    outline: 2px solid rgba(168, 85, 247, 0.75);
    outline-offset: -4px;
  }
}

@media (min-width: 760px) and (max-width: 1023px) {
  body {
    --sidebar: 84px;
    --sb-pad: 10px;
    --sb-gap: 8px;
    --sb-brand-logo: 46px;
    --sb-nav-row: 52px;
    --sb-space-row: 52px;
    --sb-nav-icon: 22px;
    --sb-support-row: 48px;
    --sb-support-icon: 20px;
  }

  .sidebar {
    width: var(--sidebar) !important;
    min-width: var(--sidebar) !important;
    padding: var(--topbar) 10px 10px !important;
    align-items: center !important;
  }

  .sidebar-brand {
    justify-content: center !important;
    padding: 0 !important;
  }

  .sidebar-brand-wordmark,
  .sidebar-section-label,
  .nav-icon small,
  .utility-item small,
  .soon-badge,
  .sidebar-cta,
  .sidebar-divider-bottom,
  .sidebar-social {
    display: none !important;
  }

  .sidebar-scroll {
    width: 100% !important;
    padding: 10px 0 12px !important;
  }

  .sidebar-stack,
  .sidebar-group,
  .sidebar-utilities,
  .sidebar-support {
    width: 100% !important;
    place-items: center !important;
  }

  .sidebar-stack,
  .sidebar-group,
  .sidebar-utilities {
    gap: 8px !important;
  }

  .sidebar-divider {
    width: 34px !important;
    margin: 6px auto !important;
  }

  .nav-icon,
  .utility-item {
    display: grid !important;
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    place-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 16px !important;
  }

  .nav-symbol,
  .nav-symbol svg {
    width: var(--sb-nav-icon) !important;
    height: var(--sb-nav-icon) !important;
  }

  .topbar,
  body:not(.reader-route) .topbar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar {
    left: var(--sidebar) !important;
    width: calc(100% - var(--sidebar)) !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 0 14px !important;
  }

  .topbar .logo {
    display: none !important;
  }

  .topbar .search {
    display: flex !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .topbar .top-actions {
    display: flex !important;
  }

  .create-button {
    min-width: 96px;
    padding-inline: 16px;
  }

  .app-shell,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .app-shell {
    padding-left: calc(var(--sidebar) + 18px) !important;
  }
}

@media (min-width: 1024px) {
  body[data-sidebar-state="collapsed"] {
    --sidebar: 84px;
    --sb-pad: 10px;
    --sb-gap: 8px;
    --sb-brand-logo: 46px;
    --sb-nav-row: 52px;
    --sb-space-row: 52px;
    --sb-nav-icon: 22px;
    --sb-support-row: 48px;
    --sb-support-icon: 20px;
  }

  body[data-sidebar-state="collapsed"] .sidebar {
    width: var(--sidebar) !important;
    min-width: var(--sidebar) !important;
    padding: var(--topbar) 10px 10px !important;
    align-items: center !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-brand {
    justify-content: center !important;
    padding: 0 !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-brand-wordmark,
  body[data-sidebar-state="collapsed"] .sidebar-section-label,
  body[data-sidebar-state="collapsed"] .nav-icon small,
  body[data-sidebar-state="collapsed"] .utility-item small,
  body[data-sidebar-state="collapsed"] .soon-badge,
  body[data-sidebar-state="collapsed"] .sidebar-cta,
  body[data-sidebar-state="collapsed"] .sidebar-divider-bottom,
  body[data-sidebar-state="collapsed"] .sidebar-social {
    display: none !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-scroll {
    width: 100% !important;
    padding: 10px 0 12px !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-stack,
  body[data-sidebar-state="collapsed"] .sidebar-group,
  body[data-sidebar-state="collapsed"] .sidebar-utilities,
  body[data-sidebar-state="collapsed"] .sidebar-support {
    width: 100% !important;
    place-items: center !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-stack,
  body[data-sidebar-state="collapsed"] .sidebar-group,
  body[data-sidebar-state="collapsed"] .sidebar-utilities {
    gap: 8px !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-divider {
    width: 34px !important;
    margin: 6px auto !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon,
  body[data-sidebar-state="collapsed"] .utility-item {
    display: grid !important;
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    place-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 16px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-symbol,
  body[data-sidebar-state="collapsed"] .nav-symbol svg {
    width: var(--sb-nav-icon) !important;
    height: var(--sb-nav-icon) !important;
  }

  body[data-sidebar-state="collapsed"] .topbar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar {
    left: var(--sidebar) !important;
    width: calc(100% - var(--sidebar)) !important;
  }

  body[data-sidebar-state="collapsed"] .topbar .logo {
    display: none !important;
  }

  body[data-sidebar-state="collapsed"] .app-shell,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .app-shell {
    padding-left: calc(var(--sidebar) + 24px) !important;
  }
}

/* Smart sidebar overflow management: fixed brand, single body scroll, no overlap */
@media (min-width: 760px) {
  .sidebar {
    overflow: hidden !important;
  }

  .sidebar-brand {
    position: absolute !important;
    inset: 0 0 auto 0 !important;
    z-index: 4 !important;
    height: var(--topbar) !important;
    min-height: var(--topbar) !important;
    margin: 0 !important;
    padding: 0 var(--sb-pad) !important;
  }

  .sidebar-scroll {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--sb-gap) !important;
    width: 100% !important;
    height: calc(100vh - var(--topbar)) !important;
    max-height: calc(100vh - var(--topbar)) !important;
    margin-top: 0 !important;
    padding: 8px var(--sb-pad) 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.58) rgba(255, 255, 255, 0.035);
  }

  .sidebar-scroll::-webkit-scrollbar {
    width: 4px;
  }

  .sidebar-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 999px;
  }

  .sidebar-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.82), rgba(168, 85, 247, 0.58));
  }

  .sidebar-stack,
  body[data-sidebar-state="collapsed"] .sidebar-stack {
    display: grid !important;
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  .sidebar-stack::-webkit-scrollbar {
    display: none !important;
  }

  .sidebar-cta,
  .sidebar-support,
  .sidebar-social {
    flex: 0 0 auto !important;
    position: relative !important;
  }
}

@media (min-width: 1024px) {
  body[data-sidebar-state="expanded"] .sidebar {
    padding-top: var(--topbar) !important;
  }

  body[data-sidebar-state="expanded"] .sidebar-cta {
    display: grid !important;
    margin: 0 !important;
  }

  body[data-sidebar-state="expanded"] .sidebar-social {
    display: flex !important;
  }
}

@media (min-width: 1024px) and (max-height: 979px) {
  body[data-sidebar-state="expanded"] .sidebar-cta-copy {
    display: none !important;
  }
}

@media (min-width: 1024px) and (max-height: 899px) {
  :root,
  body[data-sidebar-state="expanded"] {
    --sb-pad: 12px;
    --sb-gap: 6px;
    --sb-nav-row: 38px;
    --sb-space-row: 36px;
    --sb-nav-text: 13px;
    --sb-nav-icon: 17px;
    --sb-cta-height: 118px;
    --sb-cta-mascot: 50px;
    --sb-cta-title: 16px;
    --sb-cta-button: 34px;
    --sb-support-row: 30px;
    --sb-support-icon: 15px;
    --sb-community-icon: 34px;
  }

  body[data-sidebar-state="expanded"] .sidebar-section-label {
    margin-bottom: 2px !important;
    font-size: 10px !important;
  }

  body[data-sidebar-state="expanded"] .sidebar-group,
  body[data-sidebar-state="expanded"] .sidebar-utilities {
    gap: 4px !important;
  }

  body[data-sidebar-state="expanded"] .sidebar-divider,
  body[data-sidebar-state="expanded"] .sidebar-divider-bottom {
    margin: 2px 0 !important;
  }

  body[data-sidebar-state="expanded"] .sidebar-cta {
    height: var(--sb-cta-height) !important;
    min-height: var(--sb-cta-height) !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  body[data-sidebar-state="expanded"] .cta-mascot {
    width: var(--sb-cta-mascot) !important;
    height: var(--sb-cta-mascot) !important;
    top: 8px !important;
    left: 12px !important;
  }

  body[data-sidebar-state="expanded"] .sidebar-cta button {
    min-height: var(--sb-cta-button) !important;
    font-size: 12px !important;
  }

  body[data-sidebar-state="expanded"] .utility-item {
    height: var(--sb-support-row) !important;
    min-height: var(--sb-support-row) !important;
  }

  body[data-sidebar-state="expanded"] .sidebar-social {
    padding: 6px 8px !important;
  }
}

@media (min-width: 760px) and (max-width: 1023px) {
  .sidebar {
    padding-top: var(--topbar) !important;
  }

  .sidebar-brand {
    justify-content: center !important;
    padding: 0 !important;
  }

  .sidebar-brand-wordmark,
  .sidebar-section-label,
  .nav-icon small,
  .utility-item small,
  .soon-badge,
  .sidebar-cta,
  .sidebar-divider-bottom,
  .sidebar-social {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  body[data-sidebar-state="collapsed"] .sidebar {
    padding-top: var(--topbar) !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-brand {
    justify-content: center !important;
    padding: 0 !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-brand-wordmark,
  body[data-sidebar-state="collapsed"] .sidebar-section-label,
  body[data-sidebar-state="collapsed"] .nav-icon small,
  body[data-sidebar-state="collapsed"] .utility-item small,
  body[data-sidebar-state="collapsed"] .soon-badge,
  body[data-sidebar-state="collapsed"] .sidebar-cta,
  body[data-sidebar-state="collapsed"] .sidebar-divider-bottom,
  body[data-sidebar-state="collapsed"] .sidebar-social {
    display: none !important;
  }
}

/* Simplified tablet rail: Home, Following, Library, Upload Comic, Settings only */
@media (min-width: 760px) and (max-width: 1023px) {
  body {
    --sidebar: 84px;
    --sb-brand-logo: 46px;
    --sb-nav-icon: 22px;
  }

  body[data-sidebar-state] {
    --sidebar: 84px;
    --sb-brand-logo: 46px;
    --sb-nav-icon: 22px;
  }

  .sidebar,
  body:not(.reader-route) .sidebar,
  body[data-sidebar-state] .sidebar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .sidebar,
  body[data-sidebar-state="collapsed"] .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: var(--sidebar) !important;
    min-width: var(--sidebar) !important;
    max-width: var(--sidebar) !important;
    height: 100vh !important;
    padding: var(--topbar) 0 0 !important;
    background: #05060a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.055) !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04) !important;
  }

  .sidebar::before,
  .sidebar::after {
    display: none !important;
  }

  .sidebar-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #05060a !important;
    border-bottom-color: rgba(255, 255, 255, 0.055) !important;
  }

  .sidebar-brand-logo {
    display: grid !important;
    place-items: center !important;
    width: var(--sb-brand-logo) !important;
    height: var(--sb-brand-logo) !important;
    flex-basis: var(--sb-brand-logo) !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 14px !important;
    background: #080910 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.055),
      0 0 20px rgba(124, 58, 237, 0.16) !important;
  }

  .sidebar-brand-logo img {
    display: block !important;
    width: 88% !important;
    height: 88% !important;
    object-fit: contain !important;
    filter: none !important;
  }

  .sidebar-scroll {
    position: relative !important;
    display: block !important;
    height: calc(100vh - var(--topbar)) !important;
    max-height: calc(100vh - var(--topbar)) !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .sidebar-stack,
  .sidebar-group,
  .sidebar-utilities,
  .sidebar-support {
    display: contents !important;
  }

  .sidebar-divider,
  .sidebar-divider-bottom,
  .sidebar-section-label,
  .sidebar-cta,
  .sidebar-social,
  .soon-badge,
  .nav-icon,
  .utility-item {
    display: none !important;
  }

  .nav-icon[aria-label="Home"],
  .nav-icon[aria-label="Following"],
  .nav-icon[aria-label="Library"],
  .nav-icon[aria-label="My Uploads"],
  body[data-sidebar-state] .nav-icon[aria-label="Home"],
  body[data-sidebar-state] .nav-icon[aria-label="Following"],
  body[data-sidebar-state] .nav-icon[aria-label="Library"],
  body[data-sidebar-state] .nav-icon[aria-label="My Uploads"],
  body[data-sidebar-state] .utility-item[aria-label="Settings"],
  .utility-item[aria-label="Settings"] {
    position: absolute !important;
    left: 50% !important;
    z-index: 2;
    display: grid !important;
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    place-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border-radius: 16px !important;
    transform: translateX(-50%) !important;
  }

  .nav-icon[aria-label="Home"] {
    top: 14px !important;
  }

  .nav-icon[aria-label="Following"] {
    top: 76px !important;
  }

  .nav-icon[aria-label="Library"] {
    top: 138px !important;
  }

  .nav-icon[aria-label="My Uploads"] {
    top: calc(72vh - var(--topbar)) !important;
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(59, 130, 246, 0.28)),
      rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(167, 139, 250, 0.38) !important;
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.18) !important;
  }

  .utility-item[aria-label="Settings"] {
    bottom: 18px !important;
  }

  .nav-icon small,
  .utility-item small {
    display: none !important;
  }

  .nav-symbol,
  .nav-symbol svg,
  .utility-item .nav-symbol,
  .utility-item .nav-symbol svg {
    width: var(--sb-nav-icon) !important;
    height: var(--sb-nav-icon) !important;
  }
}

/* YouTube-style sidebar scrollbar: hidden until hover/focus or active scrolling */
@media (min-width: 1024px) {
  .sidebar-scroll {
    scrollbar-color: transparent transparent !important;
    transition: scrollbar-color 160ms ease;
  }

  .sidebar-scroll::-webkit-scrollbar {
    width: 4px !important;
  }

  .sidebar-scroll::-webkit-scrollbar-track {
    background: transparent !important;
  }

  .sidebar-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .sidebar-scroll:hover,
  .sidebar-scroll:focus-within,
  .sidebar-scroll.is-scroll-hovered,
  .sidebar-scroll.is-scrolling {
    scrollbar-color: rgba(168, 85, 247, 0.58) transparent !important;
  }

  .sidebar-scroll:hover::-webkit-scrollbar-thumb,
  .sidebar-scroll:focus-within::-webkit-scrollbar-thumb,
  .sidebar-scroll.is-scroll-hovered::-webkit-scrollbar-thumb,
  .sidebar-scroll.is-scrolling::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.82), rgba(168, 85, 247, 0.58)) !important;
  }
}

/* Shared rail polish: tablet rail and collapsed desktop rail should behave the same */
@media (min-width: 760px) and (max-width: 1023px) {
  .nav-icon[aria-label="Home"]:hover,
  .nav-icon[aria-label="Following"]:hover,
  .nav-icon[aria-label="Library"]:hover,
  .nav-icon[aria-label="My Uploads"]:hover,
  .utility-item[aria-label="Settings"]:hover,
  .nav-icon[aria-label="Home"]:focus-visible,
  .nav-icon[aria-label="Following"]:focus-visible,
  .nav-icon[aria-label="Library"]:focus-visible,
  .nav-icon[aria-label="My Uploads"]:focus-visible,
  .utility-item[aria-label="Settings"]:focus-visible {
    transform: translateX(-50%) !important;
    padding: 0 !important;
    background: rgba(124, 58, 237, 0.13) !important;
    border-color: rgba(168, 85, 247, 0.28) !important;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.16) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    filter: none !important;
  }

  .nav-icon[aria-label="Home"].active:hover,
  .nav-icon[aria-label="Home"].active:focus-visible {
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.54), rgba(76, 70, 229, 0.24)),
      rgba(23, 14, 44, 0.92) !important;
    border-color: rgba(168, 85, 247, 0.72) !important;
  }
}

@media (min-width: 1024px) {
  body[data-sidebar-state="collapsed"] .sidebar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .sidebar {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    gap: 0 !important;
    padding: var(--topbar) 0 0 !important;
    background: #05060a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.055) !important;
    box-shadow: none !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar::before,
  body[data-sidebar-state="collapsed"] .sidebar::after {
    display: none !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon:hover,
  body[data-sidebar-state="collapsed"] .utility-item:hover,
  body[data-sidebar-state="collapsed"] .nav-icon:focus-visible,
  body[data-sidebar-state="collapsed"] .utility-item:focus-visible {
    transform: none !important;
    padding: 0 !important;
    background: rgba(124, 58, 237, 0.13) !important;
    border-color: rgba(168, 85, 247, 0.28) !important;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.16) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    filter: none !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon.active:hover,
  body[data-sidebar-state="collapsed"] .nav-icon.active:focus-visible {
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.54), rgba(76, 70, 229, 0.24)),
      rgba(23, 14, 44, 0.92) !important;
    border-color: rgba(168, 85, 247, 0.72) !important;
  }
}

@media (min-width: 1024px) {
  body[data-sidebar-state="collapsed"] .sidebar-scroll {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: calc(100vh - var(--topbar)) !important;
    max-height: calc(100vh - var(--topbar)) !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-stack,
  body[data-sidebar-state="collapsed"] .sidebar-group,
  body[data-sidebar-state="collapsed"] .sidebar-utilities,
  body[data-sidebar-state="collapsed"] .sidebar-support {
    display: contents !important;
  }

  body[data-sidebar-state="collapsed"] .sidebar-divider,
  body[data-sidebar-state="collapsed"] .sidebar-divider-bottom,
  body[data-sidebar-state="collapsed"] .sidebar-section-label,
  body[data-sidebar-state="collapsed"] .sidebar-cta,
  body[data-sidebar-state="collapsed"] .sidebar-social,
  body[data-sidebar-state="collapsed"] .soon-badge,
  body[data-sidebar-state="collapsed"] .nav-icon,
  body[data-sidebar-state="collapsed"] .utility-item {
    display: none !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Home"],
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Following"],
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Library"],
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="My Uploads"],
  body[data-sidebar-state="collapsed"] .utility-item[aria-label="Settings"] {
    box-sizing: border-box !important;
    position: absolute !important;
    left: 50% !important;
    z-index: 2;
    display: grid !important;
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    place-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 16px !important;
    transform: translateX(-50%) !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Home"] {
    top: 14px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Following"] {
    top: 76px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Library"] {
    top: 138px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="My Uploads"] {
    top: calc(72vh - var(--topbar)) !important;
    background:
      linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(59, 130, 246, 0.28)),
      rgba(255, 255, 255, 0.045) !important;
    border-color: rgba(167, 139, 250, 0.38) !important;
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.18) !important;
  }

  body[data-sidebar-state="collapsed"] .utility-item[aria-label="Settings"] {
    bottom: 18px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Home"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Following"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Library"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="My Uploads"]:hover,
  body[data-sidebar-state="collapsed"] .utility-item[aria-label="Settings"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Home"]:focus-visible,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Following"]:focus-visible,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Library"]:focus-visible,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="My Uploads"]:focus-visible,
  body[data-sidebar-state="collapsed"] .utility-item[aria-label="Settings"]:focus-visible {
    transform: translateX(-50%) !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Home"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Home"]:focus-visible {
    top: 14px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Following"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Following"]:focus-visible {
    top: 76px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Library"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="Library"]:focus-visible {
    top: 138px !important;
  }

  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="My Uploads"]:hover,
  body[data-sidebar-state="collapsed"] .nav-icon[aria-label="My Uploads"]:focus-visible {
    top: calc(72vh - var(--topbar)) !important;
  }

  body[data-sidebar-state="collapsed"] .utility-item[aria-label="Settings"]:hover,
  body[data-sidebar-state="collapsed"] .utility-item[aria-label="Settings"]:focus-visible {
    bottom: 18px !important;
  }
}

/* Header stabilization: sidebar owns branding on tablet/desktop, header stays one row */
@media (min-width: 760px) {
  :root {
    --topbar: 80px;
  }

  body:not(.reader-route) .topbar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar,
  body[data-active-route="home"] .topbar,
  body[data-active-route="library"] .topbar,
  body[data-active-route="upload"] .topbar,
  body[data-active-route="profile"] .topbar,
  body[data-active-route="my-comics"] .topbar {
    position: fixed !important;
    inset: 0 auto auto var(--sidebar) !important;
    z-index: 90 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(280px, 600px) minmax(16px, 1fr) auto !important;
    align-items: center !important;
    align-content: center !important;
    gap: clamp(14px, 1.8vw, 28px) !important;
    width: calc(100vw - var(--sidebar)) !important;
    height: var(--topbar) !important;
    min-height: var(--topbar) !important;
    max-height: var(--topbar) !important;
    padding: 0 clamp(18px, 2.2vw, 34px) !important;
    overflow: hidden !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055) !important;
    background: #05060a !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  body:not(.reader-route) .topbar .logo,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .logo,
  body[data-active-route="home"] .topbar .logo,
  body[data-active-route="library"] .topbar .logo,
  body[data-active-route="upload"] .topbar .logo,
  body[data-active-route="profile"] .topbar .logo,
  body[data-active-route="my-comics"] .topbar .logo {
    display: none !important;
  }

  body:not(.reader-route) .topbar .search,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .search,
  body[data-active-route="home"] .topbar .search,
  body[data-active-route="library"] .topbar .search,
  body[data-active-route="upload"] .topbar .search,
  body[data-active-route="profile"] .topbar .search,
  body[data-active-route="my-comics"] .topbar .search {
    grid-column: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    display: flex !important;
    width: min(100%, 600px) !important;
    min-width: 0 !important;
    height: 52px !important;
    margin: 0 !important;
  }

  body:not(.reader-route) .topbar .top-actions,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .top-actions,
  body[data-active-route="home"] .topbar .top-actions,
  body[data-active-route="library"] .topbar .top-actions,
  body[data-active-route="upload"] .topbar .top-actions,
  body[data-active-route="profile"] .topbar .top-actions,
  body[data-active-route="my-comics"] .topbar .top-actions {
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
    display: flex !important;
    width: auto !important;
    min-width: max-content !important;
    height: auto !important;
    margin: 0 !important;
    gap: clamp(10px, 1vw, 14px) !important;
  }

  body:not(.reader-route) .topbar .create-button {
    width: auto !important;
    min-width: 106px !important;
    height: 50px !important;
    padding-inline: 20px !important;
    white-space: nowrap !important;
  }

  body:not(.reader-route) .topbar .notification-button,
  body:not(.reader-route) .topbar .avatar {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
  }

  body:not(.reader-route) .topbar .mobile-search-btn {
    display: none !important;
  }
}

@media (min-width: 760px) and (max-width: 1023px) {
  body:not(.reader-route) .topbar,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar,
  body[data-active-route="home"] .topbar,
  body[data-active-route="library"] .topbar,
  body[data-active-route="upload"] .topbar,
  body[data-active-route="profile"] .topbar,
  body[data-active-route="my-comics"] .topbar {
    grid-template-columns: minmax(180px, 1fr) auto !important;
    gap: 12px !important;
    padding: 0 14px !important;
  }

  body:not(.reader-route) .topbar .search,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .search,
  body[data-active-route="home"] .topbar .search,
  body[data-active-route="library"] .topbar .search,
  body[data-active-route="upload"] .topbar .search,
  body[data-active-route="profile"] .topbar .search,
  body[data-active-route="my-comics"] .topbar .search {
    grid-column: 1 !important;
    width: 100% !important;
    height: 46px !important;
  }

  body:not(.reader-route) .topbar .top-actions,
  body:not(.reader-route)[data-sidebar-state="collapsed"] .topbar .top-actions,
  body[data-active-route="home"] .topbar .top-actions,
  body[data-active-route="library"] .topbar .top-actions,
  body[data-active-route="upload"] .topbar .top-actions,
  body[data-active-route="profile"] .topbar .top-actions,
  body[data-active-route="my-comics"] .topbar .top-actions {
    grid-column: 2 !important;
    gap: 10px !important;
  }

  body:not(.reader-route) .topbar .create-button {
    min-width: 92px !important;
    height: 44px !important;
    padding-inline: 16px !important;
  }

  body:not(.reader-route) .topbar .notification-button,
  body:not(.reader-route) .topbar .avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

@media (min-width: 760px) and (max-width: 820px) {
  body:not(.reader-route) .topbar .create-button {
    min-width: 84px !important;
    padding-inline: 14px !important;
  }

  body:not(.reader-route) .topbar .notification-button,
  body:not(.reader-route) .topbar .avatar {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }
}

/* Reader pages use their own creator chrome; never show the global app header there. */
@media (min-width: 760px) {
  body.reader-route .topbar {
    display: none !important;
    pointer-events: none !important;
  }
}

@media (max-width: 767px) {
  body.reader-route .reader-mobile-status-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    order: 1;
  }

  body.reader-route .reader-topbar {
    max-height: 150px;
  }

  body.reader-route .reader-creator-card {
    box-sizing: border-box;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: 18px 20px;
    min-height: 58px;
    gap: 2px 8px;
    padding: 5px 8px;
  }

  body.reader-route .reader-creator-card img {
    grid-row: 1 / 3;
    align-self: center;
    width: 34px;
    height: 34px;
  }

  body.reader-route .reader-creator-card span {
    align-self: end;
    gap: 0;
  }

  body.reader-route .reader-creator-card strong {
    font-size: 0.78rem;
  }

  body.reader-route .reader-creator-card small {
    display: none;
  }

  body.reader-route .reader-creator-card i {
    display: none;
  }

  body.reader-route .reader-creator-card button {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    align-self: start;
    min-height: 20px;
    padding: 0 10px;
    font-size: 0.66rem;
    line-height: 1;
  }

  body.reader-route .reader-progress-panel {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    min-height: 58px;
    gap: 6px 8px;
    padding: 8px 9px;
  }

  body.reader-route .reader-progress-panel h2 {
    grid-column: 1;
    font-size: 0.78rem;
  }

  body.reader-route .reader-comic-title,
  body.reader-route .reader-title-separator {
    display: none;
  }

  body.reader-route .reader-progress-percent {
    display: block;
    grid-column: 2;
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
  }

  body.reader-route .reader-page-progress {
    grid-column: 1 / -1;
  }

  body.reader-route .reader-progress-panel p {
    display: none;
  }

  body.reader-route .reader-page-shell .reader-controls {
    grid-column: 1 / -1;
    order: 3;
  }
}

body[data-active-route="profile"] .profile-page-shell .profile-content-grid {
  grid-template-columns: minmax(0, 1fr);
}

body[data-active-route="profile"] .profile-panel[hidden] {
  display: none !important;
}
 
.reader-comments-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.reader-comments-panel.open {
  display: block;
}

.reader-comments-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.reader-comments-sheet {
  position: absolute;
  top: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(430px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(10, 12, 20, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.reader-comments-head,
.reader-comment-form,
.reader-comments-list {
  padding: 18px;
}

.reader-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-comments-head h3 {
  margin: 2px 0 0;
  color: #fff;
}

.reader-comments-head button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.reader-comment-form {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-comment-form textarea,
.inline-comment-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
  line-height: 1.4;
}

.reader-comment-form textarea {
  min-height: 84px;
  padding: 12px;
}

.reader-comment-form div,
.inline-comment-form div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reader-comment-form small {
  color: rgba(226, 232, 240, 0.62);
}

.reader-comments-list {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
}

.chapter-comment {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
}

.chapter-comment.reply {
  grid-template-columns: 30px minmax(0, 1fr);
  margin-top: 12px;
  margin-left: 12px;
}

.chapter-comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
}

.chapter-comment.reply .chapter-comment-avatar {
  width: 30px;
  height: 30px;
}

.chapter-comment-body {
  min-width: 0;
}

.chapter-comment-body header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #fff;
}

.chapter-comment-body header small,
.chapter-comment-actions button,
.chapter-replies-toggle,
.comments-empty,
.comments-loading {
  color: rgba(226, 232, 240, 0.64);
}

.creator-badge {
  border: 1px solid rgba(167, 139, 250, 0.42);
  border-radius: 999px;
  padding: 2px 7px;
  color: #ddd6fe;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chapter-comment-body p {
  margin: 5px 0 7px;
  color: rgba(248, 250, 252, 0.92);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chapter-comment.deleted p {
  color: rgba(226, 232, 240, 0.5);
  font-style: italic;
}

.chapter-comment-actions,
.chapter-replies-toggle {
  display: flex;
  gap: 10px;
}

.chapter-comment-actions button,
.chapter-replies-toggle {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.chapter-replies {
  margin-top: 8px;
}

.inline-comment-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.inline-comment-form textarea {
  min-height: 64px;
  padding: 10px;
}

@media (max-width: 767px) {
  .reader-comments-sheet {
    inset: auto 0 0;
    width: 100%;
    height: min(82vh, 680px);
    border-radius: 24px 24px 0 0;
  }
}

/* Premium reader discussion drawer */
.reader-comments-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  pointer-events: none;
}

.reader-comments-panel.open {
  pointer-events: auto;
}

.reader-comments-panel:not(.open) {
  visibility: hidden;
}

.reader-comments-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 16%, rgba(124, 58, 237, 0.2), transparent 34%),
    rgba(0, 0, 0, 0.52);
  opacity: 0;
  backdrop-filter: blur(14px);
  transition: opacity 180ms ease;
}

.reader-comments-panel.open .reader-comments-backdrop {
  opacity: 1;
}

.reader-comments-sheet {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: clamp(420px, 38vw, 580px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(22, 25, 40, 0.96), rgba(7, 9, 18, 0.96)),
    rgba(9, 11, 20, 0.96);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(28px) scale(0.985);
  opacity: 0;
  transition:
    transform 220ms ease,
    opacity 180ms ease;
}

.reader-comments-panel.open .reader-comments-sheet {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.reader-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-comments-head h3 {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 2px 0 0;
  color: #fff;
  font-size: 1.28rem;
  letter-spacing: 0;
}

.reader-comments-head h3 span {
  color: #c4b5fd;
  font-size: 0.98rem;
}

.reader-comments-head .eyebrow {
  margin: 0;
  color: rgba(196, 181, 253, 0.76);
  letter-spacing: 0.08em;
}

.reader-comments-head button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(248, 250, 252, 0.82);
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.reader-comments-head button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: scale(1.04);
}

.reader-comment-form {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.comment-composer-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  object-fit: cover;
}

.reader-comment-form label {
  display: grid;
  gap: 7px;
}

.reader-comment-form label span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

.reader-comment-form textarea,
.inline-comment-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.065);
  color: #fff;
  font: inherit;
  line-height: 1.45;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.reader-comment-form textarea {
  min-height: 92px;
  padding: 13px 14px;
}

.reader-comment-form textarea:focus,
.inline-comment-form textarea:focus {
  outline: 0;
  border-color: rgba(139, 92, 246, 0.72);
  background: rgba(255, 255, 255, 0.085);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.16);
}

.reader-comment-form > div {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reader-comment-form small {
  color: rgba(226, 232, 240, 0.55);
  font-size: 0.74rem;
}

.reader-comment-form .primary-button,
.inline-comment-form .primary-button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #5b7cfa);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.28);
  transition:
    transform 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.reader-comment-form .primary-button:hover,
.inline-comment-form .primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.reader-comments-list {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  padding: 20px 24px 26px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.48) transparent;
}

.chapter-comment {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  animation: commentRise 180ms ease both;
}

@keyframes commentRise {
  from {
    transform: translateY(5px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.chapter-comment.reply {
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr);
  margin-top: 13px;
  margin-left: 22px;
  padding-left: 16px;
}

.chapter-comment.reply::before {
  content: "";
  position: absolute;
  top: -8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.52), rgba(139, 92, 246, 0.08));
}

.chapter-comment-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.chapter-comment.reply .chapter-comment-avatar {
  width: 30px;
  height: 30px;
}

.chapter-comment-body {
  min-width: 0;
  padding: 11px 13px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.chapter-comment.reply .chapter-comment-body {
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.025);
}

.chapter-comment-body header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: rgba(248, 250, 252, 0.92);
}

.chapter-comment-body header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-comment-body header small {
  color: rgba(226, 232, 240, 0.48);
  font-size: 0.76rem;
}

.creator-badge {
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: 999px;
  padding: 2px 7px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.26), rgba(56, 189, 248, 0.14));
  color: #ddd6fe;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chapter-comment-body p {
  margin: 7px 0 9px;
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.94rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.chapter-comment.deleted {
  opacity: 0.68;
}

.chapter-comment.deleted .chapter-comment-body p {
  color: rgba(226, 232, 240, 0.5);
  font-style: italic;
}

.chapter-comment-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.chapter-comment-actions button,
.chapter-replies-toggle {
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.48);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    color 150ms ease,
    transform 150ms ease;
}

.chapter-comment-actions button + button::before {
  content: "•";
  margin: 0 8px 0 7px;
  color: rgba(226, 232, 240, 0.28);
}

.chapter-comment-actions button:hover,
.chapter-replies-toggle:hover {
  color: #c4b5fd;
}

.chapter-replies-toggle {
  margin-top: 9px;
  padding: 0;
}

.chapter-replies {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 10px;
  transition:
    opacity 180ms ease,
    grid-template-rows 180ms ease;
}

.chapter-replies[hidden] {
  display: none;
}

.inline-comment-form {
  display: grid;
  gap: 9px;
  margin-top: 11px;
  padding: 11px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 16px;
  background: rgba(12, 15, 27, 0.78);
}

.inline-comment-form textarea {
  min-height: 68px;
  padding: 10px 12px;
}

.inline-comment-form div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.inline-comment-form .secondary-button {
  min-height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.comments-empty,
.comments-loading {
  color: rgba(226, 232, 240, 0.58);
}

.premium-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 240px;
  text-align: center;
}

.comments-empty-icon {
  position: relative;
  width: 54px;
  height: 42px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(56, 189, 248, 0.1));
  box-shadow: 0 16px 36px rgba(124, 58, 237, 0.18);
}

.comments-empty-icon::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(167, 139, 250, 0.28);
  border-bottom: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(22, 25, 40, 0.98);
  transform: rotate(45deg);
}

.premium-empty strong {
  color: #fff;
  font-size: 1rem;
}

.premium-empty span {
  max-width: 250px;
  color: rgba(226, 232, 240, 0.6);
  line-height: 1.45;
}

.comic-rating-widget {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin: 18px 0 4px;
  padding: 14px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(12, 10, 22, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.comic-rating-summary,
.comic-rating-user,
.comic-rating-controls {
  display: flex;
  align-items: center;
}

.comic-rating-summary {
  gap: 10px;
  flex-wrap: wrap;
}

.comic-rating-stars {
  color: #facc15;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.comic-rating-summary strong {
  color: #fff;
  font-size: 1.02rem;
}

.comic-rating-summary small,
.comic-rating-user span {
  color: rgba(226, 232, 240, 0.66);
  font-weight: 700;
}

.comic-rating-user {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comic-rating-controls {
  gap: 2px;
}

.comic-rating-controls button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #facc15;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition:
    background 150ms ease,
    transform 150ms ease,
    opacity 150ms ease;
}

.comic-rating-controls button:hover {
  background: rgba(250, 204, 21, 0.12);
  transform: translateY(-1px) scale(1.05);
}

.comic-rating-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.comic-rating-remove {
  border: 0;
  background: transparent;
  color: rgba(248, 113, 113, 0.9);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.comic-rating-remove:hover {
  color: #fb7185;
}

@media (max-width: 767px) {
  .comic-rating-widget {
    margin-top: 14px;
    padding: 12px;
    border-radius: 16px;
  }

  .comic-rating-user {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 767px) {
  .reader-comments-panel {
    align-items: end;
  }

  .reader-comments-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(92vh, 760px);
    border-radius: 28px 28px 0 0;
    transform: translateY(32px);
  }

  .reader-comments-panel.open .reader-comments-sheet {
    transform: translateY(0);
  }

  .reader-comments-head {
    padding: 18px 18px 15px;
  }

  .reader-comment-form {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 15px 18px 17px;
  }

  .comment-composer-avatar {
    width: 36px;
    height: 36px;
  }

  .reader-comments-list {
    padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .chapter-comment {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .chapter-comment-avatar {
    width: 36px;
    height: 36px;
  }
}

/* Premium social comment experience */
.reader-comments-panel {
  z-index: 120;
}

.reader-comments-sheet {
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: clamp(420px, 38vw, 560px);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(22, 18, 37, 0.98), rgba(8, 8, 16, 0.98)),
    rgba(10, 9, 18, 0.98);
}

.reader-comments-head {
  padding: 20px 22px 16px;
}

.reader-comments-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.reader-comments-head p {
  margin: 4px 0 0;
  color: rgba(226, 232, 240, 0.58);
  font-size: 0.84rem;
  font-weight: 700;
}

.reader-comments-head p span {
  color: #ddd6fe;
}

.reader-comments-list {
  gap: 20px;
  padding: 20px 22px;
  scrollbar-width: none;
}

.reader-comments-list::-webkit-scrollbar {
  display: none;
}

.reader-comment-form {
  position: relative;
  grid-template-columns: 38px minmax(0, 1fr);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(17, 14, 28, 0.84), rgba(10, 9, 18, 0.96)),
    rgba(12, 10, 21, 0.96);
  backdrop-filter: blur(18px);
}

.comment-composer-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.comment-composer-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(221, 214, 254, 0.88);
  font-size: 0.78rem;
  font-weight: 800;
}

.comment-composer-mode[hidden] {
  display: none;
}

.comment-composer-mode button {
  border: 0;
  background: transparent;
  color: rgba(248, 113, 113, 0.88);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.reader-comment-form label {
  display: block;
}

.reader-comment-form textarea {
  min-height: 42px;
  max-height: 118px;
  resize: none;
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.comment-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reader-comment-form .primary-button {
  min-height: 34px;
  padding: 0 16px;
}

.chapter-comment {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
}

.chapter-comment.reply {
  grid-template-columns: 28px minmax(0, 1fr);
  margin-left: 24px;
  padding-left: 15px;
}

.chapter-comment-avatar {
  width: 38px;
  height: 38px;
}

.chapter-comment.reply .chapter-comment-avatar {
  width: 28px;
  height: 28px;
}

.chapter-comment-body,
.chapter-comment.reply .chapter-comment-body {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.chapter-comment-body header {
  gap: 6px;
}

.chapter-comment-body header strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.9rem;
}

.chapter-comment-body header small::before {
  content: "·";
  margin-right: 6px;
  color: rgba(226, 232, 240, 0.36);
}

.chapter-comment-body p {
  margin: 4px 0 7px;
  font-size: 0.94rem;
}

.chapter-comment.deleted .chapter-comment-body p {
  color: rgba(226, 232, 240, 0.48);
}

.creator-badge {
  padding: 2px 6px;
  border: 0;
  background: linear-gradient(135deg, #8b5cf6, #6d5dfc);
  color: #fff;
  font-size: 0.58rem;
  box-shadow: 0 8px 18px rgba(139, 92, 246, 0.22);
}

.chapter-comment-actions {
  gap: 14px;
}

.chapter-comment-actions button,
.comment-more-button {
  padding: 0;
  color: rgba(226, 232, 240, 0.46);
  font-size: 0.76rem;
  font-weight: 850;
}

.chapter-comment-actions button + button::before {
  content: "";
  margin: 0;
}

.comment-more-button {
  letter-spacing: 0.08em;
}

.chapter-comment-actions button:hover,
.comment-more-button:hover {
  color: #ddd6fe;
}

.chapter-replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  color: rgba(196, 181, 253, 0.78);
}

.chapter-replies-toggle span {
  width: 32px;
  height: 1px;
  border-radius: 999px;
  background: rgba(196, 181, 253, 0.5);
}

.chapter-replies {
  margin-top: 12px;
}

.comment-action-backdrop {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(0, 0, 0, 0.2);
}

.comment-action-backdrop[hidden] {
  display: none;
}

.comment-action-sheet {
  position: absolute;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: rgba(16, 13, 27, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
  animation: commentActionRise 150ms ease both;
}

.comment-action-sheet[hidden] {
  display: none;
}

.comment-action-sheet button {
  display: block;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(248, 250, 252, 0.92);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-align: center;
  transition: background 150ms ease;
}

.comment-action-sheet button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.comment-action-sheet button:last-child {
  border-bottom: 0;
  color: rgba(226, 232, 240, 0.68);
}

.comment-action-sheet .danger {
  color: #fb7185;
}

@keyframes commentActionRise {
  from {
    transform: translateY(10px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.premium-empty {
  min-height: 100%;
  padding: 34px 18px;
}

.comments-empty-icon {
  width: 50px;
  height: 38px;
}

@media (max-width: 767px) {
  .reader-comments-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(90vh, 760px);
    border-radius: 28px 28px 0 0;
  }

  .reader-comments-head {
    padding: 17px 18px 13px;
  }

  .reader-comments-list {
    padding: 18px 18px 20px;
  }

  .reader-comment-form {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }

  .comment-composer-avatar,
  .chapter-comment-avatar {
    width: 34px;
    height: 34px;
  }

  .chapter-comment {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .comment-action-sheet {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    border-radius: 20px;
  }
}

/* ==========================================================================
   COMIKAT HOME V2 REDESIGN STYLES
   ========================================================================== */

/* 1. Genre Chips Container & Chips */
.v2-genre-chips-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 14px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.v2-genre-chips-container::-webkit-scrollbar {
  display: none;
}

.v2-genre-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 16px;
  background: rgba(17, 20, 32, 0.75);
  color: rgba(226, 232, 240, 0.85);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 120ms ease;
}

.v2-genre-chip:hover {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-1px);
}

.v2-genre-chip.active {
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

/* 2. Compact Featured Hero */
.v2-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 24px;
  background: #090b11;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: stretch;
}

.v2-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.48) saturate(1.1);
  transition: transform 4s ease;
}

.v2-hero:hover .v2-hero-bg {
  transform: scale(1.03);
}

.v2-hero-overlay {
  position: relative;
  width: 100%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.1) 0%, rgba(9, 11, 17, 0.72) 48%, rgba(9, 11, 17, 0.98) 100%);
}

.v2-hero-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #a78bfa;
  margin-bottom: 12px;
}

.v2-hero-title {
  margin: 0 0 6px;
  font-size: clamp(1.48rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.v2-hero-creator {
  margin: 0 0 16px;
  font-size: 0.94rem;
  color: rgba(226, 232, 240, 0.85);
  font-weight: 650;
}

.v2-hero-actions {
  display: flex;
  gap: 12px;
}

.v2-hero-read-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px !important;
  border-radius: 8px;
  font-weight: 800;
  padding-inline: 22px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.v2-hero-read-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

/* Responsive Hero Heights */
@media (min-width: 1200px) {
  .v2-hero {
    height: 52vh;
    max-height: 480px;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .v2-hero {
    height: 40vh;
  }
}
@media (max-width: 767px) {
  .v2-hero {
    height: 28vh;
  }
  .v2-hero-overlay {
    padding: 18px;
  }
  .v2-hero-title {
    font-size: 1.35rem;
  }
  .v2-hero-creator {
    margin-bottom: 12px;
  }
}

/* 3. Continue Reading Horizontal Strip */
.v2-continue-container {
  background: rgba(11, 13, 20, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 28px;
}

.v2-continue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.v2-continue-header h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.v2-continue-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}

.v2-continue-strip::-webkit-scrollbar {
  display: none;
}

.v2-continue-card {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  min-width: 0;
}

.v2-continue-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.v2-continue-cover {
  width: 58px;
  height: 76px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.v2-continue-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.v2-continue-info strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-continue-info span {
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.8);
  margin-top: 2px;
}

.v2-continue-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.v2-continue-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #3b82f6);
  border-radius: 99px;
  margin-top: 0;
}

/* Skeletons inside Continue Strip */
.v2-continue-skeleton {
  width: 180px;
  height: 94px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.v2-continue-skeleton-cover {
  width: 58px;
  height: 76px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.v2-continue-skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v2-continue-skeleton-line {
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Card Widths by Device */
@media (min-width: 1200px) {
  .v2-continue-card, .v2-continue-skeleton {
    width: calc((100% - 6 * 14px) / 7);
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .v2-continue-card, .v2-continue-skeleton {
    width: calc((100% - 3 * 14px) / 4);
  }
}
@media (max-width: 767px) {
  .v2-continue-card, .v2-continue-skeleton {
    width: calc((100% - 1 * 14px) / 2);
  }
}

/* 4. Recommended Header */
.v2-recommended-header {
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.v2-recommended-header h2 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.v2-recommended-header p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
}

/* 5. Main Responsive Recommendation Grid (Desktop Option A: 4 Columns) */
.v2-recommendation-grid {
  display: grid;
  gap: 28px 20px;
  margin-bottom: 28px;
}

@media (min-width: 1200px) {
  .v2-recommendation-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .v2-recommendation-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 767px) {
  .v2-recommendation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 6. Recommendation Card Styling */
.v2-rec-card {
  display: flex;
  flex-direction: column;
  background: rgba(17, 20, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
  height: 100%;
}

.v2-rec-card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 58, 237, 0.44);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32), 0 0 12px rgba(124, 58, 237, 0.15);
}

.v2-rec-cover-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0d0d12;
}

.v2-rec-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.v2-rec-card:hover .v2-rec-cover {
  transform: scale(1.025);
}

.v2-rec-reason {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(8, 10, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--accent-3);
  font-size: 0.72rem;
  font-weight: 800;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.v2-rec-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.v2-rec-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.25;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-rec-creator {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-rec-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.75);
}

.v2-rec-meta span:first-child {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #fbbf24;
}

/* 7. Interrupt Card Design */
.v2-interrupt-container {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(17, 20, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 22px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.v2-interrupt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.v2-interrupt-header h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.v2-interrupt-card-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.v2-interrupt-card-row::-webkit-scrollbar {
  display: none;
}

/* Accent Colors */
.v2-interrupt-container.trending {
  border-left: 3px solid #f97316;
}
.v2-interrupt-container.trending h3 {
  color: #ff8a3d;
}

.v2-interrupt-container.fresh {
  border-left: 3px solid #06b6d4;
}
.v2-interrupt-container.fresh h3 {
  color: #22d3ee;
}

.v2-interrupt-container.gem {
  border-left: 3px solid #eab308;
}
.v2-interrupt-container.gem h3 {
  color: #facc15;
}

.v2-interrupt-container.creator {
  border-left: 3px solid #22c55e;
}
.v2-interrupt-container.creator h3 {
  color: #4ade80;
}

.v2-interrupt-container.favorite {
  border-left: 3px solid #ec4899;
}
.v2-interrupt-container.favorite h3 {
  color: #f472b6;
}

/* Three-dot dropdown ⋮ menu button */
.v2-three-dot-wrap {
  position: relative;
}

.v2-three-dot-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 180ms ease, background 180ms ease;
}

.v2-three-dot-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.v2-three-dot-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  display: none;
  min-width: 140px;
  background: #111420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 4px;
}

.v2-three-dot-wrap[open] .v2-three-dot-menu {
  display: grid;
}

.v2-three-dot-menu button {
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.8rem;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}

.v2-three-dot-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Skeletons */
.v2-rec-skeleton {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.02);
  aspect-ratio: 3 / 4.4;
}

.v2-interrupt-skeleton {
  min-height: 180px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  grid-column: 1 / -1;
}

.v2-load-more-indicator {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

/* ==========================================================================
   COMIKAT FOLLOWING V2 REDESIGN STYLES
   ========================================================================== */

/* 1. Responsive Creator Avatar Strip Overrides scoped to v2-following-shell */
.v2-following-shell .following-creator-strip {
  margin-bottom: 12px;
}

.v2-following-shell .following-creator-row {
  gap: 16px;
  padding: 6px 4px 12px;
}

.v2-following-shell .following-creator {
  flex: 0 0 auto;
  justify-items: center;
  position: relative;
}

/* Avatar Wrap for Badge Overlay */
.v2-following-shell .following-avatar-wrap {
  position: relative;
  display: inline-block;
}

.v2-following-shell .following-creator img {
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

/* Glowing Activity Ring for Active Creators */
.v2-following-shell .following-creator.has-activity img {
  border-color: var(--accent-3);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Unread Count Badge on Avatar */
.v2-following-shell .following-unread-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  z-index: 3;
  background: var(--accent-3);
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border: 1.5px solid #090b11;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Avatar Sizes Responsive Adjustments */
@media (max-width: 767px) {
  .v2-following-shell .following-creator img {
    width: 56px;
    height: 56px;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .v2-following-shell .following-creator img {
    width: 60px;
    height: 60px;
  }
}

/* 2. Skeletons inside Creator Strip */
.v2-following-shell .following-creator-skeleton {
  pointer-events: none;
}

.v2-following-shell .following-creator-avatar-skeleton {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 767px) {
  .v2-following-shell .following-creator-avatar-skeleton {
    width: 56px;
    height: 56px;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .v2-following-shell .following-creator-avatar-skeleton {
    width: 60px;
    height: 60px;
  }
}

.v2-following-shell .following-creator-name-skeleton {
  width: 48px;
  height: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  margin-top: 8px;
}

/* 3. Quick Read / Continue Buttons on Update Cards */
.v2-following-quick-read {
  margin-top: 10px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.08);
  color: #a78bfa;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 7px 0;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 120ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2-following-quick-read:hover {
  background: var(--accent-3);
  color: #ffffff;
  transform: translateY(-1px);
}

.v2-following-quick-read:active {
  transform: translateY(0);
}

/* Strip Overrides for Following Interruptions */
.v2-following-shell .v2-interrupt-container.following-catchup-container {
  border-left: 3px solid var(--accent-3);
}
.v2-following-shell .v2-interrupt-container.following-catchup-container h3 {
  color: #a78bfa;
}

.v2-following-shell .v2-interrupt-container.following-newseries-container {
  border-left: 3px solid #22c55e;
}
.v2-following-shell .v2-interrupt-container.following-newseries-container h3 {
  color: #4ade80;
}

/* Badge Overlays on Horizontal Interruption Cards */
.following-catchup-cover-wrap {
  position: relative;
  width: 58px;
  height: 76px;
  flex-shrink: 0;
}

.following-catchup-badge,
.following-newseries-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(8, 10, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.following-catchup-badge {
  color: #a78bfa;
}

.following-newseries-badge {
  color: #4ade80;
}

/* Quick Read Button inside Interrupt Cards */
.following-quick-read-btn {
  margin-top: auto;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.9);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 4px 10px;
  cursor: pointer;
  text-align: center;
  transition: background 180ms ease, color 180ms ease;
  width: max-content;
}

.following-quick-read-btn:hover {
  background: var(--accent-3);
  color: #ffffff;
}

/* Auth V2 Premium Styles & Animations */

@keyframes cosmic-float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes star-shimmer {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

.v2-auth-flow {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.auth-panel-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  width: 100%;
}

.auth-desktop-showcase {
  display: none;
}

/* Trust Row below Action Stack */
.auth-trust-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-trust-row span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Verification Header Warning Banner */
.verification-banner {
  position: fixed;
  top: var(--topbar);
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: linear-gradient(90deg, #120e1f 0%, #0c0812 100%);
  border-bottom: 2px solid #8b5cf6;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
  color: #e2e8f0;
  animation: slideDown 0.3s ease-out;
}

.verification-banner .banner-text {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.verification-banner .banner-text::before {
  content: "✉️";
  font-size: 1.1rem;
}

.verification-banner .banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.verification-banner button[data-banner-resend],
.verification-banner button[data-banner-refresh] {
  background: #7c3aed;
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.verification-banner button[data-banner-resend]:hover,
.verification-banner button[data-banner-refresh]:hover {
  background: #6d28d9;
}

.verification-banner button[data-banner-dismiss] {
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition-fast);
}

.verification-banner button[data-banner-dismiss]:hover {
  color: #ffffff;
}

/* Layout adjusting class when banner is active */
body.has-verification-banner #app {
  margin-top: 42px; /* push main content down below banner */
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Widescreen split desktop layout (1024px and up) */
@media (min-width: 1024px) {
  .v2-auth-flow {
    flex-direction: row;
    display: grid !important;
    grid-template-columns: 1.2fr 1fr;
    min-height: 100vh;
  }

  .auth-panel-container {
    height: 100vh;
    overflow-y: auto;
    background: #06070c;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }

  .auth-desktop-showcase {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 30% 30%, #1e1233 0%, #090511 100%);
    position: relative;
    overflow: hidden;
    padding: 60px;
    height: 100vh;
  }

  .showcase-content {
    max-width: 520px;
    text-align: center;
    z-index: 2;
    position: relative;
  }

  .showcase-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 28px 0 12px 0;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
  }

  .showcase-content p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .showcase-mascot-wrap {
    position: relative;
    display: inline-flex;
    margin: 0 auto;
  }

  .floating-mascot {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(124, 58, 237, 0.3));
    animation: cosmic-float 6s ease-in-out infinite;
  }

  /* Star and cosmic background decoration */
  .auth-star {
    animation: star-shimmer 3s ease-in-out infinite;
  }

  /* Floating Mock Comic Covers Behind Mascot */
  .showcase-covers {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }

  .showcase-cover {
    position: absolute;
    width: 110px;
    height: 150px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    opacity: 0.15;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .showcase-cover.a {
    top: 15%;
    left: 10%;
    transform: rotate(-12deg);
    background-image: url("/uploads/covers/demo-cover-1.jpg"), linear-gradient(#2d1b4e, #110822);
  }

  .showcase-cover.b {
    bottom: 20%;
    left: 8%;
    transform: rotate(8deg);
    background-image: url("/uploads/covers/demo-cover-2.jpg"), linear-gradient(#2d1b4e, #110822);
  }

  .showcase-cover.c {
    top: 25%;
    right: 10%;
    transform: rotate(15deg);
    background-image: url("/uploads/covers/demo-cover-3.jpg"), linear-gradient(#2d1b4e, #110822);
  }
}

/* Specificity fixes to hide main navigation on auth screen */
body[data-auth-screen="true"] .topbar,
body[data-auth-screen="true"] .sidebar,
body[data-auth-screen="true"] .bottom-nav {
  display: none !important;
}

@media (min-width: 1024px) {
  /* Hide redundant visual assets in the right panel when desktop showcase is visible */
  .auth-panel-container .auth-visual,
  .auth-panel-container .auth-entry-copy,
  .auth-panel-container .auth-peek {
    display: none !important;
  }
}

/* Final auth repair guards: these target classes on the auth root itself and
   arbitrary utility names that are awkward as plain CSS class selectors. */
body[data-auth-screen="true"] #app [data-auth-root][class~="flex"] {
  display: flex !important;
}

body[data-auth-screen="true"] #app [data-auth-root][class~="w-full"] {
  width: 100% !important;
}

body[data-auth-screen="true"] #app [data-auth-root][class~="h-full"] {
  height: 100% !important;
}

body[data-auth-screen="true"] #app [data-auth-root] [data-auth-panel][style*="display: none"],
body[data-auth-screen="true"] #app [data-auth-root] [data-auth-panel][style*="display:none"] {
  display: none !important;
}

@media (max-width: 1023px) {
  body[data-auth-screen="true"] #app {
    min-height: 100svh !important;
    height: 100svh !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] {
    position: relative !important;
    min-height: 100svh !important;
    height: 100svh !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #05060d !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > aside {
    display: flex !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    pointer-events: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > aside > .absolute {
    inset: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > aside > .relative {
    display: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > main {
    width: min(100%, 430px) !important;
    min-height: 100svh !important;
    height: 100svh !important;
    margin: 0 auto !important;
    padding: 18px !important;
    border-left: 0 !important;
    background: transparent !important;
    position: relative !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow-y: auto !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > main::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(circle at 50% 20%, rgba(208, 188, 255, 0.18), transparent 32%),
      linear-gradient(180deg, rgba(5, 6, 13, 0.16), rgba(5, 6, 13, 0.82));
    pointer-events: none;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > main header {
    margin-bottom: 14px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > main > .flex-grow {
    flex: 0 0 auto !important;
    max-width: 100% !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-panel] {
    padding: 22px 18px !important;
    border: 1px solid rgba(208, 188, 255, 0.16) !important;
    border-radius: 20px !important;
    background: rgba(17, 19, 28, 0.82) !important;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36) !important;
    backdrop-filter: blur(18px);
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-entry-mascot] {
    margin-bottom: 0.75rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-entry-mascot] img {
    width: 4.5rem !important;
    height: 4.5rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] .text-display-lg {
    font-size: 26px !important;
    line-height: 32px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] footer {
    margin-top: 14px !important;
    padding-top: 0 !important;
    border-top: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] > main {
    justify-content: flex-start !important;
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] > main header {
    flex: 0 0 auto !important;
    margin-bottom: 10px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] #auth-header-left [data-auth-view] {
    position: relative !important;
    top: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] > main > .flex-grow {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-panel="login"] {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-login-mascot] {
    margin-bottom: 0.5rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-login-mascot] img {
    width: 3.75rem !important;
    height: 3.75rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-panel="login"] .mb-6 {
    margin-bottom: 1rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] footer {
    flex: 0 0 auto !important;
    margin-top: 10px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] > main {
    justify-content: flex-start !important;
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] > main header {
    flex: 0 0 auto !important;
    margin-bottom: 10px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] #auth-header-left [data-auth-view] {
    position: relative !important;
    top: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] > main > .flex-grow {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-panel="signup"] {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-signup-mascot] {
    margin-bottom: 0.375rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-signup-mascot] img {
    width: 3.5rem !important;
    height: 3.5rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-panel="signup"] .mb-6 {
    margin-bottom: 0.875rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-create-form] {
    gap: 0.75rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] .auth-strength {
    margin-bottom: 0.25rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] footer {
    flex: 0 0 auto !important;
    margin-top: 10px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-forgot-mascot] {
    margin-bottom: 0.5rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-forgot-mascot] img {
    width: 3.75rem !important;
    height: 3.75rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-reset-form] {
    gap: 1rem !important;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  body[data-auth-screen="true"] #app [data-auth-root] > main {
    width: min(100%, 520px) !important;
    padding: 32px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-panel] {
    position: relative !important;
    padding: 32px !important;
    overflow: hidden !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-entry-mascot] {
    position: absolute !important;
    right: -1.25rem !important;
    top: -1.5rem !important;
    z-index: 0 !important;
    margin: 0 !important;
    opacity: 0.12 !important;
    pointer-events: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-entry-mascot] img {
    width: 10rem !important;
    height: 10rem !important;
    filter: saturate(0.9) blur(0.2px);
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-panel="entry"] > :not([data-auth-entry-mascot]) {
    position: relative !important;
    z-index: 1 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] .text-display-lg {
    font-size: 32px !important;
    line-height: 40px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] > main {
    justify-content: center !important;
    padding-top: 32px !important;
    padding-bottom: 24px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-panel="login"] {
    position: relative !important;
    padding-top: 28px !important;
    padding-bottom: 28px !important;
    overflow: hidden !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-login-mascot] {
    position: absolute !important;
    right: -1rem !important;
    top: -1.25rem !important;
    z-index: 0 !important;
    margin: 0 !important;
    opacity: 0.12 !important;
    pointer-events: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-login-mascot] img {
    width: 9rem !important;
    height: 9rem !important;
    filter: saturate(0.9) blur(0.2px);
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-panel="login"] > :not([data-auth-login-mascot]) {
    position: relative !important;
    z-index: 1 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] > main {
    justify-content: center !important;
    padding-top: 32px !important;
    padding-bottom: 24px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-panel="signup"] {
    position: relative !important;
    padding-top: 28px !important;
    padding-bottom: 28px !important;
    overflow: hidden !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-signup-mascot] {
    position: absolute !important;
    right: -1rem !important;
    top: -1.25rem !important;
    z-index: 0 !important;
    margin: 0 !important;
    opacity: 0.12 !important;
    pointer-events: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-signup-mascot] img {
    width: 9rem !important;
    height: 9rem !important;
    filter: saturate(0.9) blur(0.2px);
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-panel="signup"] > :not([data-auth-signup-mascot]) {
    position: relative !important;
    z-index: 1 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-create-form] {
    gap: 0.875rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] .auth-strength {
    margin-bottom: 0.25rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-panel="forgot"] {
    position: relative !important;
    overflow: hidden !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-forgot-mascot] {
    position: absolute !important;
    right: -1rem !important;
    top: -1.25rem !important;
    z-index: 0 !important;
    margin: 0 !important;
    opacity: 0.12 !important;
    pointer-events: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-forgot-mascot] img {
    width: 9rem !important;
    height: 9rem !important;
    filter: saturate(0.9) blur(0.2px);
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-panel="forgot"] > :not([data-auth-forgot-mascot]) {
    position: relative !important;
    z-index: 1 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-reset-form] {
    gap: 1rem !important;
  }
}

@media (min-width: 1024px) {
  body[data-auth-screen="true"] #app [data-auth-root] [class~="lg:flex"] {
    display: flex !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [class~="lg:w-[480px]"] {
    width: 480px !important;
    flex: 0 0 480px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [class~="lg:w-96"] {
    width: 24rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [class~="lg:h-96"] {
    height: 24rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] [data-auth-entry-mascot] {
    display: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-login-mascot] {
    display: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-signup-mascot] {
    display: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-forgot-mascot] {
    display: none !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] > main {
    justify-content: center !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] > main {
    justify-content: center !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] > main > .flex-grow {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] > main > .flex-grow {
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-panel="login"] {
    padding-top: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-panel="signup"] {
    padding-top: 0 !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="login"] [data-auth-panel="login"] .mb-6 {
    margin-bottom: 1rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-panel="signup"] .mb-6 {
    margin-bottom: 0.875rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] [data-auth-create-form] {
    gap: 0.875rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="signup"] .auth-strength {
    margin-bottom: 0.25rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root][data-auth-view="forgot"] [data-auth-reset-form] {
    gap: 1rem !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > aside h2 {
    font-size: 32px !important;
    line-height: 40px !important;
  }

  body[data-auth-screen="true"] #app [data-auth-root] > aside p {
    opacity: 0.86 !important;
  }
}

