:root {
	/* Fonts */
	--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

	/* Typography scale (rem) */
	--text-xs: 0.75rem;
	--text-sm: 0.875rem;
	--text-base: 1rem;
	--text-lg: 1.125rem;
	--text-xl: 1.25rem;
	--text-2xl: 1.5rem;
	--text-3xl: 1.875rem;
	--text-4xl: 2.25rem;
	--text-5xl: 3rem;
	--text-6xl: 3.75rem;
	--text-7xl: 4.5rem;
	--text-8xl: 6rem;

	/* Line-height + tracking */
	--leading-tight: 1.25;
	--leading-snug: 1.375;
	--leading-relaxed: 1.625;
	--tracking-tight: -0.025em;
	--tracking-wide: 0.025em;
	--tracking-wider: 0.05em;
	--tracking-widest: 0.1em;

	/* Spacing */
	--spacing: 0.25rem;

	/* Radius */
	--radius-xs: 0.125rem;
	--radius-sm: 0.25rem;
	--radius-md: 0.375rem;
	--radius-lg: 0.5rem;
	--radius-xl: 0.75rem;
	--radius-2xl: 1rem;
	--radius-3xl: 1.5rem;

	/* Brand primary — Tailwind `primary` / `ring` (same hue as emerald-500) */
	--primary-oklch: oklch(69.6% 0.17 162.48);
	--primary-hover-oklch: oklch(58% 0.16 162.48);
	--primary-fg-oklch: oklch(100% 0 0);
	--primary-muted-oklch: oklch(94% 0.06 162.48);
	--primary-subtle-oklch: oklch(96.5% 0.04 162.48);
	--ring-oklch: oklch(55% 0.14 162.48);

	/* Neutrals: achromatic whites/grays (background, cards, sidebar, auth — primary only on accents) */
	--bg-oklch: oklch(97% 0 0);
	--surface-oklch: oklch(100% 0 0);
	--surface-2-oklch: oklch(96.5% 0 0);
	--surface-elevated-oklch: oklch(100% 0 0);
	--text-oklch: oklch(22% 0 0);
	--text-muted-oklch: oklch(48% 0 0);
	--border-oklch: oklch(91% 0 0);
	--border-strong-oklch: oklch(83% 0 0);

	/* Feedback (RGB — Tailwind danger utilities) */
	--danger: 220 38 38;
	--danger-foreground: 255 255 255;
	--danger-muted: 254 242 242;
	--danger-border: 252 165 165;

	/* Elevation — neutral (any primary works) */
	--elevation-xs: 0 1px 2px rgb(0 0 0 / 0.05);
	--elevation-sm: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
	--elevation-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
	--elevation-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
	--elevation-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
	--elevation-primary: 0 4px 14px color-mix(in oklch, var(--primary-oklch) 35%, transparent);

	color-scheme: light;
}

