
.chart {
    max-width: 370px;
    margin: 0 auto;
    background: #1a1a1a;
    padding: 12px 10px 20px;
  }

  .chart-logo {
    width: 220px;
    height: auto;
    flex-shrink: 0;
    display: block;
    position: relative;
  }

  .chart-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    vertical-align: top;
  }

  .chart-logo-subtitle {
    position: absolute;
    top: 35px !important;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 12px;
    font-weight: 400;
    color: #22d3ee !important;
    margin-left: 45px;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    padding: 4px 0 0;
  }

  .chart-title-block {
    display: block;
  }

  .chart-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #fff;
  }

  .chart-title .word-charts {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-left: 2px;
  }

  .chart-subtitle {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    font-weight: 400;
  }

  .chart-table thead th.col-track {
    text-align: left;
    vertical-align: middle;
    padding-bottom: 8px;
  }

  /* Chart table */
  .chart-table {
    width: 100%;
    max-width: 370px;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 12px;
  }

  .chart-table thead {
    background: #2a2a2a;
  }

  .chart-table thead tr th {
    box-sizing: border-box;
  }

  .chart-table th { 
    font-size: 9px;
    font-weight: 600;
    padding: 12px 4px 12px 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    border: none;
    vertical-align: middle;
  }

  .chart-table th.col-trend {
    border-right: 1px solid #333;
  }

  .chart-table th.col-award,
  .chart-table th.col-last,
  .chart-table th.col-peak {
    text-align: center;
    border-right: 1px solid #333;
    vertical-align: middle;
    line-height: 1.2;
  }

  .chart-table td.col-award,
  .chart-table td:nth-child(5),
  .chart-table td:nth-child(6) {
    text-align: center;
    border-right: 1px solid #333;
  }

  /* first 2 columns = logo + album-art (same width for both) */
  .chart-table thead th.col-track {
    width: 100px;
  }

  .chart-table th.col-track { width: 50px; }
  .chart-table th.col-trend { width: 50px; }
  .chart-table th.col-track-info { width: auto; }
  .chart-table th.col-award { width: 38px; }
  .chart-table th.col-last { width: 38px; }
  .chart-table th.col-peak { width: 38px; }

  .chart-table tbody tr:nth-child(odd) {
    background: rgb(32, 32, 32);
  }

  .chart-table tbody tr:nth-child(even) {
    background: rgb(38, 38, 38);
  }

  .chart-table tbody tr:last-child {
    border-bottom: none;
  }

  .chart-table td {
    vertical-align: middle;
    border: none;
    padding: 6px 4px 6px 0;
  }

  /* Rank 1 - featured row */


  .chart-table tr.row-featured .album-art {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
  }

  .chart-table td:has(.track-info) {
    padding-left: 4px;
  }

  .chart-table tr.row-featured .track-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .chart-table tr.row-featured .artist {
    font-size: 14px;
    font-weight: 700;
    color: #22d3ee;
    letter-spacing: -0.02em;
  }

  .chart-table tr.row-featured .song {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }

  .chart-table tr.row-featured .song .streaming-icons {
    margin-left: 0;
  }

  .chart-table .track-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
  }

  .chart-table .track-badges .new-tag,
  .chart-table .track-badges .weeks-tag,
  .chart-table .track-badges .retired-tag {
    margin-top: 0;
    margin-left: 0;
  }

  .chart-table tr.row-featured .new-tag {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: #d97706;
    padding: 2px 6px;
    border-radius: 3px;
    width: fit-content;
  }

  .chart-table .weeks-tag {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: #22d3ee;
    padding: 2px 6px;
    border-radius: 3px;
  }

  .chart-table .retired-tag {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: #dc2626;
    padding: 2px 6px;
    border-radius: 3px;
  }

  .chart-table .streaming-icons {
    display: inline-flex;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
  }

  .chart-table .streaming-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.9;
  }

  .chart-table .streaming-icon:hover {
    opacity: 1;
  }

  .chart-table .medal-icon {
    display: inline-block;
    font-size: 20px;
    line-height: 1;
  }

  .chart-table tr.row-featured .col-award {
    text-align: center;
    vertical-align: middle;
  }

  .chart-table tr.row-featured .add-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #3a3a3a;
    border: none;
    color: #888;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
  }

  .chart-table tr.row-featured .add-btn:hover {
    background: #444;
    color: #fff;
  }

  .chart-table tr.row-featured td.num {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-align: center;
  }

  /* List rows - rank cell */
  .chart-table td.col-rank {
    text-align: center;
  }

  .chart-table td.col-trend {
    text-align: center;
  }

  .chart-table tbody tr:nth-child(odd) td.col-trend {
    background: rgb(24, 24, 24);
  }

  .chart-table tbody tr:nth-child(even) td.col-trend {
    background: rgb(29, 30, 29);
  }

  .chart-table .rank {
    font-size: 18px;
    font-weight: 700;
    color: #22d3ee;
    min-width: 20px;
  }

  .chart-table .trend {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .chart-table .trend svg {
    width: 10px;
    height: 10px;
    color: #fff;
  }

  .chart-table .trend.up {
    background: #16a34a;
  }

  .chart-table .track-info .artist {
    font-size: 12px;
    font-weight: 600;
    color: #22d3ee;
    margin-bottom: 1px;
  }

  .chart-table .track-info .song {
    font-size: 11px;
    color: #fff;
    font-weight: 400;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }

  .chart-table td.col-award {
    color: #888;
    font-weight: 700;
  }

  .chart-table td.num {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
  }

  /* Peak Pos. column: 16px from 2nd row onwards */
  .chart-table tbody tr:not(.row-featured) td.num:last-child {
    font-size: 16px;
  }

  tr {
    height: 60px !important;
  }

  /* ========== Desktop (PC) layout ========== */
  @media (min-width: 768px) {
    .chart {
      max-width: 900px;
      padding: 28px 32px 40px;
    }

    .chart-logo {
      width: 320px;
      height: auto;
      flex-shrink: 0;
    }

    .chart-logo-subtitle {
      font-size: 14px;
      padding: 15px 0 0;
      margin-left: 65px;
    }

    .chart-table thead {
      overflow: visible;
    }

    .chart-table thead th.col-track {
      overflow: visible;
      position: relative;
      z-index: 1;
    }

    .chart-table thead th.col-track-info {
      overflow: visible;
      position: relative;
      z-index: 0;
    }

    .chart-title {
      font-size: 28px;
    }

    .chart-title .word-charts {
      font-size: 22px;
      letter-spacing: 0.12em;
      margin-left: 4px;
    }

    .chart-subtitle {
      font-size: 13px;
      margin-top: 6px;
    }

    .chart-table thead th.col-track {
      padding-bottom: 20px;
    }

    .chart-table thead th.col-track {
      width: 200px;
    }

    .chart-table thead th {
      padding: 16px 20px 16px 0;
      vertical-align: middle;
    }

    .chart-table {
      max-width: 900px;
      font-size: 14px;
    }

    .chart-table th {
      font-size: 11px;
      padding: 12px 20px 14px 0;
    }

    .chart-table th.col-track { width: 100px; }
    .chart-table th.col-trend { width: 100px; }
    .chart-table th.col-award { width: 64px; }
    .chart-table th.col-last { width: 56px; }
    .chart-table th.col-peak { width: 56px; }

    .chart-table tr.row-featured .album-art {
      width: 100%;
      height: auto;
      aspect-ratio: 1;
    }

    .chart-table td:has(.track-info) {
      padding-left: 5px;
    }

    .chart-table tr.row-featured .artist {
      font-size: 22px;
    }

    .chart-table tr.row-featured .song {
      font-size: 20px;
    }

    .chart-table tr.row-featured .new-tag {
      font-size: 10px;
      letter-spacing: 0.1em;
      padding: 4px 10px;
      border-radius: 4px;
      margin-top: 6px;
    }

    .chart-table .weeks-tag {
      font-size: 10px;
      padding: 3px 8px;
      margin-top: 4px;
    }

    .chart-table .retired-tag {
      font-size: 10px;
      padding: 3px 8px;
      margin-top: 4px;
    }

    .chart-table .streaming-icon {
      width: 26px;
      height: 26px;
      font-size: 14px;
    }

    .chart-table tr.row-featured .add-btn {
      width: 32px;
      height: 32px;
      font-size: 18px;
    }

    .chart-table tr.row-featured td.num {
      font-size: 20px;
    }

    .chart-table .rank {
      font-size: 24px;
      min-width: 28px;
    }

    .chart-table .trend {
      width: 24px;
      height: 24px;
    }

    .chart-table .trend svg {
      width: 12px;
      height: 12px;
    }

    .chart-table .track-info .artist {
      font-size: 14px;
      margin-bottom: 2px;
    }

    .chart-table .track-info .song {
      font-size: 13px;
    }

    .chart-table td.num {
      font-size: 20px;
    }

    .chart-table tbody tr:not(.row-featured) td.num:last-child {
      font-size: 16px;
    }
  }