/* ==========================================================================
   AIVORA AI Studio — Homepage
   ========================================================================== */

:root {
  --bg: #030B11;
  --bg-header: #050D15;
  --bg-card: #0A121B;
  --bg-card-2: #0D1721;
  --text: #F5F6F8;
  --text-secondary: #AEB8C5;
  --text-muted: #788594;
  --gold: #F7CD78;
  --gold-bright: #FFE1A0;
  --gold-hover: #E8B95E;
  --border: rgba(170, 190, 210, 0.16);
  --border-gold: rgba(247, 205, 120, 0.55);
  --gold-gradient: linear-gradient(180deg, #FFE1A0 0%, #F7CD78 55%, #E8B95E 100%);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --content-max: 1120px;
  --sidebar-w: 220px;
  --sidebar-gap: 20px;
  --shell-max: calc(var(--sidebar-w) + var(--sidebar-gap) + var(--content-max));
  --container: var(--shell-max);
  --header-h: 64px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-script: "Caveat", cursive;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Keep left/right alignment identical on pages with/without scrollbar */
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 205, 120, 0.28) transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 205, 120, 0.28) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(247, 205, 120, 0.28);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(247, 205, 120, 0.45);
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul { list-style: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.text-gold { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 9px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn:focus-visible,
.icon-btn:focus-visible,
.nav-link:focus-visible,
.gallery-tab:focus-visible,
.billing-option:focus-visible,

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-lg {
  height: 46px;
  padding: 0 22px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
  height: 40px;
  font-size: 13px;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #1A1206;
  border: 1px solid rgba(255, 225, 160, 0.35);
  box-shadow: 0 2px 12px rgba(247, 205, 120, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #FFE8B5 0%, var(--gold-hover) 100%);
}

.btn-outline {
  border: 1px solid rgba(245, 246, 248, 0.28);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: rgba(245, 246, 248, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost {
  border: 1px solid rgba(245, 246, 248, 0.22);
  background: rgba(5, 13, 21, 0.45);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  border-color: rgba(247, 205, 120, 0.45);
  color: var(--gold-bright);
}

/* ==========================================================================
   App Sidebar
   ========================================================================== */

.models-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  column-gap: var(--sidebar-gap);
  /* Stretch so sidebar column is as tall as content — sticky can pin to the bottom */
  align-items: stretch;
  min-height: calc(100dvh - var(--header-h));
}

.models-layout-main {
  min-width: 0;
}

.app-sidebar {
  position: sticky;
  top: var(--header-h);
  bottom: 0;
  z-index: 90;
  align-self: start;
  width: var(--sidebar-w);
  /* 16px short of viewport → gap when scrolled up; flush with content cards at page bottom */
  height: calc(100vh - var(--header-h) - 16px);
  height: calc(100dvh - var(--header-h) - 16px);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 16px 0;
  background: #050A10;
  border-right: 1px solid rgba(170, 190, 210, 0.1);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 205, 120, 0.25) transparent;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 14px;
  flex-shrink: 0;
}

.sidebar-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  margin: 0 0 14px 12px;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--gold-gradient);
  color: #1A1206;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: filter var(--transition), transform var(--transition);
}

.sidebar-create:hover {
  filter: brightness(1.05);
}

.sidebar-create-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.sidebar-brand-mark { flex-shrink: 0; }

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.sidebar-brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}

.sidebar-brand-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 0 1 auto;
  min-height: 0;
  padding-right: 2px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-label {
  margin: 4px 10px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #8FB4C9;
}

.sidebar-divider {
  height: 1px;
  margin: 12px 8px;
  background: rgba(170, 190, 210, 0.12);
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px 0 12px;
  border-radius: 10px;
  color: rgba(245, 246, 248, 0.88);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.sidebar-link svg {
  flex-shrink: 0;
  color: rgba(245, 246, 248, 0.72);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.sidebar-link:hover svg { color: #fff; }

.sidebar-link.is-active {
  background: linear-gradient(90deg, rgba(247, 205, 120, 0.16) 0%, rgba(80, 55, 20, 0.35) 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(247, 205, 120, 0.55);
}

.sidebar-link.is-active svg { color: var(--gold-bright); }

.sidebar-upgrade {
  flex-shrink: 0;
  margin-top: 0;
  margin-bottom: 14px;
  padding: 16px 14px 14px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(247, 205, 120, 0.08) 0%, rgba(12, 18, 26, 0.9) 100%);
  border: 1px solid rgba(247, 205, 120, 0.35);
  box-shadow: 0 0 24px rgba(247, 205, 120, 0.08);
}

.sidebar-upgrade-icon {
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 10px rgba(247, 205, 120, 0.45));
}

.sidebar-upgrade-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 4px;
}

.sidebar-upgrade-copy {
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(245, 246, 248, 0.78);
  margin: 0 0 12px;
}

.sidebar-upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  border-radius: 9px;
  background: var(--gold-gradient);
  color: #1A1206;
  font-size: 13px;
  font-weight: 700;
  transition: filter var(--transition), transform var(--transition);
}

.sidebar-upgrade-btn:hover {
  filter: brightness(1.05);
}

.sidebar-backdrop {
  display: none;
}

body.has-sidebar .site-header {
  width: 100%;
  z-index: 100;
}

body.has-sidebar .models-page {
  padding: 20px 0 0;
}

body.has-sidebar .models-page {
  width: 100%;
}

body.has-sidebar .site-footer {
  width: 100%;
  margin-top: 48px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(5, 13, 21, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark { flex-shrink: 0; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.logo-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  flex: 1;
}

.nav-link {
  position: relative;
  padding: 8px 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 2px;
  height: 1.5px;
  background: var(--gold);
  border-radius: 2px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 20;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  border-radius: 8px;
}

.icon-btn:hover { color: var(--text); }

.lang-switch {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.lang-btn:hover,
.lang-switch.is-open .lang-btn {
  color: var(--text);
  border-color: rgba(247, 205, 120, 0.35);
  background: rgba(247, 205, 120, 0.06);
  box-shadow: 0 0 18px rgba(247, 205, 120, 0.08);
}

.lang-code {
  letter-spacing: 0.04em;
}

.lang-chevron {
  transition: transform var(--transition);
}

.lang-switch.is-open .lang-chevron {
  transform: rotate(180deg);
  color: var(--gold);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(18, 28, 40, 0.98) 0%, rgba(10, 16, 24, 0.98) 100%);
  border: 1px solid rgba(247, 205, 120, 0.28);
  border-radius: 14px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 28px rgba(247, 205, 120, 0.08);
  backdrop-filter: blur(12px);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.lang-switch.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-menu--up {
  top: auto;
  bottom: calc(100% + 10px);
  transform-origin: bottom right;
  transform: translateY(6px) scale(0.98);
}

.lang-switch.is-open .lang-menu--up {
  transform: translateY(0) scale(1);
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-align: left;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.lang-option:hover {
  background: rgba(247, 205, 120, 0.08);
  color: var(--text);
}

.lang-option.is-active {
  background: rgba(247, 205, 120, 0.12);
  color: var(--text);
  border-color: rgba(247, 205, 120, 0.22);
}

.lang-flag {
  font-size: 16px;
  line-height: 1;
  width: 22px;
  text-align: center;
}

.lang-option-text {
  flex: 1;
  min-width: 0;
}

.lang-option-text strong {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}

.lang-check {
  color: var(--gold);
  opacity: 0;
  flex-shrink: 0;
}

.lang-option.is-active .lang-check {
  opacity: 1;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: absolute;
  inset: var(--header-h) 0 auto;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 20px;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile:not([hidden]) {
  display: flex;
}

.nav-mobile .nav-link {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(170, 190, 210, 0.08);
}

.nav-mobile-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.nav-mobile-cta .btn { height: 42px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 32%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    /* fade stânga / dreapta → culoarea de bg */
    linear-gradient(
      90deg,
      var(--bg) 0%,
      rgba(3, 11, 17, 0.88) 6%,
      rgba(3, 11, 17, 0.4) 14%,
      rgba(3, 11, 17, 0) 26%,
      rgba(3, 11, 17, 0) 74%,
      rgba(3, 11, 17, 0.4) 86%,
      rgba(3, 11, 17, 0.88) 94%,
      var(--bg) 100%
    ),
    /* readabilitate text pe stânga */
    linear-gradient(90deg, rgba(3, 11, 17, 0.5) 0%, rgba(3, 11, 17, 0.18) 36%, transparent 55%),
    /* fade jos */
    linear-gradient(180deg, rgba(3, 11, 17, 0.08) 0%, transparent 40%, rgba(3, 11, 17, 0.4) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 360px;
  padding: 28px 0;
}

.hero-content {
  max-width: 520px;
}

.hero-eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 440px;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.hero-script {
  position: absolute;
  right: 40px;
  bottom: 28px;
  top: auto;
  left: auto;
  font-family: var(--font-script);
  font-size: 28px;
  color: rgba(255, 255, 255, 0.88);
  transform: rotate(-6deg);
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

/* ==========================================================================
   Feature cards
   ========================================================================== */

.features {
  padding: 28px 0 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.feature-card {
  position: relative;
  display: block;
  height: 138px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: rgba(247, 205, 120, 0.35);
}

.feature-card-body {
  position: relative;
  z-index: 2;
  width: 58%;
  height: 100%;
  padding: 14px 12px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-card) 55%, rgba(10, 18, 27, 0) 100%);
}

.feature-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  width: 100%;
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(8, 14, 22, 0.85);
  border: 1px solid rgba(247, 205, 120, 0.45);
  flex-shrink: 0;
}

.feature-card h2 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
}

.feature-card p {
  color: rgba(245, 246, 248, 0.78);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  max-width: 170px;
  max-height: calc(1.35em * 3);
  overflow: hidden;
}

.feature-card-body > *:last-child {
  margin-bottom: 0;
}

.feature-cta {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(247, 205, 120, 0.7);
  color: #F7CD78;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: rgba(8, 14, 22, 0.35);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.feature-cta:hover {
  background: rgba(247, 205, 120, 0.12);
  color: #FFE1A0;
  border-color: rgba(247, 205, 120, 0.9);
}

.feature-card-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 55%;
  z-index: 1;
}

.feature-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.feature-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-card) 0%, transparent 42%);
  pointer-events: none;
}

#imagine .feature-card-media img {
  object-position: 70% center;
}

#video .feature-card-media img {
  object-position: right center;
}

#audio .feature-card-media img {
  object-position: 75% center;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery {
  position: relative;
  padding: 28px 0 12px;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2,
.pricing-intro h2 {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

.section-link {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.section-link:hover { color: var(--gold-bright); }

.gallery-intro {
  margin-bottom: 24px;
}

.gallery-eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.gallery-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gallery-title {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
}

.gallery-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.gallery-tab {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(230, 238, 248, 0.22);
  background: rgba(8, 14, 22, 0.55);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.gallery-tab:hover {
  border-color: rgba(230, 238, 248, 0.4);
}

.gallery-tab.active {
  background: var(--gold-gradient);
  color: #1A1206;
  border-color: transparent;
  font-weight: 650;
}

.gallery-tab.active svg {
  color: #1A1206;
}

.gallery-track {
  --gallery-gap: 14px;
  --gallery-cols: 7;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--gallery-cols) - 1) * var(--gallery-gap)) / var(--gallery-cols));
  gap: var(--gallery-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  outline: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  min-width: 0;
  scroll-snap-align: start;
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(170, 190, 210, 0.12);
  background: var(--bg-card);
}

.gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-card-media img {
  transform: scale(1.04);
}

.gallery-card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(3, 11, 17, 0.72));
  pointer-events: none;
}

.gallery-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(8, 14, 20, 0.78);
  border: 1px solid rgba(170, 190, 210, 0.18);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}

.gallery-expand {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(8, 14, 20, 0.55);
  border: 1px solid rgba(170, 190, 210, 0.16);
  backdrop-filter: blur(6px);
  opacity: 0.85;
}

.gallery-duration {
  color: var(--text-secondary);
  margin-left: 2px;
}

.gallery-card h3 {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.3;
}

.gallery-card p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.how {
  padding: 32px 0 40px;
}

.how-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.how-intro-copy h2 {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.how-title-accent {
  background: linear-gradient(180deg, #FFE1A0 0%, #F7CD78 55%, #E8B95E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.how-title-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(247, 205, 120, 0.85), rgba(247, 205, 120, 0.15));
  box-shadow: 0 0 12px rgba(247, 205, 120, 0.45);
}

.how-pricing-link {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--gold);
  font-weight: 650;
}

.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 0 6px;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

.how-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(96px, 0.85fr);
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(247, 205, 120, 0.38);
  background:
    radial-gradient(ellipse 70% 60% at 85% 80%, rgba(247, 205, 120, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(16, 24, 34, 0.98) 0%, rgba(6, 12, 18, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(247, 205, 120, 0.06),
    0 12px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.how-step-arrow {
  display: grid;
  place-items: center;
  align-self: center;
  z-index: 2;
}

.how-step-arrow span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(247, 205, 120, 0.45);
  background: #050A10;
  color: var(--gold);
  box-shadow:
    0 0 0 6px var(--bg),
    0 0 16px rgba(247, 205, 120, 0.18);
}

.how-step-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.how-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.how-step-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.08);
  color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(247, 205, 120, 0.12);
}

.how-step-icon svg {
  width: 17px;
  height: 17px;
}

.how-step h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.how-step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.how-visual {
  position: relative;
  min-height: 108px;
  align-self: center;
}

/* Step 1 — account card */
.how-visual--account {
  display: grid;
  place-items: center;
}

.how-account-card {
  position: relative;
  width: 88px;
  height: 104px;
  padding: 12px 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #141c28 0%, #0a1018 100%);
  border: 1px solid rgba(247, 205, 120, 0.35);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(247, 205, 120, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: rotate(4deg);
}

.how-account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background:
    radial-gradient(circle at 50% 38%, rgba(247, 205, 120, 0.35) 0 28%, transparent 29%),
    radial-gradient(circle at 50% 78%, rgba(247, 205, 120, 0.3) 0 34%, transparent 35%),
    #0d141c;
  box-shadow: 0 0 10px rgba(247, 205, 120, 0.25);
}

.how-account-line {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.how-account-line--short { width: 72%; }

.how-account-plus {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #1A1206;
  background: var(--gold-gradient);
  box-shadow: 0 0 14px rgba(247, 205, 120, 0.45);
}

/* Step 2 — model tiles */
.how-visual--models {
  height: 108px;
}

.how-tile {
  position: absolute;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.how-tile--bg {
  inset: 12px 6px 20px 14px;
  background:
    linear-gradient(180deg, rgba(3, 11, 17, 0.25), rgba(3, 11, 17, 0.55)),
    url("../assets/images/image-studio.jpg") center / cover no-repeat;
  border-color: rgba(247, 205, 120, 0.2);
  opacity: 0.85;
}

.how-tile--play {
  width: 42px;
  height: 42px;
  left: 6px;
  top: 14px;
  color: var(--gold);
  background: #0c121a;
  border-color: rgba(247, 205, 120, 0.45);
  box-shadow: 0 0 14px rgba(247, 205, 120, 0.2);
  transform: rotate(-6deg);
  z-index: 2;
}

.how-tile--play svg { width: 14px; height: 14px; }

.how-tile--cube {
  width: 44px;
  height: 44px;
  left: 34px;
  bottom: 6px;
  color: #d8c4ff;
  background: linear-gradient(160deg, #3a2a6e 0%, #1a1235 100%);
  border-color: rgba(180, 140, 255, 0.35);
  box-shadow: 0 0 16px rgba(140, 100, 255, 0.28);
  transform: rotate(8deg);
  z-index: 3;
}

.how-tile--cube svg { width: 18px; height: 18px; }

.how-tile--wave {
  width: 42px;
  height: 42px;
  right: 2px;
  top: 24px;
  color: #ff9ed2;
  background: linear-gradient(160deg, #1e3a6e 0%, #122038 100%);
  border-color: rgba(120, 180, 255, 0.35);
  box-shadow: 0 0 14px rgba(80, 140, 255, 0.25);
  transform: rotate(12deg);
  z-index: 2;
}

.how-tile--wave svg { width: 18px; height: 12px; }

/* Step 3 — generate preview */
.how-visual--generate {
  display: grid;
  place-items: center;
}

.how-generate-frame {
  width: 108px;
  padding: 6px 6px 8px;
  border-radius: 12px;
  background: #0b121a;
  border: 1px solid rgba(247, 205, 120, 0.45);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(247, 205, 120, 0.18);
  transform: rotate(6deg) perspective(400px) rotateY(-8deg);
}

.how-generate-frame img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
}

.how-generate-bar {
  display: block;
  margin-top: 6px;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #FFE1A0 0%, #F7CD78 55%, transparent 55%),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 8px rgba(247, 205, 120, 0.35);
}

.how-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid rgba(247, 205, 120, 0.35);
  background:
    linear-gradient(90deg, rgba(247, 205, 120, 0.1) 0%, rgba(10, 18, 27, 0.55) 50%),
    var(--bg-card);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.how-cta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.how-cta-gift {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.08);
  color: var(--gold-bright);
  box-shadow: 0 0 16px rgba(247, 205, 120, 0.14);
}

.how-cta-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.how-cta-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.how-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.pricing-page-main {
  padding: 28px 0 48px;
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing {
  padding: 20px 0 28px;
}

.pricing-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  text-align: left;
}

.pricing-intro-copy {
  min-width: 0;
}

.pricing-intro-copy .section-sub {
  margin-top: 6px;
}

.billing-toggle {
  display: inline-flex;
  flex-shrink: 0;
  margin-top: 0;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 18, 27, 0.9);
}

.billing-option {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.billing-option.active {
  background: rgba(247, 205, 120, 0.14);
  color: var(--gold-bright);
  border: 1px solid rgba(247, 205, 120, 0.35);
}

.billing-discount {
  color: var(--gold);
  font-weight: 700;
  margin-left: 2px;
}

.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: stretch;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.price-card--popular {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.08), 0 12px 36px rgba(247, 205, 120, 0.08);
  background: linear-gradient(180deg, rgba(247, 205, 120, 0.06) 0%, var(--bg-card) 40%);
}

.price-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--gold-gradient);
  color: #1A1206;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.price-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.price-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold);
  line-height: 1.1;
}

.price-currency {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.price-desc {
  color: var(--text-muted);
  font-size: 12px;
  margin: 8px 0 16px;
}

.price-features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
  flex: 1;
}

.price-features li {
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 12px;
}

