/* ============================================================
   BluBellFun — foundations, shell, shared components
   ============================================================ */

:root {
  --font-text: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Manrope', ui-sans-serif, system-ui, sans-serif;

  --bg: #07070b;
  --bg-soft: #0a0a10;
  --surface: #101017;
  --surface-2: #16161f;
  --surface-3: #1e1e29;
  --surface-4: #292935;
  --text: #f5f5f9;
  --text-soft: #d2d2dc;
  --muted: #9b9bad;
  --muted-2: #767686;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  --primary: #97abff;
  --primary-hover: #adbdff;
  --primary-ink: #0a0d20;
  --primary-rgb: 151, 171, 255;
  --primary-soft: rgba(151, 171, 255, 0.12);
  --primary-glow: rgba(151, 171, 255, 0.32);

  --rose: #f2a7bb;
  --rose-rgb: 242, 167, 187;
  --rose-soft: rgba(242, 167, 187, 0.12);
  --mint: #84e0b3;
  --amber: #ffcf7d;
  --danger: #ff7a7a;

  --glass: rgba(8, 8, 13, 0.74);
  --glass-strong: rgba(10, 10, 16, 0.92);
  --shadow: 0 32px 80px -34px rgba(0, 0, 0, 0.86);
  --shadow-soft: 0 18px 44px -24px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 18px 40px -26px rgba(0, 0, 0, 0.85);
  --gradient: linear-gradient(118deg, #a9b8ff 0%, #c3a8ff 48%, #f5a9be 100%);
  --gradient-soft: linear-gradient(120deg, rgba(151, 171, 255, 0.16), rgba(242, 167, 187, 0.12));
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 78px;
  --page-max: 1320px;
  --ease: cubic-bezier(0.22, 0.75, 0.25, 1);
  color-scheme: dark;
}

html[data-theme='light'] {
  --bg: #f4f2ed;
  --bg-soft: #eeece5;
  --surface: #ffffff;
  --surface-2: #f8f5ef;
  --surface-3: #ece8df;
  --surface-4: #e0dbd0;
  --text: #15151c;
  --text-soft: #3b3b47;
  --muted: #6e6e7c;
  --muted-2: #8f8f9b;
  --line: rgba(21, 21, 28, 0.085);
  --line-strong: rgba(21, 21, 28, 0.16);

  --primary: #5063d6;
  --primary-hover: #4053c2;
  --primary-ink: #ffffff;
  --primary-rgb: 80, 99, 214;
  --primary-soft: rgba(80, 99, 214, 0.1);
  --primary-glow: rgba(80, 99, 214, 0.24);

  --rose: #c25275;
  --rose-rgb: 194, 82, 117;
  --rose-soft: rgba(194, 82, 117, 0.1);
  --mint: #16784f;
  --amber: #9a6600;
  --danger: #c23b3b;

  --glass: rgba(247, 245, 240, 0.84);
  --glass-strong: rgba(250, 248, 244, 0.96);
  --shadow: 0 32px 70px -36px rgba(29, 31, 54, 0.32);
  --shadow-soft: 0 18px 40px -26px rgba(29, 31, 54, 0.24);
  --shadow-card: 0 18px 36px -28px rgba(29, 31, 54, 0.3);
  --gradient: linear-gradient(118deg, #4559c8 0%, #7357c5 52%, #c25275 100%);
  --gradient-soft: linear-gradient(120deg, rgba(80, 99, 214, 0.1), rgba(194, 82, 117, 0.08));
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 560px at 8% -10%, rgba(var(--primary-rgb), 0.13), transparent 62%),
    radial-gradient(820px 520px at 102% -4%, rgba(var(--rose-rgb), 0.09), transparent 60%),
    radial-gradient(1000px 700px at 50% 112%, rgba(var(--primary-rgb), 0.05), transparent 65%);
}

html[data-theme='light'] body::before {
  background:
    radial-gradient(900px 560px at 8% -10%, rgba(var(--primary-rgb), 0.09), transparent 62%),
    radial-gradient(820px 520px at 102% -4%, rgba(var(--rose-rgb), 0.07), transparent 60%);
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--primary);
  color: var(--primary-ink);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 34px);
}

