/* Final layer of the black theme. Loaded after theme-final.css.
   Surfaces stay near-black; a thin white hairline (drawn with an inset shadow, so layout never moves)
   keeps cards, fields and buttons readable on a pure black page. */
/* Typography: Inter for interface text, Playfair Display for large headings, JetBrains Mono for small labels.
   All three are open (SIL OFL) and served from this site. Same roles as on resend.com, which uses
   proprietary ABC Favorit, Domaine and Commit Mono. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/inter-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("assets/fonts/playfair-display-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("assets/fonts/playfair-display-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("assets/fonts/playfair-display-cyrillic-wght-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("assets/fonts/playfair-display-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("assets/fonts/jetbrains-mono-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

body.memora-ui {
  --ds-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ds-font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --ds-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ds-bg: #000000;
  --ds-nav: #000000;
  --ds-surface: #0b0b0d;
  --ds-raised: #141416;
  --ds-hover: #1c1c20;
  --ds-secondary: #d0d0d7;
  --ds-muted: #b2b2bc;
  --ds-hairline: rgba(255, 255, 255, .11);
  --ds-hairline-strong: rgba(255, 255, 255, .22);
  --ui-bg: var(--ds-surface);
  --ui-panel: var(--ds-raised);
  --ui-muted: var(--ds-secondary);
  color-scheme: dark;
}

/* Cards, panels and containers */
body.memora-ui :where(.story-card, .character-result, .creation-card, .persona-card, .recommendation-card, .continue-item, .group-composer, .groups-tabs, .chat-item, .chat-row, .settings-card, .profile-card, .panel, .rolebook-panel, .comment-input-row, .workspace-history-search, .search-field, .search-box, .workspace-create) {
  background: var(--ds-surface) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline) !important;
}
body.memora-ui :where(.story-card, .character-result, .creation-card, .persona-card, .chat-item, .chat-row):is(:hover, :focus-visible) {
  background: var(--ds-raised) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline-strong) !important;
}

/* Fields */
body.memora-ui :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select, .field-control) {
  background: var(--ds-surface) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline) !important;
}
body.memora-ui :where(input, textarea, select, .field-control):focus-visible {
  box-shadow: inset 0 0 0 1px var(--ds-hairline-strong) !important;
}
body.memora-ui ::placeholder { color: #94949e !important; opacity: 1; }

/* Secondary buttons, close buttons, chips, counters, small badges */
body.memora-ui :where(.secondary-button, .icon-button, .dialog-close, .settings-logout, .privacy-option, .login-button, .profile-button, .story-badge, .chat-count, .selection-count, .character-section-count, .result-add, .empty-icon, .option-icon, .workspace-account-avatar, .result-avatar:not(:has(img)), .chip, .tag) {
  background: var(--ds-raised) !important;
  color: var(--ds-text) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline) !important;
}
body.memora-ui :where(.secondary-button, .icon-button, .dialog-close, .settings-logout, .privacy-option):is(:hover, :focus-visible):not(:disabled) {
  background: var(--ds-hover) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline-strong) !important;
}
body.memora-ui :where(button, a)[disabled], body.memora-ui :where(button, a):disabled { color: #8a8a94 !important; }

/* Dialogs, menus, toasts */
body.memora-ui :where(dialog:not(.workspace-details), .mobile-sheet, [role=menu], .toast) {
  background: var(--ds-surface) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline), 0 24px 80px rgba(0, 0, 0, .7) !important;
}
body.memora-ui dialog::backdrop { background: rgba(0, 0, 0, .78); }

/* Side navigation: one clear divider and a visible active item */
body.memora-ui :where(.workspace-sidebar, .workspace-rail, aside.workspace, .app-sidebar) { border-right: 1px solid var(--ds-hairline) !important; }
body.memora-ui :where(.workspace-nav a[aria-current], .workspace-nav a.active, .workspace-link.active, .workspace-link[aria-current]) {
  background: var(--ds-raised) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline) !important;
}

