@font-face { font-family: "Kadrora Sans"; src: url("../fonts/nunito-sans-regular.ttf") format("truetype"); font-style: normal; font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Kadrora Sans"; src: url("../fonts/nunito-sans-bold.ttf") format("truetype"); font-style: normal; font-weight: 600 900; font-display: swap; }
/* Shared interaction foundations */
html { background: var(--cf-bg); }
body,
body.app-shell,
body.public-shell {
  min-height: 100vh;
  background: var(--cf-bg) !important;
  color: var(--cf-text) !important;
  font-family: "Kadrora Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  transition: background-color .2s ease, color .2s ease;
}
::selection { color: #fff; background: #3158ed; }
* { scrollbar-color: color-mix(in srgb, var(--cf-muted) 38%, transparent) transparent; }

.theme-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cf-line);
  border-radius: 7px;
  background: transparent;
  color: var(--cf-muted);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.theme-toggle:hover { color: var(--cf-text); background: var(--cf-panel-2); border-color: var(--cf-line-strong); }
.theme-toggle svg { position: absolute; transition: opacity .18s ease, transform .18s ease; }
:root[data-theme="dark"] .theme-sun { opacity: 1; transform: scale(1) rotate(0); }
:root[data-theme="dark"] .theme-moon { opacity: 0; transform: scale(.7) rotate(-16deg); }
:root[data-theme="light"] .theme-sun { opacity: 0; transform: scale(.7) rotate(16deg); }
:root[data-theme="light"] .theme-moon { opacity: 1; transform: scale(1) rotate(0); }
.creator-secondary .theme-toggle,
.public-nav .theme-toggle { display: grid; }

.button,
.flow-actions a,
.landing-actions a,
.profile-actions :is(button, a),
.profile-upgrade {
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cf-accent) !important;
  outline-offset: 2px;
}

/* Kadrora product system — one theme layer, no legacy cascade. */
:root,
:root body,
:root body.app-shell,
:root body.public-shell,
:root[data-theme="dark"],
:root[data-theme="dark"] body,
:root[data-theme="dark"] body.app-shell,
:root[data-theme="dark"] body.public-shell {
  --cf-bg: #20232b;
  --cf-panel: #292d37;
  --cf-panel-2: #323744;
  --cf-text: #f3f1eb;
  --cf-muted: #b1b7c5;
  --cf-soft: #c8c7c3;
  --cf-line: rgba(243, 241, 235, .09);
  --cf-line-strong: rgba(243, 241, 235, .17);
  --cf-accent: #9aafff;
  --cf-accent-2: #9aafff;
  --cf-coral: #ff6745;
  --cf-sun: #ff6745;
  --cf-glass: rgba(16, 17, 20, .90);
  --cf-input: #222630;
  --cf-hover: rgba(82, 118, 255, .10);
  --cf-shadow: 0 24px 64px rgba(0, 0, 0, .32);
  --cf-clay-surface: #2c303b;
  --cf-clay-highlight: rgba(255,255,255,.13);
  --cf-clay-shadow: 12px 16px 28px rgba(8,11,18,.38), -6px -6px 18px rgba(255,255,255,.035), inset 2px 2px 3px rgba(255,255,255,.09), inset -3px -4px 7px rgba(7,10,17,.3);
  --cf-clay-shadow-sm: 4px 6px 11px rgba(8,11,18,.32), -3px -3px 8px rgba(255,255,255,.035), inset 2px 2px 2px rgba(255,255,255,.1), inset -2px -3px 5px rgba(7,10,17,.25);
  --cf-clay-pressed: inset 3px 3px 8px rgba(0, 0, 0, .26), inset -2px -2px 6px rgba(255, 255, 255, .025);
  --cf-spectrum: #5276ff;
  --flow-bg: var(--cf-bg);
  --flow-ink: var(--cf-text);
  --flow-muted: var(--cf-muted);
  --flow-faint: #70737c;
  --flow-surface: var(--cf-panel);
  --flow-surface-2: var(--cf-panel-2);
  --flow-line: var(--cf-line);
  --flow-line-strong: var(--cf-line-strong);
  --flow-mint: var(--cf-accent);
  --flow-amber: var(--cf-coral);
  --apple-bg: var(--cf-bg);
  --apple-panel: var(--cf-glass);
  --apple-panel-solid: var(--cf-panel);
  --apple-text: var(--cf-text);
  --apple-muted: var(--cf-muted);
  --apple-faint: #70737c;
  --apple-line: var(--cf-line);
  --apple-line-strong: var(--cf-line-strong);
  --apple-blue: var(--cf-accent);
  --apple-dark: var(--cf-text);
  --apple-green: var(--cf-accent);
}

:root[data-theme="light"],
:root[data-theme="light"] body,
:root[data-theme="light"] body.app-shell,
:root[data-theme="light"] body.public-shell {
  --cf-bg: #e9edf5;
  --cf-panel: #f5f7fc;
  --cf-panel-2: #dfe5f0;
  --cf-text: #191a1e;
  --cf-muted: #596479;
  --cf-soft: #42444b;
  --cf-line: rgba(25, 26, 30, .10);
  --cf-line-strong: rgba(25, 26, 30, .18);
  --cf-accent: #3158ed;
  --cf-accent-2: #3158ed;
  --cf-coral: #dc4d2c;
  --cf-sun: #dc4d2c;
  --cf-glass: rgba(242, 240, 234, .91);
  --cf-input: #e8edf6;
  --cf-hover: rgba(49, 88, 237, .07);
  --cf-shadow: 0 22px 54px rgba(32, 35, 46, .10);
  --cf-clay-surface: #edf1f9;
  --cf-clay-highlight: rgba(255, 255, 255, .82);
  --cf-clay-shadow: 12px 16px 28px rgba(67,84,119,.16), -7px -7px 20px rgba(255,255,255,.8), inset 2px 2px 3px #fff, inset -3px -4px 7px rgba(101,119,152,.13);
  --cf-clay-shadow-sm: 4px 6px 11px rgba(67,84,119,.16), -3px -3px 8px rgba(255,255,255,.8), inset 2px 2px 2px #fff, inset -2px -3px 5px rgba(101,119,152,.14);
  --cf-clay-pressed: inset 3px 3px 8px rgba(72, 68, 58, .11), inset -3px -3px 8px rgba(255, 255, 255, .78);
  --cf-spectrum: #3158ed;
  --flow-bg: var(--cf-bg);
  --flow-ink: var(--cf-text);
  --flow-muted: var(--cf-muted);
  --flow-faint: #8b8d93;
  --flow-surface: var(--cf-panel);
  --flow-surface-2: var(--cf-panel-2);
  --flow-line: var(--cf-line);
  --flow-line-strong: var(--cf-line-strong);
  --flow-mint: var(--cf-accent);
  --flow-amber: var(--cf-coral);
  --apple-bg: var(--cf-bg);
  --apple-panel: var(--cf-glass);
  --apple-panel-solid: var(--cf-panel);
  --apple-text: var(--cf-text);
  --apple-muted: var(--cf-muted);
  --apple-faint: #8b8d93;
  --apple-line: var(--cf-line);
  --apple-line-strong: var(--cf-line-strong);
  --apple-blue: var(--cf-accent);
  --apple-dark: var(--cf-text);
  --apple-green: var(--cf-accent);
}

html,
body,
body.app-shell,
body.public-shell { background: var(--cf-bg) !important; color: var(--cf-text) !important; }
body.public-shell main,
body.app-shell .app-content { background: var(--cf-bg) !important; }
body { overflow-x: clip; }
body.app-shell { padding-left: 0 !important; }
body.app-shell .app-content { width: 100%; min-width: 0; }
body:before,
body:after { display: none !important; }

.ui-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.creator-primary a { display: inline-flex !important; align-items: center; gap: 7px; }
.creator-primary .ui-icon { width: 14px; height: 14px; flex-basis: 14px; opacity: .72; }
.creator-primary a.active .ui-icon,
.creator-primary a:hover .ui-icon { opacity: 1; }
.account-chevron { width: 13px; height: 13px; transition: transform .18s ease; }
.account-menu[open] .account-chevron { transform: rotate(180deg); }
.chip-chevron { width: 13px; height: 13px; margin-left: 2px; }
.panel-head button .ui-icon,
.preset-browser-head button .ui-icon { width: 15px; height: 15px; }
.panel-search>.ui-icon { color: var(--cf-muted); }
.prompt-tools button { display: inline-flex !important; align-items: center; gap: 5px; }
.prompt-tools button .ui-icon { width: 14px; height: 14px; }

.brand { gap: 10px !important; font-size: 15px !important; font-weight: 700 !important; letter-spacing: -.025em !important; }
.cf-app-header .creator-brand,
.public-nav .brand,
.auth-card .brand { color: var(--cf-text) !important; }
.brand-symbol { width: 31px; height: 31px; border-radius: 10px; box-shadow: var(--cf-clay-shadow-sm); }
.section-kicker {
  color: var(--cf-accent) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
}
.section-kicker:before { content: ""; display: inline-block; width: 18px; height: 1px; margin: 0 9px 3px 0; background: currentColor; }

.theme-toggle {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 7px;
  background: transparent;
}
.theme-toggle:hover { background: var(--cf-panel-2); }