.price-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M20 6L9 17L4 12' stroke='%23F7CD78' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.price-card--popular .btn-primary {
  box-shadow: 0 4px 18px rgba(247, 205, 120, 0.28);
}

.promo-panel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(247, 205, 120, 0.35);
  min-height: 360px;
}

.promo-panel-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.promo-panel-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 11, 17, 0.55) 0%, rgba(3, 11, 17, 0.72) 45%, rgba(3, 11, 17, 0.88) 100%);
}

.promo-panel-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
}

.promo-crown {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 205, 120, 0.45);
  background: rgba(10, 18, 27, 0.55);
  margin-bottom: 16px;
}

.promo-panel h3 {
  font-size: 22px;
  font-weight: 750;
  line-height: 1.25;
  margin-bottom: 10px;
}

.promo-panel p {
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.5;
}

.promo-stats {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(247, 205, 120, 0.2);
}

.promo-stats strong {
  display: block;
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.promo-stats span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.3;
}

/* ==========================================================================
   Benefits
   ========================================================================== */

.benefits {
  padding: 8px 0 48px;
}

.benefits-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

.benefit-item + .benefit-item {
  border-left: 1px solid rgba(170, 190, 210, 0.12);
}

.benefit-icon {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 0;
}

.benefit-item h3 {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 3px;
}

.benefit-item p {
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: #040C14;
  padding-top: 48px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr) 1.25fr;
  gap: 28px;
  padding-bottom: 36px;
}

.footer-brand .logo {
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 260px;
  margin-bottom: 16px;
}

.social-links {
  display: flex;
  gap: 8px;
}

.social-links a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: color var(--transition), border-color var(--transition);
}

.social-links a:hover {
  color: var(--gold);
  border-color: rgba(247, 205, 120, 0.4);
}

.footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col li + li { margin-top: 8px; }

.footer-col a {
  color: var(--text-muted);
  font-size: 12.5px;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--text); }

.footer-newsletter {
  min-width: 0;
}

.footer-newsletter h3 {
  color: var(--gold);
}

.footer-newsletter-desc {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 220px;
}

.footer-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 240px;
}

.footer-newsletter-fields {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(247, 205, 120, 0.32);
  background: rgba(3, 11, 17, 0.55);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.footer-newsletter-fields:focus-within {
  border-color: rgba(247, 205, 120, 0.6);
  box-shadow: 0 0 0 3px rgba(247, 205, 120, 0.1);
}

.footer-newsletter-icon {
  flex-shrink: 0;
  color: var(--gold);
  display: grid;
  place-items: center;
  margin-right: 8px;
}

.footer-newsletter-fields input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.footer-newsletter-fields input::placeholder {
  color: var(--text-muted);
}

.footer-newsletter-btn {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  justify-content: center;
}

.newsletter-message {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.newsletter-message:empty {
  display: none;
}

.newsletter-message.is-error {
  color: #f0a0a0;
}

.newsletter-message.is-ok {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(170, 190, 210, 0.12);
}

.footer-bottom-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 12px;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text-muted);
  font-size: 12px;
}

.footer-bottom-links a:hover { color: var(--text); }

.lang-btn--footer {
  height: auto;
  padding: 6px 10px;
  gap: 6px;
}

.lang-switch--footer .lang-menu {
  right: 0;
  left: auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1199px) {
  .container { width: min(100% - 40px, var(--container)); }
  .register-shell { width: min(100% - 40px, var(--container)); }

  .nav-desktop { gap: 0; }
  .nav-link { padding: 8px 7px; font-size: 12.5px; }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-track {
    --gallery-cols: 4;
  }

  .how-steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .how-step-arrow {
    display: none;
  }

  .how-step {
    grid-template-columns: minmax(0, 1.15fr) minmax(100px, 0.85fr);
  }

  .how-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .pricing-layout {
    grid-template-columns: 1fr;
  }

  .promo-panel {
    min-height: 240px;
  }

  .promo-panel-content {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
  }

  .promo-panel h3,
  .promo-panel p {
    flex: 1 1 240px;
  }

  .promo-stats {
    width: 100%;
  }

  .benefits-row {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 18px;
  }

  .benefit-item:nth-child(4),
  .benefit-item:nth-child(5) {
    border-left: none;
  }

  .footer-main {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .hero-inner {
    padding: 36px 0;
  }

  .hero-script {
    right: 24px;
    bottom: 20px;
    top: auto;
    font-size: 24px;
  }

  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 900px) {
  .nav-desktop,
  .header-actions .btn-outline,
  .header-actions .btn-primary {
    display: none;
  }

  .menu-toggle { display: flex; }

  .gallery-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-tabs {
    justify-content: flex-start;
    margin-left: 0;
  }

  .gallery-track {
    --gallery-cols: 2;
    grid-auto-columns: 170px;
  }

  .benefits-row {
    grid-template-columns: 1fr 1fr;
  }

  .benefit-item + .benefit-item {
    border-left: none;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1023px) {
  :root { --sidebar-w: 220px; }

  .models-layout {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-h);
    z-index: 200;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    z-index: 190;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open .sidebar-backdrop[hidden] {
    display: block;
  }
}

@media (max-width: 767px) {
  :root { --header-h: 60px; }

  .container { width: min(100% - 28px, var(--container)); }
  .register-shell { width: min(100% - 28px, var(--container)); }

  .hero,
  .hero-inner {
    min-height: 320px;
  }

  .hero-bg img {
    object-position: 75% 30%;
  }

  .hero-inner {
    padding: 28px 0;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-script {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    height: 138px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-title {
    white-space: normal;
    font-size: 24px;
  }

  .gallery-desc {
    white-space: normal;
  }

  .section-head h2,
  .pricing-intro h2,
  .how-intro-copy h2 {
    font-size: 24px;
  }

  .how-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .how-step {
    grid-template-columns: 1fr;
  }

  .how-visual {
    min-height: 100px;
    justify-self: center;
  }

  .how-visual--models {
    width: min(100%, 180px);
    margin-inline: auto;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-inline: auto;
  }

  .footer-newsletter-form {
    max-width: 320px;
  }

  .pricing-intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .benefits-row {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn { width: 100%; }

  .header-actions .icon-btn { display: none; }
}

/* ==========================================================================
   Models page
   ========================================================================== */

.models-page {
  padding: 20px 20px 0;
  min-height: 60vh;
}

.models-intro {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 148px;
  margin-bottom: 18px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: var(--bg);
}

.models-intro-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 6%, #000 96%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 6%, #000 96%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.models-intro-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
  display: block;
}

.models-intro-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(3, 11, 17, 0.92) 0%,
      rgba(3, 11, 17, 0.55) 38%,
      rgba(3, 11, 17, 0.12) 62%,
      transparent 100%
    ),
    linear-gradient(
      180deg,
      rgba(3, 11, 17, 0.35) 0%,
      transparent 22%,
      transparent 78%,
      rgba(3, 11, 17, 0.45) 100%
    );
}

.models-intro-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 22px 24px 22px 0;
}

.models-intro-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}

.models-intro-copy p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(245, 246, 248, 0.86);
}

.models-tabs-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 80;
  margin: 0 0 16px;
  margin-left: calc(-1 * var(--sidebar-gap));
  width: calc(100% + var(--sidebar-gap));
  padding: 16px 0 18px var(--sidebar-gap);
  box-sizing: border-box;
  background: var(--bg);
}

.models-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(22, 30, 40, 0.98) 0%, rgba(7, 12, 18, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 28px rgba(0, 0, 0, 0.28);
}

.models-tab {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 8px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #9AA6B4;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.015em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}

.models-tab + .models-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.models-tab.active + .models-tab::before,
.models-tab:has(+ .models-tab.active)::before {
  opacity: 0;
}

.models-tab svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.72;
  transition: opacity 0.22s ease, color 0.22s ease;
}

.models-tab:hover {
  color: #E8EEF5;
  background: rgba(255, 255, 255, 0.035);
}

.models-tab:hover svg {
  opacity: 1;
  color: var(--gold-bright);
}

.models-tab.active {
  color: #1A1206;
  background: linear-gradient(180deg, #FFE4A8 0%, #F7CD78 48%, #E4B45A 100%);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  z-index: 1;
}

.models-tab.active::before {
  display: none;
}

.models-tab.active svg {
  opacity: 1;
  color: #1A1206;
}

.models-tab:focus-visible {
  outline: 2px solid rgba(247, 205, 120, 0.55);
  outline-offset: -2px;
}

.models-section {
  margin-bottom: 40px;
}

.models-section:last-of-type {
  margin-bottom: 0;
}

.models-section.is-hidden {
  display: none;
}

.models-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.models-section-copy {
  --section-icon-size: calc(clamp(20px, 2.2vw, 26px) * 1.15 + 2px + 13px * 1.3);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.models-section-icon {
  width: var(--section-icon-size);
  height: var(--section-icon-size);
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(247, 205, 120, 0.08);
  border: 1px solid rgba(247, 205, 120, 0.35);
  box-sizing: border-box;
}

.models-section-copy > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.models-section-copy h2 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.models-section-copy p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.3;
  margin: 2px 0 0;
  max-width: 520px;
}

.models-section-link {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 8px;
}

.models-section-link:hover {
  color: var(--gold-bright);
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.model-card {
  position: relative;
  display: block;
  border-radius: 14px;
  background: #0C141E;
  border: 1px solid rgba(170, 190, 210, 0.14);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.model-card:hover {
  border-color: rgba(247, 205, 120, 0.32);
}

.model-card--glow-blue {
  border-color: rgba(77, 124, 254, 0.7);
  box-shadow: 0 0 0 1px rgba(77, 124, 254, 0.25), 0 0 28px rgba(77, 124, 254, 0.22);
}

.model-card--glow-gold {
  border-color: rgba(247, 205, 120, 0.7);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.22), 0 0 28px rgba(247, 205, 120, 0.18);
}

.model-card-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
  z-index: 0;
  pointer-events: none;
}

.model-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.model-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #0C141E 0%,
    rgba(12, 20, 30, 0.95) 22%,
    rgba(12, 20, 30, 0.55) 48%,
    rgba(12, 20, 30, 0.15) 72%,
    transparent 100%
  );
}

.model-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 14px 12px 44px 14px;
  min-height: 168px;
}

.model-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
  min-height: 30px;
}

.model-card-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.model-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--gold-gradient);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.model-logo svg { display: block; }

