:root {
      --page: #f7f9fb;
      --white: #ffffff;
      --navy: #0f172a;
      --muted: #5b6775;
      --border: #d5e3ec;
      --blue: #00bcff;
      --orange: #ff8a00;
      --orange-deep: #e67700;
      --orange-soft: #fff1e0;
      --wash: #eef6fa;
      --fast: #c62828;
      --moderate: #2e7d32;
      --slow: #ef6c00;
      --radius: 14px;
      --radius-sm: 8px;
      --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }
    body {
      font-family: Inter, system-ui, sans-serif;
      background: var(--page);
      color: var(--navy);
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
      width: 100%;
      max-width: 100%;
      margin: 0;
      min-width: 0;
    }
    a { color: inherit; text-decoration: none; }
    .wrap {
      width: 100%;
      max-width: 1120px;
      margin-inline: auto;
      padding-inline: 24px;
    }

    .site-header {
      background: #000;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      position: sticky; top: 0; z-index: 30;
      width: 100%;
    }
    .site-header .inner {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 16px;
      padding: 10px 0;
      width: 100%;
      max-width: 1120px;
      margin-inline: auto;
      padding-inline: 24px;
    }
    .brand-cluster {
      display: flex; align-items: center; gap: 28px; min-width: 0;
      justify-self: start;
    }
    .logo {
      display: block; height: 48px; width: auto;
    }
    .nav {
      display: flex; gap: 28px; flex-wrap: wrap;
      justify-content: center;
      justify-self: center;
    }
    .nav a { font-size: 14px; color: rgba(255, 255, 255, 0.92); transition: color .15s; white-space: nowrap; }
    .nav a:hover { color: var(--orange); }
    .nav a.is-active,
    .nav a[aria-current="page"] { color: var(--orange); font-weight: 600; }
    .header-actions {
      display: flex; align-items: center; gap: 12px; flex-shrink: 0;
      justify-self: end;
    }
    .menu-toggle {
      display: none;
      width: 44px; height: 44px; padding: 0;
      border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-sm);
      background: transparent; color: #fff; cursor: pointer;
      align-items: center; justify-content: center; flex-direction: column; gap: 5px;
    }
    .menu-toggle span {
      display: block; width: 18px; height: 2px; background: #fff; border-radius: 1px;
    }
    .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .menu-toggle span { transition: transform .2s, opacity .2s; }
    .mobile-nav {
      display: none;
      background: #000;
      border-bottom: 1px solid rgba(255,255,255,.08);
      padding: 8px 0 16px;
    }
    .mobile-nav.is-open { display: block; }
    @media (min-width: 861px) {
      .mobile-nav,
      .mobile-nav.is-open { display: none !important; }
    }
    .mobile-nav .wrap { display: flex; flex-direction: column; gap: 4px; }
    .mobile-nav a {
      display: flex; align-items: center; min-height: 44px;
      padding: 8px 4px; font-size: 16px; color: rgba(255,255,255,.92);
      border-bottom: 1px solid rgba(255,255,255,.06);
    }
    .mobile-nav a.is-active,
    .mobile-nav a[aria-current="page"] { color: var(--orange); font-weight: 600; }

    .btn {
      display: inline-flex; align-items: center; justify-content: center;
      gap: 6px; padding: 11px 18px; border-radius: var(--radius-sm);
      font-size: 14px; font-weight: 600; border: 1px solid transparent;
      cursor: pointer; background: transparent; font-family: inherit;
      text-decoration: none; color: inherit;
    }
    .btn-primary { background: var(--blue); color: #fff; }
    .btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border); }
    .btn-accent { background: var(--orange); color: #fff; }
    .btn-sm { padding: 9px 12px; font-size: 12px; min-height: 36px; }
    .btn:disabled { opacity: 0.4; cursor: not-allowed; }

    .hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 48px 0 52px; width: 100%; }
    .hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center; }
    .hero h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 12px; }
    .hero p { font-size: 16px; color: var(--muted); max-width: 34em; margin-bottom: 22px; }
    .hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
    .hero-visual {
      border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
      aspect-ratio: 4 / 3; max-height: 320px; background: #0a2a3d;
      width: 100%;
      justify-self: stretch;
    }
    .hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

    section { padding: 52px 0; width: 100%; }
    .section-head { margin-bottom: 24px; max-width: 42em; }
    .section-head h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 6px; }
    .section-head h2::after {
      content: ""; display: block; width: 40px; height: 3px; border-radius: 999px;
      background: var(--orange); margin-top: 10px;
    }
    .section-head p { font-size: 15px; color: var(--muted); }

    .intensity-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
    }
    .playlist-card {
      background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
      border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column;
      transition: outline .15s, border-color .15s;
    }
    .playlist-card:hover,
    .playlist-card:focus-within {
      outline: 2px solid var(--orange);
      outline-offset: 2px;
      border-color: var(--orange);
    }
    .card-media {
      position: relative; aspect-ratio: 1 / 1;
      background: var(--wash);
    }
    .card-media img {
      width: 100%; height: 100%; object-fit: cover; display: block;
    }
    .card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
    .card-body h3 { font-size: 18px; letter-spacing: -0.02em; }
    .card-body .desc { font-size: 13px; color: var(--muted); flex: 1; }
    .meta {
      display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted);
    }
    .tags { display: flex; flex-wrap: wrap; gap: 6px; }
    .tag {
      font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
      border: 1px solid var(--border); background: var(--white); color: var(--navy);
    }
    .tag.fast { color: var(--fast); background: #fdecea; border-color: #f5c6c2; }
    .tag.moderate { color: var(--moderate); background: #e8f5e9; border-color: #c8e6c9; }
    .tag.slow { color: var(--slow); background: #fff3e0; border-color: #ffe0b2; }
    .card-actions { display: flex; gap: 8px; padding-top: 4px; }
    .card-actions .btn { flex: 1; }

    .crazy {
      border-radius: 16px; padding: 28px 32px; color: #fff;
      background: linear-gradient(120deg, #00bcff 0%, #3aa0e8 40%, #ff8a00 100%);
      display: grid; grid-template-columns: 1.5fr auto; gap: 20px; align-items: center;
    }
    .crazy h2 { font-size: 22px; margin-bottom: 6px; }
    .crazy p { font-size: 15px; opacity: 0.95; max-width: 36em; }
    .crazy-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
    .crazy .btn-primary { background: #fff; color: #0077a8; }

    .crazy-preview {
      display: none;
      margin-top: 18px;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
    }
    .crazy-preview.is-open { display: block; }
    .crazy-preview-head {
      display: grid;
      grid-template-columns: 120px 1fr auto;
      gap: 18px;
      align-items: center;
      padding: 18px 20px;
      border-bottom: 1px solid var(--border);
      background: var(--wash);
    }
    .crazy-preview-cover {
      width: 120px; height: 120px; border-radius: 12px; overflow: hidden;
      border: 1px solid var(--border); background: #0a1a2a;
    }
    .crazy-preview-cover img {
      width: 100%; height: 100%; object-fit: cover; display: block;
      transition: opacity .2s ease;
    }
    .crazy-preview-cover img.is-swapping { opacity: 0.35; }
    .crazy-preview-head h3 { font-size: 18px; letter-spacing: -0.02em; margin-bottom: 4px; }
    .crazy-preview-meta { font-size: 13px; color: var(--muted); }
    .crazy-preview-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
    .crazy-preview .table-wrap { border: 0; border-radius: 0; box-shadow: none; }

    .genre-grid {
      display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
    }
    .genre-card {
      position: relative; border-radius: var(--radius-sm); overflow: hidden;
      aspect-ratio: 1 / 1; border: 1px solid var(--border);
      box-shadow: var(--shadow);
    }
    .genre-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .genre-card:hover { outline: 2px solid var(--orange); outline-offset: 2px; }

    .toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
    .select {
      padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
      font: inherit; font-size: 13px; background: var(--white);
    }
    .selection-status { font-size: 13px; color: var(--muted); margin-left: auto; }
    .table-wrap {
      background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto;
    }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    th {
      text-align: left; font-size: 11px; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.04em;
      padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--wash);
    }
    td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
    tr:last-child td { border-bottom: 0; }
    .title { font-weight: 600; }
    .bpm { color: var(--orange-deep); font-weight: 600; }

    /* Track list (table replacement) */
    .track-list {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }
    .track-list-head,
    .track-row {
      display: grid;
      grid-template-columns: 40px minmax(0, 1.6fr) 0.9fr 70px 56px 0.9fr auto auto;
      gap: 10px;
      align-items: center;
      padding: 12px 14px;
    }
    .track-list-head {
      font-size: 11px; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.04em;
      background: var(--wash);
      border-bottom: 1px solid var(--border);
    }
    .track-row {
      border-bottom: 1px solid var(--border);
      font-size: 13px;
    }
    .track-row:last-child { border-bottom: 0; }
    .track-row:hover { background: #fafcfd; }
    .track-row .title { font-size: 14px; }
    .track-meta { display: none; color: var(--muted); font-size: 12px; }
    .track-actions { display: contents; }
    .track-actions .btn { white-space: nowrap; }
    .track-check-cell { display: flex; align-items: center; justify-content: center; }
    .track-check-cell input { width: 16px; height: 16px; }
    .crazy-preview .track-list { border: 0; border-radius: 0; }
    .crazy-preview .track-list-head,
    .crazy-preview .track-row {
      grid-template-columns: 36px minmax(0, 1.6fr) 0.9fr 70px 56px auto;
    }

    .playlist-hero {
      display: grid;
      grid-template-columns: 200px 1fr;
      gap: 28px;
      align-items: center;
      padding: 36px 0 8px;
    }
    .playlist-hero-cover {
      width: 200px; height: 200px; border-radius: 14px; overflow: hidden;
      border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--wash);
    }
    .playlist-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .playlist-hero h1 { font-size: clamp(26px, 3.5vw, 34px); letter-spacing: -0.03em; margin: 8px 0 10px; }
    .playlist-hero .desc { color: var(--muted); font-size: 15px; max-width: 36em; margin-bottom: 14px; }
    .playlist-hero .meta { margin-bottom: 16px; }
    .back-link {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px;
    }
    .back-link:hover { color: var(--orange); }
    .playlist-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }

    .site-footer {
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      background: #000;
      padding: 24px 0; margin-top: 8px; font-size: 13px; color: rgba(255, 255, 255, 0.65);
      width: 100%;
    }
    .site-footer .inner {
      display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center;
      width: 100%;
      max-width: 1120px;
      margin-inline: auto;
      padding-inline: 24px;
    }
    .site-footer .logo { height: 36px; }

    /* —— Tablet (iPad-sized: keep 2-col hero so the page fills width) —— */
    @media (max-width: 1100px) {
      .intensity-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
      .genre-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
      .hero { padding: 40px 0; }
      .hero-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
      .hero-visual { max-height: none; aspect-ratio: 4 / 3; }
      section { padding: 40px 0; }
      .nav { gap: 14px; }
      .nav a { font-size: 13px; }
    }

    /* —— Narrow tablet / large phone: stack hero, hamburger —— */
    @media (max-width: 860px) {
      .site-header .inner {
        grid-template-columns: 1fr auto;
      }
      .nav { display: none; }
      .menu-toggle { display: inline-flex; }
      .brand-cluster { gap: 12px; }
      .logo { height: 40px; }
      .btn { min-height: 44px; }
      .btn-sm { min-height: 44px; padding: 10px 14px; font-size: 13px; }
      .toolbar .select { flex: 1 1 140px; min-height: 44px; }
      .selection-status { margin-left: 0; width: 100%; }
      .hero-grid { grid-template-columns: 1fr; gap: 20px; }
      .hero-visual { max-height: 320px; }
      .crazy { grid-template-columns: 1fr; padding: 24px; }
      .crazy-actions { justify-content: flex-start; }
      .crazy-preview-head { grid-template-columns: 100px 1fr; }
      .crazy-preview-cover { width: 100px; height: 100px; }
      .crazy-preview-actions { grid-column: 1 / -1; justify-content: flex-start; }
      .wrap,
      .site-header .inner,
      .site-footer .inner { padding-inline: 20px; }
    }

    /* —— Mobile (~390) —— */
    @media (max-width: 640px) {
      .wrap,
      .site-header .inner,
      .site-footer .inner { padding-inline: 16px; }
      .site-header .inner { padding-block: 8px; }
      .header-actions .btn { padding: 10px 14px; font-size: 13px; }
      .intensity-grid { grid-template-columns: 1fr; gap: 12px; }
      .genre-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
      .hero { padding: 28px 0 32px; }
      .hero h1 { font-size: 28px; }
      .hero p { font-size: 15px; margin-bottom: 18px; }
      .hero-ctas { flex-direction: column; }
      .hero-ctas .btn { width: 100%; }
      .hero-visual { max-height: 220px; aspect-ratio: 16 / 10; }
      section { padding: 32px 0; }
      .section-head h2 { font-size: 22px; }
      .crazy { padding: 20px; border-radius: 14px; }
      .crazy h2 { font-size: 20px; }
      .crazy-actions .btn { width: 100%; }
      .crazy-preview-head {
        grid-template-columns: 88px 1fr;
        padding: 14px;
        gap: 12px;
      }
      .crazy-preview-cover { width: 88px; height: 88px; }
      .crazy-preview-actions { width: 100%; }
      .crazy-preview-actions .btn { flex: 1; }
      .card-actions { flex-direction: column; }
      .site-footer .inner { flex-direction: column; align-items: flex-start; gap: 10px; }
      .site-footer { padding: 20px 0; }

      .track-list { background: transparent; border: 0; overflow: visible; }
      .track-list-head { display: none; }
      .track-row {
        display: grid;
        grid-template-columns: 28px 1fr;
        grid-template-areas:
          "check main"
          "check actions";
        gap: 8px 12px;
        padding: 14px;
        margin-bottom: 10px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
      }
      .track-row:last-child { margin-bottom: 0; }
      .track-check-cell { grid-area: check; align-items: flex-start; padding-top: 4px; }
      .track-main { grid-area: main; min-width: 0; }
      .track-row .title { font-size: 15px; margin-bottom: 4px; }
      .track-meta { display: block; }
      .track-row .col-genre,
      .track-row .col-duration,
      .track-row .col-bpm,
      .track-row .col-intensity { display: none; }
      .track-actions {
        grid-area: actions;
        display: flex; gap: 8px; width: 100%;
      }
      .track-actions .btn { flex: 1; }
      .crazy-preview .track-list-head,
      .crazy-preview .track-row {
        grid-template-columns: 28px 1fr;
      }
      .playlist-hero {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-top: 24px;
      }
      .playlist-hero-cover { width: 140px; height: 140px; }
      .playlist-hero-actions .btn { flex: 1; min-width: 140px; }
    }