/* Avatar placeholders (letters) */
body.memora-ui :where(.character-visual.is-placeholder, .story-poster) { background: #0a0a0c !important; }

/* Catalog banner: neutral black slides, bubbles without green/teal/violet fills */
body.memora-ui .promo-carousel { background: #000 !important; box-shadow: inset 0 0 0 1px var(--ds-hairline) !important; }
body.memora-ui .promo-float {
  background: rgba(10, 10, 12, .94) !important;
  border-color: var(--ds-hairline-strong) !important;
  color: #f1f1f3 !important;
}
body.memora-ui .promo-progress span, body.memora-ui .promo-segment { background: rgba(255, 255, 255, .28) !important; }

/* Status colours stay: danger and success are meaningful, not decoration. */

/* Search fields: the wrapper draws the hairline, the input inside stays transparent (no second outline). */
body.memora-ui :where(.search-field, .search-box, .workspace-history-search, .comment-input-row, .search-field-wrap) :where(input, textarea) {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
body.memora-ui :where(.search-field, .search-box, .workspace-history-search, .comment-input-row):focus-within {
  box-shadow: inset 0 0 0 1px var(--ds-hairline-strong) !important;
}

/* Fields that sit inside a panel use the raised tone so they read against the panel. */
body.memora-ui :where(.group-composer, .rolebook-panel, .panel) :where(input.field-control, textarea.field-control, select.field-control) {
  background: var(--ds-raised) !important;
}

/* Disabled main buttons: dark and clearly inactive instead of a bright grey slab. */
body.memora-ui :where(.primary-button, .primary-action, .welcome-submit, button.primary, .ui-primary):disabled {
  background: var(--ds-raised) !important;
  color: #8a8a94 !important;
  opacity: 1 !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline) !important;
}

/* Small secondary text in cards: lighter and slightly larger. */
body.memora-ui :where(.card-tags, .story-author, .story-description, .result-meta, .character-result small, .story-card small, .workspace-account small, .empty-state p) {
  color: #b2b2bc !important;
}
body.memora-ui .card-tags { font-size: 11px !important; }
body.memora-ui .character-section-count, body.memora-ui .chat-count, body.memora-ui .selection-count { color: #d0d0d7 !important; }

/* "Not ready yet" main buttons that use aria-disabled instead of the disabled attribute. */
body.memora-ui :where(.primary-button, .primary-action, .welcome-submit, button.primary, .ui-primary)[aria-disabled="true"] {
  background: var(--ds-raised) !important;
  color: #8a8a94 !important;
  opacity: 1 !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline) !important;
}

/* Interface text: Inter everywhere except the logo, icons and code. */
body.memora-ui, body.memora-ui :where(*:not(.brand-wordmark, .workspace-brand, .workspace-brand *, .workspace-mobile-brand, .welcome-brand *, svg, svg *, code, pre, kbd)) {
  font-family: var(--ds-font) !important;
  font-optical-sizing: auto;
}
body.memora-ui { -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss03"; }

/* Large headings: high-contrast serif, tight tracking, medium weight. */
body.memora-ui :is(.promo-copy h2, .welcome-intro h2, .welcome-art h1, .hero-copy h1, .creation-card h2, .page-header h1, .chats-heading h1, .settings-title h1, .group-intro h1, .groups-heading h1, .create-intro h1, .character-copy h1, .author-hero h1, .guest-welcome h1, .section-heading h2, .character-stories-heading h2, .info-panel h2, .admin-choice-content h2, #legalConsentForm h2, #codeForm h2, #resetForm h2) {
  font-family: var(--ds-font-display) !important;
  font-weight: 500 !important;
  letter-spacing: -.025em !important;
  font-synthesis: none;
}
body.memora-ui .promo-copy h2 em, body.memora-ui .welcome-art h1 em { font-style: italic; }

/* Small labels: monospace, uppercase, wide tracking. */
body.memora-ui :is(.eyebrow, .promo-eyebrow, .chat-persona-eyebrow, .story-badge) {
  font-family: var(--ds-font-mono) !important;
  letter-spacing: .06em;
}
body.memora-ui :is(.eyebrow, .promo-eyebrow, .chat-persona-eyebrow) { text-transform: uppercase; font-size: 11px; }
/* Tags: small outlined chips on one row. A chip that does not fit is hidden whole, never cut in half. */
body.memora-ui .card-tags {
  display: flex !important; flex-wrap: wrap; align-content: flex-start; gap: 6px;
  height: 24px; max-height: 24px; overflow: hidden; white-space: normal !important;
  -webkit-line-clamp: unset !important; text-overflow: clip;
  font-family: var(--ds-font) !important; text-transform: none; letter-spacing: 0; line-height: 1 !important;
}
body.memora-ui .card-tags .card-tag {
  font-style: normal; font-size: 11px; line-height: 1; white-space: nowrap;
  padding: 5px 9px; border-radius: 999px; color: #c4c4cc;
  box-shadow: inset 0 0 0 1px var(--ds-hairline);
}
body.memora-ui :is(#codeInput, #resetCode, input[inputmode=numeric]) { font-family: var(--ds-font-mono) !important; letter-spacing: .3em; }

/* Every page title (h1) uses the display serif, so "С возвращением" matches the other pages. */
body.memora-ui h1:not(.brand-wordmark):not(.workspace-brand) {
  font-family: var(--ds-font-display) !important;
  font-weight: 500 !important;
  letter-spacing: -.025em !important;
  font-synthesis: none;
}
body.memora-ui.home-page h1:not(.brand-wordmark):not(.workspace-brand) { font-size: 28px !important; }

/* Banner text must not run under the artwork. */
body.memora-ui .promo-copy p { max-width: 400px; }

/* Chat header and composer: black with a hairline instead of a translucent grey slab. */
body.memora-ui :is(.chat-header, .chat-topbar, .workspace-chat-header, .composer, .composer-wrap) { background: transparent !important; }
body.memora-ui :is(.chat-header, .chat-topbar, .workspace-chat-header) { box-shadow: inset 0 -1px 0 var(--ds-hairline) !important; }
body.memora-ui .composer { box-shadow: inset 0 0 0 1px var(--ds-hairline) !important; background: var(--ds-surface) !important; }

/* Chat: the wallpaper is dimmed, bubbles are solid, header and composer are black with a hairline. */
body.memora-ui .chat-wallpaper { opacity: .12 !important; filter: grayscale(1) brightness(.8) !important; }
body.memora-ui .workspace-chat .has-wallpaper .message.assistant .message-text,
body.memora-ui .message.assistant .message-text {
  background: var(--ds-surface) !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline) !important;
}
body.memora-ui .message.user .message-text {
  background: var(--ds-raised) !important;
  border-color: transparent !important;
  box-shadow: inset 0 0 0 1px var(--ds-hairline-strong) !important;
}
body.memora-ui.workspace-chat :is(.chat-header, .group-chat-header), body.memora-ui .chat-header { background: #000 !important; backdrop-filter: none !important; }
body.memora-ui .chat-header::before { display: none; }
body.memora-ui.workspace-chat :is(.composer-wrap, .has-wallpaper > .composer-wrap), body.memora-ui .composer-wrap { background: linear-gradient(to top, #000 74%, transparent) !important; }
body.memora-ui .composer textarea, body.memora-ui .composer input { background: transparent !important; box-shadow: none !important; }
body.memora-ui .composer button:not(:disabled) { background: var(--ds-primary) !important; color: var(--ds-on-primary) !important; border-color: transparent !important; box-shadow: none !important; }
body.memora-ui .composer button:disabled { background: var(--ds-raised) !important; color: #8a8a94 !important; }

/* Thumbnails: the pictures keep their own colours. Only a hairline ring is added, so dark arts
   do not melt into the card. */
body.memora-ui .story-poster, body.memora-ui .continue-item > img, body.memora-ui .result-avatar {
  position: relative;
  border-radius: 12px !important;
  overflow: hidden;
  background: #070708 !important;
}
body.memora-ui .story-poster img, body.memora-ui .continue-item > img, body.memora-ui .result-avatar img { filter: none !important; }
body.memora-ui .story-poster::after, body.memora-ui .result-avatar::after {
  content: "" !important; display: block !important; position: absolute; inset: 0; border-radius: inherit;
  background: none !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .17); pointer-events: none; opacity: 1 !important; transform: none !important;
}
/* The "Editors' choice" style badges sit on top of the art: keep them black and quiet. */
body.memora-ui .story-badge { background: rgba(0, 0, 0, .78) !important; color: #e6e6ea !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14) !important; }
/* Flag and bookmark: quiet until the card is hovered. */
body.memora-ui.workspace-catalog .save-story { color: #9a9aa4 !important; }
body.memora-ui.workspace-catalog .save-story:hover, body.memora-ui.workspace-catalog .save-story.saved { color: #f1f1f3 !important; }

/* ---------- Declutter ----------
   Nothing is removed from the markup. Decoration goes, rarely used controls appear on hover,
   and touch screens (no hover) keep every control visible. */

/* Catalog cards: no outline at rest, outline on hover; tags are plain text, two at most. */
body.memora-ui.workspace-catalog .story-card { box-shadow: none !important; background: #0a0a0c !important; }
body.memora-ui.workspace-catalog .story-card:is(:hover, :focus-within) { background: var(--ds-raised) !important; box-shadow: inset 0 0 0 1px var(--ds-hairline) !important; }
body.memora-ui .card-tags .card-tag { box-shadow: none; padding: 0; border-radius: 0; font-size: 11px; color: #a4a4ae; }
body.memora-ui .card-tags .card-tag + .card-tag::before { content: "·"; margin: 0 6px 0 0; color: #5f5f68; }
body.memora-ui .card-tags .card-tag:nth-child(n+3) { display: none; }
body.memora-ui .card-tags { gap: 6px; height: 16px; max-height: 16px; }

/* Flag and bookmark: only on hover or keyboard focus. A saved bookmark stays visible. */
@media (hover: hover) and (pointer: fine) {
  body.home-page.memora-ui.workspace-catalog .story-card .save-story:not(.saved) { opacity: 0 !important; transition: opacity .15s ease; }
  body.home-page.memora-ui.workspace-catalog .story-card:is(:hover, :focus-within) .save-story,
  body.home-page.memora-ui.workspace-catalog .story-card .save-story:focus-visible,
  body.home-page.memora-ui.workspace-catalog .story-card .save-story.saved { opacity: 1 !important; }
}

/* Catalog banner: one idea, one button. */
body.memora-ui .promo-eyebrow, body.memora-ui .promo-orbit, body.memora-ui .promo-message { display: none !important; }
body.memora-ui .promo-cta svg { display: none; }
body.memora-ui .promo-cta { gap: 0; }
@media (hover: hover) and (pointer: fine) {
  body.memora-ui .promo-carousel .promo-navigation button { opacity: 0; transition: opacity .15s ease; }
  body.memora-ui .promo-carousel:is(:hover, :focus-within) .promo-navigation button { opacity: 1; }
}

/* Shelves: the scroll button that cannot do anything yet is hidden (it keeps its place). */
body.memora-ui .shelf-controls button:disabled { visibility: hidden; }

/* Genre filters: one scrolling row instead of a block of buttons. */
body.memora-ui .filter-row { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
body.memora-ui .filter-row::-webkit-scrollbar { display: none; }
body.memora-ui .filter-row > * { flex: 0 0 auto; }

/* Sidebar profile: name only. */
body.memora-ui .workspace-profile small { display: none; }

/* ---------- One system ----------
   Shape:   pills for controls, 16px for cards, 24px for dialogs.
   Size:    actions, tabs and fields are 44px high.
   Type:    h1 and h2 in the display serif, everything else in Inter, small labels in mono.
   Colour:  black, greys and white. Red only for errors and required marks. */

/* Controls: one height */
body.memora-ui :is(.filter-row button, .create-group-button, .public-profile-tab, .classic-voice-actions .secondary-button, .promo-cta, .chat-tabs button, .groups-tabs button) {
  min-height: 44px !important; height: 44px !important;
}
body.memora-ui :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not(#codeInput):not(#resetCode):not([inputmode=numeric]), select):not(.workspace-history-search *):not(.search-field *):not(.search-box *):not(.comment-input-row *) {
  height: 44px; min-height: 44px;
}
body.memora-ui :is(.search-field, .search-box, .workspace-history-search) { min-height: 44px; border-radius: 999px !important; }

/* Containers: one radius */
body.memora-ui :is(.creation-card, .group-composer, .panel, .promo-carousel, .settings-card, .profile-card, .help-card, .story-card, .continue-item) { border-radius: 16px !important; }

/* BETA mark: outlined, so it stops competing with the main action */
body.memora-ui .workspace-brand::after, body.memora-ui .brand-wordmark::after, body.memora-ui .brand-beta-label::after, body .brand-beta-label::after {
  background: transparent !important; color: #b2b2bc !important; border-radius: 999px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24) !important;
}

/* Headings: h1 and h2 serif, h3 and below Inter */
body.memora-ui :is(h1, h2):not(.brand-wordmark):not(.workspace-brand) {
  font-family: var(--ds-font-display) !important; font-weight: 500 !important; letter-spacing: -.02em !important; font-synthesis: none;
}

/* The one remaining accent colour becomes white italic serif */
body.memora-ui .promo-slide, body.memora-ui .promo-carousel { --promo-accent: #f1f1f3 !important; }
body.memora-ui :is(.promo-copy h2 em, .welcome-art h1 em) { color: #f1f1f3 !important; font-style: italic; }

/* Admin: the refresh button is a circle like every other icon button. */
body.memora-ui .admin-button { border-radius: 999px !important; }

/* Accent word in the banner and on the sign-in art: italic display serif. */
body.memora-ui :is(.promo-copy h2 em, .welcome-art h1 em) {
  font-family: var(--ds-font-display) !important; font-style: italic !important; font-weight: 500 !important;
}

/* ---------- Banner in the App Store style ----------
   Dark text panel on the left, a colour gradient on the right, five tilted squares (diamonds) with
   character art. Each slide has its own gradient through --g1 and --g2. */
body.memora-ui .promo-carousel { border-radius: 20px !important; }
body.memora-ui .promo-carousel .promo-stage { height: 330px; }
body.memora-ui .promo-carousel .promo-slide {
  background:
    linear-gradient(90deg, rgba(0,0,0,.42) 0, rgba(0,0,0,.42) 34%, rgba(0,0,0,0) 34.1%),
    linear-gradient(180deg, var(--g1) 0%, var(--g2) 100%) !important;
}
body.memora-ui .promo-carousel .promo-slide::after { display: none !important; }
body.memora-ui .promo-carousel .promo-slide { animation: none !important; }
body.memora-ui .promo-stories    { --g1: #8a3fe0; --g2: #e0576a; }
body.memora-ui .promo-characters { --g1: #2f6fe0; --g2: #8a4fd6; }
body.memora-ui .promo-create     { --g1: #e0702f; --g2: #d63a7a; }
body.memora-ui .promo-groups     { --g1: #1f9d8f; --g2: #2f6fe0; }
body.memora-ui .promo-worlds     { --g1: #3a46d6; --g2: #14a0c8; }
body.memora-ui .promo-personas   { --g1: #b83fd0; --g2: #e0576a; }

body.memora-ui .promo-carousel .promo-copy {
  width: 34%; height: 100%; padding: 34px 30px 30px 32px; box-sizing: border-box;
  display: flex; flex-direction: column;
}
body.memora-ui .promo-carousel .promo-eyebrow {
  display: block !important; font-family: var(--ds-font); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.9) !important; font-family: var(--ds-font) !important;
}
body.memora-ui #promoCarousel .promo-copy h2 {
  margin: 8px 0 0 !important; font-family: var(--ds-font) !important; font-weight: 600 !important;
  font-size: 26px !important; line-height: 1.18 !important; letter-spacing: -.02em !important; color: #fff !important;
}
body.memora-ui #promoCarousel .promo-copy h2 em { font-family: inherit !important; font-style: normal !important; font-weight: inherit !important; color: #fff !important; }
body.memora-ui .promo-carousel .promo-copy p { margin: auto 0 0; max-width: none; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.88); }
body.memora-ui .promo-carousel .promo-copy p br { display: none; }
body.memora-ui .promo-carousel .promo-cta {
  align-self: flex-start; margin-top: 14px !important; min-height: 36px !important; height: 36px !important;
  padding: 0 18px !important; font-size: 13px; font-weight: 600; background: #fff !important; color: #000 !important;
  backdrop-filter: blur(8px); box-shadow: none !important;
}
body.memora-ui .promo-carousel .promo-cta:hover { background: rgba(255,255,255,.85) !important; transform: none; }

/* Diamonds */
body.memora-ui .promo-carousel .promo-art.promo-diamonds {
  --u: 1; left: 34%; right: 0; width: auto !important; top: 0; height: 100% !important; transform: none !important; opacity: 1 !important;
  display: flex; align-items: center; justify-content: center; padding: 0 20px 14px 20px; box-sizing: border-box; overflow: hidden;
}
body.memora-ui .promo-diamonds i {
  --s: 150px; position: relative; flex: 0 0 auto; display: block;
  width: calc(var(--s) * var(--u)); height: calc(var(--s) * var(--u));
  margin-inline: calc(var(--s) * var(--u) * .207 + 3px);
  border-radius: calc(var(--s) * var(--u) * .2); overflow: hidden; rotate: 45deg;
  box-shadow: 0 10px 28px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.14);
  background: #111;
}
body.memora-ui .promo-diamonds i:nth-child(1), body.memora-ui .promo-diamonds i:nth-child(5) { --s: 116px; }
body.memora-ui .promo-diamonds i:nth-child(2), body.memora-ui .promo-diamonds i:nth-child(4) { --s: 84px; }
body.memora-ui .promo-diamonds i:nth-child(3) { --s: 72px; }
body.memora-ui .promo-diamonds img {
  position: absolute; left: 50%; top: 50%; width: 142%; height: 142%; max-width: none; object-fit: cover; object-position: center 20%;
  transform: translate(-50%, -50%) rotate(-45deg); filter: none !important;
}

/* Slide indicators: small dots at the bottom of the art */
body.memora-ui .promo-carousel .promo-pagination { top: auto; bottom: 8px; left: 34%; right: 0; justify-content: center; gap: 2px; }
body.memora-ui .promo-carousel .promo-pagination button { flex: 0 0 18px; height: 20px; }
body.memora-ui .promo-carousel .promo-pagination button span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.7) !important; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
body.memora-ui .promo-carousel .promo-pagination button[aria-current] span { background: #fff !important; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }

@media (max-width: 1100px) and (min-width: 781px) {
  body.memora-ui .promo-carousel .promo-copy { width: 38%; padding-inline: 24px; }
  body.memora-ui .promo-carousel .promo-copy h2 { font-size: 22px !important; }
  body.memora-ui .promo-carousel .promo-art.promo-diamonds { left: 38%; --u: .9; }
  body.memora-ui .promo-diamonds i:is(:nth-child(1), :nth-child(5)) { display: none; }
  body.memora-ui .promo-carousel .promo-slide { background: linear-gradient(90deg, rgba(0,0,0,.42) 0, rgba(0,0,0,.42) 38%, rgba(0,0,0,0) 38.1%), linear-gradient(180deg, var(--g1), var(--g2)) !important; }
  body.memora-ui .promo-carousel .promo-pagination { left: 38%; }
}
@media (max-width: 780px) {
  body.memora-ui .promo-carousel .promo-stage { height: 380px !important; aspect-ratio: auto !important; }
  body.memora-ui .promo-carousel .promo-slide { background: linear-gradient(180deg, var(--g1), var(--g2)) !important; }
  body.memora-ui .promo-carousel .promo-copy { width: 100% !important; height: auto !important; padding: 24px 22px 0 !important; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,0)); }
  body.memora-ui .promo-carousel .promo-copy h2 { font-size: 24px !important; max-width: none !important; }
  body.memora-ui .promo-carousel .promo-copy p { display: none; }
  body.memora-ui .promo-carousel .promo-cta { position: static !important; margin-top: 14px !important; }
  body.memora-ui .promo-carousel .promo-art.promo-diamonds { left: 0; right: 0; top: auto !important; bottom: 0; height: 190px !important; --u: .9; padding: 0 12px 14px; }
  body.memora-ui .promo-diamonds i:is(:nth-child(1), :nth-child(5)) { display: none; }
  body.memora-ui .promo-carousel .promo-pagination { left: 0; bottom: 4px; }
}

/* ---------- Section titles: one face ---------- */
body.memora-ui :is(.shelf-heading h2, .shelf-heading h2 a, .catalog-heading-copy h2, .continue-heading h2, .discover-heading h2) {
  font-family: var(--ds-font-display) !important; font-weight: 500 !important; font-size: 24px !important;
  line-height: 1.2 !important; letter-spacing: -.02em !important;
}
body.memora-ui .shelf-heading h2 a { display: inline-flex; align-items: center; gap: 6px; }
body.memora-ui .shelf-heading { margin-bottom: 16px; }
body.home-page .catalog-heading-copy { margin-bottom: 20px !important; }
body.home-page #resetCatalog, body.home-page .filter-row { margin-top: 0; }

/* ---------- Group builder: round avatars ---------- */
body.memora-ui.page-group-builder :is(.result-avatar, .selected-avatar, .summary-avatar),
body.memora-ui.page-group-builder :is(.result-avatar, .selected-avatar, .summary-avatar) img,
body.memora-ui.page-group-builder :is(.result-avatar, .selected-avatar, .summary-avatar)::after { border-radius: 50% !important; }

/* ---------- Banners: a different composition per slide ---------- */
/* 1 and 5: one full-bleed picture, text laid over the dark side (like the Valheim banner) */
body.memora-ui .promo-carousel .promo-slide.promo-stories,
body.memora-ui .promo-carousel .promo-slide.promo-worlds {
  background: linear-gradient(90deg, rgba(0,0,0,.78) 0, rgba(0,0,0,.5) 36%, rgba(0,0,0,0) 72%), var(--bg) center / cover no-repeat !important;
}
body.memora-ui .promo-stories { --bg: url("assets/welcome-nebula-poster.jpg"); }
body.memora-ui .promo-worlds  { --bg: url("assets/welcome-ocean-poster.jpg"); }
body.memora-ui .promo-stories .promo-art, body.memora-ui .promo-worlds .promo-art { display: none !important; }
body.memora-ui .promo-carousel .promo-stories .promo-copy, body.memora-ui .promo-carousel .promo-worlds .promo-copy { width: 46%; }

/* 2: a fan of tall frosted cards (like the action-games banner) */
body.memora-ui .promo-carousel .promo-characters .promo-diamonds i {
  --s: 1px; width: 104px; height: 206px; margin: 0 0 0 -16px; border-radius: 20px; rotate: 0deg;
  background: rgba(255,255,255,.16); box-shadow: 0 14px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.28);
}
body.memora-ui .promo-carousel .promo-characters .promo-diamonds i:nth-child(1) { rotate: -12deg; translate: 0 16px; height: 170px; }
body.memora-ui .promo-carousel .promo-characters .promo-diamonds i:nth-child(2) { rotate: -6deg; translate: 0 6px; height: 190px; }
body.memora-ui .promo-carousel .promo-characters .promo-diamonds i:nth-child(3) { rotate: 0deg; height: 212px; width: 118px; z-index: 2; }
body.memora-ui .promo-carousel .promo-characters .promo-diamonds i:nth-child(4) { rotate: 6deg; translate: 0 6px; height: 190px; }
body.memora-ui .promo-carousel .promo-characters .promo-diamonds i:nth-child(5) { rotate: 12deg; translate: 0 16px; height: 170px; }
body.memora-ui .promo-carousel .promo-characters .promo-diamonds img { left: 0; top: 0; width: 100%; height: 100%; transform: none; object-position: center 15%; }

/* 4: overlapping round portraits on a flat colour field (like the editorial banner) */
body.memora-ui .promo-carousel .promo-groups { --g1: #2f9e7a; --g2: #1b6e63; }
body.memora-ui .promo-carousel .promo-groups .promo-diamonds i {
  --s: 1px; width: 150px; height: 150px; margin: 0 0 0 -30px; border-radius: 50%; rotate: 0deg;
  box-shadow: 0 0 0 5px rgba(0,0,0,.55), 0 14px 28px rgba(0,0,0,.3);
}
body.memora-ui .promo-carousel .promo-groups .promo-diamonds i:nth-child(odd) { translate: 0 -14px; }
body.memora-ui .promo-carousel .promo-groups .promo-diamonds i:nth-child(even) { translate: 0 14px; }
body.memora-ui .promo-carousel .promo-groups .promo-diamonds i:nth-child(3) { width: 170px; height: 170px; z-index: 2; }
body.memora-ui .promo-carousel .promo-groups .promo-diamonds img { left: 0; top: 0; width: 100%; height: 100%; transform: none; object-position: center 20%; }

/* 6: tilted rounded squares on a painted gradient (like the heritage banner) */
body.memora-ui .promo-carousel .promo-slide.promo-personas {
  background:
    linear-gradient(90deg, rgba(0,0,0,.42) 0, rgba(0,0,0,.42) 34%, rgba(0,0,0,0) 34.1%),
    radial-gradient(circle at 22% 25%, #ffc14d 0, transparent 38%),
    radial-gradient(circle at 85% 20%, #ff5d8f 0, transparent 42%),
    radial-gradient(circle at 60% 95%, #2ee6a6 0, transparent 40%),
    #6a3cc9 !important;
}
body.memora-ui .promo-carousel .promo-personas .promo-diamonds i {
  --s: 1px; width: 112px; height: 112px; margin: 0 0 0 -10px; border-radius: 26px;
  box-shadow: 0 12px 26px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.3);
}
body.memora-ui .promo-carousel .promo-personas .promo-diamonds i:nth-child(1) { rotate: -9deg; translate: 0 -22px; }
body.memora-ui .promo-carousel .promo-personas .promo-diamonds i:nth-child(2) { rotate: 6deg; translate: 0 24px; }
body.memora-ui .promo-carousel .promo-personas .promo-diamonds i:nth-child(3) { rotate: -4deg; translate: 0 -10px; width: 128px; height: 128px; z-index: 2; }
body.memora-ui .promo-carousel .promo-personas .promo-diamonds i:nth-child(4) { rotate: 8deg; translate: 0 26px; }
body.memora-ui .promo-carousel .promo-personas .promo-diamonds i:nth-child(5) { rotate: -7deg; translate: 0 -20px; }
body.memora-ui .promo-carousel .promo-personas .promo-diamonds img { left: 0; top: 0; width: 100%; height: 100%; transform: none; object-position: center 15%; }

@media (max-width: 780px) {
  body.memora-ui .promo-carousel .promo-slide.promo-stories, body.memora-ui .promo-carousel .promo-slide.promo-worlds {
    background: linear-gradient(180deg, rgba(0,0,0,.72) 0, rgba(0,0,0,.35) 60%, rgba(0,0,0,.1) 100%), var(--bg) center / cover no-repeat !important;
  }
  body.memora-ui .promo-carousel .promo-stories .promo-copy, body.memora-ui .promo-carousel .promo-worlds .promo-copy { width: 100% !important; }
  body.memora-ui .promo-carousel .promo-slide.promo-personas { background: radial-gradient(circle at 20% 80%, #ffc14d 0, transparent 40%), radial-gradient(circle at 85% 70%, #ff5d8f 0, transparent 45%), #6a3cc9 !important; }
  body.memora-ui .promo-carousel .promo-characters .promo-diamonds i { width: 84px; height: 150px; }
  body.memora-ui .promo-carousel .promo-groups .promo-diamonds i { width: 104px; height: 104px; }
  body.memora-ui .promo-carousel .promo-groups .promo-diamonds i:nth-child(3) { width: 118px; height: 118px; }
  body.memora-ui .promo-carousel .promo-personas .promo-diamonds i { width: 88px; height: 88px; }
  body.memora-ui .promo-carousel .promo-personas .promo-diamonds i:nth-child(3) { width: 100px; height: 100px; }
}

/* Full-bleed slides: dots centred on the whole banner, readable on a light picture */
body.memora-ui .promo-carousel:has(.promo-stories:not([hidden])) .promo-pagination,
body.memora-ui .promo-carousel:has(.promo-worlds:not([hidden])) .promo-pagination { left: 0; }
body.memora-ui .promo-carousel .promo-pagination button span { box-shadow: 0 0 0 1px rgba(0,0,0,.28), 0 1px 4px rgba(0,0,0,.35); }
body.memora-ui .promo-worlds { background-position: 70% center; }
