:root {
  --bg: #0a0a0f;
  --bg-soft: #0f1020;
  --surface: rgba(18, 20, 36, 0.72);
  --surface-strong: rgba(14, 16, 30, 0.84);
  --surface-muted: rgba(24, 28, 48, 0.64);
  --border: rgba(150, 113, 224, 0.24);
  --border-soft: rgba(150, 113, 224, 0.16);
  --text: #ffffff;
  --text-soft: #a0a0b8;
  --text-muted: #8f95ad;
  --accent-a: #8a2be2;
  --accent-b: #4b0082;
  --accent-c: #8fc8ff;
  --success: #7ee2ae;
  --danger: #ef778b;
  --radius: 20px;
  --radius-sm: 16px;
  --space-1: 8px;
  --space-2: 14px;
  --space-3: 18px;
  --space-4: 26px;
  --btn-h: 44px;
  --label-size: 13px;
  --title-size: 15px;
  --meta-size: 11px;
  --shadow-soft: 0 8px 18px rgba(6, 7, 16, 0.24);
  --shadow-panel: 0 14px 30px rgba(4, 5, 12, 0.28);
}

html[data-theme="light"],
.theme-light,
body.theme-light {
  --bg: #f7f9fc;
  --bg-soft: #edf2fa;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-muted: rgba(243, 247, 255, 0.95);
  --border: rgba(160, 180, 214, 0.52);
  --border-soft: rgba(160, 180, 214, 0.34);
  --text: #111c2e;
  --text-soft: #5f7090;
  --text-muted: #7a8cac;
  --accent-a: #2f6fc5;
  --accent-b: #265596;
  --accent-c: #56a8ff;
  --shadow-soft: 0 10px 24px rgba(19, 40, 74, 0.08);
  --shadow-panel: 0 16px 34px rgba(19, 40, 74, 0.12);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.open-collection-ui {
  background:
    radial-gradient(1200px 520px at 18% -8%, rgba(88, 44, 148, 0.3), transparent 56%),
    radial-gradient(900px 420px at 95% 4%, rgba(58, 92, 186, 0.2), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 45%, var(--bg) 100%) !important;
  color: var(--text);
}

body.open-collection-ui *,
body.open-collection-ui *::before,
body.open-collection-ui *::after {
  box-sizing: border-box;
}

body.open-collection-ui .ambient,
body.open-collection-ui .birds-layer,
body.open-collection-ui .brand-watermark,
body.open-collection-ui .archive-passport {
  display: none !important;
}

body.open-collection-ui .page-shell.miniapp-shell {
  width: min(calc(100% - 24px), 1040px);
  max-width: calc(100% - 24px);
  margin: 0 auto;
  padding: 14px 0 94px;
}

body.open-collection-ui.has-floating-post-nav .page-shell.miniapp-shell {
  padding-bottom: 158px;
}

body.open-collection-ui.has-reading-float .page-shell.miniapp-shell {
  padding-bottom: 236px;
}

body.open-collection-ui.has-reading-float.has-floating-post-nav .page-shell.miniapp-shell {
  padding-bottom: 268px;
}

body.open-collection-ui .panel,
body.open-collection-ui .feed-card,
body.open-collection-ui .post-card,
body.open-collection-ui .folder-card,
body.open-collection-ui .post-showcase,
body.open-collection-ui .post-media,
body.open-collection-ui .post-comments-panel,
body.open-collection-ui .comment-item,
body.open-collection-ui .reading-float,
body.open-collection-ui .empty-state {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.open-collection-ui .miniapp-head {
  position: relative;
  margin-top: 20px;
  padding: 22px 18px 16px;
  display: grid;
  gap: 10px;
  background:
    radial-gradient(120% 140% at 6% 0%, rgba(88, 44, 148, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(14, 17, 33, 0.96), rgba(10, 13, 26, 0.98));
  border-color: var(--border);
  box-shadow: 0 18px 38px rgba(4, 5, 12, 0.34);
  overflow: hidden;
}

body.open-collection-ui .theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(22, 30, 54, 0.72);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(7, 10, 20, 0.28);
}

body.open-collection-ui .theme-toggle .theme-icon {
  width: 20px;
  height: 20px;
}

html[data-theme="light"] body.open-collection-ui .theme-toggle,
body.theme-light.open-collection-ui .theme-toggle {
  background: rgba(239, 245, 255, 0.94);
  color: #23446f;
  border-color: rgba(157, 178, 213, 0.72);
  box-shadow: 0 8px 16px rgba(34, 58, 92, 0.14);
}

body.open-collection-ui .hero-eyebrow {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.open-collection-ui .miniapp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  align-items: start;
  gap: 14px;
}

body.open-collection-ui .miniapp-title-group h1 {
  margin: 0;
  display: grid;
  gap: 4px;
  max-width: 10.5ch;
  color: var(--text);
  font-size: clamp(36px, 7.4vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.036em;
  text-wrap: balance;
  text-shadow: 0 0 6px rgba(162, 146, 255, 0.1);
}

body.open-collection-ui .miniapp-title-group .title-accent {
  color: var(--accent-c);
}

body.open-collection-ui .miniapp-title-group .brand-note {
  margin: 10px 0 0;
  max-width: 17ch;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.34;
}

body.open-collection-ui .hero-divider {
  width: 122px;
  height: 14px;
  margin-top: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(151, 116, 235, 0.14), transparent 62%),
    linear-gradient(90deg, rgba(151, 116, 235, 0), rgba(151, 116, 235, 0.28), rgba(151, 116, 235, 0));
  filter: blur(4px);
  opacity: 0.34;
}

body.open-collection-ui .hero-book-card {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(140, 112, 226, 0.28);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(86, 76, 166, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(17, 23, 40, 0.72), rgba(13, 18, 32, 0.76));
  box-shadow: 0 7px 14px rgba(8, 10, 20, 0.14);
}

body.open-collection-ui .hero-book-icon {
  width: 28px;
  height: auto;
  opacity: 0.8;
}

body.open-collection-ui .mini-head-controls {
  margin-top: 8px;
  display: grid;
  gap: var(--space-2);
}

body.open-collection-ui .mini-head-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

body.open-collection-ui .mini-back[hidden],
body.open-collection-ui .mini-head-actions > [hidden] {
  display: none !important;
}

body.open-collection-ui .miniapp-view-wrap {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.open-collection-ui .miniapp-view > * + * {
  margin-top: var(--space-3);
}

body.open-collection-ui .mini-route-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-strong);
  box-shadow: 0 8px 18px rgba(5, 8, 16, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  isolation: isolate;
}

body.open-collection-ui .mini-route-head h2,
body.open-collection-ui .mini-route-head h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 5.8vw, 32px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  max-width: 16ch;
}

body.open-collection-ui .mini-route-head h3 {
  font-size: clamp(20px, 4.7vw, 26px);
  line-height: 1.08;
  max-width: 18ch;
}

body.open-collection-ui .post-route-head {
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 12px;
}

body.open-collection-ui .post-route-head h2 {
  font-size: clamp(22px, 5.4vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: none;
  text-wrap: pretty;
}

body.open-collection-ui .post-route-head .chip {
  flex: 0 0 auto;
}

body.open-collection-ui .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body.open-collection-ui .feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

body.open-collection-ui .latest-section {
  display: grid;
  gap: var(--space-2);
}

body.open-collection-ui .latest-toggle {
  width: 100%;
}

body.open-collection-ui .latest-feed[hidden] {
  display: none !important;
}

body.open-collection-ui .latest-feed {
  display: none;
}

body.open-collection-ui .latest-feed.is-open {
  display: grid;
}

body.open-collection-ui .feed-card,
body.open-collection-ui .post-card,
body.open-collection-ui .folder-card {
  padding: 16px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.open-collection-ui .post-card {
  min-height: 168px;
}

body.open-collection-ui .feed-card .feed-card-body,
body.open-collection-ui .post-card .feed-card-body,
body.open-collection-ui .folder-card .feed-card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-1);
  text-align: left;
}

body.open-collection-ui .feed-card .feed-card-body h3,
body.open-collection-ui .post-card .feed-card-body h3,
body.open-collection-ui .folder-card .feed-card-body h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: var(--title-size);
  line-height: 1.34;
  letter-spacing: -0.015em;
  font-weight: 680;
}

body.open-collection-ui .post-card .feed-card-body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.3em * 2);
  margin-bottom: 10px;
}

body.open-collection-ui .feed-card .feed-card-body p,
body.open-collection-ui .post-card .feed-card-body p,
body.open-collection-ui .folder-card .feed-card-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.28;
}

body.open-collection-ui .post-card .feed-card-body > p:last-child {
  margin-bottom: 10px;
  line-height: 1.25;
}

body.open-collection-ui .folder-card .feed-card-body {
  padding-bottom: 6px;
}

body.open-collection-ui .folder-card .feed-card-body h3 {
  margin-bottom: 14px;
}

body.open-collection-ui .folder-meta {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.open-collection-ui .post-card .post-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  width: 100%;
  margin: 0 0 var(--space-2);
  min-height: 22px;
  padding: 0 2px;
  min-width: 0;
}

body.open-collection-ui .post-card .post-card-meta-left-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  justify-self: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.open-collection-ui .post-card .post-card-meta-left-slot > * {
  flex: 0 0 auto;
}

body.open-collection-ui .post-card .post-card-meta-time-slot {
  display: none !important;
}

body.open-collection-ui .post-card .post-card-meta-time-slot:empty {
  display: none;
}

body.open-collection-ui .post-card .post-card-meta-right-slot {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
  min-width: 0;
  justify-self: end;
}

body.open-collection-ui .post-card .post-card-meta-right-slot:empty {
  display: none;
}

body.open-collection-ui .post-card .post-card-meta-center-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  justify-self: center;
  overflow: hidden;
}

body.open-collection-ui .post-card .post-card-meta-center-slot:empty {
  display: none;
}

body.open-collection-ui .meta-favorite-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

body.open-collection-ui .meta-favorite-icon svg {
  width: 14px;
  height: 14px;
}

body.open-collection-ui .meta-favorite-icon svg path {
  transition: fill 0.18s ease, stroke 0.18s ease;
}

body.open-collection-ui .meta-rating-text,
body.open-collection-ui .meta-time-text,
body.open-collection-ui .post-rating-badge,
body.open-collection-ui .post-readtime-badge,
body.open-collection-ui .meta-sep {
  font-size: var(--meta-size);
  line-height: 1.2;
  color: var(--text-soft);
  font-weight: 600;
  white-space: nowrap;
}

body.open-collection-ui .meta-time-text {
  opacity: 0.95;
}

body.open-collection-ui .meta-sep {
  opacity: 0.62;
}

body.open-collection-ui .post-rating-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
}

body.open-collection-ui .meta-read-pill,
body.open-collection-ui .post-read-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 4px 10px;
  border-radius: 999px;
  border: none;
  background: rgba(138, 43, 226, 0.16);
  color: #d6c4ff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 0;
  flex-shrink: 0;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-theme="light"] body.open-collection-ui .meta-read-pill,
html[data-theme="light"] body.open-collection-ui .post-read-badge,
body.theme-light.open-collection-ui .meta-read-pill,
body.theme-light.open-collection-ui .post-read-badge {
  background: rgba(56, 112, 192, 0.14);
  color: #335e97;
  border: 1px solid rgba(123, 154, 203, 0.55);
}

body.open-collection-ui .meta-favorite-icon.is-filled svg path {
  fill: #be95ff;
  stroke: #9c6dff;
  stroke-width: 1.3px;
}

body.open-collection-ui .meta-favorite-icon.is-outline svg path {
  fill: none;
  stroke: #7e86a8;
  stroke-width: 1.5px;
}

html[data-theme="light"] body.open-collection-ui .meta-favorite-icon.is-filled svg path,
body.theme-light.open-collection-ui .meta-favorite-icon.is-filled svg path {
  fill: #b7903a;
  stroke: #8a6a25;
}

html[data-theme="light"] body.open-collection-ui .post-card .feed-card-body h3,
body.theme-light.open-collection-ui .post-card .feed-card-body h3 {
  color: #141d2e;
}

html[data-theme="light"] body.open-collection-ui .post-card .feed-card-body p,
body.theme-light.open-collection-ui .post-card .feed-card-body p {
  color: #7082a2;
}

body.open-collection-ui .button-like,
body.open-collection-ui .feed-button,
body.open-collection-ui .action-button,
body.open-collection-ui .action-link {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  min-height: var(--btn-h);
  height: var(--btn-h);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  background: var(--surface-muted);
  box-shadow: 0 4px 10px rgba(10, 10, 20, 0.12);
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  outline: none;
}

body.open-collection-ui .feed-button,
body.open-collection-ui .action-button,
body.open-collection-ui .action-link {
  border: 1px solid rgba(173, 137, 246, 0.34);
  color: #ffffff;
  background: linear-gradient(155deg, rgba(120, 56, 206, 0.92), rgba(72, 26, 134, 0.9) 62%, rgba(59, 19, 116, 0.92));
  box-shadow:
    0 7px 16px rgba(78, 30, 136, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.open-collection-ui .feed-button,
body.open-collection-ui .folder-open-button {
  width: 100%;
  margin-top: auto;
}

body.open-collection-ui .secondary-button.button-like {
  background: rgba(25, 29, 48, 0.66);
  color: var(--text-soft);
  border: 1px solid rgba(143, 114, 219, 0.2);
  box-shadow: 0 4px 10px rgba(8, 10, 20, 0.14);
  font-weight: 600;
}

body.open-collection-ui .danger-button {
  background: linear-gradient(135deg, #7a2238, #5a1730);
}

body.open-collection-ui .button-like:hover,
body.open-collection-ui .feed-button:hover,
body.open-collection-ui .action-button:hover,
body.open-collection-ui .action-link:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 18px rgba(76, 32, 142, 0.28);
}

body.open-collection-ui .button-like:active,
body.open-collection-ui .feed-button:active,
body.open-collection-ui .action-button:active,
body.open-collection-ui .action-link:active {
  transform: translateY(1px) scale(0.995);
}

body.open-collection-ui .button-like:focus-visible,
body.open-collection-ui .feed-button:focus-visible,
body.open-collection-ui .action-button:focus-visible,
body.open-collection-ui .action-link:focus-visible,
body.open-collection-ui input:focus-visible,
body.open-collection-ui textarea:focus-visible,
body.open-collection-ui select:focus-visible {
  outline: none;
  border-color: rgba(162, 125, 245, 0.66);
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

body.open-collection-ui .button-like:disabled,
body.open-collection-ui .feed-button:disabled,
body.open-collection-ui .action-button:disabled,
body.open-collection-ui .action-link:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

body.open-collection-ui input,
body.open-collection-ui textarea,
body.open-collection-ui select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(22, 28, 48, 0.64);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  padding: 11px 14px;
  outline: none;
}

body.open-collection-ui input::placeholder,
body.open-collection-ui textarea::placeholder {
  color: var(--text-muted);
}

body.open-collection-ui .mini-search-wrap input {
  min-height: var(--btn-h);
  background: rgba(19, 28, 54, 0.56);
  border-color: var(--border-soft);
}

body.open-collection-ui .field {
  display: grid;
  gap: 6px;
}

body.open-collection-ui .field span,
body.open-collection-ui .field label {
  color: var(--text-soft);
  font-size: var(--label-size);
  font-weight: 500;
}

body.open-collection-ui .mini-card-admin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

body.open-collection-ui .mini-card-admin-btn {
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
}

body.open-collection-ui .content-grid {
  display: grid;
  gap: 14px;
}

body.open-collection-ui .content-grid > * {
  min-width: 0;
}

body.open-collection-ui .post-showcase {
  padding: 16px;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

body.open-collection-ui .panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body.open-collection-ui .panel-head h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  color: var(--text);
}

body.open-collection-ui .reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-left: 0;
}

body.open-collection-ui .reader-toolbar > [data-bookmark-toggle],
body.open-collection-ui .reader-toolbar > [data-reader-toggle] {
  width: auto;
  flex: 0 0 auto;
}

body.open-collection-ui .reader-size-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

body.open-collection-ui .reader-btn {
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1;
  color: var(--text) !important;
  white-space: nowrap;
  letter-spacing: 0;
}

body.open-collection-ui .reader-size-controls [data-reader-size] {
  min-width: 50px;
  justify-content: center;
  padding: 0 10px;
}

body.open-collection-ui .reader-size-controls [data-reader-font] {
  width: auto;
  min-width: 132px;
  flex: 1 1 170px;
}

body.open-collection-ui .reader-size-controls[hidden] {
  display: none !important;
}

body.open-collection-ui .post-rating {
  margin-bottom: 8px;
}

body.open-collection-ui .post-rating-stars {
  display: inline-flex;
  gap: 4px;
}

body.open-collection-ui .rating-star {
  min-width: 28px;
  min-height: 28px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-soft);
  font-size: 16px;
  cursor: pointer;
}

body.open-collection-ui .rating-star.active {
  color: #d39a2b;
  border-color: rgba(211, 154, 43, 0.44);
}

body.open-collection-ui .post-rating-meta {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

body.open-collection-ui .post-description {
  color: var(--text);
  line-height: 1.64;
  font-size: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.open-collection-ui .post-description,
body.open-collection-ui .post-description * {
  box-sizing: border-box;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

body.open-collection-ui .post-description p,
body.open-collection-ui .post-description li,
body.open-collection-ui .post-description h1,
body.open-collection-ui .post-description h2,
body.open-collection-ui .post-description h3,
body.open-collection-ui .post-description h4,
body.open-collection-ui .post-description h5,
body.open-collection-ui .post-description h6 {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal !important;
}

body.open-collection-ui .post-description div,
body.open-collection-ui .post-description span,
body.open-collection-ui .post-description a,
body.open-collection-ui .post-description blockquote {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: normal !important;
}

body.open-collection-ui .post-description pre,
body.open-collection-ui .post-description code {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.open-collection-ui .post-description h1,
body.open-collection-ui .post-description h2,
body.open-collection-ui .post-description h3 {
  margin: 0.9em 0 0.45em;
  line-height: 1.12;
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
}

body.open-collection-ui .post-description h1 {
  font-size: 1.6em;
}

body.open-collection-ui .post-description h2 {
  font-size: 1.36em;
}

body.open-collection-ui .post-description h3 {
  font-size: 1.18em;
}

body.open-collection-ui .post-description ul,
body.open-collection-ui .post-description ol {
  margin: 0.65em 0 0.9em;
  padding-left: 1.2em;
}

body.open-collection-ui .post-description li {
  margin: 0.35em 0;
  line-height: 1.56;
}

body.open-collection-ui .miniapp-view.reader-mode .content-grid {
  grid-template-columns: 1fr;
}

body.open-collection-ui .miniapp-view.reader-mode .post-media {
  display: none;
}

body.open-collection-ui .miniapp-view.reader-mode .post-showcase {
  padding: 22px 20px;
}

body.open-collection-ui .miniapp-view.reader-mode .post-description,
body.open-collection-ui .miniapp-view.reader-mode .post-subtitle {
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
}

body.open-collection-ui .miniapp-view.reader-mode .post-description {
  font-size: calc(1.02rem * var(--reader-font-scale, 1));
  line-height: 1.78;
  letter-spacing: 0.004em;
  color: var(--text);
}

body.open-collection-ui .miniapp-view.reader-mode .post-subtitle {
  font-size: calc(0.94rem * var(--reader-font-scale, 1));
  line-height: 1.72;
  color: var(--text-soft);
}

body.open-collection-ui .miniapp-view.reader-mode[data-reader-font="sans"] .post-description,
body.open-collection-ui .miniapp-view.reader-mode[data-reader-font="sans"] .post-subtitle {
  font-family: "Manrope", "Segoe UI", -apple-system, sans-serif;
}

body.open-collection-ui .miniapp-view.reader-mode[data-reader-font="serif"] .post-description,
body.open-collection-ui .miniapp-view.reader-mode[data-reader-font="serif"] .post-subtitle {
  font-family: "Merriweather", "Georgia", "Times New Roman", serif;
}

body.open-collection-ui .miniapp-view.reader-mode[data-reader-font="mono"] .post-description,
body.open-collection-ui .miniapp-view.reader-mode[data-reader-font="mono"] .post-subtitle {
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

body.open-collection-ui .post-description img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  max-height: min(46vh, 340px);
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

body.open-collection-ui .post-description figure {
  margin: 0 0 12px;
}

body.open-collection-ui .post-media .image-wrap,
body.open-collection-ui .post-media .image-wrap-tall {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 14, 28, 0.5);
  max-height: min(44vh, 320px);
}

body.open-collection-ui .post-media .image-wrap img,
body.open-collection-ui .post-media .image-wrap-tall img,
body.open-collection-ui .post-media img {
  width: 100%;
  height: auto;
  max-height: min(44vh, 320px);
  object-fit: contain;
  display: block;
}

body.open-collection-ui .inline-link,
body.open-collection-ui .post-description a.inline-link,
body.open-collection-ui .post-description a[href] {
  color: #b6d6ff;
  text-decoration: underline;
  text-decoration-thickness: 1.2px;
  text-underline-offset: 2px;
  font-weight: 600;
}

html[data-theme="light"] body.open-collection-ui .inline-link,
html[data-theme="light"] body.open-collection-ui .post-description a.inline-link,
html[data-theme="light"] body.open-collection-ui .post-description a[href],
body.theme-light.open-collection-ui .inline-link,
body.theme-light.open-collection-ui .post-description a.inline-link,
body.theme-light.open-collection-ui .post-description a[href] {
  color: #214f94;
}

body.open-collection-ui .button-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

body.open-collection-ui .post-nav-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.open-collection-ui .post-comments-panel {
  margin-top: 18px;
  padding: 20px 16px 16px;
  background: var(--surface-strong);
}

body.open-collection-ui .post-comments-panel .section-inline-head {
  margin-bottom: 12px;
}

body.open-collection-ui .post-comments-panel .eyebrow {
  margin: 6px 0 8px;
  text-align: center;
  color: var(--accent-c);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

body.open-collection-ui .post-comments-panel h3 {
  margin: 0 0 2px;
  text-align: center;
  color: var(--text);
  font-size: 28px;
  line-height: 1.04;
}

body.open-collection-ui .comment-form-grid {
  display: grid;
  gap: 12px;
}

body.open-collection-ui .comment-actions-row {
  margin-top: 14px;
  padding: 0 10px;
}

body.open-collection-ui .comment-actions-row [data-comment-submit] {
  width: calc(100% - 4px);
  margin: 0 auto;
}

body.open-collection-ui .comments-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

body.open-collection-ui .post-recommendations {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

body.open-collection-ui .post-recommendations .mini-route-head {
  margin-bottom: 16px;
}

body.open-collection-ui .post-direct-editor,
body.open-collection-ui .post-direct-actions,
body.open-collection-ui .post-direct-toolbar,
body.open-collection-ui .inline-editor-toolbar,
body.open-collection-ui .inline-editor-shell,
body.open-collection-ui .toolbar-row {
  width: 100%;
  min-width: 0;
}

body.open-collection-ui .post-direct-actions,
body.open-collection-ui .post-direct-toolbar,
body.open-collection-ui .inline-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.open-collection-ui .post-direct-actions > .button-like,
body.open-collection-ui .post-direct-toolbar > .inline-editor-btn,
body.open-collection-ui .inline-editor-toolbar > .inline-editor-btn {
  min-width: 0;
  max-width: 100%;
}

body.open-collection-ui .inline-editor-shell {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-muted);
  padding: 10px;
  overflow: hidden;
}

body.open-collection-ui .inline-rich-editor {
  width: 100%;
  min-height: 220px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.open-collection-ui .inline-description-fallback {
  margin-top: 10px;
}

body.open-collection-ui .post-showcase-strict,
body.open-collection-ui .content-grid {
  overflow-x: clip;
}

body.open-collection-ui .comment-item {
  padding: 12px;
  background: var(--surface-muted);
}

body.open-collection-ui .comment-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.open-collection-ui .comment-item-author,
body.open-collection-ui .comment-item-date {
  color: var(--text-soft);
  font-size: 13px;
}

body.open-collection-ui .comment-item-text {
  margin: 8px 0;
  color: var(--text);
}

body.open-collection-ui .comment-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.open-collection-ui .comment-reaction-btn {
  min-height: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.14);
  color: var(--text-soft);
  font-size: 14px;
  padding: 0 10px;
}

body.open-collection-ui .admin-comment {
  margin: 8px 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(89, 67, 130, 0.2);
  color: #d8ccff;
}

body.open-collection-ui .reading-float {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(calc(100vw - 20px), 520px);
  padding: 10px;
  z-index: 90;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
}

body.open-collection-ui .reading-progress-wrap {
  display: grid;
  gap: 8px;
}

body.open-collection-ui .reading-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

body.open-collection-ui .reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-c));
}

body.open-collection-ui .reading-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 13px;
}

body.open-collection-ui .reading-float-toc {
  margin-top: 8px;
  max-height: 140px;
  overflow: auto;
  display: grid;
  gap: 4px;
}

body.open-collection-ui .toc-link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
}

