    * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
      background: #f5f5f4;
      color: #2a2a2a;
      min-height: 100dvh;
      width: 100vw;
      overflow: hidden;
    }

    body.scrollable {
      overflow: auto;
      position: static;
    }

    /* ── Home Screen / Dashboard ── */
    #home-screen {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      background: #f5f5f4;
      z-index: 5;
      overflow: auto;
    }

    .home-topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 40px;
      border-bottom: 1px solid rgba(0,0,0,0.08);
      flex-shrink: 0;
      position: relative;
    }

    .home-topbar-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .home-topbar-logo-img {
      height: 24px;
      opacity: 0.9;
      filter: invert(1);
    }

    .home-topbar-nav {
      display: flex;
      gap: 8px;
    }

    .home-topbar-nav-item {
      padding: 6px 14px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      color: rgba(0,0,0,0.5);
      cursor: pointer;
      transition: color 0.15s, background 0.15s;
      border: none;
      background: none;
    }

    .home-topbar-nav-item:hover {
      color: #2a2a2a;
      background: rgba(0,0,0,0.06);
    }

    .home-topbar-nav-item.active {
      color: #2a2a2a;
      background: rgba(0,0,0,0.1);
    }

    /* Hide icons on desktop, show text */
    .nav-icon { display: none; }
    .nav-label { display: inline; }

    /* Hide mobile-only elements on desktop */
    #mobile-actions-btn { display: none; }
    .mobile-action-sheet { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; transform: translateY(100%); pointer-events: none; }
    .mobile-action-sheet-backdrop { position: fixed; inset: 0; z-index: 199; opacity: 0; pointer-events: none; }
    .mobile-images-step { display: none !important; }
    .seo-filter {
      padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(0,0,0,0.1);
      background: #fff; color: rgba(0,0,0,0.5); font-size: 12px; font-weight: 500; cursor: pointer;
    }
    .seo-filter:hover { background: rgba(0,0,0,0.03); }
    .seo-filter.active { background: #2a2a2a; color: #fff; border-color: #2a2a2a; }


    .filter-pill {
      padding: 8px 16px;
      border-radius: 50px;
      border: 1px solid rgba(0,0,0,0.12);
      background: #fff;
      color: rgba(0,0,0,0.5);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }
    .filter-pill.active {
      background: #2a2a2a;
      color: #fff;
      border-color: #2a2a2a;
    }

    .home-content {
      flex: 1;
      display: flex;
      padding: 24px;
      min-height: 0;
    }

    .home-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(2, 1fr);
      gap: 16px;
      width: 100%;
      flex: 1;
    }

    @media (max-width: 600px) {
      .home-content { padding: 12px; padding-bottom: 100px; }
      .home-topbar { padding: 10px 14px; }
      .home-topbar-logo-img { height: 20px; }

      /* Compact the filter toggle */
      #home-shopify-toggle button { padding: 8px 10px !important; font-size: 12px !important; }

      /* Compact search row */
      #home-search-input { padding: 8px 12px !important; font-size: 13px !important; }

      /* Bottom tab bar with icons */
      .home-topbar-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #fff;
        border-top: 1px solid rgba(0,0,0,0.08);
        display: flex;
        justify-content: space-around;
        padding: 4px 0;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
        gap: 0;
        box-shadow: 0 -1px 8px rgba(0,0,0,0.04);
      }
      .nav-icon { display: block; margin: 0 auto 2px; }
      .nav-label { display: block; }
      .home-topbar-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 9px;
        font-weight: 500;
        padding: 6px 2px 4px;
        border-radius: 0;
        color: rgba(0,0,0,0.35);
        letter-spacing: 0.2px;
      }
      .home-topbar-nav-item .nav-icon {
        width: 20px;
        height: 20px;
        stroke: rgba(0,0,0,0.35);
      }
      .home-topbar-nav-item.active {
        background: none;
        color: #2a2a2a;
        font-weight: 600;
      }
      .home-topbar-nav-item.active .nav-icon {
        stroke: #2a2a2a;
      }
      .home-topbar-nav-item:hover {
        background: none;
      }

      /* Hide entire bottom nav on mobile — stages accessed via header menu */
      .home-topbar-nav { display: none !important; }

      /* Hide metrics and audit log on mobile */
      #metrics-icon-btn { display: none !important; }
      #audit-log-btn { display: none !important; }

      /* Mobile FAB navigation button */
      #mobile-fab-btn { display: flex !important; }

      /* Compact product cards on mobile */
      .draft-card { padding: 12px; gap: 4px; border-radius: 8px; }
      .draft-card-title { font-size: 13px; }
      .draft-card-meta { font-size: 10px; }

      /* ── Product form mobile overhaul ── */

      /* Compact header — back arrow, title, actions */
      #product-header {
        padding: 8px 12px !important;
        gap: 6px;
      }
      #product-header-title { font-size: 14px; font-weight: 600; }
      #product-back-btn { display: none !important; }
      #product-home-btn { display: none !important; }
      #mobile-back-btn { display: block !important; }
      .header-actions-desktop { display: none !important; }
      #mobile-actions-btn { display: flex !important; }

      /* Hide step dots and wizard nav on mobile — replaced by section bar */
      .step-dots { display: none !important; }
      .wizard-nav { display: none !important; }

      /* Mobile section tab bar */
      #mobile-section-bar {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 90;
        background: #fff;
        border-top: 1px solid rgba(0,0,0,0.08);
        padding: 4px 0;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
        box-shadow: 0 -1px 8px rgba(0,0,0,0.04);
      }
      .section-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 2px 6px;
        border: none;
        background: none;
        cursor: pointer;
        color: rgba(0,0,0,0.35);
        font-size: 9px;
        font-weight: 500;
        letter-spacing: 0.2px;
      }
      .section-tab svg { stroke: rgba(0,0,0,0.35); }
      .section-tab.active { color: #2a2a2a; font-weight: 600; }
      .section-tab.active svg { stroke: #2a2a2a; }

      /* Add bottom padding for section bar */
      .wizard-step { padding-bottom: 100px !important; }

      /* Mobile action sheet */
      .mobile-action-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
        padding: 8px 16px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        transform: translateY(100%);
        transition: transform 0.25s ease;
      }
      .mobile-action-sheet.open { transform: translateY(0); pointer-events: auto; }
      .mobile-action-sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 199;
        background: rgba(0,0,0,0.3);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
      }
      .mobile-action-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
      .mobile-action-sheet .action-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 4px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        font-size: 15px;
        font-weight: 500;
        color: #2a2a2a;
        cursor: pointer;
        background: none;
        border-left: none;
        border-right: none;
        border-top: none;
        width: 100%;
        text-align: left;
      }
      .mobile-action-sheet .action-item:last-child { border-bottom: none; }
      .mobile-action-sheet .action-item svg { flex-shrink: 0; }
      .mobile-action-sheet .action-item.action-primary { color: #1a7f37; font-weight: 600; }
      .mobile-action-sheet .action-item.action-dark { color: #fff; background: #2a2a2a; border-radius: 10px; justify-content: center; margin-top: 4px; padding: 14px; border: none; }
      .mobile-action-sheet .mobile-action-cancel { text-align: center; padding: 14px; color: rgba(0,0,0,0.4); font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 4px; }

      /* Mobile-friendly form fields — uniform sizing, prevent iOS zoom */
      .form-group input:not([type="checkbox"]),
      .form-group textarea,
      .form-group select {
        font-size: 16px !important;
        padding: 14px !important;
        border-radius: 10px !important;
        min-height: 48px;
        box-sizing: border-box;
      }
      .form-group label { font-size: 11px; }
      .ns-attr-grid .form-group input,
      .ns-attr-grid .form-group select {
        font-size: 16px !important;
        padding: 14px !important;
        border-radius: 10px !important;
        min-height: 48px;
      }
      .form-group input[readonly] {
        background: #f5f5f5 !important;
        opacity: 1 !important;
        color: rgba(0,0,0,0.5) !important;
      }

      /* Step title sizing */
      .step-title { font-size: 20px; }
      .step-subtitle { font-size: 13px; }

      /* Wizard step content padding */
      .wizard-step { padding: 16px !important; padding-bottom: 100px !important; }

      /* Mobile images step — hide from desktop step 2, show own step */
      .mobile-images-step.active { display: flex !important; }
      #desktop-images-section { display: none !important; }

      /* Mobile images: hide tabs/dropzone — JS builds inline search + camera bar */
      .mobile-images-step #ws-img-tabs { display: none !important; }
      .mobile-images-step #ws-tab-drop { display: none !important; }
      .mobile-images-step #ws-tab-camera { display: none !important; }
      .mobile-images-step #ws-tab-search { display: none !important; }
      .mobile-images-step #ws-image-upload-area { display: none !important; }
      .mobile-images-step #ws-existing-images { display: none !important; }
      .mobile-images-step .ns-attr-heading { display: none !important; }
      .mobile-images-step .ns-attr-section-body { padding: 0 !important; }

      /* Mobile: native camera, hide inline video */
      #ws-camera-inline { display: none !important; }
      #ws-camera-native { display: block !important; }

      /* Mobile image editor improvements */
      #ws-processed-grid { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
      #ws-image-search-results { max-height: 50vh !important; }
      .ws-img-tab { font-size: 13px !important; padding: 10px 12px !important; }
      #ws-image-dropzone { padding: 20px 16px !important; }

      /* ── Sleek mobile buttons ── */

      /* Wizard nav buttons — pill-shaped, taller touch targets */
      .wizard-nav { gap: 8px; }
      .wizard-nav button {
        border-radius: 50px !important;
        padding: 14px 16px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
      }
      .wizard-prev {
        background: rgba(0,0,0,0.04) !important;
        border: none !important;
        color: rgba(0,0,0,0.5) !important;
      }
      .wizard-skip {
        background: rgba(0,0,0,0.04) !important;
        border: none !important;
        color: rgba(0,0,0,0.5) !important;
        font-size: 14px !important;
      }
      .wizard-next {
        background: #2a2a2a !important;
        border: none !important;
        color: #fff !important;
      }

      /* Tag Pick/Type buttons — pill-shaped */
      .tag-add-btn {
        border-radius: 50px !important;
        padding: 6px 14px !important;
        font-size: 12px !important;
      }

      /* Tag option chips */
      .tag-option { border-radius: 50px !important; padding: 6px 14px !important; }

      /* Competitor lookup — stack on mobile */
      .competitor-lookup-row {
        flex-direction: column !important;
      }
      .competitor-lookup-btn {
        border-radius: 50px !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
      }

      /* AI suggest button */
      .ai-suggest-btn { border-radius: 50px !important; }

      /* General: any remaining square buttons inside wizard */
      #product-back-btn { border-radius: 50px !important; }
      #product-home-btn { border-radius: 50px !important; }
      #mobile-actions-btn { border-radius: 50px !important; }

      /* ── Floating Action Button (FAB) ── */
      #mobile-fab-btn {
        position: fixed;
        bottom: max(24px, env(safe-area-inset-bottom, 24px));
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: none;
        background: #2a2a2a;
        color: #fff;
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s, box-shadow 0.2s;
        -webkit-tap-highlight-color: transparent;
      }
      #mobile-fab-btn:active { transform: translateX(-50%) scale(0.92); }
      #mobile-fab-btn.open { background: #444; }

      #mobile-fab-menu {
        bottom: max(24px, env(safe-area-inset-bottom, 24px));
        left: 50%;
        width: 0;
        height: 0;
        overflow: visible;
      }

      .fab-menu-item {
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        width: 64px;
        height: 64px;
        background: #fff;
        border: 1.5px solid rgba(0,0,0,0.08);
        border-radius: 50%;
        font-size: 10px;
        font-weight: 600;
        color: #2a2a2a;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(0,0,0,0.12);
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
        transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
        -webkit-tap-highlight-color: transparent;
        text-align: center;
        padding: 0;
      }
      .fab-menu-item:active { transform: translate(-50%, -50%) scale(0.9) !important; }
      .fab-menu-item svg { flex-shrink: 0; color: rgba(0,0,0,0.45); }
    }

    .home-content { flex-direction: column; }

    .drafts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 14px;
      padding: 4px 0 24px;
    }

    .draft-card {
      padding: 16px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 10px;
      background: rgba(0,0,0,0.02);
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .draft-card:hover {
      background: rgba(0,0,0,0.05);
      border-color: rgba(0,0,0,0.25);
    }

    .draft-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
    }

    .draft-card-title {
      font-size: 14px;
      font-weight: 600;
      color: #2a2a2a;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      flex: 1;
    }

    .draft-card-delete {
      background: none;
      border: none;
      color: rgba(0,0,0,0.3);
      cursor: pointer;
      font-size: 16px;
      padding: 0 4px;
      line-height: 1;
      flex-shrink: 0;
    }

    .draft-card-delete:hover { color: #ff6b6b; }

    .draft-card-meta {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      margin-top: 1px;
    }

    .card-tags-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }

    .vendor-suggest-box {
      display: none;
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      background: #fff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      z-index: 50;
      max-height: 200px;
      overflow-y: auto;
    }

    #preview-desc-area ul {
      list-style-position: inside;
      padding-left: 0;
      margin: 6px 0;
    }

    #preview-desc-area li {
      margin-bottom: 2px;
    }

    #preview-desc-area h3 {
      font-size: 15px;
      font-weight: 600;
      margin: 14px 0 4px 0;
    }

    #preview-desc-area h3:first-of-type {
      margin-top: 0;
    }

    #preview-desc-area p {
      margin: 4px 0;
    }

    .vendor-suggest-item {
      padding: 10px 14px;
      font-size: 13px;
      color: #2a2a2a;
      cursor: pointer;
      border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    .vendor-suggest-item:last-child { border-bottom: none; }
    .vendor-suggest-item:hover { background: rgba(0,0,0,0.03); }

    .card-tag {
      font-size: 10px;
      font-weight: 500;
      padding: 2px 8px;
      border-radius: 4px;
      background: rgba(0,0,0,0.05);
      color: rgba(0,0,0,0.45);
      white-space: nowrap;
    }

    .draft-card-category {
      font-size: 11px;
      color: rgba(0,0,0,0.5);
      background: rgba(0,0,0,0.06);
      padding: 2px 8px;
      border-radius: 4px;
      display: inline-block;
    }

    .dn-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: rgba(0,0,0,0.06);
      border-radius: 6px;
      font-size: 12px;
      color: #2a2a2a;
      cursor: grab;
    }

    .dn-chip .dn-chip-label {
      font-weight: 500;
      color: rgba(0,0,0,0.4);
      font-size: 10px;
      text-transform: uppercase;
    }

    .dn-chip .dn-chip-value {
      font-weight: 600;
    }

    .dn-chip .dn-chip-remove {
      background: none;
      border: none;
      color: rgba(0,0,0,0.3);
      cursor: pointer;
      font-size: 14px;
      padding: 0 2px;
      line-height: 1;
    }

    .dn-chip .dn-chip-remove:hover {
      color: #ff6b6b;
    }

    .dn-picker-option {
      padding: 8px 12px;
      font-size: 13px;
      color: rgba(0,0,0,0.7);
      cursor: pointer;
    }

    .dn-picker-option:hover {
      background: rgba(0,0,0,0.06);
    }

    .dn-picker-option.disabled {
      opacity: 0.3;
      cursor: default;
      pointer-events: none;
    }

    .pending-card-actions {
      display: flex;
      gap: 8px;
      margin-top: 4px;
    }

    .pending-card-actions button {
      flex: 1;
      padding: 8px 12px;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      border: none;
    }

    .pending-edit-btn {
      background: rgba(0,0,0,0.06);
      color: #2a2a2a;
    }

    .pending-edit-btn:hover {
      background: rgba(0,0,0,0.12);
    }

    .pending-live-btn {
      background: #2a2a2a;
      color: #fff;
    }

    .pending-live-btn:hover {
      background: rgba(0,0,0,0.75);
    }

    .pending-live-btn:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }

    .pending-card-price {
      font-size: 13px;
      color: rgba(0,0,0,0.6);
      font-weight: 500;
    }

    .pending-card-netsuite-id {
      font-size: 10px;
      color: rgba(0,0,0,0.3);
      font-family: monospace;
    }

    .home-card {
      padding: 32px 24px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 12px;
      background: rgba(0,0,0,0.02);
      color: #2a2a2a;
      cursor: pointer;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      transition: background 0.2s, border-color 0.2s;
    }

    .home-card:hover {
      background: rgba(0,0,0,0.04);
      border-color: rgba(0,0,0,0.3);
    }

    .home-card-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: rgba(0,0,0,0.04);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .home-card-icon svg {
      width: 22px;
      height: 22px;
      stroke: rgba(0,0,0,0.45);
      fill: none;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .home-card:hover .home-card-icon svg {
      stroke: rgba(0,0,0,0.7);
    }

    .home-card-title {
      font-size: 14px;
      font-weight: 500;
      color: rgba(0,0,0,0.85);
    }

    .home-card-desc {
      font-size: 12px;
      color: rgba(0,0,0,0.3);
      line-height: 1.4;
    }

    /* ── Camera Screen ── */
    #camera-screen {
      position: absolute;
      inset: 0;
      display: none;
      flex-direction: column;
    }

    /* Viewfinder fills entire screen */
    #viewfinder {
      position: absolute;
      inset: 0;
      background: #f5f5f4;
      z-index: 0;
    }

    #viewfinder video {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* Top bar overlay */
    #top-bar {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      z-index: 10;
      padding: env(safe-area-inset-top, 12px) 20px 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
      padding-top: max(env(safe-area-inset-top, 12px), 16px);
    }

    #app-title {
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: rgba(255,255,255,0.9);
    }

    #photo-count {
      background: rgba(255,255,255,0.2);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      padding: 5px 14px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.5px;
      color: rgba(255,255,255,0.9);
    }

    /* Bottom controls overlay */
    #bottom-controls {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 10;
      background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
      padding-bottom: max(env(safe-area-inset-bottom, 20px), 24px);
    }

    /* Thumbnail strip */
    #thumbnail-strip {
      display: flex;
      gap: 10px;
      padding: 0 20px 20px;
      align-items: center;
      justify-content: center;
      min-height: 0;
      overflow-x: auto;
      scrollbar-width: none;
      transition: min-height 0.3s, padding 0.3s, opacity 0.3s;
    }

    #thumbnail-strip::-webkit-scrollbar { display: none; }

    #thumbnail-strip.has-photos {
      min-height: 64px;
      padding: 12px 20px 20px;
    }

    .thumb-wrapper {
      position: relative;
      flex-shrink: 0;
      animation: thumb-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes thumb-pop {
      0% { transform: scale(0); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }

    .thumb {
      width: 52px;
      height: 52px;
      border-radius: 10px;
      object-fit: cover;
      border: 2px solid rgba(0,0,0,0.3);
      display: block;
    }

    .thumb-remove {
      position: absolute;
      top: -7px;
      right: -7px;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: rgba(255,60,60,0.9);
      backdrop-filter: blur(4px);
      color: #2a2a2a;
      border: 2px solid rgba(0,0,0,0.5);
      font-size: 13px;
      font-weight: 600;
      line-height: 18px;
      text-align: center;
      cursor: pointer;
      z-index: 2;
    }

    /* Zoom slider */
    #zoom-control {
      display: none;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 0 40px 16px;
    }

    #zoom-control.visible { display: flex; }

    .zoom-label {
      font-size: 12px;
      font-weight: 600;
      color: rgba(255,255,255,0.7);
      min-width: 32px;
      text-align: center;
    }

    #zoom-slider {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 4px;
      border-radius: 2px;
      background: rgba(255,255,255,0.2);
      outline: none;
    }

    #zoom-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #ffffff;
      border: none;
      box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    }

    #zoom-slider::-moz-range-thumb {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #ffffff;
      border: none;
    }

    /* Shutter area */
    #shutter-area {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 20px;
      position: relative;
      height: 88px;
    }

    #shutter-btn {
      width: 76px;
      height: 76px;
      border-radius: 50%;
      border: 4px solid rgba(255,255,255,0.9);
      background: transparent;
      cursor: pointer;
      position: relative;
      flex-shrink: 0;
      -webkit-appearance: none;
      outline: none;
      transition: transform 0.15s;
    }

    #shutter-btn::after {
      content: '';
      position: absolute;
      inset: 4px;
      border-radius: 50%;
      background: rgba(255,255,255,0.95);
      transition: transform 0.1s ease;
    }

    #shutter-btn:active {
      transform: scale(0.92);
    }

    #shutter-btn:active::after {
      transform: scale(0.85);
    }

    #shutter-btn:disabled {
      opacity: 0.25;
      cursor: not-allowed;
    }

    #shutter-btn:disabled:active {
      transform: none;
    }

    /* Next button - positioned right of shutter */
    #next-btn {
      position: absolute;
      right: 24px;
      padding: 10px 22px;
      background: transparent;
      color: rgba(255,255,255,0.9);
      border: 1px solid rgba(255,255,255,0.3);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      opacity: 0;
      pointer-events: none;
      transform: translateX(8px);
      transition: opacity 0.25s, transform 0.25s, border-color 0.15s;
      -webkit-appearance: none;
    }

    #next-btn.visible {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(0);
    }

    #next-btn:hover {
      border-color: rgba(255,255,255,0.6);
    }

    #next-btn:active {
      background: rgba(255,255,255,0.1);
    }

    /* ── Processing Screen ── */
    #processing-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 20;
    }

    #processing-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #download-all-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      display: none;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #download-all-btn:hover { border-color: rgba(0,0,0,0.4); }

    #processing-status {
      font-size: 13px;
      font-weight: 500;
      color: rgba(0,0,0,0.5);
      letter-spacing: 0.3px;
    }

    #results-grid {
      padding: 16px;
      padding-bottom: max(env(safe-area-inset-bottom, 16px), 40px);
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }
    @media (max-width: 1000px) {
      #results-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 600px) {
      #results-grid { grid-template-columns: 1fr; }
    }

    .result-card {
      background: #ffffff;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.06);
      position: relative;
    }

    .drag-stage {
      position: relative;
      width: 100%;
      aspect-ratio: 1/1;
      background: #000;
      overflow: hidden;
      touch-action: none;
    }

    .result-card.editing .drag-stage {
      cursor: grab;
      outline: 2px solid rgba(0,0,0,0.2);
      outline-offset: -2px;
    }
    .result-card.editing .drag-stage:active { cursor: grabbing; }

    .drag-stage img {
      position: absolute;
      max-width: 80%;
      max-height: 80%;
      user-select: none;
      -webkit-user-select: none;
      pointer-events: none;
    }

    .drag-stage .watermark-img {
      position: absolute;
      width: 30%;
      max-width: none;
      max-height: none;
      opacity: 0.5;
      pointer-events: none;
      user-select: none;
      -webkit-user-select: none;
    }

    /* Pencil edit button */
    .card-edit-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      background: rgba(0,0,0,0.5);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      color: #ffffff;
      font-size: 14px;
      cursor: pointer;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s, border-color 0.15s;
    }
    .card-edit-btn:hover {
      background: rgba(0,0,0,0.7);
      border-color: rgba(0,0,0,0.4);
      color: #ffffff;
    }
    .result-card.editing .card-edit-btn { display: none; }

    /* Edit panel (hidden until editing) */
    .card-edit-tools {
      display: none;
      padding: 10px 12px 12px;
      border-top: 1px solid rgba(0,0,0,0.08);
      background: rgba(0,0,0,0.02);
    }
    .result-card.editing .card-edit-tools { display: block; }

    .edit-toolbar-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }
    .edit-toolbar-row:last-child { margin-bottom: 0; }

    .edit-toolbar-label {
      font-size: 9px;
      color: rgba(0,0,0,0.3);
      min-width: 44px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .edit-toolbar-row input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 2px;
      border-radius: 1px;
      background: rgba(0,0,0,0.1);
      outline: none;
    }
    .edit-toolbar-row input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
      box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }
    .edit-toolbar-row input[type="range"]::-moz-range-thumb {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
    }

    .edit-mode-btn {
      padding: 3px 10px;
      background: transparent;
      color: rgba(0,0,0,0.45);
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 4px;
      font-size: 10px;
      cursor: pointer;
      transition: all 0.15s;
    }
    .edit-mode-btn:hover { border-color: rgba(0,0,0,0.25); color: rgba(0,0,0,0.7); }
    .edit-mode-btn.active {
      background: rgba(0,0,0,0.1);
      border-color: rgba(0,0,0,0.25);
      color: #2a2a2a;
    }

    .edit-save-btn {
      width: 100%;
      padding: 8px;
      background: rgba(0,0,0,0.06);
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 6px;
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      margin-top: 8px;
      transition: all 0.15s;
    }
    .edit-save-btn:hover { background: rgba(0,0,0,0.12); color: #2a2a2a; }

    /* Hide bg-picker, sharpen, result-actions when NOT editing */
    .result-card .bg-picker,
    .result-card .sharpen-control,
    .result-card .result-actions { display: none; }
    .result-card.editing .bg-picker,
    .result-card.editing .sharpen-control { display: flex; }

    .drag-hint {
      position: absolute;
      bottom: 10px;
      left: 0;
      right: 0;
      text-align: center;
      font-size: 11px;
      color: rgba(128,128,128,0.6);
      pointer-events: none;
      transition: opacity 0.3s;
      display: none;
    }
    .result-card.editing .drag-hint { display: block; }
    .drag-stage.dragged .drag-hint { opacity: 0; }

    /* ── Background color picker ── */
    .bg-picker {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 0;
      margin-bottom: 6px;
    }

    .bg-picker-label {
      font-size: 9px;
      color: rgba(0,0,0,0.3);
      min-width: 44px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .bg-swatch {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 2px solid rgba(0,0,0,0.15);
      cursor: pointer;
      transition: border-color 0.15s, transform 0.1s;
      flex-shrink: 0;
      -webkit-appearance: none;
      padding: 0;
      outline: none;
    }

    .bg-swatch:active { transform: scale(0.9); }

    .bg-swatch.active {
      border-color: #2a2a2a;
      border-width: 3px;
    }

    .bg-custom-input {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 2px solid rgba(0,0,0,0.15);
      cursor: pointer;
      padding: 0;
      overflow: hidden;
      flex-shrink: 0;
      position: relative;
    }

    .bg-custom-input.active {
      border-color: #2a2a2a;
      border-width: 3px;
    }

    .bg-custom-input input {
      position: absolute;
      inset: -4px;
      width: 36px;
      height: 36px;
      border: none;
      cursor: pointer;
      -webkit-appearance: none;
      padding: 0;
    }

    /* Sharpness slider */
    .sharpen-control {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0;
      margin-bottom: 6px;
    }

    .sharpen-control label {
      font-size: 9px;
      color: rgba(0,0,0,0.3);
      white-space: nowrap;
      min-width: 44px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .sharpen-control input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      flex: 1;
      height: 2px;
      border-radius: 1px;
      background: rgba(0,0,0,0.1);
      outline: none;
    }

    .sharpen-control input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
      box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }

    .sharpen-control input[type="range"]::-moz-range-thumb {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #2a2a2a;
      border: none;
    }

    .sharpen-value {
      font-size: 10px;
      color: rgba(0,0,0,0.3);
      font-weight: 500;
      min-width: 20px;
      text-align: right;
    }

    .result-actions {
      padding: 12px 14px;
      display: flex;
      gap: 8px;
      justify-content: space-between;
      align-items: center;
    }

    .result-label {
      font-size: 13px;
      font-weight: 500;
      color: rgba(0,0,0,0.4);
    }

    .result-actions button {
      padding: 7px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    .result-actions button:hover {
      border-color: rgba(0,0,0,0.3);
      color: rgba(0,0,0,0.8);
    }

    /* ── Loader ── */
    .spinner {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 48px 20px;
      gap: 16px;
      background: #ffffff;
      border-radius: 16px;
      border: 1px solid rgba(0,0,0,0.06);
    }

    .spinner-ring {
      width: 40px;
      height: 40px;
      border: 3px solid rgba(0,0,0,0.1);
      border-top-color: #2a2a2a;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .progress-text {
      font-size: 13px;
      color: rgba(0,0,0,0.4);
      font-weight: 500;
    }

    /* ── Flash ── */
    #flash {
      position: fixed;
      inset: 0;
      background: #fff;
      opacity: 0;
      pointer-events: none;
      z-index: 100;
    }

    #flash.fire {
      animation: flash-anim 0.12s ease-out;
    }

    @keyframes flash-anim {
      0% { opacity: 0.7; }
      100% { opacity: 0; }
    }

    #capture-canvas { display: none; }

    /* ── Continue button on results page ── */
    #continue-btn {
      display: none;
      margin: 8px 16px 24px;
      padding: 12px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      transition: border-color 0.15s;
    }

    #continue-btn:hover { border-color: rgba(0,0,0,0.4); }

    /* ── Product Form Screen (Wizard) ── */
    #product-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 25;
    }

    #product-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #product-back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #product-back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #product-header-title {
      font-size: 15px;
      font-weight: 600;
      color: rgba(0,0,0,0.6);
    }

    #product-header .spacer { width: 60px; }

    /* Step indicators */
    .step-dots {
      display: flex;
      gap: 6px;
      justify-content: center;
      padding: 16px 0 4px;
    }

    .step-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: rgba(0,0,0,0.15);
      transition: background 0.2s, width 0.2s;
      cursor: pointer;
      position: relative;
    }
    /* Larger touch target */
    .step-dot::before {
      content: '';
      position: absolute;
      inset: -10px;
    }

    .step-dot.active {
      background: #2a2a2a;
      width: 24px;
      border-radius: 4px;
    }

    .step-dot.done {
      background: rgba(0,0,0,0.4);
    }

    /* Wizard step container */
    .wizard-step {
      display: none;
      flex-direction: column;
      gap: 20px;
      padding: 20px 16px;
      padding-bottom: max(env(safe-area-inset-bottom, 16px), 40px);
    }

    .wizard-step.active { display: flex; }

    .step-title {
      font-size: 22px;
      font-weight: 700;
      color: #2a2a2a;
      letter-spacing: -0.3px;
    }

    .step-subtitle {
      font-size: 13px;
      color: rgba(0,0,0,0.3);
      margin-top: -12px;
    }

    .wizard-nav {
      display: flex;
      gap: 10px;
      margin-top: 8px;
    }

    .wizard-nav button {
      flex: 1;
      padding: 12px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      transition: border-color 0.15s;
    }

    .wizard-prev {
      background: transparent;
      color: rgba(0,0,0,0.6);
    }

    .wizard-prev:hover { border-color: rgba(0,0,0,0.3); }

    .wizard-next {
      background: transparent;
      color: rgba(0,0,0,0.8);
      border-color: rgba(0,0,0,0.25);
    }

    .wizard-next:hover { border-color: rgba(0,0,0,0.45); }

    .wizard-skip {
      background: rgba(0,0,0,0.04);
      color: rgba(0,0,0,0.6);
      border: 1px dashed rgba(0,0,0,0.2);
      font-size: 13px;
    }

    .wizard-skip:hover { color: #2a2a2a; border-color: rgba(0,0,0,0.4); background: rgba(0,0,0,0.06); }

    .tag-picker-selected {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      min-height: 36px;
      padding: 8px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: rgba(0,0,0,0.04);
    }

    .tag-chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: rgba(0,0,0,0.1);
      border-radius: 6px;
      font-size: 12px;
      color: #2a2a2a;
    }

    .tag-chip-remove {
      background: none;
      border: none;
      color: rgba(0,0,0,0.4);
      cursor: pointer;
      font-size: 14px;
      padding: 0 2px;
      line-height: 1;
    }

    .tag-chip-remove:hover { color: #ff6b6b; }

    .tag-picker-options {
      display: none;
      flex-wrap: wrap;
      gap: 6px;
      padding: 12px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: rgba(0,0,0,0.02);
      margin-top: 8px;
    }

    .tag-picker-options.open { display: flex; }

    .tag-option {
      padding: 5px 12px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 6px;
      font-size: 12px;
      color: rgba(0,0,0,0.6);
      cursor: pointer;
      transition: all 0.15s;
      background: transparent;
    }

    .tag-option:hover {
      background: rgba(0,0,0,0.08);
      color: #2a2a2a;
      border-color: rgba(0,0,0,0.25);
    }

    .tag-option.selected {
      background: rgba(0,0,0,0.12);
      color: #2a2a2a;
      border-color: rgba(0,0,0,0.3);
    }

    .seo-char-counter {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      margin-top: 4px;
      text-align: right;
      transition: color 0.2s;
    }
    .seo-char-counter.warning { color: #ea580c; }
    .seo-char-counter.over { color: #dc2626; font-weight: 600; }
    .seo-char-counter.good { color: #16a34a; }

    .tag-add-btn {
      padding: 6px 16px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      font-size: 13px;
      cursor: pointer;
      transition: all 0.15s;
    }

    .tag-add-btn:hover { color: #2a2a2a; border-color: rgba(0,0,0,0.3); }

    .ai-suggest-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 10px;
      background: transparent;
      color: rgba(0,0,0,0.5);
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 6px;
      font-size: 11px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s, color 0.15s;
    }

    .ai-suggest-btn:hover { border-color: rgba(0,0,0,0.3); color: rgba(0,0,0,0.7); }

    .ai-suggest-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .ai-suggest-btn:disabled:active { transform: none; }

    .ai-suggest-btn .ai-spinner {
      display: none;
      width: 12px;
      height: 12px;
      border: 2px solid rgba(0,0,0,0.3);
      border-top-color: #2a2a2a;
      border-radius: 50%;
      animation: spin 0.6s linear infinite;
    }

    .ai-suggest-btn.loading .ai-spinner { display: inline-block; }
    .ai-suggest-btn.loading .ai-label { display: none; }

    .form-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-group label {
      font-size: 12px;
      font-weight: 600;
      color: rgba(0,0,0,0.4);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .form-group input:not([type="checkbox"]),
    .form-group textarea,
    .form-group select {
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 10px;
      padding: 12px 14px;
      font-size: 15px;
      color: #2a2a2a;
      font-family: inherit;
      -webkit-appearance: none;
      outline: none;
      transition: border-color 0.15s;
    }

    .form-group input:not([type="checkbox"]):focus,
    .form-group textarea:focus,
    .form-group select:focus {
      border-color: rgba(0,0,0,0.3);
    }

    .form-group input:not([type="checkbox"]).field-dirty,
    .form-group textarea.field-dirty,
    .form-group select.field-dirty {
      border: 1.5px solid #5b9df9;
      box-shadow: 0 0 0 3px rgba(91,157,249,0.12);
    }

    .form-group textarea {
      min-height: 100px;
      resize: vertical;
    }

    .form-group select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 36px;
    }

    .form-row {
      display: flex;
      gap: 12px;
    }

    .form-row .form-group { flex: 1; }

    .form-hint {
      font-size: 11px;
      color: rgba(0,0,0,0.2);
      margin-top: 2px;
    }

    /* NetSuite attribute form */
    .ns-attr-section {
      margin-top: 16px;
    }
    .ns-attr-heading {
      font-size: 13px;
      font-weight: 700;
      color: rgba(0,0,0,0.5);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      padding: 12px 0;
      margin-bottom: 8px;
      border-bottom: 1.5px solid rgba(0,0,0,0.08);
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }
    .ns-attr-heading::after {
      content: '';
      display: inline-block;
      width: 8px;
      height: 8px;
      border-right: 2px solid rgba(0,0,0,0.3);
      border-bottom: 2px solid rgba(0,0,0,0.3);
      transform: rotate(-45deg);
      transition: transform 0.2s;
      flex-shrink: 0;
      margin-left: 8px;
    }
    .ns-attr-heading.collapsed::after {
      transform: rotate(45deg);
    }
    .ns-attr-heading--static {
      cursor: default;
    }
    .ns-attr-heading--static::after {
      display: none;
    }
    .ns-attr-section-body {
      overflow: hidden;
      transition: max-height 0.25s ease, opacity 0.2s;
      max-height: 2000px;
      opacity: 1;
    }
    .ns-attr-section-body.collapsed {
      max-height: 0 !important;
      opacity: 0;
      margin: 0;
      padding: 0;
    }
    .ns-attr-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }
    @media (max-width: 900px) {
      .ns-attr-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 500px) {
      .ns-attr-grid { grid-template-columns: 1fr; }
    }
    .ns-attr-grid .form-group input,
    .ns-attr-grid .form-group select {
      padding: 8px 10px;
      font-size: 13px;
      border-radius: 6px;
    }
    .ns-attr-grid .form-group select {
      padding-right: 28px;
      background-position: right 8px center;
    }
    .ns-attr-grid .form-group label {
      font-size: 10px;
    }
    .ns-attr-grid .form-group input.field-error {
      border-color: #ff6b6b !important;
    }
    .ns-attr-grid .form-group input.field-dirty,
    .ns-attr-grid .form-group select.field-dirty {
      border: 1.5px solid #5b9df9 !important;
      box-shadow: 0 0 0 3px rgba(91,157,249,0.12);
    }
    .ns-attr-grid .form-group input.field-error::placeholder {
      color: rgba(255,107,107,0.5);
    }

    /* Admin field config controls */
    .field-admin-controls {
      display: flex;
      gap: 2px;
      margin-left: auto;
      flex-shrink: 0;
    }
    .ns-field-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(0,0,0,0.06);
      color: rgba(0,0,0,0.3);
      font-size: 9px;
      font-weight: 700;
      cursor: pointer;
      position: relative;
      flex-shrink: 0;
      font-style: italic;
    }
    .ns-field-icon:hover { background: rgba(0,0,0,0.12); color: rgba(0,0,0,0.5); }
    .ns-field-tip {
      position: absolute;
      bottom: calc(100% + 6px);
      left: 50%;
      transform: translateX(-50%);
      background: #2a2a2a;
      color: #fff;
      font-size: 10px;
      font-weight: 400;
      font-style: normal;
      padding: 4px 8px;
      border-radius: 4px;
      white-space: nowrap;
      z-index: 30;
    }
    .field-admin-btn {
      background: none;
      border: none;
      cursor: pointer;
      padding: 2px 4px;
      border-radius: 4px;
      opacity: 0.3;
      transition: opacity 0.15s, background 0.15s;
      display: flex;
      align-items: center;
    }
    .field-admin-btn:hover { opacity: 0.7; background: rgba(0,0,0,0.05); }
    .field-admin-btn.active { opacity: 1; }
    .field-admin-btn.vis-off { opacity: 0.15; }
    .field-admin-btn svg { width: 14px; height: 14px; }
    .field-label-row {
      display: flex;
      align-items: center;
      gap: 2px;
    }
    .field-label-row label { margin: 0; }

    /* Voice-to-text mic button */
    .voice-mic-btn {
      margin-left: auto;
      flex-shrink: 0;
      width: 28px;
      height: 28px;
      border: none;
      background: rgba(0,0,0,0.05);
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: rgba(0,0,0,0.35);
      transition: all 0.2s;
      padding: 0;
    }
    .voice-mic-btn:hover { background: rgba(0,0,0,0.1); color: rgba(0,0,0,0.5); }
    .voice-mic-btn.voice-active {
      background: rgba(239,68,68,0.12);
      color: #ef4444;
      animation: voice-pulse 1.2s ease-in-out infinite;
    }
    @keyframes voice-pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
      50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    }
    .form-group { position: relative; }
    .form-group.field-hidden { opacity: 0.25; }
    .form-group.field-hidden input,
    .form-group.field-hidden select,
    .form-group.field-hidden textarea { pointer-events: none; }
    .field-required-dot {
      color: #ff6b6b;
      font-size: 10px;
      margin-left: 3px;
    }
    .field-dirty-dot {
      display: none;
      width: 6px;
      height: 6px;
      background: #5b9df9;
      border-radius: 50%;
      margin-left: 4px;
      flex-shrink: 0;
    }
    .form-group.is-dirty .field-dirty-dot { display: inline-block; }

    .dirty-count-text {
      display: none;
      color: #5b9df9;
      font-size: 11px;
      font-weight: 600;
      line-height: 1.25;
      white-space: nowrap;
    }
    .dirty-count-text-mobile {
      padding: 2px 4px 10px;
      text-align: center;
    }
    .save-action-with-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .dirty-count-badge {
      display: none;
      background: #5b9df9;
      color: #fff;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.35;
      padding: 1px 6px;
      min-width: 16px;
      text-align: center;
    }

    /* Competitor SEO Lookup */
    .competitor-lookup {
      margin-top: 16px;
      padding: 16px;
      background: rgba(0,0,0,0.02);
      border: 1px solid rgba(0,0,0,0.06);
      border-radius: 10px;
    }
    .competitor-lookup-title {
      font-size: 11px;
      font-weight: 600;
      color: rgba(0,0,0,0.3);
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-bottom: 12px;
    }
    .competitor-lookup-row {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }
    .competitor-lookup-row input {
      flex: 1;
      padding: 8px 12px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      font-size: 13px;
      background: #fff;
    }
    .competitor-lookup-btn {
      padding: 8px 20px;
      background: #2a2a2a;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
    }
    .competitor-lookup-btn:disabled { opacity: 0.4; cursor: default; }
    .competitor-result {
      background: #fff;
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 8px;
      padding: 12px;
      margin-bottom: 8px;
    }
    .competitor-result-url {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      margin-bottom: 6px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .competitor-result-title {
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 6px;
    }
    .competitor-result-desc {
      font-size: 12px;
      color: rgba(0,0,0,0.5);
      margin-bottom: 8px;
    }
    .competitor-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }
    .competitor-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 10px;
      background: rgba(0,0,0,0.04);
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 20px;
      font-size: 11px;
      color: rgba(0,0,0,0.6);
      cursor: pointer;
      transition: all 0.15s;
    }
    .competitor-tag:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.15); }
    .competitor-tag.added { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
    .competitor-tag-plus { font-size: 13px; font-weight: 600; }

    /* Pricing info icon + tooltip */
    .pricing-info-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: rgba(0,0,0,0.08);
      color: rgba(0,0,0,0.4);
      font-size: 10px;
      font-weight: 700;
      cursor: help;
      margin-left: 6px;
      position: relative;
      vertical-align: middle;
    }
    .pricing-info-icon:hover { background: rgba(0,0,0,0.15); color: rgba(0,0,0,0.6); }
    .pricing-tooltip {
      display: none;
      position: absolute;
      bottom: calc(100% + 8px);
      left: 0;
      background: #2a2a2a;
      color: #fff;
      font-size: 11px;
      font-weight: 400;
      line-height: 1.5;
      padding: 10px 14px;
      border-radius: 8px;
      white-space: nowrap;
      z-index: 20;
      pointer-events: none;
    }
    .pricing-tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 14px;
      border: 5px solid transparent;
      border-top-color: #2a2a2a;
    }
    .pricing-info-icon:hover .pricing-tooltip { display: block; }

    /* Pricing multiplier checkboxes */
    .pricing-multiplier-row {
      display: flex;
      gap: 16px;
      margin: 10px 0;
      align-items: center;
    }
    .pricing-multiplier-label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: rgba(0,0,0,0.7);
      cursor: pointer;
    }
    .pricing-multiplier-label input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
    }

    /* Year range modal */
    .year-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .year-modal {
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 12px;
      padding: 24px;
      max-width: 320px;
      width: 90%;
    }
    .year-modal h3 {
      font-size: 15px;
      font-weight: 600;
      margin: 0 0 4px;
      color: #2a2a2a;
    }
    .year-modal p {
      font-size: 12px;
      color: rgba(0,0,0,0.4);
      margin: 0 0 16px;
    }
    .year-modal-row {
      display: flex;
      gap: 10px;
      margin-bottom: 12px;
    }
    .year-modal-row .form-group { flex: 1; }
    .year-modal-row input {
      width: 100%;
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 8px;
      padding: 10px;
      font-size: 14px;
      color: #2a2a2a;
      outline: none;
      font-family: inherit;
    }
    .year-modal-row input:focus { border-color: rgba(0,0,0,0.3); }
    .year-modal-btns {
      display: flex;
      gap: 8px;
    }
    .year-modal-btns button {
      flex: 1;
      padding: 10px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      border: 1px solid rgba(0,0,0,0.12);
      background: transparent;
      color: rgba(0,0,0,0.7);
      transition: all 0.15s;
    }
    .year-modal-btns button:hover { border-color: rgba(0,0,0,0.3); color: #2a2a2a; }
    .year-modal-btns button.primary {
      background: rgba(0,0,0,0.08);
      color: #2a2a2a;
    }

    .form-group-checkbox {
      flex-direction: row !important;
      align-items: center !important;
      gap: 8px !important;
    }
    .form-group-checkbox input[type="checkbox"] {
      width: 16px;
      height: 16px;
      padding: 0;
      border-radius: 4px;
      flex-shrink: 0;
    }

    /* Image preview strip in form */
    .form-images {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      padding: 4px 0;
    }

    .form-images::-webkit-scrollbar { display: none; }

    .form-images img {
      height: 80px;
      border-radius: 10px;
      border: 1px solid rgba(0,0,0,0.1);
    }

    #publish-btn {
      padding: 12px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      margin-top: 8px;
      transition: border-color 0.15s;
    }

    #publish-btn:hover { border-color: rgba(0,0,0,0.4); }

    /* ── Review Screen ── */
    #review-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 26;
    }

    #review-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #review-back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #review-back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #review-header-title {
      font-size: 15px;
      font-weight: 600;
      color: rgba(0,0,0,0.6);
    }

    #review-content {
      padding: 20px 16px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .review-images {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      scrollbar-width: none;
      padding: 4px 0;
    }

    .review-images::-webkit-scrollbar { display: none; }

    .review-images img {
      height: 120px;
      border-radius: 12px;
      border: 1px solid rgba(0,0,0,0.1);
    }

    .review-field {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .review-field-label {
      font-size: 11px;
      font-weight: 600;
      color: rgba(0,0,0,0.3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .review-field-value {
      font-size: 15px;
      color: #2a2a2a;
      line-height: 1.5;
      padding: 8px 10px;
      border-radius: 8px;
      border: 1px solid transparent;
      transition: border-color 0.15s, background 0.15s;
    }

    .review-field-editable {
      cursor: pointer;
      border: 1px dashed rgba(0,0,0,0.1);
    }

    .review-field-editable::after {
      content: ' ✎';
      font-size: 11px;
      color: rgba(0,0,0,0.25);
    }

    .review-field-editable:hover {
      border-color: rgba(0,0,0,0.2);
      background: rgba(0,0,0,0.03);
    }

    .review-field-value.empty {
      color: rgba(0,0,0,0.15);
      font-style: italic;
    }

    .review-edit-input,
    .review-edit-textarea {
      width: 100%;
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      padding: 8px 10px;
      font-size: 15px;
      color: #2a2a2a;
      font-family: inherit;
      outline: none;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    .review-edit-input:focus,
    .review-edit-textarea:focus {
      border-color: rgba(0,0,0,0.4);
    }

    .review-edit-textarea {
      min-height: 70px;
      resize: vertical;
    }

    .review-edit-hint {
      font-size: 10px;
      color: rgba(0,0,0,0.15);
      margin-top: 2px;
      text-align: right;
    }

    .review-divider {
      height: 1px;
      background: rgba(0,0,0,0.06);
    }

    .review-row {
      display: flex;
      gap: 20px;
    }

    .review-row .review-field { flex: 1; }

    #review-footer {
      padding: 16px;
      padding-bottom: max(env(safe-area-inset-bottom, 16px), 40px);
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    #review-footer .dirty-count-text {
      width: 100%;
      margin-bottom: -2px;
    }

    #publish-btn {
      padding: 10px 24px;
      background: #2a2a2a;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
    }

    #publish-btn:active { background: rgba(0,0,0,0.7); }
    #publish-btn:disabled { opacity: 0.25; cursor: not-allowed; }
    #publish-btn:disabled:active { background: #2a2a2a; }

    #save-draft-btn {
      padding: 10px 24px;
      background: transparent;
      color: rgba(0,0,0,0.7);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }
    #save-draft-btn:hover { border-color: rgba(0,0,0,0.3); }
    #save-draft-btn:disabled { opacity: 0.25; cursor: not-allowed; }

    #publish-status {
      text-align: center;
      font-size: 13px;
      color: rgba(0,0,0,0.4);
      min-height: 20px;
      margin-bottom: 12px;
      user-select: text;
      -webkit-user-select: text;
      cursor: text;
      word-break: break-all;
      max-width: 100%;
    }

    /* ── Part Lookup Screen ── */
    #lookup-screen {
      display: none;
      flex-direction: column;
      min-height: 100dvh;
      background: #f5f5f4;
      z-index: 20;
    }

    #lookup-header {
      position: sticky;
      top: 0;
      z-index: 30;
      padding: max(env(safe-area-inset-top, 12px), 16px) 20px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f5f5f4;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    #lookup-back-btn {
      padding: 8px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      transition: border-color 0.15s;
    }

    #lookup-back-btn:hover { border-color: rgba(0,0,0,0.3); }

    #lookup-header-title {
      font-size: 15px;
      font-weight: 600;
      color: rgba(0,0,0,0.6);
    }

    #lookup-header .spacer { width: 60px; }

    .lookup-body {
      padding: 20px 16px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .lookup-search-row {
      display: flex;
      gap: 10px;
    }

    .lookup-search-row input {
      flex: 1;
      background: transparent;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      padding: 9px 14px;
      font-size: 13px;
      color: rgba(0,0,0,0.85);
      font-family: inherit;
      -webkit-appearance: none;
      outline: none;
      transition: border-color 0.15s;
    }

    .lookup-search-row input:focus {
      border-color: rgba(0,0,0,0.3);
    }

    .lookup-search-row input::placeholder {
      color: rgba(0,0,0,0.25);
    }

    #lookup-search-btn {
      padding: 9px 16px;
      background: transparent;
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      white-space: nowrap;
      transition: border-color 0.15s;
    }

    #lookup-search-btn:hover { border-color: rgba(0,0,0,0.3); }
    #lookup-search-btn:disabled { opacity: 0.3; cursor: not-allowed; }

    #lookup-status {
      font-size: 13px;
      color: rgba(0,0,0,0.4);
      min-height: 20px;
    }

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

    @media (max-width: 900px) {
      .lookup-grid { grid-template-columns: repeat(3, 1fr); }
    }

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

    .lookup-img-card {
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      border: 2px solid transparent;
      cursor: pointer;
      transition: border-color 0.15s, transform 0.1s;
      background: #ffffff;
    }

    .lookup-img-card:active { transform: scale(0.97); }

    .lookup-img-card.selected {
      border-color: #2a2a2a;
    }

    .lookup-img-card img {
      width: 100%;
      aspect-ratio: 1;
      object-fit: cover;
      display: block;
    }

    .lookup-img-check {
      display: none;
      position: absolute;
      top: 8px;
      right: 8px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: #2a2a2a;
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      line-height: 24px;
      text-align: center;
    }

    .lookup-img-card.selected .lookup-img-check { display: block; }

    .lookup-skip-bg {
      display: none;
      position: absolute;
      top: 8px;
      left: 8px;
      padding: 3px 8px;
      background: rgba(0,0,0,0.7);
      color: rgba(0,0,0,0.6);
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 5px;
      font-size: 10px;
      font-weight: 500;
      cursor: pointer;
      z-index: 2;
      transition: border-color 0.15s, color 0.15s;
    }

    .lookup-img-card.selected .lookup-skip-bg { display: block; }

    .lookup-skip-bg:hover { border-color: rgba(0,0,0,0.4); }

    .lookup-skip-bg.active {
      background: rgba(255,140,0,0.2);
      border-color: rgba(255,140,0,0.5);
      color: rgba(255,180,80,0.9);
    }

    .lookup-img-source {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 4px 8px;
      background: rgba(0,0,0,0.7);
      font-size: 10px;
      color: rgba(0,0,0,0.5);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    #lookup-use-btn {
      display: none;
      padding: 12px;
      background: transparent;
      color: rgba(0,0,0,0.8);
      border: 1px solid rgba(0,0,0,0.2);
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      -webkit-appearance: none;
      text-align: center;
      margin-top: 4px;
      transition: border-color 0.15s;
    }

    #lookup-use-btn:hover { border-color: rgba(0,0,0,0.4); }

    /* Searchable dropdown */
    .search-select {
      position: relative;
    }

    .search-select-input {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid rgba(0,0,0,0.15);
      border-radius: 8px;
      background: rgba(0,0,0,0.04);
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
    }

    .search-select-input:focus {
      border-color: rgba(0,0,0,0.3);
    }

    .search-select-dropdown {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      max-height: 240px;
      overflow-y: auto;
      background: #ffffff;
      border: 1px solid rgba(0,0,0,0.15);
      border-top: none;
      border-radius: 0 0 8px 8px;
      z-index: 100;
    }

    .search-select-dropdown.open { display: block; }

    .search-select-option {
      padding: 8px 12px;
      font-size: 13px;
      color: rgba(0,0,0,0.7);
      cursor: pointer;
    }

    .search-select-option:hover {
      background: rgba(0,0,0,0.08);
      color: #2a2a2a;
    }

    /* ── Auth Screen ── */
    #auth-screen {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #f5f5f4;
      z-index: 100;
    }

    .auth-card {
      width: 100%;
      max-width: 400px;
      padding: 40px 32px;
      margin: 0 20px;
    }

    .auth-logo {
      display: block;
      height: 28px;
      margin: 0 auto 32px;
      filter: invert(1);
      opacity: 0.9;
    }

    .auth-title {
      font-size: 22px;
      font-weight: 700;
      text-align: center;
      color: #2a2a2a;
      margin-bottom: 4px;
    }

    .auth-subtitle {
      font-size: 13px;
      text-align: center;
      color: rgba(0,0,0,0.4);
      margin-bottom: 28px;
    }

    .auth-form {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .auth-row {
      display: flex;
      gap: 10px;
    }

    .auth-row .auth-input { flex: 1; }

    .auth-input {
      padding: 12px 14px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #fff;
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
      width: 100%;
    }

    .auth-input:focus {
      border-color: rgba(0,0,0,0.3);
    }

    .auth-input.error {
      border-color: #ff6b6b;
    }

    .auth-select {
      padding: 12px 14px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #fff;
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
      width: 100%;
      -webkit-appearance: none;
    }

    .auth-btn {
      padding: 13px;
      background: #2a2a2a;
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      margin-top: 4px;
    }

    .auth-btn:hover { opacity: 0.85; }
    .auth-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    .auth-toggle {
      text-align: center;
      margin-top: 20px;
      font-size: 13px;
      color: rgba(0,0,0,0.45);
    }

    .auth-toggle a {
      color: #2a2a2a;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
    }

    .auth-toggle a:hover { text-decoration: underline; }

    .auth-error {
      text-align: center;
      font-size: 13px;
      color: #ff6b6b;
      min-height: 18px;
    }

    .auth-domain-hint {
      font-size: 11px;
      color: rgba(0,0,0,0.35);
      text-align: center;
      margin-top: -4px;
    }

    /* ── Panel Overlay ── */
    .panel-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.3);
      z-index: 200;
      display: flex;
      justify-content: flex-end;
    }

    .panel {
      width: 100%;
      max-width: 380px;
      background: #fff;
      height: 100%;
      overflow-y: auto;
      padding: 28px 24px;
      box-shadow: -4px 0 20px rgba(0,0,0,0.1);
      animation: panelSlideIn 0.2s ease;
    }

    @keyframes panelSlideIn {
      from { transform: translateX(100%); }
      to { transform: translateX(0); }
    }

    .panel-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }

    .panel-title {
      font-size: 18px;
      font-weight: 700;
      color: #2a2a2a;
    }

    .panel-close {
      background: none;
      border: none;
      font-size: 22px;
      color: rgba(0,0,0,0.35);
      cursor: pointer;
      padding: 4px 8px;
    }

    .panel-close:hover { color: #2a2a2a; }

    @media (max-width: 600px) {
      .panel-overlay {
        justify-content: center;
        align-items: flex-end;
        overscroll-behavior: contain;
      }
      .panel {
        max-width: 100%;
        width: 100%;
        height: 92vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        animation: panelSlideUp 0.25s ease;
        padding: 20px 16px;
        overscroll-behavior: contain;
      }
      @keyframes panelSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
      }
    }

    .panel-section {
      margin-bottom: 24px;
    }

    .panel-label {
      font-size: 11px;
      font-weight: 600;
      color: rgba(0,0,0,0.35);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 6px;
    }

    .panel-value {
      font-size: 15px;
      color: #2a2a2a;
      padding: 10px 0;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .panel-input {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 8px;
      background: #f5f5f4;
      color: #2a2a2a;
      font-size: 14px;
      outline: none;
    }

    .panel-input:focus { border-color: rgba(0,0,0,0.3); }

    .panel-btn {
      padding: 10px 16px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      width: 100%;
    }

    .panel-btn-primary {
      background: #2a2a2a;
      color: #fff;
    }

    .panel-btn-primary:hover { opacity: 0.85; }
    .panel-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

    .panel-btn-danger {
      background: none;
      color: #ff6b6b;
      border: 1px solid rgba(255,107,107,0.3);
    }

    .panel-btn-danger:hover { background: rgba(255,107,107,0.06); }

    .panel-status {
      font-size: 12px;
      text-align: center;
      min-height: 16px;
      margin-top: 8px;
    }

    .member-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 0;
      border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .member-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .member-name {
      font-size: 14px;
      font-weight: 600;
      color: #2a2a2a;
    }

    .member-email {
      font-size: 12px;
      color: rgba(0,0,0,0.4);
    }

    .member-role {
      font-size: 11px;
      color: rgba(0,0,0,0.5);
      background: rgba(0,0,0,0.05);
      padding: 2px 8px;
      border-radius: 4px;
      text-transform: capitalize;
    }

    .member-remove {
      background: none;
      border: none;
      color: rgba(0,0,0,0.2);
      cursor: pointer;
      font-size: 18px;
      padding: 4px 8px;
    }

    .member-remove:hover { color: #ff6b6b; }

    /* Fullscreen editor sliders — large touch-friendly thumbs */
    .fs-editor-slider::-webkit-slider-runnable-track {
      height: 4px;
      background: rgba(255,255,255,0.15);
      border-radius: 2px;
    }
    .fs-editor-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #fff;
      border: none;
      margin-top: -12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }
    .fs-editor-slider::-moz-range-track {
      height: 4px;
      background: rgba(255,255,255,0.15);
      border-radius: 2px;
      border: none;
    }
    .fs-editor-slider::-moz-range-thumb {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #fff;
      border: none;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }
