html, body { margin: 0; padding: 0; width: 100%; height: 100%; background: #ffffff; overflow: hidden; font-family: -apple-system, Segoe UI, Roboto, sans-serif; color: #eee; }
      #root { width: 100vw; height: 100vh; position: relative; }
      /* webgi 0.22: canvas'i artik biz olusturuyoruz (eskiden React wrapper yapiyordu) */
      #root > canvas, #webgi-canvas {
        display: block; width: 100%; height: 100%;
        outline: none; touch-action: none;
      }

      /* Sol üst butonlar */
      #saveBar { position: fixed; top: 16px; left: 16px; z-index: 11; display: flex; gap: 8px; align-items: center; }
      #loadBtn {
        color: #fff; border: none; border-radius: 10px;
        padding: 10px 18px; font-size: 14px; font-weight: 600;
        cursor: pointer; transition: transform .12s, box-shadow .12s;
        background: linear-gradient(135deg, #ff8a4f, #d44e26);
        box-shadow: 0 4px 14px rgba(212,78,38,0.45);
      }
      #loadBtn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(212,78,38,0.6); }
      #loadBtn:active { transform: translateY(0); }
      #loadBtn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
      #glbInput { display: none; }
      #saveHint { font-size: 11px; color: #aaa; background: rgba(0,0,0,0.5); padding: 6px 10px; border-radius: 8px; }

      #panel {
        position: fixed; top: 16px; right: 16px; z-index: 10;
        width: 300px; max-height: calc(100vh - 32px); overflow-y: auto;
        background: rgba(20,20,20,0.88); backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
        padding: 14px;
        box-shadow: 0 6px 24px rgba(0,0,0,0.55);
      }
      #panel h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: #ccc; }
      #panel .section { margin-bottom: 18px; }
      #panel .section:last-child { margin-bottom: 0; }

      /* Üst seviye tab (Metal / Pırlanta) */
      .top-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-bottom: 14px;
                  background: rgba(255,255,255,0.06); padding: 4px; border-radius: 10px; }
      .top-tab { font-size: 13px; padding: 10px 4px; text-align: center; cursor: pointer;
                 border-radius: 8px; color: #bbb; user-select: none; transition: all .15s; font-weight: 600; }
      .top-tab:hover { color: #fff; }
      .top-tab.active { background: rgba(255,255,255,0.16); color: #fff; }

      /* Renk grup tab */
      .tabs { display: grid; gap: 4px; margin-bottom: 10px;
              background: rgba(255,255,255,0.05); padding: 4px; border-radius: 8px; }
      .tabs.cols-3 { grid-template-columns: repeat(3, 1fr); }
      .tabs.cols-5 { grid-template-columns: repeat(5, 1fr); }
      .tab { font-size: 11px; padding: 8px 2px; text-align: center; cursor: pointer;
             border-radius: 6px; color: #bbb; user-select: none; transition: all .15s; }
      .tab:hover { color: #fff; }
      .tab.active { background: rgba(255,255,255,0.14); color: #fff; }

      .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
      .thumb {
        position: relative; aspect-ratio: 1/1;
        border: 2px solid transparent; border-radius: 8px;
        cursor: pointer; overflow: hidden;
        background: #222 center/cover no-repeat;
        transition: transform .15s, border-color .15s;
      }
      .thumb:hover { transform: scale(1.05); }
      .thumb.active { border-color: #fff; }

      .label { margin-top: 8px; font-size: 12px; color: #aaa; min-height: 16px; text-align: center; }
      .status { margin-top: 6px; font-size: 11px; color: #888; text-align: center; }

      .pane { display: none; }
      .pane.active { display: block; }

      /* ================================================================
         KURUMSAL TOOL BUTON SISTEMI (3D viewer'a uygun minimal stil)
         Glass morphism + ince accent border + SVG ikon
         ================================================================ */
      #exitBtn, #photoBtn, #videoBtn, #batchBtn {
        position: fixed; left: 16px;
        z-index: 12;
        background: rgba(15, 18, 24, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        color: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-left-width: 2px;
        border-radius: 6px;
        padding: 11px 14px 9px;
        font-family: -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
        font-weight: 500;
        cursor: pointer;
        display: flex; flex-direction: column; align-items: center; gap: 5px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.02) inset;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        min-width: 64px;
      }
      #exitBtn:hover, #photoBtn:hover, #videoBtn:hover, #batchBtn:hover {
        background: rgba(22, 26, 34, 0.96);
        transform: translateX(2px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
      }
      #exitBtn:active, #photoBtn:active, #batchBtn:active { transform: translateX(2px) scale(0.97); }
      #photoBtn:disabled, #batchBtn:disabled {
        opacity: 0.45; cursor: wait; transform: none;
      }
      #exitBtn .ic, #photoBtn .ic, #videoBtn .ic, #batchBtn .ic {
        width: 18px; height: 18px;
        display: flex; align-items: center; justify-content: center;
      }
      #exitBtn .ic svg, #photoBtn .ic svg, #videoBtn .ic svg, #batchBtn .ic svg {
        width: 100%; height: 100%; display: block;
      }
      #exitBtn .lb, #photoBtn .lb, #videoBtn .lb, #batchBtn .lb {
        font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
        opacity: 0.85; line-height: 1; font-weight: 600;
      }
      #photoBtn .progress, #batchBtn .progress {
        font-size: 9px; color: rgba(255,255,255,0.7); letter-spacing: 0.06em;
      }

      /* === Konum + accent rengi (her buton icin) === */
      #exitBtn {
        top: 50%; transform: translateY(-50%);
        border-left-color: rgba(239, 68, 68, 0.65);
      }
      #exitBtn:hover { transform: translateY(-50%) translateX(2px); border-left-color: rgba(239, 68, 68, 0.9); }
      #exitBtn .ic svg { color: rgba(248, 113, 113, 0.95); }

      #photoBtn {
        top: calc(50% + 50px);
        border-left-color: rgba(212, 175, 55, 0.7);
      }
      #photoBtn:hover { border-left-color: rgba(212, 175, 55, 0.95); }
      #photoBtn .ic svg { color: rgba(234, 195, 99, 0.95); }

      /* VIDEO — GIZLI (kullanilmiyor) */
      #videoBtn,
      #videoBtn.recording,
      #videoColorModalBackdrop { display: none !important; }
      #videoBtn {
        top: calc(50% + 145px);
        border-left-color: rgba(139, 92, 246, 0.7);
      }
      #videoBtn .ic svg { color: rgba(167, 139, 250, 0.95); }

      #batchBtn {
        top: calc(50% + 145px);   /* video gizli oldugu icin yukari aldim */
        border-left-color: rgba(99, 102, 241, 0.7);
      }
      #batchBtn:hover { border-left-color: rgba(99, 102, 241, 0.95); }
      #batchBtn .ic svg { color: rgba(129, 140, 248, 0.95); }

      /* ============ BATCH PROGRESS OVERLAY ============ */
      #batchOverlay {
        position: fixed; inset: 0; z-index: 9999;
        background: rgba(8, 10, 14, 0.96);
        backdrop-filter: blur(10px);
        display: none;
        align-items: center; justify-content: center;
        color: #fff; font-family: inherit;
      }
      #batchOverlay.active { display: flex; }
      #batchOverlay .panel {
        background: linear-gradient(180deg, rgba(30,32,40,0.95), rgba(20,22,28,0.95));
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 18px;
        padding: 32px 36px;
        min-width: 480px; max-width: 640px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.6);
      }
      #batchOverlay h2 {
        margin: 0 0 8px; font-size: 22px; font-weight: 700;
        background: linear-gradient(135deg, #ec4899, #fbbf24);
        -webkit-background-clip: text; background-clip: text; color: transparent;
      }
      #batchOverlay .sub { font-size: 13px; color: #9ca3af; margin-bottom: 22px; }
      #batchOverlay .bigCount {
        font-size: 56px; font-weight: 800; letter-spacing: -1px;
        text-align: center; margin: 8px 0;
        background: linear-gradient(135deg, #fbbf24, #ec4899);
        -webkit-background-clip: text; background-clip: text; color: transparent;
      }
      #batchOverlay .bigCount .sep { color: #4b5563; -webkit-text-fill-color: #4b5563; margin: 0 4px; font-weight: 400; }
      #batchOverlay .barWrap {
        height: 10px; background: rgba(255,255,255,0.06); border-radius: 999px;
        overflow: hidden; margin: 10px 0 18px;
      }
      #batchOverlay .bar {
        height: 100%; width: 0%;
        background: linear-gradient(90deg, #ec4899, #fbbf24);
        transition: width .3s ease;
        box-shadow: 0 0 14px rgba(236,72,153,0.6);
      }
      #batchOverlay .currLine {
        font-size: 14px; color: #e5e7eb; text-align: center; min-height: 24px;
        background: rgba(255,255,255,0.04); border-radius: 8px; padding: 8px 12px;
        margin: 8px 0 14px;
        font-family: 'SF Mono', Monaco, monospace;
      }
      #batchOverlay .stats {
        display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0;
        font-size: 11px; text-align: center;
      }
      #batchOverlay .stats .cell {
        background: rgba(255,255,255,0.04); border-radius: 8px; padding: 10px 6px;
      }
      #batchOverlay .stats .v { font-size: 18px; font-weight: 700; color: #fbbf24; }
      #batchOverlay .stats .l { color: #9ca3af; margin-top: 2px; letter-spacing: .4px; }
      #batchOverlay .log {
        max-height: 140px; overflow-y: auto;
        background: rgba(0,0,0,0.3); border-radius: 8px; padding: 10px 12px;
        font-family: 'SF Mono', Monaco, monospace;
        font-size: 11px; line-height: 1.5; color: #9ca3af;
        margin-bottom: 16px;
      }
      #batchOverlay .log .ok  { color: #86efac; }
      #batchOverlay .log .err { color: #fca5a5; }
      #batchOverlay .log .skip { color: #fcd34d; }
      #batchOverlay .actions { display: flex; justify-content: center; gap: 10px; }
      #batchOverlay .btnStop {
        background: linear-gradient(135deg, #ef4444, #b91c1c);
        color: #fff; border: none; border-radius: 10px;
        padding: 12px 24px; font-size: 13px; font-weight: 600;
        cursor: pointer; letter-spacing: .4px;
      }
      #batchOverlay .btnStop:hover { box-shadow: 0 6px 16px rgba(239,68,68,0.5); }
      #batchOverlay .btnClose {
        background: linear-gradient(135deg, #22c55e, #15803d);
        color: #fff; border: none; border-radius: 10px;
        padding: 12px 24px; font-size: 13px; font-weight: 600;
        cursor: pointer; letter-spacing: .4px;
        display: none;
      }
      #batchOverlay.done .btnStop { display: none; }
      #batchOverlay.done .btnClose { display: inline-block; }

      /* BATCH onay/baslama modal */
      #batchConfirmBackdrop {
        position: fixed; inset: 0; z-index: 9998;
        background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
        display: none; align-items: center; justify-content: center;
        color: #fff;
      }
      #batchConfirmBackdrop.active { display: flex; }
      #batchConfirmBackdrop .panel {
        background: #1f2230; border-radius: 16px;
        padding: 28px 32px; min-width: 420px; max-width: 540px;
        border: 1px solid rgba(255,255,255,0.08);
      }
      #batchConfirmBackdrop h3 { margin: 0 0 8px; color: #ec4899; font-size: 18px; }
      #batchConfirmBackdrop p { font-size: 13px; color: #cbd5e1; line-height: 1.6; margin: 8px 0; }
      #batchConfirmBackdrop .summary {
        background: rgba(255,255,255,0.04); border-radius: 10px;
        padding: 14px; margin: 14px 0; font-size: 12px;
      }
      #batchConfirmBackdrop .summary .row { display: flex; justify-content: space-between; padding: 4px 0; }
      #batchConfirmBackdrop .summary .l { color: #9ca3af; }
      #batchConfirmBackdrop .summary .v { color: #fff; font-weight: 600; }
      #batchConfirmBackdrop .footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
      #batchConfirmBackdrop button {
        padding: 10px 20px; border: none; border-radius: 8px;
        font-size: 13px; font-weight: 600; cursor: pointer;
      }
      #batchConfirmBackdrop .btn-cancel { background: #374151; color: #fff; }
      #batchConfirmBackdrop .btn-go { background: linear-gradient(135deg, #ec4899, #be185d); color: #fff; }
      #videoBtn:hover { transform: translateX(2px); box-shadow: 0 8px 26px rgba(139,92,246,0.7); }
      #videoBtn:disabled { opacity: 0.55; cursor: wait; transform: none; }
      #videoBtn .ic { font-size: 20px; line-height: 1; }
      #videoBtn .lb { font-size: 12px; letter-spacing: .4px; }
      #videoBtn .progress { font-size: 10px; color: rgba(255,255,255,0.9); }
      /* Recording sirasinda nabiz atan kirmizi hale */
      #videoBtn.recording {
        background: linear-gradient(135deg, #ef4444, #b91c1c);
        animation: videoRecPulse 1.2s ease-in-out infinite;
      }
      @keyframes videoRecPulse {
        0%, 100% { box-shadow: 0 6px 20px rgba(239,68,68,0.55); }
        50%      { box-shadow: 0 8px 30px rgba(239,68,68,0.95); }
      }

      /* Urun bilgi rozetir (sag alt) */
      #productBadge {
        position: fixed; left: 16px; bottom: 16px; z-index: 11;
        background: rgba(20,20,20,0.85); color: #fff;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 10px;
        padding: 10px 14px; font-size: 12px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.4);
        max-width: 240px;
      }
      #productBadge .pid { color: #9ca3af; font-size: 11px; }
      #productBadge .pname { font-weight: 600; margin-top: 2px; }
      #productBadge .savedRow { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
      #productBadge .pill {
        font-size: 10px; padding: 2px 6px; border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.18); color: #cbd5e1;
      }
      #productBadge .pill.on { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.5); color: #86efac; }

      /* === Sol ust bar yigini (saveBar altinda) ===
         Eskiden #shapeBar ve #caratBar ayri ayri "position: fixed" idi ve
         konumlari sabit top degerleriyle (64px / 116px) veriliyordu; bir bar
         satir kaydirinca digerinin ustune biniyordu.
         Artik ikisi de tek bir kolon icinde akiyor -> sira = DOM sirasi:
           1) TAS FORMU   2) PIRLANTA KARAT                                   */
      #leftBars {
        position: fixed; top: 64px; left: 16px; z-index: 11;
        display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
        max-width: calc(100vw - 32px);
      }

      /* === Karat secim bar (form seciciden sonra) === */
      #caratBar {
        display: flex; align-items: center; gap: 6px;
        background: rgba(20,20,20,0.88); backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
        padding: 8px 10px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.4);
        max-width: 100%; flex-wrap: wrap;
      }
      #caratBar .label { font-size: 11px; color: #9ca3af; letter-spacing: .4px; text-transform: uppercase; margin-right: 6px; }
      .caratBtn {
        font-size: 12px; padding: 6px 10px; border-radius: 8px;
        background: rgba(255,255,255,0.05); color: #cbd5e1; cursor: pointer; user-select: none;
        border: 1px solid rgba(255,255,255,0.1); transition: all .15s;
        display: flex; align-items: center; gap: 4px;
      }
      .caratBtn:hover { background: rgba(255,255,255,0.1); color: #fff; }
      .caratBtn.active { background: linear-gradient(135deg, #4f8eff, #2660d4); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(38,96,212,0.5); }
      .caratBtn .dot {
        width: 6px; height: 6px; border-radius: 50%;
        background: rgba(255,255,255,0.25);
      }
      .caratBtn.has-glb .dot { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6); }
      .caratBtn.active.has-glb .dot { background: #fff; }

      /* === TAS FORMU secim bar (yiginin en ustu) === */
      #shapeBar {
        display: flex; align-items: center; gap: 6px;
        background: rgba(20,20,20,0.88); backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
        padding: 8px 10px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.4);
        max-width: 100%; flex-wrap: wrap;
      }
      #shapeBar .label { font-size: 11px; color: #9ca3af; letter-spacing: .4px; text-transform: uppercase; margin-right: 6px; }
      .shapeBtn {
        font-size: 12px; padding: 6px 10px 6px 8px; border-radius: 8px;
        background: rgba(255,255,255,0.05); color: #cbd5e1; cursor: pointer; user-select: none;
        border: 1px solid rgba(255,255,255,0.1); transition: all .15s;
        display: flex; align-items: center; gap: 6px;
      }
      .shapeBtn:hover { background: rgba(255,255,255,0.1); color: #fff; }
      .shapeBtn.active { background: linear-gradient(135deg, #b58aff, #7340d4); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(115,64,212,0.55); }
      .shapeBtn .dot {
        width: 6px; height: 6px; border-radius: 50%;
        background: rgba(255,255,255,0.25);
      }
      .shapeBtn.has-glb .dot { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6); }
      .shapeBtn.active.has-glb .dot { background: #fff; }
      .shapeBtn[data-shape=""] {
        font-style: italic; opacity: .92;
      }
      /* Pirlanta form ikonu - her form icin kucuk SVG */
      .shapeBtn .shapeIcon {
        width: 16px; height: 16px;
        display: inline-flex; align-items: center; justify-content: center;
        flex-shrink: 0;
      }
      .shapeBtn .shapeIcon svg {
        width: 100%; height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.4;
        stroke-linejoin: round;
        opacity: .85;
      }
      .shapeBtn.active .shapeIcon svg { opacity: 1; }

      /* === Renk secim modal === */
      .colorModal-backdrop {
        position: fixed; inset: 0; z-index: 100;
        background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
        display: none; align-items: center; justify-content: center;
      }
      .colorModal-backdrop.active { display: flex; }
      .colorModal {
        width: 420px; max-width: calc(100vw - 32px);
        background: #14161b; color: #eee;
        border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
        padding: 22px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.6);
      }
      .colorModal h3 { margin: 0 0 6px; font-size: 16px; }
      .colorModal p  { margin: 0 0 18px; font-size: 13px; color: #9ca3af; }
      .colorModal .opts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
      .colorOpt {
        cursor: pointer; user-select: none;
        border-radius: 12px; padding: 14px 8px; text-align: center;
        font-size: 13px; font-weight: 600;
        border: 2px solid transparent;
        transition: transform .12s, border-color .12s, box-shadow .12s;
      }
      .colorOpt .swatch {
        width: 38px; height: 38px; border-radius: 50%;
        margin: 0 auto 8px; border: 2px solid rgba(255,255,255,0.25);
        box-shadow: inset 0 0 12px rgba(0,0,0,0.35);
      }
      .colorOpt[data-color="sari"]  .swatch { background: linear-gradient(135deg, #f5d56a, #c08a1c); }
      .colorOpt[data-color="beyaz"] .swatch { background: linear-gradient(135deg, #f1f3f6, #b6bcc4); }
      .colorOpt[data-color="rose"]  .swatch { background: linear-gradient(135deg, #f3b9a3, #c97058); }

      /* Video icin renk secimleri - colorOpt ile ayni stil */
      .videoColorOpt {
        cursor: pointer; user-select: none;
        border-radius: 12px; padding: 14px 8px; text-align: center;
        font-size: 13px; font-weight: 600;
        border: 2px solid transparent;
        background: rgba(255,255,255,0.04);
        transition: transform .12s, border-color .12s, box-shadow .12s;
      }
      .videoColorOpt .swatch {
        width: 38px; height: 38px; border-radius: 50%;
        margin: 0 auto 8px; border: 2px solid rgba(255,255,255,0.25);
        box-shadow: inset 0 0 12px rgba(0,0,0,0.35);
      }
      .videoColorOpt[data-color="sari"]  .swatch { background: linear-gradient(135deg, #f5d56a, #c08a1c); }
      .videoColorOpt[data-color="beyaz"] .swatch { background: linear-gradient(135deg, #f1f3f6, #b6bcc4); }
      .videoColorOpt[data-color="rose"]  .swatch { background: linear-gradient(135deg, #f3b9a3, #c97058); }
      .videoColorOpt:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.25); }
      .videoColorOpt.saved { border-color: rgba(34,197,94,0.55); box-shadow: 0 0 0 3px rgba(34,197,94,0.15); }
      .videoColorOpt .savedTag { display: inline-block; margin-top: 4px; font-size: 10px; color: #86efac; letter-spacing: .3px; }
      .colorOpt {
        background: rgba(255,255,255,0.04);
      }
      .colorOpt:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.25); }
      .colorOpt.saved {
        border-color: rgba(34,197,94,0.55);
        box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
      }
      .colorOpt .savedTag {
        display: inline-block; margin-top: 4px;
        font-size: 10px; color: #86efac; letter-spacing: .3px;
      }
      .colorModal .footer { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
      .colorModal .btn-ghost {
        background: transparent; color: #cbd5e1;
        border: 1px solid rgba(255,255,255,0.15); border-radius: 10px;
        padding: 8px 14px; font-size: 13px; cursor: pointer;
      }
      .colorModal .btn-ghost:hover { background: rgba(255,255,255,0.05); }

      /* Toast */
      .toastBox {
        position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
        z-index: 200;
        background: #14161b; color: #fff;
        border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
        padding: 10px 16px; font-size: 13px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5);
        opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
      }
      .toastBox.show { opacity: 1; transform: translateX(-50%) translateY(4px); }
      .toastBox.ok  { border-color: rgba(34,197,94,0.6); }
      .toastBox.err { border-color: rgba(239,68,68,0.6); }

      /* === iJewel branding ve preloader'ı tamamen gizle === */
      #webgi-logo,
      #ijewel-viewer-logo,
      #assetManagerLoadingScreen,
      #assetManagerLoadingScreenContent,
      .branding-viewer-logo,
      .minimizedLoadingScreen,
      [id*="loadingScreenLogo"],
      [class*="loadingScreenLogo"],
      [id*="loadingScreenFiles"],
      [id*="loadingScreenLoading"],
      [id*="loadingScreenProcess"],
      [class*="loadingScreen"],
      [class*="loading-screen"],
      [id*="loading-screen"],
      [id*="LoadingScreen"],
      [class*="LoadingScreen"] { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }

      /* ===== KAMERA AÇI INFO PANELİ ===== */
      #camInfoPanel {
        position: fixed;
        bottom: 16px;
        right: 16px;
        z-index: 11;
        background: rgba(20,22,28,0.92);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(236,72,153,0.5);
        border-radius: 10px;
        padding: 12px 14px;
        font-family: 'SF Mono', Monaco, Consolas, monospace;
        font-size: 11px;
        color: #e5e7eb;
        line-height: 1.55;
        min-width: 240px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.4);
        user-select: text;
      }
      #camInfoPanel .ttl {
        font-size: 10px;
        color: #ec4899;
        font-weight: 700;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        margin-bottom: 6px;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      #camInfoPanel .ttl button {
        background: rgba(236,72,153,0.2);
        border: 1px solid rgba(236,72,153,0.4);
        color: #f9a8d4;
        font-size: 10px;
        padding: 2px 8px;
        border-radius: 4px;
        cursor: pointer;
        margin-left: 6px;
      }
      #camInfoPanel .ttl button:hover { background: rgba(236,72,153,0.35); }
      #camInfoPanel .row { display: flex; justify-content: space-between; gap: 12px; }
      #camInfoPanel .row .lbl { color: #9ca3af; min-width: 38px; }
      #camInfoPanel .row .val { color: #fbbf24; font-weight: 600; }
      #camInfoPanel .pos-line {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(255,255,255,0.08);
        font-size: 10px;
        color: #86efac;
        cursor: pointer;
      }
      #camInfoPanel .pos-line:hover { color: #d1fae5; }
      #camInfoPanel .pos-line .hint { color: #6b7280; font-size: 9px; }
      #camInfoPanel.minimized .content { display: none; }
      #camInfoPanel.minimized { padding: 6px 10px; min-width: auto; }



      /* ================================================================
         VIDEO BUTONU (KAPAK'in ustunde)
         ================================================================ */
      #videoBtn2 {
        position: fixed; left: 16px; top: 50%; transform: translateY(-50%);
        z-index: 12;
        background: rgba(15, 18, 24, 0.92);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        color: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-left-width: 2px; border-left-color: rgba(139, 92, 246, 0.7);
        border-radius: 6px; padding: 11px 14px 9px;
        font-family: -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
        font-weight: 500; cursor: pointer;
        display: flex; flex-direction: column; align-items: center; gap: 5px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.02) inset;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        min-width: 64px;
      }
      #videoBtn2:hover {
        background: rgba(22, 26, 34, 0.96);
        transform: translateY(-50%) translateX(2px);
        border-left-color: rgba(139, 92, 246, 0.95);
      }
      #videoBtn2:active { transform: translateY(-50%) translateX(2px) scale(0.97); }
      #videoBtn2:disabled { opacity: 0.45; cursor: wait; }
      #videoBtn2 .ic { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
      #videoBtn2 .ic svg { width: 100%; height: 100%; display: block; color: rgba(167, 139, 250, 0.95); }
      #videoBtn2 .lb {
        font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
        opacity: 0.85; line-height: 1; font-weight: 600;
      }

      /* ================================================================
         GLB PANELI — secili form+karat kombinasyonunun modeli
         ================================================================ */
      #glbPanel {
        display: flex; flex-direction: column; gap: 8px;
        background: rgba(20,20,20,0.88); backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
        padding: 10px 12px; max-width: 100%;
        box-shadow: 0 4px 14px rgba(0,0,0,0.4);
      }
      #glbPanel .row1 { display: flex; align-items: flex-start; gap: 10px; }
      #glbPanel .label {
        font-size: 11px; color: #9ca3af; letter-spacing: .4px;
        text-transform: uppercase; padding-top: 2px; white-space: nowrap;
      }
      #glbBilgi { font-size: 12px; color: #cbd5e1; line-height: 1.5; }
      #glbBilgi .ok  { color: #22c55e; font-weight: 600; }
      #glbBilgi .yok { color: #f59e0b; font-weight: 600; }
        font-size: 12px; font-weight: 600; padding: 7px 12px;
        border-radius: 8px; border: 1px solid transparent; cursor: pointer;
        color: #fff; background: linear-gradient(135deg, #4f8eff, #2660d4);
        transition: transform .12s, box-shadow .12s, opacity .12s;
      }
      #urunDurum { font-size: 11px; color: #9ca3af; }

      /* GLB'si olmayan karat: soluk + turuncu nokta */
      .caratBtn.no-glb { opacity: .55; }
      .caratBtn.no-glb .dot { background: #6b7280; }
      .caratBtn.no-glb:hover { opacity: .85; }
      /* Form barinda GLB sayaci rozeti */
      .shapeBtn .cnt {
        display: inline-block; margin-left: 6px; padding: 1px 5px;
        font-size: 10px; font-weight: 700; line-height: 1.4;
        border-radius: 999px; background: rgba(34,197,94,0.25); color: #86efac;
      }
      .shapeBtn.active .cnt { background: rgba(255,255,255,0.25); color: #fff; }
