/* 100% АВТОНОМНЫЙ PURE CSS */
    #tab-stories-studio * { box-sizing: border-box; }
    
    #tab-stories-studio {
      color: #fafafa;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background: #09090b;
      min-height: 80vh;
      width: 100%;
    }

    .app-wrapper {
      max-width: 1200px;
      width: 100%;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 28px;
    }

    /* Top Header */
    .app-header {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #27272a;
      padding-bottom: 20px;
      gap: 16px;
      flex-wrap: wrap;
    }
    .badge-top {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 12px;
      border-radius: 9999px;
      background: rgba(245, 158, 11, 0.12);
      border: 1px solid rgba(245, 158, 11, 0.3);
      color: #f59e0b;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      font-family: monospace;
    }
    .header-title {
      font-size: 28px;
      font-weight: 900;
      color: #ffffff;
      margin-top: 6px;
      line-height: 1.2;
    }
    .header-desc {
      font-size: 13px;
      color: #a1a1aa;
      margin-top: 4px;
    }
    .format-tag {
      padding: 8px 14px;
      border-radius: 12px;
      background: #18181b;
      border: 1px solid #27272a;
      font-size: 12px;
      font-family: monospace;
      color: #a1a1aa;
    }

    /* Main Grid */
    .main-grid {
      display: grid;
      grid-template-columns: 1.25fr 1fr;
      gap: 36px;
      align-items: start;
      min-width: 0;
      width: 100%;
    }
    @media (max-width: 900px) {
      .main-grid {
        grid-template-columns: 100%;
        gap: 24px;
      }
    }

    /* Controls Panel */
    .controls-panel {
      background: #121214;
      border: 1px solid #27272a;
      border-radius: 24px;
      padding: 28px;
      display: flex;
      flex-direction: column;
      gap: 22px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.5);
      min-width: 0;
      width: 100%;
      max-width: 100%;
    }
    @media (max-width: 640px) {
      .controls-panel {
        padding: 16px;
        border-radius: 20px;
        gap: 16px;
      }
    }
    .section-title {
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #f59e0b;
      font-family: monospace;
      margin-bottom: 8px;
    }
    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .chip-container {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 6px;
    }
    .chip-btn {
      padding: 3px 8px;
      border-radius: 6px;
      background: #18181b;
      border: 1px solid #27272a;
      color: #a1a1aa;
      font-size: 10px;
      font-family: monospace;
      cursor: pointer;
      transition: all 0.15s ease;
      white-space: nowrap;
    }
    .chip-btn:hover {
      background: #27272a;
      color: #fafafa;
      border-color: #f59e0b;
    }
    @media (max-width: 520px) {
      .form-row { grid-template-columns: 1fr; }
    }
    .input-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .input-label {
      font-size: 11px;
      font-weight: 700;
      color: #d4d4d8;
    }
    .text-input {
      background: #09090b;
      border: 1px solid #27272a;
      border-radius: 12px;
      padding: 10px 14px;
      color: #ffffff;
      font-size: 13px;
      font-weight: 600;
      outline: none;
      transition: all 0.2s;
    }
    .text-input:focus {
      border-color: #f59e0b;
      box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
    }

    /* UPLOAD BOXES (COVER & AUDIO) */
    .upload-box {
      background: #09090b;
      border: 2px dashed #27272a;
      border-radius: 16px;
      padding: 14px;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s;
      position: relative;
    }
    .upload-box:hover {
      border-color: #f59e0b;
      background: rgba(245, 158, 11, 0.03);
    }
    .upload-empty {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      padding: 6px 0;
    }
    .upload-svg {
      width: 26px !important;
      height: 26px !important;
      color: #f59e0b;
    }
    .upload-title {
      font-size: 12px;
      font-weight: 700;
      color: #f4f4f5;
    }
    .upload-sub {
      font-size: 10px;
      color: #71717a;
    }

    .upload-active {
      display: none;
      align-items: center;
      gap: 12px;
      text-align: left;
    }
    .cover-thumb-preview {
      width: 52px;
      height: 52px;
      border-radius: 10px;
      object-fit: cover;
      border: 1px solid rgba(255, 255, 255, 0.15);
    }
    .upload-meta {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .upload-file-title {
      font-size: 12px;
      font-weight: 700;
      color: #10b981;
    }
    .btn-remove {
      font-size: 11px;
      color: #f87171;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
      text-align: left;
      text-decoration: underline;
    }

    /* AUDIO CONTROLS BAR */
    .audio-player-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      background: #18181b;
      border: 1px solid #27272a;
      border-radius: 12px;
      padding: 8px 12px;
      margin-top: 8px;
    }
    .btn-play-mini {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: #f59e0b;
      color: #000;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 900;
      flex-shrink: 0;
      transition: transform 0.1s;
    }
    .btn-play-mini:active { transform: scale(0.92); }
    .audio-scrubber-track {
      flex: 1;
      height: 4px;
      background: #27272a;
      border-radius: 2px;
      position: relative;
      cursor: pointer;
    }
    .audio-scrubber-fill {
      height: 100%;
      background: #f59e0b;
      border-radius: 2px;
      width: 0%;
      transition: width 0.1s linear;
    }
    .audio-time-label {
      font-size: 10px;
      font-family: monospace;
      color: #a1a1aa;
      white-space: nowrap;
    }

    /* COVER DISPLAY MODE SELECTOR */
    .cover-modes-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-top: 8px;
    }
    @media (max-width: 480px) {
      .cover-modes-grid {
        grid-template-columns: 1fr;
        gap: 6px;
      }
      .theme-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
      }
    }
    .mode-tab-btn {
      background: #09090b;
      border: 1px solid #27272a;
      border-radius: 12px;
      padding: 8px 6px;
      font-size: 10px;
      font-weight: 700;
      color: #a1a1aa;
      cursor: pointer;
      transition: all 0.2s;
      text-align: center;
    }
    .mode-tab-btn:hover {
      border-color: #52525b;
      color: #fff;
    }
    .mode-tab-btn.active {
      border: 1.5px solid #f59e0b;
      background: rgba(245, 158, 11, 0.1);
      color: #fef08a;
    }

    /* Theme Picker */
    .theme-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    .theme-card {
      background: #09090b;
      border: 1px solid #27272a;
      border-radius: 14px;
      padding: 10px;
      cursor: pointer;
      text-align: left;
      transition: all 0.2s;
    }
    .theme-card:hover { border-color: #52525b; }
    .theme-card.active {
      border: 2px solid #f59e0b;
      background: #18181b;
      box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
    }
    .theme-swatch {
      height: 22px;
      border-radius: 6px;
      margin-bottom: 6px;
    }
    .swatch-gold { background: linear-gradient(135deg, #d97706, #f59e0b, #fef08a); }
    .swatch-ice  { background: linear-gradient(135deg, #0284c7, #38bdf8, #e0f2fe); }
    .swatch-ruby { background: linear-gradient(135deg, #be123c, #ef4444, #fecdd3); }

    .theme-title { font-size: 12px; font-weight: 700; color: #fff; }
    .theme-subtitle { font-size: 9px; color: #71717a; margin-top: 2px; }

    /* Streaming badges */
    .stream-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .stream-chip {
      padding: 5px 10px;
      border-radius: 8px;
      background: #18181b;
      border: 1px solid #27272a;
      font-size: 11px;
      font-family: monospace;
      color: #d4d4d8;
    }

    /* Action Buttons */
    .actions-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 6px;
    }
    @media (max-width: 520px) {
      .actions-grid { grid-template-columns: 1fr; }
    }
    .btn-action-primary {
      padding: 14px 16px;
      border-radius: 14px;
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
      color: #000000;
      font-weight: 800;
      font-size: 12px;
      border: none;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      box-shadow: 0 10px 25px -4px rgba(245, 158, 11, 0.35);
      transition: all 0.15s;
    }
    .btn-action-primary:hover {
      filter: brightness(1.1);
      transform: translateY(-1px);
    }
    .btn-action-primary:active { transform: translateY(1px); }

    .btn-action-secondary {
      padding: 14px 16px;
      border-radius: 14px;
      background: #18181b;
      color: #ffffff;
      font-weight: 800;
      font-size: 12px;
      border: 1px solid #3f3f46;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      transition: all 0.15s;
    }
    .btn-action-secondary:hover {
      background: #27272a;
      border-color: #71717a;
    }

    .btn-copy-full {
      width: 100%;
      margin-top: 8px;
      padding: 10px 14px;
      border-radius: 12px;
      background: #121214;
      color: #a1a1aa;
      font-size: 11px;
      font-weight: 600;
      border: 1px solid #27272a;
      cursor: pointer;
      transition: all 0.15s;
    }
    .btn-copy-full:hover {
      color: #fff;
      border-color: #3f3f46;
    }

    .toast-msg {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.4);
      color: #6ee7b7;
      padding: 10px 14px;
      border-radius: 10px;
      font-size: 12px;
      font-weight: 600;
      display: none;
    }

    /* PHONE MOCKUP (RIGHT SIDE) */
    .phone-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      min-width: 0;
      width: 100%;
      max-width: 100%;
    }
    .phone-label {
      font-size: 11px;
      font-family: monospace;
      color: #a1a1aa;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .live-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #10b981;
      display: inline-block;
      box-shadow: 0 0 8px #10b981;
    }

    .phone-mockup {
      width: 324px;
      max-width: 100%;
      height: 648px;
      background: #000000;
      border-radius: 44px;
      border: 9px solid #18181b;
      box-shadow: 0 0 0 2px #27272a, 0 30px 60px rgba(0, 0, 0, 0.9);
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 16px 18px;
      user-select: none;
    }
    @media (max-width: 360px) {
      .phone-mockup {
        width: 280px;
        height: 560px;
        border-width: 7px;
        border-radius: 36px;
        padding: 12px 14px;
      }
      .mode-sleeve-box {
        width: 220px;
        height: 146px;
      }
      .sleeve-cover-img {
        width: 120px;
        height: 120px;
      }
      .sleeve-vinyl {
        width: 120px;
        height: 120px;
      }
    }

    .island {
      width: 84px;
      height: 16px;
      background: #18181b;
      border-radius: 12px;
      margin: 0 auto;
      border: 1px solid #27272a;
      z-index: 20;
    }

    .story-bg {
      position: absolute;
      inset: 0;
      transition: background 0.4s ease;
      z-index: 1;
    }
    .bg-gold { background: linear-gradient(180deg, #18120a 0%, #0c0a09 40%, #000000 100%); }
    .bg-ice  { background: linear-gradient(180deg, #041a2f 0%, #020f1c 40%, #000000 100%); }
    .bg-ruby { background: linear-gradient(180deg, #2b060d 0%, #150205 40%, #000000 100%); }

    .story-particles {
      position: absolute;
      inset: 0;
      background-image: radial-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px);
      background-size: 20px 20px;
      opacity: 0.4;
      pointer-events: none;
      z-index: 2;
    }

    .story-content {
      position: relative;
      z-index: 10;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100%;
      padding: 14px 0 10px;
      text-align: center;
    }

    .story-top-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 10px;
      border-radius: 9999px;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.12);
      font-size: 9px;
      font-family: monospace;
      color: #e4e4e7;
    }
    .story-season {
      font-size: 10px;
      font-family: monospace;
      letter-spacing: 0.1em;
      margin-top: 6px;
      font-weight: 700;
      color: #f59e0b;
    }

    /* ARTWORK STAGE (3 MODES) */
    .artwork-stage {
      position: relative;
      margin: auto 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 200px;
    }

    .stage-glow {
      position: absolute;
      width: 180px;
      height: 180px;
      border-radius: 50%;
      filter: blur(30px);
      z-index: 1;
      opacity: 0.6;
    }
    .glow-gold { background: #f59e0b; }
    .glow-ice  { background: #38bdf8; }
    .glow-ruby { background: #ef4444; }

    /* MODE 1: SLEEVE + VINYL */
    .mode-sleeve-box {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      width: 240px;
      height: 160px;
      z-index: 5;
    }
    .sleeve-cover-img {
      width: 140px;
      height: 140px;
      border-radius: 12px;
      object-fit: cover;
      box-shadow: 0 14px 30px rgba(0,0,0,0.9);
      border: 1px solid rgba(255, 255, 255, 0.15);
      position: absolute;
      left: 15px;
      z-index: 8;
      background: #18181b;
    }
    .sleeve-vinyl {
      width: 130px;
      height: 130px;
      border-radius: 50%;
      background: #09090b;
      border: 2px solid #27272a;
      box-shadow: 0 10px 25px rgba(0,0,0,0.9);
      position: absolute;
      right: 12px;
      z-index: 6;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .spinning-active {
      animation: spinVinyl 14s linear infinite;
    }
    .sleeve-vinyl-label {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #000;
      font-weight: 900;
      font-size: 6px;
    }

    /* MODE 2: SQUARE 1:1 POSTER */
    .mode-square-box {
      display: none;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 5;
    }
    .square-cover-img {
      width: 175px;
      height: 175px;
      border-radius: 16px;
      object-fit: cover;
      box-shadow: 0 18px 40px rgba(0,0,0,0.95);
      border: 1.5px solid rgba(255, 255, 255, 0.2);
      background: #18181b;
    }

    /* MODE 3: FULL VINYL WITH ARTWORK IN CENTER */
    .mode-vinyl-box {
      display: none;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 5;
    }
    .full-vinyl-disc {
      width: 180px;
      height: 180px;
      border-radius: 50%;
      background: #09090b;
      border: 3px solid #27272a;
      box-shadow: 0 14px 35px rgba(0,0,0,0.95);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    .full-vinyl-label-art {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid #ffffff;
      box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    }
    .vinyl-hole-center {
      position: absolute;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #000000;
      border: 1px solid rgba(255,255,255,0.4);
    }

    @keyframes spinVinyl {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    .groove {
      position: absolute;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* WAVEFORM EQUALIZER BARS */
    .story-equalizer-bars {
      position: absolute;
      bottom: -22px;
      z-index: 12;
      display: flex;
      align-items: flex-end;
      gap: 3px;
      height: 18px;
    }
    .eq-bar {
      width: 3px;
      background: #f59e0b;
      border-radius: 2px;
      height: 4px;
      transition: height 0.1s ease;
    }
    .eq-active .eq-bar:nth-child(1) { animation: eqAnim 0.6s infinite ease-in-out alternate; }
    .eq-active .eq-bar:nth-child(2) { animation: eqAnim 0.4s infinite ease-in-out 0.2s alternate; }
    .eq-active .eq-bar:nth-child(3) { animation: eqAnim 0.7s infinite ease-in-out 0.1s alternate; }
    .eq-active .eq-bar:nth-child(4) { animation: eqAnim 0.5s infinite ease-in-out 0.3s alternate; }
    .eq-active .eq-bar:nth-child(5) { animation: eqAnim 0.8s infinite ease-in-out 0.15s alternate; }
    .eq-active .eq-bar:nth-child(6) { animation: eqAnim 0.45s infinite ease-in-out 0.25s alternate; }
    .eq-active .eq-bar:nth-child(7) { animation: eqAnim 0.65s infinite ease-in-out 0.05s alternate; }
    @keyframes eqAnim {
      0% { height: 4px; }
      100% { height: 18px; }
    }

    .date-pill {
      position: absolute;
      bottom: -10px;
      z-index: 15;
      padding: 4px 12px;
      border-radius: 9999px;
      background: rgba(0, 0, 0, 0.88);
      border: 1.5px solid #f59e0b;
      font-size: 10px;
      font-weight: 800;
      font-family: monospace;
      color: #fef08a;
      box-shadow: 0 4px 12px rgba(0,0,0,0.8);
      white-space: nowrap;
      cursor: pointer;
    }

    /* PLAY FLOATING BUTTON OVER ARTWORK */
    .play-floating-btn {
      position: absolute;
      z-index: 25;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.75);
      border: 2px solid #f59e0b;
      color: #fef08a;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 15px rgba(0,0,0,0.8);
      transition: transform 0.15s;
    }
    .play-floating-btn:hover { transform: scale(1.1); }
    .play-floating-btn svg { width: 18px; height: 18px; fill: currentColor; }

    /* Bottom Info */
    .story-bottom {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .story-artist {
      font-size: 11px;
      font-family: monospace;
      font-weight: 800;
      color: #a1a1aa;
      letter-spacing: 0.08em;
    }
    .story-track {
      font-size: 22px;
      font-weight: 900;
      color: #ffffff;
      line-height: 1.1;
      text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    }
    .story-tagline {
      font-size: 10px;
      color: #d4d4d8;
    }
    .story-platforms {
      background: rgba(0, 0, 0, 0.65);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 10px;
      padding: 6px 10px;
      font-size: 9px;
      font-family: monospace;
      color: #d4d4d8;
      display: flex;
      justify-content: center;
      gap: 5px;
    }
    .story-stamp {
      font-size: 8px;
      font-family: monospace;
      color: #71717a;
      letter-spacing: 0.05em;
    }