/* Wolfie Digital · studioul. Cadrul e cel de la Wolfie Spaces (bară laterală 264 px,
   bară de sus, panou rotunjit), pe întuneric; compozitorul de jos e piesa nouă. */

html, body { height: 100%; overscroll-behavior: none; }
body { overflow: hidden; }
.ic { width: 20px; height: 20px; flex: none; }

.boot { display: grid; place-items: center; height: 100dvh; }
.boot img { border-radius: 16px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.94); opacity: 0.7; } }

/* ── Cod de acces / erori ── */
.auth { height: 100dvh; overflow-y: auto; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(420px, 100%); padding: 34px 30px 28px; display: grid; gap: 16px; }
.auth-card .brand, .auth-logo { justify-self: center; }
.auth-logo { border-radius: 14px; }
.auth-card h1 { font-size: 24px; text-align: center; margin-top: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); margin-top: -6px; }
.auth-card form, .auth-card { align-content: start; }
.auth-alt { text-align: center; font-size: 14.5px; color: var(--muted); }
.auth-alt a { color: var(--gold-ink); font-weight: 700; text-decoration: none; }
.auth-back { text-align: center; font-size: 13.5px; }
.auth-back a { color: var(--muted); }
.form-note { padding: 10px 14px; border-radius: var(--r); background: var(--info-bg); color: var(--info); font-size: 14px; font-weight: 600; }
.sso-btn { gap: 12px; text-decoration: none; transition: background-color 0.15s ease, transform 0.16s ease-out; }
.sso-btn:active { transform: scale(0.98); }
.sso-btn .g-logo { width: 20px; height: 20px; }
.sso-btn .w-logo { width: 22px; height: 22px; border-radius: 6px; }
.auth-card .sso-btn + .sso-btn { margin-top: -6px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--hair); }

/* ── Cumpărarea creditelor ── */
.meter-buy { width: 100%; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.pack { position: relative; display: grid; justify-items: center; gap: 2px; padding: 22px 12px 16px; border-radius: var(--r-lg, 18px); border: 0; color: var(--ink); text-align: center; cursor: pointer; transition: transform 0.16s ease-out, box-shadow 0.2s ease; }
.pack b { font-size: 30px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pack > span:not(.badge) { color: var(--muted); font-size: 13px; font-weight: 600; }
.pack strong { margin-top: 8px; font-size: 18px; color: var(--gold-ink); }
.pack small { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.pack .badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.pack.popular { box-shadow: inset 0 0 0 1.5px rgba(242, 183, 5, 0.55); }
.pack:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .pack:hover { box-shadow: inset 0 0 0 1.5px rgba(242, 183, 5, 0.8); } }
.pay-rows { display: grid; gap: 6px; margin: 14px 0; }
.pay-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) 36px; align-items: center; gap: 10px; min-height: 44px; padding: 6px 6px 6px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.pay-row span { color: var(--muted); font-size: 13px; }
.pay-row b { font-size: 14.5px; overflow-wrap: anywhere; }
.pay-row.strong { background: var(--gold-soft); }
.pay-row.strong b { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 17px; letter-spacing: 0.06em; color: var(--gold-ink); }
.pay-wait { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--gold-soft); }
.pay-wait > .ic { color: var(--gold); width: 24px; height: 24px; margin-top: 2px; }
.pay-wait p { margin-top: 4px; color: var(--ink-2); }
.mono { font-family: ui-monospace, Consolas, Menlo, monospace; letter-spacing: 0.04em; }
.orders-table .admin-row { grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 196px; }
@media (max-width: 720px) { .orders-table .admin-row { grid-template-columns: minmax(0, 1fr) 196px; } }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) {
  .packs { grid-template-columns: minmax(0, 1fr); }
  .pay-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pay-row span { grid-column: 1 / -1; }
}