[data-theme="dark"] {
	/* Brand still follows --primary-oklch (swap primary freely) */
	--primary-oklch: oklch(72% 0.14 162.48);
	--primary-hover-oklch: oklch(78% 0.11 162.48);
	--primary-fg-oklch: oklch(14% 0 0);
	--primary-muted-oklch: oklch(26% 0.05 162.48);
	--primary-subtle-oklch: oklch(22% 0.04 162.48);
	--ring-oklch: oklch(70% 0.12 162.48);

	/* Neutrals: achromatic so any primary works (no green cast on chrome) */
	--bg-oklch: oklch(14.5% 0 0);
	--surface-oklch: oklch(18.5% 0 0);
	--surface-2-oklch: oklch(22.5% 0 0);
	--surface-elevated-oklch: oklch(27% 0 0);
	--text-oklch: oklch(96% 0 0);
	--text-muted-oklch: oklch(68% 0 0);
	--border-oklch: oklch(34% 0 0);
	--border-strong-oklch: oklch(44% 0 0);

	--danger: 248 113 113;
	--danger-foreground: 24 22 32;
	--danger-muted: 60 32 38;
	--danger-border: 127 55 67;

	--elevation-xs: 0 1px 2px rgb(0 0 0 / 0.35);
	--elevation-sm: 0 1px 3px rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.3);
	--elevation-md: 0 4px 6px -1px rgb(0 0 0 / 0.45), 0 2px 4px -2px rgb(0 0 0 / 0.35);
	--elevation-lg: 0 10px 15px -3px rgb(0 0 0 / 0.45), 0 4px 6px -4px rgb(0 0 0 / 0.35);
	--elevation-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
	--elevation-primary: 0 4px 20px color-mix(in oklch, var(--primary-oklch) 28%, transparent);

	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
		--primary-oklch: oklch(72% 0.14 162.48);
		--primary-hover-oklch: oklch(78% 0.11 162.48);
		--primary-fg-oklch: oklch(14% 0 0);
		--primary-muted-oklch: oklch(26% 0.05 162.48);
		--primary-subtle-oklch: oklch(22% 0.04 162.48);
		--ring-oklch: oklch(70% 0.12 162.48);

		--bg-oklch: oklch(14.5% 0 0);
		--surface-oklch: oklch(18.5% 0 0);
		--surface-2-oklch: oklch(22.5% 0 0);
		--surface-elevated-oklch: oklch(27% 0 0);
		--text-oklch: oklch(96% 0 0);
		--text-muted-oklch: oklch(68% 0 0);
		--border-oklch: oklch(34% 0 0);
		--border-strong-oklch: oklch(44% 0 0);

		--danger: 248 113 113;
		--danger-foreground: 24 22 32;
		--danger-muted: 60 32 38;
		--danger-border: 127 55 67;

		--elevation-xs: 0 1px 2px rgb(0 0 0 / 0.35);
		--elevation-sm: 0 1px 3px rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.3);
		--elevation-md: 0 4px 6px -1px rgb(0 0 0 / 0.45), 0 2px 4px -2px rgb(0 0 0 / 0.35);
		--elevation-lg: 0 10px 15px -3px rgb(0 0 0 / 0.45), 0 4px 6px -4px rgb(0 0 0 / 0.35);
		--elevation-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
		--elevation-primary: 0 4px 20px color-mix(in oklch, var(--primary-oklch) 28%, transparent);

		color-scheme: dark;
	}
}

html {
	font-family: var(--font-sans);
	background-color: var(--bg-oklch);
}

body {
	font-family: var(--font-sans);
	color: var(--text-oklch);
	background-color: var(--bg-oklch);
	background-image: radial-gradient(ellipse 100% 60% at 50% -15%, color-mix(in oklch, oklch(85% 0 0) 18%, transparent), transparent 52%);
	background-attachment: fixed;
	min-height: 100vh;
}

[data-theme="dark"] body {
	background-image: radial-gradient(ellipse 90% 55% at 50% -10%, color-mix(in oklch, oklch(26% 0 0) 22%, transparent), transparent 50%);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) body {
		background-image: radial-gradient(ellipse 90% 55% at 50% -10%, color-mix(in oklch, oklch(26% 0 0) 22%, transparent), transparent 50%);
	}
}

/* Environment notices — explicit CSS so layout/color work even if Tailwind utilities are missing from the build.
 * K-0f2759a6: at the top right of the page, small, so they never sit on AIDE's
 * feedback button in the bottom-right corner. They scroll with the page, under
 * the menu bar and behind the menus and dialogs, and cover none of the page's
 * controls:
 *   signed out          the top-right corner, above the centred card;
 *   signed in, wide     a tab on the top edge, in the space above the page's
 *                       heading (the page starts 1.5rem down);
 *   signed in, small    just under the menu button, and the page starts below
 *                       it while it is shown (dismissed, the page moves back up).
 * Shown only outside the live service (views/partials/header.ejs). */