.model-logo--gpt { background: linear-gradient(145deg, #6E59F5, #4D7CFE); }
.model-logo--claude { background: linear-gradient(145deg, #F4C4A0, #D97757); color: #3B1F14; }
.model-logo--gemini { background: linear-gradient(135deg, #6EA8FE, #A78BFA, #F472B6); }
.model-logo--llama { background: linear-gradient(145deg, #74C0FC, #339AF0); }
.model-logo--flux { background: linear-gradient(180deg, #F8F9FA, #DEE2E6); color: #1A1206; }
.model-logo--dalle { background: linear-gradient(180deg, #74C0FC, #339AF0); }
.model-logo--mj { background: linear-gradient(180deg, #1A1206, #343A40); color: #FFE1A0; font-size: 11px; }
.model-logo--sd { background: linear-gradient(180deg, #845EF7, #5F3DC4); font-size: 11px; }
.model-logo--kling { background: linear-gradient(180deg, #212529, #495057); color: #F7CD78; }
.model-logo--wan { background: linear-gradient(180deg, #15AABF, #0B7285); }
.model-logo--runway { background: linear-gradient(180deg, #F8F9FA, #ADB5BD); color: #1A1206; }
.model-logo--luma { background: linear-gradient(180deg, #9775FA, #7048E8); }
.model-logo--eleven { background: linear-gradient(180deg, #212529, #000); color: #F7CD78; font-size: 11px; }
.model-logo--suno { background: linear-gradient(180deg, #FF6B6B, #FA5252); }
.model-logo--stable-audio { background: linear-gradient(180deg, #20C997, #0CA678); font-size: 10px; }
.model-logo--playht { background: linear-gradient(180deg, #339AF0, #1C7ED6); }
.model-logo--meshy { background: linear-gradient(145deg, #F7CD78, #E8A838); color: #1A1206; }
.model-logo--tripo { background: linear-gradient(145deg, #63E6BE, #20C997); color: #062A1F; }
.model-logo--rodin { background: linear-gradient(145deg, #9775FA, #5F3DC4); }
.model-logo--luma3d { background: linear-gradient(145deg, #74C0FC, #4C6EF5); }

.model-badge {
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #F7CD78;
  color: #1A1206;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.model-card-heading h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
}

.model-card-body > p {
  color: #E8ECF0;
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 10px;
  max-width: none;
  width: 100%;
  padding-right: 0;
  box-sizing: border-box;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 0;
  width: 100%;
  max-width: none;
}

.model-tags span {
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #C5CDD6;
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
}

.model-card-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 11px 14px;
}

.model-price {
  color: #F7CD78;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.model-cta {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(247, 205, 120, 0.65);
  color: #F7CD78;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: transparent;
  transition: background var(--transition), color var(--transition);
}

.model-cta:hover {
  background: rgba(247, 205, 120, 0.1);
  color: #FFE1A0;
}

@media (max-width: 1199px) {
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .models-tab {
    font-size: 12px;
    gap: 6px;
    padding: 0 6px;
  }
}

@media (max-width: 767px) {
  .models-grid {
    grid-template-columns: 1fr;
  }

  .models-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .models-tabs-bar {
    margin-left: 0;
    width: 100%;
    padding: 12px 0;
  }

  .models-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
  }

  .models-tabs::-webkit-scrollbar {
    display: none;
  }

  .models-tab {
    flex: 1 0 auto;
    width: auto;
    min-width: 112px;
    height: 42px;
    font-size: 12px;
  }

  .models-tab + .models-tab::before {
    display: none;
  }

  .model-card-media {
    width: 46%;
  }

  .model-card-body {
    padding-bottom: 44px;
  }

  .model-card-foot {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Register page
   ========================================================================== */

html:has(body.register-page) {
  height: 100%;
  overflow: hidden;
  scrollbar-gutter: stable;
}

.register-page {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 55% 45% at 70% 40%, rgba(247, 205, 120, 0.05), transparent 60%),
    radial-gradient(ellipse 40% 35% at 12% 70%, rgba(247, 205, 120, 0.04), transparent 55%),
    var(--bg);
}

.register-page .site-header {
  flex-shrink: 0;
}

.register-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  overflow: hidden;
}

.register-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  gap: 24px 28px;
  align-items: stretch;
  /* Width comes from .container (same responsive gutters as home) */
  flex: 0 0 auto;
  box-sizing: border-box;
  /* Keep promo/image height stable (register card height) on shorter login form */
  min-height: 608px;
}

.register-promo {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  overflow: hidden;
}

.login-page .register-form-col {
  align-self: stretch;
  align-items: center;
}

.register-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 0 22px 22px 0;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, transparent 12%, rgba(0, 0, 0, 0.35) 32%, #000 52%, #000 88%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, transparent 12%, rgba(0, 0, 0, 0.35) 32%, #000 52%, #000 88%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.register-visual::after {
  display: none;
}

.register-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  border-radius: inherit;
}

.register-promo-copy {
  position: relative;
  z-index: 2;
  max-width: 420px;
}

.register-kicker {
  margin: 0 0 10px;
  color: #F7CD78;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.register-promo h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  max-width: 15ch;
}

.register-title-accent {
  display: block;
  color: #F7CD78;
}

.register-lead {
  margin: 0 0 18px;
  color: rgba(232, 236, 242, 0.88);
  font-size: 14px;
  line-height: 1.45;
  max-width: 36ch;
}

.register-benefits {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
}

.register-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
}

.register-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(247, 205, 120, 0.1);
  border: 1.5px solid #F7CD78;
  color: #F7CD78;
  box-shadow: 0 0 12px rgba(247, 205, 120, 0.18);
  line-height: 0;
}

.register-check svg {
  display: block;
  width: 12px;
  height: 12px;
}

.register-collage {
  display: none;
}

.register-collage-item {
  position: absolute;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(247, 205, 120, 0.65);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(247, 205, 120, 0.12);
  background: #0A121B;
}

.register-collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.register-collage-item--1 {
  width: 168px;
  height: 218px;
  left: -8px;
  top: 28px;
  transform: rotate(-9deg);
  z-index: 2;
}

.register-collage-item--2 {
  width: 156px;
  height: 194px;
  left: 32%;
  top: -4px;
  transform: rotate(6deg);
  z-index: 3;
}

.register-collage-item--3 {
  width: 188px;
  height: 124px;
  left: 12%;
  bottom: 20px;
  transform: rotate(-3deg);
  z-index: 4;
}

.register-collage-item--4 {
  width: 128px;
  height: 128px;
  right: 0;
  top: 40px;
  transform: rotate(11deg);
  z-index: 2;
}

.register-collage-item--5 {
  width: 148px;
  height: 184px;
  right: -10px;
  bottom: 0;
  transform: rotate(-7deg);
  z-index: 3;
}

.register-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.register-play::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 11px;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #fff;
}

.register-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px 0 0;
  max-width: 560px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.register-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.register-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(10, 16, 24, 0.9);
  border: 1.5px solid #F7CD78;
  color: #F7CD78;
  box-shadow: 0 0 10px rgba(247, 205, 120, 0.15);
  line-height: 0;
}

.register-stat-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.register-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 750;
  color: #fff;
  line-height: 1.15;
}

.register-stat span {
  display: block;
  font-size: 11.5px;
  color: #AEB8C5;
  line-height: 1.25;
}

.register-quote {
  margin: 0;
  max-width: 420px;
}

.register-stars {
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 6px;
}

.register-quote p {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
  font-style: italic;
}

.register-quote footer {
  color: var(--text-muted);
  font-size: 12.5px;
  font-style: normal;
}

.register-form-col {
  position: relative;
  top: auto;
  display: flex;
  align-items: center;
}

.register-card {
  padding: 20px 22px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 24, 34, 0.98) 0%, rgba(8, 14, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.register-card h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #fff;
}

.register-card-lead {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.register-method {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.register-method-btn {
  height: 40px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.register-method-btn:hover {
  color: var(--text);
}

.register-method-btn.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.register-form {
  display: grid;
  gap: 10px;
}

.register-field.is-hidden {
  display: none;
}

.register-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.register-input {
  position: relative;
  display: flex;
  align-items: center;
}

.register-input > svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.register-input input {
  width: 100%;
  height: 40px;
  padding: 0 42px 0 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 10, 16, 0.65);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.register-input input::placeholder {
  color: #6B7785;
}

.register-input input:focus {
  border-color: rgba(247, 205, 120, 0.55);
  box-shadow: 0 0 0 3px rgba(247, 205, 120, 0.12);
}

.register-eye {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border-radius: 8px;
}

.register-eye:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.register-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
}

.register-terms input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.register-terms a {
  color: var(--gold);
  font-weight: 600;
}

.register-terms a:hover {
  color: var(--gold-bright);
}

.register-submit {
  width: 100%;
  height: 42px;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  margin-top: 2px;
}

.register-form-msg {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  min-height: 0;
}

.register-form-msg.is-error {
  color: #FF8E8E;
}

.register-form-msg.is-ok {
  color: #8FE3A8;
}

.register-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.register-divider::before,
.register-divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.register-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.register-social-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 10, 16, 0.4);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}

.register-social-btn:hover {
  border-color: rgba(247, 205, 120, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.register-login-link {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.register-login-link a {
  color: var(--gold);
  font-weight: 650;
}

.register-login-link a:hover {
  color: var(--gold-bright);
}

.register-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.register-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.register-trust-item span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 16, 24, 0.9);
  border: 1.5px solid #F7CD78;
  color: #F7CD78;
  line-height: 0;
  box-shadow: 0 0 10px rgba(247, 205, 120, 0.12);
}

.register-trust-item span svg {
  display: block;
}

@media (max-width: 1100px) {
  .register-promo {
    min-height: 280px;
    padding: 20px 0;
  }

  .register-promo-copy {
    max-width: none;
  }

  .register-promo h1 {
    max-width: none;
  }

  .register-stats {
    max-width: none;
  }
}

@media (max-width: 1024px) {
  html:has(body.register-page) {
    height: auto;
    overflow: auto;
  }

  .register-page {
    height: auto;
    max-height: none;
    overflow: auto;
  }

  .register-main {
    align-items: flex-start;
    overflow: visible;
    padding: 20px 0 40px;
  }

  .register-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }

  .register-form-col {
    position: static;
    order: -1;
  }

  .register-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .register-main {
    padding: 16px 0 36px;
  }

  .register-card {
    padding: 20px 16px 18px;
  }

  .register-collage {
    height: 220px;
    max-width: none;
  }

  .register-collage-item--1 { width: 110px; height: 140px; }
  .register-collage-item--2 { width: 100px; height: 125px; }
  .register-collage-item--3 { width: 130px; height: 86px; }
  .register-collage-item--4 { width: 84px; height: 84px; }
  .register-collage-item--5 { width: 96px; height: 120px; }

  .register-social {
    grid-template-columns: 1fr;
  }

  .register-trust {
    gap: 8px;
  }
}


/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-page {
  padding-bottom: 72px;
}

.contact-hero {
  position: relative;
  padding: 36px 0 28px;
  overflow: hidden;
  background: #030B11;
}

.contact-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 50%, transparent 100%);
}

.contact-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 11, 17, 0.88) 0%, rgba(3, 11, 17, 0.62) 42%, rgba(3, 11, 17, 0.28) 72%, rgba(3, 11, 17, 0.5) 100%),
    linear-gradient(180deg, rgba(3, 11, 17, 0.15) 0%, transparent 30%, transparent 48%, rgba(3, 11, 17, 0.7) 78%, var(--bg) 100%);
  -webkit-mask-image: none;
  mask-image: none;
}

.contact-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 36px 48px;
  align-items: center;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(247, 205, 120, 0.45);
  background: rgba(247, 205, 120, 0.08);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.contact-hero-copy > p {
  margin: 0 0 28px;
  max-width: 500px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.contact-hero-points {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  max-width: none;
}

.contact-hero-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.contact-point-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold);
  border: 1px solid rgba(247, 205, 120, 0.4);
  background: rgba(8, 14, 22, 0.7);
}

.contact-hero-points li > div {
  min-width: 0;
}

.contact-hero-points strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.2;
  white-space: nowrap;
}

.contact-hero-points span:not(.contact-point-icon) {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.25;
  white-space: nowrap;
}

.contact-hero-visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 280px;
  justify-self: end;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.contact-hero-img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  transform: scale(1.35);
  transform-origin: center center;
  animation: contact-hero-in 0.8s ease both;
}

@keyframes contact-hero-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.contact-body {
  padding-top: 4px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr);
  gap: 18px;
  align-items: start;
}

.contact-form-panel,
.contact-aside-card,
.contact-info-block {
  background: #0A121B;
  border: 1px solid rgba(170, 190, 210, 0.14);
  border-radius: 14px;
}

.contact-form-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 18px;
  box-sizing: border-box;
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.contact-aside-card {
  padding: 18px;
}

.contact-panel-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.contact-aside-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.contact-aside-head h2,
.contact-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.contact-panel-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.contact-panel-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold);
  border: 1px solid rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.08);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.contact-form > .contact-field:has(textarea),
.contact-form > .contact-field:has(.contact-textarea-wrap) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-field label,
.contact-label-text {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.contact-field .req {
  color: var(--gold);
}

.contact-optional {
  font-weight: 500;
  color: var(--text-muted);
}

.contact-field input,
.contact-field textarea,
.contact-field select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(3, 11, 17, 0.65);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-field input,
.contact-field select {
  height: 46px;
  padding: 0 14px;
}

.contact-textarea-wrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.contact-field textarea {
  padding: 12px 14px 28px;
  resize: none;
  flex: 1;
  min-height: 96px;
  line-height: 1.5;
}

.contact-field input:focus,
.contact-field textarea:focus,
.contact-field select:focus {
  border-color: rgba(247, 205, 120, 0.55);
  box-shadow: 0 0 0 3px rgba(247, 205, 120, 0.1);
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--text-muted);
}

.contact-select-wrap {
  position: relative;
}

.contact-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.contact-field select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.contact-field select option {
  background: #0A121B;
  color: var(--text);
}

.contact-charcount {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

.contact-field label.contact-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(247, 205, 120, 0.38);
  background: rgba(3, 11, 17, 0.4);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.contact-form-panel .contact-submit,
.contact-form-panel .contact-row,
.contact-form-panel > .contact-form > .contact-field:not(:has(textarea)):not(:has(.contact-textarea-wrap)) {
  flex-shrink: 0;
}

.contact-field label.contact-upload:hover,
.contact-field label.contact-upload.is-dragover {
  border-color: rgba(247, 205, 120, 0.65);
  background: rgba(247, 205, 120, 0.06);
}

.contact-upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(247, 205, 120, 0.08);
  border: 1px solid rgba(247, 205, 120, 0.3);
  flex-shrink: 0;
}

.contact-upload-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-upload-text strong {
  font-size: 13px;
  font-weight: 600;
}

.contact-upload-text small {
  font-size: 12px;
  color: var(--text-muted);
}

.contact-upload-name {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--gold);
}

.contact-submit {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
  gap: 10px;
  height: 48px;
  font-weight: 700;
}

.contact-form-msg {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.contact-form-msg:empty { display: none; }
.contact-form-msg.is-error { color: #f0a0a0; }
.contact-form-msg.is-ok { color: var(--gold); }

.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.contact-channel {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(3, 11, 17, 0.55);
  min-width: 0;
}

.contact-channel-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold);
  border: 1px solid rgba(247, 205, 120, 0.35);
  background: rgba(247, 205, 120, 0.08);
}

.contact-channel-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}

.contact-channel h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.contact-channel-top .contact-status {
  margin-left: auto;
}

.contact-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(72, 187, 120, 0.14);
  color: #6ee7a0;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.contact-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48bb78;
  box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.2);
}

.contact-channel p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
  word-break: break-word;
}

.contact-mail {
  color: var(--gold) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-channel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  margin-top: auto;
  border-radius: 8px;
  border: 1px solid rgba(247, 205, 120, 0.55);
  background: rgba(3, 11, 17, 0.65);
  color: var(--gold);
  font-size: 12px;
  font-weight: 650;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.contact-channel-btn:hover {
  background: rgba(247, 205, 120, 0.1);
  border-color: rgba(247, 205, 120, 0.85);
  color: var(--gold-bright);
}

.contact-channel-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--gold);
  transition: color var(--transition);
}

.contact-channel-link:hover {
  color: var(--gold-bright);
}

.contact-mid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-info-block {
  padding: 16px;
  min-width: 0;
}

.contact-info-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.contact-info-head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
}

.contact-mini-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold);
  border: 1px solid rgba(247, 205, 120, 0.35);
  background: rgba(247, 205, 120, 0.08);
}

.contact-schedule {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-schedule li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.contact-schedule strong {
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}

.contact-response-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.contact-address {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.contact-map {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  background: #081018;
}

.contact-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-useful-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.contact-useful-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(3, 11, 17, 0.45);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.contact-useful-links a span:last-child {
  color: var(--gold);
  flex-shrink: 0;
}

.contact-useful-links a:hover {
  color: var(--text);
  border-color: rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.06);
}

@media (max-width: 1024px) {
  .contact-hero-inner,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-hero-visual {
    min-height: 0;
    order: -1;
  }

  .contact-hero-visual {
    justify-self: center;
    height: 260px;
    max-width: 420px;
  }

  .contact-hero-img {
    transform: scale(1.3);
  }

  .contact-channels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-mid-row {
    grid-template-columns: 1fr 1fr;
  }

  .contact-useful-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .contact-hero {
    padding: 20px 0 16px;
  }

  .contact-hero-points {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 12px;
  }

  .contact-row,
  .contact-channels,
  .contact-mid-row,
  .contact-useful-links {
    grid-template-columns: 1fr;
  }

  .contact-form-panel,
  .contact-aside-card,
  .contact-info-block {
    padding: 16px;
  }

  .contact-hero-visual {
    height: 220px;
    max-width: 340px;
  }

  .contact-hero-img {
    transform: scale(1.28);
  }
}

/* ==========================================================================
   Pricing page (preturi)
   ========================================================================== */

.pp-page {
  padding-bottom: 72px;
  overflow: hidden;
}

.pp-hero {
  position: relative;
  padding: 40px 0 28px;
}

.pp-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pp-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 20%;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}

.pp-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 11, 17, 0.92) 0%, rgba(3, 11, 17, 0.7) 48%, rgba(3, 11, 17, 0.35) 100%),
    linear-gradient(180deg, rgba(3, 11, 17, 0.2) 0%, transparent 40%, var(--bg) 100%);
}

.pp-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.15fr);
  gap: 28px 28px;
  align-items: center;
}

.pp-hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  max-width: 16ch;
}

.pp-hero-copy > p {
  margin: 0 0 24px;
  max-width: 480px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.pp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.pp-trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.pp-trust-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.08);
  flex-shrink: 0;
}

.pp-showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 720px;
  margin-inline: auto;
  width: 100%;
}

.pp-showcase-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.pp-plans {
  padding: 12px 0 40px;
}

.pp-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.pp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #0A121B;
  min-width: 0;
}

.pp-card--popular {
  border-color: rgba(247, 205, 120, 0.7);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.25), 0 16px 40px rgba(0, 0, 0, 0.35);
}

.pp-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-gradient);
  color: #111;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.pp-card-top h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.pp-card-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

.pp-price {
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.pp-price strong {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.pp-price span {
  color: var(--text-muted);
}

.pp-features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 18px;
  flex: 1;
}

.pp-features li {
  position: relative;
  padding-left: 22px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.pp-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
}

.pp-card .btn-block {
  margin-top: auto;
}

.pp-card--custom {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(247, 205, 120, 0.1), transparent 60%),
    #0A121B;
}

.pp-custom-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.08);
}

.pp-card--custom h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.pp-card--custom > p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.pp-custom-points {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pp-custom-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.pp-custom-points span {
  color: var(--gold);
  display: grid;
  place-items: center;
}

.pp-bottom {
  padding-top: 8px;
}

.pp-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.pp-compare,
.pp-credits {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #0A121B;
  padding: 22px;
}

.pp-compare h2,
.pp-credits h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pp-credits > p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.pp-table-wrap {
  overflow-x: auto;
}

.pp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 12.5px;
}

.pp-table th,
.pp-table td {
  padding: 11px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(170, 190, 210, 0.1);
}

.pp-table thead th {
  color: var(--text-muted);
  font-weight: 650;
  font-size: 12px;
}

.pp-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
}

.pp-table tbody tr:nth-child(odd) td,
.pp-table tbody tr:nth-child(odd) th {
  background: rgba(255, 255, 255, 0.015);
}

.pp-table .is-pro {
  background: rgba(247, 205, 120, 0.06);
  color: var(--text);
}

.pp-table thead th.is-pro {
  color: var(--gold);
}

.pp-check {
  color: var(--gold);
  font-weight: 800;
}

.pp-x {
  color: #f07178;
  font-weight: 700;
  opacity: 0.85;
}

.pp-credit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pp-credit-list li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(3, 11, 17, 0.45);
}

.pp-coin {
  color: var(--gold);
  display: grid;
  place-items: center;
}

.pp-credit-list strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.pp-mini-badge {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(247, 205, 120, 0.15);
  color: var(--gold);
  font-size: 10px;
  font-weight: 750;
}

.pp-credit-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .pp-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pp-card--custom {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .pp-hero-inner,
  .pp-bottom-grid {
    grid-template-columns: 1fr;
  }

  .pp-showcase {
    max-width: 600px;
  }

  .pp-showcase-img {
    max-height: 420px;
  }
}

@media (max-width: 760px) {
  .pp-cards {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .pp-card--custom {
    grid-column: auto;
  }

  .pp-hero-copy h1 {
    max-width: none;
  }

  .pp-credit-list li {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "coin title"
      "coin price"
      "btn btn";
  }

  .pp-credit-list .pp-coin { grid-area: coin; }
  .pp-credit-list div { grid-area: title; }
  .pp-credit-price { grid-area: price; }
  .pp-credit-list .btn { grid-area: btn; width: 100%; }
}

/* Auth flash + header account */
.auth-flash {
  margin: 12px auto 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(247, 205, 120, 0.35);
  background: rgba(247, 205, 120, 0.1);
  color: #f7cd78;
  font-size: 14px;
  font-weight: 500;
}

.register-input.is-invalid {
  border-color: rgba(240, 120, 120, 0.7);
}

.register-social-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Premium user account dropdown */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(247, 205, 120, 0.28);
  background: linear-gradient(180deg, rgba(247, 205, 120, 0.1), rgba(247, 205, 120, 0.03));
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.user-menu-btn:hover,
.user-menu.is-open .user-menu-btn {
  border-color: rgba(247, 205, 120, 0.55);
  background: linear-gradient(180deg, rgba(247, 205, 120, 0.16), rgba(247, 205, 120, 0.05));
  box-shadow: 0 0 22px rgba(247, 205, 120, 0.12);
}

.user-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1a1408;
  background: linear-gradient(145deg, #ffe1a0, #f7cd78 55%, #d4a84b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.user-menu-avatar--lg {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.user-menu-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.user-menu-chevron {
  color: var(--text-secondary);
  transition: transform var(--transition), color var(--transition);
}

.user-menu.is-open .user-menu-chevron {
  transform: rotate(180deg);
  color: var(--gold);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, calc(100vw - 24px));
  padding: 10px;
  background:
    linear-gradient(165deg, rgba(22, 32, 44, 0.99) 0%, rgba(10, 15, 22, 0.99) 100%);
  border: 1px solid rgba(247, 205, 120, 0.3);
  border-radius: 16px;
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 32px rgba(247, 205, 120, 0.1);
  backdrop-filter: blur(14px);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.user-menu.is-open .user-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.user-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
}

.user-menu-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-menu-meta strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-meta span {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(247, 205, 120, 0.22);
  background:
    linear-gradient(135deg, rgba(247, 205, 120, 0.12), rgba(247, 205, 120, 0.03));
}

.user-menu-credits-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(247, 205, 120, 0.9);
}

.user-menu-credits strong {
  font-size: 15px;
  font-weight: 800;
  color: #f7cd78;
  letter-spacing: -0.02em;
}

.user-menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px;
}

.user-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 550;
  transition: background var(--transition), color var(--transition);
}

.user-menu-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.user-menu-link--gold {
  color: #f7cd78;
}

.user-menu-link--gold:hover {
  background: rgba(247, 205, 120, 0.08);
  color: #ffe1a0;
}

.user-menu-link svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.user-menu-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
  margin-top: 2px;
}

.user-menu-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: #f0a0a0;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.user-menu-logout:hover {
  background: rgba(240, 120, 120, 0.1);
  color: #ffb4b4;
}

@media (max-width: 760px) {
  .user-menu-name {
    display: none;
  }

  .user-menu-btn {
    padding: 0 8px 0 6px;
  }
}

/* Dashboard — coded UI matching mockup */
.dash-page {
  --dash-gold: #f7cd78;
  --dash-gold-hot: #ffd28a;
  --dash-card: #10141c;
  --dash-border: rgba(255, 255, 255, 0.08);
  --dash-muted: rgba(255, 255, 255, 0.55);
  padding: 18px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hero */
.dash-hero {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  min-height: 168px;
  border: 0;
  box-shadow: none;
}

.dash-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.dash-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.88) 8%, transparent 22%, transparent 78%, rgba(5, 10, 16, 0.75) 92%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 22%, transparent 78%, #050A10 100%),
    linear-gradient(90deg, rgba(5, 10, 16, 0.72) 0%, rgba(5, 10, 16, 0.35) 36%, rgba(5, 10, 16, 0.12) 58%, rgba(5, 10, 16, 0.45) 100%);
  pointer-events: none;
}

.dash-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 168px;
  padding: 28px 32px;
}

.dash-hero-copy {
  max-width: 440px;
}

.dash-hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #fff;
}

.dash-hero-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 40ch;
}

.dash-hero-script {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--font-script, "Caveat", cursive);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  text-align: right;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.dash-hero-script span:first-child { color: #fff; }

/* Overview */
.dash-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.dash-card {
  border-radius: 14px;
  border: 1px solid var(--dash-border);
  background: var(--dash-card);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.dash-badge-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(247, 205, 120, 0.1);
  border: 1px solid rgba(247, 205, 120, 0.28);
  flex-shrink: 0;
}

.dash-card-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.dash-big {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  line-height: 1;
  cursor: help;
  padding: 0;
  display: grid;
  place-items: center;
}

.dash-sub {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--dash-muted);
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  margin-top: auto;
}

.dash-btn--gold {
  background: linear-gradient(180deg, #ffe1a0, var(--dash-gold));
  color: #1a1408;
  border: 0;
}

.dash-btn--gold:hover { filter: brightness(1.05); }

.dash-btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.dash-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.03);
}

.dash-btn--sm {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  width: auto;
  align-self: flex-start;
  margin-top: 4px;
}

.dash-credits .dash-btn,
.dash-plan .dash-btn {
  width: 100%;
}

