{
  "id": 31,
  "slug": "pastel-system7-radio",
  "name": "Pastel System 7 Radio OS",
  "kind": "style",
  "family": "Retro OS",
  "sourceSite": {
    "name": "Nightwave Plaza",
    "url": "https://plaza.one/",
    "verifiedStatus": 200
  },
  "tagline": "Sun-bleached pastel Classic Mac desktop windows, pinstriped titlebars, animated cassette reels, and nostalgic radio channels.",
  "whyUnique": "Reimagines vintage System 7 window chrome through a warm peach-cream and blush-pink summer radio desktop with tactile draggable/focusable windows.",
  "theme": "light",
  "mobileStrength": "high",
  "tags": [
    "retro-os",
    "system-7",
    "pastel-desktop",
    "internet-radio",
    "cassette-ui"
  ],
  "bestFor": [
    "Internet radio & music players",
    "Creative lifestyle microsites",
    "Nostalgic brand campaigns",
    "Indie audio collectives"
  ],
  "palette": [
    {
      "role": "canvas",
      "hex": "#F8D7C9",
      "name": "Sunlit Peach Desktop"
    },
    {
      "role": "surface",
      "hex": "#FFF9F0",
      "name": "Warm Cream Chrome"
    },
    {
      "role": "ink",
      "hex": "#2B2220",
      "name": "Espresso Pixel Ink"
    },
    {
      "role": "accent",
      "hex": "#E05A47",
      "name": "Coral Cassette Red"
    },
    {
      "role": "muted",
      "hex": "#8B746C",
      "name": "Vintage Taupe"
    }
  ],
  "typography": {
    "display": "VT323",
    "body": "IBM Plex Mono",
    "mono": "IBM Plex Mono",
    "googleFontsUrl": "https://fonts.googleapis.com/css2?family=VT323&family=IBM+Plex+Mono:wght@400;600&display=swap",
    "scaleNotes": "Crisp bitmap-inspired titlebars and LCD track tickers paired with readable monospace channel lists and status readouts."
  },
  "layoutNotes": "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.",
  "interactionNotes": "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.",
  "mobileNotes": "Automatically docks windows into a zero-overflow vertical stack on 390px screens with >=44px channel and transport buttons.",
  "agentGuardrails": {
    "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)."
    ],
    "dont": [
      "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."
    ]
  },
  "demoFile": "demos/pastel-system7-radio.html",
  "thumbDesktop": "thumbs/pastel-system7-radio-desktop.webp",
  "thumbMobile": "thumbs/pastel-system7-radio-mobile.webp",
  "urls": {
    "page": "https://templates.michaelpitts.net/t/pastel-system7-radio",
    "markdown": "https://templates.michaelpitts.net/t/pastel-system7-radio.md",
    "api": "https://templates.michaelpitts.net/api/templates/pastel-system7-radio",
    "demo": "https://templates.michaelpitts.net/demos/pastel-system7-radio.html",
    "thumbDesktop": "https://templates.michaelpitts.net/thumbs/pastel-system7-radio-desktop.webp",
    "thumbMobile": "https://templates.michaelpitts.net/thumbs/pastel-system7-radio-mobile.webp"
  },
  "agentPrompt": "Design & build using template #031 \"Pastel System 7 Radio OS\" (style / Retro OS, light theme).\nFull AI blueprint & standalone starter code: https://templates.michaelpitts.net/t/pastel-system7-radio.md\nLive demo: https://templates.michaelpitts.net/demos/pastel-system7-radio.html\nReal-world inspiration: Nightwave Plaza (https://plaza.one/)\n\nCore aesthetic: Reimagines vintage System 7 window chrome through a warm peach-cream and blush-pink summer radio desktop with tactile draggable/focusable windows.\nPalette: canvas: #F8D7C9 (Sunlit Peach Desktop), surface: #FFF9F0 (Warm Cream Chrome), ink: #2B2220 (Espresso Pixel Ink), accent: #E05A47 (Coral Cassette Red), muted: #8B746C (Vintage Taupe)\nTypography: Display=\"VT323\", Body=\"IBM Plex Mono\", Mono=\"IBM Plex Mono\"\nLayout: 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.\nInteractions: 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.\nMobile: Automatically docks windows into a zero-overflow vertical stack on 390px screens with >=44px channel and transport buttons.\n\nGuardrails:\n- DO: Style window titlebars with classic horizontal pinstripes and crisp 2px solid borders + hard drop shadows.\n- DO: Pair warm sun-bleached peach/cream chrome with high-contrast dark espresso ink.\n- DO: Keep retro window controls functional (focus, channel switch, wallpaper swap).\n- DON'T: Never allow draggable desktop windows to overflow or become unreachable on 390px mobile screens.\n- DON'T: Avoid harsh fluorescent neon colors that break the sun-faded analog warmth.",
  "sourceCode": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>Sunbeam FM — Pastel System 7 Radio OS</title>\n  <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n  <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n  <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\">\n  <style>\n    :root {\n      --cream: #fff6ee;\n      --peach: #f7c7b0;\n      --blush: #f2a999;\n      --coral: #e47c67;\n      --ink: #2b211e;\n      --ink-soft: #634d46;\n      --window-bg: #fff5ec;\n      --window-chrome: #f9e3d4;\n      --lcd-bg: #262922;\n      --lcd-glow: #d8f29e;\n      --lcd-amber: #ffcf87;\n      --accent: #e47c67;\n      --accent-soft: #fbd8c9;\n      --shadow: 4px 4px 0 rgba(43, 33, 30, 0.22);\n      --pixel: 'Silkscreen', 'Courier New', monospace;\n      --lcd: 'VT323', 'Courier New', monospace;\n      --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;\n    }\n\n    body[data-accent=\"flamingo\"] {\n      --accent: #df6d8a;\n      --accent-soft: #fad3de;\n    }\n    body[data-accent=\"seafoam\"] {\n      --accent: #4c9a8d;\n      --accent-soft: #cdeae3;\n    }\n\n    * {\n      box-sizing: border-box;\n      margin: 0;\n      padding: 0;\n    }\n\n    html, body {\n      min-height: 100%;\n      width: 100%;\n      overflow-x: hidden;\n      font-family: var(--sans);\n      color: var(--ink);\n      background-color: #f6d5c4;\n      -webkit-font-smoothing: antialiased;\n    }\n\n    /* Wallpapers */\n    body[data-wallpaper=\"peach-grid\"] {\n      background-color: #f7d5c3;\n      background-image:\n        linear-gradient(rgba(43, 33, 30, 0.06) 1px, transparent 1px),\n        linear-gradient(90deg, rgba(43, 33, 30, 0.06) 1px, transparent 1px),\n        radial-gradient(circle at 80% 18%, rgba(255, 244, 214, 0.7), transparent 45%);\n      background-size: 28px 28px, 28px 28px, 100% 100%;\n    }\n    body[data-wallpaper=\"malibu-sunset\"] {\n      background: linear-gradient(165deg, #fbd7be 0%, #f5b3a6 48%, #d7a1b8 100%);\n      background-attachment: fixed;\n    }\n    body[data-wallpaper=\"miami-stripes\"] {\n      background-color: #fae4d7;\n      background-image: repeating-linear-gradient(\n        -45deg,\n        #fae4d7,\n        #fae4d7 18px,\n        #f4cbb9 18px,\n        #f4cbb9 36px\n      );\n    }\n    body[data-wallpaper=\"cream-linen\"] {\n      background-color: #f4eadf;\n      background-image: radial-gradient(rgba(43, 33, 30, 0.09) 1px, transparent 0);\n      background-size: 14px 14px;\n    }\n\n    /* Top System 7 Menu Bar */\n    .menubar {\n      position: sticky;\n      top: 0;\n      z-index: 500;\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n      gap: 8px;\n      min-height: 44px;\n      padding: 4px 12px;\n      background: var(--cream);\n      border-bottom: 2px solid var(--ink);\n      font-family: var(--pixel);\n      font-size: 12px;\n      user-select: none;\n    }\n\n    .menubar-left, .menubar-right {\n      display: flex;\n      align-items: center;\n      gap: 6px;\n      flex-wrap: wrap;\n    }\n\n    .brand-pill {\n      display: inline-flex;\n      align-items: center;\n      gap: 6px;\n      padding: 6px 10px;\n      min-height: 36px;\n      background: var(--accent-soft);\n      border: 1.5px solid var(--ink);\n      border-radius: 3px;\n      font-weight: 700;\n      letter-spacing: -0.02em;\n    }\n\n    .menu-btn {\n      appearance: none;\n      background: transparent;\n      border: 1.5px solid transparent;\n      color: var(--ink);\n      font-family: var(--pixel);\n      font-size: 11px;\n      padding: 6px 10px;\n      min-height: 36px;\n      cursor: pointer;\n      border-radius: 3px;\n      transition: background 0.12s ease;\n    }\n\n    .menu-btn:hover, .menu-btn:focus-visible {\n      background: var(--ink);\n      color: var(--cream);\n      outline: none;\n    }\n\n    .menu-btn.is-active {\n      background: var(--accent);\n      color: #fff;\n      border-color: var(--ink);\n    }\n\n    .clock-readout {\n      font-family: var(--lcd);\n      font-size: 20px;\n      padding: 2px 8px;\n      border: 1.5px solid var(--ink);\n      background: var(--window-chrome);\n      border-radius: 2px;\n      line-height: 1.2;\n    }\n\n    /* Mobile Window Switcher Tabs */\n    .mobile-tabs {\n      display: flex;\n      gap: 6px;\n      padding: 10px 12px 0;\n      width: 100%;\n    }\n\n    .mobile-tab {\n      flex: 1;\n      min-height: 44px;\n      padding: 8px 6px;\n      border: 2px solid var(--ink);\n      background: var(--window-chrome);\n      color: var(--ink);\n      font-family: var(--pixel);\n      font-size: 11px;\n      cursor: pointer;\n      box-shadow: 2px 2px 0 rgba(43, 33, 30, 0.2);\n    }\n\n    .mobile-tab.active {\n      background: var(--accent);\n      color: #fff;\n    }\n\n    /* Desktop Stage */\n    .desktop {\n      position: relative;\n      width: 100%;\n      min-height: calc(100vh - 46px);\n      padding: 12px;\n    }\n\n    /* Desktop Icons (visible on larger viewports) */\n    .desktop-icons {\n      display: none;\n    }\n\n    /* System 7 Window */\n    .os-window {\n      width: 100%;\n      background: var(--window-bg);\n      border: 2px solid var(--ink);\n      box-shadow: var(--shadow);\n      margin-bottom: 14px;\n      display: none;\n      flex-direction: column;\n      overflow: hidden;\n    }\n\n    .os-window.mobile-visible {\n      display: flex;\n    }\n\n    .os-window.is-focused {\n      box-shadow: 6px 6px 0 rgba(43, 33, 30, 0.28);\n    }\n\n    .titlebar {\n      display: flex;\n      align-items: center;\n      gap: 8px;\n      min-height: 36px;\n      padding: 4px 8px;\n      background: var(--window-chrome);\n      border-bottom: 2px solid var(--ink);\n      user-select: none;\n      cursor: default;\n    }\n\n    .titlebar-stripes {\n      flex: 1;\n      height: 14px;\n      background-image: repeating-linear-gradient(\n        to bottom,\n        var(--ink) 0px,\n        var(--ink) 1.5px,\n        transparent 1.5px,\n        transparent 3.5px\n      );\n      opacity: 0.75;\n    }\n\n    .os-window:not(.is-focused) .titlebar-stripes {\n      opacity: 0.22;\n    }\n\n    .titlebar-label {\n      font-family: var(--pixel);\n      font-size: 11px;\n      padding: 2px 8px;\n      background: var(--window-chrome);\n      white-space: nowrap;\n      letter-spacing: 0.02em;\n    }\n\n    .win-close {\n      width: 24px;\n      height: 24px;\n      min-width: 24px;\n      border: 2px solid var(--ink);\n      background: var(--cream);\n      cursor: pointer;\n      display: grid;\n      place-items: center;\n      font-family: var(--pixel);\n      font-size: 11px;\n      line-height: 1;\n      color: var(--ink);\n    }\n\n    .win-close:hover {\n      background: var(--accent);\n      color: #fff;\n    }\n\n    .win-body {\n      padding: 14px;\n      display: flex;\n      flex-direction: column;\n      gap: 14px;\n    }\n\n    /* Cassette Deck */\n    .cassette-stage {\n      background: linear-gradient(180deg, #fae8dc 0%, #f3d6c4 100%);\n      border: 2px solid var(--ink);\n      padding: 12px;\n      position: relative;\n    }\n\n    .cassette-svg {\n      width: 100%;\n      max-width: 340px;\n      height: auto;\n      display: block;\n      margin: 0 auto;\n    }\n\n    .reel-spin {\n      transform-box: fill-box;\n      transform-origin: center;\n      animation: spinReel 3.4s linear infinite;\n      animation-play-state: running;\n    }\n\n    .reel-spin.paused {\n      animation-play-state: paused;\n    }\n\n    @keyframes spinReel {\n      from { transform: rotate(0deg); }\n      to { transform: rotate(360deg); }\n    }\n\n    /* Retro LCD Display */\n    .lcd-panel {\n      background: var(--lcd-bg);\n      border: 2px solid var(--ink);\n      box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);\n      padding: 12px;\n      color: var(--lcd-glow);\n      font-family: var(--lcd);\n      display: flex;\n      flex-direction: column;\n      gap: 6px;\n    }\n\n    .lcd-top {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      gap: 8px;\n      font-size: 18px;\n      color: var(--lcd-amber);\n    }\n\n    .lcd-badge {\n      padding: 1px 6px;\n      border: 1px solid var(--lcd-amber);\n      font-size: 15px;\n      letter-spacing: 0.06em;\n    }\n\n    .lcd-track {\n      font-size: 26px;\n      line-height: 1.05;\n      letter-spacing: 0.02em;\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n    }\n\n    .lcd-artist {\n      font-size: 20px;\n      color: #a9c783;\n    }\n\n    .lcd-bottom {\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n      gap: 10px;\n      margin-top: 4px;\n    }\n\n    .eq-bars {\n      display: flex;\n      align-items: flex-end;\n      gap: 3px;\n      height: 18px;\n    }\n\n    .eq-bar {\n      width: 5px;\n      background: var(--lcd-glow);\n      height: 6px;\n      transition: height 0.16s ease;\n    }\n\n    .lcd-time {\n      font-size: 20px;\n      letter-spacing: 0.08em;\n    }\n\n    /* Transport & Volume */\n    .transport-row {\n      display: grid;\n      grid-template-columns: repeat(3, 1fr);\n      gap: 8px;\n    }\n\n    .retro-btn {\n      min-height: 44px;\n      padding: 8px 10px;\n      border: 2px solid var(--ink);\n      background: var(--cream);\n      color: var(--ink);\n      font-family: var(--pixel);\n      font-size: 11px;\n      cursor: pointer;\n      box-shadow: 2px 2px 0 var(--ink);\n      transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;\n    }\n\n    .retro-btn:active {\n      transform: translate(2px, 2px);\n      box-shadow: 0 0 0 var(--ink);\n    }\n\n    .retro-btn.primary {\n      background: var(--accent);\n      color: #fff;\n    }\n\n    .volume-row {\n      display: flex;\n      align-items: center;\n      gap: 10px;\n      font-family: var(--pixel);\n      font-size: 11px;\n    }\n\n    .volume-row input[type=\"range\"] {\n      flex: 1;\n      accent-color: var(--accent);\n      min-height: 36px;\n      cursor: pointer;\n    }\n\n    /* Channel Switcher */\n    .section-kicker {\n      font-family: var(--pixel);\n      font-size: 10px;\n      text-transform: uppercase;\n      color: var(--ink-soft);\n      letter-spacing: 0.06em;\n    }\n\n    .channel-grid {\n      display: grid;\n      grid-template-columns: repeat(2, 1fr);\n      gap: 8px;\n    }\n\n    .channel-btn {\n      min-height: 48px;\n      padding: 8px 10px;\n      text-align: left;\n      border: 2px solid var(--ink);\n      background: var(--cream);\n      color: var(--ink);\n      cursor: pointer;\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      gap: 2px;\n      box-shadow: 2px 2px 0 rgba(43, 33, 30, 0.25);\n    }\n\n    .channel-btn strong {\n      font-family: var(--pixel);\n      font-size: 11px;\n    }\n\n    .channel-btn span {\n      font-size: 11px;\n      color: var(--ink-soft);\n    }\n\n    .channel-btn.active {\n      background: var(--accent-soft);\n      border-color: var(--ink);\n      box-shadow: inset 2px 2px 0 rgba(43, 33, 30, 0.15);\n    }\n\n    /* Guide Window */\n    .vibe-card {\n      background: var(--accent-soft);\n      border: 2px solid var(--ink);\n      padding: 12px;\n      display: flex;\n      flex-direction: column;\n      gap: 6px;\n    }\n\n    .vibe-card h2 {\n      font-family: var(--pixel);\n      font-size: 13px;\n    }\n\n    .vibe-card p {\n      font-size: 13px;\n      line-height: 1.45;\n      color: var(--ink);\n    }\n\n    .tag-row {\n      display: flex;\n      flex-wrap: wrap;\n      gap: 6px;\n      margin-top: 2px;\n    }\n\n    .tag-pill {\n      font-family: var(--pixel);\n      font-size: 10px;\n      padding: 3px 7px;\n      background: var(--cream);\n      border: 1.5px solid var(--ink);\n    }\n\n    .tracklist {\n      list-style: none;\n      border: 2px solid var(--ink);\n      background: var(--cream);\n    }\n\n    .tracklist li + li {\n      border-top: 1.5px solid rgba(43, 33, 30, 0.22);\n    }\n\n    .track-item {\n      width: 100%;\n      min-height: 46px;\n      padding: 8px 10px;\n      background: transparent;\n      border: 0;\n      text-align: left;\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      gap: 8px;\n      cursor: pointer;\n      color: var(--ink);\n      font-family: var(--sans);\n    }\n\n    .track-item:hover {\n      background: var(--window-chrome);\n    }\n\n    .track-item.playing {\n      background: var(--accent);\n      color: #fff;\n    }\n\n    .track-item small {\n      display: block;\n      font-size: 12px;\n      opacity: 0.8;\n    }\n\n    .track-dur {\n      font-family: var(--lcd);\n      font-size: 18px;\n      flex-shrink: 0;\n    }\n\n    /* Prefs Window */\n    .swatch-grid {\n      display: grid;\n      grid-template-columns: repeat(2, 1fr);\n      gap: 8px;\n    }\n\n    .swatch-btn {\n      min-height: 46px;\n      padding: 8px;\n      border: 2px solid var(--ink);\n      background: var(--cream);\n      cursor: pointer;\n      display: flex;\n      align-items: center;\n      gap: 8px;\n      font-family: var(--pixel);\n      font-size: 10px;\n      color: var(--ink);\n    }\n\n    .swatch-btn.active {\n      background: var(--ink);\n      color: var(--cream);\n    }\n\n    .swatch-chip {\n      width: 20px;\n      height: 20px;\n      border: 1.5px solid var(--ink);\n      flex-shrink: 0;\n    }\n\n    .spf-note {\n      background: #fff1c9;\n      border: 2px dashed var(--ink);\n      padding: 10px 12px;\n      font-size: 12px;\n      line-height: 1.45;\n    }\n\n    .toast {\n      position: fixed;\n      bottom: 14px;\n      left: 50%;\n      transform: translateX(-50%) translateY(90px);\n      background: var(--ink);\n      color: var(--cream);\n      font-family: var(--pixel);\n      font-size: 11px;\n      padding: 10px 14px;\n      border: 2px solid var(--cream);\n      box-shadow: var(--shadow);\n      z-index: 900;\n      transition: transform 0.22s ease;\n      max-width: calc(100vw - 24px);\n      text-align: center;\n    }\n\n    .toast.show {\n      transform: translateX(-50%) translateY(0);\n    }\n\n    /* Desktop OS Floating Layout */\n    @media (min-width: 880px) {\n      .mobile-tabs {\n        display: none;\n      }\n\n      .desktop {\n        min-height: calc(100vh - 46px);\n        padding: 20px;\n        overflow: hidden;\n      }\n\n      .desktop-icons {\n        position: absolute;\n        top: 20px;\n        right: 22px;\n        display: flex;\n        flex-direction: column;\n        gap: 14px;\n        z-index: 5;\n      }\n\n      .desk-icon {\n        width: 86px;\n        padding: 8px 6px;\n        background: transparent;\n        border: 1.5px solid transparent;\n        cursor: pointer;\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        gap: 5px;\n        color: var(--ink);\n      }\n\n      .desk-icon:hover, .desk-icon:focus-visible {\n        background: rgba(255, 246, 238, 0.72);\n        border-color: var(--ink);\n        outline: none;\n      }\n\n      .desk-icon span {\n        font-family: var(--pixel);\n        font-size: 10px;\n        background: var(--cream);\n        padding: 2px 5px;\n        border: 1px solid var(--ink);\n        text-align: center;\n      }\n\n      .os-window {\n        position: absolute;\n        display: flex;\n        margin-bottom: 0;\n      }\n\n      .os-window.is-closed {\n        display: none;\n      }\n\n      .titlebar {\n        cursor: grab;\n      }\n\n      .titlebar:active {\n        cursor: grabbing;\n      }\n\n      #win-player {\n        top: 22px;\n        left: 26px;\n        width: 430px;\n      }\n\n      #win-guide {\n        top: 46px;\n        left: 484px;\n        width: 360px;\n      }\n\n      #win-prefs {\n        top: 392px;\n        left: 498px;\n        width: 346px;\n      }\n    }\n  </style>\n</head>\n<body data-wallpaper=\"peach-grid\" data-accent=\"apricot\">\n\n  <header class=\"menubar\" role=\"banner\">\n    <div class=\"menubar-left\">\n      <div class=\"brand-pill\" aria-label=\"Sunbeam OS 7.5\">\n        <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n          <circle cx=\"8\" cy=\"8\" r=\"5\" fill=\"#e47c67\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n          <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\"/>\n        </svg>\n        <span>Sunbeam OS</span>\n      </div>\n      <button class=\"menu-btn\" data-open-win=\"win-player\">Radio</button>\n      <button class=\"menu-btn\" data-open-win=\"win-guide\">Liner Notes</button>\n      <button class=\"menu-btn\" data-open-win=\"win-prefs\">Wallpapers</button>\n    </div>\n    <div class=\"menubar-right\">\n      <button class=\"menu-btn\" id=\"quick-wallpaper-btn\" title=\"Cycle desktop wallpaper\">Theme: Peach</button>\n      <div class=\"clock-readout\" id=\"menubar-clock\">03:45 PM</div>\n    </div>\n  </header>\n\n  <nav class=\"mobile-tabs\" aria-label=\"Window switcher\">\n    <button class=\"mobile-tab active\" data-tab=\"win-player\">FM Deck</button>\n    <button class=\"mobile-tab\" data-tab=\"win-guide\">Tracks</button>\n    <button class=\"mobile-tab\" data-tab=\"win-prefs\">Themes</button>\n  </nav>\n\n  <main class=\"desktop\" id=\"desktop\">\n    <aside class=\"desktop-icons\" aria-label=\"Desktop shortcuts\">\n      <button class=\"desk-icon\" data-open-win=\"win-player\">\n        <svg width=\"38\" height=\"38\" viewBox=\"0 0 38 38\" aria-hidden=\"true\">\n          <rect x=\"3\" y=\"8\" width=\"32\" height=\"22\" rx=\"3\" fill=\"#fff6ee\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n          <rect x=\"7\" y=\"12\" width=\"24\" height=\"10\" fill=\"#fbd8c9\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n          <circle cx=\"13\" cy=\"17\" r=\"3\" fill=\"#2b211e\"/>\n          <circle cx=\"25\" cy=\"17\" r=\"3\" fill=\"#2b211e\"/>\n          <rect x=\"11\" y=\"25\" width=\"16\" height=\"3\" fill=\"#2b211e\"/>\n        </svg>\n        <span>Sunbeam FM</span>\n      </button>\n      <button class=\"desk-icon\" data-open-win=\"win-guide\">\n        <svg width=\"38\" height=\"38\" viewBox=\"0 0 38 38\" aria-hidden=\"true\">\n          <path d=\"M7 5h18l6 6v22H7z\" fill=\"#fff6ee\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n          <path d=\"M25 5v6h6\" fill=\"#f7c7b0\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n          <path d=\"M12 16h14M12 21h14M12 26h9\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n        </svg>\n        <span>Guide.txt</span>\n      </button>\n      <button class=\"desk-icon\" data-open-win=\"win-prefs\">\n        <svg width=\"38\" height=\"38\" viewBox=\"0 0 38 38\" aria-hidden=\"true\">\n          <rect x=\"4\" y=\"6\" width=\"30\" height=\"26\" fill=\"#fff6ee\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n          <rect x=\"8\" y=\"10\" width=\"10\" height=\"10\" fill=\"#e47c67\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n          <rect x=\"20\" y=\"10\" width=\"10\" height=\"10\" fill=\"#f7c7b0\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n          <rect x=\"8\" y=\"22\" width=\"22\" height=\"6\" fill=\"#cdeae3\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n        </svg>\n        <span>Backdrop</span>\n      </button>\n    </aside>\n\n    <!-- WINDOW 1: RADIO PLAYER -->\n    <section class=\"os-window is-focused mobile-visible\" id=\"win-player\" style=\"z-index: 20;\" aria-label=\"Sunbeam FM Deck\">\n      <div class=\"titlebar\" data-drag-handle>\n        <button class=\"win-close\" data-close-win=\"win-player\" aria-label=\"Close Radio window\">&times;</button>\n        <div class=\"titlebar-stripes\"></div>\n        <span class=\"titlebar-label\">Sunbeam FM — Stereo Deck</span>\n        <div class=\"titlebar-stripes\"></div>\n      </div>\n      <div class=\"win-body\">\n        <div class=\"cassette-stage\">\n          <svg class=\"cassette-svg\" viewBox=\"0 0 320 176\" role=\"img\" aria-label=\"Animated retro cassette tape\">\n            <!-- Outer shell -->\n            <rect x=\"8\" y=\"8\" width=\"304\" height=\"160\" rx=\"12\" fill=\"#fff6ee\" stroke=\"#2b211e\" stroke-width=\"3\"/>\n            <!-- Corner screws -->\n            <circle cx=\"22\" cy=\"22\" r=\"4\" fill=\"#e8c8b6\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n            <circle cx=\"298\" cy=\"22\" r=\"4\" fill=\"#e8c8b6\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n            <circle cx=\"22\" cy=\"154\" r=\"4\" fill=\"#e8c8b6\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n            <circle cx=\"298\" cy=\"154\" r=\"4\" fill=\"#e8c8b6\" stroke=\"#2b211e\" stroke-width=\"1.5\"/>\n            <!-- Label sticker -->\n            <rect x=\"26\" y=\"24\" width=\"268\" height=\"96\" rx=\"5\" fill=\"#fbd8c9\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n            <rect x=\"26\" y=\"24\" width=\"268\" height=\"22\" rx=\"4\" fill=\"#e47c67\" stroke=\"#2b211e\" stroke-width=\"2\" id=\"tape-stripe\"/>\n            <text x=\"40\" y=\"39\" fill=\"#fff6ee\" font-family=\"Silkscreen, monospace\" font-size=\"10\" id=\"tape-channel-label\">SIDE A // POOLSIDE</text>\n            <text x=\"280\" y=\"39\" text-anchor=\"end\" fill=\"#fff6ee\" font-family=\"Silkscreen, monospace\" font-size=\"10\">C-90</text>\n            <!-- Center tape window -->\n            <rect x=\"70\" y=\"58\" width=\"180\" height=\"48\" rx=\"8\" fill=\"#2b211e\"/>\n            <rect x=\"118\" y=\"65\" width=\"84\" height=\"34\" rx=\"3\" fill=\"#463530\" stroke=\"#7c5e54\" stroke-width=\"1.5\"/>\n            <!-- Left reel -->\n            <g class=\"reel-spin\" id=\"reel-left\">\n              <circle cx=\"96\" cy=\"82\" r=\"19\" fill=\"#fff6ee\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n              <circle cx=\"96\" cy=\"82\" r=\"7\" fill=\"#2b211e\"/>\n              <path d=\"M96 64v8M96 92v8M78 82h8M106 82h8\" stroke=\"#2b211e\" stroke-width=\"3\"/>\n            </g>\n            <!-- Right reel -->\n            <g class=\"reel-spin\" id=\"reel-right\">\n              <circle cx=\"224\" cy=\"82\" r=\"19\" fill=\"#fff6ee\" stroke=\"#2b211e\" stroke-width=\"2\"/>\n              <circle cx=\"224\" cy=\"82\" r=\"7\" fill=\"#2b211e\"/>\n              <path d=\"M224 64v8M224 92v8M206 82h8M234 82h8\" stroke=\"#2b211e\" stroke-width=\"3\"/>\n            </g>\n            <!-- Bottom trapezoid -->\n            <path d=\"M68 168l14-34h156l14 34z\" fill=\"#f3d6c4\" stroke=\"#2b211e\" stroke-width=\"2.5\"/>\n            <circle cx=\"110\" cy=\"152\" r=\"5\" fill=\"#2b211e\"/>\n            <circle cx=\"210\" cy=\"152\" r=\"5\" fill=\"#2b211e\"/>\n            <rect x=\"144\" y=\"147\" width=\"32\" height=\"10\" rx=\"2\" fill=\"#2b211e\"/>\n          </svg>\n        </div>\n\n        <div class=\"lcd-panel\" aria-live=\"polite\">\n          <div class=\"lcd-top\">\n            <span class=\"lcd-badge\" id=\"lcd-channel\">CH 01 // POOLSIDE</span>\n            <span id=\"lcd-state\">ON AIR</span>\n          </div>\n          <div class=\"lcd-track\" id=\"lcd-track\">Cote d'Azur Daydream</div>\n          <div class=\"lcd-artist\" id=\"lcd-artist\">Paloma Cabana Club</div>\n          <div class=\"lcd-bottom\">\n            <div class=\"eq-bars\" id=\"eq-bars\" aria-hidden=\"true\">\n              <div class=\"eq-bar\"></div><div class=\"eq-bar\"></div><div class=\"eq-bar\"></div>\n              <div class=\"eq-bar\"></div><div class=\"eq-bar\"></div><div class=\"eq-bar\"></div>\n              <div class=\"eq-bar\"></div><div class=\"eq-bar\"></div><div class=\"eq-bar\"></div>\n            </div>\n            <div class=\"lcd-time\" id=\"lcd-time\">01:14 / 03:42</div>\n          </div>\n        </div>\n\n        <div class=\"transport-row\">\n          <button class=\"retro-btn\" id=\"btn-prev\" aria-label=\"Previous track\">&laquo; Prev</button>\n          <button class=\"retro-btn primary\" id=\"btn-play\" aria-label=\"Play or pause\">Pause</button>\n          <button class=\"retro-btn\" id=\"btn-next\" aria-label=\"Next track\">Next &raquo;</button>\n        </div>\n\n        <label class=\"volume-row\">\n          <span>VOL</span>\n          <input type=\"range\" id=\"vol-slider\" min=\"0\" max=\"100\" value=\"78\" aria-label=\"Volume\">\n          <span id=\"vol-label\">78%</span>\n        </label>\n\n        <div>\n          <p class=\"section-kicker\" style=\"margin-bottom: 8px;\">Select Frequency</p>\n          <div class=\"channel-grid\" id=\"channel-grid\">\n            <button class=\"channel-btn active\" data-channel=\"poolside\">\n              <strong>Poolside</strong>\n              <span>Nu-disco &amp; terrace funk</span>\n            </button>\n            <button class=\"channel-btn\" data-channel=\"indie\">\n              <strong>Indie Summer</strong>\n              <span>Sun-bleached guitars</span>\n            </button>\n            <button class=\"channel-btn\" data-channel=\"tokyo\">\n              <strong>Tokyo Disco</strong>\n              <span>1984 city pop grooves</span>\n            </button>\n            <button class=\"channel-btn\" data-channel=\"hangover\">\n              <strong>Hangover Club</strong>\n              <span>Slow Balearic drift</span>\n            </button>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <!-- WINDOW 2: CHANNEL GUIDE & TRACKLIST -->\n    <section class=\"os-window\" id=\"win-guide\" style=\"z-index: 15;\" aria-label=\"Channel Liner Notes\">\n      <div class=\"titlebar\" data-drag-handle>\n        <button class=\"win-close\" data-close-win=\"win-guide\" aria-label=\"Close Liner Notes\">&times;</button>\n        <div class=\"titlebar-stripes\"></div>\n        <span class=\"titlebar-label\">Liner Notes &amp; Queue</span>\n        <div class=\"titlebar-stripes\"></div>\n      </div>\n      <div class=\"win-body\">\n        <div class=\"vibe-card\">\n          <h2 id=\"guide-title\">Poolside — 104.2 MHz</h2>\n          <p id=\"guide-desc\">Crisp poolside boogie, warm Rhodes chords, and effortless afternoon basslines broadcast from a pastel cabana.</p>\n          <div class=\"tag-row\" id=\"guide-tags\"></div>\n        </div>\n\n        <div>\n          <p class=\"section-kicker\" style=\"margin-bottom: 8px;\">Tape Queue (tap to cue)</p>\n          <ul class=\"tracklist\" id=\"tracklist\"></ul>\n        </div>\n\n        <button class=\"retro-btn\" id=\"btn-postcard\">Send Summer Postcard to Studio</button>\n      </div>\n    </section>\n\n    <!-- WINDOW 3: DESKTOP PREFERENCES -->\n    <section class=\"os-window\" id=\"win-prefs\" style=\"z-index: 10;\" aria-label=\"Desktop Preferences\">\n      <div class=\"titlebar\" data-drag-handle>\n        <button class=\"win-close\" data-close-win=\"win-prefs\" aria-label=\"Close Preferences\">&times;</button>\n        <div class=\"titlebar-stripes\"></div>\n        <span class=\"titlebar-label\">Control Panel — Backdrop</span>\n        <div class=\"titlebar-stripes\"></div>\n      </div>\n      <div class=\"win-body\">\n        <div>\n          <p class=\"section-kicker\" style=\"margin-bottom: 8px;\">Desktop Pattern</p>\n          <div class=\"swatch-grid\" id=\"wallpaper-grid\">\n            <button class=\"swatch-btn active\" data-wp=\"peach-grid\">\n              <span class=\"swatch-chip\" style=\"background:#f7d5c3;\"></span>Peach Grid\n            </button>\n            <button class=\"swatch-btn\" data-wp=\"malibu-sunset\">\n              <span class=\"swatch-chip\" style=\"background:linear-gradient(135deg,#fbd7be,#d7a1b8);\"></span>Malibu\n            </button>\n            <button class=\"swatch-btn\" data-wp=\"miami-stripes\">\n              <span class=\"swatch-chip\" style=\"background:repeating-linear-gradient(-45deg,#fae4d7,#fae4d7 4px,#f4cbb9 4px,#f4cbb9 8px);\"></span>Cabana\n            </button>\n            <button class=\"swatch-btn\" data-wp=\"cream-linen\">\n              <span class=\"swatch-chip\" style=\"background:#f4eadf;\"></span>Linen\n            </button>\n          </div>\n        </div>\n\n        <div>\n          <p class=\"section-kicker\" style=\"margin-bottom: 8px;\">Trim Accent</p>\n          <div class=\"swatch-grid\" id=\"accent-grid\" style=\"grid-template-columns: repeat(3, 1fr);\">\n            <button class=\"swatch-btn active\" data-acc=\"apricot\">\n              <span class=\"swatch-chip\" style=\"background:#e47c67;\"></span>Apricot\n            </button>\n            <button class=\"swatch-btn\" data-acc=\"flamingo\">\n              <span class=\"swatch-chip\" style=\"background:#df6d8a;\"></span>Rose\n            </button>\n            <button class=\"swatch-btn\" data-acc=\"seafoam\">\n              <span class=\"swatch-chip\" style=\"background:#4c9a8d;\"></span>Mint\n            </button>\n          </div>\n        </div>\n\n        <div class=\"spf-note\">\n          <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.\n        </div>\n      </div>\n    </section>\n  </main>\n\n  <div class=\"toast\" id=\"toast\" role=\"status\" aria-live=\"polite\"></div>\n\n  <script>\n    const CHANNELS = {\n      poolside: {\n        code: 'CH 01 // POOLSIDE',\n        title: 'Poolside — 104.2 MHz',\n        tape: 'SIDE A // POOLSIDE',\n        desc: 'Crisp poolside boogie, warm Rhodes chords, and effortless afternoon basslines broadcast from a pastel cabana.',\n        tags: ['112 BPM', 'Nu-Disco', 'SPF 50'],\n        tracks: [\n          { title: \"Cote d'Azur Daydream\", artist: 'Paloma Cabana Club', dur: 222 },\n          { title: 'Apricot Spritz at 4PM', artist: 'Hotel Riviera', dur: 198 },\n          { title: 'Mirage on Deck 7', artist: 'Solstice Stereo', dur: 245 },\n          { title: 'Saltwater Cassette', artist: 'Lido Terrace', dur: 210 }\n        ]\n      },\n      indie: {\n        code: 'CH 02 // INDIE SUMMER',\n        title: 'Indie Summer — 98.6 MHz',\n        tape: 'SIDE A // INDIE SUMMER',\n        desc: 'Chorus-drenched surf guitars, dreamy tape reverb, and convertible highway anthems for golden hour.',\n        tags: ['124 BPM', 'Dream Pop', 'Coastline'],\n        tracks: [\n          { title: 'Pacific Highway Polaroid', artist: 'The Sunbleached', dur: 204 },\n          { title: 'Orange Grove Static', artist: 'Velvet Boardwalk', dur: 189 },\n          { title: 'June Forever (Tape Edit)', artist: 'Marigold Motel', dur: 231 },\n          { title: 'Last Ferry to Catalina', artist: 'Coastal Youth', dur: 218 }\n        ]\n      },\n      tokyo: {\n        code: 'CH 03 // TOKYO DISCO',\n        title: 'Tokyo Disco — 84.9 MHz',\n        tape: 'SIDE B // TOKYO DISCO',\n        desc: 'Glossy 1984 city pop, slap-bass sparkle, and neon bayshore cruisers direct from Shibuya FM.',\n        tags: ['118 BPM', 'City Pop', 'Hi-Fi'],\n        tracks: [\n          { title: 'Shonan Midnight Express', artist: 'Haruka & The Bayside', dur: 238 },\n          { title: 'Neon Vending Machine', artist: 'Kuroshio Funk', dur: 214 },\n          { title: 'Ginza Rooftop Breeze', artist: 'Mina Takahashi', dur: 252 },\n          { title: 'Cassette Walkman 1985', artist: 'Pacific Synth Unit', dur: 196 }\n        ]\n      },\n      hangover: {\n        code: 'CH 04 // HANGOVER CLUB',\n        title: 'Hangover Club — 91.3 MHz',\n        tape: 'SIDE B // HANGOVER',\n        desc: 'Slow Balearic synthesizers, iced espresso percussion, and horizontal recovery grooves for Sunday noon.',\n        tags: ['92 BPM', 'Balearic', 'Downtempo'],\n        tracks: [\n          { title: 'Shaded Veranda Drift', artist: 'Ibiza Morning Post', dur: 268 },\n          { title: 'Ice Cubes in Slow Motion', artist: 'Club Siesta', dur: 240 },\n          { title: 'Hammock Horizon', artist: 'Saffron Tide', dur: 227 },\n          { title: 'Postcard from Palma', artist: 'Linen & Sea', dur: 255 }\n        ]\n      }\n    };\n\n    const WALLPAPERS = [\n      { id: 'peach-grid', label: 'Peach' },\n      { id: 'malibu-sunset', label: 'Malibu' },\n      { id: 'miami-stripes', label: 'Cabana' },\n      { id: 'cream-linen', label: 'Linen' }\n    ];\n\n    const state = {\n      channel: 'poolside',\n      trackIdx: 0,\n      playing: true,\n      elapsed: 74,\n      zTop: 30,\n      wpIdx: 0\n    };\n\n    const els = {\n      lcdChannel: document.getElementById('lcd-channel'),\n      lcdState: document.getElementById('lcd-state'),\n      lcdTrack: document.getElementById('lcd-track'),\n      lcdArtist: document.getElementById('lcd-artist'),\n      lcdTime: document.getElementById('lcd-time'),\n      tapeLabel: document.getElementById('tape-channel-label'),\n      btnPlay: document.getElementById('btn-play'),\n      reelLeft: document.getElementById('reel-left'),\n      reelRight: document.getElementById('reel-right'),\n      eqBars: Array.from(document.querySelectorAll('.eq-bar')),\n      guideTitle: document.getElementById('guide-title'),\n      guideDesc: document.getElementById('guide-desc'),\n      guideTags: document.getElementById('guide-tags'),\n      tracklist: document.getElementById('tracklist'),\n      volSlider: document.getElementById('vol-slider'),\n      volLabel: document.getElementById('vol-label'),\n      quickWp: document.getElementById('quick-wallpaper-btn'),\n      toast: document.getElementById('toast')\n    };\n\n    function fmtTime(sec) {\n      const m = Math.floor(sec / 60);\n      const s = Math.floor(sec % 60);\n      return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`;\n    }\n\n    let toastTimer;\n    function showToast(msg) {\n      els.toast.textContent = msg;\n      els.toast.classList.add('show');\n      clearTimeout(toastTimer);\n      toastTimer = setTimeout(() => els.toast.classList.remove('show'), 2600);\n    }\n\n    function renderPlayer() {\n      const ch = CHANNELS[state.channel];\n      const tr = ch.tracks[state.trackIdx];\n      els.lcdChannel.textContent = ch.code;\n      els.tapeLabel.textContent = ch.tape;\n      els.lcdTrack.textContent = tr.title;\n      els.lcdArtist.textContent = tr.artist;\n      els.lcdState.textContent = state.playing ? 'ON AIR' : 'PAUSED';\n      els.btnPlay.textContent = state.playing ? 'Pause' : 'Play';\n      els.lcdTime.textContent = `${fmtTime(state.elapsed)} / ${fmtTime(tr.dur)}`;\n\n      els.reelLeft.classList.toggle('paused', !state.playing);\n      els.reelRight.classList.toggle('paused', !state.playing);\n\n      document.querySelectorAll('.channel-btn').forEach(btn => {\n        btn.classList.toggle('active', btn.dataset.channel === state.channel);\n      });\n\n      els.guideTitle.textContent = ch.title;\n      els.guideDesc.textContent = ch.desc;\n      els.guideTags.innerHTML = ch.tags.map(t => `<span class=\"tag-pill\">${t}</span>`).join('');\n\n      els.tracklist.innerHTML = ch.tracks.map((item, idx) => `\n        <li>\n          <button class=\"track-item ${idx === state.trackIdx ? 'playing' : ''}\" data-track-idx=\"${idx}\">\n            <span>\n              <strong>${idx + 1}. ${item.title}</strong>\n              <small>${item.artist}</small>\n            </span>\n            <span class=\"track-dur\">${fmtTime(item.dur)}</span>\n          </button>\n        </li>\n      `).join('');\n    }\n\n    // Channel switching\n    document.getElementById('channel-grid').addEventListener('click', (e) => {\n      const btn = e.target.closest('.channel-btn');\n      if (!btn) return;\n      state.channel = btn.dataset.channel;\n      state.trackIdx = 0;\n      state.elapsed = 0;\n      state.playing = true;\n      renderPlayer();\n      showToast(`Tuned to ${CHANNELS[state.channel].title}`);\n    });\n\n    // Tracklist cueing\n    els.tracklist.addEventListener('click', (e) => {\n      const btn = e.target.closest('.track-item');\n      if (!btn) return;\n      state.trackIdx = Number(btn.dataset.trackIdx);\n      state.elapsed = 0;\n      state.playing = true;\n      renderPlayer();\n    });\n\n    // Transport controls\n    els.btnPlay.addEventListener('click', () => {\n      state.playing = !state.playing;\n      renderPlayer();\n    });\n\n    document.getElementById('btn-prev').addEventListener('click', () => {\n      const len = CHANNELS[state.channel].tracks.length;\n      state.trackIdx = (state.trackIdx - 1 + len) % len;\n      state.elapsed = 0;\n      renderPlayer();\n    });\n\n    document.getElementById('btn-next').addEventListener('click', () => {\n      const len = CHANNELS[state.channel].tracks.length;\n      state.trackIdx = (state.trackIdx + 1) % len;\n      state.elapsed = 0;\n      renderPlayer();\n    });\n\n    els.volSlider.addEventListener('input', () => {\n      els.volLabel.textContent = `${els.volSlider.value}%`;\n    });\n\n    document.getElementById('btn-postcard').addEventListener('click', () => {\n      showToast('Postcard stamped & sent to Sunbeam Studio!');\n    });\n\n    // Wallpapers & Accents\n    function applyWallpaper(id) {\n      document.body.dataset.wallpaper = id;\n      const idx = WALLPAPERS.findIndex(w => w.id === id);\n      if (idx >= 0) {\n        state.wpIdx = idx;\n        els.quickWp.textContent = `Theme: ${WALLPAPERS[idx].label}`;\n      }\n      document.querySelectorAll('#wallpaper-grid .swatch-btn').forEach(b => {\n        b.classList.toggle('active', b.dataset.wp === id);\n      });\n    }\n\n    document.getElementById('wallpaper-grid').addEventListener('click', (e) => {\n      const btn = e.target.closest('.swatch-btn');\n      if (btn) applyWallpaper(btn.dataset.wp);\n    });\n\n    els.quickWp.addEventListener('click', () => {\n      state.wpIdx = (state.wpIdx + 1) % WALLPAPERS.length;\n      applyWallpaper(WALLPAPERS[state.wpIdx].id);\n    });\n\n    document.getElementById('accent-grid').addEventListener('click', (e) => {\n      const btn = e.target.closest('.swatch-btn');\n      if (!btn) return;\n      const acc = btn.dataset.acc;\n      document.body.dataset.accent = acc;\n      const colors = { apricot: '#e47c67', flamingo: '#df6d8a', seafoam: '#4c9a8d' };\n      document.getElementById('tape-stripe').setAttribute('fill', colors[acc] || '#e47c67');\n      document.querySelectorAll('#accent-grid .swatch-btn').forEach(b => {\n        b.classList.toggle('active', b.dataset.acc === acc);\n      });\n    });\n\n    // Window focus, open, close, and mobile tabs\n    function focusWindow(winEl) {\n      document.querySelectorAll('.os-window').forEach(w => w.classList.remove('is-focused'));\n      winEl.classList.add('is-focused');\n      winEl.classList.remove('is-closed');\n      state.zTop += 1;\n      winEl.style.zIndex = state.zTop;\n    }\n\n    function activateMobileTab(winId) {\n      document.querySelectorAll('.os-window').forEach(w => {\n        w.classList.toggle('mobile-visible', w.id === winId);\n      });\n      document.querySelectorAll('.mobile-tab').forEach(t => {\n        t.classList.toggle('active', t.dataset.tab === winId);\n      });\n      const target = document.getElementById(winId);\n      if (target) focusWindow(target);\n    }\n\n    document.querySelectorAll('.mobile-tab').forEach(tab => {\n      tab.addEventListener('click', () => activateMobileTab(tab.dataset.tab));\n    });\n\n    document.querySelectorAll('[data-open-win]').forEach(btn => {\n      btn.addEventListener('click', () => {\n        const id = btn.dataset.openWin;\n        activateMobileTab(id);\n      });\n    });\n\n    document.querySelectorAll('[data-close-win]').forEach(btn => {\n      btn.addEventListener('click', (e) => {\n        e.stopPropagation();\n        if (window.innerWidth < 880) {\n          showToast('Use top tabs to switch windows on mobile');\n          return;\n        }\n        document.getElementById(btn.dataset.closeWin).classList.add('is-closed');\n      });\n    });\n\n    // Desktop Dragging\n    document.querySelectorAll('.os-window').forEach(win => {\n      win.addEventListener('pointerdown', () => focusWindow(win));\n      const handle = win.querySelector('[data-drag-handle]');\n      handle.addEventListener('pointerdown', (e) => {\n        if (window.innerWidth < 880 || e.target.closest('button')) return;\n        focusWindow(win);\n        const rect = win.getBoundingClientRect();\n        const deskRect = document.getElementById('desktop').getBoundingClientRect();\n        const offsetX = e.clientX - rect.left;\n        const offsetY = e.clientY - rect.top;\n        handle.setPointerCapture(e.pointerId);\n\n        const onMove = (ev) => {\n          const maxLeft = Math.max(0, deskRect.width - rect.width);\n          const left = Math.min(Math.max(0, ev.clientX - deskRect.left - offsetX), maxLeft);\n          const top = Math.max(0, ev.clientY - deskRect.top - offsetY);\n          win.style.left = `${left}px`;\n          win.style.top = `${top}px`;\n        };\n        const onUp = () => {\n          handle.removeEventListener('pointermove', onMove);\n          handle.removeEventListener('pointerup', onUp);\n        };\n        handle.addEventListener('pointermove', onMove);\n        handle.addEventListener('pointerup', onUp);\n      });\n    });\n\n    // Live timer, EQ bars & clock\n    function updateClock() {\n      const now = new Date();\n      document.getElementById('menubar-clock').textContent = now.toLocaleTimeString([], {\n        hour: '2-digit',\n        minute: '2-digit'\n      });\n    }\n\n    setInterval(() => {\n      if (state.playing) {\n        const ch = CHANNELS[state.channel];\n        const tr = ch.tracks[state.trackIdx];\n        state.elapsed += 1;\n        if (state.elapsed >= tr.dur) {\n          state.trackIdx = (state.trackIdx + 1) % ch.tracks.length;\n          state.elapsed = 0;\n          renderPlayer();\n        } else {\n          els.lcdTime.textContent = `${fmtTime(state.elapsed)} / ${fmtTime(tr.dur)}`;\n        }\n      }\n      updateClock();\n    }, 1000);\n\n    setInterval(() => {\n      const volScale = Number(els.volSlider.value) / 100;\n      els.eqBars.forEach(bar => {\n        const h = state.playing ? Math.max(3, Math.round((4 + Math.random() * 14) * Math.max(0.25, volScale))) : 3;\n        bar.style.height = `${h}px`;\n      });\n    }, 180);\n\n    updateClock();\n    renderPlayer();\n  </script>\n</body>\n</html>\n"
}