.public-nav,
.cf-app-header {
  border-color: var(--cf-line) !important;
  background: var(--cf-glass) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .12), inset 0 1px 0 var(--cf-clay-highlight) !important;
  backdrop-filter: blur(18px) !important;
}
.public-nav { top: 10px !important; height: 56px !important; border-radius: 10px !important; }
.cf-app-header { height: 60px !important; grid-template-columns: 230px 1fr auto !important; }
.public-nav>nav>a,
.creator-primary a,
.pricing-nav-link { color: var(--cf-muted) !important; font-size: 12px !important; }
.public-nav>nav>a:hover,
.creator-primary a:hover,
.creator-primary a.active,
.pricing-nav-link:hover { color: var(--cf-text) !important; background: var(--cf-panel-2) !important; }
.creator-primary a.active:after { background: var(--cf-accent) !important; }
.public-nav .button-dark { border-radius: 7px !important; background: var(--cf-text) !important; color: var(--cf-bg) !important; }
.language-switcher { border-radius: 7px !important; background: transparent !important; }
.language-switcher a.active { background: var(--cf-panel-2) !important; }
.credit-pill { height: 36px !important; border-radius: 11px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); }
.credit-orb { background: var(--cf-coral) !important; box-shadow: none; }
.avatar,
.account-menu .avatar { border-radius: 7px !important; background: var(--cf-accent) !important; background-image: none !important; color: white !important; }
.account-popover { border-radius: 16px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight) !important; }

/* Public landing */
.landing-flow {
  min-height: calc(100vh - 78px) !important;
  grid-template-columns: minmax(360px, .82fr) minmax(500px, 1.18fr) !important;
  gap: clamp(48px, 7vw, 112px) !important;
  padding-block: 68px 74px !important;
}
.landing-copy h1 { max-width: 720px; font-size: clamp(52px, 4.6vw, 68px) !important; line-height: .93 !important; letter-spacing: -.066em !important; }
.landing-copy h1 em { color: var(--cf-accent) !important; background: none; -webkit-text-fill-color: currentColor; }
.landing-copy>p { max-width: 530px; color: var(--cf-muted) !important; font-size: 15px !important; line-height: 1.65 !important; }
.landing-actions a { border-radius: 7px !important; }
.landing-actions a:first-child { background: var(--cf-accent) !important; color: white !important; box-shadow: none; }
.landing-actions a:first-child:hover { background: color-mix(in srgb, var(--cf-accent) 88%, white) !important; }
.flow-demo { border-color: var(--cf-line) !important; }
.flow-demo:before { display: none !important; }
.flow-demo-stage {
  min-height: 390px !important;
  border-radius: 12px 12px 4px 4px;
  background-color: var(--cf-panel) !important;
  background-image: linear-gradient(var(--cf-line) 1px, transparent 1px), linear-gradient(90deg, var(--cf-line) 1px, transparent 1px) !important;
  background-size: 48px 48px !important;
  box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight);
}
.flow-demo-stage:after {
  inset: 13% 12% 22% 12%;
  border: 1px solid var(--cf-line-strong);
  background: linear-gradient(135deg, transparent 0 48%, var(--cf-accent) 48% 48.5%, transparent 48.5% 100%);
  opacity: 1;
  mask-image: none;
}
.flow-clay-object {
  position: absolute;
  z-index: 2;
  width: min(58%, 290px);
  right: 5%;
  top: 7%;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .28));
  pointer-events: none;
  height: auto !important;
  aspect-ratio: 1;
}
.flow-demo-stage>strong { font-size: 36px !important; letter-spacing: -.045em; }
.flow-signal { display: none !important; }
.flow-demo-input { border-color: var(--cf-line) !important; background: var(--cf-panel) !important; }
.flow-demo-input button,
.flow-demo-input span { border-radius: 6px !important; background: var(--cf-panel-2) !important; }
.flow-demo-input b { border-radius: 6px !important; background: var(--cf-accent) !important; }
.landing-model-lines a:hover { padding-inline: 8px; background: var(--cf-hover) !important; }
.landing-model-lines b,
.model-lines b { color: var(--cf-accent) !important; }
.flow-statement>span { color: var(--cf-coral) !important; }
.flow-cta>a { border-radius: 7px !important; background: var(--cf-accent) !important; box-shadow: none; }

/* Signed-in product index */
.flow-explore { padding: 62px 0 88px !important; }
.flow-hero {
  max-width: none;
  min-height: 315px;
  margin-bottom: 42px !important;
  padding: 38px 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--cf-line);
  border-radius: 24px;
  background: var(--cf-clay-surface);
  box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight);
}
.flow-hero-copy { max-width: 720px; position: relative; z-index: 2; }
.flow-hero-mark {
  width: 270px;
  justify-self: end;
  filter: drop-shadow(0 25px 30px rgba(0, 0, 0, .26));
  transform: rotate(5deg);
  pointer-events: none;
  height: auto !important;
  aspect-ratio: 1;
}
.flow-hero:before { display: none; }
.flow-hero h1 { margin-top: 18px !important; font-size: clamp(52px, 6vw, 76px) !important; line-height: .95 !important; letter-spacing: -.065em !important; }
.flow-hero p { max-width: 570px; font-size: 15px !important; line-height: 1.6; }
.flow-actions { margin-top: 24px; }
.flow-actions a { padding: 10px 14px !important; border: 1px solid var(--cf-line) !important; border-radius: 12px; color: var(--cf-muted) !important; background: var(--cf-clay-surface); box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); font-size: 13px; }
.flow-actions a:first-child { color: white !important; border-color: color-mix(in srgb, var(--cf-accent) 70%, transparent) !important; background: var(--cf-accent); }
.model-index { gap: 46px !important; }
.model-index-title span { color: var(--cf-coral) !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px !important; }
.model-index-title h2 { font-size: 19px !important; }
.model-lines a { min-height: 68px !important; padding-inline: 14px; border: 0 !important; border-radius: 14px; background: var(--cf-clay-surface); box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); }
.model-lines { display: grid; gap: 12px; border: 0 !important; }
.model-lines img,
.landing-model-lines img { border-radius: 8px !important; box-shadow: none; }
.model-lines a:hover { padding-inline: 14px; background: color-mix(in srgb, var(--cf-accent) 7%, var(--cf-clay-surface)) !important; transform: translateY(-2px); }
.model-lines strong { font-size: 14px; }
.model-lines small,
.model-lines em { color: var(--cf-muted) !important; font-size: 12px; }

/* Studio */
.cf-status-banner { background: color-mix(in srgb, var(--cf-coral) 5%, var(--cf-bg)) !important; border-color: color-mix(in srgb, var(--cf-coral) 18%, transparent) !important; }
.cf-status-banner>span { background: var(--cf-coral) !important; }
.cf-workspace { height: calc(100vh - 61px) !important; grid-template-columns: 350px minmax(0, 1fr) !important; background: var(--cf-bg) !important; }
.cf-status-banner+.cf-workspace { height: calc(100vh - 97px) !important; }
.cf-composer,
.composer-controls { background: var(--cf-panel) !important; border-color: var(--cf-line) !important; }
.composer-head { border-color: var(--cf-line) !important; }
.workspace-modes { border-radius: 7px !important; background: var(--cf-input) !important; }
.workspace-modes button { border-radius: 5px !important; }
.workspace-modes button.active { background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-pressed) !important; }
.reference-add,
.control-chip { border-radius: 11px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); }
.control-chip,
.quick-settings .control-chip,
.image-composer-label,
.model-option,
.setting-row select,
.setting-row input,
.setting-stack textarea { color: var(--cf-text) !important; }
.control-chip b,
.control-chip small,
.model-option small { color: var(--cf-muted) !important; }
.control-chip:active,
.reference-add:active { box-shadow: var(--cf-clay-pressed) !important; transform: translateY(1px); }
.prompt-card textarea { font-size: 13px !important; }
.prompt-tools button { color: var(--cf-accent) !important; }
.generate-button { border-radius: 12px !important; background: var(--cf-accent) !important; box-shadow: 0 10px 24px color-mix(in srgb, var(--cf-accent) 32%, transparent), inset 0 1px 0 rgba(255, 255, 255, .22); color: white !important; }
.generate-button:active { box-shadow: inset 3px 3px 9px rgba(0, 0, 0, .23), inset -2px -2px 7px rgba(255, 255, 255, .12) !important; transform: translateY(1px); }
.generate-button:hover { background: color-mix(in srgb, var(--cf-accent) 88%, white) !important; }
.floating-panel,
.preset-browser>section { border-radius: 20px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight) !important; }
.model-option.active { border-left: 2px solid var(--cf-accent) !important; }
.toggle-row input:checked+i { background: var(--cf-accent) !important; }
.cf-result-workspace { background: var(--cf-bg) !important; }
.generation-stage { background-color: var(--cf-bg) !important; background-image: radial-gradient(var(--cf-line) 1px, transparent 1px) !important; background-size: 22px 22px !important; }
.empty-glyph { border-radius: 10px !important; background: var(--cf-panel) !important; box-shadow: none; transform: rotate(-4deg); }
.empty-glyph:before { display: none; }
.empty-glyph i:first-child { border-color: var(--cf-accent) !important; }
.empty-glyph i:last-child { background: var(--cf-coral) !important; box-shadow: none !important; }
.kind-image .cf-composer { border-radius: 20px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight) !important; }
.result-actions { border-radius: 8px !important; background: var(--cf-glass) !important; }
.progress-line i { background: var(--cf-accent) !important; }
.preset-grid button { border: 0 !important; border-radius: 16px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); }
.preset-grid button:hover { border-color: var(--cf-accent) !important; }