.page {
  padding-block: clamp(22px, 3vw, 34px) 0;
  animation: pageIn 0.5s var(--ease) both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.eyebrow.rose {
  color: var(--rose);
}

.eyebrow.muted {
  color: var(--muted);
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 18px 40px -32px rgba(0, 0, 0, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  box-shadow: 0 10px 24px -12px rgba(var(--primary-rgb), 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.35s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.04);
}

.brand-word {
  white-space: nowrap;
  color: var(--text);
}

.brand-word span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-search {
  position: relative;
  flex: 0 1 344px;
  min-width: 190px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 12px 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.search-box:hover {
  border-color: var(--line-strong);
}

.search-box:focus-within {
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--primary-soft);
  color: var(--text);
}

.search-box .icon {
  width: 17px;
  height: 17px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.search-kbd {
  flex: none;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}

.nav-link .icon {
  width: 17px;
  height: 17px;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.is-active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-soft);
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}

.icon-btn:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn .count-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--rose);
  color: #2a0d16;
  font-size: 9px;
  font-weight: 800;
  line-height: 12px;
  text-align: center;
}

.header-search-toggle {
  display: none;
}

.theme-toggle .theme-icon-sun {
  display: none;
}

html[data-theme='dark'] .theme-toggle .theme-icon-sun {
  display: block;
}

html[data-theme='dark'] .theme-toggle .theme-icon-moon {
  display: none;
}

.profile-wrap {
  position: relative;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--av1, #9db4ff), var(--av2, #f2a7bb));
  color: #14101c;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.avatar-xl {
  width: 92px;
  height: 92px;
  font-size: 30px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 18px 40px -22px rgba(0, 0, 0, 0.6);
}

.user-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 6px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  transition: border-color 0.18s, background 0.18s;
}

.user-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.user-button .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: popIn 0.2s var(--ease);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.user-menu-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.user-menu-head b {
  display: block;
  font-size: 14px;
}

.user-menu-head span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: background 0.16s, color 0.16s;
}

.menu-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.menu-item .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.menu-item.danger {
  color: var(--danger);
}

/* ---------------- Search popover ---------------- */

.search-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 95;
  width: min(430px, 92vw);
  max-height: min(72vh, 620px);
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: popIn 0.18s var(--ease);
}

.search-pop[hidden] {
  display: none;
}

.search-section {
  padding: 8px 10px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.search-result {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  text-align: left;
  transition: background 0.14s;
}

.search-result:hover,
.search-result.is-active {
  background: var(--surface-2);
}

.search-result-cover {
  width: 34px;
  height: 50px;
  flex: none;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.8);
}

.search-result-cover svg {
  width: 100%;
  height: 100%;
}

.search-result-main {
  min-width: 0;
  flex: 1;
}

.search-result-main b {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-main span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-main mark {
  border-radius: 3px;
  background: rgba(var(--primary-rgb), 0.24);
  color: var(--text);
}

.search-result .icon {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.search-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.search-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px 10px;
}

.search-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, filter 0.18s;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 12px 28px -14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 18px 34px -14px var(--primary-glow);
}

.btn-soft {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.btn-soft:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface);
}