body.open-collection-ui .toc-link.is-active {
  color: var(--text);
}

body.open-collection-ui .loading-shell,
body.open-collection-ui .empty-state,
body.open-collection-ui .error-shell {
  padding: 16px;
  color: var(--text-soft);
}

body.open-collection-ui .empty-state {
  text-align: center;
}

body.open-collection-ui .image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 140;
  background: rgba(6, 8, 14, 0.86);
}

body.open-collection-ui .image-lightbox.visible {
  display: grid;
}

body.open-collection-ui .image-lightbox-canvas {
  display: grid;
  place-items: center;
  padding: 20px;
}

body.open-collection-ui .image-lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 120px);
}

body.open-collection-ui .scroll-top-button {
  position: fixed;
  right: 14px;
  bottom: 122px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(22, 28, 50, 0.9);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.open-collection-ui .floating-post-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 58px);
  transform: translateX(-50%) translateY(8px);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  z-index: 96;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.open-collection-ui.has-reading-float .floating-post-nav {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 166px);
}

body.open-collection-ui.has-floating-post-nav.floating-post-nav-active .floating-post-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

body.open-collection-ui .floating-post-nav-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(6, 8, 16, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.2s ease, opacity 0.2s ease;
}

body.open-collection-ui .floating-post-nav-btn:hover {
  filter: brightness(1.06);
}

body.open-collection-ui .floating-post-nav-btn:active {
  transform: translateY(1px);
}

body.open-collection-ui .floating-post-nav-btn:disabled {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}

body.open-collection-ui .section-collapsible {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  overflow: hidden;
}

body.open-collection-ui .section-collapsible-head {
  min-height: 44px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}