/* Auth, library, account and pricing */
.public-shell .auth-shell { background: var(--cf-bg) !important; }
.public-shell .auth-card { border-radius: 24px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight) !important; backdrop-filter: none; }
.flow-orbit { border-color: var(--cf-line-strong) !important; }
.flow-orbit:before { border-color: var(--cf-accent) !important; }
.flow-orbit i { background: var(--cf-coral) !important; box-shadow: none; }
.public-shell .auth-form input { border-radius: 7px !important; }
.public-shell .auth-form .button { border-radius: 7px !important; background: var(--cf-accent) !important; }
.public-shell .auth-card a { color: var(--cf-accent) !important; }
.page-header h1,
.pricing-intro h1,
.profile-intro h1 { letter-spacing: -.055em !important; }
.filter-bar .active { color: var(--cf-accent) !important; border-color: var(--cf-accent) !important; }
.library-card,
.empty-library,
.price-card,
.usage-table-wrap,
.job-info { border: 1px solid var(--cf-line) !important; border-radius: 20px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight) !important; }
.library-card:hover { border-color: var(--cf-line-strong) !important; box-shadow: 18px 20px 40px rgba(0, 0, 0, .25), inset 0 1px 0 var(--cf-clay-highlight) !important; transform: translateY(-3px); }
.library-preview { background: var(--cf-panel-2) !important; }
.library-preview.image { background: color-mix(in srgb, var(--cf-accent) 10%, var(--cf-panel-2)) !important; }
.empty-library>span { color: var(--cf-coral) !important; }
.profile-page.page-shell { width: min(1280px, calc(100% - 48px)); padding-top: 54px !important; }
.profile-intro {
  min-height: 250px;
  margin-bottom: 28px;
  padding: 34px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--cf-line);
  border-radius: 24px;
  background: var(--cf-clay-surface);
  box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight);
}
.profile-intro-copy { position: relative; z-index: 2; }
.profile-intro h1 { margin: 12px 0 8px; }
.profile-clay-mark { width: 220px; height: auto !important; aspect-ratio: 1; justify-self: end; filter: drop-shadow(0 23px 28px rgba(0, 0, 0, .25)); transform: rotate(-6deg); pointer-events: none; }
.profile-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px !important; border: 0 !important; }
.profile-ledger>section {
  min-width: 0;
  padding: 26px 28px 28px !important;
  border: 1px solid var(--cf-line);
  border-radius: 20px;
  background: var(--cf-clay-surface);
  box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight);
}
.profile-section-head { color: var(--cf-text) !important; font-size: 14px; }
.profile-section-head small { font-size: 11px; }
.profile-rows dt { color: var(--cf-muted) !important; font-size: 13px; }
.profile-rows dd { color: var(--cf-text) !important; font-size: 14px; overflow-wrap: anywhere; }
.profile-rows>div:last-child { border-bottom: 0; }
.profile-section-head small { color: var(--cf-accent) !important; }
.profile-actions :is(button, a),
.profile-upgrade { border-radius: 12px !important; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); }
.price-card.featured { border-color: color-mix(in srgb, var(--cf-accent) 52%, transparent) !important; box-shadow: var(--cf-clay-shadow), 0 0 0 1px color-mix(in srgb, var(--cf-accent) 12%, transparent) !important; }
.price-card h2,
.price-card .price,
.usage-table td { color: var(--cf-text) !important; }
.price-card>p,
.price-card li,
.credit-total,
.margin-note,
.usage-table th { color: var(--cf-muted) !important; }
.popular-badge { border-radius: 5px !important; background: var(--cf-accent) !important; color: white !important; }
.price-card .button-dark { border-radius: 7px !important; background: var(--cf-accent) !important; }

@media (max-width: 900px) {
  .landing-flow { grid-template-columns: 1fr !important; max-width: 820px; }
  .cf-app-header { grid-template-columns: 180px 1fr auto !important; }
  .flow-hero { grid-template-columns: minmax(0, 1fr) 210px; }
  .flow-hero-mark { width: 205px; }
  .profile-intro { grid-template-columns: minmax(0, 1fr) 180px; }
  .profile-clay-mark { width: 175px; }
}

@media (max-width: 680px) {
  .public-nav { border-radius: 9px !important; }
  .brand-symbol { width: 28px; height: 28px; }
  .landing-flow { padding-block: 72px 54px !important; }
  .landing-copy h1 { font-size: 49px !important; }
  .flow-demo-stage { min-height: 300px !important; }
  .flow-explore { padding: 44px 0 68px !important; }
  .flow-hero { position: relative; min-height: 310px; padding: 30px 22px; grid-template-columns: 1fr; border-radius: 20px; }
  .flow-hero-copy { max-width: 100%; }
  .flow-hero h1 { max-width: 82%; font-size: 45px !important; }
  .flow-hero-mark { position: absolute; top: -20px; right: -28px; width: 132px; opacity: .58; }
  .flow-actions { align-items: stretch; flex-direction: column; }
  .flow-actions a { justify-content: space-between; }
  .cf-app-header {
    height: 56px !important;
    display: flex !important;
    align-items: center;
    gap: 7px;
    padding-inline: 10px !important;
  }
  .cf-app-header .creator-brand { flex: 0 0 auto; margin-right: auto; }
  .cf-app-header .mobile-menu { position: static !important; order: 2; width: 32px; height: 32px; }
  .cf-app-header .creator-primary { position: absolute !important; left: 8px !important; right: 8px !important; top: 61px !important; }
  .cf-app-header .creator-secondary { order: 3; flex: 0 0 auto; gap: 5px !important; }
  .cf-app-header .account-menu summary { width: 34px; min-width: 34px; padding: 2px !important; }
  .cf-app-header .account-menu summary>i { display: none; }
  .cf-app-header .account-popover { right: 0 !important; }
  .cf-workspace,
  .cf-status-banner+.cf-workspace { height: auto !important; min-height: calc(100vh - 56px) !important; }
  .cf-result-workspace { background: var(--cf-bg) !important; }
  .creator-primary { background: var(--cf-panel) !important; }
  .composer-controls { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 7px !important; }
  .control-chips { width: 100%; min-width: 0; overflow-x: auto !important; }
  .control-chips #model-picker-toggle { order: 0; }
  .control-chips #advanced-toggle { order: 1; flex: 0 0 36px; }
  .control-chips .quick-settings { order: 2; }
  .generate-button,
  .kind-image .generate-button { width: 100% !important; min-width: 0 !important; flex: 0 0 auto !important; }
  .profile-page.page-shell { width: min(100% - 24px, 1280px); padding-top: 34px !important; }
  .profile-intro { position: relative; min-height: 225px; padding: 28px 22px; grid-template-columns: 1fr; border-radius: 20px; }
  .profile-intro-copy { max-width: 78%; }
  .profile-clay-mark { position: absolute; width: 128px; right: -20px; top: -5px; opacity: .72; }
  .profile-ledger { grid-template-columns: 1fr; gap: 16px !important; }
  .profile-ledger>section { padding: 22px 20px 24px !important; border-radius: 18px; }
}

/* ==========================================================================
   Kadrora Clay System — complete interface pass
   One depth language for navigation, creation, billing and feedback states.
   ========================================================================== */

:root,
:root[data-theme="dark"] {
  --cf-radius-xs: 8px;
  --cf-radius-sm: 16px;
  --cf-radius-md: 22px;
  --cf-radius-lg: 28px;
  --cf-radius-xl: 34px;
  --cf-control-height: 42px;
  --cf-success: #5ccf91;
  --cf-danger: #ff7a72;
  --cf-warning: #f2b95f;
  --cf-clay-raised: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,0) 62%), var(--cf-clay-surface);
  --cf-clay-inset: inset 4px 4px 10px rgba(0,0,0,.28), inset -3px -3px 8px rgba(255,255,255,.025);
  --cf-focus-ring: 0 0 0 3px color-mix(in srgb, var(--cf-accent) 24%, transparent);
}

:root[data-theme="light"] {
  --cf-success: #14784c;
  --cf-danger: #bd352f;
  --cf-warning: #9a6718;
  --cf-clay-raised: linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,.08) 48%), var(--cf-clay-surface);
  --cf-clay-inset: inset 4px 4px 10px rgba(75,70,60,.11), inset -4px -4px 10px rgba(255,255,255,.78);
}

html { font-size: 16px; }
body {
  font-size: 15px !important;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, strong, button, .button { text-wrap: balance; }
h1, h2, h3, h4 {
  color: var(--cf-text) !important;
  font-weight: 720 !important;
  letter-spacing: -.035em;
}
p { text-wrap: pretty; }
small { line-height: 1.45; }
button, input, textarea, select { font: inherit; }
button, .button { font-weight: 650; }

/* Shared clay primitives */
.button,
.theme-toggle,
.mobile-menu,
.language-switcher,
.credit-pill,
.account-menu summary,
.text-button,
.filter-bar span,
.back-link,
.quiet-danger,
.reset-settings,
.panel-head button,
.preset-browser-head button {
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-sm) !important;
  color: var(--cf-text) !important;
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight) !important;
}
.button:hover,
.theme-toggle:hover,
.mobile-menu:hover,
.text-button:hover,
.reset-settings:hover,
.panel-head button:hover,
.preset-browser-head button:hover {
  color: var(--cf-text) !important;
  border-color: var(--cf-line-strong) !important;
  transform: translateY(-1px);
}
.button:active,
.theme-toggle:active,
.mobile-menu:active,
.text-button:active,
.reset-settings:active,
.panel-head button:active,
.preset-browser-head button:active {
  box-shadow: var(--cf-clay-pressed) !important;
  transform: translateY(1px);
}
.button-dark,
.public-nav .button-dark,
.price-card .button-dark,
.app-shell .page-header .button-dark,
.app-shell .empty-library .button-dark {
  border-color: color-mix(in srgb, var(--cf-accent) 72%, transparent) !important;
  color: #fff !important;
  background: linear-gradient(145deg, color-mix(in srgb, var(--cf-accent) 90%, white), var(--cf-accent)) !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--cf-accent) 26%, transparent), inset 0 1px 0 rgba(255,255,255,.25) !important;
}

