/* Nikosoft.org — Win 3.11 / 95 hybrid theme. Pure CSS, no build step. */

:root {
  --teal:        #008080;
  --gray:        #c0c0c0;
  --gray-light:  #dfdfdf;
  --gray-dark:   #808080;
  --gray-darker: #404040;
  --white:       #ffffff;
  --black:       #000000;
  --blue:        #000080;
  --blue-light:  #1084d0;
  --blue-inact:  #808080;
  --yellow:      #ffff80;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--teal);
  color: var(--black);
  font-family: 'Tahoma', 'MS Sans Serif', 'Pixelated MS Sans Serif', 'Segoe UI', sans-serif;
  font-size: 12px;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

/* ─── Desktop ─────────────────────────────────────────────────────────────── */

.desktop {
  position: relative;
  height: calc(100vh - 32px);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 84px);
  grid-auto-rows: 88px;
  align-content: start;
  gap: 8px;
}

/* ─── Desktop icons ───────────────────────────────────────────────────────── */

.icon {
  width: 84px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 2px 2px;
  background: transparent;
  border: 1px dotted transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.icon:focus {
  outline: none;
  border-color: var(--yellow);
  background: rgba(0, 0, 128, 0.30);
}

.icon-img {
  width: 32px;
  height: 32px;
  display: block;
  image-rendering: pixelated;
  pointer-events: none;
}

.icon-label {
  margin-top: 6px;
  color: white;
  font-size: 11px;
  text-align: center;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
  word-break: break-word;
  line-height: 1.15;
  pointer-events: none;
}

/* ─── Windows ─────────────────────────────────────────────────────────────── */

.window {
  position: absolute;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
  box-shadow: 1px 1px 0 var(--gray-darker), 2px 2px 0 var(--gray-dark);
  display: flex;
  flex-direction: column;
  min-width: 280px;
  min-height: 160px;
}

.window[hidden] { display: none; }

.title-bar {
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  color: white;
  padding: 3px 4px 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 12px;
  cursor: move;
  user-select: none;
}

.window:not(.active) .title-bar {
  background: var(--blue-inact);
}

.title { padding-right: 8px; }

.title-controls { display: flex; gap: 2px; }

.ctrl {
  width: 22px;
  height: 18px;
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-right: 1px solid var(--gray-darker);
  border-bottom: 1px solid var(--gray-darker);
  background: var(--gray);
  font-family: 'Marlett', 'Tahoma', sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: var(--black);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.ctrl:active {
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

.window-body {
  padding: 12px 14px;
  background: var(--gray);
  flex: 1;
  overflow: auto;
  user-select: text;
  cursor: auto;
}

.window-body p {
  margin: 0 0 8px 0;
  font-size: 12px;
  line-height: 1.45;
}

.window-body p.dim { color: var(--gray-darker); font-size: 11px; }

.window-body code {
  font-family: 'Lucida Console', 'Consolas', monospace;
  font-size: 11px;
  background: var(--white);
  padding: 0 4px;
  border: 1px inset var(--gray);
}

.window-body strong { font-weight: bold; }
.window-body em { font-style: italic; }

.ms-list {
  background: var(--white);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  padding: 6px 10px 6px 24px;
  margin: 6px 0 10px 0;
  list-style: square;
  font-size: 12px;
}

.ms-list li { margin: 2px 0; }

/* ─── Galleries (Photos / Videos) ─────────────────────────────────────────── */
.gallery { display: flex; flex-direction: column; height: 100%; }

.gallery-bar {
  background: var(--white);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  padding: 3px 6px;
  margin-bottom: 6px;
  font-family: 'Lucida Console', 'Consolas', monospace;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-bar .crumb { color: var(--blue); cursor: pointer; text-decoration: underline; }
.gallery-bar .crumb.here { color: var(--black); cursor: default; text-decoration: none; font-weight: bold; }
.gallery-bar .sepc { color: var(--gray-dark); margin: 0 4px; }

.gallery-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
  align-content: start;
  overflow: auto;
}

.g-tile {
  position: relative;
  padding: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font: inherit;
  color: var(--black);
}
.g-tile:hover { outline: 1px dotted var(--blue); }
.g-item img { width: 100%; height: 100%; object-fit: cover; }
.g-play {
  position: absolute;
  font-size: 26px;
  color: var(--white);
  text-shadow: 0 0 4px #000, 0 0 8px #000;
  pointer-events: none;
}
.g-folder { background: var(--gray-light); gap: 2px; }
.g-fico { font-size: 36px; line-height: 1; }
.g-name { font-size: 10px; padding: 0 3px; word-break: break-word; line-height: 1.1; max-height: 2.3em; overflow: hidden; }

.gallery-msg { color: var(--gray-dark); font-size: 11px; margin: 12px 4px; }

/* ─── Lightbox ────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-stage { max-width: 90vw; max-height: 80vh; display: flex; align-items: center; justify-content: center; }
.lb-stage img, .lb-stage video { max-width: 90vw; max-height: 80vh; box-shadow: 0 0 0 2px var(--white), 4px 4px 0 var(--gray-darker); }
.lb-cap {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80vw;
  background: var(--gray);
  color: var(--black);
  padding: 6px 12px;
  font-size: 12px;
  text-align: center;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
  user-select: text;
}
.lb-close, .lb-nav {
  position: fixed;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
  color: var(--black);
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
}
.lb-close { top: 16px; right: 16px; width: 32px; height: 28px; font-size: 18px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 36px; height: 52px; font-size: 28px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close:active, .lb-nav:active { border-top: 2px solid var(--gray-darker); border-left: 2px solid var(--gray-darker); border-right: 2px solid var(--white); border-bottom: 2px solid var(--white); }

/* ─── Taskbar ─────────────────────────────────────────────────────────────── */

.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 9999;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  height: 24px;
  background: var(--gray);
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-right: 1px solid var(--gray-darker);
  border-bottom: 1px solid var(--gray-darker);
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  color: var(--black);
}

.start-btn:active, .start-btn[aria-pressed="true"] {
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  padding: 1px 7px 0 9px;
}

.start-text { line-height: 1; }

.task-list {
  flex: 1;
  display: flex;
  gap: 3px;
  padding: 0 4px;
  overflow: hidden;
}

.task-btn {
  height: 24px;
  padding: 0 8px;
  background: var(--gray);
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-right: 1px solid var(--gray-darker);
  border-bottom: 1px solid var(--gray-darker);
  cursor: pointer;
  font-size: 11px;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 120px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-btn.active {
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
  background: var(--gray-light);
}

.systray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 24px;
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

.sys-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.clock {
  font-family: 'Lucida Console', 'Consolas', monospace;
  font-size: 11px;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

/* ─── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .desktop {
    grid-template-columns: repeat(auto-fill, 76px);
    grid-auto-rows: 84px;
    padding: 8px;
  }
  .icon { width: 76px; height: 84px; }
  .window {
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 80px) !important;
    left: 8px !important;
    top: 8px !important;
  }
  .task-btn { min-width: 80px; max-width: 100px; }
  .start-text { display: none; }
}

/* ─── v2 additions: buttons, folder blurbs, shop, music launch ───────────── */
.ms-button {
  display: inline-block;
  padding: 5px 14px;
  background: var(--gray);
  color: var(--black);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
}
.ms-button:active {
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}
.music-launch { margin: 14px 0; text-align: center; }

.g-blurb {
  flex-basis: 100%;
  width: 100%;
  margin: 0 0 6px;
  padding: 4px 6px;
  background: var(--yellow);
  border: 1px solid var(--gray-dark);
  font-style: italic;
}
.g-glyph { font-size: 34px; line-height: 1; }

/* Shop window */
.shop { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.shop-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 6px; }
.shop-tab {
  font: inherit;
  padding: 3px 10px;
  background: var(--gray);
  cursor: pointer;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
}
.shop-tab.active {
  background: var(--gray-light);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}
.shop-grid {
  display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
  overflow: auto; flex: 1; min-height: 0; padding: 2px;
}
.shop-item { position: relative; width: 132px; }
.shop-item img { width: 100%; height: 90px; object-fit: cover; background: var(--black); }
.shop-price {
  display: block; font-weight: bold; color: var(--blue);
  background: var(--yellow); padding: 1px 4px; margin-top: 2px;
}
.shop-price.big { font-size: 15px; display: inline-block; }
.shop-badge {
  position: static; display: inline-block;
  background: #a00000; color: var(--white);
  padding: 1px 6px; font-size: 11px; margin-top: 2px;
}
.shop-item.sold-out img { filter: grayscale(1); opacity: .6; }
.shop-detail { overflow: auto; flex: 1; min-height: 0; padding: 4px; }
.shop-pics { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.shop-pics img {
  width: 150px; height: 110px; object-fit: cover; cursor: pointer;
  border: 2px solid var(--gray-darker); background: var(--black);
}
.shop-title { margin: 6px 0 2px; }
.shop-desc { white-space: pre-wrap; }
.buy-btn { margin-top: 8px; font-weight: bold; }
.shop-msg { padding: 8px; }

/* ─── v2 wave: wallpaper dialog · clock · alarm ───────────────────────────
   z-order ladder: #clock-widget 5 < windows (topZ ≥ 10) < taskbar 9999
   < #ctx-menu 99990 < lightbox 99999 */

/* Context menu */
#ctx-menu {
  position: fixed;
  z-index: 99990;
  min-width: 150px;
  padding: 2px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
  box-shadow: 2px 2px 0 var(--gray-dark);
}
#ctx-menu[hidden] { display: none; }
.ctx-item {
  display: block;
  width: 100%;
  padding: 4px 20px 4px 24px;
  border: 0;
  background: none;
  font: inherit;
  color: var(--black);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.ctx-item:hover:not(.disabled) { background: var(--blue); color: var(--white); }
.ctx-item.disabled {
  color: var(--gray-dark);
  text-shadow: 1px 1px 0 var(--white);
  cursor: default;
}
.ctx-sep {
  margin: 3px 2px;
  border-top: 1px solid var(--gray-dark);
  border-bottom: 1px solid var(--white);
}

/* Clock widget (z 5: above icons, below every window) */
#clock-widget {
  position: fixed;
  top: 8px;
  right: 8px;
  width: 52px;
  height: 52px;
  z-index: 5;
  padding: 3px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
  cursor: pointer;
}
/* Sunken bezel framing the round dial; the dial's own cream face fills it,
   so only the corners show this gray frame. */
.cw-face {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: var(--gray);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
.cw-clock { display: block; width: 100%; height: 100%; }
/* Armed-alarm bell, overlaid on the top-right of the dial. */
.cw-bell {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  display: block;
}
.cw-bell[hidden] { display: none; }
#clock[tabindex] { cursor: pointer; }

/* Display Properties (#display-props) */
.dp-monitor {
  width: 190px;
  margin: 2px auto 0;
  padding: 10px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
}
.dp-preview {
  height: 104px;
  background-color: var(--teal); /* teal underlay, like the real desktop */
  border: 2px solid var(--black);
}
.dp-stand {
  width: 42px;
  height: 12px;
  margin: 0 auto;
  background: var(--gray);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
}
.dp-base {
  width: 90px;
  height: 8px;
  margin: 0 auto 8px;
  background: var(--gray);
  border-top: 1px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
}
.dp-list {
  height: 118px;
  overflow: auto;
  background: var(--white);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
.dp-row {
  display: block;
  width: 100%;
  padding: 3px 6px;
  border: 0;
  background: none;
  font: inherit;
  color: var(--black);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-row.sel { background: var(--blue); color: var(--white); }
.dp-note { margin: 4px 0; }
.dp-fit-row { margin: 8px 0; }
.dp-fit-row select { font: inherit; }
.dp-btns { display: flex; gap: 6px; justify-content: flex-end; }

/* Alarm window (#alarm-window) */
.alarm-lcd {
  background: var(--black);
  color: #8f8;
  font-family: 'Lucida Console', 'Consolas', monospace;
  font-size: 28px;
  letter-spacing: 2px;
  text-align: center;
  padding: 10px 0;
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}
.alarm-lcd.ringing { animation: alarm-lcd-flash 1s steps(1) infinite; }
@keyframes alarm-lcd-flash {
  0%, 49% { background: var(--black); color: #8f8; }
  50%, 100% { background: #a00000; color: var(--white); }
}
.alarm-ring { margin: 8px 0; text-align: center; }
.alarm-ring[hidden] { display: none; }
.alarm-ring-label {
  font-weight: bold;
  margin: 2px 0 8px;
  animation: alarm-label-blink 1s steps(1) infinite;
}
@keyframes alarm-label-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}
.alarm-ring .ms-button { margin: 0 4px; }
.alarm-set {
  margin: 10px 0 6px;
  border: 2px groove var(--white); /* Win95 etched group box */
  padding: 8px;
}
.alarm-set legend { padding: 0 4px; }
.alarm-row { margin: 6px 0; display: flex; align-items: center; gap: 6px; }
.alarm-row input, .alarm-row select { font: inherit; }
.alarm-status { font-weight: bold; }
.alarm-note { margin-top: 4px; }
.alarm-notif { margin-top: 6px; font-size: 11px; }
.alarm-notif[hidden] { display: none; }

/* Ringing taskbar button flash (gray ↔ yellow) */
.task-btn-alert { animation: task-btn-alert-flash 1s steps(1) infinite; }
@keyframes task-btn-alert-flash {
  0%, 49% { background: var(--gray); }
  50%, 100% { background: var(--yellow); }
}

/* ≤900 px: hide the widget; the systray clock is the alarm entry point */
@media (max-width: 900px) {
  #clock-widget { display: none; }
  #clock { padding: 4px 2px; }
}

/* ─── v2 wave: radio ────────────────────────────────────────────────────────
   Win95 hi-fi tuner window: a VFD strip with a status LED, a fake CSS VU
   meter (animated only while .vu-on — a real 'playing' event), the always-8
   preset bank (4×2, 2×4 ≤600 px), transport + volume, credit + status lines,
   and the #radio-tray systray glyph. Reuses the shared bevel + colour vars. */

.radio {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 8px;
}

/* VFD strip — sunken dark-green phosphor panel */
.radio-vfd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #041a07;
  color: #33ff66;
  font-family: 'Lucida Console', 'Consolas', monospace;
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}
.radio-led {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-dark);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, .6);
}
.radio-led[data-led="idle"]   { background: var(--gray-dark); }
.radio-led[data-led="on"]     { background: #23e33a; box-shadow: 0 0 5px #23e33a; }
.radio-led[data-led="off"]    { background: #ff3030; box-shadow: 0 0 5px #ff3030; }
.radio-led[data-led="tuning"] {
  background: #ffb020;
  animation: radio-led-blink 0.6s steps(1) infinite;
}
@keyframes radio-led-blink {
  0%, 49%   { background: #ffb020; box-shadow: 0 0 5px #ffb020; }
  50%, 100% { background: #5a3d00; box-shadow: none; }
}
.radio-name {
  flex: 1 1 auto;
  font-size: 13px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 4px rgba(51, 255, 102, .5);
}
.radio-state {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 1px;
}

/* Fake VU meter — 10 bars, only animated while a stream is actually playing */
.radio-vu {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  padding: 3px 6px;
  background: var(--black);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
.radio-bar {
  flex: 1 1 auto;
  height: 12%;
  background: #1f9c3a;
  opacity: 0.5;
}
.radio.vu-on .radio-bar {
  opacity: 1;
  animation: radio-vu 0.9s ease-in-out infinite alternate;
}
@keyframes radio-vu {
  0%   { height: 10%; background: #1f9c3a; }
  100% { height: 95%; background: #7dff9e; }
}
/* Out-of-phase so the bars dance rather than pulse in unison */
.radio.vu-on .radio-bar:nth-child(1)  { animation-duration: 0.70s; animation-delay: -0.05s; }
.radio.vu-on .radio-bar:nth-child(2)  { animation-duration: 1.05s; animation-delay: -0.30s; }
.radio.vu-on .radio-bar:nth-child(3)  { animation-duration: 0.85s; animation-delay: -0.55s; }
.radio.vu-on .radio-bar:nth-child(4)  { animation-duration: 1.20s; animation-delay: -0.10s; }
.radio.vu-on .radio-bar:nth-child(5)  { animation-duration: 0.65s; animation-delay: -0.40s; }
.radio.vu-on .radio-bar:nth-child(6)  { animation-duration: 1.10s; animation-delay: -0.20s; }
.radio.vu-on .radio-bar:nth-child(7)  { animation-duration: 0.80s; animation-delay: -0.50s; }
.radio.vu-on .radio-bar:nth-child(8)  { animation-duration: 1.00s; animation-delay: -0.15s; }
.radio.vu-on .radio-bar:nth-child(9)  { animation-duration: 0.75s; animation-delay: -0.35s; }
.radio.vu-on .radio-bar:nth-child(10) { animation-duration: 1.15s; animation-delay: -0.25s; }

/* Preset bank — always 8 chunky buttons, 4×2 (2×4 ≤600 px) */
.radio-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.radio-preset {
  padding: 7px 4px;
  font: inherit;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.4px;
  color: var(--black);
  background: var(--gray);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
}
.radio-preset:active,
.radio-preset.active {
  background: var(--gray-light);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}
.radio-preset.active { color: var(--blue); }
.radio-preset:disabled {
  color: var(--gray-dark);
  text-shadow: 1px 1px 0 var(--white);
  cursor: default;
  opacity: 0.7;
}

/* Transport + volume */
.radio-transport {
  display: flex;
  align-items: center;
  gap: 8px;
}
.radio-transport .ms-button { font-weight: bold; }
.radio-vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  font-size: 11px;
}
.radio-vol { flex: 1 1 auto; min-width: 60px; }

/* Credit + status lines */
.radio-credit {
  flex: 1 1 auto;
  margin: 0;
  font-size: 11px;
  color: var(--gray-darker);
  min-height: 14px;
}
.radio-credit-link { color: var(--blue); }
.radio-status {
  margin: 0;
  padding: 3px 6px;
  font-size: 11px;
  background: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}

/* Systray glyph (#radio-tray) — present only while a stream is playing */
#radio-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  padding: 0;
  background: var(--gray);
  cursor: pointer;
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-right: 1px solid var(--gray-darker);
  border-bottom: 1px solid var(--gray-darker);
}
#radio-tray:active {
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
#radio-tray svg { width: 16px; height: 16px; display: block; }

@media (max-width: 600px) {
  .radio-presets { grid-template-columns: repeat(2, 1fr); }
  .radio-transport { flex-wrap: wrap; }
}

/* ─── v2 wave: notepad ──────────────────────────────────────────────────────
   Win95 Notepad window: a menu bar, a note-list pane, a monospace textarea, a
   status bar, a sign-in banner strip, and the About (privacy) panel. Notes
   live in the visitor's OWN Google Drive appDataFolder — never on this server.
   Reuses the shared bevel + colour vars. */

.notepad {
  position: relative;      /* anchors the .np-about overlay */
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* Menu bar */
.np-menubar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--gray-dark);
}
.np-menu {
  padding: 2px 9px;
  border: 1px solid transparent;
  background: none;
  font: inherit;
  color: var(--black);
  cursor: pointer;
}
.np-menu:hover, .np-menu:focus { background: var(--blue); color: var(--white); outline: none; }
.np-chip {
  margin-left: auto;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--blue);
  background: var(--gray-light);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
.np-chip[hidden] { display: none; }

/* Sign-in / reconnect / offline banner strip */
.np-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  margin-bottom: 6px;
  background: var(--yellow);
  border: 1px solid var(--gray-dark);
  font-size: 11px;
}
.np-banner[hidden] { display: none; }
.np-banner-text { flex: 1 1 auto; line-height: 1.35; }
.np-banner-btn { flex: 0 0 auto; padding: 3px 10px; }

/* Main pane: note list (left) + monospace editor (right) */
.np-main {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
}
.np-list {
  flex: 0 0 148px;
  width: 148px;
  overflow: auto;
  background: var(--white);
  border-top: 1px solid var(--gray-darker);
  border-left: 1px solid var(--gray-darker);
  border-right: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
.np-note {
  display: block;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 11px;
  color: var(--black);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-note.active { background: var(--blue); color: var(--white); }
.np-empty { padding: 8px; font-size: 11px; }

.np-text {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
  padding: 6px 8px;
  font-family: 'Lucida Console', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--black);
  background: var(--white);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  overflow: auto;
}
.np-text:focus { outline: 1px dotted var(--blue); }

/* Status bar: sync state (left) + Ln/Col/chars (right) */
.np-status {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 2px 6px;
  font-size: 11px;
  background: var(--gray);
  border-top: 1px solid var(--gray-dark);
}
.np-sync { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-pos { flex: 0 0 auto; font-family: 'Lucida Console', 'Consolas', monospace; }

/* About (privacy) panel — overlays the editor area */
.np-about {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}
.np-about[hidden] { display: none; }
.np-about-box {
  max-width: 320px;
  margin: 0 12px;
  padding: 12px 14px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
  box-shadow: 2px 2px 0 var(--gray-dark);
}
.np-about-title { margin: 0 0 8px; font-size: 13px; }
.np-about-box p { font-size: 11px; margin: 0 0 8px; line-height: 1.5; }
.np-about-close { display: block; margin: 4px auto 0; }

@media (max-width: 600px) {
  .np-main { flex-direction: column; }
  .np-list { flex: 0 0 84px; width: 100%; height: 84px; }
}

/* ─── v2 wave: nicecream.fm launcher ─────────────────────────────────────────
   Stateless card: three color channels that open nicecream.fm's own player in
   a new tab. Buttons reuse the standard Win95 outset bevel; each carries a
   channel-tinted dot so green/red/blue read at a glance. */
.nicecream {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 6px;
}
.nc-tagline {
  margin: 0 0 14px 0;
  font-size: 12px;
  font-style: italic;
  color: var(--gray-darker);
}
.nc-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.nc-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 84px;
  justify-content: center;
  padding: 8px 16px;
  background: var(--gray);
  color: var(--black);
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-right: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--gray-darker);
}
.nc-btn:active {
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
}
.nc-btn:focus { outline: 1px dotted var(--black); outline-offset: -4px; }
.nc-dot {
  width: 11px;
  height: 11px;
  border: 1px solid var(--black);
  border-radius: 50%;
  flex: 0 0 auto;
}
.nc-green .nc-dot { background: #3fae57; }
.nc-red   .nc-dot { background: #e0524c; }
.nc-blue  .nc-dot { background: #4a82c8; }
.nc-foot {
  margin: 16px 0 0 0;
  font-size: 11px;
  color: var(--gray-darker);
}

/* ─── v2 wave: mix.nikosoft.org shortcut ─────────────────────────────────────
   Stateless launcher card — one link out to the owner's gated DJ mixer. */
.mixlaunch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 6px;
}
.mix-tagline {
  margin: 0 0 14px 0;
  font-size: 12px;
  font-style: italic;
  color: var(--gray-darker);
}
.mix-btn {
  font-size: 13px;
  padding: 9px 20px;
}
.mix-foot {
  margin: 16px 0 0 0;
  font-size: 11px;
  color: var(--gray-darker);
}
