    /* ===================================================================
       Morphly Admin — Apple-inspired control panel
       Clean, calm, spacious. Dark theme, one accent, soft depth.
       =================================================================== */

    :root {
      /* Surfaces — Apple dark: deep graphite, not pure black; raised cards */
      --bg:            #1c1c1e;   /* app background */
      --surface:       #2c2c2e;   /* cards */
      --surface-2:     #3a3a3c;   /* nested / hover */
      --sidebar:       #242426;
      --hairline:      rgba(255,255,255,0.10);
      --hairline-2:    rgba(255,255,255,0.06);

      /* Text */
      --fg:            #f5f5f7;   /* primary */
      --fg-2:          #c7c7cc;   /* secondary */
      --fg-3:          #98989d;   /* muted */
      --fg-4:          #6e6e73;   /* caption */

      /* Accent — Apple blue (a touch brighter for dark bg) */
      --accent:        #0a84ff;
      --accent-hover:  #409cff;
      --accent-soft:   rgba(10,132,255,0.16);
      --accent-ring:   rgba(10,132,255,0.45);

      /* Semantic (dark-tuned) */
      --green:         #30d158;
      --green-soft:    rgba(48,209,88,0.18);
      --orange:        #ff9f0a;
      --orange-soft:   rgba(255,159,10,0.20);
      --red:           #ff453a;
      --red-soft:      rgba(255,69,58,0.18);
      --purple:        #bf5af2;
      --purple-soft:   rgba(191,90,242,0.18);

      /* Platform tints (tiktok lightened so it's visible on dark) */
      --tiktok:        #f5f5f7;
      --reels:         #ff4fbf;
      --shorts:        #ff453a;
      --telegram:      #40b6ff;

      /* Type */
      --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
              "Inter", "Helvetica Neue", system-ui, sans-serif;

      /* Radii */
      --r-sm: 8px;
      --r-md: 12px;
      --r-lg: 18px;
      --r-xl: 24px;

      /* Shadows — deeper on dark to keep separation */
      --shadow-sm: 0 1px 2px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.24);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.40), 0 1px 4px rgba(0,0,0,0.30);
      --shadow-lg: 0 12px 40px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.40);

      --ease: cubic-bezier(0.4, 0.0, 0.2, 1);

      color-scheme: dark;
    }

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

    html, body {
      background: var(--bg);
      color: var(--fg);
      font-family: var(--font);
      font-size: 15px;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    body { min-height: 100vh; }

    /* ============================ Shell =============================== */

    .shell {
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr);
      min-height: 100vh;
    }

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

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      background: var(--sidebar);
      border-right: 1px solid var(--hairline);
      padding: 22px 14px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px 18px;
      color: var(--fg);
      text-decoration: none;
    }
    .brand-mark {
      width: 34px; height: 34px;
      display: block;
      border-radius: 7px;
      object-fit: cover;
      box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 5px 18px rgba(0,0,0,.32);
    }
    .brand-name {
      font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
    }

    .nav-section {
      font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
      text-transform: uppercase; color: var(--fg-4);
      padding: 14px 12px 6px;
    }

    .nav-item {
      display: flex; align-items: center; gap: 11px;
      width: 100%;
      padding: 9px 12px;
      border: none; background: transparent;
      border-radius: var(--r-sm);
      color: var(--fg-2);
      font-family: inherit; font-size: 14.5px; font-weight: 500;
      text-align: left; cursor: pointer;
      transition: background 140ms var(--ease), color 140ms var(--ease);
    }
    .nav-item:hover { background: var(--surface-2); color: var(--fg); }
    .nav-item.active {
      background: var(--accent-soft); color: var(--accent);
      font-weight: 600;
    }
    .nav-item.active .nav-ico { color: var(--accent); }
    .nav-ico {
      width: 18px; height: 18px; flex-shrink: 0;
      color: var(--fg-3);
      display: grid; place-items: center;
    }
    .nav-ico svg { width: 18px; height: 18px; }
    .nav-badge {
      margin-left: auto;
      font-size: 11px; font-weight: 600;
      padding: 1px 7px; border-radius: 999px;
      background: var(--green-soft); color: var(--green);
    }

    .sidebar-foot { margin-top: auto; }
    .plan-card {
      padding: 14px;
      border-radius: var(--r-md);
      background: var(--surface-2);
      border: 1px solid var(--hairline);
    }
    .plan-card .lbl { font-size: 11px; color: var(--fg-4); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
    .plan-card .name { font-size: 15px; font-weight: 600; margin: 3px 0 2px; }
    .plan-card .meta { font-size: 12px; color: var(--fg-3); }
    .plan-card a {
      display: block; text-align: center; margin-top: 11px;
      padding: 8px; border-radius: var(--r-sm);
      background: var(--accent); color: #fff;
      font-size: 13px; font-weight: 600; text-decoration: none;
      transition: background 140ms var(--ease);
    }
    .plan-card a:hover { background: var(--accent-hover); }

    /* ============================ Main =============================== */

    .main { min-width: 0; display: flex; flex-direction: column; }

    .topbar {
      position: sticky; top: 0; z-index: 20;
      display: flex; align-items: center; gap: 16px;
      padding: 0 32px; height: 60px;
      background: rgba(28,28,30,0.72);
      backdrop-filter: saturate(180%) blur(20px);
      -webkit-backdrop-filter: saturate(180%) blur(20px);
      border-bottom: 1px solid var(--hairline);
    }
    .topbar h1 {
      font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
    }
    .topbar .spacer { flex: 1; }
    .topbar-balance {
      display: flex; align-items: baseline; gap: 8px;
      padding: 7px 14px;
      background: var(--surface-2);
      border: 1px solid var(--hairline);
      border-radius: 999px;
      text-decoration: none; transition: border-color 120ms, background 120ms;
    }
    .topbar-balance:hover { border-color: var(--accent-ring); background: var(--surface); }
    .topbar-balance-label { color: var(--fg-4); font-size: 12px; }
    .topbar-balance-val { color: var(--fg); font-size: 14px; font-weight: 600; }
    .avatar {
      width: 34px; height: 34px; border-radius: 50%;
      background: linear-gradient(135deg, #af52de, #0071e3);
      display: grid; place-items: center; color: #fff;
      font-weight: 600; font-size: 14px; text-decoration: none;
      text-transform: uppercase;
    }

    .content { padding: 28px 32px 60px; max-width: 1180px; width: 100%; margin: 0 auto; }

    .view { display: none; animation: fade 320ms var(--ease); }
    .view.active { display: block; }
    @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

    /* ============================ Primitives ========================= */

    .card {
      background: var(--surface);
      border: 1px solid var(--hairline);
      border-radius: var(--r-lg);
      box-shadow: var(--shadow-sm);
    }
    .card-pad { padding: 22px; }

    .section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
    .section-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
    .section-head p { color: var(--fg-3); font-size: 14px; margin-top: 2px; }

    .btn {
      display: inline-flex; align-items: center; gap: 7px;
      padding: 9px 16px; border-radius: 999px;
      font-family: inherit; font-size: 14px; font-weight: 600;
      border: none; cursor: pointer; text-decoration: none;
      transition: all 140ms var(--ease);
    }
    .btn-primary { background: var(--accent); color: #fff; }
    .btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .btn-ghost { background: var(--surface-2); color: var(--fg); border: 1px solid var(--hairline); }
    .btn-ghost:hover { background: #48484a; }

    .pill {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 12px; font-weight: 600;
      padding: 3px 9px; border-radius: 999px;
    }
    .pill-green { background: var(--green-soft); color: var(--green); }
    .pill-blue  { background: var(--accent-soft); color: var(--accent); }
    .pill-orange{ background: var(--orange-soft); color: var(--orange); }
    .pill-red   { background: rgba(255,90,95,0.14); color: #ff5a5f; }

    .acc-empty { padding: 22px; text-align: center; color: var(--fg-3); font-size: 14px; }
    .acc-empty a { color: var(--accent); }
    .acc-msg { font-size: 13px; margin-top: 12px; min-height: 1em; }
    .acc-msg.ok  { color: var(--green); }
    .acc-msg.err { color: #ff5a5f; }

    /* inline notice banner (Stripe/Vercel style): icon + text + action */
    .notice { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px;
      padding: 14px 16px; border-radius: 12px; font-size: 13.5px;
      animation: notice-in 220ms ease-out; }
    .notice svg { width: 22px; height: 22px; flex-shrink: 0; stroke-linecap: round; stroke-linejoin: round; }
    .notice-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
    .notice-body b { font-weight: 600; }
    .notice-body span { color: var(--fg-3); font-size: 12.5px; }
    .notice-cta { flex-shrink: 0; white-space: nowrap; }
    .notice-warn { background: rgba(255,180,90,0.12); border: 1px solid rgba(255,180,90,0.32); color: #ffb454; }
    .notice-warn .notice-body b { color: var(--fg); }
    @media (max-width: 560px) { .notice { flex-wrap: wrap; } .notice-cta { width: 100%; justify-content: center; } }

    /* "oops, something's off" wobble on the warning icon */
    .notice-ico { transform-origin: 50% 65%; animation: notice-wobble 1.4s ease-in-out infinite; }
    @keyframes notice-wobble {
      0%, 55%, 100% { transform: rotate(0deg); }
      62% { transform: rotate(-11deg); }
      70% { transform: rotate(9deg); }
      78% { transform: rotate(-6deg); }
      86% { transform: rotate(3deg); }
      94% { transform: rotate(0deg); }
    }
    @keyframes notice-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
    @media (prefers-reduced-motion: reduce) { .notice-ico { animation: none; } .notice { animation: none; } }

    /* small confirmation modal */
    .modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
      background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
    .modal-backdrop[hidden] { display: none; }
    .modal-box { width: min(92vw, 380px); background: var(--surface); border: 1px solid var(--hairline);
      border-radius: 16px; padding: 22px; box-shadow: var(--shadow-lg); }
    .modal-title { font-size: 17px; font-weight: 700; color: var(--fg); margin: 0 0 8px; }
    .modal-text { font-size: 13.5px; line-height: 1.5; color: var(--fg-3); margin: 0 0 16px; }
    .modal-input { width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--surface-2);
      border: 1px solid var(--hairline); color: var(--fg); font-family: inherit; font-size: 14px; outline: none; }
    .modal-input:focus { border-color: var(--accent-ring); }
    .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
    .pill-purple{ background: var(--purple-soft); color: var(--purple); }
    .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

    /* ---- Metric cards ---- */
    .metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
    .metric {
      background: var(--surface); border: 1px solid var(--hairline);
      border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm);
    }
    .metric .k { font-size: 13px; color: var(--fg-3); font-weight: 500; }
    .metric .v { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; margin: 8px 0 6px; }
    .metric .d { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
    .metric .d.up { color: var(--green); }
    .metric .d.down { color: var(--red); }

    .grid-2 { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 16px; }
    .grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

    .panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
    .panel-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
    .panel-head .sub { font-size: 12.5px; color: var(--fg-4); }

    /* ---- Chart ---- */
    .chart { width: 100%; height: 190px; }
    .chart .grid-line { stroke: var(--hairline-2); stroke-width: 1; }
    .chart .area { fill: url(#areaGrad); }
    .chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
    .chart .dot-pt { fill: #fff; stroke: var(--accent); stroke-width: 2.5; }
    .chart-axis { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--fg-4); }

    /* ---- Traffic bars ---- */
    .traffic-list { display: flex; flex-direction: column; gap: 16px; }
    .traffic-row { display: grid; grid-template-columns: 96px 1fr 56px; align-items: center; gap: 12px; }
    .traffic-row .name { font-size: 13.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
    .traffic-row .swatch { width: 9px; height: 9px; border-radius: 3px; }
    .track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
    .track > i { display: block; height: 100%; border-radius: 999px; width: var(--w); transition: width 600ms var(--ease); }
    .traffic-row .val { font-size: 13.5px; font-weight: 600; text-align: right; color: var(--fg-2); }
    .tracking-link-form { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 2fr auto; gap: 12px; align-items: end; }
    .tracking-links-table { overflow-x: auto; }
    .tracking-links-table .table { min-width: 760px; }

    /* ---- Real dashboard home ---- */
    .home-welcome { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 220px; min-height: 250px; margin-bottom: 20px; padding: 34px 38px; overflow: hidden; border: 1px solid rgba(10,132,255,.24); border-radius: 22px; background: radial-gradient(circle at 88% 15%, rgba(191,90,242,.18), transparent 30%), radial-gradient(circle at 70% 90%, rgba(10,132,255,.20), transparent 36%), var(--surface); box-shadow: var(--shadow-sm); }
    .home-welcome::before { content: ""; position: absolute; inset: 0; opacity: .16; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(90deg, transparent 35%, #000); }
    .home-welcome-copy { position: relative; z-index: 2; align-self: center; max-width: 720px; }
    .home-eyebrow { display: block; margin-bottom: 12px; color: #8fc5ff; font-size: 12px; font-weight: 650; letter-spacing: .03em; }
    .home-welcome h2 { max-width: 650px; margin: 0 0 11px; font-size: clamp(27px,3vw,40px); line-height: 1.06; letter-spacing: -.035em; }
    .home-welcome p { max-width: 680px; margin: 0 0 22px; color: var(--fg-3); font-size: 14px; line-height: 1.65; }
    .home-orbit { position: relative; z-index: 1; width: 190px; height: 190px; align-self: center; justify-self: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; animation: home-spin 16s linear infinite; }
    .home-orbit::before { content: ""; position: absolute; inset: 24px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
    .home-orbit-core { position: absolute; inset: 50% auto auto 50%; display: grid; width: 64px; height: 64px; place-items: center; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: linear-gradient(145deg,#9b51e0,#0a84ff); color: #fff; font-size: 25px; font-weight: 750; box-shadow: 0 18px 48px rgba(10,132,255,.28); animation: home-counter-spin 16s linear infinite; }
    .home-orbit-dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 18px currentColor; }
    .home-orbit-dot--1 { top: 12px; left: 85px; color: #55a7ff; background: currentColor; }
    .home-orbit-dot--2 { right: 12px; bottom: 48px; color: #d38cff; background: currentColor; }
    .home-orbit-dot--3 { left: 18px; bottom: 38px; color: #7bd88f; background: currentColor; }
    @keyframes home-spin { to { transform: rotate(360deg); } }
    @keyframes home-counter-spin { from { transform: translate(-50%,-50%) rotate(0); } to { transform: translate(-50%,-50%) rotate(-360deg); } }
    .home-start { padding-bottom: 28px; }
    .home-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
    .home-step { display: flex; gap: 12px; min-height: 112px; padding: 17px; border: 1px solid var(--hairline); border-radius: 14px; background: var(--surface-2); color: inherit; text-decoration: none; }
    .home-step b { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border: 1px solid var(--hairline); border-radius: 50%; color: var(--fg-4); font-size: 11px; }
    .home-step span { display: flex; flex-direction: column; gap: 7px; }
    .home-step strong { font-size: 13px; }
    .home-step small { color: var(--fg-4); font-size: 11px; line-height: 1.45; }
    .home-step.is-active { border-color: rgba(10,132,255,.45); background: var(--accent-soft); }
    .home-step.is-active b { border-color: var(--accent); background: var(--accent); color: #fff; }
    .home-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px; }
    .home-metric { display: flex; min-height: 132px; padding: 19px; flex-direction: column; border: 1px solid var(--hairline); border-radius: 16px; background: var(--surface); color: inherit; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform 160ms var(--ease), border-color 160ms var(--ease); }
    .home-metric:hover { transform: translateY(-2px); border-color: rgba(10,132,255,.35); }
    .home-metric span { color: var(--fg-3); font-size: 12px; }
    .home-metric strong { margin: 9px 0 7px; font-size: 31px; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
    .home-metric small { margin-top: auto; color: var(--fg-4); font-size: 11px; }
    .home-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(270px,.7fr); gap: 16px; }
    .home-progress { min-width: 0; padding: 8px 4px 10px; align-self: start; }
    .home-progress .panel-head { margin-bottom: 19px; padding: 0 2px; }
    .home-cycle { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
    .home-cycle-item { position: relative; display: flex; min-width: 0; padding: 0 18px 0 0; flex-direction: column; color: inherit; text-decoration: none; }
    .home-cycle-item:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 17px; right: 0; left: 34px; height: 1px; background: var(--hairline); }
    .home-cycle-item i { position: relative; z-index: 1; display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--hairline); border-radius: 50%; background: var(--bg); color: var(--fg-4); font-size: 11px; font-style: normal; transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease); }
    .home-cycle-item span { display: flex; min-width: 0; margin-top: 11px; flex-direction: column; gap: 5px; }
    .home-cycle-item b { font-size: 12.5px; line-height: 1.3; }
    .home-cycle-item small { max-width: 145px; color: var(--fg-4); font-size: 10.5px; line-height: 1.45; }
    .home-cycle-item.is-done i { border-color: rgba(48,209,88,.42); background: rgba(48,209,88,.12); color: var(--green); }
    .home-cycle-item.is-done:not(:last-child)::after { background: linear-gradient(90deg,rgba(48,209,88,.42),rgba(48,209,88,.10)); }
    .home-cycle-item.is-current i { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 5px rgba(10,132,255,.10); }
    .home-cycle-item.is-current b { color: #8fc5ff; }
    .home-cycle-item:not(.is-done):not(.is-current) { opacity: .48; }
    .home-model-story { text-align: center; }
    .home-model-avatar { display: grid; width: 72px; height: 72px; margin: 4px auto 12px; place-items: center; border-radius: 23px; background: linear-gradient(145deg,#bf5af2,#0a84ff); color: #fff; font-size: 19px; font-weight: 750; box-shadow: 0 14px 30px rgba(10,132,255,.20); }
    .home-model-story h4 { margin: 0 0 8px; font-size: 19px; }
    .home-model-story p { min-height: 42px; margin: 0 0 15px; color: var(--fg-3); font-size: 12px; line-height: 1.55; }
    .home-attention { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin-top: 16px; padding: 14px 17px; border: 1px solid rgba(255,69,58,.26); border-radius: 13px; background: rgba(255,69,58,.07); }
    .home-attention span { color: var(--red); font-size: 11px; font-weight: 700; text-transform: uppercase; }
    .home-attention p { margin: 0; color: var(--fg-3); font-size: 12px; }
    .home-attention a { color: var(--red); font-size: 12px; font-weight: 650; text-decoration: none; }
    .traffic-chart-head { align-items: flex-start; }
    .traffic-chart-head > div .sub { display: block; margin-top: 4px; }
    .traffic-model-filter { display: flex; align-items: center; gap: 9px; color: var(--fg-3); font-size: 12px; }
    .traffic-model-filter select { min-width: 190px; padding: 9px 32px 9px 12px; border: 1px solid var(--hairline); border-radius: 9px; background: var(--surface-2); color: var(--fg); font: inherit; }
    .traffic-chart-kpi { display: flex; gap: 26px; margin: -2px 0 10px; }
    .traffic-chart-kpi > div { display: flex; align-items: baseline; gap: 7px; }
    .traffic-chart-kpi span { color: var(--fg-4); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
    .traffic-chart-kpi strong { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
    .traffic-chart-stage { position: relative; min-height: 320px; border-radius: 12px; overflow: hidden; cursor: none; background: linear-gradient(180deg, rgba(10,132,255,.025), transparent); }
    #traffic-line-chart { display: block; width: 100%; height: 320px; overflow: visible; }
    .traffic-grid-line { stroke: rgba(255,255,255,.075); stroke-width: 1; vector-effect: non-scaling-stroke; }
    .traffic-axis-text { fill: var(--fg-4); font-size: 10px; font-family: inherit; }
    .traffic-chart-area { animation: traffic-area-in 650ms var(--ease) both; }
    .traffic-chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1500; stroke-dashoffset: 1500; animation: traffic-line-in 850ms var(--ease) forwards; }
    .traffic-hover-line { stroke: rgba(255,255,255,.35); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
    .traffic-hover-point { fill: #fff; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(10,132,255,.8)); }
    .traffic-series-point { stroke: #1c1c1e; stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(0,0,0,.45)); }
    .traffic-chart-date-marker, .traffic-chart-value-marker { position: absolute; z-index: 5; padding: 4px 7px; border: 1px solid var(--hairline); border-radius: 6px; background: #313136; color: var(--fg-2); font-size: 10px; line-height: 1; font-variant-numeric: tabular-nums; pointer-events: none; box-shadow: var(--shadow-sm); }
    .traffic-chart-date-marker { bottom: 4px; transform: translateX(-50%); white-space: nowrap; }
    .traffic-chart-value-marker { left: 3px; transform: translateY(-50%); min-width: 27px; text-align: center; }
    .traffic-chart-tooltip { position: absolute; z-index: 4; top: 12px; min-width: 156px; padding: 9px 11px; border: 1px solid var(--hairline); border-radius: 10px; background: rgba(28,28,30,.94); box-shadow: var(--shadow-lg); pointer-events: none; backdrop-filter: blur(12px); }
    .traffic-chart-tooltip strong { display: block; margin-bottom: 6px; font-size: 12px; }
    .traffic-chart-tooltip span { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; padding: 2px 0; color: var(--fg-3); font-size: 11px; }
    .traffic-chart-tooltip span i, .traffic-chart-legend span i { width: 8px; height: 8px; border-radius: 50%; }
    .traffic-chart-tooltip span b { color: var(--fg); font-variant-numeric: tabular-nums; }
    .traffic-chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fg-4); font-size: 13px; }
    .traffic-chart-empty[hidden] { display: none; }
    .traffic-chart-empty > div { width: min(430px, calc(100% - 40px)); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
    .traffic-chart-empty > div[hidden] { display: none; }
    .traffic-chart-empty strong { color: var(--fg-2); font-size: 14px; }
    .traffic-chart-empty span { max-width: 390px; line-height: 1.5; }
    .traffic-chart-empty .btn { margin-top: 7px; }
    .traffic-chart-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; min-height: 28px; margin: 8px 6px 0 46px; }
    .traffic-chart-legend span { display: grid; grid-template-columns: 8px auto auto; align-items: center; gap: 7px; font-size: 12px; }
    .traffic-chart-legend span b { font-weight: 550; }
    .traffic-chart-legend span em { color: var(--fg-4); font-style: normal; font-variant-numeric: tabular-nums; }
    .traffic-chart-legend .traffic-legend-date { padding-right: 10px; border-right: 1px solid var(--hairline); }
    @keyframes traffic-line-in { to { stroke-dashoffset: 0; } }
    @keyframes traffic-area-in { from { opacity: 0; } to { opacity: 1; } }

    /* ---- Models grid ---- */
    .models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .model-card {
      position: relative;
      background: var(--surface); border: 1px solid var(--hairline);
      border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
      transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
      cursor: pointer; color: inherit; text-decoration: none;
    }
    .model-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
    .model-card-main { display: block; color: inherit; text-decoration: none; }
    .model-card--failed { border-color: var(--red-soft); }
    .model-failed-actions { display: flex; gap: 8px; padding: 0 15px 15px; }
    .model-failed-actions .btn { flex: 1; padding: 8px 10px; }
    .model-thumb {
      aspect-ratio: 4/5; background: linear-gradient(150deg, #3a3350, #2e3a4d);
      position: relative; display: grid; place-items: center;
    }
    .model-thumb .glyph { font-size: 42px; opacity: 0.35; }
    .model-thumb .ai-tag {
      position: absolute; top: 10px; left: 10px;
      font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
      padding: 3px 8px; border-radius: 999px;
      background: rgba(255,255,255,0.85); color: var(--purple);
      backdrop-filter: blur(6px);
    }
    .model-info { padding: 13px 15px 16px; }
    .model-info .n { font-size: 15px; font-weight: 600; }
    .model-info .t { font-size: 12.5px; color: var(--fg-3); margin-top: 2px; }
    .model-favorite {
      position: absolute; right: 10px; bottom: 11px; z-index: 3;
      width: 32px; height: 32px; display: grid; place-items: center;
      border: 1px solid var(--hairline); border-radius: 50%;
      background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--fg-4);
      cursor: pointer; backdrop-filter: blur(8px); transition: color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
    }
    .model-favorite:hover { color: #f0ad2c; border-color: #f0ad2c; transform: scale(1.06); }
    .model-favorite svg { width: 17px; height: 17px; fill: transparent; stroke: currentColor; stroke-width: 1.7; }
    .model-favorite.is-favorite { color: #f0ad2c; border-color: color-mix(in srgb, #f0ad2c 55%, var(--hairline)); }
    .model-favorite.is-favorite svg { fill: currentColor; }
    .model-card:has(.model-failed-actions) .model-favorite { bottom: 62px; }
    .model-info { padding-right: 50px; }
    .model-detail-actions { display: flex; align-items: center; gap: 10px; }
    .model-detail-favorite { border-color: var(--hairline); background: var(--surface); color: var(--fg-3); }
    .model-detail-favorite.is-favorite { border-color: color-mix(in srgb, #f0ad2c 55%, var(--hairline)); color: #d99613; background: color-mix(in srgb, #f0ad2c 9%, var(--surface)); }
    .model-add {
      border: 1.5px dashed var(--hairline); background: var(--surface-2);
      border-radius: var(--r-lg); display: grid; place-items: center;
      min-height: 100%; color: var(--fg-3); cursor: pointer;
      transition: all 160ms var(--ease); text-align: center; padding: 24px;
    }
    .model-add:hover { border-color: var(--accent-ring); color: var(--accent); background: var(--accent-soft); }
    .model-add .plus { font-size: 30px; font-weight: 300; line-height: 1; margin-bottom: 8px; }

    /* ---- Dance / reference generator ---- */
    .gen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
    .drop {
      border: 1.5px dashed var(--hairline); border-radius: var(--r-md);
      padding: 28px; text-align: center; color: var(--fg-3);
      background: var(--surface-2); transition: all 160ms var(--ease);
    }
    .drop:hover { border-color: var(--accent-ring); color: var(--accent); }
    .drop .ico { font-size: 26px; margin-bottom: 8px; }
    .drop .t { font-weight: 600; color: var(--fg-2); font-size: 14px; }
    .drop .s { font-size: 12px; margin-top: 3px; }

    /* ---- Chat ---- */
    .chat-wrap { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 0; height: 560px;
      background: var(--surface); border: 1px solid var(--hairline);
      border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
    .chat-side { border-right: 1px solid var(--hairline); background: var(--surface-2); display: flex; flex-direction: column; }
    .chat-side-head { padding: 16px; border-bottom: 1px solid var(--hairline); }
    .chat-side-head .t { font-size: 13px; font-weight: 600; color: var(--fg-3); }
    .chat-persona {
      display: flex; align-items: center; gap: 10px; padding: 11px 14px;
      cursor: pointer; border-left: 2px solid transparent;
    }
    .chat-persona:hover { background: rgba(0,0,0,0.02); }
    .chat-persona.active { background: var(--surface); border-left-color: var(--accent); }
    .chat-persona .pic { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,#3a3350,#2e3a4d); flex-shrink: 0; }
    .chat-persona .nm { font-size: 14px; font-weight: 600; }
    .chat-persona .st { font-size: 11.5px; color: var(--fg-4); }
    .chat-main { display: flex; flex-direction: column; min-width: 0; }
    .chat-header {
      display: flex; align-items: center; gap: 11px; padding: 13px 18px;
      border-bottom: 1px solid var(--hairline); background: rgba(44,44,46,0.85);
    }
    .chat-header .pic { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#3a3350,#2e3a4d); }
    .chat-header .nm { font-size: 15px; font-weight: 600; }
    .ai-badge {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
      padding: 3px 9px; border-radius: 999px;
      background: var(--purple-soft); color: var(--purple); margin-left: 6px;
    }
    .chat-body { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
    .disclosure {
      align-self: center; max-width: 80%; text-align: center;
      font-size: 12px; color: var(--fg-4); background: var(--surface);
      border: 1px solid var(--hairline); padding: 8px 14px; border-radius: 999px;
    }
    .msg { max-width: 72%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; }
    .msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; }
    .msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
    .chat-compose { padding: 14px 16px; border-top: 1px solid var(--hairline); display: flex; gap: 10px; background: var(--surface); }
    .chat-compose input {
      flex: 1; padding: 10px 16px; border-radius: 999px;
      border: 1px solid var(--hairline); background: var(--surface-2);
      font-family: inherit; font-size: 14px; color: var(--fg);
    }
    .chat-compose input:focus { outline: none; border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }

    /* ---- Content library ---- */
    .lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; }
    .lib-item { border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
    .lib-thumb { aspect-ratio: 3/4; background: linear-gradient(150deg,#33333a,#2a2a30); display: grid; place-items: center; }
    .lib-meta { padding: 11px 13px; }
    .lib-meta .n { font-size: 13.5px; font-weight: 600; }
    .lib-meta .s { font-size: 11.5px; color: var(--fg-4); margin-top: 2px; }

    /* ---- Billing ---- */
    .plans { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
    .plan {
      border: 1px solid var(--hairline); border-radius: var(--r-lg);
      padding: 24px; background: var(--surface); box-shadow: var(--shadow-sm);
      position: relative; transition: all 160ms var(--ease);
    }
    .plan.featured { border-color: var(--accent-ring); box-shadow: 0 0 0 1px var(--accent-ring), var(--shadow-md); }
    .plan .tag { position: absolute; top: -11px; left: 24px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; }
    .plan .nm { font-size: 15px; font-weight: 600; color: var(--fg-2); }
    .plan .price { font-size: 38px; font-weight: 600; letter-spacing: -0.03em; margin: 6px 0; }
    .plan .price small { font-size: 15px; font-weight: 500; color: var(--fg-3); }
    .plan ul { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 9px; }
    .plan li { font-size: 13.5px; color: var(--fg-2); display: flex; gap: 8px; align-items: center; }
    .plan li svg { width: 15px; height: 15px; color: var(--green); flex-shrink: 0; }
    .plan .btn { width: 100%; justify-content: center; }

    .pay-methods { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
    .pay-chip { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; font-weight: 500; }

    .table { width: 100%; border-collapse: collapse; }
    .table th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-4); padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
    .table td { padding: 13px 12px; font-size: 13.5px; border-bottom: 1px solid var(--hairline-2); }
    .table tr:last-child td { border-bottom: none; }
    .table .mono { font-variant-numeric: tabular-nums; font-weight: 600; }

    .mb-20 { margin-bottom: 20px; }
    .mt-16 { margin-top: 16px; }

    /* ---- Dance-by-reference: 3 vertical cards ---- */
    .dance-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
    .dance-step {
      position: relative; display: flex; flex-direction: column;
      background: var(--surface); border: 1px solid var(--hairline);
      border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
      min-height: 400px;
    }
    .dance-step .step-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--hairline-2); }
    .dance-step .step-num { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent); text-transform: uppercase; }
    .dance-step .step-title { font-size: 15.5px; font-weight: 600; margin-top: 3px; }
    .dance-step .step-body { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
    .dance-arrow { position: absolute; top: 50%; right: -22px; z-index: 2; width: 28px; height: 28px;
      transform: translateY(-50%); color: var(--fg-4); display: grid; place-items: center; }

    /* upload dropzone */
    .up { border: 1.5px dashed var(--hairline); border-radius: var(--r-md); padding: 22px 16px;
      text-align: center; color: var(--fg-3); background: var(--surface-2); cursor: pointer;
      transition: all 160ms var(--ease); }
    .up:hover { border-color: var(--accent-ring); color: var(--accent); background: var(--accent-soft); }
    .up .ico { font-size: 24px; margin-bottom: 7px; }
    .up .t { font-weight: 600; color: var(--fg-2); font-size: 13.5px; }
    .up .s { font-size: 11.5px; margin-top: 3px; }
    .up.has-file { border-style: solid; border-color: var(--green); background: var(--green-soft); color: var(--green); }

    .divider-or { display: flex; align-items: center; gap: 10px; color: var(--fg-4); font-size: 12px; }
    .divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }

    /* pick model from own generations */
    /* Higgsfield-style poster cards for model picking */
    .pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .pick { border: 1.5px solid var(--hairline); border-radius: 14px; overflow: hidden; cursor: pointer;
      aspect-ratio: 3/4; position: relative; background: #1a1d24; transition: transform 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
    .pick:hover { border-color: var(--accent-ring); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.35); }
    .pick.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 10px 26px rgba(0,0,0,0.35); }

    /* full-bleed photo that zooms slightly on hover */
    .pick-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
      transition: transform 320ms var(--ease); }
    .pick:hover .pick-img { transform: scale(1.06); }

    /* gradient scrim + name pinned to the bottom (poster style) */
    .pick::after { content: ""; position: absolute; inset: 0; pointer-events: none;
      background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.20) 34%, transparent 60%); }
    .pick-name { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2;
      font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }

    /* empty state when the user has no ready (photo) models yet */
    .pick-none { padding: 18px; text-align: center; font-size: 13px; color: var(--fg-3);
      border: 1px dashed var(--hairline); border-radius: 12px; }
    .pick-none a { color: var(--accent); }

    /* selected check badge */
    .pick-check { position: absolute; top: 8px; right: 8px; z-index: 2; width: 22px; height: 22px;
      border-radius: 50%; background: var(--accent); display: none; place-items: center; }
    .pick-check svg { width: 13px; height: 13px; color: #fff; }
    .pick.sel .pick-check { display: grid; }

    /* Higgsfield-style poster panels for the video drop + result (portrait 3/4) */
    .drop-poster, .result-poster {
      position: relative; width: 100%; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden;
      background: linear-gradient(160deg, #23262f, #16181e); border: 1.5px solid var(--hairline);
      display: grid; place-items: center; transition: border-color 160ms var(--ease); }
    .drop-poster { cursor: pointer; border-style: dashed; }
    .drop-poster:hover { border-color: var(--accent-ring); }
    .drop-poster-inner, .result-state { position: absolute; inset: 0; display: flex; flex-direction: column;
      align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--fg-3); padding: 16px; }
    .drop-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
      background: var(--surface-2); border: 1px solid var(--hairline); margin-bottom: 4px; }
    .drop-ico svg { width: 22px; height: 22px; color: var(--fg-2); }
    .drop-title { font-weight: 600; color: var(--fg); font-size: 13.5px; }
    .drop-sub { font-size: 11.5px; color: var(--fg-4); }
    .drop-err .drop-title { color: #ff5a5f; }
    /* the accepted clip / rendered result fills the whole poster */
    .drop-preview, .result-video-el { position: absolute; inset: 0; width: 100%; height: 100%;
      object-fit: cover; display: block; background: #000; }
    .dance-reference-divider { display: flex; align-items: center; gap: 9px; color: var(--fg-4); font-size: 11px; }
    .dance-reference-divider::before, .dance-reference-divider::after { content: ""; height: 1px; flex: 1; background: var(--hairline); }
    .dance-reel-picker { display:flex; gap:8px; overflow-x:auto; padding:2px 1px 7px; scrollbar-width:thin; }
    .dance-reel-option { position:relative; flex:0 0 66px; padding:0; overflow:hidden; border:1px solid var(--hairline); border-radius:10px; background:var(--surface-2); color:var(--fg-2); cursor:pointer; }
    .dance-reel-option img { display:block; width:100%; aspect-ratio:9/12; object-fit:cover; }
    .dance-reel-option span { display:block; overflow:hidden; padding:5px 5px 6px; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
    .dance-reel-option:hover,.dance-reel-option.selected { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
    .dance-reference-url { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
    .dance-reference-url input { min-width: 0; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface-2); color: var(--fg); font: inherit; font-size: 12px; }
    .dance-reference-url input:focus { outline: none; border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
    .dance-reference-note { min-height: 30px; color: var(--fg-4); font-size: 11px; line-height: 1.4; }
    .dance-reference-guide { border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface-2)); overflow: hidden; }
    .dance-reference-guide summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; color: var(--fg-2); cursor: pointer; list-style: none; }
    .dance-reference-guide summary::-webkit-details-marker { display: none; }
    .dance-reference-guide summary::after { content: "+"; display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 18px; line-height: 1; }
    .dance-reference-guide[open] summary::after { content: "−"; }
    .dance-reference-guide summary span { font-size: 12.5px; font-weight: 700; }
    .dance-reference-guide summary small { margin-left: auto; color: var(--fg-4); font-size: 10px; }
    .dance-reference-guide-body { display: grid; gap: 12px; padding: 0 14px 14px; }
    .dance-reference-guide-body > div { display: grid; gap: 5px; }
    .dance-reference-guide strong { color: var(--fg-2); font-size: 11px; line-height: 1.35; }
    .dance-reference-guide ul { display: grid; gap: 4px; margin: 0; padding-left: 17px; color: var(--fg-3); font-size: 10.5px; line-height: 1.45; }
    .dance-reference-guide p { margin: 0; color: var(--fg-3); font-size: 10.5px; line-height: 1.45; }
    .dance-reference-guide--top { margin: -6px 0 16px; }
    .dance-reference-guide--top .dance-reference-guide-body { grid-template-columns: 1fr 1fr; }
    .dance-background-control { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.018); }
    .dance-background-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .dance-background-heading strong { font-size: 13px; }
    .dance-background-heading span { padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--orange); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
    .dance-background-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
    .dance-background-modes button { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--hairline); border-radius: 11px; background: var(--surface-2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms var(--ease), background 140ms var(--ease); }
    .dance-background-modes button:hover { border-color: var(--accent-ring); }
    .dance-background-modes button.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px rgba(10,132,255,.08); }
    .dance-background-modes b { font-size: 10.5px; line-height: 1.3; }
    .dance-background-modes small { color: var(--fg-4); font-size: 9.5px; line-height: 1.35; }
    .dance-background-modes button[data-background-mode="provider"] { grid-column: 1 / -1; }
    .dance-background-upload { display: grid; gap: 8px; }
    .dance-background-drop { position: relative; display: grid; width: 100%; min-height: 118px; padding: 0; overflow: hidden; place-items: center; border: 1px dashed var(--hairline); border-radius: 11px; background: var(--surface-2); color: var(--fg-3); cursor: pointer; }
    .dance-background-drop:hover { border-color: var(--accent-ring); }
    .dance-background-drop span { display: grid; gap: 4px; text-align: center; }
    .dance-background-drop b { color: var(--fg-2); font-size: 11.5px; }
    .dance-background-drop small { color: var(--fg-4); font-size: 10px; }
    .dance-background-drop img { width: 100%; height: 160px; object-fit: cover; }
    .dance-background-actions { display: flex; gap: 7px; }
    .dance-background-actions .btn { flex: 1; justify-content: center; padding: 7px 10px; font-size: 10.5px; }
    .dance-background-upload p { margin: 0; color: var(--fg-4); font-size: 10px; line-height: 1.45; }
    .dance-background-upload em { min-height: 14px; color: var(--red); font-size: 10px; font-style: normal; }
    .dance-provider-availability { margin-top: 7px; padding: 8px 9px; border: 1px solid var(--hairline-2); border-radius: 9px; background: var(--surface-2); color: var(--fg-4); font-size: 10px; line-height: 1.45; }
    .dance-provider-control { display: grid; gap: 7px; }
    .dance-provider-control > label { color: var(--fg-3); font-size: 11px; font-weight: 650; letter-spacing: .02em; }
    .dance-provider-control select {
      width: 100%; padding: 10px 34px 10px 11px; border: 1px solid var(--hairline);
      border-radius: 10px; background: var(--surface-2); color: var(--fg); font: inherit;
      font-size: 12.5px; font-weight: 600; cursor: pointer;
    }
    .dance-provider-control select:focus { outline: none; border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
    .dance-provider-summary {
      display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px;
      padding: 9px 10px; border: 1px solid var(--hairline-2); border-radius: 10px;
      background: color-mix(in srgb, var(--accent-soft) 44%, var(--surface));
    }
    .dance-provider-summary span { color: var(--accent); font-size: 10px; font-weight: 700; }
    .dance-provider-summary strong { color: var(--fg-2); font-size: 10px; }
    .dance-provider-summary p { grid-column: 1 / -1; margin: 0; color: var(--fg-4); font-size: 10.5px; line-height: 1.35; }
    .dance-run { width: 100%; min-height: 46px; justify-content: center; font-size: 13px; }
    .dance-run:disabled { cursor: not-allowed; opacity: .5; }
    .dance-advanced-settings { border: 1px solid var(--hairline-2); border-radius: 11px; background: var(--surface-2); overflow: hidden; }
    .dance-advanced-settings > summary { padding: 11px 12px; color: var(--fg-3); cursor: pointer; font-size: 11px; font-weight: 650; list-style-position: inside; }
    .dance-advanced-settings-body { display: grid; gap: 12px; padding: 0 11px 11px; }

    .spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--hairline);
      border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
    .render-loader-video { width: 96px; height: 96px; display: block; object-fit: contain; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .hidden { display: none !important; }

    /* ---- Create-model form ---- */
    .form-grid { display: grid; gap: 16px; max-width: 620px; }
    .field { display: flex; flex-direction: column; gap: 7px; }
    .field label { font-size: 13px; font-weight: 600; color: var(--fg-2); }
    .field input, .field textarea, .field select {
      padding: 11px 14px; border-radius: var(--r-md); border: 1px solid var(--hairline);
      background: var(--surface-2); font-family: inherit; font-size: 14.5px; color: var(--fg); }
    .field input:focus, .field textarea:focus, .field select:focus {
      outline: none; border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
    .field textarea { resize: vertical; min-height: 90px; }
    .field .hint { font-size: 12px; color: var(--fg-4); }
    .chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .chip-pick { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--hairline);
      background: var(--surface-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 140ms var(--ease); }
    .chip-pick:hover { border-color: var(--accent-ring); }
    .chip-pick.sel { background: var(--accent-soft); border-color: var(--accent-ring); color: var(--accent); font-weight: 600; }

    /* model thumbnail: real photo or empty-state placeholder */
    .thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .thumb-empty {
      width: 100%; height: 100%; display: flex; flex-direction: column;
      align-items: center; justify-content: center; gap: 10px;
      color: var(--fg-4);
    }
    .thumb-empty svg { width: 40px; height: 40px; opacity: 0.7; }
    .thumb-empty span { font-size: 12.5px; font-weight: 500; }

    /* ---- Identity passport builder ---- */
    .identity-page-head p { max-width: 680px; }
    .identity-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 24px; align-items: start; }
    .identity-form { min-width: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
    .identity-section { padding: 28px; border-bottom: 1px solid var(--hairline-2); }
    .identity-section:last-of-type { border-bottom: 0; }
    .identity-section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
    .identity-section-title > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px;
      border-radius: 50%; background: #18181b; color: #fff; font-size: 11px; font-weight: 700; }
    .identity-section-title h3 { font-size: 17px; line-height: 1.2; }
    .identity-section-title p { margin-top: 4px; color: var(--fg-4); font-size: 12.5px; }
    .identity-grid { display: grid; gap: 16px; }
    .identity-grid--2 { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
    .identity-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .identity-mode input, .identity-options input, .color-options input, .feature-options input, .direction-options input { position: absolute; opacity: 0; pointer-events: none; }
    .identity-mode label { cursor: pointer; min-width: 0; }
    .identity-mode label > span { min-height: 54px; border: 1px solid var(--hairline); background: var(--surface-2); border-radius: var(--r-md);
      padding: 9px 12px; display: flex; flex-direction: column; justify-content: center; transition: border-color 140ms var(--ease), background 140ms var(--ease); }
    .identity-mode b { font-size: 13px; }
    .identity-mode small { font-size: 10.5px; color: var(--fg-4); margin-top: 2px; }
    .identity-mode input:checked + span { color: #18181b; border-color: #f5f5f7; background: #f5f5f7; box-shadow: inset 0 0 0 1px #f5f5f7; }
    .identity-mode input:checked + span small { color: #6e6e73; }

    .reference-zone { margin-top: 18px; }
    .reference-drop { min-height: 94px; border: 1px dashed #b9b9bd; border-radius: var(--r-md); display: flex; align-items: center;
      justify-content: center; gap: 13px; color: var(--fg-2); background: var(--surface-2); cursor: pointer; transition: border-color 140ms var(--ease), background 140ms var(--ease); }
    .reference-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
    .reference-drop svg { width: 24px; height: 24px; }
    .reference-drop span { display: flex; flex-direction: column; }
    .reference-drop b { font-size: 13px; }
    .reference-drop small { margin-top: 3px; font-size: 11px; color: var(--fg-4); }
    .reference-list { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; }
    .reference-list > span { width: 72px; flex: 0 0 72px; }
    .reference-list img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--hairline); display: block; }
    .reference-list small { display: block; margin-top: 4px; color: var(--fg-4); font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-list em { color: var(--red); font-size: 12px; font-style: normal; }

    .identity-fieldset { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; min-width: 0; }
    .identity-section-title + .identity-fieldset { margin-top: 0; }
    .identity-fieldset > label { color: var(--fg-2); font-size: 12.5px; font-weight: 600; }
    .identity-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
    .identity-options--six { grid-template-columns: repeat(6,minmax(0,1fr)); }
    .identity-options label { cursor: pointer; min-width: 0; }
    .identity-options span { min-height: 42px; padding: 6px 8px; border: 1px solid var(--hairline); background: var(--surface-2); color: var(--fg-2); border-radius: 6px;
      display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11.5px; line-height: 1.2;
      max-width: 100%; overflow-wrap: anywhere; transition: all 130ms var(--ease); }
    .identity-options label:hover span { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.07); }
    .identity-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
    .identity-options input:checked + span { color: #18181b; background: #f5f5f7; border-color: #f5f5f7; }
    .identity-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
    .identity-split--controls { align-items: start; gap: 18px 24px; }
    .identity-split--controls .identity-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .identity-split--controls .identity-options span { padding-inline: 4px; }

    .color-options { display: flex; gap: 11px; flex-wrap: wrap; }
    .color-options label { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; color: var(--fg-4); }
    .color-options label > span { width: 36px; height: 36px; border-radius: 50%; background: var(--swatch); border: 3px solid #fff; box-shadow: 0 0 0 1px #d7d7da; transition: box-shadow 130ms var(--ease), transform 130ms var(--ease); }
    .color-options input:checked + span { box-shadow: 0 0 0 2px #17171a; transform: scale(.94); }
    .color-options small { width: 68px; text-align: center; font-size: 9.5px; line-height: 1.15; }
    .color-options--hair label > span { width: 32px; height: 32px; }
    .color-options--hair .multi-swatch { background: conic-gradient(#bb8ac7,#7aa9c9,#e7a2a2,#dbc476,#bb8ac7); }
    .color-options label > .custom-swatch { display: grid; place-items: center; background: transparent; border-style: dashed; color: var(--fg-3); font-size: 18px; font-weight: 400; }

    .identity-custom-field { margin-top: 10px; }
    .identity-custom-field input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--accent-ring); border-radius: 7px;
      outline: none; background: rgba(10,132,255,.08); color: var(--fg); font: inherit; font-size: 12.5px; }
    .identity-custom-field input::placeholder { color: var(--fg-4); }
    .identity-custom-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

    .feature-options { display: flex; flex-wrap: wrap; gap: 8px; }
    .feature-options label { cursor: pointer; }
    .feature-options span { height: 38px; padding: 0 14px; display: flex; align-items: center; border: 1px solid var(--hairline);
      border-radius: 6px; background: var(--surface-2); color: var(--fg-2); font-size: 12px; transition: all 130ms var(--ease); }
    .feature-options input:checked + span { background: #f5f5f7; border-color: #f5f5f7; color: #17171a; }
    .identity-detail-field { margin-top: 16px; }
    .direction-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
    .direction-options label { cursor: pointer; min-width: 0; }
    .direction-options label > span { min-height: 64px; border: 1px solid var(--hairline); border-radius: 6px; padding: 10px 12px; display: flex;
      flex-direction: column; justify-content: center; background: var(--surface-2); transition: all 130ms var(--ease); }
    .direction-options label:hover > span { border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.07); }
    .direction-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
    .direction-options b { font-size: 12.5px; }
    .direction-options small { margin-top: 3px; color: var(--fg-4); font-size: 10.5px; line-height: 1.2; }
    .direction-options input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
    .identity-description { margin-top: 18px; }
    .identity-description label span { color: var(--fg-4); font-weight: 400; margin-left: 4px; }
    .identity-description textarea { min-height: 76px; }
    .identity-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; color: var(--fg-3); font-size: 11.5px; line-height: 1.35; cursor: pointer; }
    .identity-check input { margin-top: 1px; accent-color: #17171a; }
    .identity-check--adult { margin-top: 16px; color: var(--fg-2); font-weight: 500; }
    .identity-submit { display: flex; align-items: center; gap: 14px; padding: 22px 28px; background: rgba(255,255,255,.025); border-top: 1px solid var(--hairline-2); }
    .identity-submit .btn { min-width: 164px; justify-content: center; }
    .identity-submit .btn:disabled { opacity: .62; cursor: wait; }
    .identity-queue { display: flex; align-items: center; gap: 7px; color: var(--fg-4); font-size: 11.5px; }
    .identity-queue .dot { width: 7px; height: 7px; border-radius: 50%; background: #3db986; }

    .identity-preview-wrap { position: sticky; top: 84px; }
    .identity-preview { overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-md); }
    .identity-preview-head { height: 66px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--hairline-2); }
    .identity-preview-head > div { min-width: 0; display: flex; flex-direction: column; }
    .identity-kicker { color: #7d7d82; font-size: 9px; font-weight: 700; }
    .identity-preview-head b { margin-top: 3px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .identity-version { height: 26px; min-width: 34px; padding: 0 9px; border-radius: 999px; background: #18181b; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
    .identity-preview-canvas { position: relative; aspect-ratio: 3/4; background: #111217; overflow: hidden; }
    .identity-preview-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #a9abb3; }
    .identity-empty-mark { width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden; border: 1px solid #35363d; border-radius: 8px; margin-bottom: 16px; }
    .identity-empty-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
    .identity-preview-state > span { font-size: 11.5px; line-height: 1.5; }
    .identity-loading video { width: 142px; height: 142px; object-fit: contain; }
    .identity-loading > span { display: flex; flex-direction: column; margin-top: 10px; color: #f2f3f5; font-size: 12.5px; font-weight: 600; }
    .identity-loading small { margin-top: 4px; color: #8d9099; font-size: 10px; font-weight: 400; }
    .identity-ready { display: block; }
    .identity-ready .preview-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
    .identity-ready .preview-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
    .identity-lock { position: absolute; left: 12px; bottom: 12px; padding: 7px 10px; border-radius: 6px; background: rgba(15,18,17,.86); color: #a4f1cc !important;
      backdrop-filter: blur(8px); font-size: 10px !important; font-weight: 600; }
    .identity-summary { padding: 15px 16px 16px; }
    .identity-summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; line-height: 1.8; }
    .identity-summary-line span { color: var(--fg-4); }
    .identity-summary-line b { font-weight: 600; text-align: right; }
    .identity-summary > p { margin-top: 10px; color: var(--fg-2); font-size: 11.5px; line-height: 1.45; }
    .identity-summary-features { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
    .identity-summary-features span { padding: 4px 7px; border-radius: 4px; background: var(--surface-2); color: var(--fg-3); font-size: 9.5px; }
    .identity-preview #mp-save { margin: 0 16px 16px; width: calc(100% - 32px); justify-content: center; }

    /* ---- Single model / passport ---- */
    .model-detail-back { display: inline-block; margin-bottom: 7px; color: var(--fg-4); text-decoration: none; font-size: 12px; font-weight: 600; }
    .model-detail-back:hover { color: var(--accent); }
    .model-workspace-tabs { display: flex; gap: 4px; margin: 0 0 20px; padding: 4px; width: fit-content; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface-2); }
    .model-workspace-tabs a { min-width: 112px; padding: 9px 18px; border-radius: 7px; color: var(--fg-3); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; transition: background 140ms var(--ease), color 140ms var(--ease); }
    .model-workspace-tabs a:hover { color: var(--fg); }
    .model-workspace-tabs a.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
    .model-content-section { min-height: 420px; }
    .model-content-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
    .model-content-heading h3 { font-size: 20px; }
    .model-content-heading p { margin-top: 5px; color: var(--fg-3); font-size: 13px; }
    .model-content-empty { padding: 54px 28px; text-align: center; }
    .model-content-empty-mark { margin-bottom: 12px; font-size: 38px; opacity: .45; }
    .model-content-empty h3 { font-size: 17px; }
    .model-content-empty p { margin: 7px 0 18px; color: var(--fg-3); font-size: 13px; }
    .model-detail-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 20px; align-items: start; }
    .model-detail-visual, .model-passport-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
    .model-detail-photo { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #15161a; }
    .model-detail-photo > img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
    .model-detail-photo .thumb-empty img { width: 78px; height: 78px; border-radius: 8px; object-fit: cover; opacity: .9; }
    .model-detail-status { position: absolute; left: 14px; bottom: 14px; padding: 7px 10px; border-radius: 6px; background: rgba(18,19,22,.86); color: #a4f1cc; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(8px); }
    .model-detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline-2); }
    .model-detail-meta > div { min-width: 0; padding: 14px; border-right: 1px solid var(--hairline-2); }
    .model-detail-meta > div:last-child { border-right: 0; }
    .model-detail-meta span, .model-passport-heading > div > span, .passport-feature-block > span, .passport-note > span { display: block; color: var(--fg-4); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
    .model-detail-meta b { display: block; margin-top: 5px; color: var(--fg-2); font-size: 11.5px; line-height: 1.35; }
    .model-passport-panel { min-height: 520px; }
    .model-passport-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--hairline-2); }
    .model-passport-heading h3 { margin-top: 5px; font-size: 20px; }
    .passport-state { padding: 6px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg-4); font-size: 10.5px; font-weight: 700; }
    .passport-state.is-ready { background: rgba(61,185,134,.12); color: #68d5a7; }
    .passport-facts { display: grid; grid-template-columns: 1fr 1fr; }
    .passport-facts > div { padding: 17px 26px; border-bottom: 1px solid var(--hairline-2); }
    .passport-facts > div:nth-child(odd) { border-right: 1px solid var(--hairline-2); }
    .passport-facts span { display: block; color: var(--fg-4); font-size: 10.5px; }
    .passport-facts b { display: block; margin-top: 5px; font-size: 13px; font-weight: 600; }
    .passport-feature-block, .passport-note { padding: 22px 26px; border-bottom: 1px solid var(--hairline-2); }
    .passport-feature-block > div { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
    .passport-feature-block b { padding: 6px 9px; border-radius: 5px; background: var(--surface-2); color: var(--fg-2); font-size: 10.5px; }
    .passport-feature-block em { color: var(--fg-4); font-size: 12px; font-style: normal; }
    .passport-feature-block p, .passport-note p { margin-top: 12px; color: var(--fg-3); font-size: 12.5px; line-height: 1.55; }
    .passport-references { margin-top: 20px; padding: 26px; border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface-1); }
    .passport-references-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
    .passport-references-head > div > span { color: var(--fg-4); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; }
    .passport-references-head h3 { margin: 5px 0 4px; font-size: 18px; }
    .passport-references-head p { max-width: 680px; color: var(--fg-3); font-size: 12px; line-height: 1.5; }
    .passport-reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .passport-reference-card { min-width: 0; overflow: hidden; border: 1px solid var(--hairline-2); border-radius: var(--r-md); background: var(--surface-2); }
    .passport-reference-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #17171a; }
    .passport-reference-media > img { width: 100%; height: 100%; display: block; object-fit: cover; }
    .passport-reference-placeholder { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--fg-4); font-size: 11px; }
    .passport-reference-placeholder img { width: 28px; height: 28px; object-fit: contain; opacity: .45; }
    .passport-reference-badge { position: absolute; top: 9px; right: 9px; padding: 5px 7px; border-radius: 999px; background: rgba(17,17,20,.76); color: #fff; font-size: 9px; font-weight: 700; backdrop-filter: blur(8px); }
    .passport-reference-copy { min-height: 82px; padding: 12px; }
    .passport-reference-copy b { display: block; color: var(--fg-1); font-size: 12px; }
    .passport-reference-copy p { margin-top: 4px; color: var(--fg-4); font-size: 10.5px; line-height: 1.4; }
    .passport-reference-copy em { display: block; margin-top: 7px; color: var(--red); font-size: 10px; font-style: normal; }
    .passport-reference-card > .btn { margin: 0 12px 12px; width: calc(100% - 24px); }
    .passport-upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
    .passport-upload-slot { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); }
    .passport-upload-preview { width: 58px; height: 72px; grid-row: span 3; overflow: hidden; border-radius: 6px; background: #17171a; }
    .passport-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
    .passport-upload-preview img.is-placeholder { padding: 18px 12px; object-fit: contain; opacity: .4; }
    .passport-upload-slot b, .passport-upload-slot small { display: block; }
    .passport-upload-slot b { font-size: 11px; }
    .passport-upload-slot small { margin-top: 3px; color: var(--fg-4); font-size: 9.5px; line-height: 1.35; }
    .passport-upload-slot .btn { width: fit-content; min-height: 30px; padding: 0 10px; font-size: 9.5px; }
    .passport-remove { color: var(--fg-4); font-size: 9.5px; }
    .passport-empty-state { min-height: 420px; max-width: 480px; margin: 0 auto; padding: 44px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
    .passport-empty-mark { width: 80px; height: 80px; overflow: hidden; border-radius: 8px; border: 1px solid var(--hairline); }
    .passport-empty-mark img { width: 100%; height: 100%; object-fit: cover; }
    .passport-empty-state h3 { margin-top: 20px; font-size: 19px; }
    .passport-empty-state p { max-width: 430px; margin: 10px 0 22px; color: var(--fg-3); font-size: 13px; line-height: 1.55; }
    .passport-edit-identity { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 16px; align-items: stretch; }
    .passport-edit-identity input[readonly] { color: var(--fg-2); cursor: default; }
    .passport-edit-rule { padding: 12px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-2); display: flex; flex-direction: column; justify-content: center; }
    .passport-edit-rule span { color: var(--fg-4); font-size: 10px; }
    .passport-edit-rule b { margin-top: 3px; font-size: 13px; }
    .passport-edit-rule small { margin-top: 4px; color: var(--fg-4); font-size: 10.5px; line-height: 1.35; }

    @media (max-width: 1120px) {
      .identity-layout { grid-template-columns: minmax(0,1fr) 320px; }
      .identity-split--controls { grid-template-columns: 1fr; gap: 0; }
      .identity-split--controls .identity-options { grid-template-columns: repeat(5,minmax(0,1fr)); }
    }
    @media (max-width: 900px) {
	  .passport-reference-grid, .passport-upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .identity-layout { grid-template-columns: 1fr; }
      .identity-preview-wrap { position: static; max-width: 420px; width: 100%; margin: 0 auto; grid-row: 1; }
      .model-detail-layout { grid-template-columns: 1fr; }
      .model-detail-visual { max-width: 520px; width: 100%; }
    }
    @media (max-width: 640px) {
      .identity-section { padding: 20px 16px; }
      .identity-grid--2, .identity-split { grid-template-columns: 1fr; gap: 0; }
      .identity-mode, .direction-options { grid-template-columns: 1fr 1fr; }
      .identity-options--six { grid-template-columns: repeat(3,minmax(0,1fr)); }
      .identity-split--controls .identity-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
      .identity-submit { padding: 18px 16px; align-items: flex-start; flex-direction: column; }
      .identity-submit .btn { width: 100%; }
      .model-detail-head { align-items: flex-start; gap: 14px; }
      .model-detail-meta { grid-template-columns: 1fr; }
      .model-detail-meta > div { border-right: 0; border-bottom: 1px solid var(--hairline-2); }
      .model-detail-meta > div:last-child { border-bottom: 0; }
      .passport-facts { grid-template-columns: 1fr; }
      .passport-facts > div:nth-child(odd) { border-right: 0; }
      .passport-edit-identity { grid-template-columns: 1fr; }
    }

    /* status pills on model cards */
    .model-thumb .status-tag { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700;
      padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(6px); }
    .status-tag.ready { background: var(--green-soft); color: var(--green); }
    .status-tag.gen { background: var(--orange-soft); color: var(--orange); }
    .status-tag.failed { background: var(--red-soft); color: var(--red); }

    @media (max-width: 900px) {
      .shell { grid-template-columns: 1fr; }
      .sidebar { display: none; }
      .metrics { grid-template-columns: 1fr 1fr; }
      .grid-2, .grid-2-even, .gen-grid { grid-template-columns: 1fr; }
      .plans { grid-template-columns: 1fr; }
      .dance-flow { grid-template-columns: 1fr; }
      .dance-arrow { display: none; }
      .tracking-link-form { grid-template-columns: 1fr 1fr; }
      .tracking-link-form .btn { width: 100%; }
      .home-welcome { grid-template-columns: 1fr 150px; padding: 28px; }
      .home-orbit { width: 140px; height: 140px; }
      .home-orbit-dot--1 { left: 64px; }
      .home-steps, .home-metrics { grid-template-columns: 1fr 1fr; }
      .home-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 560px) {
      .tracking-link-form { grid-template-columns: 1fr; }
      .traffic-chart-head { flex-direction: column; align-items: stretch; gap: 12px; }
      .traffic-model-filter { justify-content: space-between; }
      .traffic-model-filter select { min-width: 0; flex: 1; }
      .traffic-chart-stage, #traffic-line-chart { min-height: 260px; height: 260px; }
      .traffic-chart-legend { margin-left: 0; }
      .home-welcome { grid-template-columns: 1fr; min-height: 0; padding: 24px 20px; }
      .home-orbit { display: none; }
      .home-steps, .home-metrics { grid-template-columns: 1fr; }
      .home-cycle { grid-template-columns: 1fr; }
      .home-cycle-item { min-height: 70px; padding: 0 0 15px; flex-direction: row; gap: 12px; }
      .home-cycle-item:not(:last-child)::after { top: 34px; right: auto; bottom: 0; left: 16px; width: 1px; height: auto; }
      .home-cycle-item span { margin-top: 1px; }
      .home-cycle-item small { max-width: none; }
      .home-attention { grid-template-columns: 1fr; }
    }

    /* ── Account (replicate-style: left subnav + sections) ── */
    .account-layout { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 28px; align-items: start; }
    .account-subnav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
    .acc-link { padding: 9px 12px; border-radius: var(--r-sm); color: var(--fg-3); text-decoration: none;
      font-size: 14px; font-weight: 500; transition: all 140ms var(--ease); }
    .acc-link:hover { color: var(--fg); background: var(--surface-2); }
    .acc-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
    .account-sections { min-width: 0; }

    .acc-profile-head { display: flex; align-items: center; gap: 16px; padding: 6px 0 20px; }
    .acc-avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
      background: linear-gradient(135deg,#bf5af2,#0a84ff); display: grid; place-items: center;
      color: #fff; font-size: 22px; font-weight: 600; }
    .acc-name { font-size: 16px; font-weight: 600; }
    .acc-handle { font-size: 13px; color: var(--fg-3); font-family: var(--font-mono, monospace); }
    .acc-profile-head .btn { margin-left: auto; }

    .acc-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .acc-plan-name { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
    .acc-plan-meta { font-size: 13px; color: var(--fg-3); margin-top: 4px; }
    .acc-plan-actions { display: flex; gap: 8px; }

    .acc-pay-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .acc-pay-chip { padding: 8px 14px; border: 1px solid var(--hairline); border-radius: var(--r-md);
      background: var(--surface-2); font-size: 13px; font-weight: 500; }
    .acc-pay-row .btn { margin-left: auto; }

    .acc-2fa-row, .acc-session { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .acc-2fa-title { font-size: 14px; font-weight: 600; }
    .acc-2fa-meta { font-size: 13px; color: var(--fg-3); margin-top: 2px; }
    .acc-session { padding: 12px 0; border-bottom: 1px solid var(--hairline-2); }
    .acc-session:last-child { border-bottom: none; }
    .acc-session b { font-size: 14px; font-weight: 600; display: block; }
    .acc-session span { font-size: 12.5px; color: var(--fg-3); }

    .acc-danger { border-color: var(--red-soft); }
    .acc-danger .panel-head h3 { color: var(--red); }
    .acc-danger-text { font-size: 13.5px; color: var(--fg-3); margin: 8px 0 16px; }
    .acc-danger-btn { background: var(--red-soft); color: var(--red); border: 1px solid var(--red); }
    .acc-danger-btn:hover { background: var(--red); color: #fff; }

    @media (max-width: 760px) {
      .account-layout { grid-template-columns: 1fr; }
      .account-subnav { position: static; flex-direction: row; overflow-x: auto; }
    }

    /* ── Account balance card ── */
    .acc-balance-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .acc-balance-label { font-size: 13px; color: var(--fg-3); font-weight: 500; }
    .acc-balance-value { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 4px;
      color: var(--green); font-variant-numeric: tabular-nums; }
    .acc-balance-meta { font-size: 12.5px; color: var(--fg-4); }

    /* ── Auth (login / register): landing-aligned and conversion-focused ── */
    .auth-body { background: #eef0f4; color: #171717; color-scheme: light; }
    .auth-page { min-height: 100svh; background: #eef0f4 url('/assets/auth-sculpture-v1.webp') center / cover no-repeat fixed; }
    .auth-nav { width: min(1320px, calc(100% - 64px)); height: 80px; margin: 0 auto;
      display: flex; align-items: center; justify-content: space-between; gap: 24px; }
    .auth-logo { display: inline-flex; align-items: center; gap: 10px; color: #171717;
      text-decoration: none; font-size: 19px; font-weight: 700; }
    .auth-logo img { width: 34px; height: 34px; object-fit: contain; }
    .auth-home { color: #76767a; font-size: 13px; text-decoration: none; transition: color 160ms var(--ease); }
    .auth-home:hover { color: #171717; }

    .auth-layout { width: min(660px, calc(100% - 24px)); min-height: calc(100svh - 92px);
      margin: 0 auto 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.92); border-radius: 8px;
      background: rgba(255,255,255,0.94); box-shadow: 0 18px 56px rgba(57,62,76,0.13);
      backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
    .auth-panel { min-height: calc(100svh - 94px); padding: 56px max(44px, 7vw); display: flex; align-items: center; }
    .auth-panel-inner { width: min(480px, 100%); margin: 0 auto; }
    .auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #7055ef; font-size: 12px; }
    .auth-eyebrow::before { content: ""; width: 6px; height: 6px; background: #b779e4; transform: rotate(45deg); }
    .auth-panel h1 { min-height: 50px; margin-top: 18px; color: #171717; font-size: 48px; font-weight: 650; line-height: 1.04; }
    .auth-subtitle { min-height: 47px; max-width: 420px; margin-top: 15px; color: #76767a; font-size: 15px; line-height: 1.55; }

    .auth-form { margin-top: 30px; display: grid; gap: 17px; }
    .auth-field { display: grid; gap: 8px; }
    .auth-field > span { color: #4f4f52; font-size: 12px; font-weight: 600; }
    .auth-field input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #dcdcdc;
      border-radius: 7px; outline: none; background: #fff; color: #171717; font-family: inherit; font-size: 14px;
      transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease); }
    .auth-field input::placeholder { color: #adadb0; }
    .auth-field input:focus { border-color: #8066f4; box-shadow: 0 0 0 3px rgba(112,85,239,0.10); }
    .auth-submit { width: 100%; min-height: 52px; padding: 0 18px; display: inline-flex; align-items: center;
      justify-content: space-between; gap: 16px; border: 0; border-radius: 8px; background: #6847ed; color: #fff;
      font-family: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
      transition: background 160ms var(--ease), transform 160ms var(--ease); }
    .auth-submit:hover { background: #5a3bd7; transform: translateY(-1px); }
    .auth-submit svg { width: 18px; height: 18px; }
    .auth-switch { margin-top: 22px; color: #858588; font-size: 13px; }
    .auth-switch a, .auth-legal a { color: #6544e8; font-weight: 600; text-decoration: none; }
    .auth-switch a:hover, .auth-legal a:hover { text-decoration: underline; }
    .auth-legal { min-height: 34px; max-width: 400px; margin-top: 16px; color: #a0a0a3; font-size: 11px; line-height: 1.5; }
    .auth-legal.is-placeholder { visibility: hidden; }
    .auth-error { margin-top: 20px; padding: 11px 13px; border: 1px solid #f0cbc6; border-radius: 7px;
      background: #fff4f1; color: #9e3f35; font-size: 13px; line-height: 1.45; }

    @media (max-width: 800px) {
      .auth-nav { width: calc(100% - 40px); height: 72px; }
      .auth-layout { width: calc(100% - 16px); min-height: calc(100svh - 80px); }
      .auth-panel { padding: 46px 22px 54px; align-items: flex-start; }
      .auth-panel-inner { max-width: 520px; }
      .auth-panel h1 { font-size: 40px; }
    }
    @media (max-width: 420px) {
      .auth-nav { width: calc(100% - 28px); }
      .auth-home { font-size: 12px; }
      .auth-panel h1 { font-size: 36px; }
    }

    .sidebar-logout { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px;
      border-radius: var(--r-sm); color: var(--fg-3); text-decoration: none; font-size: 13.5px; font-weight: 500;
      transition: all 140ms var(--ease); }
    .sidebar-logout:hover { color: var(--red); background: var(--red-soft); }

    /* ── Funnel node editor ── */
    .funnel-editor { border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden;
      background: #18181b; box-shadow: var(--shadow-sm); }
    .fn-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 12px 16px; border-bottom: 1px solid var(--hairline); background: #242426; }
    .fn-zoom { display: flex; align-items: center; gap: 6px; }
    .fn-zoom button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--hairline);
      background: var(--surface-2); color: var(--fg); font-size: 15px; cursor: pointer; }
    .fn-zoom button:hover { background: #48484a; }
    .fn-zoom #fn-zoom-val { min-width: 46px; text-align: center; font-family: var(--font-mono, monospace); font-size: 12.5px; color: var(--fg-3); }
    .fn-zoom #fn-zoom-reset { width: auto; padding: 0 12px; font-size: 12.5px; }
    .fn-hint { font-size: 12px; color: var(--fg-4); font-family: var(--font-mono, monospace); }

    .fn-canvas-wrap { position: relative; height: 620px; overflow: auto;
      background-color: #141416;
      background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
      background-size: 22px 22px; }
    .fn-canvas { position: relative; width: 2400px; height: 1600px; transform-origin: 0 0; }
    .fn-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
    .fn-wire { fill: none; stroke: #7c8cff; stroke-width: 2; }
    .fn-wire--temp { stroke: #98989d; stroke-dasharray: 5 5; }
    .fn-nodes { position: absolute; inset: 0; }

    .fn-node { position: absolute; width: 250px; background: #2c2c2e; border: 1px solid rgba(255,255,255,0.12);
      border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.45); user-select: none; }
    .fn-node-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 10px 12px; border-bottom: 1px solid var(--hairline-2); cursor: grab;
      background: linear-gradient(180deg, rgba(124,140,255,0.14), transparent); border-radius: 14px 14px 0 0; }
    .fn-node--source .fn-node-head { background: linear-gradient(180deg, rgba(191,90,242,0.16), transparent); }
    .fn-node--decision .fn-node-head { background: linear-gradient(180deg, rgba(48,209,88,0.14), transparent); }
    .fn-node--script .fn-node-head { background: linear-gradient(180deg, rgba(10,132,255,0.16), transparent); }
    .fn-node-title { font-family: var(--font-mono, monospace); font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--fg); outline: none; }
    .fn-node-del { border: none; background: transparent; color: var(--fg-4); font-size: 16px; cursor: pointer; line-height: 1; }
    .fn-node-del:hover { color: var(--red); }
    .fn-node-body { padding: 10px; display: flex; flex-direction: column; gap: 7px; }

    .fn-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
      padding: 8px 10px; border-radius: 10px; background: #3a3a3c; border: 1px solid var(--hairline-2); }
    .fn-row-kind { font-family: var(--font-mono, monospace); font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
      text-transform: uppercase; padding: 3px 6px; border-radius: 6px; cursor: pointer; }
    .fn-row--trigger .fn-row-kind { background: rgba(48,209,88,0.18); color: var(--green); }
    .fn-row--action .fn-row-kind { background: rgba(191,90,242,0.18); color: var(--purple); }
    .fn-row-label { font-size: 13px; color: var(--fg-2); outline: none; }
    .fn-row-value { font-family: var(--font-mono, monospace); font-size: 11.5px; color: var(--fg); outline: none;
      background: rgba(255,255,255,0.05); padding: 3px 7px; border-radius: 6px; min-width: 40px; }
    .fn-row-del { border: none; background: transparent; color: var(--fg-4); cursor: pointer; font-size: 14px; }
    .fn-row-del:hover { color: var(--red); }
    .fn-row-add { border: 1px dashed var(--hairline); background: transparent; color: var(--fg-3);
      border-radius: 8px; padding: 6px; font-size: 12px; cursor: pointer; }
    .fn-row-add:hover { border-color: var(--accent-ring); color: var(--accent); }

    .fn-port { position: absolute; width: 14px; height: 14px; border-radius: 50%;
      background: #18181b; border: 2px solid #7c8cff; top: 50%; transform: translateY(-50%); cursor: crosshair; }
    .fn-port-in { left: -8px; }
    .fn-port-out { right: -8px; }
    .fn-port:hover { background: #7c8cff; }

    /* ── Funnel editor: rich rows (roles, field types, ports, actions) ── */
    .fn-row { position: relative; grid-template-columns: 60px minmax(0,1fr) auto !important;
      padding: 18px 10px 8px !important; }
    /* role label above the row (TRIGGER / ACTION / DESCRIBE) */
    .fn-row::after { position: absolute; top: 3px; left: 10px; font-family: var(--font-mono,monospace);
      font-size: 8px; font-weight: 700; letter-spacing: 0.08em; }
    .fn-row--trigger::after { content: "TRIGGER"; color: #ff9dcb; }
    .fn-row--action::after  { content: "ACTION";  color: #a9ffd3; }
    .fn-row--describe::after { content: "DESCRIBE"; color: #ffe29a; }
    /* left color strip by field type */
    .fn-row::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 1px; }
    .fn-row.ft-input::before   { background: #00f0ff; box-shadow: 0 0 6px rgba(0,240,255,.6); }
    .fn-row.ft-output::before  { background: #b026ff; box-shadow: 0 0 6px rgba(176,38,255,.6); }
    .fn-row.ft-trigger::before { background: #ff2e93; box-shadow: 0 0 6px rgba(255,46,147,.6); }
    .fn-row.ft-bool::before    { background: #00ff88; box-shadow: 0 0 6px rgba(0,255,136,.6); }
    .fn-row.ft-text::before,
    .fn-row.ft-describe::before{ background: #ffd166; box-shadow: 0 0 6px rgba(255,209,102,.6); }
    .fn-row.ft-number::before  { background: #ff9f1c; box-shadow: 0 0 6px rgba(255,159,28,.6); }

    .fn-type-tag { grid-row: 1; width: 54px; font-family: var(--font-mono,monospace); font-size: 8.5px;
      font-weight: 700; letter-spacing: 0.04em; padding: 3px 5px; border-radius: 5px; cursor: pointer; text-align: center; }
    .fn-l { grid-column: 2; font-size: 12.5px; color: #c4b5d9; outline: none; overflow: hidden; text-overflow: ellipsis; }
    .fn-v { grid-column: 2; font-family: var(--font-mono,monospace); font-size: 11px; color: #f5f0ff; outline: none; }
    .fn-v.fn-pill { background: rgba(255,255,255,0.07); padding: 3px 8px; border-radius: 999px; display: inline-block; }

    .fn-actions { grid-column: 3; display: flex; gap: 4px; opacity: 0; transition: opacity 120ms; }
    .fn-row:hover .fn-actions { opacity: 1; }
    .fn-act { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px;
      font-size: 11px; color: var(--fg-4); cursor: pointer; }
    .fn-act:hover { background: rgba(255,255,255,0.08); color: var(--fg); }
    .fn-row-rm:hover { color: var(--red); }

    .fn-node-foot { display: flex; gap: 8px; padding: 8px 10px 10px; }
    .fn-add-field, .fn-add-describe { flex: 1; border: 1px dashed var(--hairline); background: transparent;
      color: var(--fg-3); border-radius: 8px; padding: 6px; font-size: 11.5px; cursor: pointer; }
    .fn-add-field:hover, .fn-add-describe:hover { border-color: var(--accent-ring); color: var(--accent); }

    /* type picker popup */
    .fn-type-pop { position: fixed; z-index: 1000; background: #2c2c2e; border: 1px solid var(--hairline);
      border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; min-width: 130px; }
    .fn-type-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
      font-family: var(--font-mono,monospace); font-size: 11px; color: var(--fg-2); cursor: pointer; }
    .fn-type-opt:hover { background: var(--surface-2); color: var(--fg); }
    .fn-type-opt .swatch { width: 10px; height: 10px; border-radius: 3px; }

    /* wires: never fill the bezier path (default fill paints black "bags") */
    #fn-wires path { fill: none; }
    .wire { fill: none; stroke-width: 2; }
    .wire-hit { stroke: transparent; stroke-width: 16; fill: none; pointer-events: stroke; cursor: pointer; }
    .wire-g:hover .wire { filter: drop-shadow(0 0 5px currentColor); stroke-width: 2.6; }

    /* ── Deposit / Withdraw screen (casino-style reference) ── */
    .dep-tabs { display: flex; gap: 24px; justify-content: center; margin-bottom: 26px; }
    .dep-tab { background: none; border: none; font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
      color: var(--fg-4); cursor: pointer; padding: 0; }
    .dep-tab.active { color: var(--fg); }

    .dep-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 22px; align-items: start; max-width: 940px; margin: 0 auto; }
    .dep-field-label { font-size: 13px; font-weight: 600; color: var(--fg-2); margin-bottom: 8px; }

    .dep-balance { display: flex; align-items: center; gap: 8px; padding: 15px 18px; border-radius: 999px;
      background: var(--surface); border: 1px solid var(--hairline); }
    .dep-balance span { color: var(--fg-3); font-size: 14px; }
    .dep-balance strong { font-size: 16px; font-weight: 600; }
    .dep-balance svg { width: 18px; height: 18px; margin-left: auto; color: var(--fg-3); }

    /* featured method — glowing gradient border like the reference Google Pay */
    .dep-method--featured { width: 100%; min-height: 92px; border-radius: 16px; position: relative;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
      background: linear-gradient(120deg, rgba(255,180,90,0.14), rgba(120,90,255,0.12));
      border: 1.5px solid transparent; cursor: pointer; color: var(--fg); }
    .dep-method--featured.active { border-color: #e8a15a;
      box-shadow: 0 0 0 1px rgba(232,161,90,0.5), 0 10px 40px rgba(232,161,90,0.15); }
    .dep-method-logo { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
    .dep-method-name { font-size: 14px; font-weight: 600; }

    .dep-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
    .dep-method { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
      min-height: 88px; border-radius: 14px; background: var(--surface); border: 1px solid var(--hairline);
      color: var(--fg-2); cursor: pointer; transition: all 140ms var(--ease); }
    .dep-method-grid .dep-method.active { border-color: var(--accent-ring); box-shadow: 0 0 0 1px var(--accent-ring); color: var(--fg); }
    .dep-method:hover { border-color: rgba(255,255,255,0.2); }
    .dep-method-ico { font-size: 24px; }
    .dep-method .dep-method-name { font-size: 13px; }

    .dep-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; padding: 20px; margin-bottom: 18px; }
    .dep-amount { width: 100%; text-align: center; font-size: 22px; font-weight: 600; color: var(--fg);
      background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 14px; padding: 20px; outline: none; }
    .dep-amount::placeholder { color: var(--fg-4); }
    .dep-minmax { display: flex; justify-content: space-between; font-size: 12px; color: var(--fg-4); margin: 8px 4px 16px; }

    /* provider logo card */
    .dep-provider { margin-top: 8px; border: 1px solid var(--hairline); border-radius: 14px;
      background: linear-gradient(180deg, #1c1f26, #101216); overflow: hidden; }
    .dep-provider-img { display: block; width: 100%; height: auto; }

    /* amount input with $ prefix */
    .dep-amount-wrap { position: relative; margin-top: 8px; }
    .dep-amount-wrap .dep-amount { text-align: left; padding-left: 44px; }
    .dep-amount-cur { position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
      font-size: 22px; font-weight: 600; color: var(--fg-3); pointer-events: none; }

    /* quick amount chips */
    .dep-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
    .dep-chip { padding: 10px 0; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--hairline);
      color: var(--fg-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 120ms; }
    .dep-chip:hover { border-color: var(--accent-ring); color: var(--fg); }
    .dep-chip.active { background: var(--accent-soft); border-color: var(--accent-ring); color: var(--fg); }

    /* NOWPayments-style pay button */
    .dep-crypto-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
      padding: 16px; border-radius: 14px; border: none; cursor: pointer; color: #fff; font-size: 15.5px; font-weight: 700;
      background: linear-gradient(180deg, #2a2f3a, #14171d); box-shadow: 0 8px 30px rgba(0,0,0,0.35); transition: filter 120ms; }
    .dep-crypto-btn:hover { filter: brightness(1.12); }
    .dep-crypto-btn:disabled { opacity: 0.6; cursor: default; }
    .dep-crypto-btn svg { color: #6ede4a; }
    .dep-note { margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--fg-4); text-align: center; }

    .dep-bonus-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
    .dep-bonus { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
      background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 12px; padding: 11px 14px; cursor: pointer; color: var(--fg); }
    .dep-bonus-pct { color: #ffb454; font-size: 13px; }
    .dep-bonus span { font-size: 12.5px; color: var(--fg-2); line-height: 1.35; }
    .dep-bonus svg { width: 16px; height: 16px; color: var(--fg-3); flex-shrink: 0; }
    .dep-bonus-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
      background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 12px; padding: 8px 14px; min-width: 96px; }
    .dep-bonus-badge svg { width: 20px; height: 20px; color: var(--fg-3); }
    .dep-bonus-badge span { font-size: 11px; color: var(--fg-3); }
    .dep-bonus-hint { color: #ff5a5f; font-size: 12.5px; text-align: center; margin: 12px 0; }

    .dep-promo { width: 100%; border-radius: 999px; padding: 12px; font-size: 13.5px; font-weight: 600; color: var(--fg);
      background: linear-gradient(90deg, rgba(255,90,120,0.25), rgba(120,90,255,0.25)); border: none; cursor: pointer; }
    .dep-toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13.5px; color: var(--fg-2); cursor: pointer; }
    .dep-toggle input { display: none; }
    .dep-toggle-track { width: 34px; height: 20px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); position: relative; transition: all 140ms; }
    .dep-toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #ffb454; transition: all 140ms; }
    .dep-toggle input:checked + .dep-toggle-track { background: var(--accent-soft); border-color: var(--accent-ring); }
    .dep-toggle input:checked + .dep-toggle-track::after { left: 16px; background: var(--accent); }

    .dep-input { width: 100%; padding: 13px 16px; border-radius: 12px; background: var(--surface-2);
      border: 1px solid var(--hairline); color: var(--fg); font-family: inherit; font-size: 14px; outline: none; margin-bottom: 12px; }
    .dep-input::placeholder { color: var(--fg-4); }
    .dep-input:focus { border-color: var(--accent-ring); }
    .dep-phone { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
    .dep-cc { display: flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 12px; margin-bottom: 12px;
      background: var(--surface-2); border: 1px solid var(--hairline); color: var(--fg); font-size: 14px; cursor: pointer; }
    .dep-check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--fg-2); margin: 4px 0 16px; cursor: pointer; }
    .dep-check input { display: none; }
    .dep-check span { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--hairline); background: var(--surface-2); display: grid; place-items: center; }
    .dep-check input:checked + span { background: var(--accent); border-color: var(--accent); }
    .dep-check input:checked + span::after { content: "✓"; color: #fff; font-size: 12px; }

    .dep-submit { width: 100%; padding: 15px; border-radius: 12px; border: none; cursor: pointer;
      background: linear-gradient(180deg, #6ede4a, #4fb92f); color: #0a2a05; font-size: 15px; font-weight: 700;
      box-shadow: 0 8px 30px rgba(79,185,47,0.25); }
    .dep-submit:hover { filter: brightness(1.06); }
    .dep-secure-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 12px; padding: 10px 14px;
      border-radius: 10px; background: rgba(255,180,90,0.10); color: #ffb454; font-size: 12px; }
    .dep-secure-note svg { width: 16px; height: 16px; flex-shrink: 0; }
    .dep-badges { display: flex; justify-content: space-around; border-top: 1px solid var(--hairline-2); padding-top: 12px; }
    .dep-badges span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-3); }
    .dep-badges svg { width: 15px; height: 15px; color: var(--green); }

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

    /* ── Deposit currency select (searchable, crypto/fiat sections) ── */
    .dep-select { position: relative; margin-top: 8px; }
    .dep-select-btn { width: 100%; display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--hairline);
      color: var(--fg-3); font-size: 14px; cursor: pointer; }
    .dep-select-btn #dep-cur-label.picked { color: var(--fg); font-weight: 500; }
    .dep-select-btn svg { width: 16px; height: 16px; }
    .dep-select-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
      background: #2c2c2e; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: var(--shadow-lg);
      overflow: hidden; }
    .dep-select-search { width: 100%; padding: 12px 14px; background: var(--surface-2); border: none;
      border-bottom: 1px solid var(--hairline); color: var(--fg); font-family: inherit; font-size: 13.5px; outline: none; }
    .dep-select-search::placeholder { color: var(--fg-4); }
    .dep-select-list { max-height: 260px; overflow-y: auto; padding: 6px; }
    .dep-sec-head { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
      color: var(--fg-4); padding: 8px 10px 4px; }
    .dep-cur-opt { width: 100%; display: flex; align-items: baseline; gap: 10px; text-align: left;
      padding: 9px 10px; border: none; background: none; border-radius: 8px; cursor: pointer; color: var(--fg-2); }
    .dep-cur-opt:hover { background: var(--surface-2); }
    .dep-cur-opt b { font-size: 13.5px; color: var(--fg); min-width: 52px; font-family: var(--font-mono,monospace); }
    .dep-cur-opt span { font-size: 12.5px; color: var(--fg-3); }

    /* Cap models grid height so "Танец по референсу" stays reachable without long scroll */
    .models-grid--scroll { max-height: 560px; overflow-y: auto; padding-right: 6px;
      align-content: start; }
    .models-grid--scroll::-webkit-scrollbar { width: 8px; }
    .models-grid--scroll::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; }

    /* ── Dashboard: bar chart with visible values + model picker ── */
    .bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding-top: 20px; }
    .bar { flex: 1; height: var(--h); min-height: 3px; border-radius: 4px 4px 0 0; position: relative;
      background: linear-gradient(180deg, var(--accent), rgba(10,132,255,0.35)); transition: filter 120ms; }
    .bar:hover { filter: brightness(1.3); }
    .bar-cap { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px;
      color: var(--fg-2); white-space: nowrap; opacity: 0; transition: opacity 120ms; font-variant-numeric: tabular-nums; }
    .bar:hover .bar-cap { opacity: 1; }
    .bar-axis { position: relative; height: 14px; margin-top: 10px; font-size: 11px; color: var(--fg-4); }
    .bar-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

    .dash-model-picker { position: relative; }
    .dash-picker-btn { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
      background: var(--surface); border: 1px solid var(--hairline); color: var(--fg); font-size: 14px; font-weight: 500; cursor: pointer; }
    .dash-picker-btn svg { width: 15px; height: 15px; }
    .dash-picker-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 180px;
      background: #2c2c2e; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
    .dash-picker-opt { display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; background: none;
      border-radius: 8px; color: var(--fg-2); font-size: 13.5px; cursor: pointer; }
    .dash-picker-opt:hover { background: var(--surface-2); color: var(--fg); }
    .dash-picker-opt.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

    /* Chart type switch (bars/line) */
    .chart-type-switch { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--hairline);
      border-radius: 8px; padding: 2px; }
    .chart-type-switch button { width: 30px; height: 26px; display: grid; place-items: center; border: none;
      background: none; border-radius: 6px; color: var(--fg-4); cursor: pointer; }
    .chart-type-switch button svg { width: 16px; height: 16px; }
    .chart-type-switch button.active { background: var(--surface); color: var(--accent); }
    .line-chart { width: 100%; height: 190px; display: block; }
    .hidden { display: none !important; }

    /* ── Sidebar expandable tree (AI-модели) ── */
    .nav-tree-head { position: relative; }
    .nav-caret { width: 15px !important; height: 15px !important; margin-left: auto; color: var(--fg-4);
      transition: transform 160ms var(--ease); }
    .nav-tree.open .nav-caret { transform: rotate(90deg); }
    .nav-tree-body { display: none; flex-direction: column; gap: 2px; margin: 2px 0 2px 30px;
      padding-left: 10px; border-left: 1px solid var(--hairline); }
    .nav-tree.open .nav-tree-body { display: flex; }
    .nav-subitem { padding: 7px 10px; border-radius: var(--r-sm); color: var(--fg-3); text-decoration: none;
      font-size: 13.5px; font-weight: 500; transition: all 140ms var(--ease); }
    .nav-subitem:hover { background: var(--surface-2); color: var(--fg); }
    .nav-subitem.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

    /* Chart cursor: vertical line + tooltip following the mouse */
    .chart-plot { position: relative; }
    .chart-cursor { position: absolute; top: 0; bottom: 0; width: 0; display: none; pointer-events: none; z-index: 3; }
    .chart-cursor-line { position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px;
      background: rgba(255,255,255,0.35); }
    .chart-cursor::after { content: ""; position: absolute; bottom: -4px; left: -4px; width: 8px; height: 8px;
      border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,0.25); }
    .chart-tip { position: absolute; top: -6px; display: none; pointer-events: none; z-index: 4;
      background: #1c1c1e; border: 1px solid var(--hairline); border-radius: 8px; padding: 6px 10px;
      box-shadow: var(--shadow-md); white-space: nowrap; }
    .chart-tip b { display: block; font-size: 11px; color: var(--fg-3); font-weight: 500; }
    .chart-tip span { font-size: 14px; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }

    /* ── Content library media items ── */
    .lib-thumb { position: relative; overflow: hidden; }
    .lib-media { width: 100%; height: 100%; object-fit: cover; display: block; }
    .lib-thumb > a:not(.lib-dl-btn) { display: block; width: 100%; height: 100%; }
    /* broken/missing image → show a neutral placeholder icon, no stray alt text */
    .lib-thumb.lib-broken::after { content: "🖼"; font-size: 30px; opacity: 0.35;
      position: absolute; inset: 0; display: grid; place-items: center; }
    .lib-badge { position: absolute; top: 8px; left: 8px; font-size: 9.5px; font-weight: 700;
      letter-spacing: 0.05em; padding: 3px 7px; border-radius: 6px; backdrop-filter: blur(6px); }
    .lib-badge--video { background: rgba(10,132,255,0.85); color: #fff; }
    .lib-badge--photo { background: rgba(191,90,242,0.8); color: #fff; }
    .lib-badge--unavailable { background: rgba(120,120,128,.84); color: #fff; }
    .lib-video-unavailable { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px; background: var(--surface-2); color: var(--fg-3); text-align: center; }
    .lib-video-unavailable strong { color: var(--fg-2); font-size: 13px; }
    .lib-video-unavailable small { max-width: 170px; color: var(--fg-4); font-size: 11px; line-height: 1.4; }
    .lib-dl { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600;
      color: var(--accent); text-decoration: none; }
    .lib-dl:hover { text-decoration: underline; }

    /* ── Content library filters + download icon ── */
    .lib-filters { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
    .seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 3px; }
    .seg button { border: none; background: none; color: var(--fg-3); font-size: 13px; font-weight: 500;
      padding: 6px 16px; border-radius: 999px; cursor: pointer; transition: all 140ms var(--ease); }
    .seg button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }

    .lib-model-select { position: relative; }
    .lib-model-btn { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
      background: var(--surface); border: 1px solid var(--hairline); color: var(--fg); font-size: 13.5px; cursor: pointer; }
    .lib-model-btn svg { width: 15px; height: 15px; color: var(--fg-3); }
    .lib-model-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 220px;
      background: #2c2c2e; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; }
    .lib-model-search { width: 100%; padding: 11px 14px; background: var(--surface-2); border: none;
      border-bottom: 1px solid var(--hairline); color: var(--fg); font-family: inherit; font-size: 13.5px; outline: none; }
    .lib-model-list { max-height: 260px; overflow-y: auto; padding: 6px; }
    .lib-model-opt { display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; background: none;
      border-radius: 8px; color: var(--fg-2); font-size: 13.5px; cursor: pointer; }
    .lib-model-opt:hover { background: var(--surface-2); color: var(--fg); }
    .lib-model-opt.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
    .lib-count { margin-left: auto; font-size: 12.5px; color: var(--fg-4); }
    .lib-empty { text-align: center; padding: 40px; color: var(--fg-3); font-size: 14px; }

    /* download icon button on the media thumbnail */
    .lib-dl-btn { position: absolute; bottom: 8px; right: 8px; width: 34px; height: 34px; display: grid; place-items: center;
      border-radius: 9px; background: rgba(0,0,0,0.55); color: #fff; backdrop-filter: blur(6px);
      opacity: 0; transition: opacity 140ms var(--ease); }
    .lib-item:hover .lib-dl-btn { opacity: 1; }
    .lib-dl-btn:hover { background: var(--accent); }
    .lib-dl-btn svg { width: 17px; height: 17px; }
/* Instagram profile-whitelist Reels library */
.trend-head{align-items:flex-start;gap:20px}.trend-head .btn{flex:0 0 auto}
.trend-status{margin:-6px 0 20px;padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--fg-2);font-size:13px}
.trend-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.trend-card{overflow:hidden;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:0 8px 24px rgba(0,0,0,.04)}
.trend-media{position:relative;display:block;aspect-ratio:9/12;background:var(--surface-2);overflow:hidden}
.trend-media img,.trend-media video{width:100%;height:100%;object-fit:cover;display:block}.trend-media img{transition:transform .25s ease}.trend-card:hover .trend-media img{transform:scale(1.025)}
.trend-placeholder{height:100%;display:grid;place-items:center;color:var(--fg-3);letter-spacing:.18em;font-weight:700}
.trend-play{position:absolute;right:12px;bottom:12px;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:rgba(9,9,12,.78);color:#fff;font-size:13px}
.trend-copy{padding:13px}.trend-meta,.trend-stats{display:flex;justify-content:space-between;gap:10px;color:var(--fg-3);font-size:12px}.trend-copy p{display:-webkit-box;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical;min-height:54px;margin:9px 0;font-size:13px;line-height:1.4;color:var(--fg-1)}
.trend-music{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:9px;color:var(--fg-2);font-size:12px}.trend-tags{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:10px}.trend-tags span{padding:3px 7px;border-radius:999px;background:var(--surface-2);color:var(--fg-2);font-size:11px}
.trend-actions{display:grid;grid-template-columns:1fr;gap:8px;margin-top:12px}.trend-actions .btn{width:100%;justify-content:center}.trend-instagram{text-align:center;color:var(--fg-3);font-size:12px}.trend-instagram:hover{color:var(--fg)}
.trend-more{display:flex;margin:20px auto 0;min-width:190px;justify-content:center}
.trend-empty{text-align:center;padding:48px}.trend-empty-icon{font-size:42px;color:var(--fg-3)}.trend-empty h3{margin:10px 0 5px}.trend-empty p{max-width:560px;margin:0 auto;color:var(--fg-3)}

/* Photo studio */
.photo-page-head{align-items:flex-start}.photo-eyebrow{margin-bottom:5px;color:var(--accent);font-size:11px;font-weight:750;letter-spacing:.1em;text-transform:uppercase}
.photo-composer{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}
.photo-form-panel{overflow:hidden}.photo-form-section{padding:22px 24px;border-bottom:1px solid var(--hairline)}
.photo-form-section--identity{display:grid;grid-template-columns:minmax(170px,.4fr) 1fr;align-items:center;gap:14px;padding-top:15px;padding-bottom:15px}.photo-form-section--identity .photo-section-head{margin:0}.photo-form-section--identity .photo-section-head p{display:none}.photo-form-section--identity .photo-model-grid{display:flex;gap:8px;overflow-x:auto;padding:2px}.photo-form-section--identity .photo-model-card{display:grid;grid-template-columns:46px minmax(58px,auto);align-items:center;min-width:118px;padding:0 9px 0 0}.photo-form-section--identity .photo-model-card img{width:46px;height:46px;aspect-ratio:1;border-radius:10px;object-fit:cover}.photo-form-section--identity .photo-model-card>span{padding:0 8px;font-size:11.5px}.photo-form-section--identity .photo-model-card i{top:3px;right:3px;width:18px;height:18px;font-size:10px;line-height:18px}
.photo-section-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}.photo-section-head>span{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:750}
.photo-section-head h3{font-size:15px;font-weight:650}.photo-section-head p{margin-top:1px;color:var(--fg-3);font-size:12.5px}
.photo-model-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,144px));gap:10px;justify-content:start}
.photo-model-card{position:relative;min-width:0;padding:0 0 9px;overflow:hidden;border:1px solid var(--hairline);border-radius:13px;background:var(--surface-2);color:var(--fg);font:inherit;text-align:left;cursor:pointer;transition:border-color 140ms var(--ease),transform 140ms var(--ease),box-shadow 140ms var(--ease)}
.photo-model-card:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.2)}.photo-model-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.photo-model-card img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--surface)}.photo-model-card>span{display:block;padding:8px 10px 0;overflow:hidden;font-size:12.5px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.photo-model-card i{position:absolute;top:7px;right:7px;display:none;width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;font-size:12px;font-style:normal;text-align:center;line-height:22px;box-shadow:0 2px 8px rgba(0,0,0,.35)}.photo-model-card.is-selected i{display:block}
.photo-direction-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}.photo-direction-field{display:grid;align-content:start;gap:8px;min-width:0}.photo-direction-field--wide{grid-column:1/-1}.photo-direction-field>span{color:var(--fg-2);font-size:12.5px;font-weight:650}.photo-direction-field>span b{margin-left:5px;color:var(--accent);font-size:9px;font-weight:750;letter-spacing:.04em;text-transform:uppercase}.photo-direction-field input,.photo-direction-field textarea{width:100%;padding:12px 13px;resize:vertical;border:1px solid var(--border);border-radius:11px;outline:none;background:color-mix(in srgb,var(--surface-2) 72%,var(--surface));color:var(--fg);font:inherit;font-size:13px;line-height:1.45;transition:border-color 140ms,box-shadow 140ms,background 140ms}.photo-direction-field input::placeholder,.photo-direction-field textarea::placeholder{color:var(--fg-4)}.photo-direction-field input:hover,.photo-direction-field textarea:hover{border-color:rgba(255,255,255,.2)}.photo-direction-field input:focus,.photo-direction-field textarea:focus{border-color:var(--accent);background:var(--surface-2);box-shadow:0 0 0 3px var(--accent-soft)}
.photo-direction-grid[hidden]{display:none}
[data-create-direction][hidden]{display:none}.photo-more-settings,.photo-generation-settings{margin-top:13px;border:1px solid var(--border);border-radius:12px;background:rgba(255,255,255,.018);overflow:hidden}.photo-more-settings>summary,.photo-generation-settings>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;color:var(--fg-2);cursor:pointer;font-size:12.5px;font-weight:700;list-style:none}.photo-more-settings>summary::-webkit-details-marker,.photo-generation-settings>summary::-webkit-details-marker{display:none}.photo-more-settings>summary::after,.photo-generation-settings>summary::after{content:"+";display:grid;width:22px;height:22px;flex:0 0 22px;place-items:center;border-radius:7px;background:var(--accent-soft);color:var(--accent);font-size:17px}.photo-more-settings[open]>summary::after,.photo-generation-settings[open]>summary::after{content:"−"}.photo-more-settings>summary small,.photo-generation-settings>summary small{margin-left:auto;color:var(--fg-4);font-size:10.5px;font-weight:500}.photo-more-settings-body{display:grid;gap:13px;padding:0 13px 13px}.photo-generation-settings{margin:14px 24px 0}.photo-generation-settings-body{padding:0 13px 13px}.photo-generation-settings .photo-engine-field{margin:0 0 13px}
.photo-mode-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}.photo-mode-switch label{position:relative;cursor:pointer}.photo-mode-switch input{position:absolute;opacity:0;pointer-events:none}.photo-mode-switch label>span{min-height:70px;padding:13px 14px;display:flex;flex-direction:column;justify-content:center;border:1px solid var(--hairline);border-radius:12px;background:var(--surface-2);transition:border-color 140ms,background 140ms,box-shadow 140ms}.photo-mode-switch input:checked+span{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 2px var(--accent-soft)}.photo-mode-switch strong{font-size:13px}.photo-mode-switch small{margin-top:3px;color:var(--fg-3);font-size:11px;line-height:1.35}.photo-reference-panel{margin-bottom:14px;padding:13px;border:1px solid var(--hairline);border-radius:12px;background:rgba(255,255,255,.018)}.photo-reference-panel[hidden]{display:none}.photo-reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.photo-reference-upload{min-width:0;padding:12px;display:flex;flex-direction:column;border:1px dashed var(--border);border-radius:10px;background:var(--surface-2);cursor:pointer}.photo-reference-upload:hover{border-color:var(--accent-ring)}.photo-reference-upload>span{font-size:12px;font-weight:650}.photo-reference-upload>span b{color:var(--accent);font-size:9px;text-transform:uppercase}.photo-reference-upload>small{margin-top:3px;color:var(--fg-4);font-size:10.5px;line-height:1.35}.photo-reference-upload input{max-width:100%;margin-top:10px;color:var(--fg-3);font-size:10.5px}.photo-reference-upload--base{min-height:94px;justify-content:center}.photo-preserve-options{margin-top:13px}.photo-preserve-options>span{color:var(--fg-3);font-size:11px}.photo-preserve-options>div{margin-top:8px;display:flex;flex-wrap:wrap;gap:7px}.photo-preserve-options label{position:relative;cursor:pointer}.photo-preserve-options input{position:absolute;opacity:0}.photo-preserve-options label span{padding:7px 10px;display:block;border:1px solid var(--hairline);border-radius:999px;background:var(--surface-2);color:var(--fg-3);font-size:11px}.photo-preserve-options input:checked+span{border-color:var(--accent);background:var(--accent-soft);color:var(--fg)}.photo-reference-rights{margin-top:15px;padding:12px 13px;display:flex;align-items:center;gap:11px;border:1px solid var(--border);border-radius:11px;background:var(--surface-2);color:var(--fg-2);cursor:pointer}.photo-reference-rights input{width:19px;height:19px;flex:0 0 19px;accent-color:var(--accent)}.photo-reference-rights>span{display:grid;gap:2px}.photo-reference-rights strong{font-size:12.5px;font-weight:700}.photo-reference-rights small{color:var(--fg-3);font-size:11px;line-height:1.35}
.photo-engine-field{display:grid;gap:8px;margin:18px 0}.photo-engine-field>span{font-weight:700}.photo-engine-field select{width:100%;min-height:48px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--fg);padding:0 14px;font:inherit}.photo-engine-field small{color:var(--fg-3)}
.photo-replace-instructions{margin-top:14px}.photo-replace-instructions>span{display:flex;align-items:center;justify-content:space-between}.photo-replace-instructions>span small{color:var(--fg-4);font-size:10px;font-weight:500}
.photo-prompt-meta{display:flex;justify-content:space-between;gap:12px;margin-top:7px;color:var(--fg-4);font-size:11.5px}.photo-prompt-meta b{color:var(--fg-3);font-weight:500}
.photo-format-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.photo-format-grid label{position:relative;display:grid;grid-template-columns:30px 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:11px 12px;border:1px solid var(--hairline);border-radius:12px;background:var(--surface-2);cursor:pointer;transition:border-color 140ms,background 140ms}.photo-format-grid label:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.photo-format-grid input{position:absolute;opacity:0;pointer-events:none}.photo-format-grid strong{font-size:13px}.photo-format-grid small{color:var(--fg-3);font-size:11px}.photo-ratio{grid-row:1/3;display:block;align-self:center;justify-self:center;border:2px solid var(--fg-3);border-radius:3px}.ratio-square{width:24px;height:24px}.ratio-portrait{width:20px;height:25px}.ratio-story{width:15px;height:27px}.photo-format-grid label:has(input:checked) .photo-ratio{border-color:var(--accent)}
.photo-format-grid label.is-disabled{opacity:.42;cursor:not-allowed}
.photo-submit-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 24px}.photo-submit-row>div{display:flex;flex-direction:column}.photo-submit-row strong{font-size:13.5px}.photo-submit-row>div span{margin-top:2px;color:var(--fg-3);font-size:11.5px}.photo-submit{justify-content:center;min-width:170px}.photo-submit:disabled{cursor:wait;opacity:.65;transform:none}
.photo-status{display:none;align-items:flex-start;justify-content:space-between;gap:10px;margin:10px 0 0;padding:12px 13px;border:1px solid var(--hairline);border-radius:11px;font-size:12px;line-height:1.45}.photo-status:not([data-state="idle"]){display:flex}.photo-status[data-state="running"]{border-color:var(--accent-ring);background:var(--accent-soft);color:#9dcbff}.photo-status[data-state="error"]{border-color:rgba(255,69,58,.42);background:var(--red-soft);color:#ffb0ab}.photo-status[data-state="success"]{border-color:rgba(48,209,88,.35);background:var(--green-soft);color:#a7edb7}.photo-status .btn{flex:0 0 auto;padding:7px 12px;font-size:11px}
.photo-preview-panel{position:sticky;top:82px;padding:14px}.photo-preview-top{display:flex;align-items:center;justify-content:space-between;padding:2px 2px 12px;color:var(--fg-3);font-size:11.5px;font-weight:650}.photo-preview-frame{position:relative;overflow:hidden;aspect-ratio:4/5;border:1px solid var(--hairline);border-radius:13px;background:radial-gradient(circle at 50% 38%,rgba(95,160,255,.1),transparent 42%),linear-gradient(145deg,var(--surface-2),#171719)}.photo-preview-frame>img{display:none;width:100%;height:100%;object-fit:cover}.photo-result-empty,.photo-result-loader{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:28px;text-align:center}.photo-result-empty>span{color:var(--purple);font-size:32px}.photo-result-empty strong,.photo-result-loader strong{margin-top:12px;font-size:15px}.photo-result-empty p,.photo-result-loader p{max-width:240px;margin:6px 0 0;color:var(--fg-3);font-size:11.5px;line-height:1.45}.photo-result-loader{display:none}.photo-result-loader video{display:block;width:148px;height:148px;object-fit:contain}.photo-result-actions{display:none;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.photo-result-actions .btn{justify-content:center;padding:9px 10px;font-size:11.5px}.photo-preview-panel[data-state="running"] .photo-result-empty{display:none}.photo-preview-panel[data-state="running"] .photo-result-loader{display:flex}.photo-preview-panel[data-state="done"] .photo-result-empty,.photo-preview-panel[data-state="done"] .photo-result-loader{display:none}.photo-preview-panel[data-state="done"] .photo-preview-frame>img{display:block}.photo-preview-panel[data-state="done"] .photo-result-actions{display:grid}.photo-preview-note{display:flex;gap:10px;margin-top:13px;padding:12px;border-radius:11px;background:var(--surface-2);color:var(--fg-3);font-size:11.5px;line-height:1.45}.photo-preview-note>span{color:var(--purple);font-size:16px}.photo-empty{grid-column:1/-1;padding:56px 24px;text-align:center}.photo-empty-icon{color:var(--purple);font-size:34px}.photo-empty h3{margin:10px 0 5px}.photo-empty p{max-width:430px;margin:0 auto 20px;color:var(--fg-3);font-size:13.5px}
@media(max-width:900px){.photo-composer{grid-template-columns:1fr}.photo-preview-panel{position:static}.dance-reference-guide--top .dance-reference-guide-body{grid-template-columns:1fr}}
@media(max-width:620px){.photo-form-section{padding:18px}.photo-form-section--identity{display:block}.photo-form-section--identity .photo-section-head{margin-bottom:12px}.photo-model-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-mode-switch,.photo-reference-grid,.photo-direction-grid{grid-template-columns:1fr}.photo-direction-field--wide{grid-column:auto}.photo-prompt-meta{align-items:flex-start;flex-direction:column}.photo-format-grid{grid-template-columns:1fr}.photo-generation-settings{margin:14px 18px 0}.photo-more-settings>summary small,.photo-generation-settings>summary small{display:none}.photo-submit-row{align-items:stretch;flex-direction:column;padding:18px}.photo-submit{width:100%}.photo-status{align-items:flex-start;flex-direction:column}.photo-status .btn{width:100%;justify-content:center}}