.dash-usage-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  flex: 1;
}

.dash-ring {
  --pct: 0;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle closest-side, var(--dash-card) 68%, transparent 69%),
    conic-gradient(var(--dash-gold) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.1) 0);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.dash-usage-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.dash-usage-meta strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.dash-usage-meta > span {
  font-size: 11px;
  color: var(--dash-muted);
}

.dash-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 4px;
}

.dash-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dash-gold), #ffe1a0);
}

/* Recent + lower */
.dash-recent { margin-top: 8px; }

.dash-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dash-recent-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 750;
}

.dash-recent-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.dash-see-all {
  font-size: 13px;
  font-weight: 650;
  color: var(--dash-gold);
}

.dash-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  margin-left: auto;
}

.dash-filter {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.dash-filter.active {
  color: #1a1408;
  background: var(--dash-gold);
  border-color: var(--dash-gold);
}

.dash-gens {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.dash-gen {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--dash-border);
  background: var(--dash-card);
  min-width: 0;
}

.dash-gen.is-hidden { display: none; }

.dash-gen-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.dash-gen-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-gen-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  color: #fff;
}

.dash-gen-badge--imagine { background: rgba(37, 99, 235, 0.92); }
.dash-gen-badge--video { background: rgba(124, 58, 237, 0.92); }
.dash-gen-badge--sunet { background: rgba(219, 39, 119, 0.92); }
.dash-gen-badge--chat { background: rgba(22, 163, 74, 0.92); }

.dash-gen-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 12px;
}

.dash-gen-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 10px;
}

.dash-gen-meta strong {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-gen-meta span {
  font-size: 11px;
  color: var(--text-secondary);
}

.dash-gen-more {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 0 2px;
}

@media (max-width: 1280px) {
  .dash-gens { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .dash-overview { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dash-hero-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
  }
  .dash-hero-script { align-items: flex-start; text-align: left; }
}

@media (max-width: 640px) {
  .dash-overview { grid-template-columns: 1fr; }
  .dash-gens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Profile page */
.prof-page {
  --prof-gold: #f7cd78;
  --prof-card: #10141c;
  --prof-border: rgba(255, 255, 255, 0.08);
  --prof-muted: rgba(255, 255, 255, 0.55);
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prof-banner {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  min-height: 220px;
  border: 0;
  box-shadow: none;
  background: #050A10;
}

.prof-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.prof-banner-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.82) 10%, transparent 28%, transparent 72%, rgba(5, 10, 16, 0.7) 90%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 24%, transparent 76%, #050A10 100%),
    linear-gradient(90deg, rgba(5, 10, 16, 0.72) 0%, rgba(5, 10, 16, 0.35) 36%, rgba(5, 10, 16, 0.12) 58%, rgba(5, 10, 16, 0.45) 100%);
  pointer-events: none;
}

.prof-banner-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 220px;
  padding: 28px 8px 24px;
}

.prof-identity {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  min-width: 0;
}

.prof-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.prof-avatar {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--prof-gold);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  background: #1a2030;
}

.prof-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prof-avatar-cam {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 205, 120, 0.55);
  background: #121820;
  color: var(--prof-gold);
  cursor: pointer;
}

.prof-identity-meta { min-width: 0; }

.prof-name {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.prof-edit-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.prof-email {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.prof-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #1a1408;
  background: linear-gradient(180deg, #ffe1a0, var(--prof-gold));
}

.prof-meta-row {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.prof-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prof-meta-row svg { color: var(--prof-gold); opacity: 0.9; }

.prof-quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  font-family: var(--font-script);
  font-style: normal;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.92);
  text-align: right;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.prof-banner-edit {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 18, 0.72);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.prof-banner-edit:hover {
  border-color: rgba(247, 205, 120, 0.45);
  color: #fff;
}

.prof-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.prof-stat {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--prof-border);
  background: var(--prof-card);
  color: #fff;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.prof-stat:hover {
  border-color: rgba(247, 205, 120, 0.35);
  transform: translateY(-1px);
}

.prof-stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--prof-gold);
  background: rgba(247, 205, 120, 0.1);
  border: 1px solid rgba(247, 205, 120, 0.28);
}

.prof-stat-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.prof-stat-txt strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.prof-stat-txt em {
  font-style: normal;
  font-size: 12px;
  color: var(--prof-muted);
}

.prof-stat-chev {
  color: rgba(255, 255, 255, 0.28);
  font-size: 20px;
  line-height: 1;
}

.prof-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prof-tab {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.prof-tab:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }

.prof-tab.is-active {
  color: var(--prof-gold);
  border-color: rgba(247, 205, 120, 0.75);
  background: rgba(247, 205, 120, 0.08);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.12);
}

.prof-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.prof-main,
.prof-card {
  border-radius: 14px;
  border: 1px solid var(--prof-border);
  background: var(--prof-card);
}

.prof-main { padding: 22px 22px 24px; }

.prof-section-head { margin-bottom: 18px; }

.prof-section-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 750;
  color: #fff;
}

.prof-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--prof-muted);
}

.prof-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
  margin-bottom: 16px;
}

.prof-form-grid--flat > .prof-field {
  margin: 0;
}

.prof-field--full {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-bottom: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.prof-field--full textarea {
  width: 100%;
  min-height: 120px;
}

.prof-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prof-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.prof-field input,
.prof-field select,
.prof-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1018;
  color: #fff;
  font: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.prof-field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}

.prof-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23F7CD78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.prof-field input:focus,
.prof-field select:focus,
.prof-field textarea:focus {
  border-color: rgba(247, 205, 120, 0.55);
  box-shadow: 0 0 0 3px rgba(247, 205, 120, 0.12);
}

.prof-field input[readonly],
.prof-field input.prof-input-ok {
  color: rgba(255, 255, 255, 0.92);
  cursor: default;
}

.prof-field input.prof-input-ok {
  color: #3ddc84;
  font-weight: 700;
}

.prof-field input.prof-input-warn {
  color: #f0b060;
  font-weight: 700;
}

.prof-session-now {
  display: inline-block;
  margin-left: 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--prof-gold);
}

.prof-readonly-box {
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1018;
}

.prof-section-head--sm {
  margin: 8px 0 14px;
}

.prof-section-head--sm h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 750;
  color: #fff;
}

.prof-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #0b1018;
}

.prof-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.prof-table th,
.prof-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.prof-table th {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--prof-muted);
  background: rgba(255, 255, 255, 0.02);
}

.prof-table td {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.prof-table tbody tr:last-child td {
  border-bottom: 0;
}

.prof-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.prof-table .prof-td-amount {
  font-weight: 700;
  white-space: nowrap;
}

.prof-table .prof-td-status,
.prof-table .prof-td-action {
  white-space: nowrap;
}

.prof-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 7px;
}

.prof-table-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--prof-gold);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.prof-table-link:hover {
  text-decoration: underline;
}

.prof-switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 24px;
  cursor: pointer;
}

.prof-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.prof-switch > span:not(.sr-only) {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.prof-switch > span:not(.sr-only)::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.prof-switch input:checked + span:not(.sr-only) {
  background: linear-gradient(180deg, #ffe1a0, var(--prof-gold));
  border-color: rgba(247, 205, 120, 0.55);
}

.prof-switch input:checked + span:not(.sr-only)::after {
  transform: translateX(18px);
  background: #1a1408;
}

.prof-switch input:focus-visible + span:not(.sr-only) {
  box-shadow: 0 0 0 3px rgba(247, 205, 120, 0.22);
}

.prof-app-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
}

.prof-app-name svg {
  flex-shrink: 0;
}

.prof-field small {
  font-size: 11px;
  font-weight: 500;
  color: var(--prof-muted);
}

.prof-charcount { align-self: flex-end; }

.prof-error {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #f0a0a0;
}

.prof-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.prof-btn--gold {
  color: #1a1408;
  background: linear-gradient(180deg, #ffe1a0, var(--prof-gold));
}

.prof-btn--gold:hover { filter: brightness(1.05); }

.prof-btn--ghost {
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
}

.prof-btn--ghost:hover {
  border-color: rgba(247, 205, 120, 0.45);
  color: #fff;
}

.prof-btn--block { width: 100%; }

.prof-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  color: #1a1408;
  background: linear-gradient(180deg, #ffe1a0, var(--prof-gold));
}

.prof-btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 10px;
}

.prof-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.prof-dl > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.prof-dl--wide { grid-column: 1 / -1; }

.prof-dl dt {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--prof-muted);
}

.prof-dl dd {
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.prof-dl dd strong {
  font-weight: 750;
  letter-spacing: -0.02em;
}

.prof-bill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.prof-subhead {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.prof-usage-block { width: 100%; }

.prof-usage-block--inline { max-width: 420px; }

.prof-usage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--prof-muted);
}

.prof-usage-head strong { color: var(--prof-gold); }

.prof-usage-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.prof-usage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--prof-gold), #ffe1a0);
}

.prof-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.prof-history-list li {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.prof-history-list li:last-child { border-bottom: 0; }

.prof-history-date { color: var(--prof-muted); }
.prof-history-label { color: rgba(255, 255, 255, 0.88); }
.prof-history-amount { color: #fff; font-weight: 700; }

.prof-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prof-card { padding: 16px; }

.prof-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.prof-card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.prof-link-btn,
.prof-text-link {
  font-size: 12px;
  font-weight: 650;
  color: var(--prof-gold);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.prof-link-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(247, 205, 120, 0.4);
  color: var(--prof-gold);
  background: rgba(247, 205, 120, 0.06);
}

.prof-plan-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.prof-plan-name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.prof-plan-price {
  margin: 4px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.prof-plan-price strong { color: var(--prof-gold); font-size: 16px; }

.prof-plan-renew {
  margin: 0;
  font-size: 11.5px;
  color: var(--prof-muted);
}

.prof-plan-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(247, 205, 120, 0.1);
  border: 1px solid rgba(247, 205, 120, 0.28);
}

.prof-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.prof-checklist li {
  position: relative;
  padding-left: 22px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}

.prof-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--prof-gold);
  font-weight: 700;
}

.prof-credits-big {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.prof-credits-big strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.prof-credits-big span {
  font-size: 13px;
  color: var(--prof-muted);
}

.prof-sec-list,
.prof-connect-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prof-sec-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}

.prof-ok { color: #3ddc84; font-style: normal; font-weight: 650; }
.prof-warn { color: #f0b060; font-style: normal; font-weight: 650; }
.prof-muted { color: var(--prof-muted); font-style: normal; }

.prof-connect-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.prof-connect-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}

.prof-mini-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
}

.prof-mini-btn:hover {
  border-color: rgba(247, 205, 120, 0.4);
  color: #fff;
}

.prof-main--placeholder { min-height: 220px; }

@media (max-width: 1100px) {
  .prof-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof-quote { align-items: flex-start; text-align: left; }
  .prof-dl { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .prof-banner-body { padding: 20px 4px 56px; }
  .prof-identity { flex-direction: column; align-items: flex-start; }
  .prof-avatar { width: 80px; height: 80px; }
  .prof-form-grid { grid-template-columns: 1fr; }
  .prof-stats { grid-template-columns: 1fr; }
  .prof-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .prof-dl > div { grid-template-columns: 1fr; gap: 4px; }
  .prof-history-list li {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }
  .prof-history-date { grid-column: 1 / -1; }
  .prof-history-label { grid-column: 1; }
}


/* Library page — platform sidebar + in-page filters */
.lib-page {
  --lib-gold: #f7cd78;
  --lib-card: #10141c;
  --lib-border: rgba(255, 255, 255, 0.08);
  --lib-muted: rgba(255, 255, 255, 0.55);
  position: relative;
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lib-hero {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  min-height: 168px;
  background: #050A10;
}

.lib-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.lib-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.82) 10%, transparent 28%, transparent 72%, rgba(5, 10, 16, 0.7) 90%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 24%, transparent 76%, #050A10 100%);
  pointer-events: none;
}

.lib-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 168px;
  padding: 28px 4px;
}

.lib-hero-copy {
  max-width: 48ch;
}

.lib-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #fff;
}

.lib-hero-copy > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.lib-hero-aside {
  text-align: right;
  flex-shrink: 0;
}

.lib-hero-tag {
  margin: 0 0 4px;
  font-family: var(--font-script);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  font-style: normal;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.lib-hero-tag .text-gold {
  color: var(--lib-gold);
}

.lib-hero-aside-sub {
  margin: 0;
  font-family: var(--font-script);
  font-size: 18px;
  font-weight: 500;
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.lib-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.lib-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #12161e;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lib-stat:hover {
  background: #161b25;
}

.lib-stat.is-active {
  border-color: var(--lib-accent);
  background: #141820;
}

.lib-stat-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--lib-accent);
  color: #fff;
}

.lib-stat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lib-stat strong {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-stat.is-active strong {
  color: var(--lib-accent);
}

.lib-stat em {
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
}

.lib-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.lib-filters {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  border-radius: 14px;
  border: 1px solid var(--lib-border);
  background: var(--lib-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lib-filters h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: #fff;
}

.lib-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1018;
  color: var(--lib-muted);
}

.lib-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.lib-filter-group { display: flex; flex-direction: column; gap: 6px; }

.lib-filter-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lib-muted);
}

.lib-type-list { display: flex; flex-direction: column; gap: 2px; }

.lib-type-btn {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.lib-type-btn em {
  font-style: normal;
  color: var(--lib-muted);
  font-size: 12px;
}

.lib-type-btn:hover { background: rgba(255, 255, 255, 0.04); }

.lib-type-btn.is-active {
  background: rgba(247, 205, 120, 0.12);
  color: var(--lib-gold);
}

.lib-type-btn.is-active em { color: var(--lib-gold); }

.lib-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.lib-field select {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1018;
  color: #fff;
  font: inherit;
  font-weight: 500;
}

.lib-field--inline { margin: 0; }

.lib-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.lib-check--fav { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--lib-border); }

.lib-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lib-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lib-toolbar-left,
.lib-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lib-selected-count {
  margin-right: 2px;
  padding: 0 10px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.1);
  color: var(--lib-gold);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.lib-selected-count[hidden] {
  display: none !important;
}

.lib-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lib-confirm[hidden] {
  display: none !important;
}

.lib-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(8px);
}

.lib-confirm-panel {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 32px 26px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1a2030 0%, #10151f 100%);
  box-shadow:
    0 0 0 1px rgba(247, 205, 120, 0.08) inset,
    0 28px 70px rgba(0, 0, 0, 0.6);
  text-align: center;
  animation: lib-confirm-in 0.22s ease-out;
}

@keyframes lib-confirm-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lib-confirm-ico {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--lib-gold, #f7cd78);
  background: rgba(247, 205, 120, 0.1);
  border: 1px solid rgba(247, 205, 120, 0.32);
}

