:root {
      color-scheme: dark;
      --bg-app: #090b10;
      --bg-sidebar: #0e1118;
      --bg-panel: #131822;
      --bg-elevated: #1a2130;
      --border-subtle: #232a3b;
      --text-main: #f5f7fa;
      --text-muted: #8f9bb3;
      --accent-primary: #4f6ef7;
      --accent-melon: #00cd3c;
      --accent-genie: #298cff;
      --accent-flo: #3b44ff;
      --accent-bugs: #ff3d2e;
      --accent-vibe: #ff2f87;
      --accent-spotify: #1ed760;
      --accent-youtube: #ff0000;
      --accent-circle: #e03e49;
      font-family: "Inter", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-synthesis: none;
    }

    * { box-sizing: border-box; }
    html, body {
      margin: 0;
      padding: 0;
      min-height: 100%;
      background: var(--bg-app);
      color: var(--text-main);
      overflow-x: hidden;
    }
    button, input, select, textarea { font: inherit; }

    /* =========================================================================
       STUDIO SHELL LAYOUT (Responsive Sidebar + Stage + Customize Drawer)
       ========================================================================= */
    .studio-app {
      display: grid;
      grid-template-columns: 320px minmax(0, 1fr);
      min-height: 100vh;
    }
    .studio-app.drawer-open {
      grid-template-columns: 320px minmax(0, 1fr) 360px;
    }

    /* Sidebar */
    .studio-sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      background: var(--bg-sidebar);
      border-right: 1px solid var(--border-subtle);
      overflow: hidden;
      z-index: 20;
    }
    .sidebar-header {
      padding: 20px 18px 14px;
      border-bottom: 1px solid var(--border-subtle);
    }
    .brand-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }
    .brand-badge {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      background: linear-gradient(135deg, #5c6cff, #a855f7);
      display: grid;
      place-items: center;
      font-weight: 900;
      font-size: 16px;
      color: #fff;
      box-shadow: 0 6px 18px rgba(92, 108, 255, 0.32);
      flex-shrink: 0;
    }
    .brand-copy strong {
      display: block;
      font-size: 15px;
      font-weight: 800;
      letter-spacing: -0.3px;
    }
    .brand-copy span {
      display: block;
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    .sidebar-search {
      width: 100%;
      padding: 9px 12px;
      border-radius: 10px;
      border: 1px solid var(--border-subtle);
      background: #141923;
      color: var(--text-main);
      font-size: 13px;
      outline: none;
    }
    .sidebar-search:focus {
      border-color: var(--accent-primary);
    }
    .category-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 10px;
    }
    .cat-pill {
      padding: 5px 10px;
      border-radius: 999px;
      border: 1px solid var(--border-subtle);
      background: #141923;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .cat-pill:hover {
      color: #fff;
      background: #1c2331;
    }
    .cat-pill.active {
      background: var(--accent-primary);
      border-color: var(--accent-primary);
      color: #fff;
    }
    .sidebar-nav {
      flex: 1;
      overflow-y: auto;
      padding: 12px 12px 24px;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    .nav-item {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 10px 11px;
      border-radius: 11px;
      border: 1px solid transparent;
      background: transparent;
      color: #dce2f0;
      text-align: left;
      cursor: pointer;
      transition: all 0.14s ease;
    }
    .nav-item:hover {
      background: #151b26;
    }
    .nav-item.active {
      background: #172138;
      border-color: #364c7d;
      color: #fff;
    }
    .nav-num {
      font-size: 11px;
      font-weight: 700;
      color: #697794;
      font-variant-numeric: tabular-nums;
    }
    .nav-info {
      min-width: 0;
    }
    .nav-info strong {
      display: block;
      font-size: 12.5px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .nav-info small {
      display: block;
      font-size: 11px;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-top: 2px;
    }
    .nav-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--dot, #4f6ef7);
    }

    /* Main Workspace & Toolbar */
    .studio-main {
      display: flex;
      flex-direction: column;
      min-width: 0;
      min-height: 100vh;
    }
    .studio-toolbar {
      position: sticky;
      top: 0;
      z-index: 15;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 22px;
      background: rgba(9, 11, 16, 0.92);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border-subtle);
    }
    .toolbar-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .toolbar-title strong {
      display: block;
      font-size: 15px;
      font-weight: 800;
    }
    .toolbar-title span {
      display: block;
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    .toolbar-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }
    .seg-group {
      display: inline-flex;
      background: #131822;
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      padding: 3px;
      gap: 2px;
    }
    .seg-btn {
      padding: 6px 10px;
      border-radius: 7px;
      border: 0;
      background: transparent;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }
    .seg-btn:hover { color: #fff; }
    .seg-btn.active {
      background: #232d42;
      color: #fff;
    }
    .btn-secondary, .btn-primary {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 8px 13px;
      border-radius: 10px;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      border: 1px solid var(--border-subtle);
      background: #151b27;
      color: #f0f3f9;
      transition: all 0.15s ease;
    }
    .btn-secondary:hover {
      background: #1e2636;
      border-color: #35435e;
    }
    .btn-secondary.active {
      background: #1f2b48;
      border-color: #4f6ef7;
      color: #fff;
    }
    .btn-primary {
      background: linear-gradient(135deg, #3b63f7, #2548d9);
      border-color: #4d73ff;
      color: #fff;
      box-shadow: 0 4px 14px rgba(45, 85, 255, 0.3);
    }
    .btn-primary:hover {
      filter: brightness(1.08);
    }

    /* Interactive Card Sub-Toolbar (Song Selector / Presets / Page Switcher) */
    .context-bar {
      padding: 12px 22px;
      background: #0d1017;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
    }
    .context-bar[hidden] { display: none !important; }
    .context-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    .context-group label {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .context-input, .context-select {
      padding: 7px 11px;
      border-radius: 8px;
      border: 1px solid var(--border-subtle);
      background: #151b26;
      color: #fff;
      font-size: 12.5px;
      outline: none;
    }
    .context-select { min-width: 220px; max-width: 340px; }
    .preset-chip {
      padding: 5px 10px;
      border-radius: 8px;
      border: 1px solid #283246;
      background: #151c28;
      color: #cad3e8;
      font-size: 11.5px;
      font-weight: 600;
      cursor: pointer;
    }
    .preset-chip:hover, .preset-chip.active {
      background: #23304c;
      border-color: #4f6ef7;
      color: #fff;
    }

    /* Stage */
    .studio-stage {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: 28px 24px 60px;
      overflow: auto;
      background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
      background-size: 24px 24px;
    }
    .stage-scaler {
      transform-origin: top center;
      transition: transform 0.12s ease;
    }
    #card-root {
      filter: drop-shadow(0 24px 64px rgba(0, 0, 0, 0.65));
    }

    /* Right Customize Drawer */
    .studio-drawer {
      position: sticky;
      top: 0;
      height: 100vh;
      background: var(--bg-sidebar);
      border-left: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      z-index: 20;
    }
    .studio-drawer[hidden] { display: none !important; }
    .drawer-header {
      padding: 16px 18px;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .drawer-header strong { font-size: 14px; font-weight: 800; }
    .drawer-body {
      flex: 1;
      overflow-y: auto;
      padding: 16px 18px 32px;
      display: flex;
      flex-direction: column;
      gap: 18px;
    }
    .drawer-section {
      background: #131823;
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .drawer-section h3 {
      margin: 0;
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: #a5b4fc;
    }
    .field-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .field-row {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .field-row label {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 600;
    }
    .field-row input, .field-row select {
      padding: 7px 9px;
      border-radius: 7px;
      border: 1px solid #283145;
      background: #0d1118;
      color: #fff;
      font-size: 12px;
    }
    .row-editor-item {
      background: #0d1118;
      border: 1px solid #232b3d;
      border-radius: 9px;
      padding: 9px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .row-editor-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 11.5px;
      font-weight: 700;
      color: #cbd5e1;
    }
    .btn-mini {
      padding: 3px 7px;
      border-radius: 6px;
      border: 1px solid #334155;
      background: #1e293b;
      color: #e2e8f0;
      font-size: 11px;
      cursor: pointer;
    }
    .btn-mini.danger {
      border-color: #7f1d1d;
      background: #450a0a;
      color: #fca5a5;
    }

    /* Modal & Toast */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(4, 6, 10, 0.78);
      backdrop-filter: blur(6px);
      display: grid;
      place-items: center;
      z-index: 50;
      padding: 20px;
    }
    .modal-backdrop[hidden] { display: none !important; }
    .modal-card {
      width: min(680px, 100%);
      background: #121722;
      border: 1px solid #2b354b;
      border-radius: 16px;
      padding: 22px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      box-shadow: 0 24px 60px rgba(0,0,0,0.65);
    }
    .modal-card h2 { margin: 0; font-size: 18px; }
    .modal-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
    .modal-card textarea {
      width: 100%;
      min-height: 180px;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid #283246;
      background: #0b0e15;
      color: #e2e8f0;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 12px;
    }
    .toast-banner {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 60;
      padding: 12px 18px;
      border-radius: 12px;
      background: #17233b;
      border: 1px solid #4f6ef7;
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    }
    .toast-banner[hidden] { display: none !important; }

    /* =========================================================================
       FAITHFUL FIGMA CARD TEMPLATES (@jieunchart)
       All cards render inside #card-root with [data-export-root]
       ========================================================================= */
    .chart-card {
      width: 1100px;
      overflow: hidden;
      color: #fafafa;
      background: #151515;
      font-family: "Inter", "Noto Sans KR", Arial, sans-serif;
      position: relative;
    }

    /* Official Platform Icons */
    .platform-icon {
      position: relative;
      display: inline-grid;
      place-items: center;
      width: 72px;
      height: 72px;
      border-radius: 18px;
      overflow: hidden;
      flex-shrink: 0;
      background: #fff;
    }
    .platform-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .spotify-circle-icon {
      width: 68px;
      height: 68px;
      border-radius: 50%;
      background: #1ed760;
      display: inline-grid;
      place-items: center;
      flex-shrink: 0;
    }
    .spotify-circle-icon svg { width: 42px; height: 42px; fill: #151515; }
    .spotify-white-icon {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: #fff;
      display: inline-grid;
      place-items: center;
      flex-shrink: 0;
    }
    .spotify-white-icon svg { width: 36px; height: 36px; fill: #181818; }

    .youtube-pill-icon {
      width: 66px;
      height: 46px;
      border-radius: 13px;
      background: #ff0000;
      display: inline-grid;
      place-items: center;
      flex-shrink: 0;
    }
    .youtube-pill-icon i {
      width: 0;
      height: 0;
      border-top: 10px solid transparent;
      border-bottom: 10px solid transparent;
      border-left: 17px solid #fff;
      margin-left: 3px;
    }

    .circle-chart-logo {
      width: 66px;
      height: 66px;
      border-radius: 50%;
      background: conic-gradient(from 180deg, #e03e49 0deg 180deg, #2176bd 180deg 360deg);
      display: inline-grid;
      place-items: center;
      position: relative;
      flex-shrink: 0;
    }
    .circle-chart-logo::after {
      content: "";
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: #393e46;
      box-shadow: 0 0 0 3px rgba(255,255,255,0.16);
    }

    /* Movement / Delta colors */
    .change {
      font-weight: 800;
      font-size: 18px;
      font-variant-numeric: tabular-nums;
    }
    .change.up { color: #00c83d; }
    .change.down { color: #f02525; }
    .change.new { color: #ffbb00; }
    .change.same { color: #9fa3aa; }

    /* -------------------------------------------------------------------------
       TEMPLATE 1: Classic K-Chart Ranking (Group 25, 30, 31, 32, 142)
       MelOn TOP100 / Genie TOP100 / FLO TOP100 / Bugs TOP100 / VIBE TOP100
       ------------------------------------------------------------------------- */
    .chart-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 68px 74px 40px;
      position: relative;
    }
    .chart-header.centered-brand .platform-heading {
      margin: 0 auto;
    }
    .chart-header.centered-brand time {
      position: absolute;
      right: 74px;
      top: 82px;
    }
    .platform-heading {
      display: flex;
      align-items: center;
      gap: 20px;
      font-size: 46px;
      font-weight: 600;
      letter-spacing: -1.4px;
    }
    .platform-heading strong {
      font-size: 46px;
      font-weight: 800;
      color: var(--accent, #00cd3c);
      margin-left: 8px;
    }
    .chart-header time {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #a1a1a7;
      font-size: 24px;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
    }
    .clock {
      display: inline-block;
      width: 24px;
      height: 24px;
      border: 2.5px solid currentColor;
      border-radius: 50%;
      position: relative;
    }
    .clock::before {
      content: "";
      display: block;
      width: 6px;
      height: 7px;
      margin: 4px 0 0 8px;
      border-left: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
    }
    .ranking-card.portrait { min-height: 1180px; padding-bottom: 58px; }
    .ranking-card.landscape { min-height: 620px; padding-bottom: 46px; }
    .ranking-list { display: grid; }
    .ranking-row {
      display: grid;
      grid-template-columns: 145px 108px minmax(0, 1fr) 52px;
      gap: 32px;
      align-items: center;
      min-height: 174px;
      padding: 14px 77px;
    }
    .cover-wrap {
      position: relative;
      align-self: center;
      width: 134px;
      height: 134px;
      overflow: hidden;
      border-radius: 29px;
      background: #2b2b2b;
      flex-shrink: 0;
    }
    .cover {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .cover-badge {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      display: grid;
      place-items: center;
      height: 31px;
      color: var(--badge-text, #fff);
      background: var(--badge, var(--accent, #00cd3c));
      font-weight: 700;
      font-size: 15px;
    }
    .rank-block {
      display: grid;
      justify-items: center;
      gap: 6px;
      min-width: 92px;
    }
    .rank-block > strong {
      font-size: 56px;
      line-height: 1;
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }
    .ranking-row h2, .metric-row h2, .stream-row h2 {
      margin: 0;
      overflow: hidden;
      font-size: 35px;
      font-weight: 700;
      letter-spacing: -1.1px;
      line-height: 1.18;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .play-icon {
      width: 0;
      height: 0;
      border-top: 18px solid transparent;
      border-bottom: 18px solid transparent;
      border-left: 29px solid #fff;
      justify-self: end;
    }

    /* -------------------------------------------------------------------------
       TEMPLATE 2: MelOn TOP100 with 1H & 24H ULs (Group 125.png)
       ------------------------------------------------------------------------- */
    .metric-card { min-height: 1180px; padding-bottom: 56px; }
    .metric-list { display: grid; }
    .metric-row {
      display: grid;
      grid-template-columns: 136px 98px minmax(0, 1fr) 125px 125px;
      gap: 22px;
      align-items: center;
      min-height: 174px;
      padding: 14px 64px;
    }
    .metric-row .cover-wrap { width: 128px; height: 128px; border-radius: 28px; }
    .metric-row h2 { font-size: 32px; }
    .metric {
      display: grid;
      justify-items: end;
      gap: 5px;
      font-variant-numeric: tabular-nums;
    }
    .metric small { color: #b4b4b8; font-weight: 700; font-size: 15px; }
    .metric strong { font-size: 23px; font-weight: 800; }
    .metric .change { font-size: 16px; }

    /* -------------------------------------------------------------------------
       TEMPLATE 3: MelOn Daily / Weekly / Monthly Two-Column Grid (Frame 1 & 2)
       ------------------------------------------------------------------------- */
    .melon-grid-card {
      width: 1400px;
      min-height: 1400px;
      padding: 68px 66px 76px;
      background: #151515;
    }
    .melon-grid-top {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 22px;
      font-size: 54px;
      font-weight: 600;
      letter-spacing: -1.5px;
    }
    .melon-grid-top .platform-icon { width: 78px; height: 78px; border-radius: 20px; }
    .melon-grid-top strong {
      color: #00cd3c;
      font-weight: 800;
      margin-left: 4px;
    }
    .melon-grid-pills {
      display: flex;
      justify-content: center;
      gap: 22px;
      margin-top: 36px;
    }
    .melon-grid-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      min-width: 225px;
      height: 62px;
      padding: 0 28px;
      border-radius: 999px;
      background: #262626;
      color: #f3f3f5;
      font-size: 24px;
      font-weight: 500;
    }
    .melon-grid-count {
      margin: 42px 0 22px 6px;
      color: #82858c;
      font-size: 22px;
      font-weight: 500;
    }
    .melon-two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      position: relative;
    }
    .melon-two-col::after {
      content: "";
      position: absolute;
      top: 10px;
      bottom: 10px;
      left: 50%;
      border-left: 2px dashed rgba(255, 255, 255, 0.45);
    }
    .melon-col {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
    .melon-col.left { padding-right: 44px; }
    .melon-col.right { padding-left: 48px; }
    .melon-grid-item {
      display: grid;
      grid-template-columns: 92px 104px minmax(0, 1fr);
      gap: 18px;
      align-items: center;
      min-height: 104px;
    }
    .melon-grid-rank {
      display: grid;
      justify-items: center;
      gap: 4px;
    }
    .melon-grid-rank strong {
      font-size: 38px;
      font-weight: 800;
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }
    .melon-grid-rank .change { font-size: 16px; }
    .melon-grid-cover {
      width: 100px;
      height: 100px;
      border-radius: 22px;
      object-fit: cover;
      background: #2b2b2b;
    }
    .melon-grid-song h3 {
      margin: 0;
      font-size: 27px;
      font-weight: 700;
      line-height: 1.18;
      letter-spacing: -0.6px;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .melon-grid-song span {
      display: block;
      margin-top: 5px;
      color: #7c7f87;
      font-size: 20px;
      font-weight: 500;
    }

    /* -------------------------------------------------------------------------
       TEMPLATE 4: MelOn Yearly Chart (Frame 3.png)
       ------------------------------------------------------------------------- */
    .yearly-card {
      width: 1180px;
      min-height: 1120px;
      padding: 72px 76px 86px;
      background: #151515;
    }
    .year-title {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 18px;
      font-size: 50px;
      font-weight: 600;
      letter-spacing: -1.6px;
    }
    .year-title strong {
      color: var(--accent, #00cd3c);
      font-weight: 800;
    }
    .year-select {
      width: max-content;
      margin: 38px auto 30px;
      padding: 16px 46px;
      border-radius: 999px;
      background: #262626;
      font-weight: 700;
      font-size: 24px;
    }
    .year-filters {
      display: flex;
      justify-content: center;
      gap: 30px;
    }
    .year-filters span, .year-columns span {
      padding: 15px 32px;
      border-radius: 12px;
      background: #272727;
    }
    .year-filters span { font-size: 22px; font-weight: 500; }
    .year-columns {
      display: grid;
      grid-template-columns: 260px 1fr 150px 130px;
      gap: 18px;
      align-items: center;
      margin-top: 52px;
      text-align: center;
    }
    .year-columns span { justify-self: center; font-size: 19px; font-weight: 600; }
    .year-columns span:nth-child(2) { justify-self: start; }
    .year-row {
      display: grid;
      grid-template-columns: 260px 1fr 150px 130px;
      gap: 18px;
      align-items: center;
      min-height: 186px;
      border-bottom: 1.5px solid rgba(255,255,255,0.38);
    }
    .year-row:last-child { border-bottom: 0; }
    .year-rank { display: flex; align-items: center; gap: 28px; }
    .year-rank img { width: 116px; height: 116px; border-radius: 26px; object-fit: cover; }
    .year-rank > div { display: grid; justify-items: center; gap: 5px; min-width: 72px; }
    .year-rank strong { font-size: 46px; font-weight: 800; }
    .year-row h2 { margin: 0; font-size: 31px; font-weight: 700; }
    .year-row > strong { justify-self: center; font-size: 28px; font-weight: 800; }

    /* -------------------------------------------------------------------------
       TEMPLATE 5: MelOn Most Weeks / Days in Top 100 (Group 103 & 104)
       ------------------------------------------------------------------------- */
    .milestone-card {
      width: 1180px;
      min-height: 1280px;
      padding: 68px 82px 82px;
      background: #151515;
    }
    .milestone-subtitle {
      margin: 34px 0 28px;
      text-align: center;
      font-size: 46px;
      font-weight: 800;
      letter-spacing: -1.2px;
    }
    .milestone-columns {
      display: grid;
      grid-template-columns: 130px 140px 1fr 160px;
      gap: 22px;
      align-items: center;
      margin: 44px 0 20px;
    }
    .milestone-columns span {
      padding: 13px 26px;
      border-radius: 12px;
      background: #262626;
      font-size: 19px;
      font-weight: 500;
      text-align: center;
      width: max-content;
    }
    .milestone-columns span:nth-child(1) { justify-self: center; }
    .milestone-columns span:nth-child(2) { grid-column: 3; justify-self: start; }
    .milestone-columns span:nth-child(3) { grid-column: 4; justify-self: center; }
    .milestone-list { display: grid; gap: 18px; }
    .milestone-row {
      display: grid;
      grid-template-columns: 130px 140px 1fr 160px;
      gap: 22px;
      align-items: center;
      min-height: 126px;
    }
    .milestone-row > strong.m-rank {
      font-size: 46px;
      font-weight: 800;
      text-align: center;
      font-variant-numeric: tabular-nums;
    }
    .milestone-row img {
      width: 116px;
      height: 116px;
      border-radius: 24px;
      object-fit: cover;
      justify-self: center;
    }
    .milestone-song h2 {
      margin: 0;
      font-size: 28px;
      font-weight: 700;
      line-height: 1.2;
    }
    .milestone-song span {
      display: block;
      margin-top: 6px;
      color: #7c7f87;
      font-size: 19px;
    }
    .milestone-row > strong.m-val {
      font-size: 31px;
      font-weight: 800;
      text-align: center;
      font-variant-numeric: tabular-nums;
    }

    /* -------------------------------------------------------------------------
       TEMPLATE 6: MelOn Single-Song Rise Spotlight with Adaptive Cover Blur
       (Group 85, Group 105, Group 106)
       ------------------------------------------------------------------------- */
    .melon-spotlight-card {
      width: 1080px;
      height: 1350px;
      position: relative;
      overflow: hidden;
      background: #141414;
      color: #fff;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      isolation: isolate;
    }
    .melon-spotlight-sharp-art {
      position: absolute;
      inset: 0;
      z-index: 1;
    }
    .melon-spotlight-sharp-art img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
      display: block;
    }
    .melon-spotlight-blur-layer {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      overflow: hidden;
      -webkit-mask-image: linear-gradient(180deg, transparent 22%, rgba(0,0,0,0.45) 48%, #000 72%);
      mask-image: linear-gradient(180deg, transparent 22%, rgba(0,0,0,0.45) 48%, #000 72%);
    }
    .melon-spotlight-blur-layer img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
      filter: blur(var(--spot-blur, 52px)) saturate(1.38) brightness(0.76);
      transform: scale(1.16);
    }
    .melon-spotlight-color-wash {
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
      background: linear-gradient(
        180deg,
        transparent 24%,
        rgba(var(--spot-r, 142), var(--spot-g, 73), var(--spot-b, 71), calc(var(--spot-tint, 0.78) * 0.45)) 54%,
        rgba(var(--spot-r, 142), var(--spot-g, 73), var(--spot-b, 71), var(--spot-tint, 0.86)) 82%,
        rgba(12, 12, 14, 0.94) 100%
      );
    }
    .melon-spotlight-content {
      position: relative;
      z-index: 4;
      padding: 64px 72px 72px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 16px;
    }
    .melon-spotlight-brand {
      display: inline-flex;
      align-items: center;
      gap: 14px;
      padding: 10px 24px;
      border-radius: 999px;
      background: rgba(15, 16, 20, 0.48);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(255,255,255,0.18);
      font-size: 28px;
      font-weight: 800;
      letter-spacing: -0.6px;
    }
    .melon-spotlight-brand .platform-icon {
      width: 42px;
      height: 42px;
      border-radius: 11px;
    }
    .melon-spotlight-brand span { color: #00e64d; }
    .melon-spotlight-title {
      margin: 12px 0 0;
      font-size: 54px;
      font-weight: 900;
      line-height: 1.15;
      letter-spacing: -1.4px;
      text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
      max-width: 940px;
    }
    .melon-spotlight-subtitle {
      margin: 0;
      font-size: 28px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.86);
      text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    }
    .melon-spotlight-rank-box {
      margin-top: 10px;
      display: inline-flex;
      align-items: baseline;
      gap: 16px;
      padding: 16px 42px;
      border-radius: 999px;
      background: rgba(12, 14, 18, 0.56);
      backdrop-filter: blur(16px);
      border: 1.5px solid rgba(255, 255, 255, 0.22);
      box-shadow: 0 14px 36px rgba(0,0,0,0.4);
    }
    .melon-spotlight-rank-box strong {
      font-size: 52px;
      font-weight: 900;
      letter-spacing: -1px;
      font-variant-numeric: tabular-nums;
    }
    .melon-spotlight-rank-box em {
      font-style: normal;
      font-size: 40px;
      font-weight: 800;
      color: #38ff7a;
      font-variant-numeric: tabular-nums;
    }
    .melon-spotlight-rank-box em.down { color: #ff6464; }
    .melon-spotlight-footer {
      margin-top: 14px;
      display: flex;
      align-items: center;
      gap: 18px;
      color: rgba(255,255,255,0.82);
      font-size: 24px;
      font-weight: 600;
      letter-spacing: 0.5px;
    }

    /* -------------------------------------------------------------------------
       TEMPLATE 7: Multi-Platform Single-Song K-Chart Pill Card (Group 124 & 134)
       ------------------------------------------------------------------------- */
    .kchart-pill-card {
      width: 1120px;
      min-height: 1360px;
      padding: 86px 76px 78px;
      background: #121316;
      position: relative;
      overflow: hidden;
      isolation: isolate;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .kchart-pill-backdrop {
      position: absolute;
      top: -60px;
      left: -60px;
      right: -60px;
      height: 760px;
      z-index: -2;
      background: var(--art) center top / cover no-repeat;
      filter: blur(var(--spot-blur, 34px)) saturate(0.95) brightness(0.62);
      transform: scale(1.08);
    }
    .kchart-pill-shade {
      position: absolute;
      inset: 0;
      z-index: -1;
      background: linear-gradient(
        180deg,
        rgba(18, 19, 22, 0.18) 0%,
        rgba(var(--spot-r, 40), var(--spot-g, 60), var(--spot-b, 85), 0.36) 28%,
        #121316 54%,
        #121316 100%
      );
    }
    .kchart-pill-cover {
      width: 300px;
      height: 300px;
      border-radius: 62px;
      overflow: hidden;
      box-shadow: 0 22px 54px rgba(0,0,0,0.62);
      background: #222;
    }
    .kchart-pill-cover img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .kchart-pill-title {
      margin: 34px 0 0;
      text-align: center;
      font-size: 52px;
      font-weight: 800;
      line-height: 1.16;
      letter-spacing: -1.4px;
      max-width: 920px;
    }
    .kchart-pill-meta {
      display: flex;
      gap: 20px;
      margin: 28px 0 46px;
    }
    .kchart-pill-meta span {
      padding: 13px 28px;
      border-radius: 16px;
      background: rgba(38, 40, 44, 0.9);
      color: #f3f4f6;
      font-size: 23px;
      font-weight: 500;
    }
    .kchart-pill-list {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
    .kchart-pill-row {
      display: grid;
      grid-template-columns: 104px 66px 1fr auto;
      align-items: center;
      gap: 22px;
      height: 104px;
      padding: 0 42px 0 0;
      border-radius: 999px;
      background: #232528;
    }
    .kchart-rank-circle {
      width: 104px;
      height: 104px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 40px;
      font-weight: 800;
      color: #fff;
      background: var(--pill-color, #00d036);
      font-variant-numeric: tabular-nums;
    }
    .kchart-pill-row .platform-icon {
      width: 56px;
      height: 56px;
      border-radius: 14px;
    }
    .kchart-pill-row strong.p-name {
      font-size: 38px;
      font-weight: 600;
      letter-spacing: -0.6px;
    }
    .kchart-pill-row span.p-delta {
      font-size: 34px;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .kchart-pill-row span.p-delta.up { color: #00d445; }
    .kchart-pill-row span.p-delta.down { color: #ff4545; }
    .kchart-pill-row span.p-delta.same { color: #9ca3af; }
    .kchart-pill-row span.p-delta.new { color: #ffbb00; }

    /* -------------------------------------------------------------------------
       TEMPLATE 8: Circle Digital Chart TOP200 (Group 37.png)
       ------------------------------------------------------------------------- */
    .circle-card {
      width: 1180px;
      min-height: 1180px;
      padding: 68px 66px 78px;
      background: #393e46;
      color: #fff;
    }
    .circle-header {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      font-size: 50px;
      font-weight: 600;
      letter-spacing: -1.3px;
    }
    .circle-header strong {
      color: #e03e49;
      font-weight: 800;
    }
    .circle-pills {
      display: flex;
      justify-content: center;
      gap: 24px;
      margin-top: 36px;
    }
    .circle-pills span {
      padding: 16px 34px;
      border-radius: 16px;
      background: #878a8f;
      color: #fff;
      font-size: 24px;
      font-weight: 500;
    }
    .circle-columns {
      display: grid;
      grid-template-columns: 136px 106px 1fr 220px 210px;
      gap: 20px;
      align-items: center;
      margin: 44px 0 18px;
    }
    .circle-columns span {
      padding: 13px 22px;
      border-radius: 13px;
      background: #232528;
      font-size: 19px;
      font-weight: 500;
      text-align: center;
      width: max-content;
    }
    .circle-columns span:nth-child(1) { justify-self: start; }
    .circle-columns span:nth-child(2) { grid-column: 3; justify-self: start; }
    .circle-columns span:nth-child(3) { grid-column: 4; justify-self: center; }
    .circle-columns span:nth-child(4) { grid-column: 5; justify-self: center; }
    .circle-row {
      display: grid;
      grid-template-columns: 136px 106px 1fr 220px 210px;
      gap: 20px;
      align-items: center;
      min-height: 190px;
      border-bottom: 1.5px solid rgba(255,255,255,0.55);
    }
    .circle-row:last-child { border-bottom: 0; }
    .circle-row img {
      width: 126px;
      height: 126px;
      border-radius: 26px;
      object-fit: cover;
    }
    .circle-row h2 {
      margin: 0;
      font-size: 32px;
      font-weight: 700;
      line-height: 1.18;
    }
    .circle-weekly-pts {
      display: grid;
      justify-items: center;
      gap: 6px;
      font-variant-numeric: tabular-nums;
    }
    .circle-weekly-pts strong { font-size: 24px; font-weight: 800; }
    .circle-weekly-pts span { font-size: 18px; font-weight: 800; }
    .circle-total-pts {
      text-align: center;
      font-size: 24px;
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }

    /* -------------------------------------------------------------------------
       TEMPLATE 9: YouTube Music Suite (Frame 4, Group 35, Group 133)
       ------------------------------------------------------------------------- */
    .yt-brand-header {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
      padding: 64px 60px 18px;
      font-size: 46px;
      font-weight: 800;
      letter-spacing: -1.4px;
    }
    .country-pill {
      width: max-content;
      margin: 18px auto 0;
      padding: 12px 32px;
      border-radius: 999px;
      background: #272727;
      font-size: 21px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .yt-songs-card {
      width: 1180px;
      min-height: 1220px;
      padding-bottom: 72px;
      background: #151515;
    }
    .yt-filter-pills {
      display: flex;
      justify-content: center;
      gap: 26px;
      margin: 34px 0 44px;
    }
    .yt-filter-pills span {
      padding: 16px 34px;
      border-radius: 14px;
      background: #272727;
      font-size: 23px;
      font-weight: 500;
    }
    .yt-songs-columns {
      display: grid;
      grid-template-columns: 136px 106px 1fr 220px 120px;
      gap: 20px;
      align-items: center;
      padding: 0 66px;
      margin-bottom: 18px;
    }
    .yt-songs-columns span {
      padding: 12px 22px;
      border-radius: 12px;
      background: #262626;
      font-size: 18px;
      font-weight: 500;
      text-align: center;
      width: max-content;
    }
    .yt-songs-columns span:nth-child(1) { justify-self: start; }
    .yt-songs-columns span:nth-child(2) { grid-column: 3; justify-self: start; }
    .yt-songs-columns span:nth-child(3) { grid-column: 4; justify-self: center; }
    .yt-songs-columns span:nth-child(4) { grid-column: 5; justify-self: center; }
    .yt-songs-list { padding: 0 66px; }
    .yt-songs-row {
      display: grid;
      grid-template-columns: 136px 106px 1fr 220px 120px;
      gap: 20px;
      align-items: center;
      min-height: 192px;
      border-bottom: 1.5px solid rgba(255,255,255,0.45);
    }
    .yt-songs-row:last-child { border-bottom: 0; }
    .yt-songs-row img {
      width: 126px;
      height: 126px;
      border-radius: 26px;
      object-fit: cover;
    }
    .yt-songs-row h2 {
      margin: 0;
      font-size: 32px;
      font-weight: 700;
      line-height: 1.18;
    }

    /* YouTube Weekly Top Artists (Frame 4) */
    .artist-card {
      width: 1180px;
      min-height: 1260px;
      padding-bottom: 68px;
      background: #151515;
    }
    .artist-card h1 {
      margin: 18px 0 24px;
      text-align: center;
      font-size: 54px;
      font-weight: 800;
      letter-spacing: -1.2px;
    }
    .summary-columns {
      display: grid;
      grid-template-columns: 80px 110px 1fr repeat(3, 110px) 40px;
      gap: 18px;
      padding: 0 84px 16px;
      color: #a1a1aa;
      font-size: 20px;
      text-align: center;
    }
    .summary-columns span:nth-child(2) { grid-column: 3; text-align: left; }
    .summary-columns span:nth-child(3) { grid-column: 4; }
    .summary-columns span:nth-child(4) { grid-column: 5; }
    .summary-columns span:nth-child(5) { grid-column: 6; }
    .artist-row {
      display: grid;
      grid-template-columns: 80px 110px 1fr repeat(3, 110px) 40px;
      gap: 18px;
      align-items: center;
      margin: 0 56px;
      padding: 26px 28px;
      border-radius: 26px;
      background: #262626;
      font-size: 30px;
    }
    .artist-row img {
      width: 96px;
      height: 96px;
      border-radius: 50%;
      object-fit: cover;
      justify-self: center;
    }
    .artist-row h2 { margin: 0; font-size: 36px; font-weight: 700; }
    .artist-row span { text-align: center; font-weight: 600; }
    .summary-stats {
      display: grid;
      gap: 16px;
      margin: 44px 56px 0;
    }
    .summary-stat {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 76px;
      padding: 0 42px;
      border-radius: 22px;
      font-size: 25px;
    }
    .summary-stat.filled { background: #262626; }
    .summary-stat strong { font-weight: 600; font-variant-numeric: tabular-nums; }
    .summary-stat em { color: #ff2c2c; font-style: normal; font-size: 22px; margin-left: 6px; }
    .summary-stat strong.up { color: #00d445; }
    .summary-stat strong.down { color: #ff4545; }

    /* YouTube Stream Ranking (Group 133) & Spotify TOP200 (Group 34) */
    .stream-card {
      width: 1180px;
      min-height: 720px;
      padding-bottom: 58px;
      background: #151515;
    }
    .stream-card .country-pill.bordered {
      background: transparent;
      border: 2px solid #fff;
      padding: 12px 38px;
    }
    .streams-label {
      margin: 34px 76px 6px auto;
      color: #a1a1aa;
      font-size: 22px;
      font-weight: 700;
      text-align: right;
    }
    .stream-list { display: grid; }
    .stream-row {
      display: grid;
      grid-template-columns: 142px 104px minmax(0, 1fr) 190px;
      gap: 28px;
      align-items: center;
      min-height: 178px;
      padding: 14px 72px;
    }
    .stream-row .cover-wrap { width: 132px; height: 132px; border-radius: 28px; }
    .stream-row h2 { font-size: 34px; }
    .streams {
      display: grid;
      justify-items: end;
      gap: 8px;
      font-variant-numeric: tabular-nums;
    }
    .streams strong { font-size: 25px; font-weight: 800; }
    .streams span { font-weight: 800; font-size: 20px; }
    .streams span.up { color: #00c83d; }
    .streams span.down { color: #f02525; }

    /* -------------------------------------------------------------------------
       TEMPLATE 10: Spotify Figma Suite (Frame 5, Frame 6, Frame 7)
       ------------------------------------------------------------------------- */
    .spotify-iu-brand {
      display: flex;
      align-items: center;
      gap: 16px;
      color: #fff;
    }
    .spotify-iu-brand > div { display: grid; gap: 2px; }
    .spotify-iu-brand strong { font: 700 24px/1.15 "Inter", Arial, sans-serif; }
    .spotify-iu-brand span { font: 400 22px/1.15 "Inter", Arial, sans-serif; opacity: 0.9; }

    /* Frame 5: Spotify Song Spotlight (1900x1009) */
    .spotify-figma-song-card {
      position: relative;
      display: grid;
      grid-template-columns: 1009px 891px;
      width: 1900px;
      height: 1009px;
      overflow: hidden;
      background: #3f3a37;
      color: #fff;
    }
    .spotify-figma-song-art {
      width: 1009px;
      height: 1009px;
      overflow: hidden;
      background: #222;
    }
    .spotify-figma-song-art img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .spotify-figma-song-copy {
      position: relative;
      overflow: hidden;
      padding: 56px 60px;
      box-sizing: border-box;
      isolation: isolate;
      display: flex;
      flex-direction: column;
    }
    .spotify-figma-song-bg {
      position: absolute;
      z-index: -2;
      inset: -70px;
      background:
        linear-gradient(180deg, rgba(var(--spot-r, 40), var(--spot-g, 36), var(--spot-b, 33), 0.48), rgba(var(--spot-r, 83), var(--spot-g, 78), var(--spot-b, 72), 0.78)),
        var(--art) center / cover no-repeat;
      filter: blur(var(--spot-blur, 48px)) saturate(0.85) brightness(0.62);
      transform: scale(1.16);
    }
    .spotify-figma-song-copy::after {
      content: "";
      position: absolute;
      z-index: -1;
      inset: 0;
      background: linear-gradient(
        180deg,
        rgba(38, 34, 31, 0.52),
        rgba(var(--spot-r, 140), var(--spot-g, 130), var(--spot-b, 120), calc(var(--spot-tint, 0.78) * 0.65))
      );
    }
    .spotify-figma-song-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font: 700 36px/1 "Inter", Arial, sans-serif;
    }
    .spotify-figma-song-copy h1 {
      max-width: 770px;
      margin: 64px 0 36px;
      font: 700 84px/1.04 "Inter", Arial, sans-serif;
      letter-spacing: -2.5px;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    .spotify-figma-song-copy h2 {
      margin: 0 0 18px;
      font: 400 46px/1.1 "Inter", Arial, sans-serif;
    }
    .spotify-figma-song-daily {
      display: grid;
      grid-template-columns: 492px 248px;
      gap: 31px;
      margin-top: 14px;
    }
    .spotify-figma-song-daily strong,
    .spotify-figma-song-daily span {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 103px;
      background: #e8e8e8;
      color: #47423f;
      font: 700 46px/1 "Inter", Arial, sans-serif;
      letter-spacing: -1px;
      font-variant-numeric: tabular-nums;
    }
    .spotify-figma-song-daily span.up { color: #278b50; }
    .spotify-figma-song-daily span.down { color: #9e3030; }
    .spotify-figma-song-daily span.same { color: #69645f; }
    .spotify-figma-song-total {
      display: grid;
      justify-items: center;
      gap: 6px;
      margin-top: 26px;
    }
    .spotify-figma-song-total strong {
      font: 700 60px/1 "Inter", Arial, sans-serif;
      font-variant-numeric: tabular-nums;
    }
    .spotify-figma-song-total span {
      font: 400 24px/1 "Inter", Arial, sans-serif;
    }
    .spotify-figma-best {
      align-self: center;
      width: 492px;
      margin: 28px auto 0;
      padding: 18px 22px;
      border-radius: 40px;
      text-align: center;
      background: linear-gradient(90deg, #948200, #c7af00, #b7a624);
      font: 700 24px/1.2 "Inter", Arial, sans-serif;
      text-transform: uppercase;
    }
    .spotify-figma-song-brand {
      margin-top: auto;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
    }
    .spotify-figma-arrow {
      font: 300 82px/1 Arial, sans-serif;
      color: #fff;
    }

    /* Frame 6: Spotify Regional Chart Breakdown (1941x1149) */
    .spotify-figma-regions-card {
      position: relative;
      width: 1941px;
      min-height: 1149px;
      padding: 60px;
      box-sizing: border-box;
      overflow: hidden;
      color: #2b2725;
      background: #8f8982;
      isolation: isolate;
    }
    .spotify-figma-regions-card::before {
      content: "";
      position: absolute;
      z-index: -1;
      inset: -90px;
      background:
        linear-gradient(180deg, rgba(var(--spot-r, 70), var(--spot-g, 65), var(--spot-b, 62), 0.82), rgba(184, 178, 167, 0.89)),
        var(--art) center / cover no-repeat;
      filter: blur(var(--spot-blur, 64px)) saturate(0.55);
      transform: scale(1.12);
    }
    .spotify-figma-regions-head {
      display: grid;
      grid-template-columns: 300px 1fr;
      gap: 49px;
      min-height: 323px;
      color: #fff;
    }
    .spotify-figma-regions-head > img {
      width: 300px;
      height: 300px;
      border-radius: 40px;
      object-fit: cover;
    }
    .spotify-figma-regions-head > div { padding-top: 12px; }
    .spotify-figma-regions-tags { display: flex; gap: 22px; }
    .spotify-figma-regions-tags span,
    .spotify-figma-regions-tags time {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 260px;
      height: 58px;
      padding: 0 24px;
      border-radius: 30px;
      background: rgba(217, 217, 217, 0.22);
      backdrop-filter: blur(12px);
      font: 500 24px/1 "Inter", Arial, sans-serif;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .spotify-figma-regions-head h1 {
      margin: 38px 0 10px;
      font: 700 80px/1.05 "Inter", Arial, sans-serif;
      letter-spacing: -2px;
    }
    .spotify-figma-regions-head h2 {
      margin: 0;
      font: 400 46px/1.15 "Inter", Arial, sans-serif;
    }
    .spotify-figma-regions-table {
      margin-top: 8px;
      border-radius: 30px;
      overflow: hidden;
      background: #e4e4e4;
    }
    .spotify-figma-regions-table h3 {
      height: 84px;
      display: flex;
      align-items: center;
      margin: 0;
      padding: 0 36px;
      font: 500 24px/1 "Inter", Arial, sans-serif;
    }
    .spotify-figma-region-header,
    .spotify-figma-region-row {
      display: grid;
      grid-template-columns: 140px 140px 1.4fr 280px 220px 170px 140px;
      align-items: center;
      column-gap: 14px;
      padding: 0 45px;
      box-sizing: border-box;
    }
    .spotify-figma-region-header {
      height: 78px;
      background: #c7c4c2;
      font: 500 24px/1 "Inter", Arial, sans-serif;
      text-align: center;
    }
    .spotify-figma-region-header span:nth-child(3) { text-align: left; }
    .spotify-figma-region-row {
      min-height: 74px;
      border-bottom: 2px solid #c7c7c7;
      font: 500 24px/1.1 "Inter", Arial, sans-serif;
    }
    .spotify-figma-region-row:last-child { border-bottom: 0; }
    .spotify-figma-region-row > strong,
    .spotify-figma-region-row > span {
      text-align: center;
      font-variant-numeric: tabular-nums;
    }
    .spotify-figma-region-name {
      display: flex;
      align-items: center;
      gap: 18px;
    }
    .spotify-figma-region-name > span {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border: 1px solid #777;
      border-radius: 12px;
      background: #ddd;
      font-size: 24px;
    }
    .spotify-figma-move {
      justify-self: center;
      min-width: 86px;
      padding: 7px 12px;
      border: 1px solid #a6a6a6;
      border-radius: 20px;
      text-align: center;
      font-weight: 700;
      font-size: 18px;
      background: rgba(166, 166, 166, 0.28);
    }
    .spotify-figma-move.up { color: #317a40; border-color: #409050; background: rgba(64, 144, 80, 0.22); }
    .spotify-figma-move.down { color: #a42020; border-color: #ac3535; background: rgba(172, 53, 53, 0.18); }
    .spotify-figma-move.new { color: #b86424; border-color: #ca7839; background: rgba(202, 120, 57, 0.22); }
    .spotify-figma-region-row .up { color: #2e8540; font-weight: 700; }
    .spotify-figma-region-row .down { color: #a42020; font-weight: 700; }
    .spotify-figma-region-row .same { color: #6a6666; }
    .spotify-figma-regions-brand { margin-top: 34px; }

    /* Frame 7: Spotify Artist & Top Albums Summary (1600x1800) */
    .spotify-figma-summary {
      position: relative;
      width: 1600px;
      min-height: 1760px;
      padding: 60px 60px 140px;
      box-sizing: border-box;
      background: #1b1e21;
      color: #fff;
      overflow: hidden;
    }
    .spotify-figma-summary-hero {
      position: relative;
      height: 616px;
      border-radius: 40px;
      overflow: hidden;
      background:
        linear-gradient(180deg, rgba(27, 30, 33, 0.08) 40%, #212528 96%),
        var(--hero-image) center 25% / cover no-repeat;
    }
    .spotify-figma-date-pill {
      position: absolute;
      left: 24px;
      top: 24px;
      padding: 15px 28px;
      border-radius: 40px;
      background: rgba(25, 28, 31, 0.76);
      backdrop-filter: blur(12px);
      font-size: 21px;
      font-weight: 500;
    }
    .spotify-figma-hero-arrow {
      position: absolute;
      right: 34px;
      top: 24px;
      font: 300 68px/1 Arial, sans-serif;
      color: #fff;
    }
    .spotify-figma-profile {
      position: absolute;
      left: 38px;
      bottom: 184px;
      display: flex;
      align-items: center;
      gap: 28px;
    }
    .spotify-figma-profile img {
      width: 244px;
      height: 244px;
      border-radius: 50%;
      object-fit: cover;
      box-shadow: 0 14px 36px rgba(0,0,0,0.45);
    }
    .spotify-figma-profile h1 {
      margin: 0;
      font: 800 96px/1 "Inter", Arial, sans-serif;
      display: flex;
      align-items: center;
      gap: 20px;
    }
    .verified-badge {
      display: inline-grid;
      place-items: center;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: #3b82f6;
      color: #fff;
      font-size: 24px;
      font-weight: 900;
    }
    .spotify-figma-summary-kpis {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      height: 158px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-items: center;
      border-radius: 40px;
      background: #212528;
    }
    .spotify-figma-summary-kpis > div {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    .spotify-figma-summary-kpis > div + div {
      border-left: 1px solid #3c4147;
    }
    .spotify-figma-summary-kpis small {
      color: #9b9ea4;
      font: 500 20px/1 "Inter", Arial, sans-serif;
      letter-spacing: 1px;
    }
    .kpi-val-wrap {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    .kpi-val-wrap strong {
      font: 700 48px/1 "Inter", Arial, sans-serif;
      font-variant-numeric: tabular-nums;
    }
    .kpi-pct-pill {
      padding: 7px 16px;
      border-radius: 999px;
      font-size: 19px;
      font-weight: 700;
    }
    .kpi-pct-pill.up { color: #20c55b; background: rgba(7, 183, 41, 0.16); border: 1px solid rgba(32, 197, 91, 0.4); }
    .kpi-pct-pill.down { color: #e03e60; background: rgba(172, 53, 53, 0.18); border: 1px solid rgba(224, 62, 96, 0.4); }
    .spotify-figma-projects { margin-top: 38px; }
    .spotify-figma-projects h2 {
      margin: 0 0 24px;
      font: 800 42px/1 "Inter", Arial, sans-serif;
    }
    .spotify-figma-project-header,
    .spotify-figma-project-row {
      display: grid;
      grid-template-columns: 100px minmax(0, 1fr) 240px 190px 260px;
      align-items: center;
      column-gap: 18px;
    }
    .spotify-figma-project-header {
      height: 64px;
      border-top: 2px solid #3c4147;
      color: #7d8590;
      font: 600 21px/1 "Inter", Arial, sans-serif;
    }
    .spotify-figma-project-header span:nth-child(n+3) { text-align: right; }
    .spotify-figma-project-header span:nth-child(4) { text-align: center; }
    .spotify-figma-project-row {
      min-height: 82px;
      border-top: 1px solid #2d3237;
    }
    .spotify-figma-project-row .spotify-figma-rank {
      font: 700 26px/1 "Inter", Arial, sans-serif;
    }
    .album-cell {
      display: flex;
      align-items: center;
      gap: 20px;
      min-width: 0;
    }
    .album-cell img {
      width: 62px;
      height: 62px;
      border-radius: 15px;
      object-fit: cover;
      flex-shrink: 0;
    }
    .album-cell strong {
      font: 700 26px/1.2 "Inter", Arial, sans-serif;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .spotify-figma-project-row > b {
      text-align: right;
      font: 500 25px/1 "Inter", monospace;
      font-variant-numeric: tabular-nums;
    }
    .spotify-figma-project-row > em {
      justify-self: center;
      min-width: 112px;
      text-align: center;
      padding: 8px 16px;
      border-radius: 999px;
      font-style: normal;
      font-weight: 700;
      font-size: 18px;
    }
    .spotify-figma-project-row > em.up { color: #20c55b; background: rgba(7, 183, 41, 0.16); border: 1px solid rgba(32,197,91,0.38); }
    .spotify-figma-project-row > em.down { color: #e03e60; background: rgba(172, 53, 53, 0.18); border: 1px solid rgba(224,62,96,0.38); }
    .spotify-figma-project-row > em.same { color: #9ca3af; background: rgba(156, 163, 175, 0.15); border: 1px solid rgba(156,163,175,0.3); }
    .spotify-figma-project-row .spotify-figma-total {
      text-align: right;
      font: 500 25px/1 "Inter", monospace;
      font-variant-numeric: tabular-nums;
    }
    .spotify-figma-summary > .spotify-iu-brand {
      position: absolute;
      left: 60px;
      bottom: 48px;
    }

    /* -------------------------------------------------------------------------
       TEMPLATE 11: Full Catalogs (Spotify Songs / Projects / YouTube Videos)
       & MelOn Listeners Growth
       ------------------------------------------------------------------------- */
    .catalog-card {
      width: 1180px;
      background: #151515;
      padding-bottom: 24px;
    }
    .catalog-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 44px 56px 34px;
      border-bottom: 1px solid #2b2e33;
    }
    .catalog-header .platform-heading { font-size: 36px; }
    .catalog-header .platform-heading strong { font-size: 36px; }
    .catalog-period {
      text-align: right;
      display: grid;
      gap: 4px;
    }
    .catalog-period strong { font-size: 20px; color: var(--accent, #1ed760); }
    .catalog-period time { font-size: 20px; color: #9ca3af; }
    .catalog-row {
      display: grid;
      grid-template-columns: 64px 76px minmax(0, 1fr) 180px 200px;
      gap: 20px;
      align-items: center;
      min-height: 92px;
      padding: 10px 56px;
      border-bottom: 1px solid #26292e;
    }
    .catalog-rank {
      font-size: 27px;
      font-weight: 800;
      text-align: center;
      font-variant-numeric: tabular-nums;
    }
    .catalog-cover {
      width: 66px;
      height: 66px;
      border-radius: 14px;
      object-fit: cover;
    }
    .catalog-song h2 {
      margin: 0;
      font-size: 21px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .catalog-song span {
      display: block;
      margin-top: 4px;
      font-size: 14px;
      color: #8f96a3;
    }
    .catalog-metric {
      display: grid;
      justify-items: end;
      gap: 3px;
      font-variant-numeric: tabular-nums;
    }
    .catalog-metric small {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: #858d99;
    }
    .catalog-metric strong { font-size: 19px; font-weight: 800; }
    .catalog-metric span { font-size: 13px; font-weight: 700; }
    .catalog-metric .up { color: #00d445; }
    .catalog-metric .down { color: #ff4d4d; }
    .catalog-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 22px 56px 10px;
      color: #858d99;
      font-size: 16px;
    }
    .catalog-footer strong { color: #e5e7eb; }

    @media (max-width: 1024px) {
      .studio-app, .studio-app.drawer-open {
        grid-template-columns: 1fr;
      }
      .studio-sidebar {
        position: static;
        height: auto;
        max-height: 360px;
        border-right: 0;
        border-bottom: 1px solid var(--border-subtle);
      }
      .studio-drawer {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: min(360px, 92vw);
        box-shadow: -16px 0 44px rgba(0,0,0,0.65);
      }
    }