/* ── Istoricul creditelor ── */
.ledger { display: grid; max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--hair); }
.ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--hair); font-size: 14px; }
.ledger-what { display: grid; gap: 1px; color: var(--ink); font-weight: 600; }
.ledger-what small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ledger-when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ledger-row b { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-row b.plus { color: var(--ok); }
.ledger-row b.minus { color: var(--ink-2); }

/* ── Admin ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.stat { display: grid; gap: 4px; padding: 16px; border-radius: 16px; }
.stat span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stat b { font-size: 24px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.admin-table { display: grid; gap: 2px; }
.admin-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 0.8fr 0.9fr 0.8fr 110px; align-items: center; gap: 12px; min-height: 56px; padding: 6px 12px; border-radius: 12px; font-size: 14px; }
.admin-row.head { min-height: 34px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.admin-row:not(.head):nth-child(even) { background: rgba(255, 255, 255, 0.025); }
.admin-user { display: grid; gap: 1px; min-width: 0; }
.admin-user b, .admin-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user small { font-size: 12.5px; color: var(--muted); }
.admin-user .badge { height: 20px; font-size: 11px; vertical-align: 1px; }
.admin-row > b { font-variant-numeric: tabular-nums; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 720px) {
  .admin-row { grid-template-columns: minmax(0, 1fr) 60px 110px; }
  .admin-row > :nth-child(2), .admin-row > :nth-child(3), .admin-row > :nth-child(4) { display: none; }
}
.form-error { padding: 10px 14px; border-radius: var(--r); background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }

/* ── Cadru: bară laterală + zonă principală ── */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 14px; height: 100dvh; padding: 14px; }
.sidebar { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px 16px; overflow-y: auto; }
.sidebar > * { flex-shrink: 0; }
.sidebar .brand { padding: 0 6px 10px; }
.new-btn { justify-content: flex-start; margin: 6px 0 12px; height: 48px; padding: 0 18px 0 14px; border-radius: 16px; font-size: 15px; }
.nav-group { display: grid; gap: 2px; }
.nav-sep { height: 1px; margin: 10px 8px; background: var(--hair); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: background-color 0.15s, color 0.15s;
}
.nav-item .ic { color: var(--muted); transition: color 0.15s; }
@media (hover: hover) and (pointer: fine) { .nav-item:hover { background: var(--hover); color: var(--ink); } }
.nav-item { position: relative; z-index: 1; }
.nav-item.on { color: var(--gold-ink); }
/* pastila care alunecă sub pagina activă (moveGlider) */
.nav-glider {
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 42px;
  border-radius: 12px;
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(242, 183, 5, 0.12);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: transform 280ms var(--ease-in-out), height 280ms var(--ease-in-out), opacity 200ms ease;
}
.nav-item.on .ic { color: var(--gold); }
.nav-item .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--gold); color: #1a1200; font-size: 12px; font-weight: 800; }