.lib-confirm-ico-mark {
  font-size: 22px;
  font-weight: 750;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.lib-confirm[data-lib-confirm-mode="danger"] .lib-confirm-ico {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
}

.lib-confirm[data-lib-confirm-mode="danger"] .lib-confirm-ico-mark {
  font-family: inherit;
  font-style: normal;
  font-size: 26px;
  font-weight: 800;
}

.lib-confirm[data-lib-confirm-mode="info"] .lib-confirm-actions {
  grid-template-columns: 1fr;
}

.lib-confirm[data-lib-confirm-mode="info"] [data-lib-confirm-cancel].lib-confirm-btn {
  display: none;
}

.lib-confirm-btn--gold {
  background: var(--gold-gradient, linear-gradient(180deg, #ffe1a0 0%, #f7cd78 55%, #e8b95e 100%));
  border-color: rgba(255, 255, 255, 0.08);
  color: #1a1408;
  box-shadow: 0 8px 20px rgba(247, 205, 120, 0.22);
}

.lib-confirm-btn--gold:hover {
  filter: brightness(1.05);
}

.lib-confirm-panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 750;
  color: #fff;
  letter-spacing: -0.02em;
}

.lib-confirm-panel p {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}

.lib-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lib-confirm-btn {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lib-confirm-btn:active {
  transform: translateY(1px);
}

.lib-confirm-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

.lib-confirm-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.lib-confirm-btn--danger {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

.lib-confirm-btn--danger:hover {
  background: linear-gradient(180deg, #fca5a5 0%, #f87171 100%);
}

.lib-confirm-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lib-view-toggle {
  display: inline-flex;
  border: 1px solid var(--lib-border);
  border-radius: 10px;
  overflow: hidden;
}

.lib-view-toggle button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--lib-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lib-view-toggle button.is-active {
  background: rgba(247, 205, 120, 0.14);
  color: var(--lib-gold);
}

.lib-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--lib-border);
  background: var(--lib-card);
  color: rgba(255, 255, 255, 0.8);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lib-icon-btn:hover { border-color: rgba(247, 205, 120, 0.4); color: #fff; }

.lib-text-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--lib-border);
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lib-grid.is-view-hidden,
.lib-table-wrap.is-view-hidden,
.lib-grid[hidden],
.lib-table-wrap[hidden] {
  display: none !important;
}

.lib-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--lib-border);
  background: #0d1118;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.lib-card.is-hidden { display: none; }

.lib-card:has(.lib-card-more.is-open) {
  z-index: 5;
}

.lib-card-media-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.lib-card-media-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lib-card-title-link {
  color: inherit;
  text-decoration: none;
}

.lib-card-title-link:hover {
  color: var(--gold, #f0b429);
}

a.lib-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.lib-card-media {
  position: relative;
  aspect-ratio: 1.15 / 1;
  background: #0b1018;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.lib-empty-filter {
  margin: 0 0 14px;
  padding: 18px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  text-align: center;
}

.lib-empty-filter[hidden] {
  display: none !important;
}

.lib-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lib-card-check {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(12, 16, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.lib-card-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--lib-gold);
}

.lib-card-star {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 16, 22, 0.72);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.lib-card-star.is-on,
.lib-card-star:hover {
  color: var(--lib-gold);
  border-color: rgba(247, 205, 120, 0.45);
}

.lib-card-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 12px;
}

.lib-card-media-meta {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 28px 10px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 8, 12, 0.78) 70%);
  pointer-events: none;
}

.lib-card-body {
  padding: 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0d1118;
}

.lib-card-title-row,
.lib-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lib-card-title-row {
  min-width: 0;
}

.lib-card-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 62%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-card-type--imagine { color: #6eb6ff; }
.lib-card-type--video { color: #c084fc; }
.lib-card-type--sunet { color: #f472b6; }
.lib-card-type--chat { color: #4ade80; }
.lib-card-type--3d { color: #2dd4bf; }
.lib-card-type--editari { color: #fb923c; }

.lib-card-menu {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.lib-card-more {
  position: relative;
  flex-shrink: 0;
}

.lib-card-more.is-open > .lib-card-menu,
.lib-card-more.is-open > .lib-icon-btn {
  color: #fff;
}

.lib-card-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 148px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #151a24;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 2px;
}

.lib-card-more-menu--up {
  top: auto;
  bottom: calc(100% + 6px);
}

.lib-card-more-menu[hidden] {
  display: none;
}

.lib-card-more-menu a,
.lib-card-more-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.lib-card-more-menu a:hover,
.lib-card-more-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.lib-card-more-menu .is-danger {
  color: #f87171;
}

.lib-card-more-menu .is-danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.lib-card-title-row strong {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 14px;
  font-weight: 750;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-card-credits {
  flex-shrink: 0;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(247, 205, 120, 0.5);
  background: rgba(10, 14, 20, 0.72);
  color: var(--lib-gold);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(6px);
  line-height: 1;
}

.lib-card-credits svg {
  flex-shrink: 0;
}

.lib-card-model {
  margin: 0;
  font-size: 12.5px;
  color: var(--lib-muted);
}

.lib-card-foot em {
  font-style: normal;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
}

.lib-card-actions {
  display: flex;
  gap: 6px;
}

.lib-card-actions .lib-icon-btn {
  width: 30px;
  height: 30px;
}

.lib-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  color: #fff;
}

.lib-card-badge--imagine { background: rgba(37, 99, 235, 0.92); }
.lib-card-badge--video { background: rgba(124, 58, 237, 0.92); }
.lib-card-badge--sunet { background: rgba(219, 39, 119, 0.92); }
.lib-card-badge--chat { background: rgba(22, 163, 74, 0.92); }
.lib-card-badge--3d { background: rgba(14, 154, 168, 0.92); }
.lib-card-badge--editari { background: rgba(234, 88, 12, 0.92); }

.lib-table-wrap {
  border: 1px solid var(--lib-border);
  border-radius: 12px;
  overflow-x: auto;
  background: var(--lib-card);
}

.lib-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.lib-table th,
.lib-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
}

.lib-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lib-muted);
  background: rgba(255, 255, 255, 0.02);
}

.lib-table tr.is-hidden { display: none; }

.lib-table-thumb {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
}

.lib-table-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lib-table-link {
  border: 0;
  background: none;
  color: var(--lib-gold);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.lib-table .lib-card-badge {
  position: static;
}

.lib-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--lib-muted);
  font-size: 13px;
}

.lib-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lib-pager-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lib-pager-btn,
.lib-pager-num {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--lib-border);
  background: #12161e;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.lib-pager-btn:hover:not(:disabled),
.lib-pager-num:hover {
  border-color: rgba(247, 205, 120, 0.4);
  color: #fff;
}

.lib-pager-num.is-active {
  border-color: var(--lib-gold);
  color: var(--lib-gold);
  background: rgba(247, 205, 120, 0.08);
}

.lib-pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lib-pager-gap {
  min-width: 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
}

@media (max-width: 1280px) {
  .lib-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .lib-body { grid-template-columns: 1fr; }
  .lib-filters { position: static; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-hero-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 4px;
  }
  .lib-hero-aside { text-align: left; }
  .lib-hero-tag { white-space: normal; }
}

@media (max-width: 640px) {
  .lib-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Subscription page — Abonamentul meu
   ========================================================================== */

.sub-page {
  --sub-gold: #f7cd78;
  --sub-card: #10141c;
  --sub-border: rgba(255, 255, 255, 0.08);
  --sub-muted: rgba(255, 255, 255, 0.55);
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sub-hero {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  min-height: 168px;
  background: #050A10;
}

.sub-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.sub-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.82) 10%, transparent 28%, transparent 72%, rgba(5, 10, 16, 0.7) 90%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 24%, transparent 76%, #050A10 100%);
  pointer-events: none;
}

.sub-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 168px;
  padding: 28px 4px;
}

.sub-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.sub-hero-copy {
  max-width: 46ch;
}

.sub-hero-copy > p {
  margin: 0;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.sub-hero-script {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  font-family: var(--font-script);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  text-align: right;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.sub-current {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.85fr);
  gap: 14px;
  align-items: stretch;
}

.sub-current-main,
.sub-side-card {
  border-radius: 16px;
  border: 1px solid var(--sub-border);
  background: var(--sub-card);
}

.sub-current-main {
  padding: 24px 26px;
}

.sub-current-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sub-plan-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sub-gold);
}

.sub-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}

.sub-status.is-ok {
  border-color: rgba(61, 220, 132, 0.35);
  background: rgba(61, 220, 132, 0.08);
  color: #3ddc84;
}

.sub-current-main h2 {
  margin: 0 0 6px;
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.sub-price {
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.sub-price strong {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sub-gold);
}

.sub-renew {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--sub-muted);
}

.sub-renew strong { color: rgba(255, 255, 255, 0.88); }

.sub-feature-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.sub-feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.86);
}

.sub-feature-list svg { color: var(--sub-gold); flex-shrink: 0; }

.sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sub-btn--gold {
  background: linear-gradient(180deg, #ffe1a0 0%, #f7cd78 55%, #e8b95e 100%);
  color: #1a1408;
}

.sub-btn--gold:hover { filter: brightness(1.04); }

.sub-btn--ghost {
  background: transparent;
  border-color: var(--sub-border);
  color: rgba(255, 255, 255, 0.88);
}

.sub-btn--ghost:hover {
  border-color: rgba(247, 205, 120, 0.4);
  color: #fff;
}

.sub-btn--danger {
  background: transparent;
  border-color: rgba(255, 90, 90, 0.35);
  color: #ff8a8a;
}

.sub-btn--danger:hover {
  border-color: rgba(255, 90, 90, 0.55);
  background: rgba(255, 90, 90, 0.08);
}

.sub-btn.is-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.sub-current-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-side-card {
  padding: 16px 18px;
}

.sub-side-card h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sub-muted);
}

.sub-side-big {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.sub-side-big span {
  font-size: 13px;
  font-weight: 500;
  color: var(--sub-muted);
}

.sub-usage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--sub-muted);
}

.sub-usage-head strong { color: var(--sub-gold); }

.sub-usage-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.sub-usage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8b95e, #f7cd78);
}

.sub-pay {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.sub-pay strong {
  display: block;
  font-size: 14px;
  color: #fff;
}

.sub-pay span {
  font-size: 12px;
  color: var(--sub-muted);
}

.sub-link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--sub-gold);
  cursor: pointer;
}

.sub-link-btn:hover { text-decoration: underline; }

.sub-dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.sub-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.sub-dl dt { color: var(--sub-muted); }
.sub-dl dd { margin: 0; color: #fff; font-weight: 600; text-align: right; }

.sub-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.sub-section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.sub-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--sub-muted);
}

.sub-link {
  font-size: 13px;
  font-weight: 650;
  color: var(--sub-gold);
  text-decoration: none;
  white-space: nowrap;
}

.sub-link:hover { text-decoration: underline; }

.sub-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sub-plan-card {
  position: relative;
  padding: 20px 18px;
  border-radius: 14px;
  border: 1px solid var(--sub-border);
  background: var(--sub-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-plan-card.is-current {
  border-color: rgba(247, 205, 120, 0.55);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.12);
}

.sub-chip {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.sub-chip--gold {
  border-color: rgba(247, 205, 120, 0.4);
  color: var(--sub-gold);
  background: rgba(247, 205, 120, 0.08);
}

.sub-plan-card h3 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.sub-plan-price {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.sub-plan-price strong {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.sub-plan-blurb {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--sub-muted);
  flex: 1;
}

.sub-plan-card .sub-btn { width: 100%; }

.sub-table-wrap {
  border-radius: 14px;
  border: 1px solid var(--sub-border);
  background: var(--sub-card);
  overflow: hidden;
}

.sub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sub-table th,
.sub-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sub-muted);
  background: rgba(0, 0, 0, 0.2);
}

.sub-table tr:last-child td { border-bottom: 0; }
.sub-table td { color: rgba(255, 255, 255, 0.88); }
.sub-td-amount { font-weight: 700; color: #fff; }

.sub-ok {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: #3ddc84;
  background: rgba(61, 220, 132, 0.1);
}

@media (max-width: 1100px) {
  .sub-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .sub-current { grid-template-columns: 1fr; }
  .sub-plan-grid { grid-template-columns: 1fr; }
  .sub-hero-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 4px;
  }
  .sub-hero-script { align-items: flex-start; text-align: left; }
}

@media (max-width: 640px) {
  .sub-feature-list { grid-template-columns: 1fr; }
  .sub-section-head { flex-direction: column; align-items: flex-start; }
  .sub-table th:nth-child(2),
  .sub-table td:nth-child(2) { display: none; }
}

/* ==========================================================================
   Credits page — Credite și consum
   ========================================================================== */

.cred-page {
  --cred-gold: #f7cd78;
  --cred-card: #10141c;
  --cred-border: rgba(255, 255, 255, 0.08);
  --cred-muted: rgba(255, 255, 255, 0.55);
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cred-hero {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  min-height: 168px;
  background: #050A10;
}

.cred-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.cred-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.82) 10%, transparent 28%, transparent 72%, rgba(5, 10, 16, 0.7) 90%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 24%, transparent 76%, #050A10 100%);
  pointer-events: none;
}

.cred-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 168px;
  padding: 28px 4px;
}

.cred-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.cred-hero-copy {
  max-width: 48ch;
}

.cred-hero-copy > p {
  margin: 0;
  max-width: 48ch;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.cred-hero-script {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  font-family: var(--font-script);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  text-align: right;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.cred-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cred-stat {
  border-radius: 16px;
  border: 1px solid var(--cred-border);
  background: var(--cred-card);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cred-stat--main {
  border-color: rgba(247, 205, 120, 0.35);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(247, 205, 120, 0.12), transparent 55%),
    var(--cred-card);
}

.cred-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cred-muted);
}

.cred-stat-big {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.cred-stat-big--sm {
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.02em;
}

.cred-stat--main .cred-stat-big { color: var(--cred-gold); }

.cred-stat-sub {
  margin: 0;
  font-size: 13px;
  color: var(--cred-muted);
  line-height: 1.45;
}

.cred-usage { margin-top: 4px; }

.cred-usage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--cred-muted);
}

.cred-usage-head strong { color: var(--cred-gold); }

.cred-usage-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cred-usage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e8b95e, #f7cd78);
}

.cred-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 40px;
  padding: 0 16px;
  margin-top: 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cred-btn--gold {
  background: linear-gradient(180deg, #ffe1a0 0%, #f7cd78 55%, #e8b95e 100%);
  color: #1a1408;
}

.cred-btn--gold:hover { filter: brightness(1.04); }

.cred-btn--ghost {
  background: transparent;
  border-color: var(--cred-border);
  color: rgba(255, 255, 255, 0.88);
}

.cred-btn--ghost:hover {
  border-color: rgba(247, 205, 120, 0.4);
  color: #fff;
}

.cred-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 650;
  color: var(--cred-gold);
  text-decoration: none;
  white-space: nowrap;
}

.cred-link:hover { text-decoration: underline; }

.cred-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.cred-section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.cred-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--cred-muted);
}

.cred-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cred-type-card {
  border-radius: 14px;
  border: 1px solid var(--cred-border);
  background: var(--cred-card);
  padding: 14px 16px;
}

.cred-type-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.cred-type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cred-accent);
  flex-shrink: 0;
}

.cred-type-top strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.cred-type-top em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 650;
  color: var(--cred-muted);
}

.cred-type-val {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.cred-type-val span {
  font-size: 12px;
  font-weight: 500;
  color: var(--cred-muted);
}

.cred-type-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cred-type-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cred-accent);
}

.cred-pack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cred-pack {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--cred-border);
  background: var(--cred-card);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cred-pack.is-popular {
  border-color: rgba(247, 205, 120, 0.5);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.1);
}

.cred-chip {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(247, 205, 120, 0.4);
  color: var(--cred-gold);
  background: rgba(247, 205, 120, 0.08);
}

.cred-pack-amount {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cred-muted);
}

.cred-pack-amount strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.cred-pack-price {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--cred-gold);
}

.cred-pack-unit {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--cred-muted);
}

.cred-pack .cred-btn {
  width: 100%;
  margin-top: auto;
  align-self: stretch;
}

.cred-table-wrap {
  border-radius: 14px;
  border: 1px solid var(--cred-border);
  background: var(--cred-card);
  overflow: hidden;
}

.cred-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cred-table th,
.cred-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cred-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cred-muted);
  background: rgba(0, 0, 0, 0.2);
}

.cred-table tr:last-child td { border-bottom: 0; }
.cred-table td { color: rgba(255, 255, 255, 0.88); }

.cred-table td.cred-td-cost {
  font-weight: 750;
  white-space: nowrap;
}

.cred-table td.cred-td-cost.is-minus { color: #ff6b6b; }
.cred-table td.cred-td-cost.is-plus { color: #3ddc84; }

@media (max-width: 1100px) {
  .cred-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .cred-stats { grid-template-columns: 1fr; }
  .cred-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cred-hero-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 4px;
  }
  .cred-hero-script { align-items: flex-start; text-align: left; }
}

@media (max-width: 640px) {
  .cred-type-grid,
  .cred-pack-grid { grid-template-columns: 1fr; }
  .cred-section-head { flex-direction: column; align-items: flex-start; }
  .cred-table th:nth-child(4),
  .cred-table td:nth-child(4) { display: none; }
}

/* ==========================================================================
   Billing page — Facturi și plăți
   ========================================================================== */

.bill-page {
  --bill-gold: #f7cd78;
  --bill-card: #10141c;
  --bill-border: rgba(255, 255, 255, 0.08);
  --bill-muted: rgba(255, 255, 255, 0.55);
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bill-hero {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 168px;
  background: #050A10;
}

.bill-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.bill-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.82) 10%, transparent 28%, transparent 72%, rgba(5, 10, 16, 0.7) 90%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 24%, transparent 76%, #050A10 100%);
  pointer-events: none;
}

.bill-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 168px;
  padding: 28px 4px;
}

.bill-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.bill-hero-copy { max-width: 48ch; }

.bill-hero-copy > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

.bill-hero-script {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  font-family: var(--font-script);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  text-align: right;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.bill-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bill-stat {
  border-radius: 16px;
  border: 1px solid var(--bill-border);
  background: var(--bill-card);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bill-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bill-muted);
}

.bill-stat-big {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.bill-stat-big span {
  font-size: 14px;
  font-weight: 600;
  color: var(--bill-muted);
}

.bill-stat-big--sm {
  font-size: clamp(22px, 2.4vw, 28px);
}

.bill-stat-sub {
  margin: 0;
  font-size: 13px;
  color: var(--bill-muted);
}

.bill-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 650;
  color: var(--bill-gold);
  text-decoration: none;
}

.bill-link:hover { text-decoration: underline; }

.bill-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.bill-section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.bill-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--bill-muted);
}

.bill-pay-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--bill-border);
  background: var(--bill-card);
}

.bill-pay-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bill-pay-main strong {
  display: block;
  font-size: 15px;
  color: #fff;
}

.bill-pay-main span {
  font-size: 12.5px;
  color: var(--bill-muted);
}

.bill-pay-actions {
  display: flex;
  gap: 8px;
}

.bill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.bill-btn--ghost {
  background: transparent;
  border-color: var(--bill-border);
  color: rgba(255, 255, 255, 0.88);
}

.bill-btn--ghost:hover {
  border-color: rgba(247, 205, 120, 0.4);
  color: #fff;
}

.bill-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.bill-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  min-width: min(100%, 280px);
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1018;
  color: var(--bill-muted);
}

.bill-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.bill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bill-filters button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--bill-border);
  background: #12161e;
  color: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.bill-filters button.is-active,
.bill-filters button:hover {
  border-color: rgba(247, 205, 120, 0.45);
  color: var(--bill-gold);
}

.bill-table-wrap {
  border-radius: 14px;
  border: 1px solid var(--bill-border);
  background: var(--bill-card);
  overflow: hidden;
}

.bill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bill-table th,
.bill-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bill-table th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bill-muted);
  background: rgba(0, 0, 0, 0.2);
}

.bill-table tr:last-child td { border-bottom: 0; }
.bill-table td { color: rgba(255, 255, 255, 0.88); }
.bill-table tr.is-hidden { display: none; }

.bill-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 6px;
}

.bill-td-amount {
  font-weight: 750;
  color: #fff;
  white-space: nowrap;
}

.bill-status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.bill-status--paid {
  color: #3ddc84;
  background: rgba(61, 220, 132, 0.1);
}

.bill-status--failed {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}

.bill-status--refunded {
  color: #f7cd78;
  background: rgba(247, 205, 120, 0.12);
}

.bill-link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--bill-gold);
  cursor: pointer;
  white-space: nowrap;
}

.bill-link-btn:hover { text-decoration: underline; }

.bill-empty {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--bill-muted);
  text-align: center;
}

@media (max-width: 980px) {
  .bill-stats { grid-template-columns: 1fr; }
  .bill-hero-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 4px;
  }
  .bill-hero-script { align-items: flex-start; text-align: left; }
}

@media (max-width: 720px) {
  .bill-table th:nth-child(3),
  .bill-table td:nth-child(3) { display: none; }
}

/* ==========================================================================
   AI Chat page
   ========================================================================== */

body.chat-layout {
  overflow: hidden;
}

body.chat-layout .models-layout {
  min-height: calc(100dvh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  align-items: stretch;
  overflow: hidden;
}

body.chat-layout .models-layout-main {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.chat-page {
  --chat-gold: #f7cd78;
  --chat-card: #10141c;
  --chat-border: rgba(255, 255, 255, 0.08);
  --chat-muted: rgba(255, 255, 255, 0.55);
  --chat-user: #152033;
  height: 100%;
  max-height: 100%;
  padding: 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

.chat-hero {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 112px;
  background: #050A10;
}

.chat-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.chat-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.85) 12%, transparent 30%, transparent 70%, rgba(5, 10, 16, 0.75) 88%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 28%, transparent 72%, #050A10 100%);
  pointer-events: none;
}

.chat-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 112px;
  padding: 18px 4px;
}

.chat-hero-copy {
  max-width: 52ch;
  min-width: 0;
}

.chat-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.chat-hero-copy > p {
  margin: 0;
  max-width: 52ch;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}

.chat-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--gold-gradient);
  color: #1A1206;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(247, 205, 120, 0.22);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-hero-cta svg {
  width: 16px;
  height: 16px;
}