.btn-glass {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-rose {
  background: var(--rose);
  color: #2a0d16;
  box-shadow: 0 12px 26px -14px rgba(var(--rose-rgb), 0.5);
}

.btn-sm {
  height: 36px;
  padding: 0 15px;
  font-size: 12.5px;
}

.btn-lg {
  height: 50px;
  padding: 0 26px;
  font-size: 14.5px;
}

.btn-block {
  width: 100%;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: color 0.18s;
}

.btn-text:hover {
  color: var(--text);
}

.btn-text .icon {
  width: 15px;
  height: 15px;
}

/* ---------------- Chips, badges, pills ---------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}

.chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

.chip:active {
  transform: scale(0.97);
}

.chip.is-active {
  border-color: rgba(var(--primary-rgb), 0.55);
  background: var(--primary-soft);
  color: var(--primary);
}

.chip .icon {
  width: 14px;
  height: 14px;
}

.chip-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-primary {
  border-color: rgba(var(--primary-rgb), 0.26);
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-rose {
  border-color: rgba(var(--rose-rgb), 0.26);
  background: var(--rose-soft);
  color: var(--rose);
}

.badge-mint {
  border-color: rgba(132, 224, 179, 0.24);
  background: rgba(132, 224, 179, 0.1);
  color: var(--mint);
}

.badge-amber {
  border-color: rgba(255, 207, 125, 0.24);
  background: rgba(255, 207, 125, 0.1);
  color: var(--amber);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.rating .icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}

.rating small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

/* ---------------- Covers & title cards ---------------- */

.cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 15px;
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
  isolation: isolate;
  transform: translateZ(0);
}

.cover > svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: saturate(1.1) brightness(1.06);
  transition: transform 0.7s var(--ease), filter 0.3s;
}

.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.cover-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}

.title-card {
  position: relative;
  min-width: 0;
}

.title-card:hover .cover > svg {
  transform: scale(1.045);
}

.title-card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 2px 0;
}

.title-card-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.title-card-name a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.title-card-name a:hover {
  color: var(--primary);
}

.title-card-sub {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.title-card .rating {
  flex: none;
  padding-top: 2px;
  font-size: 11.5px;
}

.rating-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 8, 14, 0.56);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rating-badge .icon {
  width: 11px;
  height: 11px;
  fill: var(--amber);
  stroke: none;
}

.trend-rank {
  position: absolute;
  top: -6px;
  left: 6px;
  z-index: 4;
  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0.94;
}

.bookmark-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 8, 14, 0.46);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s, transform 0.2s, background 0.2s, color 0.2s;
}

.title-card:hover .bookmark-btn,
.bookmark-btn:focus-visible,
.bookmark-btn.is-saved {
  opacity: 1;
  transform: none;
}

.bookmark-btn:hover {
  background: rgba(8, 8, 14, 0.72);
}

.bookmark-btn.is-saved {
  border-color: transparent;
  background: var(--rose);
  color: #2a0d16;
}

.bookmark-btn.is-saved .icon {
  fill: currentColor;
}

.bookmark-btn .icon {
  width: 16px;
  height: 16px;
}

.bookmark-btn.wide {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text-soft);
  opacity: 1;
  transform: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.bookmark-btn.wide:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
  color: var(--text);
}

.bookmark-btn.wide.is-saved {
  border-color: rgba(var(--rose-rgb), 0.3);
  background: var(--rose-soft);
  color: var(--rose);
}

.bookmark-btn.wide .icon {
  width: 17px;
  height: 17px;
}

/* ---------------- Section headings ---------------- */

.section {
  margin-top: clamp(42px, 5vw, 66px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-head-copy {
  min-width: 0;
}

.section-title {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.16;
}

.section-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.section-link:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.section-link .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
}

.section-link:hover .icon {
  transform: translateX(2px);
}

/* ---------------- Panels, forms ---------------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-pad {
  padding: clamp(18px, 2.4vw, 26px);
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.input::placeholder {
  color: var(--muted-2);
}

.input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.select {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  appearance: none;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.select:hover {
  border-color: var(--line-strong);
}

.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--muted);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.search-field:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--text);
  font-size: 13.5px;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field .icon {
  width: 18px;
  height: 18px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  margin-top: clamp(60px, 7vw, 96px);
  padding: 54px 0 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(var(--primary-rgb), 0.03));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: clamp(28px, 5vw, 64px);
}

.footer-brand .brand {
  font-size: 20px;
}

.footer-tagline {
  max-width: 330px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.footer-title {
  margin-bottom: 14px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.footer-links a,
.footer-links button {
  display: block;
  padding: 6px 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  transition: color 0.16s;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.footer-bottom .heart {
  color: var(--rose);
}

.footer-legal {
  max-width: 640px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

/* ---------------- Mobile navigation ---------------- */

.mobile-nav {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 70;
  display: none;
  align-items: stretch;
  height: 64px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--glass-strong);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}