.env-floating-banner {
	position: absolute;
	top: max(0.75rem, env(safe-area-inset-top, 0px));
	right: max(0.75rem, env(safe-area-inset-right, 0px));
	left: auto;
	bottom: auto;
	z-index: 90;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	height: 1.25rem;
	max-width: min(calc(100vw - 1.5rem), 20rem);
	border-radius: 0.375rem;
	padding: 0 0.125rem 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.025em;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

@media (width >= 40rem) {
	.env-floating-banner {
		top: max(1rem, env(safe-area-inset-top, 0px));
		right: max(1rem, env(safe-area-inset-right, 0px));
	}
}

/* Signed in on a small screen: under the menu button (the bar ends 3.125rem
   down, 3.375rem from 40rem), and the page starts under the notice. */
@media (width < 64rem) {
	.env-floating-banner--app {
		top: 3.5rem;
	}

	body:has(> .env-floating-banner--app) .main-with-sidebar {
		padding-top: 5.5rem;
	}
}

@media (40rem <= width < 64rem) {
	.env-floating-banner--app {
		top: 3.75rem;
	}

	body:has(> .env-floating-banner--app) .main-with-sidebar {
		padding-top: 5.75rem;
	}
}

/* Signed in on a wide screen: a tab on the top edge, above the page's heading. */
@media (width >= 64rem) {
	.env-floating-banner--app {
		top: 0;
		right: 1.5rem;
		border-top-width: 0;
		border-radius: 0 0 0.375rem 0.375rem;
	}
}

.env-floating-banner--staging {
	background-color: #fde047;
	color: #0f172a;
	border: 1px solid rgb(202 138 4 / 0.5);
}

.env-floating-banner--test {
	background-color: #dc2626;
	color: #ffffff;
	border: 1px solid rgb(185 28 28 / 0.8);
}

.env-floating-banner__label {
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
}

.env-floating-banner__dismiss {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.25rem;
	padding: 0.125rem;
	margin: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	line-height: 0;
}

.env-floating-banner__dismiss svg {
	width: 0.875rem;
	height: 0.875rem;
}

.env-floating-banner--staging .env-floating-banner__dismiss {
	color: rgb(15 23 42 / 0.9);
}

.env-floating-banner--staging .env-floating-banner__dismiss:hover {
	background-color: rgb(15 23 42 / 0.1);
}

.env-floating-banner--staging .env-floating-banner__dismiss:focus-visible {
	outline: 2px solid rgb(15 23 42 / 0.35);
	outline-offset: 1px;
}

.env-floating-banner--test .env-floating-banner__dismiss {
	color: rgb(255 255 255 / 0.9);
}

.env-floating-banner--test .env-floating-banner__dismiss:hover {
	background-color: rgb(255 255 255 / 0.15);
}

.env-floating-banner--test .env-floating-banner__dismiss:focus-visible {
	outline: 2px solid rgb(255 255 255 / 0.5);
	outline-offset: 1px;
}

/* Responsive shell helpers (avoid relying on Tailwind responsive extraction) */
.desktop-sidebar {
	display: none;
}

.mobile-sidebar-root {
	display: block;
}

.main-with-sidebar {
	margin-left: 0;
}

/* K-84fe8808: below 64rem the menu bar floats at the top of every signed-in
   page (views/partials/header.ejs): the page's name and the menu button. The
   page starts below it for as long as it is shown — 4rem down on a phone (the
   bar ends 3.125rem down), 4.25rem from 40rem (it ends 3.375rem down) — so it
   covers no heading or button on a tablet either. Each page's own `sm:pt-5`
   used to take that room away from 40rem while the bar stayed up to 64rem. */
@media (width < 40rem) {
	.main-with-sidebar {
		padding-top: 4rem;
	}
}

@media (40rem <= width < 64rem) {
	.main-with-sidebar {
		padding-top: 4.25rem;
	}
}

@media (width >= 64rem) {
	.desktop-sidebar {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		height: 100dvh;
		width: 16rem;
	}

	.mobile-sidebar-root {
		display: none;
	}

	.main-with-sidebar {
		margin-left: 16rem;
	}
}

/* K-3406ab78: the Messages page is exactly as tall as the window
   (views/messages.ejs). The list and the chat take all the height the heading
   leaves, in one row, and scroll inside themselves; the page never scrolls.
   On a phone the browser's own bars come and go, so the page is held to the
   window as it is now (100dvh), not to its tallest (100vh). */
body:has(.messages-chat-shell) {
	min-height: 100dvh;
}

.messages-chat-shell {
	flex: 1 1 0%;
	min-height: 0;
	grid-template-rows: minmax(0, 1fr);
}

/* While the test or staging notice sits in the bottom-right corner, the
   panels stop above it, so it never covers the message box and its Send
   button; once it is dismissed they reach the page's margin again. A notice
   placed at the top of a signed-in page (env-floating-banner--app) needs no
   room here. */
body:has(> .env-floating-banner:not(.env-floating-banner--app)) .messages-chat-shell {
	margin-bottom: 3.5rem;
}

@media (width < 64rem) {
	.messages-thread-pane--fullscreen {
		position: fixed;
		inset: 0;
		z-index: 160;
		margin: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		min-height: 100dvh;
		max-height: 100dvh;
		display: flex;
		flex-direction: column;
	}

	.messages-thread-pane--fullscreen .messages-thread {
		max-height: none;
	}

	.messages-thread-pane--fullscreen .messages-composer {
		padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
	}
}

/* K-425fccfb: the Tools panel (Insights / Templates) beside the chat. It is
   the chat's third column from 80rem; narrower, the chat's "Insights" button
   opens it over the page from the right, above the full-screen thread. */
.messages-tools-pane {
	display: flex;
}

/* The nickname beside a fan's name in the chat list gives way first: it is
   cut short before the fan's own name is. */
.messages-conversation-nickname {
	flex-shrink: 1000;
}

@media (width < 80rem) {
	.messages-tools-pane {
		display: none;
	}

	.messages-tools-pane.messages-tools-pane--open {
		display: flex;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 170;
		width: min(100%, 24rem);
		max-height: 100dvh;
		border-radius: 0;
	}

	.messages-tools-pane--open .messages-tools-panel {
		max-height: none;
	}
}

/* K-fcff0c6f: the chat header's "Tools" button. On a tablet it opens the Tools
   over the page (as before); on a computer it puts them away beside the chat and
   brings them back (K-869b64bb, Sam's design of 28 Oct 2026: always there, dark
   while they are open); on a phone the Tools are a tab of the chat instead, so
   it is not there. */
.messages-tools-open {
	display: inline-flex;
}

@media (width < 64rem) {
	.messages-tools-open {
		display: none;
	}
}

@media (width >= 80rem) {

	/* Put away: the chat takes the Tools' column. */
	.messages-chat-shell.messages-chat-shell--tools-collapsed {
		grid-template-columns: 300px minmax(0, 1fr);
	}

	.messages-chat-shell--tools-collapsed > .messages-tools-pane {
		display: none;
	}
}

@media (width >= 96rem) {
	.messages-chat-shell.messages-chat-shell--tools-collapsed {
		grid-template-columns: 320px minmax(0, 1fr);
	}
}

/* K-fcff0c6f: on a phone the Tools panel sits inside the full-screen chat
   (messages-tools.js moves it there) and shows when its tab is chosen, in place
   of the conversation; the tab says what it is, so its own heading goes. */
.messages-tools-pane.messages-tools-pane--in-thread {
	display: none;
}

.messages-tools-pane.messages-tools-pane--in-thread.messages-tools-pane--tab-open {
	display: flex;
	position: static;
	flex: 1 1 0%;
	min-height: 0;
	width: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.messages-tools-pane--in-thread .messages-tools-head {
	display: none;
}

.messages-tools-pane--in-thread .messages-tools-panel {
	max-height: none;
}

/* A favourite note's star is filled in. */
.messages-insights-note-favourite[aria-pressed="true"] .messages-insights-note-star path {
	fill: currentColor;
}

/* Creator sidebar "More" — floating dropdown above the trigger */
.creator-sidebar-more {
	position: relative;
}

.creator-sidebar-more-summary::-webkit-details-marker {
	display: none;
}

.creator-sidebar-more-menu {
	position: absolute;
	bottom: calc(100% + 0.375rem);
	left: 0;
	right: 0;
	z-index: 20;
	border: 1px solid var(--border-oklch);
	border-radius: var(--radius-lg);
	background-color: var(--surface-oklch);
	padding: 0.25rem;
	box-shadow: var(--elevation-md);
}

.creator-sidebar-more[open] .creator-sidebar-more-chevron {
	transform: rotate(180deg);
}

/* K-0c848b68: the one date picker (date-picker.css, from shared/date-picker/)
   in this dashboard's colours — Kulcho's own look and a brand's, light and dark. */
.kdp-window {
	--kdp-surface: var(--surface-oklch);
	--kdp-text: var(--text-oklch);
	--kdp-muted: var(--text-muted-oklch);
	--kdp-border: var(--border-oklch);
	--kdp-fill: var(--surface-2-oklch);
	--kdp-brand: var(--primary-oklch);
	--kdp-brand-fg: var(--primary-fg-oklch);
	--kdp-brand-tint: var(--primary-subtle-oklch);
	--kdp-danger: rgb(var(--danger) / 1);
}

/*
 * K-853a612f: the creator side menu in a brand's look (Heduno), as in Sam's
 * design of 5 Oct 2026 — measured off his pictures at 1:1. Only a creator who
 * wears a brand gets it (partials/sidebar.ejs adds .creator-brand-menu);
 * Kulcho's own look is untouched. The pink is the brand's own colour
 * (--primary-oklch, set by join-brand-look.ejs); the greys are the design's,
 * with the Heduno design system's dark values in the dark look.
 */
.creator-brand-menu {
	--menu-text: #474e57;
	--menu-row: #3a424c;
	--menu-icon: #7d858f;
	--menu-strong: #25272c;
	--menu-muted: #737c86;
	--menu-figure: #0e1116;
	--menu-line: #e8ebed;
	--menu-hover: #f7f8f9;
	--menu-danger: #c0392b;
	--menu-card: #ffffff;
	--menu-balance-fill: color-mix(in srgb, var(--primary-oklch) 9%, white);
	--menu-balance-icon: color-mix(in srgb, var(--primary-oklch) 18%, white);
}

[data-theme="dark"] .creator-brand-menu {
	--menu-text: #c4c4c2;
	--menu-row: #c4c4c2;
	--menu-icon: #9a9a98;
	--menu-strong: #f5f5f4;
	--menu-muted: #9a9a98;
	--menu-figure: #f5f5f4;
	--menu-line: #2a2a2a;
	--menu-hover: #222222;
	--menu-danger: #f97066;
	--menu-card: #161616;
	--menu-balance-fill: color-mix(in srgb, var(--primary-oklch) 14%, black);
	--menu-balance-icon: color-mix(in srgb, var(--primary-oklch) 28%, black);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) .creator-brand-menu {
		--menu-text: #c4c4c2;
		--menu-row: #c4c4c2;
		--menu-icon: #9a9a98;
		--menu-strong: #f5f5f4;
		--menu-muted: #9a9a98;
		--menu-figure: #f5f5f4;
		--menu-line: #2a2a2a;
		--menu-hover: #222222;
		--menu-danger: #f97066;
		--menu-card: #161616;
		--menu-balance-fill: color-mix(in srgb, var(--primary-oklch) 14%, black);
		--menu-balance-icon: color-mix(in srgb, var(--primary-oklch) 28%, black);
	}
}

/* The design's menu is 215px wide; the page beside it moves over to match. */
@media (width >= 64rem) {
	.desktop-sidebar.creator-brand-menu {
		width: 215px;
	}

	body:has(.desktop-sidebar.creator-brand-menu) .main-with-sidebar {
		margin-left: 215px;
	}
}

/* The logo: 40px high, 18px in from the edge, the first item 23px under it. */
.creator-brand-menu .creator-brand-menu-logo {
	display: flex;
	padding: 19px 18px 23px;
}

/* K-144d0c71 (Sam, 19 Oct 2026): on a brand app's own address the brand's logo
   is the size its fan app shows it at in its side menu (white-label
   _layout.scss, `.sidebar .logo`): 8.3125rem wide, as high as the logo makes
   it. Heduno's logo keeps its 40px height (no brand-app on its pages).
   K-d3e3ea52: never taller than 4.5rem (a square or round logo, such as Shore Thang's, was 133px high), the same
   limit as the fan app's; a wide logo (Xsweet's) is unchanged. It keeps to the left, as before. */
body.brand-app .creator-brand-menu .sidebar-brand-logo,
body.brand-app .creator-brand-menu .sidebar-brand-logo-dark {
	width: 8.3125rem;
	height: auto;
	max-height: 4.5rem;
	object-fit: contain;
	object-position: left center;
}

/* The items: icon 28px in, its words 12px after it, one every 41px. */
.creator-brand-menu .creator-brand-menu-nav {
	padding: 0 16px;
}

.creator-brand-menu .creator-brand-menu-nav > ul > li {
	margin: 0;
}

.creator-brand-menu .creator-brand-menu-nav > ul > li + li {
	margin-top: 5px;
}

.creator-brand-menu .creator-brand-menu-item {
	display: flex;
	align-items: center;
	gap: 12px;
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	color: var(--menu-text);
	transition:
		background-color 0.15s,
		color 0.15s;
}

.creator-brand-menu .creator-brand-menu-item .creator-brand-menu-icon {
	width: 20px;
	height: 20px;
	color: var(--menu-icon);
}

.creator-brand-menu .creator-brand-menu-item:hover {
	background-color: var(--menu-hover);
	color: var(--menu-strong);
}

/* The page that is open: in the brand's colour. */
.creator-brand-menu .creator-brand-menu-item[aria-current="page"],
.creator-brand-menu .creator-brand-menu-item[aria-current="page"] .creator-brand-menu-icon {
	color: var(--primary-oklch);
}

.creator-brand-menu .creator-brand-menu-item[aria-current="page"] {
	background-color: var(--primary-subtle-oklch);
	font-weight: 600;
}

/* The bottom: a line inset like the Balance box, 14px in from each side. */
.creator-brand-menu .creator-brand-menu-foot {
	padding: 0 14px 20px;
}

.creator-brand-menu .creator-brand-menu-foot-inner {
	border-top: 1px solid var(--menu-line);
	padding-top: 13px;
}

/* The Balance box: the brand's pink outline and fill, the arrow at the top right. */
.creator-brand-menu .creator-brand-menu-balance {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
	border: 1px solid var(--primary-oklch);
	border-radius: 14px;
	background-color: var(--menu-balance-fill);
	padding: 13px 28px 13px 13px;
	color: var(--menu-figure);
	transition: box-shadow 0.15s;
}

.creator-brand-menu .creator-brand-menu-balance:hover,
.creator-brand-menu .creator-brand-menu-balance[aria-current="page"] {
	box-shadow: 0 0 0 1px var(--primary-oklch);
}

.creator-brand-menu .creator-brand-menu-balance-icon {
	display: flex;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background-color: var(--menu-balance-icon);
	color: var(--primary-oklch);
}

.creator-brand-menu .creator-brand-menu-balance-icon .creator-brand-menu-icon {
	width: 22px;
	height: 22px;
}

.creator-brand-menu .creator-sidebar-balance-label {
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
	color: var(--menu-muted);
}

.creator-brand-menu .creator-sidebar-balance-amount {
	font-size: 1rem;
	line-height: 1.375rem;
	font-weight: 700;
	color: var(--menu-figure);
}

.creator-brand-menu .creator-sidebar-balance-arrow {
	position: absolute;
	top: 7px;
	right: 8px;
	width: 16px;
	height: 16px;
	color: var(--menu-muted);
}

/* More: its word and a small chevron, no icon. */
.creator-brand-menu .creator-sidebar-more-summary {
	display: flex;
	cursor: pointer;
	list-style: none;
	align-items: center;
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 0.8125rem;
	line-height: 1.25rem;
	font-weight: 500;
	color: var(--menu-text);
}

.creator-brand-menu .creator-sidebar-more-summary:hover {
	color: var(--menu-strong);
}

.creator-brand-menu .creator-sidebar-more-chevron {
	width: 14px;
	height: 14px;
	margin-left: 3px;
	color: var(--menu-text);
	transition: transform 0.15s;
}

/* The menu More opens: a white card floating 10px above it. */
.creator-brand-menu .creator-sidebar-more-menu {
	bottom: calc(100% + 10px);
	border: 1px solid var(--menu-line);
	border-radius: 14px;
	background-color: var(--menu-card);
	padding: 9px;
	box-shadow:
		0 12px 32px rgb(15 15 15 / 0.12),
		0 2px 6px rgb(15 15 15 / 0.06);
}

.creator-brand-menu .creator-sidebar-more-menu > ul > li + li {
	margin-top: 2px;
}

.creator-brand-menu .creator-brand-menu-row {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 10px;
	border-radius: 10px;
	padding: 9px 12px;
	text-align: left;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	color: var(--menu-row);
}

.creator-brand-menu .creator-brand-menu-row .creator-brand-menu-icon {
	width: 18px;
	height: 18px;
	color: var(--menu-strong);
}

.creator-brand-menu .creator-brand-menu-row .creator-brand-menu-icon.hidden {
	display: none;
}

.creator-brand-menu .creator-brand-menu-row:hover,
.creator-brand-menu .creator-brand-menu-row:focus-visible {
	background-color: var(--menu-hover);
	color: var(--menu-strong);
}

/* The keyboard's place in the menu: a ring in the brand's pink, in both looks. */
.creator-brand-menu .creator-brand-menu-row:focus-visible {
	outline: 2px solid var(--primary-oklch);
	outline-offset: -2px;
}

.creator-brand-menu .creator-sidebar-more-divider {
	margin: 5px 3px 7px;
	height: 1px;
	background-color: var(--menu-line);
}

/* K-70c2d6c9: Switch to fan (K-d3e3ea52; was "Switch to fan mode"), a row of its own between the Balance box and More (a brand app's creators only). */
.creator-brand-menu .creator-brand-menu-switch {
	margin: 6px 0 2px;
}

.creator-brand-menu .creator-brand-menu-logout,
.creator-brand-menu .creator-brand-menu-logout .creator-brand-menu-icon,
.creator-brand-menu .creator-brand-menu-logout:hover {
	color: var(--menu-danger);
}

/*
 * K-d3e3ea52 (Graham, 4 Nov 2026, on Xsweet: "resize so that the menu doesn't need a slider"): on a brand app's
 * creator dashboard only (body.brand-app; Heduno's menu keeps Sam's 5 Oct spacing and its scroll bar), the side
 * menu beside the page fits a laptop's screen without scrolling: 14px around the logo (was 19px/23px), items 34px
 * high and 2px apart (36px, 5px; as Sam's phone menu's), a 54px Balance box (66px), Switch to fan and More
 * closer, less room under More. On a very short screen the items scroll with no scroll bar drawn. The phone's
 * menu is unchanged.
 */
body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-logo {
	padding: 14px 18px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav {
	scrollbar-width: none;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav::-webkit-scrollbar {
	display: none;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav > ul > li + li {
	margin-top: 2px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-item {
	padding: 7px 12px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-foot {
	padding: 0 14px 12px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-foot-inner {
	padding-top: 8px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-balance {
	margin-bottom: 6px;
	padding: 9px 28px 9px 11px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-balance-icon {
	width: 34px;
	height: 34px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-sidebar-more-summary {
	padding: 4px 10px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-switch {
	margin: 0;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-switch .creator-brand-menu-row {
	padding-top: 7px;
	padding-bottom: 7px;
}

/* K-8d65a382: one of Kulcho's super admins in a partner's pages of today's dashboard: which partner they are in,
   a dark tab at the bottom of the screen, clear of AIDE's feedback button at the bottom right. */
.kulcho-viewing-bar {
	position: fixed;
	bottom: 12px;
	left: 50%;
	z-index: 120;
	max-width: calc(100vw - 32px);
	transform: translateX(-50%);
	border-radius: 999px;
	background-color: #0e1116;
	padding: 8px 16px;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: #ffffff;
	box-shadow: 0 8px 24px rgb(15 15 15 / 0.25);
	overflow-wrap: anywhere;
}

/* K-38b64d3b: Settings → Cookies (partials/cookie-choice.ejs), on the creator and partner dashboards. */
.cookie-choice {
	margin-top: 1.5rem;
	max-width: 42rem;
	border: 1px solid var(--border-oklch);
	border-radius: 0.75rem;
	background: var(--surface-oklch);
	padding: 1.25rem 1.5rem;
}
.cookie-choice[hidden] {
	display: none;
}
.cookie-choice-heading {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-oklch);
}
.cookie-choice-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}
.cookie-choice-button {
	flex: 1 1 8rem;
	min-height: 44px;
	border: 1px solid var(--border-strong-oklch, var(--border-oklch));
	border-radius: 999px;
	background: var(--surface-oklch);
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-oklch);
	cursor: pointer;
}
.cookie-choice-button[aria-pressed="true"] {
	border-color: var(--primary-oklch);
	background: var(--primary-oklch);
	color: var(--primary-fg-oklch);
}
.cookie-choice-button:focus-visible {
	outline: 2px solid var(--ring-oklch, var(--primary-oklch));
	outline-offset: 2px;
}

/* K-47232ecd (Graham, 27 Oct 2026): the count on Settings in the creator's side menu and on Settings → Management while
   a partner's request waits for the creator's answer, like a chat's unread count. The brand's colour, its own text. */
.creator-nav-badge {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	margin-left: auto;
	padding: 0 0.375rem;
	border-radius: 999px;
	background: var(--color-primary);
	color: var(--color-primary-foreground);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}
.settings-row-badge {
	margin-left: 0;
}

/* K-47232ecd: the tip a ping was about, in its chat: ringed in the brand's colour. */
.messages-tip-highlight {
	outline: 2px solid var(--color-primary, #e0205f);
	outline-offset: 2px;
}

/* K-47232ecd: the row a ping was about (Payouts, that payout; Partner, Creators, that creator). */
.ping-highlight {
	background-color: color-mix(in srgb, var(--color-primary, #e0205f) 10%, transparent);
}

/*
 * K-e3499582 (Sam's dashboards feedback of 3 Nov 2026, item 5): the phone's menu bar at the bottom of the screen
 * (partials/phone-menu-bar.ejs), the brand apps' bar exactly (white-label Navbar.tsx, .footer.fanFooter): 3.75rem
 * high, one row of icons 1.6rem across, each a fifth of the width, at 75% until it is the open page's, which is in
 * the brand's own colour with a 0.3rem dot under it; the menu's own ground with a line on top. Phones only (under
 * 40rem): tablets and computers keep their menus. Every page keeps the bar's height free at its bottom, so the bar
 * covers nothing (the Messages page, the window's height, ends above it). Under the phone's menu and its shade
 * (z-index 140/150) and the bell's panel; over the page.
 */
.pmb {
	display: none;
}

@media (width < 40rem) {
	:root {
		--pmb-height: calc(3.75rem + env(safe-area-inset-bottom, 0px));
	}

	.pmb {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 120;
		display: flex;
		align-items: stretch;
		height: var(--pmb-height);
		padding-bottom: env(safe-area-inset-bottom, 0px);
		background: var(--surface-elevated-oklch);
		border-top: 1px solid var(--border-oklch);
	}

	.pmb-item {
		position: relative;
		display: flex;
		flex: 1 1 0;
		align-items: center;
		justify-content: center;
		height: 3.75rem;
		padding: 0;
		border: 0;
		background: none;
		color: var(--text-oklch);
		opacity: 0.75;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.pmb-item .pmb-icon {
		width: 1.6rem;
		height: 1.6rem;
	}

	/* The brand's colour, as it reads on this ground (the Heduno look's ink: Heduno's pink, or a brand app's colour
	   darkened or lightened just enough, K-144d0c71), as the apps' bar keeps a pale brand colour readable. */
	.pmb-item.is-active,
	.pmb-more[aria-expanded="true"] {
		color: var(--hd-brand-ink, var(--primary-oklch));
		opacity: 1;
	}

	/* K-607f747d: an item carrying the new unread Messages number keeps its icon at 75% and the number at full
	   strength; every other item and badge (the bell's included) is exactly as before. */
	.pmb-item:not(.is-active):has(> .pmb-badge-unread) {
		opacity: 1;
	}

	.pmb-item:not(.is-active):has(> .pmb-badge-unread) .pmb-icon {
		opacity: 0.75;
	}

	.pmb-item.is-active::after {
		content: "";
		position: absolute;
		bottom: 0.4rem;
		left: 50%;
		width: 0.3rem;
		height: 0.3rem;
		margin-left: -0.15rem;
		border-radius: 50%;
		background: currentColor;
	}

	.pmb-item:focus-visible {
		outline: 2px solid var(--primary-oklch);
		outline-offset: -4px;
		border-radius: 0.75rem;
	}

	/* Staging only: AIDE's round feedback button sits 16px in from the bottom-right corner; More stays clear of it. */
	body.has-feedback-button .pmb {
		padding-right: 3.5rem;
	}

	/* K-9ee72985: the bell's unread count on Notifications (the Partner dashboard's bar), as on its menu item. */
	.pmb-badge {
		position: absolute;
		top: 0.55rem;
		left: calc(50% + 0.35rem);
		min-width: 1.15rem;
		height: 1.15rem;
		padding: 0 0.3rem;
		border-radius: 999px;
		background: var(--hd-brand-ink, var(--primary-oklch));
		color: #ffffff;
		font-size: 0.6875rem;
		font-weight: 700;
		line-height: 1.15rem;
		text-align: center;
	}

	/* K-607f747d: the unread mark on Messages, the brand apps' own (white-label Navbar.tsx .unreadNumber): white on
	   the red of their chat list's unread dots (4.7:1), whatever the brand's colour. */
	.pmb-badge-unread {
		background: #e11d48;
	}

	/* The page keeps the bar's height free at its bottom (on top of its own margin there). K-9ee72985: the Partner
	   dashboard's page too (.pf-main, its own 48px at the bottom). */
	html body:has(.pmb) .pf-main {
		padding-bottom: calc(var(--pmb-height) + 3rem);
	}

	html body:has(.pmb) .main-with-sidebar {
		padding-bottom: calc(var(--pmb-height) + 2.5rem);
	}

	html body:has(.pmb) .main-with-sidebar.h-dvh {
		padding-bottom: calc(var(--pmb-height) + 1rem);
	}

	/* A bar that sticks to the bottom of the screen as the page scrolls sticks above it, at its own gap from it:
	   Discoverability's Save, and New broadcast's Save draft and Send (broadcasts.css, 12px up). */
	html body:has(.pmb) [data-profile-tags-bar] {
		bottom: var(--pmb-height);
	}

	html body:has(.pmb) .bcx-footer {
		bottom: calc(var(--pmb-height) + 12px);
	}
}