.chat-hero-cta:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 28px rgba(247, 205, 120, 0.3);
}

.chat-hero-cta:active {
  transform: translateY(1px);
}

.chat-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--chat-border);
  background: var(--chat-card);
  overflow: hidden;
}

.chat-history {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--chat-border);
  background: var(--chat-card);
  overflow: hidden;
}

.chat-history-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--chat-border);
}

.chat-history-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chat-muted);
}

.chat-history-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(247, 205, 120, 0.35);
  border-radius: 7px;
  background: rgba(247, 205, 120, 0.08);
  color: var(--chat-gold);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.chat-history-new:hover {
  background: rgba(247, 205, 120, 0.14);
  border-color: rgba(247, 205, 120, 0.55);
}

.chat-history-list {
  list-style: none;
  margin: 0;
  padding: 6px 4px 6px 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 205, 120, 0.3) transparent;
}

.chat-history-list::-webkit-scrollbar {
  width: 4px;
}

.chat-history-list::-webkit-scrollbar-track {
  background: transparent;
}

.chat-history-list::-webkit-scrollbar-thumb {
  background: rgba(247, 205, 120, 0.3);
  border-radius: 999px;
}

.chat-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(247, 205, 120, 0.5);
}

.chat-history-row {
  position: relative;
}

.chat-history-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-history-row:hover .chat-history-item,
.chat-history-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-history-item.is-active {
  background: rgba(247, 205, 120, 0.08);
  border-color: rgba(247, 205, 120, 0.4);
}

.chat-history-row:hover .chat-history-item.is-active {
  background: rgba(247, 205, 120, 0.1);
}

.chat-history-del {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: rgba(12, 16, 22, 0.85);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chat-history-row:hover .chat-history-del,
.chat-history-del:focus-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.chat-history-del:hover {
  color: #fff;
  background: rgba(220, 80, 80, 0.35);
}

.chat-history-del:focus-visible {
  outline: 1px solid rgba(247, 205, 120, 0.55);
}

.chat-history-title {
  font-size: 12.5px;
  font-weight: 650;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 22px;
}

.chat-history-preview {
  font-size: 11px;
  line-height: 1.35;
  color: var(--chat-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.chat-history-meta em {
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-meta time {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.35);
}

.chat-head {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--chat-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.chat-head-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px 10px;
  align-items: start;
  min-width: 0;
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--chat-border);
}

.chat-head-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px 0;
  text-align: center;
}

.chat-head-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--chat-muted);
  line-height: 1.25;
  max-width: 100%;
  text-align: center;
}

.chat-head-stat strong {
  font-size: 13px;
  font-weight: 750;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

.chat-head-stat--lead {
  margin-left: 0;
}

.chat-head-stat--balance strong,
.chat-head-stat--price strong {
  color: var(--chat-gold);
}

.chat-head-search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  height: 34px;
  margin: 0 12px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chat-head-search:focus-within {
  border-color: rgba(247, 205, 120, 0.45);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.12);
}

.chat-head-search-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--chat-muted);
}

.chat-head-search input {
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  padding: 0 2px;
}

.chat-head-search input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.chat-head-search input::-webkit-search-cancel-button {
  display: none;
}

.chat-head-search-meta {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--chat-muted);
  white-space: nowrap;
  padding: 0 2px;
}

.chat-head-search-nav,
.chat-head-search-clear {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--chat-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.chat-head-search-nav:hover,
.chat-head-search-clear:hover {
  color: var(--chat-gold);
  background: rgba(247, 205, 120, 0.1);
}

.chat-head-search-nav[hidden],
.chat-head-search-clear[hidden],
.chat-head-search-meta[hidden] {
  display: none;
}

mark.chat-search-hit {
  background: rgba(247, 205, 120, 0.32);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

mark.chat-search-hit.is-current {
  background: rgba(247, 205, 120, 0.72);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.55);
}

.chat-msg.is-search-dim {
  opacity: 0.42;
  transition: opacity 0.15s ease;
}

.chat-msg.is-search-match {
  opacity: 1;
}

.chat-thread-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-scroll-jump {
  position: absolute;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid rgba(247, 205, 120, 0.4);
  border-radius: 50%;
  background: rgba(12, 16, 24, 0.92);
  color: var(--chat-gold);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.chat-scroll-jump[hidden] {
  display: none;
}

.chat-scroll-jump:hover {
  background: rgba(247, 205, 120, 0.12);
  border-color: rgba(247, 205, 120, 0.65);
}

.chat-scroll-jump--top {
  top: 10px;
}

.chat-scroll-jump--bottom {
  bottom: 10px;
}

.chat-empty,
.chat-history-empty {
  margin: auto;
  padding: 24px 16px;
  text-align: center;
  color: var(--chat-muted);
  font-size: 13px;
  line-height: 1.45;
}

.chat-empty p,
.chat-history-empty p {
  margin: 0;
}

.chat-empty strong,
.chat-history-empty strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 650;
}

.chat-history-empty {
  list-style: none;
  margin: 16px 8px;
  padding: 12px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: min(780px, 100%);
}

.chat-msg--user {
  align-self: flex-end;
  flex-direction: row;
}

.chat-msg--ai { align-self: flex-start; }

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 750;
}

.chat-avatar--user {
  background: linear-gradient(145deg, #7c5cff, #4f46e5);
  color: #fff;
}

.chat-avatar--ai {
  background: rgba(247, 205, 120, 0.12);
  color: var(--chat-gold);
  border: 1px solid rgba(247, 205, 120, 0.3);
}

.chat-avatar--ai svg {
  width: 14px;
  height: 14px;
}

.chat-bubble {
  min-width: 0;
  border-radius: 10px;
  padding: 8px 10px;
}

.chat-msg--user .chat-bubble {
  background: var(--chat-user);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.chat-msg--ai .chat-bubble {
  background: #0c1119;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
}

.chat-bubble p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.45;
}

.chat-bubble p:last-child { margin-bottom: 0; }

.chat-msg.is-pending .chat-actions,
.chat-msg.is-streaming .chat-actions {
  display: none;
}

.chat-msg.is-pending .chat-ai-body {
  color: inherit;
  font-style: normal;
  min-height: 28px;
}

.chat-thinking {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  padding: 2px 0;
}

.chat-thinking-orbit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.chat-thinking-orbit span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(247, 205, 120, 0.35);
  box-shadow: 0 0 0 0 rgba(247, 205, 120, 0.15);
  animation: chat-think-dot 1.2s ease-in-out infinite;
}

.chat-thinking-orbit span:nth-child(2) {
  animation-delay: 0.18s;
  background: rgba(247, 205, 120, 0.55);
}

.chat-thinking-orbit span:nth-child(3) {
  animation-delay: 0.36s;
  background: rgba(247, 205, 120, 0.85);
}

.chat-thinking-copy {
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.chat-thinking-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 244, 220, 0.88);
  transition: opacity 0.18s ease;
}

.chat-thinking-shimmer {
  display: block;
  margin-top: 7px;
  width: 132px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(247, 205, 120, 0.05) 0%,
    rgba(247, 205, 120, 0.55) 45%,
    rgba(247, 205, 120, 0.08) 100%
  );
  background-size: 180% 100%;
  animation: chat-think-shimmer 1.6s ease-in-out infinite;
}

.chat-msg.is-streaming:not(.is-pending) .chat-ai-body {
  color: rgba(255, 255, 255, 0.9);
  font-style: normal;
}

.chat-msg.is-streaming:not(.is-pending) .chat-ai-body::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: rgba(247, 205, 120, 0.85);
  animation: chat-caret 0.9s steps(1) infinite;
}

@keyframes chat-caret {
  50% { opacity: 0; }
}

@keyframes chat-think-dot {
  0%, 80%, 100% {
    transform: translateY(0) scale(0.85);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-3px) scale(1);
    opacity: 1;
  }
}

@keyframes chat-think-shimmer {
  0% { background-position: 100% 0; opacity: 0.55; }
  50% { opacity: 1; }
  100% { background-position: -100% 0; opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-thinking-orbit span,
  .chat-thinking-shimmer,
  .chat-msg.is-streaming:not(.is-pending) .chat-ai-body::after {
    animation: none;
  }
}

.chat-msg.is-error .chat-actions {
  display: none;
}

.chat-msg.is-error .chat-ai-body {
  color: #f0a0a0;
}

.chat-ai-body {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.chat-ai-body > :first-child { margin-top: 0; }
.chat-ai-body > :last-child { margin-bottom: 0; }

.chat-ai-body p {
  margin: 0 0 0.7em;
}

.chat-ai-body h1,
.chat-ai-body h2,
.chat-ai-body h3,
.chat-ai-body h4 {
  margin: 1em 0 0.45em;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.3;
}

.chat-ai-body h1 { font-size: 1.25em; }
.chat-ai-body h2 { font-size: 1.15em; }
.chat-ai-body h3 { font-size: 1.05em; }
.chat-ai-body h4 { font-size: 1em; color: rgba(255, 255, 255, 0.92); }

.chat-ai-body ul,
.chat-ai-body ol {
  margin: 0 0 0.75em;
  padding-left: 1.35em;
}

.chat-ai-body li {
  margin: 0.2em 0;
}

.chat-ai-body li > ul,
.chat-ai-body li > ol {
  margin: 0.25em 0 0.35em;
}

.chat-ai-body strong { color: #fff; font-weight: 700; }

.chat-ai-body a {
  color: var(--chat-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-ai-body blockquote {
  margin: 0.6em 0;
  padding: 0.35em 0 0.35em 0.85em;
  border-left: 2px solid rgba(247, 205, 120, 0.45);
  color: rgba(255, 255, 255, 0.72);
}

.chat-ai-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.9em 0;
}

.chat-ai-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: #f3e2b0;
}

.chat-ai-body pre {
  margin: 0.65em 0 0.85em;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #070b12;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 205, 120, 0.25) transparent;
}

.chat-ai-body pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: rgba(230, 236, 245, 0.92);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}

.chat-ai-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.7em 0;
  font-size: 12.5px;
}

.chat-ai-body th,
.chat-ai-body td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 8px;
  text-align: left;
}

.chat-ai-body th {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 650;
}

.chat-ai-body ul {
  margin: 0 0 8px;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}

.chat-ai-body li { margin-bottom: 2px; }

.chat-steps {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-steps li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}

.chat-steps span {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #1a1408;
  background: var(--chat-gold);
}

.chat-weeks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.chat-week {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.chat-week summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  color: #fff;
}

.chat-week summary::-webkit-details-marker { display: none; }

.chat-week summary svg {
  width: 12px;
  height: 12px;
  color: var(--chat-muted);
  transition: transform 0.15s ease;
}

.chat-week[open] summary svg { transform: rotate(180deg); }

.chat-week p {
  margin: 0;
  padding: 0 10px 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--chat-muted);
}

.chat-truncated-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 8px 0 0;
}

.chat-truncated-note {
  margin: 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(247, 205, 120, 0.72);
}

.chat-continue-btn {
  appearance: none;
  border: 1px solid rgba(247, 205, 120, 0.4);
  border-radius: 7px;
  background: rgba(247, 205, 120, 0.08);
  color: var(--chat-gold);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  padding: 6px 9px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-continue-btn:hover:not(:disabled) {
  background: rgba(247, 205, 120, 0.16);
  border-color: rgba(247, 205, 120, 0.65);
}

.chat-continue-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.chat-actions {
  display: flex;
  gap: 2px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-actions button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--chat-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.chat-actions button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.chat-actions button[data-chat-copy].is-copied {
  color: var(--chat-gold);
  background: rgba(247, 205, 120, 0.12);
}

.chat-composer-wrap {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  margin: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-composer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 6px 6px 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(247, 205, 120, 0.35);
  background: #0b1018;
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.06), 0 6px 18px rgba(0, 0, 0, 0.22);
}

.chat-composer.is-dragover {
  border-color: rgba(247, 205, 120, 0.7);
  background: rgba(247, 205, 120, 0.04);
}

.chat-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.chat-composer textarea {
  flex: 1;
  min-height: 32px;
  max-height: 110px;
  resize: none;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  padding: 6px 4px;
  outline: none;
}

.chat-composer textarea::placeholder { color: rgba(255, 255, 255, 0.4); }

.chat-char-count {
  margin: 0;
  padding: 0 4px;
  align-self: flex-end;
  text-align: right;
  font-size: 10.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.3;
}

.chat-char-count.is-warn {
  color: #f0c56a;
}

.chat-char-count.is-full {
  color: #f0a0a0;
}

.chat-comp-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.chat-comp-ico {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--chat-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-comp-ico:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.chat-comp-ico.is-hidden,
.chat-comp-ico[hidden] { display: none !important; }

.chat-attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 2px 2px;
}

.chat-attach-preview[hidden] {
  display: none;
}

.chat-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  padding: 4px 6px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.chat-attach-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.chat-attach-chip .chat-attach-chip-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(247, 205, 120, 0.1);
  color: rgba(247, 205, 120, 0.9);
  flex-shrink: 0;
}

.chat-attach-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attach-chip button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}

.chat-attach-chip button:hover {
  background: rgba(255, 80, 80, 0.25);
  color: #fff;
}

.chat-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}

.chat-attach-thumb {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0e14;
}

.chat-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-attach-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(247, 205, 120, 0.22);
  background: rgba(247, 205, 120, 0.08);
  color: rgba(247, 205, 120, 0.95);
  text-decoration: none;
  font-size: 12px;
  font-weight: 550;
}

.chat-attach-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attach-file:hover {
  background: rgba(247, 205, 120, 0.14);
}

.chat-send {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe1a0 0%, #f7cd78 55%, #e8b95e 100%);
  color: #1a1408;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-send svg {
  width: 15px;
  height: 15px;
}

.chat-send:hover { filter: brightness(1.05); }

.chat-thinking-picker {
  position: relative;
}

.chat-thinking-picker.is-hidden,
.chat-thinking-picker[hidden] {
  display: none;
}

.chat-thinking-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 110px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(247, 205, 120, 0.28);
  border-radius: 999px;
  background: rgba(247, 205, 120, 0.06);
  color: rgba(247, 205, 120, 0.92);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.chat-thinking-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thinking-trigger svg {
  flex-shrink: 0;
  color: rgba(247, 205, 120, 0.65);
  transition: transform 0.15s ease;
}

.chat-thinking-trigger:hover {
  background: rgba(247, 205, 120, 0.12);
  border-color: rgba(247, 205, 120, 0.45);
}

.chat-thinking-picker.is-open .chat-thinking-trigger svg {
  transform: rotate(180deg);
}

.chat-thinking-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 60;
  width: min(320px, calc(100vw - 48px));
  padding: 10px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #0f1218;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.chat-thinking-menu[hidden] {
  display: none;
}

.chat-thinking-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 14px 10px;
}

.chat-thinking-menu-head > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.chat-thinking-menu-close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.chat-thinking-menu-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.chat-thinking-list {
  display: flex;
  flex-direction: column;
  padding: 0 6px 6px;
}

.chat-thinking-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.chat-thinking-item input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chat-thinking-item:hover { background: rgba(255, 255, 255, 0.04); }

.chat-thinking-item.is-active { background: rgba(255, 255, 255, 0.03); }

.chat-thinking-item.is-active .chat-radio {
  border-color: #fff;
  box-shadow: inset 0 0 0 4px #0f1218, inset 0 0 0 8px #fff;
}

.chat-thinking-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-thinking-meta strong {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 650;
  color: #fff;
  line-height: 1.25;
}

.chat-thinking-meta > span {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.5);
}

.chat-model-picker {
  position: relative;
}

.chat-model-picker.is-locked .chat-model-trigger {
  opacity: 0.72;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.chat-model-picker.is-locked .chat-model-trigger svg {
  opacity: 0.35;
}

.chat-model-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.chat-model-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-model-trigger svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease;
}

.chat-model-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.chat-model-picker.is-open .chat-model-trigger {
  border-color: rgba(247, 205, 120, 0.45);
  background: rgba(247, 205, 120, 0.08);
}

.chat-model-picker.is-open .chat-model-trigger svg {
  transform: rotate(180deg);
  color: var(--chat-gold);
}

.chat-model-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 60;
  width: min(320px, calc(100vw - 48px));
  padding: 10px 0 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f1218;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.chat-model-menu[hidden] { display: none; }

.chat-model-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 14px 10px;
}

.chat-model-menu-head > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.chat-model-menu-close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.chat-model-menu-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.chat-model-list {
  display: flex;
  flex-direction: column;
  max-height: min(340px, 50vh);
  overflow-y: auto;
  padding: 0 6px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 205, 120, 0.25) transparent;
}

.chat-model-empty {
  margin: 0;
  padding: 14px 12px 18px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
}

.chat-model {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.chat-model input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chat-model:hover { background: rgba(255, 255, 255, 0.04); }

.chat-model.is-active { background: rgba(255, 255, 255, 0.03); }

.chat-radio {
  width: 16px;
  height: 16px;
  margin-top: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
}

.chat-model.is-active .chat-radio {
  border-color: #fff;
  box-shadow: inset 0 0 0 4px #0f1218, inset 0 0 0 8px #fff;
}

.chat-model-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-model-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.chat-model-title strong {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 650;
  color: #fff;
  line-height: 1.25;
}

.chat-model-meta > span:not(.chat-model-title) {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.5);
}

.chat-model-badges {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
}

.chat-model-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.chat-model-badge--free {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.34);
  color: #86efac;
}

.chat-model-badge--cheap {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
}

.chat-model-badge--medium {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.26);
  color: #fcd34d;
}

.chat-model-badge--expensive {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}

.chat-model-badge--pro {
  background: rgba(247, 205, 120, 0.14);
  border-color: rgba(247, 205, 120, 0.36);
  color: var(--chat-gold);
}

.chat-model-media {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.chat-model-media strong {
  color: #fff;
  font-weight: 650;
}

.chat-model-media svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
}