.mobile-nav-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  transition: color 0.16s, background 0.16s;
}

.mobile-nav-link .icon {
  width: 20px;
  height: 20px;
}

.mobile-nav-link.is-active {
  background: var(--surface-2);
  color: var(--text);
}

.mobile-nav-link.is-active .icon {
  color: var(--primary);
}

/* ---------------- Modal ---------------- */

.modal {
  width: min(500px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(3, 3, 7, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal[open] {
  animation: modalIn 0.28s var(--ease);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-inner {
  display: flex;
  flex-direction: column;
  max-height: min(86vh, 760px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
}

.modal-head h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.modal-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: background 0.16s, color 0.16s;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal-close .icon {
  width: 16px;
  height: 16px;
}

.modal-body {
  overflow: auto;
  padding: 20px 24px;
}

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
}

.modal-foot .btn {
  flex: 1;
}

/* ---------------- Toasts ---------------- */

.toast-stack {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 220;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(92vw, 520px);
  transform: translateX(-50%);
  pointer-events: none;
}

body.is-reader .toast-stack {
  bottom: 86px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  font-weight: 650;
  animation: toastIn 0.28s var(--ease);
}

.toast .icon {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.toast.is-leaving {
  animation: toastOut 0.2s var(--ease) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

/* ---------------- Empty / loading / misc ---------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(44px, 7vw, 76px) 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-art {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  margin-bottom: 18px;
  border-radius: 28px;
  background: var(--gradient-soft);
  color: var(--primary);
  transform: rotate(-4deg);
}

.empty-art .icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.4;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.empty-state p {
  max-width: 390px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.divider {
  height: 1px;
  margin-block: 22px;
  border: 0;
  background: var(--line);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.link-arrow .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

.progress-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--gradient);
}

.chapter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}

.chapter-pill:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.chapter-pill.is-current {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-ink);
}

/* ---------------- Responsive shell ---------------- */

@media (max-width: 1320px) {
  .header-search {
    flex-basis: 280px;
  }
  .nav-link {
    padding: 0 10px;
    font-size: 12.5px;
  }
  .nav-link .icon {
    display: none;
  }
}

@media (max-width: 1020px) {
  .main-nav {
    display: none;
  }
  .header-search {
    flex: 1 1 auto;
    max-width: 420px;
  }
  .mobile-nav {
    display: flex;
  }
  body:not(.is-reader) {
    padding-bottom: 88px;
  }
  .site-footer {
    padding-bottom: 70px;
  }
  .toast-stack {
    bottom: 88px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 68px;
  }
  .header-inner {
    gap: 10px;
  }
  .header-search {
    display: none;
  }
  .header-search-toggle {
    display: inline-grid;
  }
  .header-library {
    display: none;
  }
  .brand {
    font-size: 19px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .header-actions {
    margin-left: auto;
  }
  .mobile-nav {
    display: flex;
  }
  body:not(.is-reader) {
    padding-bottom: 88px;
  }
  .site-footer {
    padding-bottom: 70px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px 24px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .toast-stack {
    bottom: 88px;
  }
  .site-footer {
    margin-top: 52px;
  }
}

@media (max-width: 620px) {
  .brand-word {
    display: none;
  }
  .header-actions .icon-btn {
    width: 38px;
    height: 38px;
  }
  .user-button {
    height: 38px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .section-link {
    padding-inline: 0;
  }
  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    margin: auto 0 0;
  }
  dialog.modal {
    margin: auto 0 0;
  }
  .modal-inner {
    max-height: 92vh;
  }
  .modal-head {
    padding: 20px 20px 0;
  }
  .modal-body {
    padding: 16px 20px;
  }
  .modal-foot {
    padding: 14px 20px 20px;
  }
}

/* ---------------- Search sheet & auth bits ---------------- */

body.is-search-open {
  overflow: hidden;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  overflow-y: auto;
  background: var(--bg);
  animation: pageIn 0.25s var(--ease);
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay-head {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px 48px;
}

.search-overlay-form {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
}

.search-overlay-form > .icon {
  width: 21px;
  height: 21px;
}

.search-overlay-form input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.search-overlay-form input::placeholder {
  color: var(--muted-2);
}

.search-overlay-body {
  padding-top: 8px;
}

.search-overlay-body .search-result {
  padding: 10px 6px;
}

.search-overlay-body .search-result-cover {
  width: 42px;
  height: 61px;
  border-radius: 7px;
}

.search-overlay-body .search-result-main b {
  font-size: 14px;
}

.search-overlay .search-empty {
  padding-block: 48px;
}

.search-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-section span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.search-clear {
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

.search-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.search-hint .icon {
  width: 15px;
  height: 15px;
}

.search-suggest {
  margin-top: 12px;
  padding: 12px 10px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.search-suggest a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 700;
}

.search-suggest .icon {
  width: 13px;
  height: 13px;
}

.search-quick .chip {
  height: 29px;
  padding: 0 10px;
  font-size: 11px;
}

.search-quick .chip .icon {
  width: 12px;
  height: 12px;
}

/* Auth & confirm dialogs */

.auth-form .field + .field {
  margin-top: 15px;
}

.auth-art {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--gradient-soft);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.auth-art .icon {
  width: 22px;
  height: 22px;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-note .icon {
  width: 13px;
  height: 13px;
  flex: none;
  margin-top: 1px;
  color: var(--primary);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.swatch {
  position: relative;
  width: 38px;
  height: 38px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--s1), var(--s2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}

.swatch:hover {
  transform: scale(1.07);
}

.swatch.is-active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.form-error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 600;
}

.confirm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-block: 8px;
  text-align: center;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

.confirm-icon.danger {
  background: rgba(255, 122, 122, 0.12);
  color: var(--danger);
}

.confirm-icon .icon {
  width: 25px;
  height: 25px;
}

.confirm-body p {
  max-width: 360px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
}

.login-btn .icon {
  width: 15px;
  height: 15px;
}


@media (min-width: 380px) and (max-width: 620px) {
  .brand-word {
    display: inline;
  }
  .brand {
    font-size: 17px;
    letter-spacing: -0.04em;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
}


@media (hover: none), (max-width: 720px) {
  .bookmark-btn {
    opacity: 1;
    transform: none;
  }
}


/* The hidden attribute must always win over component display rules. */
[hidden] {
  display: none !important;
}

/* ---------------- Auth tabs ---------------- */

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.auth-tab {
  flex: 1;
  height: 34px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  transition: background 0.16s, color 0.16s;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.25);
}

.brand .brand-mark--bell {
  width: 38px;
  height: 42px;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

@media (max-width: 900px) {
  .brand .brand-mark--bell {
    width: 32px;
    height: 36px;
  }
}

.cover > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(1.06);
  transition: transform 0.7s var(--ease), filter 0.3s;
}

.title-card:hover .cover > img {
  transform: scale(1.035);
}

/* Mobile usability: larger targets and bottom-nav breathing room. */
@media (max-width: 900px) {
  body:not(.is-reader) {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }
  .toast-stack {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 620px) {
  .chip {
    height: 38px;
    padding-inline: 14px;
  }
  .library-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
  }
  .library-intro .link-arrow {
    align-self: flex-start;
  }
  .hero-dot {
    width: 22px;
    height: 22px;
  }
  .hero-dot.is-active {
    width: 30px;
  }
  .hero-dots {
    gap: 0;
    padding: 4px 5px;
  }
}
