/* Shared surfaces and navigation across Flux AI web pages. */
html[data-flux-page] {
  --studio-radius:15px;
  --studio-raised:color-mix(in srgb,var(--surface),var(--ink) 5%);
  --studio-shadow:0 12px 30px #0003;
}
html[data-flux-page]:not([data-flux-page="workspace"]) .site-masthead {
  background:transparent;
  border:0;
  padding:10px 0 0;
  position:sticky;
  top:0;
  z-index:30;
}
html[data-flux-page]:not([data-flux-page="workspace"]) .site-masthead-inner {
  position:relative;
  min-height:60px;
  padding:7px 9px 7px 15px;
  gap:18px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--studio-radius);
  box-shadow:var(--studio-shadow);
}
html[data-flux-page] .site-masthead .site-actions { display:flex; align-items:center; gap:6px; }
html[data-flux-page] .site-masthead .site-actions a {
  background:var(--studio-raised);
  min-height:43px;
  padding:8px 13px;
  color:var(--ink);
  white-space:nowrap;
}
html[data-flux-page] .site-masthead .studio-menu-toggle { display:none; position:relative; }

html[data-flux-page]:not([data-flux-page="workspace"]) :is(.catalog-heading,.page-heading,.admin-heading) h1 {
  font-size:clamp(34px,5vw,68px);
}
html[data-flux-page]:not([data-flux-page="workspace"]) :is(.account-card,.content-panel,.app-card,.terminal-panel,.install-help,.collection-card,.admin-main section,.admin-main article) {
  border-radius:var(--studio-radius);
}
html[data-flux-page="downloads"] .app-card .card-top {
  display:flex;
  justify-content:flex-start;
  align-items:center;
}
html[data-flux-page="downloads"] .app-card .card-top .product-icon {
  width:47px;
  height:47px;
  flex:none;
  color:var(--ink);
  border-radius:11px;
  background:var(--board-inset);
}
html[data-flux-page="downloads"] .app-card .card-top .product-icon svg {
  width:24px;
  height:24px;
}
html[data-flux-page="downloads"] .device-tabs { border-radius:12px; }
html[data-flux-page="workspace"] body :is(.card,.glass-card,.modal-card,.model-tools-panel,.art-preset-card,.plan-card) {
  border-radius:var(--studio-radius);
}
html[data-flux-page="workspace"] body #panel-chat .chat-window-card {
  border-radius:var(--studio-radius);
  box-shadow:var(--studio-shadow);
}
html[data-flux-page="workspace"] .app-header .header-shell {
  gap:10px;
}
html[data-flux-page="workspace"] body .app-header :is(.header-action-btn,.header-account-link) {
  border-radius:9px;
}
html[data-flux-page="workspace"] #panel-chat .chat-window-card #chatForm.flux-v0 {
  border-radius:var(--studio-radius);
  box-shadow:0 8px 22px #0002;
}
html[data-flux-page="workspace"] #panel-chat .chat-window-card .flux-v0-actions .v0-action {
  border-radius:12px;
}
html[data-flux-page="workspace"] body .rail-more[open] {
  border-radius:10px;
  background:var(--studio-raised);
}
html[data-flux-page="workspace"] .rail-more-items {
  padding:4px;
}
html[data-flux-page="workspace"] .rail-more[open] .rail-more-items {
  animation:studio-menu-enter .18s ease-out both;
}
html[data-flux-page="workspace"] .tab-panel.active:not(#panel-chat) .work-section-heading {
  animation:studio-menu-enter .22s ease-out both;
}
html[data-flux-page="workspace"] body #mobileNav {
  border-radius:16px;
}
@keyframes studio-menu-enter {
  from { opacity:.25; translate:0 -5px; }
  to { opacity:1; translate:0 0; }
}
@media(max-width:900px) {
  html[data-flux-page]:not([data-flux-page="workspace"]) .site-masthead-inner {
    width:calc(100% - 32px);
    min-height:58px;
    flex-wrap:nowrap;
    justify-content:space-between;
  }
  html[data-flux-page] .site-masthead.studio-menu-ready .studio-menu-toggle {
    display:inline-grid;
    place-items:center;
    position:relative;
    width:44px;
    height:44px;
    padding:0;
    flex:none;
    background:var(--studio-raised);
  }
  html[data-flux-page] .site-masthead .studio-menu-toggle::before,
  html[data-flux-page] .site-masthead .studio-menu-toggle::after {
    content:"";
    position:absolute;
    left:12px;
    right:12px;
    height:2px;
    border-radius:1px;
    background:currentColor;
    transition:transform .2s ease;
  }
  html[data-flux-page] .site-masthead .studio-menu-toggle::before { top:16px; }
  html[data-flux-page] .site-masthead .studio-menu-toggle::after { top:23px; }
  html[data-flux-page] .site-masthead .studio-menu-toggle[aria-expanded="true"]::before { transform:translateY(3.5px) rotate(45deg); }
  html[data-flux-page] .site-masthead .studio-menu-toggle[aria-expanded="true"]::after { transform:translateY(-3.5px) rotate(-45deg); }
  html[data-flux-page] .site-masthead.studio-menu-ready .site-links {
    position:absolute;
    inset:auto 0 auto auto;
    top:calc(100% + 6px);
    display:none;
    flex-direction:column;
    gap:3px;
    padding:7px;
    width:min(290px,calc(100vw - 32px));
    border-radius:12px;
    background:var(--surface);
    border:1px solid var(--line);
    box-shadow:var(--studio-shadow);
  }
  html[data-flux-page] .site-masthead.studio-menu-open .site-links {
    display:flex;
    animation:studio-menu-enter .18s ease-out both;
  }
  html[data-flux-page] .site-masthead.studio-menu-ready .site-links a {
    display:flex;
    align-items:center;
    min-height:44px;
    padding:8px 12px;
    border-radius:7px;
    font-size:15px;
  }
  html[data-flux-page] .site-masthead.studio-menu-ready .site-links a[aria-current="page"] {
    background:var(--studio-raised);
    box-shadow:none;
  }
}
@media(max-width:400px) {
  html[data-flux-page] .site-masthead .site-actions a { padding-inline:9px; }
  html[data-flux-page] .site-masthead .site-actions a > span { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-flux-page] :is(.site-masthead.studio-menu-open .site-links,.rail-more[open] .rail-more-items,.tab-panel.active .work-section-heading) {
    animation:none;
  }
  html[data-flux-page] .studio-menu-toggle::before,
  html[data-flux-page] .studio-menu-toggle::after { transition:none; }
}

/* The same mark appears on the site and the Telegram profile. */
html[data-flux-page] body :is(.site-masthead .flux-wordmark > span,.site-footer .flux-wordmark > span,#appSidebar .sidebar-brand .brand-logo) {
  background: center / contain no-repeat url("/flux-mark.svg?v=20261126") !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
}
html[data-flux-page] #appSidebar .sidebar-brand .brand-logo > span { visibility: hidden; }
html[data-flux-page] :is(.site-masthead .flux-wordmark > span,#appSidebar .sidebar-brand .brand-logo) {
  transition: rotate .2s cubic-bezier(.2,.75,.25,1);
}
html[data-flux-page] :is(.site-masthead .flux-wordmark:hover > span,#appSidebar .sidebar-brand a:hover .brand-logo) {
  rotate: -4deg;
}
@media (prefers-reduced-motion:reduce) {
  html[data-flux-page] :is(.site-masthead .flux-wordmark > span,#appSidebar .sidebar-brand .brand-logo) {
    transition: none;
    rotate: none;
  }
}