.chat-model-media:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 1100px) {
  body.chat-layout,
  body.chat-layout .models-layout,
  body.chat-layout .models-layout-main,
  .chat-page {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .chat-shell {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .chat-main {
    height: min(70dvh, 640px);
    max-height: min(70dvh, 640px);
  }
  .chat-history {
    height: auto;
    max-height: 280px;
  }
}

@media (max-width: 980px) {
  .chat-head-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .chat-msg--user { max-width: 100%; }
  .chat-model-trigger { max-width: 132px; }
  .chat-model-menu {
    right: -40px;
    width: min(300px, calc(100vw - 32px));
  }
  .chat-head {
    gap: 8px;
    padding: 8px 0 10px;
  }
  .chat-head-stats {
    padding-left: 10px;
    padding-right: 10px;
  }
  .chat-head-search {
    margin-left: 10px;
    margin-right: 10px;
  }
  .chat-head-stats {
    gap: 8px 10px;
  }
  .chat-head-stat strong { font-size: 13px; }
  .chat-hero-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 2px;
  }
  .chat-hero-cta {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .chat-head-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== Model detail page ===== */
/* Model detail page */
.mdetail-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px 0 48px;
}
.mdetail-hero {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  background: #0a1018;
  display: flex;
  flex-direction: column;
}
.mdetail-hero-media {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 320px;
  overflow: hidden;
}
.mdetail-hero-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  display: block;
}
.mdetail-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6,10,16,0.88) 0%, rgba(6,10,16,0.55) 45%, rgba(6,10,16,0.4) 70%, rgba(6,10,16,0.55) 100%),
    linear-gradient(180deg, rgba(6,10,16,0.2) 0%, transparent 35%, rgba(6,10,16,0.72) 100%);
}
.mdetail-hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  padding: 48px 32px 28px;
  box-sizing: border-box;
}
.mdetail-hero-type {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  border: 0;
  background: #f7cd78;
  color: #1a1408;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.mdetail-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
.mdetail-tagline {
  margin: 0;
  color: #f7cd78;
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.35;
}
.mdetail-lead {
  margin: 0;
  max-width: none;
  width: 100%;
  color: rgba(255,255,255,0.88);
  font-size: 0.92rem;
  line-height: 1.55;
}
.mdetail-highlights {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  width: 100%;
  max-width: 520px;
}
.mdetail-highlights li {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.92);
  line-height: 1.35;
}
.mdetail-highlight-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #f7cd78;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(247, 205, 120, 0.35);
  backdrop-filter: blur(6px);
}
.mdetail-thumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.28);
}
.mdetail-thumbs-clip {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 64px;
  overflow: hidden;
}
.mdetail-thumbs-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  width: 100%;
  padding: 2px 2px 28px;
  margin-bottom: -28px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mdetail-thumbs-track::-webkit-scrollbar,
.mdetail-thumbs-track::-webkit-scrollbar-button,
.mdetail-thumbs-track::-webkit-scrollbar-thumb,
.mdetail-thumbs-track::-webkit-scrollbar-track {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
.mdetail-thumb {
  flex: 0 0 auto;
  width: 92px;
  height: 60px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}
.mdetail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mdetail-thumb.is-active {
  border-color: #f7cd78;
  box-shadow: 0 0 0 1px rgba(247,205,120,0.35);
}
.mdetail-thumbs-nav {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.mdetail-thumbs-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.mdetail-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mdetail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: stretch;
}
.mdetail-top > .mdetail-card--offer {
  height: 100%;
}
.mdetail-bottom {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}
.mdetail-specs--wide {
  max-width: none;
  width: 100%;
}
.mdetail-similar-wrap { width: 100%; }
.mdetail-similar--row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mdetail-tabs-wrap {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #10161f;
  overflow: hidden;
  min-height: 280px;
}
.mdetail-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(0, 0, 0, 0.28) 100%);
}
.mdetail-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 14px 8px 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.mdetail-tab + .mdetail-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 35%,
    rgba(255, 255, 255, 0.1) 65%,
    transparent 100%
  );
  pointer-events: none;
}
.mdetail-tab::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background 0.18s ease, left 0.18s ease, right 0.18s ease;
}
.mdetail-tab span {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.mdetail-tab svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.mdetail-tab:hover {
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.03);
}
.mdetail-tab:hover svg {
  opacity: 0.95;
  transform: translateY(-1px);
}
.mdetail-tab.is-active {
  color: #f7cd78;
  background:
    linear-gradient(180deg, rgba(247, 205, 120, 0.12) 0%, rgba(247, 205, 120, 0.03) 100%);
}
.mdetail-tab.is-active::after {
  left: 22%;
  right: 22%;
  background: linear-gradient(90deg, transparent, #f7cd78 20%, #ffe1a0 50%, #f7cd78 80%, transparent);
  box-shadow: 0 0 12px rgba(247, 205, 120, 0.45);
}
.mdetail-tab.is-active svg {
  opacity: 1;
  color: #f7cd78;
  transform: translateY(-1px);
}
.mdetail-panel { padding: 22px 20px 24px; }
.mdetail-panel[hidden] { display: none !important; }
.mdetail-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.mdetail-panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.mdetail-panel-head p,
.mdetail-panel-lead {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.mdetail-filter select {
  appearance: none;
  min-width: 160px;
  padding: 9px 34px 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23f7cd78' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center/12px no-repeat,
    rgba(255,255,255,0.04);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
}
.mdetail-examples {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.mdetail-example {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0a0f16;
  aspect-ratio: 4 / 3;
}
.mdetail-example img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mdetail-example-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(5,10,16,0.92) 70%);
}
.mdetail-example-overlay h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: #fff;
}
.mdetail-example-overlay p {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.4;
}
.mdetail-example-overlay span { color: #f7cd78; }
.mdetail-prose {
  margin: 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
  font-size: 0.94rem;
}
.mdetail-prose > *:first-child { margin-top: 0; }
.mdetail-prose > *:last-child { margin-bottom: 0; }
.mdetail-prose p { margin: 0 0 0.9em; }
.mdetail-prose h2,
.mdetail-prose h3,
.mdetail-prose h4 {
  margin: 1.25em 0 0.45em;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.mdetail-prose h2 { font-size: 1.15rem; }
.mdetail-prose h3 { font-size: 1.05rem; }
.mdetail-prose h4 { font-size: 0.98rem; }
.mdetail-prose ul,
.mdetail-prose ol {
  margin: 0 0 0.9em;
  padding-left: 1.25em;
  display: grid;
  gap: 0.35em;
}
.mdetail-prose li { color: rgba(255,255,255,0.8); }
.mdetail-prose a {
  color: #f7cd78;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mdetail-prose a:hover { color: #ffe0a0; }
.mdetail-prose strong,
.mdetail-prose b { color: rgba(255,255,255,0.95); font-weight: 700; }
.mdetail-prose em,
.mdetail-prose i { font-style: italic; }
.mdetail-prose blockquote {
  margin: 0 0 0.9em;
  padding: 0.65em 0.9em;
  border-left: 3px solid rgba(247, 205, 120, 0.55);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.72);
}
.mdetail-prose code,
.mdetail-prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}
.mdetail-prose code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
}
.mdetail-prose pre {
  margin: 0 0 0.9em;
  padding: 0.75em 0.9em;
  border-radius: 8px;
  background: rgba(0,0,0,0.35);
  overflow-x: auto;
}
.mdetail-prose hr {
  margin: 1.1em 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mdetail-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  line-height: 1.5;
}
.mdetail-list--check { list-style: none; padding-left: 0; }
.mdetail-list--check li::before { content: "✓ "; color: #f7cd78; }
.mdetail-faq { display: grid; gap: 8px; }
.mdetail-faq-item {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  padding: 10px 12px;
}
.mdetail-faq-item summary { cursor: pointer; font-weight: 600; color: #fff; }
.mdetail-faq-item p { margin: 8px 0 0; color: rgba(255,255,255,0.7); font-size: 0.88rem; line-height: 1.5; }
.mdetail-empty { color: rgba(255,255,255,0.45); font-size: 0.88rem; }
.mdetail-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #10161f;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mdetail-card--offer {
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #141b26 0%, #0e141c 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}
.mdetail-card--soft { background: #10161f; }
.mdetail-offer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px;
}
.mdetail-card-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.mdetail-offer-identity { min-width: 0; flex: 1; }
.mdetail-card-top > .mdetail-badge { margin-left: auto; flex-shrink: 0; }
.mdetail-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #0a0d12;
  color: #f7cd78;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.mdetail-logo img { width: 100%; height: 100%; object-fit: cover; }
.mdetail-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}
.mdetail-card-title h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mdetail-badge {
  flex-shrink: 0;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f7cd78;
  color: #1a1408;
}
.mdetail-provider { margin: 3px 0 0; font-size: 0.8rem; color: rgba(255,255,255,0.52); }
.mdetail-rating {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #fff;
}
.mdetail-stars { display: inline-flex; gap: 2px; color: rgba(255,255,255,0.18); }
.mdetail-stars svg.is-on { color: #f7cd78; }
.mdetail-rating strong { font-weight: 700; }
.mdetail-rating small { color: rgba(255,255,255,0.45); }
.mdetail-fav-btn {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: transparent;
  color: #fda4a4;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.mdetail-fav-btn:hover,
.mdetail-fav-btn[aria-pressed="true"] {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}
.mdetail-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.mdetail-tags span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.72rem;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.78);
  line-height: 1.25;
  min-width: 0;
}
.mdetail-meta-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.07);
}
.mdetail-meta-box:has(.mdetail-meta-item:only-child) { grid-template-columns: 1fr; }
.mdetail-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mdetail-meta-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f7cd78;
  background: rgba(247, 205, 120, 0.12);
  border: 1px solid rgba(247, 205, 120, 0.28);
}
.mdetail-meta-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
}
.mdetail-meta-item > div {
  min-width: 0;
  flex: 1 1 auto;
}
.mdetail-meta-item > div > span {
  display: block;
  font-size: 0.66rem;
  color: rgba(255,255,255,0.48);
  margin-bottom: 2px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.mdetail-meta-item > div > strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}
