    /* ===================================================================
       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;
    }
    .brand-mark {
      width: 30px; height: 30px;
      border-radius: 9px;
      background: linear-gradient(135deg, #0071e3, #af52de);
      display: grid; place-items: center;
      color: #fff; font-weight: 700; font-size: 16px;
      box-shadow: var(--shadow-sm);
    }
    .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; }
    .search {
      display: flex; align-items: center; gap: 8px;
      padding: 7px 12px; width: 240px;
      background: var(--surface-2);
      border: 1px solid var(--hairline);
      border-radius: 999px;
      color: var(--fg-3); font-size: 13.5px;
    }
    .search svg { width: 15px; height: 15px; }
    .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;
    }

    .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-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); }

    /* ---- Models grid ---- */
    .models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .model-card {
      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;
    }
    .model-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
    .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-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: 16/10; background: linear-gradient(150deg,#33333a,#2a2a30); display: grid; place-items: center; font-size: 26px; opacity: 0.7; }
    .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: stretch; }
    .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 */
    .pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .pick { border: 1.5px solid var(--hairline); border-radius: var(--r-sm); overflow: hidden; cursor: pointer;
      aspect-ratio: 4/5; background: linear-gradient(150deg,#3a3350,#2e3a4d); display: grid; place-items: center;
      font-size: 22px; position: relative; transition: all 140ms var(--ease); }
    .pick:hover { border-color: var(--accent-ring); }
    .pick.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
    .pick .nm { position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; font-weight: 600;
      background: rgba(255,255,255,0.85); padding: 2px; text-align: center; }

    /* result state: spinner then output */
    .result-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--fg-3); }
    .spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--hairline);
      border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .result-video { width: 100%; aspect-ratio: 9/16; max-height: 280px; border-radius: var(--r-md);
      background: #111; display: grid; place-items: center; color: #fff; font-size: 30px; }
    .result-idle .ico { font-size: 30px; opacity: 0.4; }
    .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; }

    /* detail-by-body-part grid on create-model form */
    .detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
    @media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }

    /* create-model: form + sticky vertical preview plate */
    .new-model-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; align-items: start; }
    .new-model-form { min-width: 0; }
    .new-model-preview { position: sticky; top: 84px; }
    .preview-plate {
      background: var(--surface); border: 1px solid var(--hairline);
      border-radius: var(--r-lg); box-shadow: var(--shadow-md); overflow: hidden;
      display: flex; flex-direction: column;
    }
    .preview-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--hairline-2); }
    .preview-title { font-size: 14px; font-weight: 600; }
    .preview-canvas { aspect-ratio: 3/4; background: linear-gradient(160deg,#3a3350,#2e3a4d); position: relative; display: grid; place-items: center; }
    .preview-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--fg-4); padding: 20px; }
    .preview-state svg { width: 46px; height: 46px; opacity: 0.6; }
    .preview-state span { font-size: 12.5px; line-height: 1.5; }
    .preview-photo { width: 100%; height: 100%; display: grid; place-items: center;
      font-size: 44px; color: #fff; background: linear-gradient(160deg,#5b4b9e,#3f6db0); }
    .preview-meta { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hairline-2); }
    .pm-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
    .pm-row span { color: var(--fg-3); }
    .pm-row b { font-weight: 600; }
    .preview-plate #mp-save { margin: 0 16px 16px; width: calc(100% - 32px); }

    @media (max-width: 900px) {
      .new-model-layout { grid-template-columns: 1fr; }
      .new-model-preview { position: static; }
    }

    /* 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); }

    @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; }
    }

    /* ── 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); }