/* Navigation and menus */
.public-nav,
.cf-app-header {
  border-radius: var(--cf-radius-md) !important;
  background: color-mix(in srgb, var(--cf-clay-surface) 91%, transparent) !important;
  box-shadow: 9px 11px 28px rgba(0,0,0,.18), -5px -5px 18px rgba(255,255,255,.015), inset 0 1px 0 var(--cf-clay-highlight) !important;
}
.cf-app-header { padding-inline: clamp(18px, 2.4vw, 32px) !important; }
.creator-primary { gap: 4px !important; }
.creator-primary a,
.pricing-nav-link,
.public-nav>nav>a {
  min-height: 36px;
  padding: 0 11px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 560 !important;
}
.creator-primary a:hover,
.creator-primary a.active,
.pricing-nav-link:hover,
.public-nav>nav>a:hover {
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight);
}
.creator-primary a.active:after { display: none !important; }
.language-switcher { padding: 3px !important; gap: 2px !important; }
.language-switcher a {
  min-width: 34px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px !important;
  color: var(--cf-muted) !important;
  font-size: 12px !important;
  font-weight: 650;
}
.language-switcher a.active {
  color: var(--cf-text) !important;
  background: var(--cf-clay-surface) !important;
  box-shadow: var(--cf-clay-pressed) !important;
}
.account-menu summary { min-height: 42px; padding: 4px 8px 4px 5px !important; }
.account-popover {
  padding: 9px !important;
  border: 1px solid var(--cf-line-strong) !important;
}
.account-popover>a,
.account-popover form button {
  min-height: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--cf-soft) !important;
  background: transparent !important;
  font-size: 13px !important;
}
.account-popover>a:hover,
.account-popover form button:hover { color: var(--cf-text) !important; background: var(--cf-hover) !important; transform: none; }
.account-email { color: var(--cf-muted) !important; font-size: 12px !important; }
.flash-stack { top: 76px !important; right: 20px !important; }
.flash,
#cf-toast {
  border: 1px solid var(--cf-line-strong) !important;
  border-radius: var(--cf-radius-md) !important;
  color: var(--cf-text) !important;
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow) !important;
  backdrop-filter: blur(20px);
  font-size: 14px !important;
}

/* Landing: disciplined editorial rhythm with a clay product demo */
.landing-flow {
  align-items: center !important;
  padding-top: clamp(82px, 9vh, 112px) !important;
  min-height: min(900px, calc(100vh - 10px)) !important;
}
.landing-copy h1 { font-weight: 735 !important; }
.landing-actions { gap: 12px !important; }
.landing-actions a { min-height: 48px; padding-inline: 20px !important; border-radius: var(--cf-radius-sm) !important; }
.landing-actions a:first-child,
.flow-cta>a { box-shadow: 0 12px 28px color-mix(in srgb, var(--cf-accent) 25%, transparent), inset 0 1px 0 rgba(255,255,255,.24) !important; }
.free-entry { color: var(--cf-muted) !important; font-size: 13px !important; }
.flow-demo {
  padding: 10px;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-xl) !important;
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight) !important;
}
.flow-demo-stage { border-radius: 20px !important; box-shadow: var(--cf-clay-inset) !important; }
.flow-demo-input {
  margin-top: 10px;
  min-height: 58px;
  padding: 8px !important;
  border: 0 !important;
  border-radius: var(--cf-radius-md) !important;
  box-shadow: var(--cf-clay-inset) !important;
}
.flow-demo-input button,
.flow-demo-input span,
.flow-demo-input b { box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); }
.landing-models { border-color: var(--cf-line) !important; }
.landing-model-lines { display: grid; gap: 10px; border: 0 !important; }
.landing-model-lines a {
  min-height: 68px !important;
  padding: 10px 14px !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-md) !important;
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight);
}
.landing-model-lines a:hover { transform: translateY(-2px); border-color: var(--cf-line-strong) !important; }
.landing-model-lines strong { color: var(--cf-text) !important; font-size: 14px !important; }
.landing-model-lines small,
.landing-model-lines em { color: var(--cf-muted) !important; font-size: 12px !important; }
.flow-statement {
  padding: clamp(28px, 4vw, 48px) !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-lg);
  background: var(--cf-clay-raised);
  box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight);
}
.flow-cta { border-color: var(--cf-line) !important; }

/* Explore and all model rows */
.flow-hero,
.profile-intro { background: var(--cf-clay-raised) !important; }
.flow-hero p,
.profile-intro p { color: var(--cf-muted) !important; font-size: 16px !important; }
.flow-actions a { min-height: 42px; display: inline-flex; align-items: center; }
.model-index-title h2 { font-size: 21px !important; }
.model-index-title p { color: var(--cf-muted) !important; font-size: 14px !important; }
.model-lines a { border: 1px solid transparent !important; background: var(--cf-clay-raised) !important; }
.model-lines a:hover { border-color: var(--cf-line-strong) !important; }
.model-lines strong { color: var(--cf-text) !important; font-size: 14px !important; }

/* Creation surfaces */
.cf-workspace { padding: 14px !important; gap: 14px !important; }
.cf-composer,
.cf-result-workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-lg) !important;
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow), inset 0 1px 0 var(--cf-clay-highlight) !important;
}
.composer-head,
.result-toolbar { min-height: 58px !important; padding: 0 18px !important; border-color: var(--cf-line) !important; }
.image-composer-label>span,
.lipsync-label>span,
.result-toolbar strong { color: var(--cf-text) !important; font-size: 15px !important; font-weight: 680 !important; }
.image-composer-label small,
.lipsync-label small,
.result-toolbar a { color: var(--cf-muted) !important; font-size: 12px !important; }
.workspace-modes { padding: 4px !important; border: 1px solid var(--cf-line) !important; box-shadow: var(--cf-clay-inset) !important; }
.workspace-modes button {
  min-height: 36px;
  padding-inline: 13px !important;
  color: var(--cf-muted) !important;
  font-size: 13px !important;
  font-weight: 600;
}
.workspace-modes button.active { color: var(--cf-text) !important; background: var(--cf-clay-raised) !important; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight) !important; }
.composer-body { padding: 16px !important; gap: 12px !important; }
.preset-summary,
.reference-field,
.prompt-card {
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-md) !important;
  color: var(--cf-text) !important;
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight) !important;
}
.preset-summary { min-height: 62px !important; padding: 9px 11px !important; }
.preset-summary b,
.preset-summary small,
.reference-field small { color: var(--cf-muted) !important; font-size: 12px !important; }
.preset-summary strong,
.reference-field strong { color: var(--cf-text) !important; font-size: 13px !important; }
.reference-field { overflow: visible; }
.reference-field>label {
  min-height: 68px !important;
  padding: 10px 12px !important;
}
.reference-field label span:nth-child(2) {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}
.reference-field strong {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}
.reference-field small {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  line-height: 1.45 !important;
}
.reference-add { color: var(--cf-accent) !important; }
.prompt-card { min-height: 160px !important; }
.prompt-card:focus-within { border-color: color-mix(in srgb, var(--cf-accent) 54%, var(--cf-line)) !important; box-shadow: var(--cf-clay-inset), var(--cf-focus-ring) !important; }
.prompt-card textarea {
  min-height: 150px !important;
  padding: 16px 16px 42px !important;
  color: var(--cf-text) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}