.mdetail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe1a0, #f7cd78);
  color: #1a1408;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(247, 205, 120, 0.18);
}
.mdetail-cta:hover { filter: brightness(1.04); }
.mdetail-cta-note { margin: -2px 0 0; text-align: center; font-size: 0.74rem; color: rgba(255,255,255,0.48); }
.mdetail-feature-grid {
  list-style: none;
  margin: 2px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
}
.mdetail-feature-grid li {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  row-gap: 1px;
  align-items: center;
}
.mdetail-feature-icon {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #f7cd78;
  background: rgba(247, 205, 120, 0.08);
  border: 1px solid rgba(247, 205, 120, 0.35);
}
.mdetail-feature-grid strong {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.mdetail-feature-grid em {
  font-style: normal;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.48);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.mdetail-card h3 { margin: 0; font-size: 0.92rem; color: #fff; }
.mdetail-specs { margin: 0; display: grid; gap: 8px; }
.mdetail-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.78rem;
}
.mdetail-specs dt { color: rgba(255,255,255,0.45); }
.mdetail-specs dd { margin: 0; color: #fff; text-align: right; }
.mdetail-similar-head { display: flex; justify-content: space-between; align-items: center; }
.mdetail-similar-head a { font-size: 0.75rem; color: #f7cd78; text-decoration: none; }
.mdetail-similar { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mdetail-similar a {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.mdetail-similar a:hover { border-color: rgba(247,205,120,0.35); }
.mdetail-similar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(247,205,120,0.12);
  color: #f7cd78;
  font-weight: 700;
  font-size: 0.85rem;
}
.mdetail-similar-logo img { width: 100%; height: 100%; object-fit: cover; }
.mdetail-similar strong { display: block; font-size: 0.82rem; color: #fff; }
.mdetail-similar small { color: rgba(255,255,255,0.45); font-size: 0.7rem; }
.mdetail-similar em { font-style: normal; font-size: 0.72rem; color: #f7cd78; }
@media (max-width: 1100px) {
  .mdetail-top { grid-template-columns: 1fr; }
  .mdetail-hero { min-height: 380px; }
  .mdetail-similar--row { grid-template-columns: 1fr; }
  .mdetail-examples { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .mdetail-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mdetail-hero { min-height: 340px; }
  .mdetail-hero-media { min-height: 340px; }
  .mdetail-hero-copy {
    width: 100%;
    top: auto;
    bottom: 0;
    padding: 36px 16px 20px;
  }
  .mdetail-highlights { grid-template-columns: 1fr; max-width: none; }
  .mdetail-examples { grid-template-columns: 1fr; }
  .mdetail-feature-grid { grid-template-columns: 1fr; }
  .mdetail-offer-head { flex-direction: column; }
  .mdetail-fav-btn { width: 100%; justify-content: center; }
  .mdetail-meta-box { grid-template-columns: 1fr; }
  .mdetail-panel-head { flex-direction: column; }
  .mdetail-tabs {
    display: flex;
    overflow-x: auto;
    gap: 0;
    scrollbar-width: none;
  }
  .mdetail-tabs::-webkit-scrollbar { display: none; }
  .mdetail-tab {
    flex: 0 0 auto;
    min-width: 6.5rem;
    padding: 12px 14px 11px;
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   Image Studio
   ========================================================================== */

body.image-studio-layout,
body.video-studio-layout {
  overflow: hidden;
}

body.image-studio-layout .models-layout,
body.video-studio-layout .models-layout {
  min-height: calc(100dvh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  align-items: stretch;
  overflow: hidden;
}

body.image-studio-layout .models-layout-main,
body.video-studio-layout .models-layout-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body.image-studio-layout .app-sidebar,
body.video-studio-layout .app-sidebar {
  height: calc(100dvh - var(--header-h) - var(--sidebar-gap));
  max-height: calc(100dvh - var(--header-h) - var(--sidebar-gap));
}

.istudio-main-video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #0b0b0c;
  border-radius: inherit;
}

.istudio-thumb video,
.istudio-history-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.istudio {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Match sidebar column gap so top inset equals left inset. */
  padding: 10px 0 12px;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.istudio-hero {
  position: relative;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 112px;
  background: #050A10;
}

.istudio-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.istudio-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050A10 0%, rgba(5, 10, 16, 0.85) 12%, transparent 30%, transparent 70%, rgba(5, 10, 16, 0.75) 88%, #050A10 100%),
    linear-gradient(180deg, #050A10 0%, transparent 28%, transparent 72%, #050A10 100%);
  pointer-events: none;
}

.istudio-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 112px;
  padding: 18px 4px;
}

.istudio-hero-copy {
  max-width: 52ch;
  min-width: 0;
}

.istudio-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.istudio-hero-copy > p {
  margin: 0;
  max-width: 52ch;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.86);
}

.istudio-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--gold-gradient);
  color: #1A1206;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(247, 205, 120, 0.16);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.istudio-hero-cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.istudio-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 28, 40, 0.95), rgba(10, 18, 27, 0.92));
}

.istudio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.istudio-brand h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.istudio-brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #1a1204;
  background: var(--gold-gradient);
}

.istudio-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.istudio-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.istudio-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.istudio-tab.is-active {
  color: #1a1204;
  background: var(--gold-gradient);
}

.istudio-tab.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.istudio-top-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.istudio-ghost-btn,
.istudio-soft-btn,
.istudio-link {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}

.istudio-ghost-btn:hover,
.istudio-soft-btn:hover,
.istudio-link:hover {
  color: var(--gold-bright);
  border-color: var(--border-gold);
}

.istudio-link {
  border: 0;
  background: transparent;
  padding: 0;
}

.istudio-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.istudio-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(10, 18, 27, 0.92);
  min-height: 0;
}

.istudio-controls,
.istudio-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
}

.istudio-block {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.istudio-block:last-child {
  border-bottom: 0;
}

.istudio-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.istudio-block-head h2,
.istudio-block-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.istudio-block-head h2 {
  margin: 0;
}

.istudio-chars {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.istudio-block--prompt {
  padding-top: 14px;
  padding-bottom: 8px;
  border-bottom: 0;
}

.istudio-block--advanced {
  padding-top: 8px;
  border-bottom: 0;
}

.istudio-advanced-shell {
  display: grid;
  gap: 12px;
}

.istudio-advanced-head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(245, 246, 248, 0.72);
}

.istudio-field--aspect {
  margin-bottom: 0;
}

.istudio-img2img-shell {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(6, 12, 18, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 12px 14px 14px;
}

.istudio-img2img-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.istudio-img2img-head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(245, 246, 248, 0.72);
}

.istudio-img2img-hint {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.istudio-img2img-body {
  display: grid;
  gap: 10px;
}

.istudio-photo-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.istudio-photo-modes[hidden] {
  display: none !important;
}

.istudio-field.is-locked,
[data-istudio-opt].is-locked {
  opacity: 0.45;
  pointer-events: none;
}

.istudio-aspect-shape--auto {
  width: 18px;
  max-height: 18px;
  border-radius: 999px;
  --ar: 1;
}

.istudio-photo-mode {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 246, 248, 0.78);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.istudio-photo-mode:hover {
  border-color: rgba(247, 205, 120, 0.35);
  color: #fff;
}

.istudio-photo-mode.is-active {
  border-color: rgba(247, 205, 120, 0.65);
  color: #f7cd78;
  background: rgba(247, 205, 120, 0.08);
}

.istudio-photo-hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.istudio-frames {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.istudio-frames.is-single-frame {
  grid-template-columns: 1fr;
}

.istudio-frame[hidden] {
  display: none !important;
}

.istudio-frame-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1a1510;
  background: #f7cd78;
  vertical-align: middle;
}

.istudio-frame-badge--muted {
  color: rgba(245, 246, 248, 0.75);
  background: rgba(255, 255, 255, 0.1);
}

.istudio-frames[hidden],
.istudio-refs[hidden],
[data-istudio-photo-panel][hidden],
.istudio-mention[hidden],
[data-istudio-opt="resize"][hidden],
[data-istudio-duration-picks][hidden],
[data-istudio-duration-range][hidden],
[data-istudio-duration-slider-head][hidden] {
  display: none !important;
}

.istudio-prompt-wrap {
  position: relative;
}

.istudio-mention {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 2px;
  width: 148px;
  max-height: min(220px, 40vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #151518;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.istudio-mention-empty {
  margin: 0;
  padding: 8px 10px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.istudio-mention-item {
  appearance: none;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(245, 246, 248, 0.92);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.istudio-mention-item:hover,
.istudio-mention-item.is-active {
  background: rgba(247, 205, 120, 0.12);
}

.istudio-mention-item img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: #0b0b0c;
}

.istudio-mention-item strong {
  font-size: 0.86rem;
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.istudio-refs {
  display: grid;
  gap: 10px;
}

.istudio-refs-drop {
  min-height: 120px;
}

.istudio-refs-drop-copy {
  display: grid;
  gap: 6px;
  place-items: center;
  text-align: center;
  padding: 12px;
}

.istudio-refs-plus {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.35rem;
  line-height: 1;
  color: #f7cd78;
}

.istudio-refs-drop-copy strong {
  font-size: 0.88rem;
  color: rgba(245, 246, 248, 0.92);
}

.istudio-refs-drop-copy em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.istudio-refs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.istudio-refs-grid[hidden] {
  display: none !important;
}

.istudio-refs-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111;
}

.istudio-refs-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.istudio-refs-item-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #1a1510;
  background: rgba(247, 205, 120, 0.92);
}

.istudio-refs-item button {
  appearance: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.istudio-frame {
  display: grid;
  gap: 6px;
  min-width: 0;
  justify-items: stretch;
}

.istudio-frame-label {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.istudio-frame-drop {
  position: relative;
  min-height: 110px;
  cursor: pointer;
}

.istudio-frame-empty {
  display: grid;
  gap: 4px;
  text-align: center;
  padding: 10px;
}

.istudio-frame-empty strong {
  font-size: 0.82rem;
  color: rgba(245, 246, 248, 0.9);
}

.istudio-frame-empty em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.istudio-frame-preview {
  position: absolute;
  inset: 0;
  display: block;
}

.istudio-frame-preview[hidden] {
  display: none !important;
}

.istudio-frame-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.istudio-frame-remove {
  appearance: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.istudio-frame-remove:hover {
  background: rgba(0, 0, 0, 0.88);
}

.istudio-motion-shell {
  display: grid;
  gap: 14px;
}

.istudio-motion-media {
  margin: 0;
}

.istudio-motion-field {
  margin: 0;
}

.istudio-motion-duration {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.istudio-motion-duration[hidden] {
  display: none !important;
}

.istudio-frame-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  background: #0b0c10;
}

@media (max-width: 520px) {
  .istudio-frames {
    grid-template-columns: 1fr;
  }
}

.istudio-img2img-drop {
  display: grid;
  place-items: center;
  min-height: 84px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.istudio-img2img-drop:hover {
  border-color: rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.05);
}

.istudio-img2img-drop-copy {
  display: grid;
  gap: 4px;
  text-align: center;
  padding: 10px;
}

.istudio-img2img-drop-copy strong {
  font-size: 0.86rem;
  color: rgba(245, 246, 248, 0.9);
}

.istudio-img2img-drop-copy em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.istudio-img2img-previews {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.istudio-img2img-previews[hidden] {
  display: none !important;
}

.istudio-img2img-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

.istudio-img2img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.istudio-img2img-item button {
  appearance: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.78);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.istudio-prompt-shell {
  display: grid;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(6, 12, 18, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.istudio-prompt-shell:focus-within {
  border-color: rgba(247, 205, 120, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 3px rgba(247, 205, 120, 0.1);
}

.istudio-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px 0;
}

.istudio-prompt-head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(245, 246, 248, 0.72);
}

.istudio-model-select {
  display: grid;
  gap: 6px;
}

.istudio-model-select select,
.istudio-field select,
.istudio-field input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(3, 11, 17, 0.75);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

.istudio-prompt,
.istudio-negative {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 10px 14px 12px;
  outline: none;
  box-shadow: none;
}

.istudio-prompt {
  resize: none;
  min-height: 132px;
  line-height: 1.55;
  font-size: 0.84rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  max-height: 220px;
}

.istudio-prompt[contenteditable="true"]:empty:before {
  content: attr(data-placeholder);
  color: rgba(245, 246, 248, 0.38);
  pointer-events: none;
}

.istudio-prompt::placeholder,
.istudio-negative::placeholder {
  color: rgba(245, 246, 248, 0.38);
}

.istudio-mention-chip {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin: 0 3px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(247, 205, 120, 0.45);
  background: rgba(247, 205, 120, 0.12);
  width: 28px;
  height: 28px;
  cursor: default;
}

.istudio-mention-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.istudio-prompt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px;
  min-height: 0;
}

.istudio-prompt-foot:not(:has(button:not([hidden]))) {
  display: none;
}

.istudio-prompt-foot .istudio-soft-btn {
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
}

.istudio-negative {
  margin: 0 12px 12px;
  width: calc(100% - 24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  padding: 9px 11px;
  resize: none;
  min-height: 64px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.istudio-model-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.istudio-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.istudio-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.istudio-field[hidden],
.istudio-block[hidden],
.istudio-soft-btn[hidden],
.istudio-negative[hidden],
[data-istudio-opt][hidden] {
  display: none !important;
}

.istudio-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.istudio-aspects {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.istudio-qualities {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.istudio-render-qualities {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.istudio-render-qualities .istudio-aspect {
  min-height: 40px;
  padding: 8px 2px;
}

.istudio-render-qualities .istudio-aspect strong {
  font-size: 0.65rem;
}

.istudio-counts {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
}

.istudio-aspect {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 8px 6px;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 58px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.istudio-aspect:hover {
  border-color: rgba(247, 205, 120, 0.3);
  background: rgba(247, 205, 120, 0.05);
}

.istudio-aspect-shape {
  display: block;
  width: min(100%, 22px);
  max-height: 20px;
  aspect-ratio: var(--ar, 1);
  border-radius: 3px;
  border: 1.5px solid rgba(245, 246, 248, 0.45);
  background: transparent;
}

.istudio-aspect strong {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(245, 246, 248, 0.78);
  line-height: 1;
}

.istudio-aspect.is-active {
  border-color: rgba(247, 205, 120, 0.55);
  background: rgba(247, 205, 120, 0.1);
}

.istudio-aspect.is-active .istudio-aspect-shape {
  border-color: var(--gold-bright, #f7cd78);
}

.istudio-aspect.is-active strong {
  color: var(--gold-bright, #f7cd78);
}

.istudio-count {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 7px 2px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.istudio-count.is-active {
  color: #1a1204;
  border-color: transparent;
  background: var(--gold-gradient);
}

.istudio-advanced-other {
  display: grid;
  gap: 12px;
}

.istudio-advanced-other[hidden] {
  display: none !important;
}

.istudio-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.istudio-slider-head label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.istudio-slider-field input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

.istudio-duration-field {
  gap: 8px;
}

.istudio-duration-field .istudio-slider-head strong {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.istudio-duration-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--gold) 0%,
    var(--gold) var(--pct, 0%),
    rgba(255, 255, 255, 0.14) var(--pct, 0%),
    rgba(255, 255, 255, 0.14) 100%
  );
  outline: none;
  cursor: pointer;
  accent-color: var(--gold);
}

.istudio-duration-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.istudio-duration-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  border: 2px solid rgba(26, 18, 4, 0.85);
  background: var(--gold);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.istudio-duration-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.istudio-duration-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 18, 4, 0.85);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.istudio-generate-wrap {
  margin-top: auto;
  padding: 16px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(10, 18, 27, 0.98) 28%);
}

.istudio-generate {
  position: relative;
  isolation: isolate;
  width: 100%;
  border: 1px solid rgba(255, 225, 160, 0.55);
  border-radius: 14px;
  padding: 13px 14px 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: #1a1204;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, transparent 42%),
    linear-gradient(135deg, #ffe9b8 0%, #f7cd78 48%, #e0a84a 100%);
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 -1px 0 rgba(120, 70, 10, 0.18) inset,
    0 10px 28px rgba(247, 205, 120, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}

.istudio-generate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.istudio-generate:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-2px);
  border-color: rgba(255, 235, 190, 0.85);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -1px 0 rgba(120, 70, 10, 0.16) inset,
    0 16px 36px rgba(247, 205, 120, 0.38),
    0 4px 12px rgba(0, 0, 0, 0.28);
}

.istudio-generate:hover:not(:disabled)::before {
  transform: translateX(120%);
}

.istudio-generate:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.98);
}

.istudio-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.istudio-generate-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.istudio-generate-icon {
  flex-shrink: 0;
  color: rgba(26, 18, 4, 0.82);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35));
}

.istudio-generate-cost,
.istudio-generate em {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: #1a1204;
  padding: 6px 10px 6px 11px;
  border-radius: 999px;
  background: rgba(26, 18, 4, 0.1);
  border: 1px solid rgba(26, 18, 4, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.istudio-generate-coin {
  flex-shrink: 0;
  opacity: 0.88;
}

.istudio-error-card {
  position: relative;
  z-index: 1;
  width: min(340px, calc(100% - 32px));
  padding: 28px 24px 22px;
  border-radius: 22px;
  border: 1px solid rgba(247, 205, 120, 0.28);
  text-align: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% -20%, rgba(247, 205, 120, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(180, 70, 70, 0.08), transparent 50%),
    linear-gradient(180deg, #161e2a 0%, #0a1119 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  animation: istudio-error-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes istudio-error-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.istudio-error-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(170, 190, 210, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.istudio-error-x:hover {
  color: var(--text);
  border-color: rgba(247, 205, 120, 0.4);
  background: rgba(247, 205, 120, 0.08);
}

.istudio-error-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffb4a8;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 200, 180, 0.22), transparent 55%),
    rgba(180, 60, 50, 0.16);
  border: 1px solid rgba(255, 160, 140, 0.28);
  box-shadow: 0 10px 28px rgba(120, 30, 24, 0.25);
}

.istudio-error-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}

.istudio-error-msg {
  margin: 0 0 20px;
  color: rgba(245, 246, 248, 0.72);
  font-size: 0.92rem;
  line-height: 1.5;
}

.istudio-error-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a1204;
  background: var(--gold-gradient);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 10px 24px rgba(247, 205, 120, 0.2);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.istudio-error-ok:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.istudio-empty-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.istudio-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(247, 205, 120, 0.08), transparent 55%),
    rgba(8, 14, 22, 0.95);
}

.istudio-work-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
  min-height: 0;
}

.istudio-work-head:not(:has([data-istudio-download]:not([hidden]))) {
  display: none;
}

.istudio-work-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.istudio-work-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.istudio-work-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.istudio-work-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.istudio-work-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.istudio-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.istudio-canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid rgba(170, 190, 210, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(247, 205, 120, 0.04), transparent 70%),
    #040a11;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.istudio-canvas-stage {
  position: absolute;
  inset: 12px;
  z-index: 1;
  min-width: 0;
  min-height: 0;
}

.istudio-canvas-stage[hidden] {
  display: none !important;
}

.istudio-canvas > .istudio-empty,
.istudio-canvas > .istudio-progress {
  position: absolute;
  inset: 0;
  width: auto;
  max-width: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.istudio-canvas[data-state="empty"] > .istudio-progress,
.istudio-canvas[data-state="empty"] > .istudio-canvas-stage,
.istudio-canvas[data-state="progress"] > .istudio-empty,
.istudio-canvas[data-state="progress"] > .istudio-canvas-stage,
.istudio-canvas[data-state="image"] > .istudio-empty,
.istudio-canvas[data-state="image"] > .istudio-progress {
  display: none !important;
}

.istudio-canvas[data-state="image"] > .istudio-canvas-stage {
  display: block !important;
}

.istudio-canvas[data-state="image"] .istudio-main-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  animation: istudio-fade 0.4s ease both;
}

.istudio-canvas[data-state="progress"] > .istudio-progress {
  z-index: 2;
  display: flex !important;
  padding: 24px;
  background: rgba(5, 11, 18, 0.96);
}

.istudio-canvas[data-state="progress"] > .istudio-progress .istudio-progress-bar {
  width: min(560px, 72%);
}

.istudio-canvas[data-state="progress"] > .istudio-progress p {
  width: min(560px, 72%);
}

.istudio-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  animation: istudio-fade 0.45s ease both;
}

.istudio-empty strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.istudio-progress {
  text-align: center;
}

.istudio-progress[hidden],
.istudio-empty[hidden],
.istudio-thumbs[hidden],
.istudio-secondary[hidden] {
  display: none !important;
}

.istudio-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}

.istudio-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold-gradient);
  transition: width 0.35s ease;
}

.istudio-progress p {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.istudio-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 12px;
  min-width: 0;
}

.istudio-strip[hidden] {
  display: none !important;
}

.istudio-strip-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 246, 248, 0.85);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.istudio-strip-btn:hover:not(:disabled) {
  border-color: rgba(247, 205, 120, 0.45);
  color: var(--gold-bright, #f7cd78);
  background: rgba(247, 205, 120, 0.08);
}

.istudio-strip-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.istudio-strip.is-centered .istudio-strip-btn {
  display: none;
}

.istudio-thumbs {
  display: flex;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: 76px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.istudio-thumbs::-webkit-scrollbar {
  display: none;
}

.istudio-strip.is-centered .istudio-thumbs {
  justify-content: center;
  overflow: hidden;
}

.istudio-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  background: #0a121b;
  cursor: pointer;
  outline: none;
}

.istudio-thumb:focus,
.istudio-thumb:focus-visible {
  outline: none;
}

.istudio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.istudio-thumb.is-active {
  border-color: var(--gold);
}

.istudio-thumb.is-pending {
  border-color: rgba(247, 205, 120, 0.55);
  background: #0d1520;
}

.istudio-thumb-pending {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.04) 25%, rgba(247, 205, 120, 0.18) 45%, rgba(255, 255, 255, 0.04) 65%);
  background-size: 200% 100%;
  animation: istudio-shimmer 1.2s linear infinite;
}

.istudio-thumb.is-failed {
  border-color: rgba(255, 120, 120, 0.55);
}

.istudio-thumb-failed {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ff8f8f;
  font-weight: 700;
}

@keyframes istudio-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.istudio-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.istudio-history {
  display: grid;
  gap: 8px;
}

.istudio-history-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.istudio-history-item:hover {
  border-color: var(--border-gold);
  background: rgba(247, 205, 120, 0.05);
}

.istudio-history-item.is-pending {
  border-color: rgba(247, 205, 120, 0.45);
  background: rgba(247, 205, 120, 0.04);
}

.istudio-history-item.is-failed {
  border-color: rgba(255, 120, 120, 0.4);
}

.istudio-history-thumb,
.istudio-history-ph,
.istudio-history-pending,
.istudio-history-failed {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #121a24;
  display: block;
}

.istudio-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.istudio-history-pending {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.04) 25%, rgba(247, 205, 120, 0.2) 45%, rgba(255, 255, 255, 0.04) 65%);
  background-size: 200% 100%;
  animation: istudio-shimmer 1.2s linear infinite;
  border: 1px solid rgba(247, 205, 120, 0.45);
}

.istudio-history-failed {
  display: grid;
  place-items: center;
  color: #ff8f8f;
  font-weight: 700;
}

.istudio-history-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.istudio-history-meta strong {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.istudio-history-meta small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.istudio-history-bar {
  display: block;
  height: 3px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.istudio-history-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold-gradient);
  transition: width 0.35s ease;
}

.istudio-popular {
  display: grid;
  gap: 10px;
}

.istudio-popular-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.istudio-popular-card strong {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 4px;
}

.istudio-popular-card p {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

@keyframes istudio-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  body.image-studio-layout,
  body.video-studio-layout {
    overflow: auto;
  }

  body.image-studio-layout .models-layout,
  body.video-studio-layout .models-layout {
    height: auto;
    max-height: none;
    min-height: calc(100dvh - var(--header-h));
    overflow: visible;
  }

  body.image-studio-layout .models-layout-main,
  body.video-studio-layout .models-layout-main {
    height: auto;
    overflow: visible;
  }

  .istudio {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .istudio-hero-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 2px;
  }

  .istudio-hero-cta {
    width: 100%;
  }

  .istudio-grid {
    grid-template-columns: 1fr;
  }

  .istudio-controls,
  .istudio-workspace {
    height: auto;
    max-height: none;
  }

  .istudio-top-actions {
    width: 100%;
    margin-left: 0;
  }

  .istudio-workspace {
    min-height: 420px;
  }

  .istudio-canvas {
    min-height: 280px;
  }
}

/* Image Studio — model card + picker modal */
.istudio-block--model {
  padding-bottom: 14px;
}

.istudio-model-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 160px;
  border: 1px solid rgba(170, 190, 210, 0.14);
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  text-align: left;
  background: #070d14;
  isolation: isolate;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.istudio-model-card:hover {
  border-color: rgba(247, 205, 120, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.istudio-model-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.istudio-model-card-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 11, 18, 0.15) 20%, rgba(5, 11, 18, 0.82) 100%),
    linear-gradient(90deg, rgba(5, 11, 18, 0.35), transparent 55%);
}

.istudio-model-card-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px;
}

.istudio-model-card-id,
.istudio-modal-card-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Match name + provider line heights (0.95rem×1.2 + 0.72rem×1.2 + 2px gap). */
.istudio-model-card-logo {
  flex: 0 0 auto;
  width: calc(0.95rem * 1.2 + 0.72rem * 1.2 + 2px);
  height: calc(0.95rem * 1.2 + 0.72rem * 1.2 + 2px);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
}

.istudio-modal-card-logo {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
}

.istudio-model-card-logo img,
.istudio-modal-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.istudio-model-card-initial {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1a1204;
  background: var(--gold-gradient);
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.istudio-model-card-copy,
.istudio-modal-card-id span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.istudio-model-card-copy strong,
.istudio-modal-card-id strong {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.istudio-model-card-copy em,
.istudio-modal-card-id em {
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1.2;
  color: rgba(245, 246, 248, 0.72);
}

.istudio-modal[hidden] {
  display: none !important;
}

.istudio-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 20px;
}

.istudio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 12, 0.52);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.istudio-modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(247, 205, 120, 0.28);
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(247, 205, 120, 0.12), transparent 55%),
    linear-gradient(180deg, #121a24 0%, #0a121b 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 20px;
  animation: istudio-fade 0.28s ease both;
}

.istudio-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.istudio-modal-head h2 {
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.istudio-modal-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.istudio-modal-x {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.istudio-modal-x:hover {
  color: var(--text);
  border-color: var(--border-gold);
}

.istudio-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.istudio-modal-card {
  position: relative;
  min-height: 168px;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  text-align: left;
  background: #071018;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.istudio-modal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(247, 205, 120, 0.45);
}

.istudio-modal-card.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(247, 205, 120, 0.35);
}

.istudio-modal-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.istudio-modal-card-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 11, 18, 0.1) 25%, rgba(5, 11, 18, 0.88) 100%);
}

.istudio-modal-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1a1204;
  background: var(--gold-gradient);
}

.istudio-modal-card-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.istudio-modal-card-price {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--gold-bright);
  background: rgba(8, 12, 18, 0.65);
  border: 1px solid rgba(247, 205, 120, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
}

body.istudio-modal-open {
  overflow: hidden;
}

/* overflow:hidden on the studio shell breaks backdrop-filter — blur the page behind instead */
body.istudio-modal-open .site-header,
body.istudio-modal-open .sidebar-backdrop,
body.istudio-modal-open .models-layout {
  filter: blur(10px);
  transition: filter 0.22s ease;
  pointer-events: none;
  user-select: none;
}

body.istudio-modal-open .istudio-modal {
  filter: none;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .istudio-modal-grid {
    grid-template-columns: 1fr;
  }

  .istudio-model-card {
    min-height: 132px;
  }
}