.meter { margin-top: auto; padding: 16px 14px 14px; border-radius: var(--r-lg); display: grid; gap: 10px; }
.meter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; }
.meter-head span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.meter-head .ic { width: 17px; height: 17px; color: var(--gold); }
.meter-head b { font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.meter-bar { height: 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter-bar b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #ffcf3f); transition: width 0.6s var(--ease); }
.meter.warn .meter-bar b { background: linear-gradient(90deg, #f08a24, #e2574c); }
.meter-text { font-size: 12.5px; color: var(--muted); }
.meter-worth { margin-top: -4px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gen-btn .cost-lei { margin-left: 5px; font-size: 11px; font-weight: 700; opacity: 0.72; }
.mo-cost small { margin-left: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
@media (max-width: 420px) { .gen-btn .cost-lei { display: none; } }

.main { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 20px; z-index: 2; }
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 560px; }
.search .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 16px 0 46px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--hair); font-size: 15px; transition: box-shadow 0.2s, background-color 0.2s; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1.5px rgba(242, 183, 5, 0.6); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mode-badge { height: 30px; border: 0; cursor: pointer; }
.mode-badge .ic { width: 15px; height: 15px; }
span.mode-badge { cursor: default; }
.credit-pill { display: none; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.credit-pill .ic { width: 15px; height: 15px; color: var(--gold); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: linear-gradient(145deg, #1b3766, var(--navy)); color: var(--gold); font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 16px -8px rgba(0, 0, 0, 0.9); }

.content { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: var(--r-xl); overflow: hidden; }
.scroller { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 22px 24px 40px; scrollbar-gutter: stable; }
.scroller::-webkit-scrollbar { width: 10px; }
.scroller::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 9px; border: 3px solid transparent; background-clip: content-box; }
.view-image .scroller, .view-video .scroller { padding-bottom: 210px; }

/* ── Antete ── */
.studio-head, .page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 18px; }
.studio-head h1, .page-head h1 { font-size: 26px; letter-spacing: -0.03em; }
.studio-head .muted, .page-head .muted { font-size: 14px; font-weight: 600; }
.page-head { align-items: center; }
.tabs { margin-left: auto; display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 11px; text-decoration: none; font-size: 13.5px; font-weight: 650; color: var(--muted); transition: background-color 0.15s, color 0.15s; }
.tabs a .ic { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .tabs a:hover { color: var(--ink); } }
.tabs a[aria-selected='true'] { background: rgba(255, 255, 255, 0.1); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }

.section-label { display: flex; align-items: center; gap: 10px; margin: 30px 2px 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); }
.section-label a { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); text-decoration: none; font-weight: 650; }
.section-label a .ic { width: 16px; height: 16px; }

/* ── Galerie (zidărie pe coloane, ordinea: cele mai noi sus) ── */
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 12px; align-items: start; }
.gallery .col { display: grid; gap: 12px; min-width: 0; }
.gallery.is-empty { display: block; }

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--hair);
  isolation: isolate;
}
.tile > img, .tile > video { width: 100%; height: 100%; object-fit: cover; }
/* doar cardurile noi intră animat, în cascadă (vezi renderGallery) */
.tile.enter { animation: tile-in 460ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px) scale(0.98); filter: blur(6px); } }
/* pozele apar întregi, nu pe bucăți */
.tile > img, .recent-item img { opacity: 0; transition: opacity 280ms ease, transform 500ms var(--ease-out); }
.tile > img.loaded, .recent-item img.loaded { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .tile-done:hover > img, .tile-done:hover > video { transform: scale(1.025); } }
.tile-done > video { transition: transform 500ms var(--ease-out); }
.tile-open { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: zoom-in; border-radius: inherit; }
.tile-open:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.tile-over {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 36px 12px 11px;
  background: linear-gradient(180deg, transparent, rgba(3, 6, 12, 0.88));
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.tile-over p { font-size: 13px; line-height: 1.4; font-weight: 550; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-over span { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: var(--gold-ink); }
.tile-tools { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s; }
.tool-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  /* fără backdrop-filter: cu zeci de carduri, blur-ul pe fiecare buton încetinea derularea */
  background: rgba(6, 10, 19, 0.74);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background-color 0.15s, transform 0.15s var(--ease);
}
.tool-btn .ic { width: 17px; height: 17px; }
.tool-btn:active { transform: scale(0.92); }
@media (hover: hover) and (pointer: fine) { .tool-btn:hover { background: rgba(6, 10, 19, 0.85); } }
.tool-btn.on { color: #ff6b8b; }
.tool-btn.on .ic { fill: currentColor; }
.tile-badge { position: absolute; left: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; background: rgba(6, 10, 19, 0.6); font-size: 11.5px; font-weight: 800; color: #fff; pointer-events: none; }
.tile-badge .ic { width: 11px; height: 11px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .tile-done:hover .tile-over, .tile-done:focus-within .tile-over { opacity: 1; transform: none; }
  .tile-done:hover .tile-tools, .tile-done:focus-within .tile-tools { opacity: 1; }
}
@media (hover: none) {
  .tile-tools { opacity: 1; }
  .tile-tools .tool-btn:not(.on):not([data-act='fav']) { display: none; }
}
.tile-done .tool-btn.on { opacity: 1; }
.tile-done:has(.tool-btn.on) .tile-tools { opacity: 1; }

/* tile în lucru */
.tile-pending {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(242, 183, 5, 0.07), transparent 70%),
    rgba(255, 255, 255, 0.03);
  min-height: 140px;
}
.pend { display: grid; justify-items: center; gap: 4px; }
.pend-ic { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 14px; background: var(--gold-soft); color: var(--gold); }
.pend-ic .ic { width: 22px; height: 22px; animation: twinkle 1.6s var(--ease) infinite; }
@keyframes twinkle { 50% { transform: scale(0.8) rotate(20deg); opacity: 0.6; } }
.pend b { font-size: 14px; }
.pend-sub { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pend-prompt { max-width: 30ch; font-size: 12.5px; color: var(--faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* tile eșuat */
.tile-failed { display: grid; place-items: center; padding: 16px; min-height: 180px; background: rgba(255, 123, 110, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 123, 110, 0.2); }
.fail { display: grid; justify-items: center; gap: 6px; text-align: center; }
.fail > .ic { width: 26px; height: 26px; color: var(--bad); }
.fail b { font-size: 14.5px; }
.fail p { font-size: 12.5px; color: var(--muted); max-width: 34ch; }
.fail-actions { display: flex; gap: 6px; margin-top: 6px; }

/* ── Stare goală ── */
.empty { display: grid; justify-items: center; gap: 12px; padding: 70px 20px; text-align: center; }
.empty-art { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 28px; margin-bottom: 6px; color: var(--gold); }
.empty-art .ic { width: 40px; height: 40px; }
.empty h2 { font-size: 21px; }
.empty p { color: var(--muted); max-width: 32em; }
.empty .btn { margin-top: 8px; }

/* ── Compozitorul ── */
.dock {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  padding: 0 18px 18px;
  pointer-events: none;
}
.dock::before {
  /* ceața de deasupra compozitorului: galeria se stinge sub el */
  content: '';
  position: absolute;
  inset: -60px 0 0 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(6, 10, 19, 0.7) 55%);
  pointer-events: none;
}
.composer {
  pointer-events: auto;
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 12px 10px;
  border-radius: 24px;
  display: grid;
  gap: 8px;
  transition: box-shadow 0.25s var(--ease);
}
.composer:focus-within { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(242, 183, 5, 0.35), var(--shadow-lg); }
.composer.drop { box-shadow: inset 0 0 0 2px rgba(242, 183, 5, 0.8), var(--shadow-lg); }
.composer { grid-template-columns: minmax(0, 1fr); }
.comp-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.comp-main textarea {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  max-height: 200px;
  padding: 12px 6px 6px 4px;
  border: 0;
  background: transparent;
  resize: none;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
}
.comp-main textarea::placeholder { color: var(--faint); }
.comp-main textarea:focus { outline: none; box-shadow: none; }
#ref-slot:empty { display: none; }
.ref-slot {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 58px;
  height: 58px;
  flex: none;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--hair-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
button.ref-slot { border: 1.5px dashed rgba(255, 255, 255, 0.16); box-shadow: none; }
.ref-slot .ic { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) { button.ref-slot:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); border-color: rgba(242, 183, 5, 0.5); } }
.ref-slot.has { overflow: visible; cursor: default; }
.ref-slot.has img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
/* start → final (cadrul final și bucla, la video) */
#ref-slot { display: flex; flex: none; }
.ref-pair { display: flex; align-items: center; gap: 6px; }
.ref-to { width: 14px !important; height: 14px !important; color: var(--faint); flex: none; }
.ref-tag { position: absolute; left: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 5px; border-radius: 6px; background: rgba(6, 10, 19, 0.72); font-size: 9.5px; font-weight: 800; letter-spacing: 0.02em; color: #fff; pointer-events: none; }
.ref-slot.loop img { opacity: 0.55; }
.ref-slot.loop .ref-tag { color: var(--gold-ink); }
.vs-refs { display: flex; gap: 12px; }
.ref-x { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #1a2336; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2), 0 4px 10px rgba(0, 0, 0, 0.5); cursor: pointer; }
.ref-x .ic { width: 13px; height: 13px; }

.comp-bar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chips { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 24px 2px 2px; margin: -2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--hair);
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.chip .ic { width: 16px; height: 16px; color: var(--muted); }
.chip .chev { width: 14px; height: 14px; margin-left: -2px; }
@media (hover: hover) and (pointer: fine) { .chip:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); } }
.chip[aria-expanded='true'] { background: rgba(255, 255, 255, 0.12); color: var(--ink); }
.chip-model { color: var(--ink); }
.chip-model > .ic:first-child { color: var(--gold); }
.chip-static { cursor: default; opacity: 0.75; }
.chip-toggle[aria-pressed='true'] { background: var(--gold-soft); color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(242, 183, 5, 0.25); }
.chip-toggle[aria-pressed='true'] .ic { color: var(--gold); }
.ar { display: inline-block; flex: none; border: 1.6px solid currentColor; border-radius: 3px; opacity: 0.8; }
.enhance-btn { flex: none; height: 44px; padding: 0 14px; border-radius: 15px; font-size: 14px; }
.enhance-btn .ic { color: var(--gold); }
.comp-main textarea.thinking { opacity: 0.5; transition: opacity 200ms ease; }
.toast-action { margin-left: 6px; padding: 5px 10px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.1); color: var(--gold-ink); font-size: 13px; font-weight: 750; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .toast-action:hover { background: rgba(255, 255, 255, 0.16); } }
.gen-btn { flex: none; height: 44px; padding: 0 8px 0 16px; border-radius: 15px; font-size: 15px; font-weight: 750; }
.gen-btn .cost { display: inline-flex; align-items: center; gap: 4px; height: 30px; margin-left: 4px; padding: 0 10px 0 8px; border-radius: 10px; background: rgba(26, 18, 0, 0.14); font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gen-btn .cost .ic { width: 15px; height: 15px; }

/* ── Meniuri ── */
.menu { position: fixed; z-index: 80; min-width: 200px; max-width: calc(100vw - 16px); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; border-radius: 16px; animation: pop 0.16s var(--ease); }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.menu button:focus-visible { background: var(--hover); box-shadow: inset 0 0 0 1.5px rgba(242, 183, 5, 0.6); }
@media (hover: hover) and (pointer: fine) { .menu button:hover, .menu a:hover { background: var(--hover); } }
.menu .ic { width: 18px; height: 18px; color: var(--muted); }
.menu hr { margin: 5px 6px; border: 0; height: 1px; background: var(--hair); }
.menu-head { padding: 10px 12px 8px; }
.menu-head b { display: block; font-size: 14px; }
.menu-head span { font-size: 12.5px; color: var(--muted); }
.menu .opt-label { flex: 1; display: inline-flex; align-items: center; gap: 10px; }
.menu .opt-cost { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu .opt-cost .ic { width: 13px; height: 13px; color: var(--gold); }
.menu .opt-check { color: var(--gold); width: 17px; height: 17px; }
.menu [aria-checked='true'] { background: rgba(242, 183, 5, 0.08); }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(4px); } }

/* ── Stil și cameră ── */
.chip-look.set { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.chip .swatch { width: 16px; height: 16px; flex: none; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.look-menu { width: min(460px, calc(100vw - 16px)); }
.look-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px; }
.menu .look-opt { display: grid; justify-items: start; align-content: start; gap: 6px; min-height: 0; height: auto; padding: 6px; border-radius: 12px; font-size: 13px; }
.look-swatch { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); transition: transform 200ms var(--ease-out); }
/* poza-mostră acoperă gradientul (care rămâne doar cât se încarcă) */
.look-swatch img, .chip .swatch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.chip .swatch { position: relative; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .look-opt:hover .look-swatch { transform: scale(1.04); } }
.menu .look-opt[aria-checked='true'] { background: rgba(242, 183, 5, 0.1); box-shadow: inset 0 0 0 1.5px rgba(242, 183, 5, 0.6); }
.menu .look-opt.none { place-content: center; justify-items: center; color: var(--muted); }
.look-opt.none .ic { width: 22px; height: 22px; }
.camera-menu { width: min(280px, calc(100vw - 16px)); }

.model-menu { width: min(440px, calc(100vw - 16px)); }
.model-menu .model-opt { align-items: flex-start; gap: 12px; padding: 10px 12px; }
.mo-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: rgba(255, 255, 255, 0.06); }
.mo-ic .ic { width: 18px; height: 18px; color: var(--gold); }
.mo-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mo-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 750; font-size: 14.5px; }
.mo-name .badge { height: 20px; padding: 0 7px; font-size: 11px; }
.mo-blurb { font-size: 12.5px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.mo-cost { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mo-cost .ic { width: 14px; height: 14px; color: var(--gold); }

/* ── Ferestre ── */
.backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(2, 4, 9, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade 0.2s ease; }
.modal { width: min(460px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 26px; animation: rise 0.28s var(--ease); }
.modal.wide { width: min(620px, 100%); }
.modal h2 { font-size: 21px; }
.modal-body { display: grid; gap: 12px; margin-top: 14px; color: var(--ink-2); }
.modal-body .quote { padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: 13.5px; color: var(--muted); }
.modal-body .steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

/* ── Previzualizare ── */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  padding: 14px;
  background: rgba(2, 4, 9, 0.88);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: fade 0.2s ease;
}
.viewer-stage { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; }
.viewer-media { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; padding: 10px 60px; }
.viewer-media img, .viewer-media video { max-width: 100%; max-height: calc(100dvh - 50px); border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9); animation: blur-in 0.35s var(--ease); background: #000; }
.viewer-nav { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
@media (hover: hover) and (pointer: fine) { .viewer-nav:hover { background: rgba(255, 255, 255, 0.16); } }
.viewer-nav.prev { left: 4px; }
.viewer-nav.next { right: 4px; }
.viewer-side { display: flex; flex-direction: column; gap: 18px; padding: 18px; overflow-y: auto; min-height: 0; animation: rise 0.3s var(--ease); }
.vs-head { display: flex; align-items: center; gap: 10px; }
.vs-head .badge .ic { width: 14px; height: 14px; }
.vs-pos { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vs-close { margin-left: auto; }
.vs-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.vs-prompt p { font-size: 14.5px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.vs-prompt .btn { margin-top: 8px; margin-left: -10px; }
.vs-ref img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair-2); }
.vs-note { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.vs-meta { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--hair); }
.vs-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.vs-meta dt { color: var(--muted); }
.vs-meta dd { margin: 0; font-weight: 650; text-align: right; }
.vs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.vs-actions .wide { grid-column: 1 / -1; }
.btn-cost { display: inline-flex; align-items: center; gap: 3px; margin-left: 2px; padding: 2px 7px 2px 5px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.btn-cost .ic { width: 12px !important; height: 12px !important; color: var(--gold); }
.btn-final { color: var(--gold-ink); box-shadow: inset 0 0 0 1px rgba(242, 183, 5, 0.35); }
.btn-final > .ic:first-child { color: var(--gold); }
.vs-small { grid-column: 1 / -1; display: flex; justify-content: center; gap: 6px; }
.vs-small .fav-on { color: #ff6b8b; }
.vs-small .fav-on .ic { fill: currentColor; }

/* ── Notificări ── */
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 120; display: grid; gap: 8px; justify-items: center; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
body[data-route='image'] .toasts, body[data-route='video'] .toasts { bottom: 150px; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 13px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  pointer-events: auto;
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
  @starting-style { opacity: 0; transform: translateY(12px) scale(0.98); }
}
.toast .ic { width: 18px; height: 18px; color: var(--gold); }
.toast.ok .ic { color: var(--ok); }
.toast.bad .ic { color: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); transition-duration: 160ms; }

/* ── Sold care numără, scânteia de pe Generează ── */
.meter-head b, .credit-pill b { display: inline-block; }
.bump-up { animation: bump-up 600ms var(--ease-out); }
.bump-down { animation: bump-down 600ms var(--ease-out); }
@keyframes bump-up { 0% { color: var(--ok); transform: translateY(-2px); } }
@keyframes bump-down { 0% { color: var(--gold-ink); transform: translateY(2px); } }
.gen-btn.launch > .ic:first-child { animation: launch 620ms var(--ease-out); }
@keyframes launch { 35% { transform: rotate(110deg) scale(1.35); } 100% { transform: rotate(180deg); } }

/* ── Treceri între pagini (View Transitions, vezi transition() în app.js) ── */
.scroller { view-transition-name: wd-page; }
html[data-vt='viewer'] .scroller { view-transition-name: none; }
html[data-vt='page']::view-transition-old(root) { display: none; }
html[data-vt='page']::view-transition-new(root) { animation: none; }
::view-transition-group(wd-page) { animation: none; }
::view-transition-old(wd-page) { animation: vt-out 120ms ease-out both; }
::view-transition-new(wd-page) { animation: vt-in 280ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
/* cardul crește până devine imaginea mare din previzualizare */
html[data-vt='viewer'] .viewer-media > img, html[data-vt='viewer'] .viewer-media > video { view-transition-name: wd-media; }
::view-transition-group(wd-media) { animation-duration: 360ms; animation-timing-function: var(--ease-out); }
::view-transition-old(wd-media), ::view-transition-new(wd-media) { animation-duration: 360ms; height: 100%; object-fit: cover; }
html[data-vt='viewer']::view-transition-old(root), html[data-vt='viewer']::view-transition-new(root) { animation-duration: 240ms; }

/* ── Explorează ── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: center; padding: 12px 4px 4px; }
.hero-copy { display: grid; gap: 12px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.hero .eyebrow .ic { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.04em; }
.hero-copy p { color: var(--muted); font-size: 15.5px; max-width: 34em; }
.quick { padding: 14px; border-radius: 22px; display: grid; gap: 10px; }
.quick textarea { width: 100%; min-height: 76px; padding: 6px 6px 0; border: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.5; color: var(--ink); }
.quick textarea::placeholder { color: var(--faint); }
.quick textarea:focus { outline: none; box-shadow: none; }
.quick:focus-within { box-shadow: inset 0 0 0 1px rgba(242, 183, 5, 0.4); }
.quick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seg { display: inline-flex; padding: 3px; border-radius: 13px; background: rgba(255, 255, 255, 0.05); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 650; cursor: pointer; }
.seg button .ic { width: 16px; height: 16px; }
.seg button[aria-checked='true'] { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.seg button[aria-checked='true'] .ic { color: var(--gold); }

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.preset { display: grid; gap: 0; padding: 0; border: 0; border-radius: 18px; overflow: hidden; text-align: left; cursor: pointer; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--hair); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
@media (hover: hover) and (pointer: fine) { .preset:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--hair-2), var(--shadow); } }
.preset:active { transform: scale(0.98); }
.preset-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; }
.preset-cover .ic { width: 34px; height: 34px; color: rgba(255, 255, 255, 0.92); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45)); transition: transform 0.35s var(--ease); }
@media (hover: hover) and (pointer: fine) { .preset:hover .preset-cover .ic { transform: scale(1.12); } }
.preset-body { display: grid; gap: 2px; padding: 11px 13px 13px; }
.preset-body b { font-size: 14.5px; }
.preset-body span { font-size: 12.5px; color: var(--muted); }

.models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.model-card { display: grid; align-content: start; gap: 4px; padding: 16px; text-align: left; cursor: pointer; transition: transform 0.25s var(--ease), background-color 0.2s; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .model-card:hover { transform: translateY(-2px); background-color: rgba(255, 255, 255, 0.07); } }
.mc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.mc-top .badge { height: 22px; font-size: 11px; }
.mc-ic { display: grid; place-items: center; width: 34px; height: 34px; margin-right: auto; border-radius: 11px; background: var(--gold-soft); }
.mc-ic .ic { width: 18px; height: 18px; color: var(--gold); }
.model-card b { font-size: 16px; letter-spacing: -0.02em; }
.mc-vendor { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.model-card p { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.mc-cost { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mc-cost .ic { width: 14px; height: 14px; color: var(--gold); }

.recent { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.recent-item { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: rgba(255, 255, 255, 0.04); }
.recent-item img, .recent-item video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
@media (hover: hover) and (pointer: fine) { .recent-item:hover img, .recent-item:hover video { transform: scale(1.05); } }

/* ── Telefon și tabletă ── */
.drawer-scrim { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .sidebar {
    position: fixed;
    z-index: 60;
    top: 10px;
    bottom: 10px;
    left: 10px;
    width: min(290px, calc(100vw - 40px));
    transform: translateX(calc(-100% - 20px));
    transition: transform 0.35s var(--ease);
    --glass-top: rgba(20, 30, 50, 0.96);
    --glass-bottom: rgba(12, 19, 33, 0.94);
  }
  .drawer-open .sidebar { transform: none; }
  .drawer-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(2, 4, 9, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.3s; display: block; }
  .drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-grid; }
  .credit-pill { display: inline-flex; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; padding: 10px; overflow-y: auto; }
  .viewer-media { padding: 8px 0; }
  .viewer-media img, .viewer-media video { max-height: 62dvh; }
  .viewer-side { overflow: visible; }
  .viewer-nav { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 6px 6px 6px 8px; border-radius: 18px; }
  .topbar .search input { height: 40px; }
  .mode-badge { padding: 0 8px; }
  .mode-badge { font-size: 0; gap: 0; }
  .mode-badge .ic { width: 16px; height: 16px; }
  .avatar { width: 36px; height: 36px; }
  .scroller { padding: 16px 12px 32px; }
  .view-image .scroller, .view-video .scroller { padding-bottom: 230px; }
  .content { border-radius: 22px; }
  .studio-head h1, .page-head h1 { font-size: 22px; }
  .tabs { margin-left: 0; width: 100%; overflow-x: auto; }
  .tabs a { flex: 1; justify-content: center; padding: 0 8px; }
  .dock { padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .composer { padding: 10px 10px 8px; border-radius: 20px; }
  .comp-main textarea { font-size: 16px; min-height: 44px; padding-top: 10px; }
  .ref-slot { width: 50px; height: 50px; }
  .comp-bar { flex-wrap: wrap; }
  .chips { flex-basis: 100%; }
  .gen-btn { flex: 1; justify-content: center; }
  .enhance-btn { padding: 0 13px; }
  .enhance-btn span { display: none; }
  .gallery, .gallery .col { gap: 8px; }
  .tile { border-radius: 12px; }
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .preset-body { padding: 9px 11px 11px; }
  .models-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-route='image'] .toasts, body[data-route='video'] .toasts { bottom: 190px; }
}