.prompt-card textarea::placeholder { color: color-mix(in srgb, var(--cf-muted) 72%, transparent) !important; }
.prompt-tools { left: 12px !important; right: 12px !important; bottom: 9px !important; }
.prompt-tools button { min-height: 30px; padding: 0 9px !important; border-radius: 9px !important; color: var(--cf-accent) !important; background: var(--cf-hover) !important; }
.prompt-tools small,
.prompt-tools small span { font-size: 12px !important; }
.composer-controls { min-height: 70px !important; padding: 10px 12px !important; }
.control-chip,
.quick-settings .control-chip {
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid var(--cf-line) !important;
  background: var(--cf-clay-raised) !important;
}
.control-chip:hover { border-color: var(--cf-line-strong) !important; transform: translateY(-1px); }
.control-chip span { font-size: 13px !important; font-weight: 630 !important; }
.control-chip small { font-size: 12px !important; }
.generate-button { min-height: 46px !important; padding-inline: 17px !important; font-size: 14px !important; }
.generate-button small { border-radius: 8px !important; background: rgba(0,0,0,.13) !important; font-size: 12px !important; }
.generate-button small b { font-size: inherit !important; }
.generation-stage {
  margin: 14px !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-md) !important;
  box-shadow: var(--cf-clay-inset) !important;
}
.empty-stage strong { color: var(--cf-text) !important; font-size: 21px !important; }
.empty-stage p { max-width: 460px; color: var(--cf-muted) !important; font-size: 14px !important; line-height: 1.6 !important; }
.empty-glyph { box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight) !important; }
@media (min-width: 681px) {
  .kind-image .empty-stage {
    position: absolute;
    top: 10px;
    left: 50%;
    width: min(620px, calc(100% - 40px));
    max-width: none;
    padding: 10px 18px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 3px;
    align-items: center;
    text-align: left;
    transform: translateX(-50%);
  }
  .kind-image .empty-stage .empty-glyph {
    grid-row: 1 / 3;
    width: 54px;
    height: 54px;
    margin: 0;
  }
  .kind-image .empty-stage strong { margin: 0; align-self: end; }
  .kind-image .empty-stage p { align-self: start; }
  .kind-image .job-progress,
  .kind-image .job-failed { transform: translateY(-96px); }
}
.floating-panel { border: 1px solid var(--cf-line-strong) !important; }
.panel-head { padding: 14px !important; border-color: var(--cf-line) !important; background: color-mix(in srgb, var(--cf-clay-surface) 94%, transparent) !important; }
.panel-head small { color: var(--cf-accent) !important; font-size: 12px !important; }
.panel-head strong { color: var(--cf-text) !important; font-size: 15px !important; }
.panel-head button,
.preset-browser-head button { width: 36px !important; height: 36px !important; }
.panel-search {
  height: 42px !important;
  margin: 12px !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-sm) !important;
  background: var(--cf-input) !important;
  box-shadow: var(--cf-clay-inset) !important;
}
.panel-search input { color: var(--cf-text) !important; font-size: 14px !important; }
.model-list { gap: 7px !important; padding: 0 10px 12px !important; }
.model-option {
  min-height: 64px;
  padding: 10px !important;
  border: 1px solid transparent !important;
  border-radius: var(--cf-radius-sm) !important;
}
.model-option:hover,
.model-option.active { border-color: var(--cf-line) !important; background: var(--cf-clay-raised) !important; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight) !important; }
.model-option.active { border-left: 3px solid var(--cf-accent) !important; }
.model-option strong { color: var(--cf-text) !important; font-size: 13px !important; }
.model-option small,
.model-option em { color: var(--cf-muted) !important; font-size: 12px !important; }
.settings-fields { padding: 6px 14px !important; }
.setting-row,
.setting-stack { min-height: 58px !important; color: var(--cf-soft) !important; font-size: 13px !important; border-color: var(--cf-line) !important; }
.setting-row select,
.setting-row input[type=number],
.setting-stack textarea {
  min-height: 40px;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-sm) !important;
  color: var(--cf-text) !important;
  background: var(--cf-input) !important;
  box-shadow: var(--cf-clay-inset) !important;
  font-size: 13px !important;
}
.toggle-row i { width: 38px !important; height: 22px !important; box-shadow: var(--cf-clay-inset); }
.toggle-row i:after { width: 18px !important; height: 18px !important; background: var(--cf-soft) !important; box-shadow: 1px 2px 5px rgba(0,0,0,.25); }
.toggle-row input:checked+i:after { left: 18px !important; background: #fff !important; }
.reset-settings { min-height: 42px; font-size: 13px !important; }
.preset-backdrop { background: rgba(5,6,8,.72) !important; backdrop-filter: blur(12px) !important; }
.preset-browser>section { padding: 18px !important; border: 1px solid var(--cf-line-strong) !important; }
.preset-browser-head h2 { font-size: 24px !important; }
.preset-browser-head small { color: var(--cf-accent) !important; font-size: 12px !important; }
.preset-grid { gap: 14px !important; }
.preset-grid button { padding: 8px !important; border: 1px solid var(--cf-line) !important; background: var(--cf-clay-raised) !important; }
.preset-grid button:hover { border-color: color-mix(in srgb, var(--cf-accent) 45%, var(--cf-line)) !important; transform: translateY(-2px); }
.preset-grid strong { color: var(--cf-text) !important; font-size: 13px !important; }
.preset-grid small { color: var(--cf-muted) !important; font-size: 12px !important; }
.job-progress,
.job-failed { color: var(--cf-text) !important; }
.job-progress p,
.job-failed p { color: var(--cf-muted) !important; font-size: 14px !important; }
.job-failed>span { color: var(--cf-danger) !important; background: color-mix(in srgb, var(--cf-danger) 12%, var(--cf-clay-surface)) !important; box-shadow: var(--cf-clay-shadow-sm); }
.result-actions { border: 1px solid var(--cf-line) !important; border-radius: var(--cf-radius-sm) !important; box-shadow: var(--cf-clay-shadow-sm) !important; }
.cf-status-banner {
  min-height: 44px;
  padding: 8px 18px !important;
  align-items: center;
  border-bottom: 1px solid var(--cf-line) !important;
}
.cf-status-banner strong {
  color: var(--cf-text) !important;
  font-size: 13px !important;
  font-weight: 680 !important;
  line-height: 1.3 !important;
}
.cf-status-banner small {
  color: var(--cf-muted) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

/* Auth, library, pricing, profile and job details */
.auth-card { border: 1px solid var(--cf-line) !important; background: var(--cf-clay-raised) !important; }
.auth-card h1 { font-size: clamp(38px, 5vw, 52px) !important; line-height: 1 !important; }
.auth-card>p { color: var(--cf-muted) !important; font-size: 15px !important; }
.auth-form label { color: var(--cf-soft) !important; font-size: 13px !important; }
.auth-form input {
  min-height: 48px;
  padding: 0 14px !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-sm) !important;
  color: var(--cf-text) !important;
  background: var(--cf-input) !important;
  box-shadow: var(--cf-clay-inset) !important;
  font-size: 15px !important;
}
.auth-form input:focus { border-color: color-mix(in srgb, var(--cf-accent) 55%, var(--cf-line)) !important; box-shadow: var(--cf-clay-inset), var(--cf-focus-ring) !important; }
.auth-form .button { min-height: 48px; font-size: 14px !important; }
.page-shell,
.pricing-shell { width: min(1280px, calc(100% - 48px)); }
.page-header h1,
.pricing-intro h1 { font-size: clamp(42px, 5vw, 66px) !important; }
.page-header p,
.pricing-intro p { color: var(--cf-muted) !important; font-size: 15px !important; line-height: 1.6 !important; }
.page-header .button { min-height: 44px; }
.button { font-size: 14px !important; }
.filter-bar {
  width: fit-content;
  padding: 4px !important;
  gap: 3px !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-sm) !important;
  background: var(--cf-clay-surface) !important;
  box-shadow: var(--cf-clay-inset) !important;
}
.filter-bar span {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding-inline: 13px !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--cf-muted) !important;
  background: transparent !important;
  font-size: 13px !important;
}
.filter-bar span.active { color: var(--cf-text) !important; background: var(--cf-clay-raised) !important; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight) !important; }
.library-grid { gap: 18px !important; }
.library-card,
.empty-library,
.price-card,
.usage-table-wrap,
.job-info { background: var(--cf-clay-raised) !important; }
.library-card { overflow: hidden; }
.library-preview { box-shadow: var(--cf-clay-inset) !important; }
.library-meta { padding: 17px !important; }
.library-meta strong { color: var(--cf-text) !important; font-size: 14px !important; }
.library-meta p { color: var(--cf-muted) !important; font-size: 13px !important; line-height: 1.5 !important; }
.library-meta small { color: var(--cf-muted) !important; font-size: 12px !important; }
.status-tag { border-radius: 8px !important; font-size: 12px !important; backdrop-filter: blur(12px); }
.status-tag.succeeded,
.status-text.succeeded { color: var(--cf-success) !important; }
.status-tag.failed,
.status-text.failed { color: var(--cf-danger) !important; }
.empty-library { min-height: 360px !important; }
.empty-library h2 { font-size: 24px !important; }
.empty-library p { color: var(--cf-muted) !important; font-size: 14px !important; }
.pricing-grid { gap: 20px !important; align-items: stretch !important; }
.price-card { padding: 27px !important; }
.price-card h2 { font-size: 23px !important; }
.price-card>p { min-height: 50px; font-size: 14px !important; line-height: 1.6 !important; }
.price { font-size: 52px !important; letter-spacing: -.055em !important; }
.price small,
.credit-total { font-size: 13px !important; }
.credit-total {
  padding: 12px 14px !important;
  border: 1px solid var(--cf-line) !important;
  border-radius: var(--cf-radius-sm) !important;
  background: var(--cf-input) !important;
  box-shadow: var(--cf-clay-inset) !important;
}
.price-card .button { width: 100%; min-height: 46px; }
.price-card li { font-size: 13px !important; }
.popular-badge { padding: 5px 9px !important; border-radius: 8px !important; font-size: 12px !important; letter-spacing: .06em; }
.usage-table-wrap { padding: clamp(22px, 4vw, 38px) !important; }
.usage-table { border-collapse: separate !important; border-spacing: 0 8px !important; }
.usage-table th { font-size: 12px !important; }
.usage-table td { padding: 14px !important; border-block: 1px solid var(--cf-line) !important; background: var(--cf-input) !important; font-size: 13px !important; }
.usage-table td:first-child { border-left: 1px solid var(--cf-line) !important; border-radius: 12px 0 0 12px; }
.usage-table td:last-child { border-right: 1px solid var(--cf-line) !important; border-radius: 0 12px 12px 0; }
.profile-intro h1 { font-size: clamp(46px, 6vw, 72px) !important; }
.profile-ledger>section { background: var(--cf-clay-raised) !important; }
.profile-rows>div { min-height: 64px !important; }
.profile-actions :is(button, a),
.profile-upgrade { min-height: 44px; padding: 0 14px !important; color: var(--cf-text) !important; }
.profile-note { color: var(--cf-muted) !important; font-size: 13px !important; }
.profile-section-head small { font-size: 12px !important; }
.quiet-danger { color: var(--cf-danger) !important; }
.job-detail-grid { gap: 20px !important; }
.job-result { margin: 0 !important; background: var(--cf-clay-surface) !important; }
.job-result-media { overflow: hidden; border-radius: inherit; }
.job-image-open { width: 100%; height: 100%; padding: 0; border: 0; background: #050505; cursor: zoom-in; }
.job-image-open img { width: 100%; height: 100%; object-fit: contain; }
.job-image-viewer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 24px; border: 0; background: rgba(5,6,7,.96); }
.job-image-viewer::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(14px); }
.job-image-viewer[open] { display: grid; place-items: center; }
.job-image-viewer img { display: block; max-width: calc(100vw - 48px); max-height: calc(100dvh - 48px); width: auto; height: auto; object-fit: contain; }
.job-image-viewer-close { position: fixed; z-index: 2; top: 20px; right: 20px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: rgba(25,27,30,.86); color: #fff; font-size: 27px; cursor: pointer; box-shadow: 0 12px 28px rgba(0,0,0,.3); }
.profile-topup { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 18px; border: 1px solid var(--cf-line); border-radius: 16px; background: var(--cf-input); box-shadow: var(--cf-clay-inset); }
.profile-topup>div { display: grid; gap: 5px; }
.profile-topup strong { color: var(--cf-text); font-size: 14px; }
.profile-topup small { max-width: 390px; color: var(--cf-muted); font-size: 12px; line-height: 1.45; }
.profile-topup form { flex: 0 0 auto; }
.profile-topup button { min-height: 42px; padding: 0 14px; border: 1px solid var(--cf-line); border-radius: 12px; background: var(--cf-clay-surface); color: var(--cf-text); font-weight: 700; cursor: pointer; box-shadow: var(--cf-clay-shadow-sm), inset 0 1px 0 var(--cf-clay-highlight); }
.profile-topup button:disabled { opacity: .48; cursor: not-allowed; }
.profile-topup{align-items:stretch;flex-direction:column}
.profile-topup-form{display:grid;gap:12px;width:100%}
.profile-topup-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.profile-topup-choices label{position:relative;min-width:0;cursor:pointer}
.profile-topup-choices input{position:absolute;opacity:0;inset:0}
.profile-topup-choices label>span{display:grid;gap:4px;min-height:66px;padding:12px;border:1px solid var(--cf-line);border-radius:12px;background:var(--cf-clay-surface);box-shadow:inset 0 1px 0 var(--cf-clay-highlight);transition:border-color .2s,transform .25s,box-shadow .25s}
.profile-topup-choices label:hover>span{transform:translateY(-2px);box-shadow:var(--cf-clay-shadow-sm)}
.profile-topup-choices input:checked+span{border-color:var(--cf-accent);background:color-mix(in srgb,var(--cf-accent) 9%,var(--cf-clay-surface));box-shadow:0 0 0 1px var(--cf-accent),var(--cf-clay-shadow-sm)}
.profile-topup-choices input:focus-visible+span{outline:2px solid var(--cf-accent);outline-offset:3px}
.profile-topup-choices strong{font-size:12px;line-height:1.25}
.profile-topup-choices small{font-size:13px;font-weight:800;color:var(--cf-accent)}
.profile-topup-form>button{justify-self:start;display:inline-flex;align-items:center;gap:8px}
.profile-topup-form>button .ui-icon{width:15px;height:15px;flex-basis:15px}
.billing-home{padding-block:clamp(26px,5vw,68px) 80px}
.billing-back{display:inline-flex;align-items:center;gap:8px;color:var(--cf-muted);text-decoration:none;font-size:13px;font-weight:700}
.billing-back .ui-icon{width:15px;height:15px;flex-basis:15px}
.billing-home-head{margin:28px 0 30px}
.billing-home-head h1{margin:10px 0;font-size:clamp(32px,5vw,56px)}
.billing-home-head p{color:var(--cf-muted);max-width:580px;line-height:1.6}
.billing-home-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:18px}
.billing-home-grid>section,.billing-home-actions,.billing-empty{padding:clamp(22px,3vw,34px);border:1px solid var(--cf-line);border-radius:22px;background:var(--cf-clay-raised);box-shadow:var(--cf-clay-shadow-sm)}
.billing-plan-top{display:flex;justify-content:space-between;align-items:center}
.billing-plan-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:color-mix(in srgb,var(--cf-accent) 20%,var(--cf-clay-surface));color:var(--cf-accent)}
.billing-plan-icon .ui-icon{width:21px;height:21px;flex-basis:21px}
.billing-status{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--cf-accent)}
.billing-home h2{margin:16px 0 10px;font-size:clamp(22px,3vw,30px)}
.billing-home p{line-height:1.55}
.billing-plan-card>p,.billing-value-card>p,.billing-home-actions>p{color:var(--cf-muted)}
.billing-plan-card dl{margin:22px 0 0}
.billing-plan-card dl>div{display:flex;justify-content:space-between;gap:18px;padding:13px 0;border-top:1px solid var(--cf-line)}
.billing-plan-card dt{color:var(--cf-muted)}
.billing-plan-card dd{margin:0;font-weight:800}
.billing-renew-note{margin:16px 0 0;font-size:12px}
.billing-value-card ul{display:grid;gap:14px;margin:20px 0 28px;padding:0;list-style:none}
.billing-value-card li{display:flex;align-items:center;gap:12px;font-size:14px}
.billing-value-card li .ui-icon{width:18px;height:18px;flex-basis:18px;color:var(--cf-accent)}
.billing-keep,.billing-home-actions a,.billing-empty a{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:9px 14px;border:1px solid var(--cf-line);border-radius:11px;background:var(--cf-clay-surface);color:var(--cf-text);text-decoration:none;font-weight:750;transition:transform .25s,border-color .2s,box-shadow .25s}
.billing-keep:hover,.billing-home-actions a:hover,.billing-empty a:hover{transform:translateY(-2px);border-color:var(--cf-accent);box-shadow:var(--cf-clay-shadow-sm)}
.billing-keep .ui-icon,.billing-home-actions a .ui-icon{width:16px;height:16px;flex-basis:16px}
.billing-home-actions{margin-top:18px}
.billing-home-actions h2{margin-top:0;font-size:20px}
.billing-home-actions>div{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.billing-home-actions .billing-cancel{color:var(--cf-danger)}
@media(max-width:900px){.billing-home-grid{grid-template-columns:1fr}.profile-topup-choices{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:580px){.profile-topup-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-topup-form>button{width:100%;justify-content:center}}
@media(prefers-reduced-motion:reduce){.profile-topup-choices label>span,.billing-keep,.billing-home-actions a,.billing-empty a{transition:none}}
.job-info { padding: 22px !important; }
.job-info>div { padding: 15px 0 !important; border-color: var(--cf-line) !important; }
.field-label { color: var(--cf-muted) !important; font-size: 12px !important; letter-spacing: .08em; }
.job-info p,
.job-info dt,
.job-info dd { color: var(--cf-soft) !important; font-size: 13px !important; }
.error-panel { border-radius: var(--cf-radius-sm) !important; color: var(--cf-danger) !important; background: color-mix(in srgb, var(--cf-danger) 8%, var(--cf-clay-surface)) !important; }

/* Light mode must keep one clean hierarchy */
:root[data-theme="light"] .public-nav,
:root[data-theme="light"] .cf-app-header,
:root[data-theme="light"] .account-popover { box-shadow: 9px 11px 28px rgba(65,61,52,.10), -6px -6px 18px rgba(255,255,255,.75), inset 0 1px 0 #fff !important; }
:root[data-theme="light"] .generation-stage { background-color: var(--cf-input) !important; }
:root[data-theme="light"] .result-actions { background: rgba(250,249,245,.86) !important; }
:root[data-theme="light"] .status-tag { color: var(--cf-soft); background: rgba(250,249,245,.82); }
:root[data-theme="light"] .flow-clay-object,
:root[data-theme="light"] .flow-hero-mark,
:root[data-theme="light"] .profile-clay-mark { filter: drop-shadow(0 22px 28px rgba(41,43,52,.18)); }

@media (max-width: 1100px) {
  .cf-app-header { grid-template-columns: 180px 1fr auto !important; }
  .creator-primary a { padding-inline: 8px !important; }
  .account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .library-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}

@media (max-width: 820px) {
  .page-shell,
  .pricing-shell { width: min(100% - 32px, 1280px); }
  .library-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .pricing-grid { grid-template-columns: 1fr !important; }
  .profile-topup { align-items: stretch; flex-direction: column; }
  .profile-topup button { width: 100%; }
  .usage-table-wrap { overflow-x: auto; }
  .usage-table { min-width: 620px; }
}

@media (max-width: 680px) {
  body { font-size: 14px !important; }
  .public-nav { width: calc(100% - 20px) !important; padding-inline: 10px !important; }
  .public-nav>nav { gap: 5px !important; }
  .public-nav .brand span { display: none; }
  .public-nav .language-switcher,
  .public-nav .public-link { display: none !important; }
  .public-nav .button-small { min-height: 38px; padding-inline: 12px !important; font-size: 12px !important; }
  .cf-app-header { border-radius: 0 0 15px 15px !important; box-shadow: 0 8px 20px rgba(0,0,0,.2), inset 0 1px 0 var(--cf-clay-highlight) !important; }
  .cf-app-header .creator-brand span { display: none; }
  .cf-app-header .credit-pill { height: 34px !important; padding-inline: 9px !important; }
  .cf-app-header .theme-toggle { width: 34px; height: 34px; }
  .creator-primary.open {
    padding: 8px !important;
    border: 1px solid var(--cf-line) !important;
    border-radius: var(--cf-radius-md) !important;
    background: var(--cf-clay-raised) !important;
    box-shadow: var(--cf-clay-shadow) !important;
  }
  .creator-primary.open a { min-height: 42px; font-size: 13px !important; }
  .landing-flow { min-height: auto !important; padding-top: 96px !important; }
  .landing-copy h1 { font-size: clamp(44px, 13.2vw, 54px) !important; }
  .landing-copy>p { font-size: 15px !important; }
  .landing-actions a { width: 100%; }
  .flow-demo { margin-top: 46px !important; padding: 7px; border-radius: 22px !important; }
  .flow-demo-stage { border-radius: 17px !important; }
  .flow-statement { padding: 24px 20px !important; }
  .flow-hero h1 { font-size: 43px !important; }
  .flow-hero p,
  .profile-intro p { font-size: 14px !important; }
  .cf-workspace { padding: 8px !important; gap: 8px !important; }
  .cf-composer,
  .cf-result-workspace,
  .kind-image .cf-composer { border-radius: 18px !important; border: 1px solid var(--cf-line) !important; }
  .cf-result-workspace { min-height: 300px !important; height: 38vh !important; }
  .composer-head,
  .result-toolbar { min-height: 52px !important; padding-inline: 13px !important; }
  .composer-body { padding: 12px !important; }
  .workspace-modes { width: 100%; display: grid !important; grid-template-columns: repeat(3, 1fr); }
  .workspace-modes button { padding-inline: 5px !important; font-size: 12px !important; }
  .prompt-card { min-height: 132px !important; }
  .prompt-card textarea { min-height: 122px !important; padding: 13px 13px 39px !important; font-size: 14px !important; }
  .generation-stage { margin: 8px !important; }
  .empty-stage strong { font-size: 18px !important; }
  .empty-stage p { font-size: 13px !important; }
  .composer-controls { min-height: auto !important; padding: 9px !important; }
  .floating-panel { border-radius: 18px !important; }
  .floating-panel:not([hidden]),
  .settings-panel:not([hidden]) {
    display: block !important;
    transform: none !important;
  }
  .floating-panel .model-list {
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .floating-panel .model-option {
    width: 100% !important;
    flex: 0 0 auto !important;
    grid-template-columns: 40px minmax(0, 1fr) auto !important;
  }
  .preset-grid { grid-template-columns: 1fr 1fr !important; gap: 9px !important; }
  .preset-browser>section { border-radius: 20px !important; }
  .preset-art { height: 96px !important; }
  .page-shell,
  .pricing-shell { width: min(100% - 24px, 1280px); padding-top: 36px !important; }
  .page-header { gap: 18px; }
  .page-header h1,
  .pricing-intro h1 { font-size: 40px !important; }
  .page-header .button { width: 100%; }
  .library-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .library-preview { aspect-ratio: 16/10; }
  .empty-library { min-height: 300px !important; padding-inline: 20px !important; }
  .price-card { padding: 22px !important; }
  .profile-intro h1 { font-size: 42px !important; }
  .profile-rows>div { align-items: start !important; gap: 8px; }
  .profile-rows dd { max-width: 62%; text-align: right; }
  .job-detail-grid { grid-template-columns: 1fr !important; }
  .job-result { min-height: 330px !important; }
  .flash-stack { left: 12px !important; right: 12px !important; top: 68px !important; }
}

/* Sculpted material finish. Depth belongs to surfaces, never to readable text. */
body { font-size: 16px !important; }
h1, h2, h3, h4 { font-family: "Kadrora Sans", sans-serif !important; line-height: 1.12 !important; letter-spacing: -.035em !important; }
button, input, textarea, select { font-family: inherit !important; }
button, .button, strong { text-wrap: initial; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
.public-shell .auth-shell,
body.app-shell .app-content,
body.public-shell {
  background: radial-gradient(ellipse at 8% 0%, color-mix(in srgb, var(--cf-accent) 7%, transparent), transparent 52%), var(--cf-bg) !important;
}
.cf-workspace { background: transparent !important; }
.public-nav, .cf-app-header,
:root[data-theme="light"] .public-nav,
:root[data-theme="light"] .cf-app-header,
:root[data-theme="light"] .account-popover {
  background: var(--cf-clay-raised) !important;
  box-shadow: var(--cf-clay-shadow) !important;
}
.brand-symbol { border-radius: 14px !important; box-shadow: var(--cf-clay-shadow-sm); }
.creator-primary a, .pricing-nav-link, .public-nav>nav>a { font-size: 14px !important; }
.creator-primary a.active { color: var(--cf-accent) !important; }
.account-menu { flex: 0 0 auto; }
.account-menu summary { gap: 9px; }
.account-menu .avatar {
  background: #3158ed !important;
  display: grid !important; place-items: center;
  width: 36px !important; height: 36px !important; min-width: 36px;
  flex: 0 0 36px !important; border-radius: 12px !important;
  box-shadow: inset 2px 2px 4px rgba(255,255,255,.28), inset -3px -3px 6px rgba(8,22,92,.25), 2px 3px 6px rgba(0,0,0,.12);
}
.account-name { min-width: 0; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-toggle, .mobile-menu { width: 44px !important; height: 44px !important; flex: 0 0 44px; }
.public-shell .auth-form .button,
.button-dark, .public-nav .button-dark, .price-card .button-dark,
.generate-button, .landing-actions a:first-child, .flow-cta>a, .flow-actions a:first-child {
  border-radius: 18px !important;
  color: #fff !important;
  background: linear-gradient(145deg, #5075ff, #3156dc) !important;
  box-shadow: inset 2px 3px 5px rgba(255,255,255,.35), inset -3px -4px 7px rgba(14,34,121,.32), 0 7px 14px rgba(30,62,165,.22) !important;
}
.generate-button:hover, .button-dark:hover { filter: brightness(1.06); }
.popular-badge, .flow-demo-input b { background: #3158ed !important; color: #fff !important; }
.generate-button:active, .button-dark:active { transform: translateY(1px); box-shadow: var(--cf-clay-pressed) !important; }
.control-chip:disabled { opacity: 1 !important; cursor: default; }
button:disabled:not(.control-chip) { opacity: .6; cursor: not-allowed; }
.flow-demo-stage, .generation-stage { background-image: none !important; background-color: var(--cf-input) !important; }
.flow-clay-object { max-width: 68% !important; max-height: 95%; object-fit: contain; }
.flow-demo-stage>small { white-space: normal !important; max-width: calc(100% - 48px); line-height: 1.55 !important; }
.library-preview>span, .empty-library>span { color: var(--cf-accent) !important; }
.credit-total strong, .price-card li:before { color: var(--cf-accent) !important; }
.landing-copy>p, .flow-hero p, .page-header p, .profile-intro p, .auth-card>p { font-size: 16px !important; line-height: 1.65 !important; }
.reference-unified>label,
.kind-image .reference-unified>label {
  min-height: 76px !important; height: auto !important;
  padding: 12px 16px !important; gap: 14px !important;
  border-radius: 18px !important;
}
.reference-unified>label>span:last-of-type { min-width: 0; flex: 1; }
.reference-field strong { display: block; font-size: 15px !important; line-height: 1.45 !important; }
.reference-field small { display: block; margin-top: 3px; font-size: 13px !important; line-height: 1.5 !important; }
.reference-add { flex: 0 0 44px !important; width: 44px !important; height: 44px !important; border-radius: 14px !important; }
.prompt-card { border-radius: 20px !important; background: var(--cf-input) !important; box-shadow: var(--cf-clay-inset) !important; }
.prompt-card textarea, .kind-image .prompt-card textarea { font-size: 16px !important; line-height: 1.6 !important; padding: 18px 18px 48px !important; min-height: 132px !important; }
.prompt-card textarea::placeholder { color: var(--cf-muted) !important; opacity: 1; }
.prompt-tools { padding-inline: 14px !important; bottom: 12px !important; }
.prompt-tools button { font-size: 13px !important; }
.composer-controls { gap: 16px !important; padding: 16px !important; background: transparent !important; }
.control-chips, .quick-settings { flex-wrap: wrap !important; gap: 9px !important; overflow: visible !important; align-items: center !important; }
.control-chip, .quick-settings .control-chip {
  height: auto !important; min-height: 44px !important;
  flex: 0 0 auto !important; padding: 10px 13px !important;
  border-radius: 15px !important; line-height: 1.35 !important;
  white-space: nowrap !important; font-size: 14px !important;
}
.control-chip span { white-space: nowrap !important; font-size: 14px !important; }
.control-chip.icon-chip { width: 44px !important; padding: 10px !important; }
.generate-button { min-height: 52px !important; font-size: 16px !important; }
.image-composer-label { flex-wrap: wrap; gap: 5px 12px; }
.image-composer-label small { font-size: 14px !important; line-height: 1.4; }
.setting-row, .setting-stack, .model-option strong, .auth-form label { font-size: 14px !important; }
.setting-row select, .setting-row input[type=number], .setting-stack textarea, .auth-form input { font-size: 16px !important; }
.empty-stage strong { font-style: normal !important; color: var(--cf-text) !important; }
.empty-stage p { color: var(--cf-muted) !important; }
.result-toolbar strong { letter-spacing: .04em !important; font-size: 13px !important; }
.cf-composer, .cf-result-workspace, .floating-panel, .auth-card, .empty-library, .price-card { border-radius: var(--cf-radius-lg) !important; }
.reference-field:focus-within { outline: 2px solid var(--cf-accent); outline-offset: 3px; }
.account-menu summary:focus-visible { outline: 2px solid var(--cf-accent); outline-offset: 3px; }
/* Normal flow keeps the empty/result state and composer from covering one another. */
@media (min-width: 681px) {
  .kind-video .cf-workspace { grid-template-columns: 390px minmax(0, 1fr) !important; }
  .kind-video .control-chips { display: flex !important; }
  .kind-video .model-chip { order: 0; max-width: calc(100% - 56px) !important; }
  .kind-video .icon-chip { order: 1; margin-left: auto; }
  .kind-video .quick-settings { order: 2; flex: 0 0 100% !important; }
  .kind-video .composer-body { flex-shrink: 0; }
  .kind-video .cf-composer { overflow-y: auto !important; }
  .kind-image .cf-workspace {
    display: flex !important; flex-direction: column; align-items: center;
    height: auto !important; min-height: calc(100dvh - 132px);
    padding: 24px !important; gap: 24px !important;
  }
  .kind-image .cf-result-workspace {
    order: 0; position: relative !important; inset: auto !important;
    width: min(100%, 1120px) !important; min-height: 230px !important;
    height: auto !important; flex: 1 0 230px !important;
  }
  .kind-image .generation-stage { min-height: 160px !important; margin: 14px !important; }
  .kind-image .empty-stage {
    position: relative !important; inset: auto !important; transform: none !important;
    display: block !important; width: min(100%, 640px); margin: auto; text-align: center !important;
    padding: 24px !important;
  }
  .kind-image .empty-stage .empty-glyph { display: none; }
  .kind-image .job-progress, .kind-image .job-failed { transform: none !important; }
  .kind-image .cf-composer {
    order: 1; position: relative !important; inset: auto !important; transform: none !important;
    width: min(100%, 1000px) !important; max-width: none !important;
    flex: 0 0 auto; border-radius: 28px !important;
  }
  .kind-image .composer-body { overflow: visible !important; }
  .kind-image .composer-controls { flex-wrap: wrap; }
  .kind-image .control-chips { flex: 1; }
}
@media (max-width: 1360px) and (min-width: 681px) {
  .cf-app-header { grid-template-columns: auto 1fr auto !important; gap: 12px !important; }
  .creator-brand span, .account-name, .pricing-nav-link { display: none !important; }
}
@media (min-width: 681px) and (max-width: 900px) {
  .cf-app-header { display: flex !important; height: 68px !important; }
  .cf-app-header .creator-brand { margin-right: auto; }
  .cf-app-header .mobile-menu { position: static !important; order: 2; margin-left: 12px; }
  .cf-app-header .creator-secondary { margin-left: auto; }
  .cf-app-header .creator-primary.open { top: 76px !important; left: 12px !important; right: 12px !important; border-radius: 20px; padding: 12px; background: var(--cf-clay-surface) !important; box-shadow: var(--cf-clay-shadow); }
}
@media (max-width: 680px) {
  .cf-app-header { padding: 10px 12px !important; gap: 9px !important; }
  .creator-secondary { gap: 9px !important; }
  .account-menu summary { padding: 4px !important; min-width: 46px; }
  .account-name, .account-chevron { display: none !important; }
  .account-popover { position: fixed !important; top: 76px !important; right: 12px !important; width: min(300px, calc(100vw - 24px)) !important; }
  .cf-composer, .kind-image .cf-composer { border-radius: 24px !important; }
  .cf-workspace { padding: 12px !important; gap: 18px !important; }
  .composer-controls, .kind-image .composer-controls { position: static !important; padding: 14px !important; gap: 14px !important; }
  .control-chips { display: flex !important; flex-wrap: wrap !important; }
  .control-chips #model-picker-toggle { order: 0; max-width: calc(100% - 56px) !important; width: auto !important; }
  .control-chips #advanced-toggle { order: 1; margin-left: auto; }
  .control-chips .quick-settings { order: 2; flex-basis: 100%; }
  .model-chip #active-model-name { white-space: normal !important; overflow-wrap: anywhere; }
  .prompt-card textarea { font-size: 16px !important; }
  .reference-unified>label, .kind-image .reference-unified>label { padding: 12px !important; }
  .public-nav .button-small { min-height: 44px; }
  .landing-copy h1 { font-size: clamp(38px, 11.8vw, 52px) !important; }
  .cf-status-banner>div { display: grid; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.auth-inline-link{align-self:flex-end;font-size:.86rem;margin:-.2rem 0 .3rem;color:var(--accent,#8ca4ff)}
/* The same brand face and icon rhythm continue inside native dialogs and actions. */
dialog{font-family:"Kadrora Sans",ui-sans-serif,system-ui,sans-serif!important}
.ui-icon{vertical-align:-.16em}
.back-link,.payment-back,.result-actions a,.result-actions button,.lightbox-footer a,.lightbox-bar button,.profile-upgrade{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.lightbox-footer .ui-icon,.result-actions .ui-icon{width:15px;height:15px;flex-basis:15px}

/* Kadrora typography: one display rhythm across the product and account pages. */
:root{--cf-type:"Kadrora Sans",ui-sans-serif,system-ui,sans-serif}
:is(button,input,textarea,select,option,summary){font-family:var(--cf-type)}
:is(h1,h2,h3,.section-title,.page-title,.billing-home h1,.billing-home h2){font-family:var(--cf-type);font-weight:800;letter-spacing:-.035em;text-wrap:balance}
:is(.creator-brand,.public-brand,.brand-wordmark,.section-kicker){font-family:var(--cf-type);font-weight:800;letter-spacing:-.025em}
:is(.section-kicker,.billing-status){letter-spacing:.11em}
:is(.profile-topup,.billing-home){font-variant-numeric:tabular-nums}

.profile-topup-choices label.is-unavailable{cursor:not-allowed;opacity:.46}
.profile-topup-choices label.is-unavailable>span{box-shadow:none}
.billing-details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}
.billing-detail-card,.billing-history-card{padding:clamp(22px,3vw,34px);border:1px solid var(--cf-line);border-radius:22px;background:var(--cf-clay-raised);box-shadow:var(--cf-clay-shadow-sm)}
.billing-detail-heading{display:flex;align-items:center;gap:12px}
.billing-detail-heading h2,.billing-history-card h2{margin:0;font-size:20px}
.billing-card-number{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 8px;font-size:17px;font-weight:800}
.billing-card-number small{color:var(--cf-muted);font-size:12px;font-weight:700}
.billing-detail-muted{color:var(--cf-muted);font-size:13px}
.billing-quiet-link{display:inline-flex;align-items:center;gap:7px;min-height:36px;margin-top:8px;color:var(--cf-accent);font-weight:800;text-decoration:none}
.billing-quiet-link .ui-icon{width:16px;height:16px;flex-basis:16px}
.billing-cancel-details{margin-top:20px;border-top:1px solid var(--cf-line);padding-top:16px}
.billing-cancel-details summary{width:max-content;max-width:100%;color:var(--cf-muted);font-weight:800;cursor:pointer}
.billing-cancel-details summary:hover{color:var(--cf-text)}
.billing-cancel-details p{max-width:55ch;color:var(--cf-muted);font-size:13px}
.billing-cancel-details button{min-height:40px;padding:8px 13px;border:1px solid color-mix(in srgb,var(--cf-danger) 45%,var(--cf-line));border-radius:11px;background:transparent;color:var(--cf-danger);font-weight:800;cursor:pointer}
.billing-cancel-details button:hover{background:color-mix(in srgb,var(--cf-danger) 10%,transparent)}
.billing-history-card{margin-top:18px}
.billing-history-list{display:grid;margin-top:18px}
.billing-history-row{display:grid;grid-template-columns:minmax(105px,1.2fr) minmax(95px,.8fr) minmax(95px,.8fr) auto;align-items:center;gap:12px;min-height:54px;border-top:1px solid var(--cf-line);font-size:13px}
.billing-history-row time,.billing-payment-status{color:var(--cf-muted)}
.billing-history-row a{display:inline-flex;align-items:center;gap:5px;color:var(--cf-accent);font-weight:800;text-decoration:none}
.billing-history-row a .ui-icon{width:15px;height:15px;flex-basis:15px}
@media(max-width:760px){.billing-details-grid{grid-template-columns:1fr}.billing-history-row{grid-template-columns:1fr auto;gap:5px 12px;padding:12px 0}.billing-history-row :nth-child(3){grid-column:1}.billing-history-row :nth-child(4){grid-column:2;grid-row:2}}