body.open-collection-ui .section-collapsible-body {
  padding: 12px;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 900px) {
  body.open-collection-ui .miniapp-title-group h1 {
    font-size: clamp(32px, 9.6vw, 46px);
    max-width: none;
  }

  body.open-collection-ui .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  body.open-collection-ui .reader-toolbar {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.open-collection-ui .page-shell.miniapp-shell {
    width: min(calc(100% - 14px), 1040px);
    max-width: calc(100% - 14px);
    padding-top: 8px;
  }

  body.open-collection-ui .miniapp-head {
    margin-top: 12px;
    padding: 18px 14px 14px;
  }

  body.open-collection-ui .miniapp-hero-grid {
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 12px;
  }

  body.open-collection-ui .hero-book-card {
    width: 62px;
    height: 62px;
  }

  body.open-collection-ui .hero-book-icon {
    width: 24px;
  }

  body.open-collection-ui .miniapp-title-group h1 {
    font-size: clamp(28px, 8.7vw, 40px);
    line-height: 0.98;
    max-width: none;
  }

  body.open-collection-ui .miniapp-title-group .brand-note {
    font-size: 15px;
    line-height: 1.3;
  }

  body.open-collection-ui .feed-grid {
    grid-template-columns: 1fr;
  }

  body.open-collection-ui .mini-route-head {
    padding: 10px 12px;
  }

  body.open-collection-ui .mini-route-head h2 {
    font-size: clamp(21px, 6.8vw, 28px);
    line-height: 1.04;
    max-width: 15ch;
  }

  body.open-collection-ui .mini-route-head h3 {
    font-size: clamp(18px, 5.8vw, 23px);
    line-height: 1.1;
    max-width: 17ch;
  }

  body.open-collection-ui .post-route-head h2 {
    font-size: clamp(20px, 6.4vw, 26px);
    line-height: 1.1;
    max-width: none;
  }

  body.open-collection-ui .post-card .post-card-meta {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 6px;
    padding: 0 1px;
  }

  body.open-collection-ui .meta-rating-text,
  body.open-collection-ui .meta-time-text,
  body.open-collection-ui .post-rating-badge,
  body.open-collection-ui .post-readtime-badge,
  body.open-collection-ui .meta-sep {
    font-size: 10.5px;
  }

  body.open-collection-ui .meta-read-pill,
  body.open-collection-ui .post-read-badge {
    min-height: 20px;
    padding: 3px 8px;
    font-size: 9.5px;
    max-width: 86px;
  }

  body.open-collection-ui .post-card .post-card-meta-right-slot {
    gap: 5px;
    min-width: 0;
  }

  body.open-collection-ui .meta-time-text {
    font-size: 10px;
  }

  body.open-collection-ui .post-card .post-card-meta-left-slot {
    gap: 5px;
  }

  body.open-collection-ui .post-card .post-card-meta-center-slot {
    min-width: 0;
    max-width: 100%;
  }

  body.open-collection-ui .post-comments-panel h3 {
    font-size: 24px;
  }

  body.open-collection-ui .reader-toolbar {
    gap: 6px;
  }

  body.open-collection-ui .reader-size-controls {
    gap: 6px;
    width: 100%;
  }

  body.open-collection-ui .reader-size-controls [data-reader-font] {
    flex: 1 1 100%;
    min-width: 0;
  }

  body.open-collection-ui .miniapp-view.reader-mode .post-subtitle {
    font-size: calc(0.88rem * var(--reader-font-scale, 1));
    line-height: 1.64;
  }

  body.open-collection-ui .miniapp-view.reader-mode .post-description {
    font-size: calc(0.93rem * var(--reader-font-scale, 1));
    line-height: 1.68;
    letter-spacing: 0;
  }

  body.open-collection-ui .reading-float {
    width: min(calc(100vw - 12px), 520px);
    bottom: 8px;
  }
}

/* Light Theme Harmonization */
html[data-theme="light"] body.open-collection-ui,
body.theme-light.open-collection-ui {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(116, 148, 196, 0.12), transparent 56%),
    linear-gradient(180deg, #f6f9fe 0%, #edf3fb 56%, #f5f8fd 100%) !important;
  color: #1b2940;
}

html[data-theme="light"] body.open-collection-ui .panel,
html[data-theme="light"] body.open-collection-ui .feed-card,
html[data-theme="light"] body.open-collection-ui .post-card,
html[data-theme="light"] body.open-collection-ui .folder-card,
html[data-theme="light"] body.open-collection-ui .post-showcase,
html[data-theme="light"] body.open-collection-ui .post-media,
html[data-theme="light"] body.open-collection-ui .post-comments-panel,
html[data-theme="light"] body.open-collection-ui .comment-item,
html[data-theme="light"] body.open-collection-ui .reading-float,
html[data-theme="light"] body.open-collection-ui .empty-state,
body.theme-light.open-collection-ui .panel,
body.theme-light.open-collection-ui .feed-card,
body.theme-light.open-collection-ui .post-card,
body.theme-light.open-collection-ui .folder-card,
body.theme-light.open-collection-ui .post-showcase,
body.theme-light.open-collection-ui .post-media,
body.theme-light.open-collection-ui .post-comments-panel,
body.theme-light.open-collection-ui .comment-item,
body.theme-light.open-collection-ui .reading-float,
body.theme-light.open-collection-ui .empty-state {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(173, 188, 211, 0.64);
  box-shadow: 0 10px 22px rgba(24, 48, 82, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="light"] body.open-collection-ui .miniapp-head,
body.theme-light.open-collection-ui .miniapp-head {
  background:
    linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(243, 249, 255, 0.97));
  border-color: rgba(171, 186, 210, 0.7);
  box-shadow: 0 14px 28px rgba(24, 47, 80, 0.1);
}

html[data-theme="light"] body.open-collection-ui .miniapp-view-wrap,
body.theme-light.open-collection-ui .miniapp-view-wrap {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(176, 190, 213, 0.58);
  background: rgba(248, 252, 255, 0.96);
  box-shadow: 0 10px 20px rgba(24, 48, 82, 0.06);
}

html[data-theme="light"] body.open-collection-ui .mini-route-head,
body.theme-light.open-collection-ui .mini-route-head {
  background: rgba(255, 255, 255, 0.965);
  border-color: rgba(172, 186, 210, 0.62);
  box-shadow: 0 8px 16px rgba(24, 46, 78, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group h1,
body.theme-light.open-collection-ui .miniapp-title-group h1 {
  color: #132338;
  text-shadow: none;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group .title-accent,
body.theme-light.open-collection-ui .miniapp-title-group .title-accent {
  color: #2d69ba;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group .brand-note,
body.theme-light.open-collection-ui .miniapp-title-group .brand-note {
  color: #546c90;
}

html[data-theme="light"] body.open-collection-ui .hero-divider,
body.theme-light.open-collection-ui .hero-divider {
  opacity: 0.12;
}

html[data-theme="light"] body.open-collection-ui .mini-route-head h2,
html[data-theme="light"] body.open-collection-ui .mini-route-head h3,
body.theme-light.open-collection-ui .mini-route-head h2,
body.theme-light.open-collection-ui .mini-route-head h3 {
  color: #1b2a41;
}

html[data-theme="light"] body.open-collection-ui .post-card .feed-card-body h3,
body.theme-light.open-collection-ui .post-card .feed-card-body h3 {
  color: #18273e;
}

html[data-theme="light"] body.open-collection-ui .post-card .feed-card-body p,
body.theme-light.open-collection-ui .post-card .feed-card-body p {
  color: #6a7f9f;
}

html[data-theme="light"] body.open-collection-ui .meta-rating-text,
html[data-theme="light"] body.open-collection-ui .meta-time-text,
body.theme-light.open-collection-ui .meta-rating-text,
body.theme-light.open-collection-ui .meta-time-text {
  color: #5c7191;
}

html[data-theme="light"] body.open-collection-ui .meta-read-pill,
html[data-theme="light"] body.open-collection-ui .post-read-badge,
body.theme-light.open-collection-ui .meta-read-pill,
body.theme-light.open-collection-ui .post-read-badge {
  background: rgba(219, 230, 246, 0.76);
  color: #4e6689;
  border: 1px solid rgba(170, 186, 211, 0.68);
}

html[data-theme="light"] body.open-collection-ui .meta-favorite-icon.is-filled svg path,
body.theme-light.open-collection-ui .meta-favorite-icon.is-filled svg path {
  fill: #b7903a;
  stroke: #8a6a25;
}

html[data-theme="light"] body.open-collection-ui .feed-button,
html[data-theme="light"] body.open-collection-ui .action-button,
html[data-theme="light"] body.open-collection-ui .action-link,
body.theme-light.open-collection-ui .feed-button,
body.theme-light.open-collection-ui .action-button,
body.theme-light.open-collection-ui .action-link {
  border: 1px solid rgba(44, 85, 136, 0.7);
  background: linear-gradient(155deg, #3266a8, #2a5287);
  color: #ffffff;
  box-shadow:
    0 7px 14px rgba(25, 51, 88, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html[data-theme="light"] body.open-collection-ui .secondary-button.button-like,
body.theme-light.open-collection-ui .secondary-button.button-like {
  background: rgba(235, 243, 253, 0.98);
  border-color: rgba(162, 180, 210, 0.74);
  color: #2a4568;
  box-shadow: 0 5px 11px rgba(26, 50, 85, 0.08);
}

html[data-theme="light"] body.open-collection-ui .mini-search-wrap input,
body.theme-light.open-collection-ui .mini-search-wrap input {
  background: rgba(235, 243, 253, 0.98);
  border-color: rgba(166, 183, 212, 0.72);
  color: #2a4568;
}

html[data-theme="light"] body.open-collection-ui input,
html[data-theme="light"] body.open-collection-ui textarea,
html[data-theme="light"] body.open-collection-ui select,
body.theme-light.open-collection-ui input,
body.theme-light.open-collection-ui textarea,
body.theme-light.open-collection-ui select {
  background: rgba(236, 243, 253, 0.95);
  color: #223a5a;
}

html[data-theme="light"] body.open-collection-ui .rating-star,
body.theme-light.open-collection-ui .rating-star {
  background: rgba(236, 244, 255, 0.95);
  border-color: rgba(163, 183, 216, 0.74);
  color: #48658f;
}

html[data-theme="light"] body.open-collection-ui .comment-reaction-btn,
body.theme-light.open-collection-ui .comment-reaction-btn {
  background: rgba(233, 241, 252, 0.94);
  border-color: rgba(167, 186, 216, 0.82);
  color: #2a4567;
}

html[data-theme="light"] body.open-collection-ui .scroll-top-button,
html[data-theme="light"] body.open-collection-ui .floating-post-nav-btn,
body.theme-light.open-collection-ui .scroll-top-button,
body.theme-light.open-collection-ui .floating-post-nav-btn {
  background: rgba(245, 250, 255, 0.98);
  border-color: rgba(165, 184, 214, 0.76);
  color: #2b466d;
  box-shadow: 0 10px 18px rgba(28, 50, 83, 0.12);
}

html[data-theme="light"] body.open-collection-ui .reading-float,
body.theme-light.open-collection-ui .reading-float {
  background: rgba(246, 251, 255, 0.98);
  border-color: rgba(165, 184, 214, 0.76);
}

html[data-theme="light"] body.open-collection-ui .reading-progress,
body.theme-light.open-collection-ui .reading-progress {
  background: rgba(137, 161, 197, 0.26);
}

/* Design System Pass v75 */
body.open-collection-ui {
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --radius: 20px;
  --radius-sm: 16px;
  --btn-h: 46px;
  --title-size: 14px;
  --meta-size: 10.5px;
}

body.open-collection-ui .page-shell.miniapp-shell {
  padding-top: 10px;
}

body.open-collection-ui .miniapp-head {
  margin-top: 14px;
  padding: 20px 16px 14px;
  gap: 12px;
}

body.open-collection-ui .miniapp-hero-grid {
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 12px;
}

body.open-collection-ui .miniapp-title-group h1 {
  max-width: 11ch;
  font-size: clamp(34px, 7vw, 50px);
  line-height: 0.96;
  text-shadow: 0 0 3px rgba(162, 146, 255, 0.1);
}

body.open-collection-ui .miniapp-title-group .brand-note {
  margin-top: 8px;
  max-width: 19ch;
  font-size: 15px;
  line-height: 1.3;
}

body.open-collection-ui .hero-divider {
  width: 108px;
  height: 10px;
  margin-top: 8px;
  opacity: 0.24;
  filter: blur(6px);
}

body.open-collection-ui .hero-book-card {
  width: 70px;
  height: 70px;
  border: 1px solid rgba(140, 112, 226, 0.2);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(86, 76, 166, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(17, 23, 40, 0.62), rgba(13, 18, 32, 0.66));
  box-shadow: 0 6px 12px rgba(8, 10, 20, 0.12);
}

body.open-collection-ui .hero-book-icon {
  width: 24px;
  opacity: 0.9;
}

body.open-collection-ui .panel,
body.open-collection-ui .feed-card,
body.open-collection-ui .post-card,
body.open-collection-ui .folder-card,
body.open-collection-ui .post-showcase,
body.open-collection-ui .post-media,
body.open-collection-ui .post-comments-panel,
body.open-collection-ui .comment-item,
body.open-collection-ui .reading-float,
body.open-collection-ui .empty-state {
  border: 1px solid rgba(142, 114, 220, 0.2);
  box-shadow: 0 8px 18px rgba(5, 8, 16, 0.2);
}

body.open-collection-ui .feed-card,
body.open-collection-ui .post-card,
body.open-collection-ui .folder-card {
  padding: 16px;
}

body.open-collection-ui .feed-card .feed-card-body,
body.open-collection-ui .post-card .feed-card-body,
body.open-collection-ui .folder-card .feed-card-body {
  gap: 10px;
}

body.open-collection-ui .feed-card .feed-card-body h3,
body.open-collection-ui .post-card .feed-card-body h3,
body.open-collection-ui .folder-card .feed-card-body h3 {
  margin-bottom: 8px;
  font-size: clamp(20px, 4.8vw, 28px);
  line-height: 1.18;
  font-weight: 760;
  text-wrap: balance;
}

body.open-collection-ui .post-card .feed-card-body h3 {
  -webkit-line-clamp: 3;
  min-height: calc(1.18em * 3);
}

body.open-collection-ui .feed-card .feed-card-body p,
body.open-collection-ui .post-card .feed-card-body p,
body.open-collection-ui .folder-card .feed-card-body p {
  font-size: 13px;
  line-height: 1.32;
}

body.open-collection-ui .folder-meta {
  font-size: 11px;
  letter-spacing: 0.07em;
  font-weight: 600;
}

body.open-collection-ui .post-card .post-card-meta {
  margin-bottom: 10px;
}

body.open-collection-ui .meta-rating-text,
body.open-collection-ui .meta-time-text,
body.open-collection-ui .post-rating-badge,
body.open-collection-ui .post-readtime-badge,
body.open-collection-ui .meta-sep {
  font-size: var(--meta-size);
  font-weight: 650;
}

body.open-collection-ui .meta-read-pill,
body.open-collection-ui .post-read-badge {
  min-height: 20px;
  padding: 3px 10px;
  border-radius: 999px;
  max-width: 98px;
  font-size: 10px;
  letter-spacing: 0.01em;
}

body.open-collection-ui .button-like,
body.open-collection-ui .feed-button,
body.open-collection-ui .action-button,
body.open-collection-ui .action-link {
  border-radius: var(--radius-sm);
  min-height: var(--btn-h);
  height: var(--btn-h);
  padding: 0 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
}

body.open-collection-ui .feed-button,
body.open-collection-ui .action-button,
body.open-collection-ui .action-link {
  border: 1px solid rgba(164, 123, 245, 0.36);
  background: linear-gradient(155deg, rgba(133, 63, 220, 0.92), rgba(87, 33, 162, 0.92) 58%, rgba(66, 24, 128, 0.92));
  box-shadow:
    0 8px 16px rgba(68, 28, 124, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #fff;
}

body.open-collection-ui .secondary-button.button-like {
  border: 1px solid rgba(138, 114, 207, 0.24);
  background: rgba(30, 36, 58, 0.78);
  color: #dbe3ff;
  box-shadow: 0 4px 10px rgba(8, 10, 20, 0.12);
}

body.open-collection-ui .mini-search-wrap input,
body.open-collection-ui input,
body.open-collection-ui textarea,
body.open-collection-ui select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(138, 114, 207, 0.24);
  background: rgba(20, 26, 44, 0.72);
  color: var(--text);
}

body.open-collection-ui .mini-search-wrap input {
  min-height: var(--btn-h);
}

body.open-collection-ui .mini-route-head {
  margin-bottom: 8px;
  padding: 12px 14px;
}

body.open-collection-ui .mini-route-head h2,
body.open-collection-ui .mini-route-head h3 {
  font-size: clamp(28px, 5.7vw, 36px);
  line-height: 1.04;
}

body.open-collection-ui .post-comments-panel {
  margin-top: 20px;
  padding: 20px 16px 16px;
}

body.open-collection-ui .post-comments-panel .eyebrow {
  margin: 10px 0 8px;
  text-align: center;
}

body.open-collection-ui .post-comments-panel h3 {
  text-align: center;
}

body.open-collection-ui .comment-actions-row {
  padding: 0 12px;
}

body.open-collection-ui .comment-actions-row [data-comment-submit] {
  width: calc(100% - 12px);
}

body.open-collection-ui .post-recommendations {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(138, 114, 207, 0.24);
}

body.open-collection-ui .reading-float {
  padding: 10px;
  border-radius: 16px;
}

body.open-collection-ui .scroll-top-button {
  width: 44px;
  height: 44px;
}

body.open-collection-ui .floating-post-nav {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 46px);
}

body.open-collection-ui .floating-post-nav-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

html[data-theme="light"] body.open-collection-ui,
body.theme-light.open-collection-ui {
  background:
    radial-gradient(110% 80% at 0% -10%, rgba(128, 154, 204, 0.11), transparent 56%),
    linear-gradient(180deg, #f6f9fd 0%, #eef3fb 52%, #f7f9fd 100%) !important;
  color: #162338;
}

html[data-theme="light"] body.open-collection-ui .miniapp-head,
body.theme-light.open-collection-ui .miniapp-head {
  background: linear-gradient(180deg, rgba(251, 254, 255, 0.98), rgba(243, 249, 255, 0.97));
}

html[data-theme="light"] body.open-collection-ui .panel,
html[data-theme="light"] body.open-collection-ui .feed-card,
html[data-theme="light"] body.open-collection-ui .post-card,
html[data-theme="light"] body.open-collection-ui .folder-card,
html[data-theme="light"] body.open-collection-ui .post-showcase,
html[data-theme="light"] body.open-collection-ui .post-media,
html[data-theme="light"] body.open-collection-ui .post-comments-panel,
html[data-theme="light"] body.open-collection-ui .comment-item,
html[data-theme="light"] body.open-collection-ui .reading-float,
body.theme-light.open-collection-ui .panel,
body.theme-light.open-collection-ui .feed-card,
body.theme-light.open-collection-ui .post-card,
body.theme-light.open-collection-ui .folder-card,
body.theme-light.open-collection-ui .post-showcase,
body.theme-light.open-collection-ui .post-media,
body.theme-light.open-collection-ui .post-comments-panel,
body.theme-light.open-collection-ui .comment-item,
body.theme-light.open-collection-ui .reading-float {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(170, 185, 208, 0.55);
  box-shadow: 0 8px 18px rgba(24, 47, 80, 0.08);
}

html[data-theme="light"] body.open-collection-ui .feed-button,
html[data-theme="light"] body.open-collection-ui .action-button,
html[data-theme="light"] body.open-collection-ui .action-link,
body.theme-light.open-collection-ui .feed-button,
body.theme-light.open-collection-ui .action-button,
body.theme-light.open-collection-ui .action-link {
  border: 1px solid rgba(44, 85, 136, 0.7);
  background: linear-gradient(155deg, #356caf, #294f84 60%, #244777);
  box-shadow:
    0 8px 15px rgba(24, 47, 80, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

html[data-theme="light"] body.open-collection-ui .secondary-button.button-like,
body.theme-light.open-collection-ui .secondary-button.button-like {
  background: rgba(235, 243, 253, 0.98);
  border-color: rgba(162, 180, 210, 0.74);
  color: #2a4568;
}

html[data-theme="light"] body.open-collection-ui .mini-search-wrap input,
html[data-theme="light"] body.open-collection-ui input,
html[data-theme="light"] body.open-collection-ui textarea,
html[data-theme="light"] body.open-collection-ui select,
body.theme-light.open-collection-ui .mini-search-wrap input,
body.theme-light.open-collection-ui input,
body.theme-light.open-collection-ui textarea,
body.theme-light.open-collection-ui select {
  background: rgba(238, 244, 253, 0.98);
  border-color: rgba(166, 183, 212, 0.72);
  color: #253f62;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group h1,
body.theme-light.open-collection-ui .miniapp-title-group h1 {
  color: #14243b;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group .title-accent,
body.theme-light.open-collection-ui .miniapp-title-group .title-accent {
  color: #2e69b9;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group .brand-note,
body.theme-light.open-collection-ui .miniapp-title-group .brand-note {
  color: #5d7395;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  border: 1px solid rgba(161, 181, 213, 0.56);
  background:
    radial-gradient(120% 120% at 28% 18%, rgba(170, 194, 229, 0.26), transparent 54%),
    linear-gradient(180deg, rgba(241, 247, 255, 0.98), rgba(229, 238, 251, 0.94));
  box-shadow:
    0 8px 18px rgba(33, 58, 92, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  opacity: 0.92;
  filter: drop-shadow(0 1px 1px rgba(29, 57, 95, 0.12));
}

@media (max-width: 640px) {
  body.open-collection-ui .miniapp-head {
    margin-top: 10px;
    padding: 16px 12px 12px;
  }

  body.open-collection-ui .miniapp-hero-grid {
    grid-template-columns: minmax(0, 1fr) 60px;
    gap: 10px;
  }

  body.open-collection-ui .hero-book-card {
    width: 60px;
    height: 60px;
  }

  body.open-collection-ui .miniapp-title-group h1 {
    font-size: clamp(30px, 9.1vw, 40px);
  }

  body.open-collection-ui .miniapp-title-group .brand-note {
    font-size: 14px;
  }

  body.open-collection-ui .feed-card .feed-card-body h3,
  body.open-collection-ui .post-card .feed-card-body h3,
  body.open-collection-ui .folder-card .feed-card-body h3 {
    font-size: clamp(16px, 6vw, 22px);
    line-height: 1.24;
  }

  body.open-collection-ui .button-like,
  body.open-collection-ui .feed-button,
  body.open-collection-ui .action-button,
  body.open-collection-ui .action-link {
    min-height: 44px;
    height: 44px;
    font-size: 14px;
  }

  body.open-collection-ui .post-card .post-card-meta {
    column-gap: 5px;
  }

  body.open-collection-ui .meta-read-pill,
  body.open-collection-ui .post-read-badge {
    max-width: 84px;
    font-size: 9.5px;
    padding: 3px 8px;
  }

  body.open-collection-ui .meta-rating-text,
  body.open-collection-ui .meta-time-text,
  body.open-collection-ui .post-rating-badge,
  body.open-collection-ui .post-readtime-badge,
  body.open-collection-ui .meta-sep {
    font-size: 10px;
  }

  body.open-collection-ui .post-comments-panel {
    padding: 18px 14px 14px;
  }
}

/* Design pass v77 */
body.open-collection-ui .miniapp-head {
  gap: 10px;
}

body.open-collection-ui .mini-head-controls {
  margin-top: 10px;
  gap: 10px;
}

body.open-collection-ui .mini-head-actions {
  gap: 10px;
}

body.open-collection-ui .hero-book-card {
  background:
    radial-gradient(120% 120% at 30% 16%, rgba(90, 110, 170, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(19, 27, 46, 0.82), rgba(14, 21, 37, 0.86));
}

body.open-collection-ui .hero-book-icon {
  display: block;
  background: transparent !important;
  filter: none;
  -webkit-filter: none;
}

body.open-collection-ui .secondary-button.button-like {
  border-color: rgba(130, 108, 196, 0.26);
  background: rgba(28, 35, 58, 0.78);
  color: #d7e1ff;
}

body.open-collection-ui .mini-search-wrap input {
  background: rgba(18, 25, 42, 0.84);
  border-color: rgba(130, 108, 196, 0.24);
}

body.open-collection-ui .post-card .post-card-meta {
  align-items: center;
}

body.open-collection-ui .meta-rating-text,
body.open-collection-ui .meta-time-text {
  color: rgba(164, 174, 205, 0.95);
}

body.open-collection-ui .meta-read-pill,
body.open-collection-ui .post-read-badge {
  background: rgba(135, 82, 219, 0.2);
  color: #dcc7ff;
}

body.open-collection-ui .post-recommendations {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(132, 104, 198, 0.26);
}

body.open-collection-ui .post-recommendations .mini-route-head {
  background: rgba(17, 23, 40, 0.72);
  border-color: rgba(132, 104, 198, 0.26);
}

body.open-collection-ui .post-comments-panel {
  background: rgba(17, 23, 39, 0.82);
  border-color: rgba(132, 104, 198, 0.22);
}

html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  border-color: rgba(163, 180, 210, 0.62);
  background:
    radial-gradient(120% 120% at 30% 16%, rgba(178, 199, 230, 0.3), transparent 58%),
    linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(232, 240, 252, 0.96));
  box-shadow:
    0 8px 18px rgba(31, 56, 92, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  opacity: 0.96;
  filter: drop-shadow(0 1px 1px rgba(34, 63, 101, 0.12));
}

html[data-theme="light"] body.open-collection-ui .mini-head-controls,
body.theme-light.open-collection-ui .mini-head-controls {
  gap: 10px;
}

html[data-theme="light"] body.open-collection-ui .secondary-button.button-like,
body.theme-light.open-collection-ui .secondary-button.button-like {
  background: rgba(236, 243, 253, 0.98);
  border-color: rgba(165, 181, 209, 0.76);
  color: #284264;
}

html[data-theme="light"] body.open-collection-ui .mini-search-wrap input,
body.theme-light.open-collection-ui .mini-search-wrap input {
  background: rgba(241, 246, 253, 0.98);
  border-color: rgba(171, 186, 211, 0.72);
  color: #2f4a70;
}

html[data-theme="light"] body.open-collection-ui .meta-rating-text,
html[data-theme="light"] body.open-collection-ui .meta-time-text,
body.theme-light.open-collection-ui .meta-rating-text,
body.theme-light.open-collection-ui .meta-time-text {
  color: #5f7394;
}

html[data-theme="light"] body.open-collection-ui .meta-read-pill,
html[data-theme="light"] body.open-collection-ui .post-read-badge,
body.theme-light.open-collection-ui .meta-read-pill,
body.theme-light.open-collection-ui .post-read-badge {
  background: rgba(225, 233, 246, 0.94);
  color: #4a6287;
  border: 1px solid rgba(173, 186, 208, 0.68);
}

html[data-theme="light"] body.open-collection-ui .post-comments-panel,
body.theme-light.open-collection-ui .post-comments-panel {
  background: rgba(252, 255, 255, 0.98);
  border-color: rgba(173, 186, 208, 0.6);
}

html[data-theme="light"] body.open-collection-ui .post-recommendations .mini-route-head,
body.theme-light.open-collection-ui .post-recommendations .mini-route-head {
  background: rgba(248, 252, 255, 0.98);
  border-color: rgba(173, 186, 208, 0.6);
}

@media (max-width: 640px) {
  body.open-collection-ui .mini-head-controls {
    margin-top: 8px;
    gap: 8px;
  }

  body.open-collection-ui .hero-book-card {
    width: 58px;
    height: 58px;
  }

  body.open-collection-ui .hero-book-icon {
    width: 22px;
  }
}

/* Design pass v79: toggle placement + icon-card contrast */
body.open-collection-ui .miniapp-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

body.open-collection-ui .miniapp-head-top .hero-eyebrow {
  margin: 0;
}

body.open-collection-ui .theme-toggle {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0;
  flex: 0 0 auto;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  border: 1px solid rgba(112, 143, 191, 0.88) !important;
  background:
    radial-gradient(120% 120% at 28% 14%, rgba(141, 176, 224, 0.56), transparent 54%),
    linear-gradient(180deg, rgba(208, 226, 248, 0.98), rgba(186, 210, 241, 0.98)) !important;
  box-shadow:
    0 10px 20px rgba(25, 49, 84, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 0 1px rgba(97, 127, 176, 0.24) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  opacity: 1 !important;
  filter: drop-shadow(0 1px 1px rgba(17, 39, 70, 0.34)) contrast(1.28) saturate(1.2) brightness(0.76) !important;
  -webkit-filter: drop-shadow(0 1px 1px rgba(17, 39, 70, 0.34)) contrast(1.28) saturate(1.2) brightness(0.76) !important;
}

@media (max-width: 640px) {
  body.open-collection-ui .miniapp-head-top {
    margin-bottom: 0;
  }

  body.open-collection-ui .theme-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

/* UI hard reset v90: card/meta stabilization for Telegram WebView */
body.open-collection-ui .post-card,
body.open-collection-ui .latest-feed-card,
body.open-collection-ui .folder-card,
body.open-collection-ui .feed-card {
  border-radius: 20px !important;
}

body.open-collection-ui .post-card .post-card-meta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 10px !important;
  width: 100% !important;
  min-height: 22px !important;
  margin: 0 0 12px !important;
  padding: 0 2px !important;
  overflow: hidden !important;
}

body.open-collection-ui .post-card .post-card-meta-left-slot,
body.open-collection-ui .post-card .post-card-meta-center-slot,
body.open-collection-ui .post-card .post-card-meta-right-slot,
body.open-collection-ui .post-card .meta-read-pill,
body.open-collection-ui .post-card .post-read-badge,
body.open-collection-ui .post-card .meta-time-text,
body.open-collection-ui .post-card .meta-rating-text,
body.open-collection-ui .post-card .post-rating-line {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0 !important;
}

body.open-collection-ui .post-card .post-card-meta-left-slot {
  justify-self: start !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

body.open-collection-ui .post-card .post-card-meta-center-slot {
  justify-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
}

body.open-collection-ui .post-card .post-card-meta-right-slot {
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  white-space: nowrap !important;
  min-width: 0 !important;
}

body.open-collection-ui .post-card .meta-favorite-icon,
body.open-collection-ui .post-card .meta-favorite-icon svg {
  width: 14px !important;
  height: 14px !important;
}

body.open-collection-ui .post-card .meta-rating-text,
body.open-collection-ui .post-card .meta-time-text {
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 620 !important;
  white-space: nowrap !important;
}

body.open-collection-ui .post-card .meta-read-pill,
body.open-collection-ui .post-card .post-read-badge {
  min-height: 20px !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  max-width: 120px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.open-collection-ui .feed-card .feed-card-body h3,
body.open-collection-ui .post-card .feed-card-body h3,
body.open-collection-ui .folder-card .feed-card-body h3 {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  line-height: 1.26 !important;
  letter-spacing: -0.01em !important;
  font-weight: 730 !important;
}

body.open-collection-ui .post-card .feed-card-body > p:last-child,
body.open-collection-ui .folder-card .feed-card-body > p:last-child {
  margin: 0 0 12px !important;
}

body.open-collection-ui .feed-button,
body.open-collection-ui .folder-open-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  margin-top: auto !important;
  border-radius: 16px !important;
  font-size: 16px !important;
  font-weight: 760 !important;
  line-height: 1 !important;
}

body.open-collection-ui .post-description,
body.open-collection-ui .post-description * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

html[data-theme="light"] body.open-collection-ui .feed-card,
html[data-theme="light"] body.open-collection-ui .post-card,
html[data-theme="light"] body.open-collection-ui .folder-card,
body.theme-light.open-collection-ui .feed-card,
body.theme-light.open-collection-ui .post-card,
body.theme-light.open-collection-ui .folder-card {
  background: #f2f4f8 !important;
  border: 1px solid rgba(184, 197, 220, 0.86) !important;
  box-shadow: 0 8px 18px rgba(18, 34, 63, 0.1) !important;
}

html[data-theme="light"] body.open-collection-ui .feed-card .feed-card-body h3,
html[data-theme="light"] body.open-collection-ui .post-card .feed-card-body h3,
html[data-theme="light"] body.open-collection-ui .folder-card .feed-card-body h3,
body.theme-light.open-collection-ui .feed-card .feed-card-body h3,
body.theme-light.open-collection-ui .post-card .feed-card-body h3,
body.theme-light.open-collection-ui .folder-card .feed-card-body h3 {
  color: #161f31 !important;
}

html[data-theme="light"] body.open-collection-ui .post-card .meta-rating-text,
html[data-theme="light"] body.open-collection-ui .post-card .meta-time-text,
html[data-theme="light"] body.open-collection-ui .post-card .feed-card-body p,
body.theme-light.open-collection-ui .post-card .meta-rating-text,
body.theme-light.open-collection-ui .post-card .meta-time-text,
body.theme-light.open-collection-ui .post-card .feed-card-body p {
  color: #6d7f9c !important;
}

html[data-theme="light"] body.open-collection-ui .feed-button,
html[data-theme="light"] body.open-collection-ui .folder-open-button,
body.theme-light.open-collection-ui .feed-button,
body.theme-light.open-collection-ui .folder-open-button {
  color: #ffffff !important;
  border: none !important;
  background: #1f2f4d !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.open-collection-ui .feed-card,
html[data-theme="dark"] body.open-collection-ui .post-card,
html[data-theme="dark"] body.open-collection-ui .folder-card,
body.theme-dark.open-collection-ui .feed-card,
body.theme-dark.open-collection-ui .post-card,
body.theme-dark.open-collection-ui .folder-card {
  background: rgba(12, 17, 33, 0.9) !important;
  border: 1px solid rgba(82, 98, 136, 0.38) !important;
}

html[data-theme="dark"] body.open-collection-ui .feed-button,
html[data-theme="dark"] body.open-collection-ui .folder-open-button,
body.theme-dark.open-collection-ui .feed-button,
body.theme-dark.open-collection-ui .folder-open-button {
  color: #f4f8ff !important;
  border: none !important;
  background: #233656 !important;
  box-shadow: none !important;
}

@media (max-width: 430px) {
  body.open-collection-ui .post-card .post-card-meta {
    column-gap: 7px !important;
  }

  body.open-collection-ui .post-card .meta-rating-text,
  body.open-collection-ui .post-card .meta-time-text {
    font-size: 11px !important;
  }

  body.open-collection-ui .post-card .meta-read-pill,
  body.open-collection-ui .post-card .post-read-badge {
    font-size: 9px !important;
    padding: 3px 8px !important;
    max-width: 96px !important;
  }
}

/* Smart search + continue reading */
body.open-collection-ui .mini-search-wrap {
  position: relative;
}

body.open-collection-ui .search-quick-filters {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.open-collection-ui .search-filter-chip {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
}

body.open-collection-ui .search-filter-chip.is-active {
  color: #ffffff;
  border-color: rgba(173, 137, 246, 0.4);
  background: linear-gradient(145deg, rgba(123, 63, 209, 0.95), rgba(76, 30, 148, 0.93));
  box-shadow: 0 8px 18px rgba(76, 32, 142, 0.24);
}

body.open-collection-ui .global-search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 36;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-strong);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.open-collection-ui .global-search-suggest[hidden] {
  display: none !important;
}

body.open-collection-ui .search-suggest-item {
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(22, 28, 50, 0.38);
  color: var(--text);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  text-align: left;
  cursor: pointer;
}

body.open-collection-ui .search-suggest-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

body.open-collection-ui .search-suggest-folder {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.2;
}

body.open-collection-ui .search-suggest-item:hover {
  border-color: var(--border);
  background: rgba(37, 47, 82, 0.45);
}

body.open-collection-ui .continue-card {
  border-color: rgba(146, 113, 225, 0.34);
  background:
    radial-gradient(140% 150% at 88% -14%, rgba(92, 62, 182, 0.18), transparent 54%),
    var(--surface-strong);
}

/* ===== UI STABILITY PATCH v88 =====
   Unifies card geometry, metadata row, and button behavior across themes.
   Keeps layout stable on narrow Telegram WebView widths.
*/
body.open-collection-ui .miniapp-shell .feed-card,
body.open-collection-ui .miniapp-shell .post-card,
body.open-collection-ui .miniapp-shell .folder-card,
body.open-collection-ui .miniapp-shell .latest-feed-card {
  display: flex !important;
  flex-direction: column !important;
  min-height: 194px !important;
  padding: 16px !important;
  gap: 0 !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-card-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 24px !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-card-meta-left-slot {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-card-meta-center-slot {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-left: auto !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-card-meta-center-slot:empty {
  display: none !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-card-meta-right-slot {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  margin-left: 8px !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-card-meta-center-slot:empty + .post-card-meta-right-slot {
  margin-left: auto !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-card-meta-right-slot:empty {
  display: none !important;
}

body.open-collection-ui .miniapp-shell .post-card .meta-rating-text,
body.open-collection-ui .miniapp-shell .post-card .meta-time-text,
body.open-collection-ui .miniapp-shell .post-card .post-rating-badge,
body.open-collection-ui .miniapp-shell .post-card .post-readtime-badge {
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 650 !important;
}

body.open-collection-ui .miniapp-shell .post-card .post-read-badge,
body.open-collection-ui .miniapp-shell .post-card .meta-read-pill {
  min-height: 20px !important;
  padding: 3px 9px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  max-width: 120px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.open-collection-ui .miniapp-shell .feed-card .feed-card-body,
body.open-collection-ui .miniapp-shell .post-card .feed-card-body,
body.open-collection-ui .miniapp-shell .folder-card .feed-card-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  gap: 8px !important;
  padding: 0 !important;
}

body.open-collection-ui .miniapp-shell .post-card .feed-card-body h3 {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  line-height: 1.17 !important;
  letter-spacing: -0.014em !important;
  font-weight: 760 !important;
  -webkit-line-clamp: 3 !important;
  min-height: calc(1.17em * 2) !important;
}

body.open-collection-ui .miniapp-shell .post-card .feed-card-body > p:last-child {
  margin-top: auto !important;
  margin-bottom: 10px !important;
  opacity: 0.88 !important;
}

body.open-collection-ui .miniapp-shell .feed-button,
body.open-collection-ui .miniapp-shell .folder-open-button {
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  margin-top: auto !important;
  border-radius: 16px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 760 !important;
  padding: 0 14px !important;
}

/* Light theme stabilization */
html[data-theme="light"] body.open-collection-ui .miniapp-shell .feed-card,
html[data-theme="light"] body.open-collection-ui .miniapp-shell .post-card,
html[data-theme="light"] body.open-collection-ui .miniapp-shell .folder-card,
body.theme-light.open-collection-ui .miniapp-shell .feed-card,
body.theme-light.open-collection-ui .miniapp-shell .post-card,
body.theme-light.open-collection-ui .miniapp-shell .folder-card {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(188, 203, 229, 0.72) !important;
  box-shadow: 0 10px 22px rgba(24, 42, 74, 0.09) !important;
}

html[data-theme="light"] body.open-collection-ui .miniapp-shell .post-card .feed-card-body h3,
body.theme-light.open-collection-ui .miniapp-shell .post-card .feed-card-body h3 {
  color: #162135 !important;
}

html[data-theme="light"] body.open-collection-ui .miniapp-shell .post-card .feed-card-body p,
html[data-theme="light"] body.open-collection-ui .miniapp-shell .post-card .meta-rating-text,
html[data-theme="light"] body.open-collection-ui .miniapp-shell .post-card .meta-time-text,
body.theme-light.open-collection-ui .miniapp-shell .post-card .feed-card-body p,
body.theme-light.open-collection-ui .miniapp-shell .post-card .meta-rating-text,
body.theme-light.open-collection-ui .miniapp-shell .post-card .meta-time-text {
  color: #607392 !important;
}

html[data-theme="light"] body.open-collection-ui .miniapp-shell .feed-button,
body.theme-light.open-collection-ui .miniapp-shell .feed-button {
  color: #ffffff !important;
  border: 1px solid rgba(34, 59, 96, 0.18) !important;
  background: linear-gradient(145deg, #294670, #1c3255) !important;
  box-shadow: 0 8px 16px rgba(27, 50, 82, 0.2) !important;
}

/* Dark theme stabilization */
html[data-theme="dark"] body.open-collection-ui .miniapp-shell .feed-card,
html[data-theme="dark"] body.open-collection-ui .miniapp-shell .post-card,
html[data-theme="dark"] body.open-collection-ui .miniapp-shell .folder-card,
body.theme-dark.open-collection-ui .miniapp-shell .feed-card,
body.theme-dark.open-collection-ui .miniapp-shell .post-card,
body.theme-dark.open-collection-ui .miniapp-shell .folder-card {
  background: rgba(13, 18, 35, 0.86) !important;
  border: 1px solid rgba(111, 96, 182, 0.3) !important;
}

html[data-theme="dark"] body.open-collection-ui .miniapp-shell .feed-button,
body.theme-dark.open-collection-ui .miniapp-shell .feed-button {
  border: 1px solid rgba(153, 122, 236, 0.36) !important;
  background: linear-gradient(150deg, rgba(123, 66, 214, 0.94), rgba(82, 36, 154, 0.92)) !important;
}

@media (max-width: 420px) {
  body.open-collection-ui .miniapp-shell .post-card .post-card-meta {
    gap: 6px !important;
  }
  body.open-collection-ui .miniapp-shell .post-card .meta-rating-text,
  body.open-collection-ui .miniapp-shell .post-card .meta-time-text,
  body.open-collection-ui .miniapp-shell .post-card .post-rating-badge,
  body.open-collection-ui .miniapp-shell .post-card .post-readtime-badge {
    font-size: 11px !important;
  }
  body.open-collection-ui .miniapp-shell .post-card .post-read-badge,
  body.open-collection-ui .miniapp-shell .post-card .meta-read-pill {
    font-size: 9.5px !important;
    max-width: 104px !important;
  }
}

/* Design pass v85: remove logo square (both themes), keep only clean icon */
body.open-collection-ui .hero-book-card {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

body.open-collection-ui .hero-book-card::before {
  content: none !important;
  display: none !important;
}

body.open-collection-ui .hero-book-icon {
  width: 34px !important;
  opacity: 1 !important;
  filter: drop-shadow(0 2px 6px rgba(15, 27, 52, 0.22)) !important;
  -webkit-filter: drop-shadow(0 2px 6px rgba(15, 27, 52, 0.22)) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  filter: drop-shadow(0 2px 6px rgba(28, 54, 92, 0.22)) contrast(1.12) saturate(1.12) !important;
  -webkit-filter: drop-shadow(0 2px 6px rgba(28, 54, 92, 0.22)) contrast(1.12) saturate(1.12) !important;
}

@media (max-width: 640px) {
  body.open-collection-ui .hero-book-icon {
    width: 30px !important;
  }
}

/* Design pass v86: remove logo block + stabilize spacing/controls/cards */
body.open-collection-ui .miniapp-head {
  margin-top: 18px !important;
  padding: 20px 18px 16px !important;
  gap: 12px !important;
}

body.open-collection-ui .miniapp-hero-grid {
  display: block !important;
}

body.open-collection-ui .miniapp-title-group h1 {
  max-width: 12ch !important;
}

body.open-collection-ui .miniapp-title-group .brand-note {
  margin-top: 12px !important;
  max-width: 18ch !important;
}

body.open-collection-ui .hero-divider {
  margin-top: 14px !important;
  opacity: 0.24 !important;
}

body.open-collection-ui .hero-book-card,
body.open-collection-ui .hero-book-icon {
  display: none !important;
}

body.open-collection-ui .mini-head-controls {
  margin-top: 14px !important;
  gap: 12px !important;
}

body.open-collection-ui .mini-head-actions {
  gap: 12px !important;
}

body.open-collection-ui .button-like,
body.open-collection-ui .secondary-button.button-like {
  min-height: 46px !important;
  border-radius: 14px !important;
  padding: 0 16px !important;
}

body.open-collection-ui .mini-search-wrap input,
body.open-collection-ui input,
body.open-collection-ui textarea,
body.open-collection-ui select {
  min-height: 46px !important;
  border-radius: 14px !important;
}

body.open-collection-ui .feed-card,
body.open-collection-ui .post-card,
body.open-collection-ui .folder-card {
  padding: 16px !important;
  border-radius: 18px !important;
}

body.open-collection-ui .feed-card .feed-card-body,
body.open-collection-ui .post-card .feed-card-body,
body.open-collection-ui .folder-card .feed-card-body {
  gap: 10px !important;
}

body.open-collection-ui .feed-card .feed-card-body h3,
body.open-collection-ui .post-card .feed-card-body h3,
body.open-collection-ui .folder-card .feed-card-body h3 {
  margin-bottom: 8px !important;
  font-size: 14px !important;
  line-height: 1.32 !important;
}

body.open-collection-ui .post-card .feed-card-body > p:last-child,
body.open-collection-ui .folder-card .feed-card-body > p:last-child {
  margin-bottom: 12px !important;
}

body.open-collection-ui .feed-button {
  min-height: 44px !important;
  border-radius: 14px !important;
  margin-top: auto !important;
}

body.open-collection-ui .post-card .post-card-meta {
  grid-template-columns: auto minmax(76px, auto) auto !important;
  align-items: center !important;
  column-gap: 12px !important;
  min-height: 24px !important;
  padding: 0 !important;
}

body.open-collection-ui .post-card .post-card-meta-left-slot {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.open-collection-ui .post-card .post-card-meta-center-slot {
  min-width: 76px !important;
  justify-self: center !important;
}

body.open-collection-ui .post-card .post-card-meta-right-slot {
  min-width: 48px !important;
  justify-self: end !important;
}

body.open-collection-ui .meta-read-pill,
body.open-collection-ui .post-read-badge {
  min-height: 20px !important;
  padding: 3px 10px !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}

html[data-theme="light"] body.open-collection-ui .feed-card,
html[data-theme="light"] body.open-collection-ui .post-card,
html[data-theme="light"] body.open-collection-ui .folder-card,
body.theme-light.open-collection-ui .feed-card,
body.theme-light.open-collection-ui .post-card,
body.theme-light.open-collection-ui .folder-card {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(188, 204, 230, 0.78) !important;
  box-shadow: 0 10px 20px rgba(28, 46, 80, 0.1) !important;
}

html[data-theme="light"] body.open-collection-ui .feed-button,
body.theme-light.open-collection-ui .feed-button {
  background: linear-gradient(180deg, #29487a, #1d3458) !important;
  color: #ffffff !important;
  border: 1px solid rgba(20, 40, 72, 0.42) !important;
}

@media (max-width: 640px) {
  body.open-collection-ui .miniapp-head {
    padding: 18px 14px 14px !important;
  }

  body.open-collection-ui .miniapp-title-group h1 {
    font-size: clamp(34px, 12.6vw, 46px) !important;
  }

  body.open-collection-ui .miniapp-title-group .brand-note {
    font-size: 14px !important;
    line-height: 1.34 !important;
  }

  body.open-collection-ui .post-card .post-card-meta {
    grid-template-columns: auto minmax(68px, auto) auto !important;
    column-gap: 8px !important;
  }
}

/* Design pass v84: light-theme logo block refresh (dark theme untouched) */
html[data-theme="light"] body.open-collection-ui .miniapp-head,
body.theme-light.open-collection-ui .miniapp-head {
  background:
    radial-gradient(120% 140% at 6% 0%, rgba(130, 162, 214, 0.2), transparent 50%),
    linear-gradient(180deg, rgba(238, 245, 255, 0.96), rgba(227, 238, 252, 0.98)) !important;
}

html[data-theme="light"] body.open-collection-ui .miniapp-head-top,
body.theme-light.open-collection-ui .miniapp-head-top {
  position: relative;
  z-index: 3;
}

html[data-theme="light"] body.open-collection-ui .theme-toggle,
body.theme-light.open-collection-ui .theme-toggle {
  top: 14px !important;
  right: 14px !important;
  background: linear-gradient(180deg, rgba(227, 237, 252, 0.98), rgba(212, 226, 246, 0.98)) !important;
  border: 1px solid rgba(132, 162, 204, 0.74) !important;
  box-shadow:
    0 8px 16px rgba(47, 82, 129, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="light"] body.open-collection-ui .miniapp-hero-grid,
body.theme-light.open-collection-ui .miniapp-hero-grid {
  grid-template-columns: minmax(0, 1fr) 86px !important;
  align-items: start !important;
  column-gap: 14px !important;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group h1,
body.theme-light.open-collection-ui .miniapp-title-group h1 {
  color: #12213a !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.52),
    0 0 10px rgba(111, 149, 214, 0.12) !important;
}

html[data-theme="light"] body.open-collection-ui .miniapp-title-group .title-accent,
body.theme-light.open-collection-ui .miniapp-title-group .title-accent {
  color: #2f6fc5 !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  margin-top: 6px !important;
  width: 74px !important;
  height: 74px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(121, 154, 205, 0.88) !important;
  background:
    radial-gradient(124% 126% at 20% 14%, rgba(198, 218, 247, 0.98), rgba(168, 194, 231, 0.96)),
    linear-gradient(180deg, rgba(179, 204, 237, 0.98), rgba(155, 184, 224, 0.98)) !important;
  box-shadow:
    0 9px 18px rgba(31, 64, 108, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 0 1px rgba(95, 129, 180, 0.35) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card::before,
body.theme-light.open-collection-ui .hero-book-card::before {
  inset: 7px !important;
  border-radius: 13px !important;
  border: 1px solid rgba(95, 130, 186, 0.7) !important;
  background:
    radial-gradient(120% 120% at 24% 18%, rgba(214, 230, 251, 0.94), rgba(188, 210, 238, 0.95)),
    linear-gradient(180deg, rgba(188, 210, 238, 0.9), rgba(169, 193, 228, 0.92)) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  width: 30px !important;
  opacity: 1 !important;
  filter: drop-shadow(0 1px 1px rgba(10, 30, 58, 0.5)) contrast(1.48) saturate(1.35) brightness(0.62) !important;
  -webkit-filter: drop-shadow(0 1px 1px rgba(10, 30, 58, 0.5)) contrast(1.48) saturate(1.35) brightness(0.62) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(1),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(2),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(1),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(2) {
  fill: #fbfdff !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > rect:nth-child(3),
body.theme-light.open-collection-ui .hero-book-icon g > rect:nth-child(3) {
  fill: #3f6fae !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(4),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(5),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(6),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(7),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(4),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(5),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(6),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(7) {
  stroke: #86abd9 !important;
}

@media (max-width: 640px) {
  html[data-theme="light"] body.open-collection-ui .miniapp-hero-grid,
  body.theme-light.open-collection-ui .miniapp-hero-grid {
    grid-template-columns: minmax(0, 1fr) 78px !important;
  }

  html[data-theme="light"] body.open-collection-ui .hero-book-card,
  body.theme-light.open-collection-ui .hero-book-card {
    width: 66px !important;
    height: 66px !important;
    margin-top: 4px !important;
  }

  html[data-theme="light"] body.open-collection-ui .hero-book-card::before,
  body.theme-light.open-collection-ui .hero-book-card::before {
    inset: 6px !important;
  }
}

/* Design pass v83: final logo positioning + contrast (dark/light) */
body.open-collection-ui .miniapp-hero-grid {
  grid-template-columns: minmax(0, 1fr) 88px !important;
  align-items: start !important;
  column-gap: 14px !important;
}

body.open-collection-ui .hero-book-card {
  width: 82px !important;
  height: 82px !important;
  justify-self: end !important;
  align-self: start !important;
  margin: 2px 0 0 !important;
  border-radius: 22px !important;
  border: 1px solid rgba(120, 142, 199, 0.42) !important;
  background:
    radial-gradient(120% 120% at 28% 16%, rgba(84, 112, 172, 0.26), transparent 54%),
    linear-gradient(180deg, rgba(17, 25, 45, 0.88), rgba(12, 20, 38, 0.9)) !important;
  box-shadow:
    0 10px 20px rgba(8, 14, 30, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(81, 109, 166, 0.2) !important;
}

body.open-collection-ui .hero-book-card::before {
  content: "" !important;
  position: absolute !important;
  inset: 7px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(111, 134, 188, 0.34) !important;
  background: linear-gradient(180deg, rgba(38, 55, 94, 0.5), rgba(25, 40, 76, 0.56)) !important;
  z-index: 0 !important;
}

body.open-collection-ui .hero-book-icon {
  position: relative !important;
  z-index: 1 !important;
  width: 34px !important;
  height: auto !important;
  opacity: 1 !important;
  filter: drop-shadow(0 1px 2px rgba(4, 11, 26, 0.48)) contrast(1.34) saturate(1.3) brightness(1.08) !important;
  -webkit-filter: drop-shadow(0 1px 2px rgba(4, 11, 26, 0.48)) contrast(1.34) saturate(1.3) brightness(1.08) !important;
}

body.open-collection-ui .hero-book-icon g > path:nth-child(1),
body.open-collection-ui .hero-book-icon g > path:nth-child(2) {
  fill: #f2f7ff !important;
}

body.open-collection-ui .hero-book-icon g > rect:nth-child(3) {
  fill: #86a9da !important;
}

body.open-collection-ui .hero-book-icon g > path:nth-child(4),
body.open-collection-ui .hero-book-icon g > path:nth-child(5),
body.open-collection-ui .hero-book-icon g > path:nth-child(6),
body.open-collection-ui .hero-book-icon g > path:nth-child(7) {
  stroke: #bfd8ff !important;
  stroke-width: 4px !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  border: 1px solid rgba(70, 102, 153, 0.94) !important;
  background:
    radial-gradient(118% 118% at 24% 14%, rgba(121, 161, 220, 0.58), transparent 56%),
    linear-gradient(180deg, rgba(176, 202, 238, 0.99), rgba(150, 179, 220, 0.99)) !important;
  box-shadow:
    0 12px 24px rgba(18, 43, 78, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 1px rgba(74, 108, 162, 0.32) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card::before,
body.theme-light.open-collection-ui .hero-book-card::before {
  border: 1px solid rgba(58, 92, 146, 0.74) !important;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(205, 227, 250, 0.92), rgba(172, 200, 235, 0.94)),
    linear-gradient(180deg, rgba(170, 198, 234, 0.92), rgba(145, 175, 216, 0.94)) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  filter: drop-shadow(0 2px 2px rgba(9, 28, 55, 0.5)) contrast(1.64) saturate(1.5) brightness(0.5) !important;
  -webkit-filter: drop-shadow(0 2px 2px rgba(9, 28, 55, 0.5)) contrast(1.64) saturate(1.5) brightness(0.5) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(1),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(2),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(1),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(2) {
  fill: #ffffff !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > rect:nth-child(3),
body.theme-light.open-collection-ui .hero-book-icon g > rect:nth-child(3) {
  fill: #2f5f99 !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(4),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(5),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(6),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(7),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(4),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(5),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(6),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(7) {
  stroke: #6f9fdc !important;
}

@media (max-width: 640px) {
  body.open-collection-ui .miniapp-hero-grid {
    grid-template-columns: minmax(0, 1fr) 74px !important;
    column-gap: 12px !important;
  }

  body.open-collection-ui .hero-book-card {
    width: 68px !important;
    height: 68px !important;
    border-radius: 18px !important;
    margin-top: 3px !important;
  }

  body.open-collection-ui .hero-book-card::before {
    inset: 6px !important;
    border-radius: 13px !important;
  }

  body.open-collection-ui .hero-book-icon {
    width: 28px !important;
  }
}

/* Design pass v81: logo readability boost (light theme) */
html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  border: 1px solid rgba(90, 120, 169, 0.92) !important;
  box-shadow:
    0 10px 20px rgba(22, 46, 81, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 0 0 1px rgba(85, 116, 168, 0.34) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card::before,
body.theme-light.open-collection-ui .hero-book-card::before {
  border: 1px solid rgba(79, 109, 160, 0.62);
  background: linear-gradient(180deg, rgba(161, 189, 229, 0.82), rgba(143, 173, 215, 0.86));
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  opacity: 1 !important;
  filter: drop-shadow(0 1px 1px rgba(10, 30, 58, 0.46)) contrast(1.52) saturate(1.34) brightness(0.58) !important;
  -webkit-filter: drop-shadow(0 1px 1px rgba(10, 30, 58, 0.46)) contrast(1.52) saturate(1.34) brightness(0.58) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(1),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(2),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(1),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(2) {
  fill: #f4f9ff !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > rect:nth-child(3),
body.theme-light.open-collection-ui .hero-book-icon g > rect:nth-child(3) {
  fill: #5d80b1 !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(4),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(5),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(6),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(7),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(4),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(5),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(6),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(7) {
  stroke: #89a9d4 !important;
}

/* Design pass v82: premium polish + strong logo contrast */
body.open-collection-ui .miniapp-head,
body.open-collection-ui .mini-route-head,
body.open-collection-ui .post-comments-panel,
body.open-collection-ui .post-recommendations .mini-route-head {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 14px 28px rgba(6, 10, 22, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.open-collection-ui .feed-card .feed-card-body h3,
body.open-collection-ui .post-card .feed-card-body h3,
body.open-collection-ui .folder-card .feed-card-body h3 {
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.018em;
  font-weight: 690;
  margin-bottom: 10px;
}

body.open-collection-ui .post-card .feed-card-body p,
body.open-collection-ui .folder-card .feed-card-body p {
  font-weight: 520;
}

body.open-collection-ui .mini-search-wrap input,
body.open-collection-ui input,
body.open-collection-ui textarea,
body.open-collection-ui select {
  border: 1px solid rgba(127, 100, 192, 0.28);
  background:
    linear-gradient(180deg, rgba(20, 27, 48, 0.9), rgba(14, 21, 39, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.open-collection-ui .button-like,
body.open-collection-ui .secondary-button.button-like,
body.open-collection-ui .feed-button {
  border-radius: 16px;
}

html[data-theme="light"] body.open-collection-ui .miniapp-head,
html[data-theme="light"] body.open-collection-ui .mini-route-head,
html[data-theme="light"] body.open-collection-ui .post-comments-panel,
html[data-theme="light"] body.open-collection-ui .post-recommendations .mini-route-head,
body.theme-light.open-collection-ui .miniapp-head,
body.theme-light.open-collection-ui .mini-route-head,
body.theme-light.open-collection-ui .post-comments-panel,
body.theme-light.open-collection-ui .post-recommendations .mini-route-head {
  box-shadow:
    0 12px 24px rgba(34, 58, 94, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] body.open-collection-ui .feed-card .feed-card-body h3,
html[data-theme="light"] body.open-collection-ui .post-card .feed-card-body h3,
html[data-theme="light"] body.open-collection-ui .folder-card .feed-card-body h3,
body.theme-light.open-collection-ui .feed-card .feed-card-body h3,
body.theme-light.open-collection-ui .post-card .feed-card-body h3,
body.theme-light.open-collection-ui .folder-card .feed-card-body h3 {
  color: #12213b;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  border: 1px solid rgba(66, 98, 150, 0.92) !important;
  background:
    radial-gradient(115% 115% at 24% 14%, rgba(120, 156, 211, 0.62), transparent 56%),
    linear-gradient(180deg, rgba(172, 198, 234, 0.99), rgba(142, 172, 214, 0.99)) !important;
  box-shadow:
    0 12px 22px rgba(16, 39, 73, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(67, 100, 153, 0.32) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card::before,
body.theme-light.open-collection-ui .hero-book-card::before {
  inset: 7px;
  border: 1px solid rgba(56, 90, 144, 0.72);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(196, 220, 247, 0.9), rgba(166, 194, 231, 0.92)),
    linear-gradient(180deg, rgba(167, 194, 229, 0.9), rgba(143, 173, 215, 0.92));
}

body.open-collection-ui .hero-book-icon {
  width: 32px;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  opacity: 1 !important;
  filter: drop-shadow(0 2px 2px rgba(8, 27, 52, 0.48)) contrast(1.62) saturate(1.46) brightness(0.52) !important;
  -webkit-filter: drop-shadow(0 2px 2px rgba(8, 27, 52, 0.48)) contrast(1.62) saturate(1.46) brightness(0.52) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(1),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(2),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(1),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(2) {
  fill: #f8fbff !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > rect:nth-child(3),
body.theme-light.open-collection-ui .hero-book-icon g > rect:nth-child(3) {
  fill: #355f95 !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(4),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(5),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(6),
html[data-theme="light"] body.open-collection-ui .hero-book-icon g > path:nth-child(7),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(4),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(5),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(6),
body.theme-light.open-collection-ui .hero-book-icon g > path:nth-child(7) {
  stroke: #79a4dd !important;
  stroke-width: 4px !important;
}

/* Design pass v80: final icon-card contrast + non-overlap toggle */
body.open-collection-ui .miniapp-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

body.open-collection-ui .miniapp-head-top .hero-eyebrow {
  margin: 0;
}

body.open-collection-ui .theme-toggle {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0;
  flex: 0 0 auto;
}

body.open-collection-ui .miniapp-hero-grid {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.open-collection-ui .hero-book-card {
  position: relative;
  overflow: hidden;
}

body.open-collection-ui .hero-book-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px solid rgba(112, 129, 182, 0.26);
  background: linear-gradient(180deg, rgba(28, 40, 71, 0.52), rgba(18, 28, 51, 0.6));
  z-index: 0;
}

body.open-collection-ui .hero-book-icon {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card,
body.theme-light.open-collection-ui .hero-book-card {
  border: 1px solid rgba(101, 131, 181, 0.88) !important;
  background:
    radial-gradient(120% 120% at 28% 14%, rgba(133, 170, 219, 0.52), transparent 54%),
    linear-gradient(180deg, rgba(198, 219, 246, 0.99), rgba(175, 202, 238, 0.99)) !important;
  box-shadow:
    0 10px 20px rgba(22, 46, 81, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 0 1px rgba(93, 121, 171, 0.24) !important;
}

html[data-theme="light"] body.open-collection-ui .hero-book-card::before,
body.theme-light.open-collection-ui .hero-book-card::before {
  border: 1px solid rgba(90, 120, 169, 0.48);
  background: linear-gradient(180deg, rgba(178, 202, 235, 0.72), rgba(160, 187, 224, 0.78));
}

html[data-theme="light"] body.open-collection-ui .hero-book-icon,
body.theme-light.open-collection-ui .hero-book-icon {
  opacity: 1 !important;
  filter: drop-shadow(0 1px 1px rgba(17, 39, 70, 0.34)) contrast(1.3) saturate(1.24) brightness(0.74) !important;
  -webkit-filter: drop-shadow(0 1px 1px rgba(17, 39, 70, 0.34)) contrast(1.3) saturate(1.24) brightness(0.74) !important;
}

@media (max-width: 640px) {
  body.open-collection-ui .miniapp-head-top {
    margin-bottom: 0;
  }

  body.open-collection-ui .theme-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}
