# #031 — Pastel System 7 Radio OS

> Sun-bleached pastel Classic Mac desktop windows, pinstriped titlebars, animated cassette reels, and nostalgic radio channels.

## Metadata

- **Index**: #031
- **Slug**: `pastel-system7-radio`
- **Kind**: `style`
- **Family**: Retro OS
- **Theme**: `light`
- **Mobile Strength**: `high`
- **Tags**: `retro-os`, `system-7`, `pastel-desktop`, `internet-radio`, `cassette-ui`
- **Best For**: Internet radio & music players, Creative lifestyle microsites, Nostalgic brand campaigns, Indie audio collectives
- **Real-World Inspiration**: [Nightwave Plaza](https://plaza.one/)
- **Detail Page**: https://templates.michaelpitts.net/t/pastel-system7-radio
- **Live Demo**: https://templates.michaelpitts.net/demos/pastel-system7-radio.html
- **JSON API**: https://templates.michaelpitts.net/api/templates/pastel-system7-radio

## Why This Aesthetic Is Unique

Reimagines vintage System 7 window chrome through a warm peach-cream and blush-pink summer radio desktop with tactile draggable/focusable windows.

## Color Palette

| Role | Name | Hex |
|------|------|-----|
| `canvas` | Sunlit Peach Desktop | `#F8D7C9` |
| `surface` | Warm Cream Chrome | `#FFF9F0` |
| `ink` | Espresso Pixel Ink | `#2B2220` |
| `accent` | Coral Cassette Red | `#E05A47` |
| `muted` | Vintage Taupe | `#8B746C` |

## Typography

- **Display**: `VT323`
- **Body**: `IBM Plex Mono`
- **Mono**: `IBM Plex Mono`
- **Scale Notes**: Crisp bitmap-inspired titlebars and LCD track tickers paired with readable monospace channel lists and status readouts.
- **Google Fonts**: https://fonts.googleapis.com/css2?family=VT323&family=IBM+Plex+Mono:wght@400;600&display=swap
  ```html
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=VT323&family=IBM+Plex+Mono:wght@400;600&display=swap">
  ```

## Layout Architecture

Top Classic Mac menu bar above a warm pastel desktop hosting multi-window chrome (Radio Deck, Channel Switcher, Wallpaper Switcher) that stacks cleanly on mobile.

## Interaction & Micro-Motion Rules

Interactive channel switcher (Poolside, Indie Summer, Tokyo Disco, Hangover Club), animated spinning SVG cassette reels, working play/pause LCD ticker, draggable desktop windows, and wallpaper toggle.

## Mobile & Responsive Rules

Automatically docks windows into a zero-overflow vertical stack on 390px screens with >=44px channel and transport buttons.

## Agent Guardrails

### DO
- Style window titlebars with classic horizontal pinstripes and crisp 2px solid borders + hard drop shadows.
- Pair warm sun-bleached peach/cream chrome with high-contrast dark espresso ink.
- Keep retro window controls functional (focus, channel switch, wallpaper swap).

### DON'T
- Never allow draggable desktop windows to overflow or become unreachable on 390px mobile screens.
- Avoid harsh fluorescent neon colors that break the sun-faded analog warmth.

## Complete Standalone Starter Code

File: `demos/pastel-system7-radio.html`

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Sunbeam FM — Pastel System 7 Radio OS</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Silkscreen:wght@400;700&family=VT323&display=swap" rel="stylesheet">
  <style>
    :root {
      --cream: #fff6ee;
      --peach: #f7c7b0;
      --blush: #f2a999;
      --coral: #e47c67;
      --ink: #2b211e;
      --ink-soft: #634d46;
      --window-bg: #fff5ec;
      --window-chrome: #f9e3d4;
      --lcd-bg: #262922;
      --lcd-glow: #d8f29e;
      --lcd-amber: #ffcf87;
      --accent: #e47c67;
      --accent-soft: #fbd8c9;
      --shadow: 4px 4px 0 rgba(43, 33, 30, 0.22);
      --pixel: 'Silkscreen', 'Courier New', monospace;
      --lcd: 'VT323', 'Courier New', monospace;
      --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    body[data-accent="flamingo"] {
      --accent: #df6d8a;
      --accent-soft: #fad3de;
    }
    body[data-accent="seafoam"] {
      --accent: #4c9a8d;
      --accent-soft: #cdeae3;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      min-height: 100%;
      width: 100%;
      overflow-x: hidden;
      font-family: var(--sans);
      color: var(--ink);
      background-color: #f6d5c4;
      -webkit-font-smoothing: antialiased;
    }

    /* Wallpapers */
    body[data-wallpaper="peach-grid"] {
      background-color: #f7d5c3;
      background-image:
        linear-gradient(rgba(43, 33, 30, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 33, 30, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 80% 18%, rgba(255, 244, 214, 0.7), transparent 45%);
      background-size: 28px 28px, 28px 28px, 100% 100%;
    }
    body[data-wallpaper="malibu-sunset"] {
      background: linear-gradient(165deg, #fbd7be 0%, #f5b3a6 48%, #d7a1b8 100%);
      background-attachment: fixed;
    }
    body[data-wallpaper="miami-stripes"] {
      background-color: #fae4d7;
      background-image: repeating-linear-gradient(
        -45deg,
        #fae4d7,
        #fae4d7 18px,
        #f4cbb9 18px,
        #f4cbb9 36px
      );
    }
    body[data-wallpaper="cream-linen"] {
      background-color: #f4eadf;
      background-image: radial-gradient(rgba(43, 33, 30, 0.09) 1px, transparent 0);
      background-size: 14px 14px;
    }

    /* Top System 7 Menu Bar */
    .menubar {
      position: sticky;
      top: 0;
      z-index: 500;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-height: 44px;
      padding: 4px 12px;
      background: var(--cream);
      border-bottom: 2px solid var(--ink);
      font-family: var(--pixel);
      font-size: 12px;
      user-select: none;
    }

    .menubar-left, .menubar-right {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .brand-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      min-height: 36px;
      background: var(--accent-soft);
      border: 1.5px solid var(--ink);
      border-radius: 3px;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .menu-btn {
      appearance: none;
      background: transparent;
      border: 1.5px solid transparent;
      color: var(--ink);
      font-family: var(--pixel);
      font-size: 11px;
      padding: 6px 10px;
      min-height: 36px;
      cursor: pointer;
      border-radius: 3px;
      transition: background 0.12s ease;
    }

    .menu-btn:hover, .menu-btn:focus-visible {
      background: var(--ink);
      color: var(--cream);
      outline: none;
    }

    .menu-btn.is-active {
      background: var(--accent);
      color: #fff;
      border-color: var(--ink);
    }

    .clock-readout {
      font-family: var(--lcd);
      font-size: 20px;
      padding: 2px 8px;
      border: 1.5px solid var(--ink);
      background: var(--window-chrome);
      border-radius: 2px;
      line-height: 1.2;
    }

    /* Mobile Window Switcher Tabs */
    .mobile-tabs {
      display: flex;
      gap: 6px;
      padding: 10px 12px 0;
      width: 100%;
    }

    .mobile-tab {
      flex: 1;
      min-height: 44px;
      padding: 8px 6px;
      border: 2px solid var(--ink);
      background: var(--window-chrome);
      color: var(--ink);
      font-family: var(--pixel);
      font-size: 11px;
      cursor: pointer;
      box-shadow: 2px 2px 0 rgba(43, 33, 30, 0.2);
    }

    .mobile-tab.active {
      background: var(--accent);
      color: #fff;
    }

    /* Desktop Stage */
    .desktop {
      position: relative;
      width: 100%;
      min-height: calc(100vh - 46px);
      padding: 12px;
    }

    /* Desktop Icons (visible on larger viewports) */
    .desktop-icons {
      display: none;
    }

    /* System 7 Window */
    .os-window {
      width: 100%;
      background: var(--window-bg);
      border: 2px solid var(--ink);
      box-shadow: var(--shadow);
      margin-bottom: 14px;
      display: none;
      flex-direction: column;
      overflow: hidden;
    }

    .os-window.mobile-visible {
      display: flex;
    }

    .os-window.is-focused {
      box-shadow: 6px 6px 0 rgba(43, 33, 30, 0.28);
    }

    .titlebar {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      padding: 4px 8px;
      background: var(--window-chrome);
      border-bottom: 2px solid var(--ink);
      user-select: none;
      cursor: default;
    }

    .titlebar-stripes {
      flex: 1;
      height: 14px;
      background-image: repeating-linear-gradient(
        to bottom,
        var(--ink) 0px,
        var(--ink) 1.5px,
        transparent 1.5px,
        transparent 3.5px
      );
      opacity: 0.75;
    }

    .os-window:not(.is-focused) .titlebar-stripes {
      opacity: 0.22;
    }

    .titlebar-label {
      font-family: var(--pixel);
      font-size: 11px;
      padding: 2px 8px;
      background: var(--window-chrome);
      white-space: nowrap;
      letter-spacing: 0.02em;
    }

    .win-close {
      width: 24px;
      height: 24px;
      min-width: 24px;
      border: 2px solid var(--ink);
      background: var(--cream);
      cursor: pointer;
      display: grid;
      place-items: center;
      font-family: var(--pixel);
      font-size: 11px;
      line-height: 1;
      color: var(--ink);
    }

    .win-close:hover {
      background: var(--accent);
      color: #fff;
    }

    .win-body {
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    /* Cassette Deck */
    .cassette-stage {
      background: linear-gradient(180deg, #fae8dc 0%, #f3d6c4 100%);
      border: 2px solid var(--ink);
      padding: 12px;
      position: relative;
    }

    .cassette-svg {
      width: 100%;
      max-width: 340px;
      height: auto;
      display: block;
      margin: 0 auto;
    }

    .reel-spin {
      transform-box: fill-box;
      transform-origin: center;
      animation: spinReel 3.4s linear infinite;
      animation-play-state: running;
    }

    .reel-spin.paused {
      animation-play-state: paused;
    }

    @keyframes spinReel {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    /* Retro LCD Display */
    .lcd-panel {
      background: var(--lcd-bg);
      border: 2px solid var(--ink);
      box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
      padding: 12px;
      color: var(--lcd-glow);
      font-family: var(--lcd);
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .lcd-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      font-size: 18px;
      color: var(--lcd-amber);
    }

    .lcd-badge {
      padding: 1px 6px;
      border: 1px solid var(--lcd-amber);
      font-size: 15px;
      letter-spacing: 0.06em;
    }

    .lcd-track {
      font-size: 26px;
      line-height: 1.05;
      letter-spacing: 0.02em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .lcd-artist {
      font-size: 20px;
      color: #a9c783;
    }

    .lcd-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 4px;
    }

    .eq-bars {
      display: flex;
      align-items: flex-end;
      gap: 3px;
      height: 18px;
    }

    .eq-bar {
      width: 5px;
      background: var(--lcd-glow);
      height: 6px;
      transition: height 0.16s ease;
    }

    .lcd-time {
      font-size: 20px;
      letter-spacing: 0.08em;
    }

    /* Transport & Volume */
    .transport-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }

    .retro-btn {
      min-height: 44px;
      padding: 8px 10px;
      border: 2px solid var(--ink);
      background: var(--cream);
      color: var(--ink);
      font-family: var(--pixel);
      font-size: 11px;
      cursor: pointer;
      box-shadow: 2px 2px 0 var(--ink);
      transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
    }

    .retro-btn:active {
      transform: translate(2px, 2px);
      box-shadow: 0 0 0 var(--ink);
    }

    .retro-btn.primary {
      background: var(--accent);
      color: #fff;
    }

    .volume-row {
      display: flex;
      align-items: center;
      gap: 10px;
      font-family: var(--pixel);
      font-size: 11px;
    }

    .volume-row input[type="range"] {
      flex: 1;
      accent-color: var(--accent);
      min-height: 36px;
      cursor: pointer;
    }

    /* Channel Switcher */
    .section-kicker {
      font-family: var(--pixel);
      font-size: 10px;
      text-transform: uppercase;
      color: var(--ink-soft);
      letter-spacing: 0.06em;
    }

    .channel-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }

    .channel-btn {
      min-height: 48px;
      padding: 8px 10px;
      text-align: left;
      border: 2px solid var(--ink);
      background: var(--cream);
      color: var(--ink);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 2px;
      box-shadow: 2px 2px 0 rgba(43, 33, 30, 0.25);
    }

    .channel-btn strong {
      font-family: var(--pixel);
      font-size: 11px;
    }

    .channel-btn span {
      font-size: 11px;
      color: var(--ink-soft);
    }

    .channel-btn.active {
      background: var(--accent-soft);
      border-color: var(--ink);
      box-shadow: inset 2px 2px 0 rgba(43, 33, 30, 0.15);
    }

    /* Guide Window */
    .vibe-card {
      background: var(--accent-soft);
      border: 2px solid var(--ink);
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .vibe-card h2 {
      font-family: var(--pixel);
      font-size: 13px;
    }

    .vibe-card p {
      font-size: 13px;
      line-height: 1.45;
      color: var(--ink);
    }

    .tag-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 2px;
    }

    .tag-pill {
      font-family: var(--pixel);
      font-size: 10px;
      padding: 3px 7px;
      background: var(--cream);
      border: 1.5px solid var(--ink);
    }

    .tracklist {
      list-style: none;
      border: 2px solid var(--ink);
      background: var(--cream);
    }

    .tracklist li + li {
      border-top: 1.5px solid rgba(43, 33, 30, 0.22);
    }

    .track-item {
      width: 100%;
      min-height: 46px;
      padding: 8px 10px;
      background: transparent;
      border: 0;
      text-align: left;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      color: var(--ink);
      font-family: var(--sans);
    }

    .track-item:hover {
      background: var(--window-chrome);
    }

    .track-item.playing {
      background: var(--accent);
      color: #fff;
    }

    .track-item small {
      display: block;
      font-size: 12px;
      opacity: 0.8;
    }

    .track-dur {
      font-family: var(--lcd);
      font-size: 18px;
      flex-shrink: 0;
    }

    /* Prefs Window */
    .swatch-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px;
    }

    .swatch-btn {
      min-height: 46px;
      padding: 8px;
      border: 2px solid var(--ink);
      background: var(--cream);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: var(--pixel);
      font-size: 10px;
      color: var(--ink);
    }

    .swatch-btn.active {
      background: var(--ink);
      color: var(--cream);
    }

    .swatch-chip {
      width: 20px;
      height: 20px;
      border: 1.5px solid var(--ink);
      flex-shrink: 0;
    }

    .spf-note {
      background: #fff1c9;
      border: 2px dashed var(--ink);
      padding: 10px 12px;
      font-size: 12px;
      line-height: 1.45;
    }

    .toast {
      position: fixed;
      bottom: 14px;
      left: 50%;
      transform: translateX(-50%) translateY(90px);
      background: var(--ink);
      color: var(--cream);
      font-family: var(--pixel);
      font-size: 11px;
      padding: 10px 14px;
      border: 2px solid var(--cream);
      box-shadow: var(--shadow);
      z-index: 900;
      transition: transform 0.22s ease;
      max-width: calc(100vw - 24px);
      text-align: center;
    }

    .toast.show {
      transform: translateX(-50%) translateY(0);
    }

    /* Desktop OS Floating Layout */
    @media (min-width: 880px) {
      .mobile-tabs {
        display: none;
      }

      .desktop {
        min-height: calc(100vh - 46px);
        padding: 20px;
        overflow: hidden;
      }

      .desktop-icons {
        position: absolute;
        top: 20px;
        right: 22px;
        display: flex;
        flex-direction: column;
        gap: 14px;
        z-index: 5;
      }

      .desk-icon {
        width: 86px;
        padding: 8px 6px;
        background: transparent;
        border: 1.5px solid transparent;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        color: var(--ink);
      }

      .desk-icon:hover, .desk-icon:focus-visible {
        background: rgba(255, 246, 238, 0.72);
        border-color: var(--ink);
        outline: none;
      }

      .desk-icon span {
        font-family: var(--pixel);
        font-size: 10px;
        background: var(--cream);
        padding: 2px 5px;
        border: 1px solid var(--ink);
        text-align: center;
      }

      .os-window {
        position: absolute;
        display: flex;
        margin-bottom: 0;
      }

      .os-window.is-closed {
        display: none;
      }

      .titlebar {
        cursor: grab;
      }

      .titlebar:active {
        cursor: grabbing;
      }

      #win-player {
        top: 22px;
        left: 26px;
        width: 430px;
      }

      #win-guide {
        top: 46px;
        left: 484px;
        width: 360px;
      }

      #win-prefs {
        top: 392px;
        left: 498px;
        width: 346px;
      }
    }
  </style>
</head>
<body data-wallpaper="peach-grid" data-accent="apricot">

  <header class="menubar" role="banner">
    <div class="menubar-left">
      <div class="brand-pill" aria-label="Sunbeam OS 7.5">
        <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
          <circle cx="8" cy="8" r="5" fill="#e47c67" stroke="#2b211e" stroke-width="1.5"/>
          <path d="M8 1v2M8 13v2M1 8h2M13 8h2M3 3l1.5 1.5M11.5 11.5L13 13M13 3l-1.5 1.5M4.5 11.5L3 13" stroke="#2b211e" stroke-width="1.3"/>
        </svg>
        <span>Sunbeam OS</span>
      </div>
      <button class="menu-btn" data-open-win="win-player">Radio</button>
      <button class="menu-btn" data-open-win="win-guide">Liner Notes</button>
      <button class="menu-btn" data-open-win="win-prefs">Wallpapers</button>
    </div>
    <div class="menubar-right">
      <button class="menu-btn" id="quick-wallpaper-btn" title="Cycle desktop wallpaper">Theme: Peach</button>
      <div class="clock-readout" id="menubar-clock">03:45 PM</div>
    </div>
  </header>

  <nav class="mobile-tabs" aria-label="Window switcher">
    <button class="mobile-tab active" data-tab="win-player">FM Deck</button>
    <button class="mobile-tab" data-tab="win-guide">Tracks</button>
    <button class="mobile-tab" data-tab="win-prefs">Themes</button>
  </nav>

  <main class="desktop" id="desktop">
    <aside class="desktop-icons" aria-label="Desktop shortcuts">
      <button class="desk-icon" data-open-win="win-player">
        <svg width="38" height="38" viewBox="0 0 38 38" aria-hidden="true">
          <rect x="3" y="8" width="32" height="22" rx="3" fill="#fff6ee" stroke="#2b211e" stroke-width="2"/>
          <rect x="7" y="12" width="24" height="10" fill="#fbd8c9" stroke="#2b211e" stroke-width="1.5"/>
          <circle cx="13" cy="17" r="3" fill="#2b211e"/>
          <circle cx="25" cy="17" r="3" fill="#2b211e"/>
          <rect x="11" y="25" width="16" height="3" fill="#2b211e"/>
        </svg>
        <span>Sunbeam FM</span>
      </button>
      <button class="desk-icon" data-open-win="win-guide">
        <svg width="38" height="38" viewBox="0 0 38 38" aria-hidden="true">
          <path d="M7 5h18l6 6v22H7z" fill="#fff6ee" stroke="#2b211e" stroke-width="2"/>
          <path d="M25 5v6h6" fill="#f7c7b0" stroke="#2b211e" stroke-width="2"/>
          <path d="M12 16h14M12 21h14M12 26h9" stroke="#2b211e" stroke-width="2"/>
        </svg>
        <span>Guide.txt</span>
      </button>
      <button class="desk-icon" data-open-win="win-prefs">
        <svg width="38" height="38" viewBox="0 0 38 38" aria-hidden="true">
          <rect x="4" y="6" width="30" height="26" fill="#fff6ee" stroke="#2b211e" stroke-width="2"/>
          <rect x="8" y="10" width="10" height="10" fill="#e47c67" stroke="#2b211e" stroke-width="1.5"/>
          <rect x="20" y="10" width="10" height="10" fill="#f7c7b0" stroke="#2b211e" stroke-width="1.5"/>
          <rect x="8" y="22" width="22" height="6" fill="#cdeae3" stroke="#2b211e" stroke-width="1.5"/>
        </svg>
        <span>Backdrop</span>
      </button>
    </aside>

    <!-- WINDOW 1: RADIO PLAYER -->
    <section class="os-window is-focused mobile-visible" id="win-player" style="z-index: 20;" aria-label="Sunbeam FM Deck">
      <div class="titlebar" data-drag-handle>
        <button class="win-close" data-close-win="win-player" aria-label="Close Radio window">&times;</button>
        <div class="titlebar-stripes"></div>
        <span class="titlebar-label">Sunbeam FM — Stereo Deck</span>
        <div class="titlebar-stripes"></div>
      </div>
      <div class="win-body">
        <div class="cassette-stage">
          <svg class="cassette-svg" viewBox="0 0 320 176" role="img" aria-label="Animated retro cassette tape">
            <!-- Outer shell -->
            <rect x="8" y="8" width="304" height="160" rx="12" fill="#fff6ee" stroke="#2b211e" stroke-width="3"/>
            <!-- Corner screws -->
            <circle cx="22" cy="22" r="4" fill="#e8c8b6" stroke="#2b211e" stroke-width="1.5"/>
            <circle cx="298" cy="22" r="4" fill="#e8c8b6" stroke="#2b211e" stroke-width="1.5"/>
            <circle cx="22" cy="154" r="4" fill="#e8c8b6" stroke="#2b211e" stroke-width="1.5"/>
            <circle cx="298" cy="154" r="4" fill="#e8c8b6" stroke="#2b211e" stroke-width="1.5"/>
            <!-- Label sticker -->
            <rect x="26" y="24" width="268" height="96" rx="5" fill="#fbd8c9" stroke="#2b211e" stroke-width="2"/>
            <rect x="26" y="24" width="268" height="22" rx="4" fill="#e47c67" stroke="#2b211e" stroke-width="2" id="tape-stripe"/>
            <text x="40" y="39" fill="#fff6ee" font-family="Silkscreen, monospace" font-size="10" id="tape-channel-label">SIDE A // POOLSIDE</text>
            <text x="280" y="39" text-anchor="end" fill="#fff6ee" font-family="Silkscreen, monospace" font-size="10">C-90</text>
            <!-- Center tape window -->
            <rect x="70" y="58" width="180" height="48" rx="8" fill="#2b211e"/>
            <rect x="118" y="65" width="84" height="34" rx="3" fill="#463530" stroke="#7c5e54" stroke-width="1.5"/>
            <!-- Left reel -->
            <g class="reel-spin" id="reel-left">
              <circle cx="96" cy="82" r="19" fill="#fff6ee" stroke="#2b211e" stroke-width="2"/>
              <circle cx="96" cy="82" r="7" fill="#2b211e"/>
              <path d="M96 64v8M96 92v8M78 82h8M106 82h8" stroke="#2b211e" stroke-width="3"/>
            </g>
            <!-- Right reel -->
            <g class="reel-spin" id="reel-right">
              <circle cx="224" cy="82" r="19" fill="#fff6ee" stroke="#2b211e" stroke-width="2"/>
              <circle cx="224" cy="82" r="7" fill="#2b211e"/>
              <path d="M224 64v8M224 92v8M206 82h8M234 82h8" stroke="#2b211e" stroke-width="3"/>
            </g>
            <!-- Bottom trapezoid -->
            <path d="M68 168l14-34h156l14 34z" fill="#f3d6c4" stroke="#2b211e" stroke-width="2.5"/>
            <circle cx="110" cy="152" r="5" fill="#2b211e"/>
            <circle cx="210" cy="152" r="5" fill="#2b211e"/>
            <rect x="144" y="147" width="32" height="10" rx="2" fill="#2b211e"/>
          </svg>
        </div>

        <div class="lcd-panel" aria-live="polite">
          <div class="lcd-top">
            <span class="lcd-badge" id="lcd-channel">CH 01 // POOLSIDE</span>
            <span id="lcd-state">ON AIR</span>
          </div>
          <div class="lcd-track" id="lcd-track">Cote d'Azur Daydream</div>
          <div class="lcd-artist" id="lcd-artist">Paloma Cabana Club</div>
          <div class="lcd-bottom">
            <div class="eq-bars" id="eq-bars" aria-hidden="true">
              <div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div>
              <div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div>
              <div class="eq-bar"></div><div class="eq-bar"></div><div class="eq-bar"></div>
            </div>
            <div class="lcd-time" id="lcd-time">01:14 / 03:42</div>
          </div>
        </div>

        <div class="transport-row">
          <button class="retro-btn" id="btn-prev" aria-label="Previous track">&laquo; Prev</button>
          <button class="retro-btn primary" id="btn-play" aria-label="Play or pause">Pause</button>
          <button class="retro-btn" id="btn-next" aria-label="Next track">Next &raquo;</button>
        </div>

        <label class="volume-row">
          <span>VOL</span>
          <input type="range" id="vol-slider" min="0" max="100" value="78" aria-label="Volume">
          <span id="vol-label">78%</span>
        </label>

        <div>
          <p class="section-kicker" style="margin-bottom: 8px;">Select Frequency</p>
          <div class="channel-grid" id="channel-grid">
            <button class="channel-btn active" data-channel="poolside">
              <strong>Poolside</strong>
              <span>Nu-disco &amp; terrace funk</span>
            </button>
            <button class="channel-btn" data-channel="indie">
              <strong>Indie Summer</strong>
              <span>Sun-bleached guitars</span>
            </button>
            <button class="channel-btn" data-channel="tokyo">
              <strong>Tokyo Disco</strong>
              <span>1984 city pop grooves</span>
            </button>
            <button class="channel-btn" data-channel="hangover">
              <strong>Hangover Club</strong>
              <span>Slow Balearic drift</span>
            </button>
          </div>
        </div>
      </div>
    </section>

    <!-- WINDOW 2: CHANNEL GUIDE & TRACKLIST -->
    <section class="os-window" id="win-guide" style="z-index: 15;" aria-label="Channel Liner Notes">
      <div class="titlebar" data-drag-handle>
        <button class="win-close" data-close-win="win-guide" aria-label="Close Liner Notes">&times;</button>
        <div class="titlebar-stripes"></div>
        <span class="titlebar-label">Liner Notes &amp; Queue</span>
        <div class="titlebar-stripes"></div>
      </div>
      <div class="win-body">
        <div class="vibe-card">
          <h2 id="guide-title">Poolside — 104.2 MHz</h2>
          <p id="guide-desc">Crisp poolside boogie, warm Rhodes chords, and effortless afternoon basslines broadcast from a pastel cabana.</p>
          <div class="tag-row" id="guide-tags"></div>
        </div>

        <div>
          <p class="section-kicker" style="margin-bottom: 8px;">Tape Queue (tap to cue)</p>
          <ul class="tracklist" id="tracklist"></ul>
        </div>

        <button class="retro-btn" id="btn-postcard">Send Summer Postcard to Studio</button>
      </div>
    </section>

    <!-- WINDOW 3: DESKTOP PREFERENCES -->
    <section class="os-window" id="win-prefs" style="z-index: 10;" aria-label="Desktop Preferences">
      <div class="titlebar" data-drag-handle>
        <button class="win-close" data-close-win="win-prefs" aria-label="Close Preferences">&times;</button>
        <div class="titlebar-stripes"></div>
        <span class="titlebar-label">Control Panel — Backdrop</span>
        <div class="titlebar-stripes"></div>
      </div>
      <div class="win-body">
        <div>
          <p class="section-kicker" style="margin-bottom: 8px;">Desktop Pattern</p>
          <div class="swatch-grid" id="wallpaper-grid">
            <button class="swatch-btn active" data-wp="peach-grid">
              <span class="swatch-chip" style="background:#f7d5c3;"></span>Peach Grid
            </button>
            <button class="swatch-btn" data-wp="malibu-sunset">
              <span class="swatch-chip" style="background:linear-gradient(135deg,#fbd7be,#d7a1b8);"></span>Malibu
            </button>
            <button class="swatch-btn" data-wp="miami-stripes">
              <span class="swatch-chip" style="background:repeating-linear-gradient(-45deg,#fae4d7,#fae4d7 4px,#f4cbb9 4px,#f4cbb9 8px);"></span>Cabana
            </button>
            <button class="swatch-btn" data-wp="cream-linen">
              <span class="swatch-chip" style="background:#f4eadf;"></span>Linen
            </button>
          </div>
        </div>

        <div>
          <p class="section-kicker" style="margin-bottom: 8px;">Trim Accent</p>
          <div class="swatch-grid" id="accent-grid" style="grid-template-columns: repeat(3, 1fr);">
            <button class="swatch-btn active" data-acc="apricot">
              <span class="swatch-chip" style="background:#e47c67;"></span>Apricot
            </button>
            <button class="swatch-btn" data-acc="flamingo">
              <span class="swatch-chip" style="background:#df6d8a;"></span>Rose
            </button>
            <button class="swatch-btn" data-acc="seafoam">
              <span class="swatch-chip" style="background:#4c9a8d;"></span>Mint
            </button>
          </div>
        </div>

        <div class="spf-note">
          <strong>System 7.5 Advisory:</strong> Reapply SPF 30 before switching to Tokyo Disco. Drag any window titlebar on desktop to rearrange your summer workspace.
        </div>
      </div>
    </section>
  </main>

  <div class="toast" id="toast" role="status" aria-live="polite"></div>

  <script>
    const CHANNELS = {
      poolside: {
        code: 'CH 01 // POOLSIDE',
        title: 'Poolside — 104.2 MHz',
        tape: 'SIDE A // POOLSIDE',
        desc: 'Crisp poolside boogie, warm Rhodes chords, and effortless afternoon basslines broadcast from a pastel cabana.',
        tags: ['112 BPM', 'Nu-Disco', 'SPF 50'],
        tracks: [
          { title: "Cote d'Azur Daydream", artist: 'Paloma Cabana Club', dur: 222 },
          { title: 'Apricot Spritz at 4PM', artist: 'Hotel Riviera', dur: 198 },
          { title: 'Mirage on Deck 7', artist: 'Solstice Stereo', dur: 245 },
          { title: 'Saltwater Cassette', artist: 'Lido Terrace', dur: 210 }
        ]
      },
      indie: {
        code: 'CH 02 // INDIE SUMMER',
        title: 'Indie Summer — 98.6 MHz',
        tape: 'SIDE A // INDIE SUMMER',
        desc: 'Chorus-drenched surf guitars, dreamy tape reverb, and convertible highway anthems for golden hour.',
        tags: ['124 BPM', 'Dream Pop', 'Coastline'],
        tracks: [
          { title: 'Pacific Highway Polaroid', artist: 'The Sunbleached', dur: 204 },
          { title: 'Orange Grove Static', artist: 'Velvet Boardwalk', dur: 189 },
          { title: 'June Forever (Tape Edit)', artist: 'Marigold Motel', dur: 231 },
          { title: 'Last Ferry to Catalina', artist: 'Coastal Youth', dur: 218 }
        ]
      },
      tokyo: {
        code: 'CH 03 // TOKYO DISCO',
        title: 'Tokyo Disco — 84.9 MHz',
        tape: 'SIDE B // TOKYO DISCO',
        desc: 'Glossy 1984 city pop, slap-bass sparkle, and neon bayshore cruisers direct from Shibuya FM.',
        tags: ['118 BPM', 'City Pop', 'Hi-Fi'],
        tracks: [
          { title: 'Shonan Midnight Express', artist: 'Haruka & The Bayside', dur: 238 },
          { title: 'Neon Vending Machine', artist: 'Kuroshio Funk', dur: 214 },
          { title: 'Ginza Rooftop Breeze', artist: 'Mina Takahashi', dur: 252 },
          { title: 'Cassette Walkman 1985', artist: 'Pacific Synth Unit', dur: 196 }
        ]
      },
      hangover: {
        code: 'CH 04 // HANGOVER CLUB',
        title: 'Hangover Club — 91.3 MHz',
        tape: 'SIDE B // HANGOVER',
        desc: 'Slow Balearic synthesizers, iced espresso percussion, and horizontal recovery grooves for Sunday noon.',
        tags: ['92 BPM', 'Balearic', 'Downtempo'],
        tracks: [
          { title: 'Shaded Veranda Drift', artist: 'Ibiza Morning Post', dur: 268 },
          { title: 'Ice Cubes in Slow Motion', artist: 'Club Siesta', dur: 240 },
          { title: 'Hammock Horizon', artist: 'Saffron Tide', dur: 227 },
          { title: 'Postcard from Palma', artist: 'Linen & Sea', dur: 255 }
        ]
      }
    };

    const WALLPAPERS = [
      { id: 'peach-grid', label: 'Peach' },
      { id: 'malibu-sunset', label: 'Malibu' },
      { id: 'miami-stripes', label: 'Cabana' },
      { id: 'cream-linen', label: 'Linen' }
    ];

    const state = {
      channel: 'poolside',
      trackIdx: 0,
      playing: true,
      elapsed: 74,
      zTop: 30,
      wpIdx: 0
    };

    const els = {
      lcdChannel: document.getElementById('lcd-channel'),
      lcdState: document.getElementById('lcd-state'),
      lcdTrack: document.getElementById('lcd-track'),
      lcdArtist: document.getElementById('lcd-artist'),
      lcdTime: document.getElementById('lcd-time'),
      tapeLabel: document.getElementById('tape-channel-label'),
      btnPlay: document.getElementById('btn-play'),
      reelLeft: document.getElementById('reel-left'),
      reelRight: document.getElementById('reel-right'),
      eqBars: Array.from(document.querySelectorAll('.eq-bar')),
      guideTitle: document.getElementById('guide-title'),
      guideDesc: document.getElementById('guide-desc'),
      guideTags: document.getElementById('guide-tags'),
      tracklist: document.getElementById('tracklist'),
      volSlider: document.getElementById('vol-slider'),
      volLabel: document.getElementById('vol-label'),
      quickWp: document.getElementById('quick-wallpaper-btn'),
      toast: document.getElementById('toast')
    };

    function fmtTime(sec) {
      const m = Math.floor(sec / 60);
      const s = Math.floor(sec % 60);
      return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`;
    }

    let toastTimer;
    function showToast(msg) {
      els.toast.textContent = msg;
      els.toast.classList.add('show');
      clearTimeout(toastTimer);
      toastTimer = setTimeout(() => els.toast.classList.remove('show'), 2600);
    }

    function renderPlayer() {
      const ch = CHANNELS[state.channel];
      const tr = ch.tracks[state.trackIdx];
      els.lcdChannel.textContent = ch.code;
      els.tapeLabel.textContent = ch.tape;
      els.lcdTrack.textContent = tr.title;
      els.lcdArtist.textContent = tr.artist;
      els.lcdState.textContent = state.playing ? 'ON AIR' : 'PAUSED';
      els.btnPlay.textContent = state.playing ? 'Pause' : 'Play';
      els.lcdTime.textContent = `${fmtTime(state.elapsed)} / ${fmtTime(tr.dur)}`;

      els.reelLeft.classList.toggle('paused', !state.playing);
      els.reelRight.classList.toggle('paused', !state.playing);

      document.querySelectorAll('.channel-btn').forEach(btn => {
        btn.classList.toggle('active', btn.dataset.channel === state.channel);
      });

      els.guideTitle.textContent = ch.title;
      els.guideDesc.textContent = ch.desc;
      els.guideTags.innerHTML = ch.tags.map(t => `<span class="tag-pill">${t}</span>`).join('');

      els.tracklist.innerHTML = ch.tracks.map((item, idx) => `
        <li>
          <button class="track-item ${idx === state.trackIdx ? 'playing' : ''}" data-track-idx="${idx}">
            <span>
              <strong>${idx + 1}. ${item.title}</strong>
              <small>${item.artist}</small>
            </span>
            <span class="track-dur">${fmtTime(item.dur)}</span>
          </button>
        </li>
      `).join('');
    }

    // Channel switching
    document.getElementById('channel-grid').addEventListener('click', (e) => {
      const btn = e.target.closest('.channel-btn');
      if (!btn) return;
      state.channel = btn.dataset.channel;
      state.trackIdx = 0;
      state.elapsed = 0;
      state.playing = true;
      renderPlayer();
      showToast(`Tuned to ${CHANNELS[state.channel].title}`);
    });

    // Tracklist cueing
    els.tracklist.addEventListener('click', (e) => {
      const btn = e.target.closest('.track-item');
      if (!btn) return;
      state.trackIdx = Number(btn.dataset.trackIdx);
      state.elapsed = 0;
      state.playing = true;
      renderPlayer();
    });

    // Transport controls
    els.btnPlay.addEventListener('click', () => {
      state.playing = !state.playing;
      renderPlayer();
    });

    document.getElementById('btn-prev').addEventListener('click', () => {
      const len = CHANNELS[state.channel].tracks.length;
      state.trackIdx = (state.trackIdx - 1 + len) % len;
      state.elapsed = 0;
      renderPlayer();
    });

    document.getElementById('btn-next').addEventListener('click', () => {
      const len = CHANNELS[state.channel].tracks.length;
      state.trackIdx = (state.trackIdx + 1) % len;
      state.elapsed = 0;
      renderPlayer();
    });

    els.volSlider.addEventListener('input', () => {
      els.volLabel.textContent = `${els.volSlider.value}%`;
    });

    document.getElementById('btn-postcard').addEventListener('click', () => {
      showToast('Postcard stamped & sent to Sunbeam Studio!');
    });

    // Wallpapers & Accents
    function applyWallpaper(id) {
      document.body.dataset.wallpaper = id;
      const idx = WALLPAPERS.findIndex(w => w.id === id);
      if (idx >= 0) {
        state.wpIdx = idx;
        els.quickWp.textContent = `Theme: ${WALLPAPERS[idx].label}`;
      }
      document.querySelectorAll('#wallpaper-grid .swatch-btn').forEach(b => {
        b.classList.toggle('active', b.dataset.wp === id);
      });
    }

    document.getElementById('wallpaper-grid').addEventListener('click', (e) => {
      const btn = e.target.closest('.swatch-btn');
      if (btn) applyWallpaper(btn.dataset.wp);
    });

    els.quickWp.addEventListener('click', () => {
      state.wpIdx = (state.wpIdx + 1) % WALLPAPERS.length;
      applyWallpaper(WALLPAPERS[state.wpIdx].id);
    });

    document.getElementById('accent-grid').addEventListener('click', (e) => {
      const btn = e.target.closest('.swatch-btn');
      if (!btn) return;
      const acc = btn.dataset.acc;
      document.body.dataset.accent = acc;
      const colors = { apricot: '#e47c67', flamingo: '#df6d8a', seafoam: '#4c9a8d' };
      document.getElementById('tape-stripe').setAttribute('fill', colors[acc] || '#e47c67');
      document.querySelectorAll('#accent-grid .swatch-btn').forEach(b => {
        b.classList.toggle('active', b.dataset.acc === acc);
      });
    });

    // Window focus, open, close, and mobile tabs
    function focusWindow(winEl) {
      document.querySelectorAll('.os-window').forEach(w => w.classList.remove('is-focused'));
      winEl.classList.add('is-focused');
      winEl.classList.remove('is-closed');
      state.zTop += 1;
      winEl.style.zIndex = state.zTop;
    }

    function activateMobileTab(winId) {
      document.querySelectorAll('.os-window').forEach(w => {
        w.classList.toggle('mobile-visible', w.id === winId);
      });
      document.querySelectorAll('.mobile-tab').forEach(t => {
        t.classList.toggle('active', t.dataset.tab === winId);
      });
      const target = document.getElementById(winId);
      if (target) focusWindow(target);
    }

    document.querySelectorAll('.mobile-tab').forEach(tab => {
      tab.addEventListener('click', () => activateMobileTab(tab.dataset.tab));
    });

    document.querySelectorAll('[data-open-win]').forEach(btn => {
      btn.addEventListener('click', () => {
        const id = btn.dataset.openWin;
        activateMobileTab(id);
      });
    });

    document.querySelectorAll('[data-close-win]').forEach(btn => {
      btn.addEventListener('click', (e) => {
        e.stopPropagation();
        if (window.innerWidth < 880) {
          showToast('Use top tabs to switch windows on mobile');
          return;
        }
        document.getElementById(btn.dataset.closeWin).classList.add('is-closed');
      });
    });

    // Desktop Dragging
    document.querySelectorAll('.os-window').forEach(win => {
      win.addEventListener('pointerdown', () => focusWindow(win));
      const handle = win.querySelector('[data-drag-handle]');
      handle.addEventListener('pointerdown', (e) => {
        if (window.innerWidth < 880 || e.target.closest('button')) return;
        focusWindow(win);
        const rect = win.getBoundingClientRect();
        const deskRect = document.getElementById('desktop').getBoundingClientRect();
        const offsetX = e.clientX - rect.left;
        const offsetY = e.clientY - rect.top;
        handle.setPointerCapture(e.pointerId);

        const onMove = (ev) => {
          const maxLeft = Math.max(0, deskRect.width - rect.width);
          const left = Math.min(Math.max(0, ev.clientX - deskRect.left - offsetX), maxLeft);
          const top = Math.max(0, ev.clientY - deskRect.top - offsetY);
          win.style.left = `${left}px`;
          win.style.top = `${top}px`;
        };
        const onUp = () => {
          handle.removeEventListener('pointermove', onMove);
          handle.removeEventListener('pointerup', onUp);
        };
        handle.addEventListener('pointermove', onMove);
        handle.addEventListener('pointerup', onUp);
      });
    });

    // Live timer, EQ bars & clock
    function updateClock() {
      const now = new Date();
      document.getElementById('menubar-clock').textContent = now.toLocaleTimeString([], {
        hour: '2-digit',
        minute: '2-digit'
      });
    }

    setInterval(() => {
      if (state.playing) {
        const ch = CHANNELS[state.channel];
        const tr = ch.tracks[state.trackIdx];
        state.elapsed += 1;
        if (state.elapsed >= tr.dur) {
          state.trackIdx = (state.trackIdx + 1) % ch.tracks.length;
          state.elapsed = 0;
          renderPlayer();
        } else {
          els.lcdTime.textContent = `${fmtTime(state.elapsed)} / ${fmtTime(tr.dur)}`;
        }
      }
      updateClock();
    }, 1000);

    setInterval(() => {
      const volScale = Number(els.volSlider.value) / 100;
      els.eqBars.forEach(bar => {
        const h = state.playing ? Math.max(3, Math.round((4 + Math.random() * 14) * Math.max(0.25, volScale))) : 3;
        bar.style.height = `${h}px`;
      });
    }, 180);

    updateClock();
    renderPlayer();
  </script>
</body>
</html>
```
