/* =========================================================================
   Simple Works — the demos: the desktop with the real panels (home page) and each app's stage, the
   animated screen that stays put while the story beside it scrolls (story.js and assets/demos/).
   Everything here is drawn with CSS: no video, no animated image.
   ========================================================================= */

/* ---------- a desktop, a menu bar, windows ---------- */
.mbar {
  position: relative; z-index: 3; height: 28px; padding: 0 8px 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; color: #1d1d1f;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
}
@media (prefers-color-scheme: dark) { .mbar { background: rgba(20, 20, 26, .5); color: #f5f5f7; } }
.mbar-left { display: flex; gap: 18px; white-space: nowrap; overflow: hidden; }
.mbar-left b { font-weight: 700; }
.mbar-right { display: flex; align-items: center; gap: 2px; }
.mb-item {
  height: 22px; min-width: 30px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: inherit; cursor: pointer;
  transition: background-color .2s;
}
.mb-item svg { width: 15px; height: 15px; }
.mb-item[aria-expanded="true"] { background: rgba(0, 0, 0, .14); }
@media (prefers-color-scheme: dark) { .mb-item[aria-expanded="true"] { background: rgba(255, 255, 255, .22); } }
.mb-item:focus-visible { outline-offset: 0; }
.mb-sys { display: inline-flex; align-items: center; gap: 8px; margin: 0 6px 0 8px; }
.mb-wifi { width: 15px; height: 15px; }
.mb-batt { width: 24px; height: 18px; }
.mb-clock { font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 4px; padding-right: 4px; }
.mbar-mini { height: 24px; font-size: 12px; padding: 0 6px 0 12px; }
.mbar-mini .mb-item { cursor: default; height: 20px; }
.mbar-mini .mb-item svg { width: 13px; height: 13px; }
.mbar-mini .mb-clock { font-size: 12px; }

:root { --win: #ffffff; --win-2: #f4f4f6; --shadow-win: 0 22px 50px -18px rgba(0, 0, 0, .38), 0 0 0 .5px rgba(0, 0, 0, .18); }
@media (prefers-color-scheme: dark) { :root { --win: #232326; --win-2: #2c2c30; --shadow-win: 0 22px 50px -18px rgba(0, 0, 0, .8), 0 0 0 .5px rgba(255, 255, 255, .16); } }
.win-bar { height: 22px; display: flex; align-items: center; gap: 6px; padding: 0 9px; background: var(--win-2); border-bottom: 1px solid var(--line); }
.win-bar i, .lights i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; flex: none; }
.win-bar i:nth-child(2), .lights i:nth-child(2) { background: #febc2e; }
.win-bar i:nth-child(3), .lights i:nth-child(3) { background: #28c840; }
.win-bar .url { flex: 0 1 46%; height: 12px; border-radius: 6px; background: var(--skel); margin-left: 14px; }

/* ---------- home: the desktop with the real panels ---------- */
.desk { margin: clamp(48px, 7vw, 88px) auto 0; max-width: 1040px; }
.desk-screen {
  --ddw: min(320px, calc(100vw - 96px));
  position: relative; border-radius: 18px; overflow: hidden; height: 560px;
  background:
    radial-gradient(60% 80% at 8% 100%, #ffc9d6 0%, transparent 60%),
    radial-gradient(60% 90% at 50% 110%, #c9dcff 0%, transparent 60%),
    radial-gradient(50% 80% at 100% 40%, #dccdff 0%, transparent 60%),
    linear-gradient(180deg, #eef0f8, #e7e4f3);
  box-shadow: var(--shadow-lg);
  outline: 1px solid var(--line); outline-offset: -1px;
}
@media (prefers-color-scheme: dark) {
  .desk-screen {
    background:
      radial-gradient(60% 80% at 8% 100%, #5b1a2c 0%, transparent 60%),
      radial-gradient(60% 90% at 50% 110%, #16336a 0%, transparent 60%),
      radial-gradient(50% 80% at 100% 40%, #34216b 0%, transparent 60%),
      linear-gradient(180deg, #121219, #0b0b12);
  }
}
.dd {
  position: absolute; z-index: 2; top: 34px; right: 12px; left: var(--ddx, auto); width: var(--ddw);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 28px 70px -18px rgba(0, 0, 0, .42), 0 0 0 .5px rgba(0, 0, 0, .22);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: 70% 0;
  transition: opacity .25s ease, transform .45s var(--ease), visibility 0s linear .45s;
}
@media (prefers-color-scheme: dark) { .dd { box-shadow: 0 28px 70px -18px rgba(0, 0, 0, .9), 0 0 0 .5px rgba(255, 255, 255, .2); } }
.dd.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dd img { width: 100%; }
/* A panel taller than the desktop (Mixtape's) is cut at the bottom with a fade, as if it went on. */
.dd { max-height: calc(100% - 46px); }
.dd.is-tall { -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }
.desk-win {
  position: absolute; z-index: 1; left: 5%; top: 64px; width: 48%; height: calc(100% - 128px);
  border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--win) 82%, transparent);
  box-shadow: var(--shadow-win); opacity: .9;
}
.desk-win .win-bar { height: 28px; padding: 0 12px; gap: 7px; }
.desk-win .win-bar i { width: 11px; height: 11px; }
.desk-win-body { display: flex; height: calc(100% - 28px); }
.desk-win-side { width: 28%; background: color-mix(in srgb, var(--win-2) 80%, transparent); border-right: 1px solid var(--line); }
.desk-win-main { flex: 1; padding: 8% 8%; display: flex; flex-direction: column; gap: 18px; }
.desk-win-main i { display: block; height: 12px; border-radius: 6px; background: var(--skel); }
.desk-win-main i:nth-child(1) { width: 46%; height: 20px; background: linear-gradient(90deg, color-mix(in srgb, var(--b1) 40%, var(--skel)), color-mix(in srgb, var(--b3) 40%, var(--skel))); }
.desk-win-main i:nth-child(2) { width: 88%; }
.desk-win-main i:nth-child(3) { width: 72%; }
.desk-win-main i:nth-child(4) { width: 80%; }
.desk-caption { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 18px; }

/* ---------- the story: a stage that stays put while the steps scroll ---------- */
.story {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(56px, 8vw, 104px);
}
.story-stage {
  grid-column: 2; grid-row: 1; align-self: start; position: sticky; z-index: 2;
  top: calc(var(--header-h) + max(20px, (100vh - var(--header-h) - 600px) / 2));
}
.story-steps { grid-column: 1; grid-row: 1; list-style: none; margin: 0; padding: 0; }
.step {
  min-height: 78vh; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 6vh 0; opacity: .28; transition: opacity .45s ease;
}
.step:first-child { min-height: 64vh; justify-content: flex-start; padding-top: 12vh; }
.step:last-child { min-height: 70vh; }
html:not(.js) .step, .step.is-active { opacity: 1; }
.step-kicker { font-size: 15px; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.step h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.028em; }
.step p:not(.step-kicker) { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); max-width: 30em; }
.story-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.story-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--skel); cursor: pointer;
  transition: width .35s var(--ease), background-color .35s;
}
.story-dots button.is-active { width: 24px; background: var(--ink); }

.stage { margin: 0; }
.screen {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; isolation: isolate; container-type: size;
  box-shadow: var(--shadow-lg); outline: 1px solid var(--line); outline-offset: -1px;
  background: var(--wall);
}
[data-app="music-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #ffd3dd, transparent 70%), radial-gradient(70% 70% at 100% 100%, #ffe1d6, transparent 70%), linear-gradient(160deg, #fbeef2, #f4e7ef); }
[data-app="window-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #d2e4ff, transparent 70%), radial-gradient(70% 70% at 100% 100%, #dcd8ff, transparent 70%), linear-gradient(160deg, #edf3fd, #e5ebf8); }
[data-app="screenshot-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #e2d6ff, transparent 70%), radial-gradient(70% 70% at 100% 100%, #ffd8f1, transparent 70%), linear-gradient(160deg, #f2eefd, #ece6f8); }
[data-app="contacts-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #c8f0ea, transparent 70%), radial-gradient(70% 70% at 100% 100%, #d6e8ff, transparent 70%), linear-gradient(160deg, #ecf8f6, #e5f0f2); }
[data-app="mixtape"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #ffe0c2, transparent 70%), radial-gradient(70% 70% at 100% 100%, #ffd3dd, transparent 70%), linear-gradient(160deg, #fdf2ea, #f7eae6); }
[data-app="water-break"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #cdeffa, transparent 70%), radial-gradient(70% 70% at 100% 100%, #d8f3ee, transparent 70%), linear-gradient(160deg, #eef8fb, #e6f2f5); }
@media (prefers-color-scheme: dark) {
  [data-app="music-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #4a1323, transparent 70%), radial-gradient(70% 70% at 100% 100%, #3a1a14, transparent 70%), linear-gradient(160deg, #171013, #100c10); }
  [data-app="window-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #12305e, transparent 70%), radial-gradient(70% 70% at 100% 100%, #261d5a, transparent 70%), linear-gradient(160deg, #0d1220, #0b0e18); }
  [data-app="screenshot-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #2d1d63, transparent 70%), radial-gradient(70% 70% at 100% 100%, #4a1740, transparent 70%), linear-gradient(160deg, #120f1d, #0e0c16); }
  [data-app="contacts-keys"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #0c3d37, transparent 70%), radial-gradient(70% 70% at 100% 100%, #12305e, transparent 70%), linear-gradient(160deg, #0b1514, #0b1014); }
  [data-app="mixtape"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #4a2410, transparent 70%), radial-gradient(70% 70% at 100% 100%, #4a1323, transparent 70%), linear-gradient(160deg, #181110, #120c0c); }
  [data-app="water-break"] .screen { --wall: radial-gradient(70% 70% at 0% 0%, #0b3a48, transparent 70%), radial-gradient(70% 70% at 100% 100%, #0f3a33, transparent 70%), linear-gradient(160deg, #0b1316, #0b1013); }
}

.stage-chip {
  position: absolute; z-index: 6; left: 50%; bottom: 12px; transform: translateX(-50%);
  max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text);
  background: var(--glass); box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .35), 0 0 0 .5px var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: opacity .35s ease;
}
.toast { opacity: 0; }
.toast.is-on { opacity: 1; }
.toast-top { top: 34px; bottom: auto; }
.stage-hint { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 10px; }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
.is-ping::after {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 3px var(--a1), 0 0 24px 2px var(--a1); animation: ping .8s var(--ease) forwards;
}
.g-pause { display: none; }

/* buttons under a stage: a key you can click */
.keys-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.key-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 11px 6px 10px; cursor: pointer;
  border-radius: 14px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .25s ease, transform .2s var(--ease);
}
.alt .key-btn { background: var(--bg); }
.key-btn:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a2) 45%, transparent); }
.key-btn:active { transform: scale(.97); }
.key-btn .combo kbd { min-width: 26px; height: 26px; font-size: 13px; padding: 0 5px; border-radius: 6px; }
.key-label { font-size: 12px; color: var(--text-2); font-weight: 500; line-height: 1.2; text-align: center; }
.key-btn.is-lit { box-shadow: inset 0 0 0 1.5px var(--a2); }
.key-btn.is-lit .key-label { color: var(--ink); }

/* ---------- Music Keys ---------- */
.fkeys { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.fkey {
  position: relative; isolation: isolate; width: 68px; height: 54px; border-radius: 11px; border: 1px solid var(--key-border);
  background: var(--key-bg); box-shadow: var(--key-shadow); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: transform .12s ease, box-shadow .12s ease, color .2s;
}
.fkey svg { width: 20px; height: 20px; }
.fkey span { font-size: 10px; color: var(--text-2); font-weight: 500; }
.fkey::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: linear-gradient(180deg, var(--a1), var(--a2)); opacity: 0; transition: opacity .25s ease;
}
.fkey.is-pressed { transform: translateY(2px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 28%, transparent); color: #fff; }
.fkey.is-pressed::before { opacity: 1; }
.fkey.is-pressed span { color: rgba(255, 255, 255, .85); }

.mk-browser {
  position: absolute; left: 5%; top: 13%; width: 60%; height: 64%; z-index: 1;
  background: var(--win); border-radius: 10px; box-shadow: var(--shadow-win);
  transition: opacity .5s ease, transform .6s var(--ease);
}
.mk-browser .win-bar { border-radius: 10px 10px 0 0; }
.mk-video {
  position: relative; margin: 10px; border-radius: 8px; aspect-ratio: 16 / 8.2; overflow: hidden;
  background: linear-gradient(135deg, #2a2a33, #4b4b58 55%, #2f2f3a);
  display: flex; align-items: center; justify-content: center;
}
.mk-video::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%);
  transform: translateX(-100%);
}
.mk-browser.is-on .mk-video::before { opacity: 1; animation: sweep 2.4s linear infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.mk-video-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .2); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mk-video-btn svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.mk-video-bar { position: absolute; left: 10px; right: 10px; bottom: 9px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.mk-video-bar span { display: block; height: 100%; background: #ff3b30; transform-origin: 0 50%; transform: scaleX(.18); }
.mk-browser.is-on .mk-video-bar span { animation: vprog 14s linear infinite; }
@keyframes vprog { from { transform: scaleX(.18); } to { transform: scaleX(1); } }
.mk-lines { padding: 0 10px; display: grid; gap: 7px; }
.mk-lines i { display: block; height: 8px; border-radius: 4px; background: var(--skel); width: 70%; }
.mk-lines i:last-child { width: 45%; }
.mk-browser.is-on .mk-video-btn .g-play { display: none; }
.mk-browser.is-on .mk-video-btn .g-pause { display: block; }
.mk-player {
  position: absolute; right: 5%; bottom: 21%; width: 52%; z-index: 2;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 11px;
  padding: 11px 14px 11px 11px; border-radius: 14px; background: var(--win); box-shadow: var(--shadow-win);
  transition: opacity .5s ease, transform .6s var(--ease);
}
.mk-art { width: 46px; height: 46px; border-radius: 8px; background: var(--art, linear-gradient(135deg, #5b5bd6, #c04f9a)); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); transition: opacity .3s; }
.mk-meta { display: grid; min-width: 0; line-height: 1.25; }
.mk-meta b, .mk-meta small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-meta b { font-size: 14px; }
.mk-meta small { font-size: 12px; color: var(--text-2); }
.mk-pp { width: 30px; height: 30px; display: grid; place-items: center; color: var(--text); }
.mk-pp svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.mk-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.mk-eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--a2); transform-origin: 50% 100%; transform: scaleY(.25); }
.music-on .mk-eq i { animation: eq .9s ease-in-out infinite alternate; }
.music-on .mk-eq i:nth-child(2) { animation-delay: -.3s; }
.music-on .mk-eq i:nth-child(3) { animation-delay: -.6s; }
.music-on .mk-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.music-on .mk-pp .g-play { display: none; }
.music-on .mk-pp .g-pause { display: block; }
/* the menu bar icon shows what ⏯ would do, like the Music app's own buttons */
.mk-glyph .g-pause, .mk-zoom-glyph .g-pause, .mk-zoom-label .l-play { display: none; }
.mk-glyph .g-play, .mk-zoom-glyph .g-play { display: block; }
.music-on .mk-glyph .g-pause, .music-on .mk-zoom-glyph .g-pause { display: block; }
.music-on .mk-glyph .g-play, .music-on .mk-zoom-glyph .g-play { display: none; }
.music-on .mk-zoom-label .l-play { display: inline; }
.music-on .mk-zoom-label .l-pause { display: none; }
.mk-zoom {
  position: absolute; inset: 24px 0 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s;
}
.mk-zoom-bar {
  display: flex; align-items: center; gap: 22px; padding: 0 26px 0 14px; height: 68px; border-radius: 18px;
  font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums;
  background: var(--glass); box-shadow: var(--shadow-md); color: var(--text);
  transform: scale(.92); transition: transform .6s var(--ease);
}
.mk-zoom-glyph { position: relative; width: 58px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--text) 12%, transparent); }
.mk-zoom-glyph svg { width: 26px; height: 26px; grid-area: 1 / 1; }
.mk-zoom-sys { display: flex; align-items: center; gap: 14px; }
.mk-zoom-sys svg { width: 28px; height: 28px; }
.mk-zoom-sys svg + svg { width: 40px; }
.mk-zoom-label { font-size: 15px; font-weight: 600; color: var(--text-2); }
.mk-stage .stage-chip span { display: none; }
.mk-stage[data-step="0"] .chip-0, .mk-stage[data-step="1"] .chip-1 { display: inline; }
.mk-stage[data-step="2"] .stage-chip { opacity: 0; }
.mk-stage[data-step="1"] .mk-browser { opacity: .5; transform: scale(.985); }
.mk-stage[data-step="2"] .mk-zoom { opacity: 1; visibility: visible; transition-delay: 0s; }
.mk-stage[data-step="2"] .mk-zoom-bar { transform: none; }

/* ---------- Window Keys ---------- */
.wk-area { position: absolute; inset: 24px 0 58px; z-index: 1; }
.wk-win {
  --x: .12; --y: .1; --w: .52; --h: .66;
  position: absolute; inset: 0; transform-origin: 0 0;
  transform: translate(calc(var(--x) * 100%), calc(var(--y) * 100%)) scale(var(--w), var(--h));
  background: var(--win); border-radius: 9px; box-shadow: var(--shadow-win); overflow: hidden;
  transition: transform .6s var(--ease), opacity .3s ease; will-change: transform;
}
.wk-win.no-anim, .wk-win.no-anim .wk-bar, .wk-win.no-anim .lights { transition: none; }
.wk-bar {
  position: relative; z-index: 1; height: 24px; background: var(--win-2); border-bottom: 1px solid var(--line);
  transform-origin: 0 0; transform: scaleY(calc(1 / var(--h))); transition: transform .6s var(--ease);
}
.wk-bar .lights { display: flex; align-items: center; gap: 6px; height: 100%; padding-left: 10px; transform-origin: 0 50%; transform: scaleX(calc(1 / var(--w))); transition: transform .6s var(--ease); }
.wk-body { position: absolute; inset: 0; display: flex; }
.wk-side { width: 26%; background: color-mix(in srgb, var(--win-2) 80%, var(--a1) 6%); border-right: 1px solid var(--line); }
.wk-main { flex: 1; padding: 13% 7% 0; display: flex; flex-direction: column; gap: 7%; }
.wk-main i { display: block; height: 6%; border-radius: 4px; background: var(--skel); }
.wk-main i:nth-child(1) { width: 55%; height: 9%; background: color-mix(in srgb, var(--a2) 35%, var(--skel)); }
.wk-main i:nth-child(2) { width: 90%; }
.wk-main i:nth-child(3) { width: 75%; }
.wk-main i:nth-child(4) { width: 84%; }
.wk-main i:nth-child(5) { width: 40%; }
.dock {
  position: absolute; z-index: 2; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px; border-radius: 15px;
  background: var(--glass); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35), 0 0 0 .5px var(--line);
}
.dock i { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(160deg, #9aa3b5, #6b7385); }
.dock i:nth-child(1) { background: linear-gradient(160deg, #6fb2ff, #2f6fe0); }
.dock i:nth-child(2) { background: linear-gradient(160deg, #ffd36b, #f2a311); }
.dock i:nth-child(3) { background: linear-gradient(180deg, #ff5f57 0 30%, #fff 30%); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); }
.dock i:nth-child(4) { background: linear-gradient(160deg, #7be08e, #26a647); }
.dock i:nth-child(5) { background: linear-gradient(160deg, #c49bff, #7a4be6); }

/* ---------- Screenshot Keys ---------- */
.sk-doc {
  position: absolute; left: 6%; top: 13%; width: 68%; height: 68%; z-index: 1;
  background: var(--win); border-radius: 10px; box-shadow: var(--shadow-win); overflow: hidden; transition: opacity .5s ease;
}
.sk-doc-body { padding: 12px; display: flex; flex-direction: column; gap: 9px; height: calc(100% - 22px); }
.sk-hero-block { display: block; height: 34%; border-radius: 8px; background: linear-gradient(120deg, color-mix(in srgb, var(--a1) 55%, #fff), color-mix(in srgb, #ff9bd2 60%, #fff)); }
@media (prefers-color-scheme: dark) { .sk-hero-block { background: linear-gradient(120deg, #4b2f9c, #7a2d6b); } }
.sk-l { display: block; height: 8px; border-radius: 4px; background: var(--skel); }
.w80 { width: 80%; } .w60 { width: 60%; } .w50 { width: 50%; }
.sk-cards { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sk-cards i { border-radius: 7px; background: var(--win-2); box-shadow: inset 0 0 0 1px var(--line); }
.sk-mail {
  position: absolute; right: 5%; top: 24%; width: 42%; height: 50%; z-index: 2;
  background: var(--win); border-radius: 10px; box-shadow: var(--shadow-win); overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .4s ease, transform .5s var(--ease), visibility 0s linear .5s;
}
.sk-mail .sk-l { margin: 0 12px; }
.sk-mail .win-bar { margin-bottom: 4px; }
.sk-drop { flex: 1; margin: 4px 12px 12px; border-radius: 8px; border: 1.5px dashed color-mix(in srgb, var(--a2) 55%, transparent); background: color-mix(in srgb, var(--a1) 8%, transparent); position: relative; overflow: hidden; }
.sk-drop::after {
  content: ""; position: absolute; inset: 8px; border-radius: 5px; opacity: 0; transform: scale(.9);
  background: linear-gradient(180deg, var(--win-2) 0 14%, transparent 14%), linear-gradient(120deg, color-mix(in srgb, var(--a1) 55%, #fff), #ffc6e5);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .3); transition: opacity .3s ease, transform .4s var(--ease);
}
.sk-drop.has-img::after { opacity: 1; transform: none; }
.sk-sel {
  position: absolute; left: 18%; top: 26%; width: 46%; height: 40%; z-index: 4;
  border: 1.5px dashed rgba(255, 255, 255, .95); outline: 1px solid rgba(0, 0, 0, .35);
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, .28);
  transform-origin: 0 0; transform: scale(0); opacity: 0; transition: transform .55s var(--ease), opacity .25s ease;
}
.sk-sel.is-on { transform: none; opacity: 1; }
.sk-sel.is-rec { border-style: solid; border-color: #ff453a; outline-color: rgba(255, 69, 58, .35); box-shadow: 0 0 0 2000px rgba(0, 0, 0, .18); }
.sk-rec { position: absolute; left: 18%; top: 26%; width: 46%; height: 40%; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .3s; }
.sk-rec.is-on { opacity: 1; }
.cursor {
  position: absolute; left: 0; top: 0; width: 16px; height: 22px; z-index: 8; pointer-events: none;
  background: #111; clip-path: polygon(0 0, 0 78%, 24% 60%, 42% 100%, 56% 94%, 39% 56%, 72% 56%);
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
  transform: translate(var(--cx, 30px), var(--cy, 30px)); transition: transform .8s var(--ease);
}
.sk-ripple {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 3px solid #ffd60a; background: rgba(255, 214, 10, .25);
  transform: translate(var(--rx, 0px), var(--ry, 0px)) scale(.3); opacity: 0;
}
.sk-ripple.is-on { animation: ripple .7s var(--ease); }
@keyframes ripple { 0% { opacity: 1; transform: translate(var(--rx), var(--ry)) scale(.3); } 100% { opacity: 0; transform: translate(var(--rx), var(--ry)) scale(1.4); } }
.sk-flash { position: absolute; inset: 0; z-index: 7; background: #fff; opacity: 0; pointer-events: none; }
.sk-flash.is-on { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.sk-thumbs { position: absolute; right: 12px; bottom: 12px; width: 25%; aspect-ratio: 4 / 3; z-index: 6; transition: opacity .35s ease; }
.sk-thumb {
  position: absolute; inset: 0; border-radius: 7px; border: 2px solid #fff; overflow: hidden;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .25);
  background: var(--wall);
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--ts, 1));
  transition: transform .6s var(--ease), opacity .35s ease;
}
.sk-thumb::before { content: ""; position: absolute; left: 6%; top: 13%; width: 68%; height: 68%; border-radius: 3px; background: linear-gradient(180deg, var(--win-2) 0 9%, var(--win) 9%); box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .3); }
.sk-thumb::after { content: ""; position: absolute; left: 9%; top: 26%; width: 62%; height: 22%; border-radius: 2px; background: linear-gradient(120deg, color-mix(in srgb, var(--a1) 55%, #fff), #ffc6e5); }
.sk-thumb.is-area::before { left: 0; top: 0; width: 100%; height: 100%; border-radius: 0; background: var(--win); }
.sk-thumb.is-area::after { left: 8%; top: 10%; width: 84%; height: 50%; }
.sk-thumb.is-out { opacity: 0; }
.sk-weight {
  position: absolute; z-index: 4; left: 50%; top: 50%; width: min(86%, 440px);
  padding: 22px 22px 18px; border-radius: 16px; background: var(--win); box-shadow: var(--shadow-win);
  opacity: 0; visibility: hidden; transform: translate(-50%, -46%) scale(.97);
  transition: opacity .4s ease, transform .55s var(--ease), visibility 0s linear .55s;
}
.sk-weight-title { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.sk-wrow { display: grid; grid-template-columns: minmax(0, 1fr) 2.6em; grid-template-areas: "l v" "b b"; gap: 6px 10px; margin-bottom: 14px; align-items: end; }
.sk-wlabel { grid-area: l; font-size: 13px; color: var(--text-2); }
.sk-wval { grid-area: v; font-size: 15px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.sk-wbar { grid-area: b; height: 12px; border-radius: 6px; background: var(--skel); overflow: hidden; }
.sk-wbar i { display: block; height: 100%; border-radius: 6px; transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.1s var(--ease) .15s; }
.sk-wbar-png i { background: linear-gradient(90deg, #a1a1a6, #6e6e73); }
.sk-wbar-webp i { background: linear-gradient(90deg, var(--a1), var(--a2)); }
.sk-weight-note { font-size: 12px; color: var(--text-2); }
/* the editor, drawn: a capture with an arrow, numbered steps, a highlight and a redaction */
.sk-editor {
  position: absolute; z-index: 5; left: 50%; top: calc(50% + 12px); width: min(88%, 520px);
  border-radius: 12px; overflow: hidden; background: var(--win); box-shadow: 0 26px 60px -16px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .2);
  opacity: 0; visibility: hidden; transform: translate(-50%, -48%) scale(.97);
  transition: opacity .35s ease, transform .55s var(--ease), visibility 0s linear .55s;
}
.sk-tools { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--win-2); border-bottom: 1px solid var(--line); }
.sk-tools i { width: 22px; height: 18px; border-radius: 5px; background: var(--skel); }
.sk-tools i.on { background: var(--a2); }
.sk-tools b { margin-left: auto; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #fff; background: var(--btn); }
.sk-canvas { position: relative; aspect-ratio: 16 / 9; margin: 10px; border-radius: 6px; background: linear-gradient(180deg, var(--win-2) 0 12%, var(--bg) 12%); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.sk-canvas .sk-l { position: absolute; left: 8%; height: 7%; }
.sk-canvas .l1 { top: 24%; width: 46%; }
.sk-canvas .l2 { top: 40%; width: 64%; }
.sk-canvas .l3 { top: 56%; width: 38%; }
.sk-canvas .l4 { top: 72%; width: 54%; }
.sk-hl { position: absolute; left: 7%; top: 38%; width: 40%; height: 11%; border-radius: 3px; background: rgba(255, 214, 10, .55); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .sk-hl { mix-blend-mode: normal; background: rgba(255, 214, 10, .4); } }
.sk-redact { position: absolute; left: 7%; top: 70%; width: 56%; height: 11%; border-radius: 3px; background: #111; }
.sk-num { position: absolute; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: #ff3b30; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.sk-num.n1 { left: 58%; top: 20%; }
.sk-num.n2 { left: 76%; top: 52%; }
.sk-arrow { position: absolute; left: 60%; top: 30%; width: 26%; height: 3px; border-radius: 2px; background: #ff3b30; transform: rotate(34deg); transform-origin: 0 50%; }
.sk-arrow::after { content: ""; position: absolute; right: -2px; top: 50%; width: 10px; height: 10px; border-right: 3px solid #ff3b30; border-top: 3px solid #ff3b30; transform: translateY(-50%) rotate(45deg); }
.sk-stage[data-step="1"] .sk-mail { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sk-stage[data-step="2"] .sk-weight { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 0s; }
.sk-stage[data-step="2"] .sk-wbar-png i { transform: scaleX(1); }
.sk-stage[data-step="2"] .sk-wbar-webp i { transform: scaleX(.24); }
.sk-stage[data-step="2"] .sk-doc, .sk-stage[data-step="3"] .sk-doc { opacity: .35; }
.sk-stage[data-step="2"] .sk-thumbs, .sk-stage[data-step="3"] .sk-thumbs, .sk-stage[data-step="4"] .sk-thumbs { opacity: 0; }
.sk-stage[data-step="3"] .sk-editor { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 0s; }

/* ---------- small screens: the stage stays at the top, the steps scroll under it ---------- */
/* (except on a landscape phone, where a sticky stage would cover the whole screen: it scrolls with the page) */
@media (max-width: 760px) { .desk-win { display: none; } }
@media (max-width: 900px) {
  .story { grid-template-columns: minmax(0, 1fr); }
  .story-stage {
    grid-column: 1; grid-row: 1; top: var(--header-h);
    margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter) 8px; background: var(--sbg, var(--bg));
    box-shadow: 0 12px 16px -12px var(--sbg, var(--bg));
  }
  .alt .story-stage { --sbg: var(--bg-2); }
  .story-steps { grid-row: 2; }
  .stage { max-width: 520px; margin-inline: auto; }
  .screen { aspect-ratio: 16 / 11; border-radius: 14px; }
  .step, .step:first-child, .step:last-child { min-height: 62svh; justify-content: flex-start; padding: 28px 0 0; }
  .step:last-child { min-height: 48svh; }
  .story-dots { margin-top: 8px; }
  .fkeys { margin-top: 10px; }
  .fkey { width: 58px; height: 44px; }
  .keys-row { margin-top: 10px; gap: 6px; }
  .key-btn { padding: 8px 4px; gap: 0; }
  .key-label { display: none; }
  .stage-hint { display: none; }
}
@media (max-width: 900px) and (max-height: 560px) {
  .story-stage { position: static; }
}
@media (max-width: 640px) {
  .mbar-left span { display: none; }
  .desk-screen { border-radius: 14px; }
  .mk-player { width: 64%; right: 4%; bottom: 16%; padding: 8px 10px 8px 8px; gap: 8px; }
  .mk-art { width: 34px; height: 34px; }
  .mk-meta b { font-size: 12px; } .mk-meta small { font-size: 11px; }
  .mk-eq { display: none; }
  .mk-browser { width: 66%; top: 12%; }
  .mk-zoom-bar { height: 52px; font-size: 19px; gap: 14px; padding: 0 16px 0 10px; }
  .mk-zoom-glyph { width: 44px; height: 36px; }
  .mk-zoom-glyph svg { width: 20px; height: 20px; }
  .mk-zoom-sys svg { width: 20px; height: 20px; } .mk-zoom-sys svg + svg { width: 30px; }
  .stage-chip { font-size: 11px; padding: 5px 10px; bottom: 8px; }
  .toast-top { top: 30px; }
  .dock { bottom: 6px; padding: 4px; gap: 4px; border-radius: 11px; }
  .dock i { width: 22px; height: 22px; border-radius: 6px; }
  .wk-area { bottom: 40px; }
  .key-btn .combo kbd { min-width: 22px; height: 22px; font-size: 12px; padding: 0 4px; }
  .sk-weight { padding: 14px 14px 10px; }
  .sk-weight-title { margin-bottom: 10px; font-size: 13px; }
  .sk-wrow { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .wk-win, .wk-bar, .wk-bar .lights { transition: none !important; }
}
@media print {
  .story-stage { display: none; }
  .step { opacity: 1; min-height: 0; }
}

/* ---------- Contacts Keys ---------- */
.ck-glyph { position: relative; }
.ck-glyph .g-ok { display: none; }
.ck-stage.is-copied .ck-glyph .g-app { display: none; }
.ck-stage.is-copied .ck-glyph .g-ok { display: block; color: var(--ok); }
.ck-chat {
  position: absolute; left: 5%; top: 13%; width: 56%; height: 72%; z-index: 1;
  background: var(--win); border-radius: 10px; box-shadow: var(--shadow-win); overflow: hidden;
  display: flex; flex-direction: column;
}
.ck-chat-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 14px; font-size: 13px; }
.ck-bubble { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.ck-input { padding: 8px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); background: var(--bg); min-height: 34px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ck-input b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ck-caret { display: inline-block; width: 1.5px; height: 1.05em; background: var(--focus); vertical-align: -2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ck-panel .ck-caret { display: none; }
.ck-stage.is-open .ck-panel .ck-caret { display: inline-block; }
.ck-stage.is-open .ck-input .ck-caret { display: none; }
.ck-panel {
  position: absolute; z-index: 4; top: 30px; right: 3%; width: 46%; max-height: calc(100% - 40px);
  padding: 10px; border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--win) 88%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .2);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: 80% 0;
  transition: opacity .25s ease, transform .45s var(--ease), visibility 0s linear .45s;
  font-size: 12px;
}
.ck-stage.is-open .ck-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ck-search { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 9px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; min-height: 30px; }
.ck-search svg { width: 13px; height: 13px; color: var(--text-2); flex: none; }
.ck-placeholder { position: absolute; left: 28px; color: var(--text-2); pointer-events: none; }
.ck-search.has-text .ck-placeholder { display: none; }
.ck-list { display: grid; gap: 2px; margin-top: 8px; }
.ck-list-title { font-size: 11px; font-weight: 600; color: var(--text-2); padding: 2px 6px; }
.ck-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; }
.ck-row.is-sel { background: color-mix(in srgb, var(--a2) 16%, transparent); }
.ck-avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(160deg, #a3a9b6, #7a8090); }
.ck-row b { font-weight: 600; }
.ck-row small { display: block; color: var(--text-2); font-size: 11px; }
.ck-row mark { background: color-mix(in srgb, var(--a1) 35%, transparent); color: inherit; border-radius: 3px; }
.ck-card { display: none; margin-top: 8px; }
.ck-stage.is-card .ck-list { display: none; }
.ck-stage.is-card .ck-card { display: grid; gap: 8px; }
.ck-card-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 2px; }
.ck-card-head .ck-avatar { width: 34px; height: 34px; font-size: 13px; }
.ck-card-head b { font-size: 14px; }
.ck-card-head small { display: block; color: var(--text-2); font-size: 11px; }
.ck-num { padding: 8px; border-radius: 10px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.ck-num-line { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.ck-num-line small { color: var(--text-2); }
.ck-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
.ck-act { padding: 5px 6px; border-radius: 7px; text-align: center; font-weight: 600; font-size: 11px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s, color .2s; }
.ck-act.is-sel { background: var(--btn); color: #fff; box-shadow: none; }
.ck-edit { padding: 7px 8px; border-radius: 8px; color: var(--link); font-weight: 600; }
.ck-edit.is-sel { background: color-mix(in srgb, var(--a2) 16%, transparent); }
@media (max-width: 640px) {
  .ck-panel { width: 62%; font-size: 11px; padding: 8px; }
  .ck-chat { width: 60%; }
  .ck-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Mixtape ---------- */
.mx-panel {
  position: absolute; z-index: 2; left: 50%; top: calc(50% + 12px); transform: translate(-50%, -50%);
  width: min(70%, 380px); padding: 12px; border-radius: 16px; display: grid; gap: 10px; font-size: 12px;
  background: color-mix(in srgb, var(--win) 90%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .2);
}
.mx-now { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.mx-art { width: 50px; height: 50px; border-radius: 9px; background: var(--art, linear-gradient(135deg, #ffb347, #e8590c)); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); transition: background .4s; }
.mx-meta { display: grid; min-width: 0; line-height: 1.3; }
.mx-meta b, .mx-meta small, .mx-meta em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-meta b { font-size: 14px; }
.mx-meta small { color: var(--text-2); }
.mx-meta em { font-style: normal; font-size: 11px; color: var(--ink); font-weight: 600; }
.mx-reels { display: flex; gap: 4px; }
.mx-reels i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--a2) 70%, transparent); border-top-color: transparent; animation: reel 2.4s linear infinite; }
@keyframes reel { to { transform: rotate(360deg); } }
.mx-bar { height: 4px; border-radius: 2px; background: var(--skel); overflow: hidden; }
.mx-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--a1), var(--a2)); transform-origin: 0 50%; transform: scaleX(.2); animation: mxprog 12s linear infinite; }
@keyframes mxprog { from { transform: scaleX(.05); } to { transform: scaleX(1); } }
.mx-lamps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mx-lamp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); transition: background-color .3s, color .3s, box-shadow .3s; }
.mx-lamp svg { width: 16px; height: 16px; }
.mx-lamp b { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.15; }
.mx-lamp[data-op="fav"].is-on { background: color-mix(in srgb, #30d158 22%, var(--bg-2)); color: #1f9d47; box-shadow: inset 0 0 0 1.5px #30d158; }
.mx-lamp[data-op="rest"].is-on { background: color-mix(in srgb, #ffbd2e 26%, var(--bg-2)); color: #b7791f; box-shadow: inset 0 0 0 1.5px #ffbd2e; }
.mx-lamp[data-op="less"].is-on { background: color-mix(in srgb, #ff453a 20%, var(--bg-2)); color: #d70015; box-shadow: inset 0 0 0 1.5px #ff453a; }
@media (prefers-color-scheme: dark) {
  .mx-lamp[data-op="fav"].is-on { color: #30d158; }
  .mx-lamp[data-op="rest"].is-on { color: #ffbd2e; }
  .mx-lamp[data-op="less"].is-on { color: #ff6961; }
}
.mx-queue, .mx-ask, .mx-where { display: none; }
.mx-stage[data-step="0"] .mx-queue, .mx-stage[data-step="1"] .mx-queue { display: grid; gap: 4px; }
.mx-stage[data-step="2"] .mx-ask { display: grid; gap: 8px; }
.mx-stage[data-step="3"] .mx-where { display: grid; gap: 8px; }
.mx-label { font-size: 11px; font-weight: 600; color: var(--text-2); }
.mx-song { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 6px; border-radius: 8px; transition: opacity .4s, transform .4s var(--ease); }
.mx-song span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-song small { color: var(--text-2); }
.mx-song .chip { font-size: 10px; padding: 2px 7px; color: var(--ink); }
.mx-ask { padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--a1) 14%, var(--bg-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a2) 30%, transparent); }
.mx-ask p { font-size: 13px; font-weight: 600; }
.mx-ask-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mx-ask-buttons span { padding: 6px; border-radius: 8px; text-align: center; font-weight: 600; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.mx-ask-buttons .mx-ask-yes { background: var(--btn); color: #fff; box-shadow: none; }
.mx-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: var(--bg-2); }
.mx-tabs span { flex: 1; padding: 4px; border-radius: 7px; text-align: center; color: var(--text-2); font-weight: 600; font-size: 11px; }
.mx-tabs .is-on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.mx-field { padding: 8px 10px; border-radius: 9px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); min-height: 32px; display: flex; align-items: center; gap: 2px; }
.key-btn > .icon { width: 20px; height: 20px; color: var(--ink); }
@media (max-width: 640px) { .mx-panel { width: 82%; padding: 9px; gap: 7px; } .mx-art { width: 38px; height: 38px; } .mx-queue .mx-song:nth-child(n+4) { display: none; } }

/* ---------- Water Break (the panel as the app draws it) ---------- */
.wb-glyph .g-off { display: none; }
.wb-stage.is-off .wb-glyph .g-on { display: none; }
.wb-stage.is-off .wb-glyph .g-off { display: block; }
.wb-note {
  position: absolute; z-index: 5; top: 32px; right: 12px; width: min(62%, 320px); display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 14px; font-size: 12px; line-height: 1.35;
  background: color-mix(in srgb, var(--win) 88%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .2);
  opacity: 0; transform: translateX(16px); transition: opacity .35s ease, transform .5s var(--ease);
}
.wb-stage.is-note .wb-note { opacity: 1; transform: none; }
.wb-note-icon { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, var(--a1), var(--a2)); }
.wb-note-icon svg { width: 16px; height: 16px; }
.wb-note-text { display: grid; gap: 2px; }
.wb-note-text small { color: var(--text-2); font-size: 12px; }
.wb-panel {
  position: absolute; z-index: 2; left: 50%; top: calc(50% + 14px); transform: translate(-50%, -50%);
  width: min(64%, 330px); padding: 14px; border-radius: 16px; display: grid; gap: 10px; font-size: 12px;
  background: color-mix(in srgb, var(--win) 90%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(0, 0, 0, .2);
}
.wb-head { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.wb-dot { width: 7px; height: 7px; border-radius: 50%; background: #30d158; flex: none; }
.wb-stage.is-off .wb-dot { background: #a1a1a6; }
.wb-count { display: flex; align-items: baseline; gap: 6px; }
.wb-count b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wb-count small { color: var(--text-2); font-size: 12px; }
.wb-drops { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.wb-drop { position: relative; width: 22px; height: 26px; }
.wb-drop svg { position: absolute; inset: 0; width: 100%; height: 100%; color: color-mix(in srgb, var(--a2) 28%, transparent); }
.wb-drop svg + svg { color: var(--a2); clip-path: inset(calc(100% - var(--f, 0%)) 0 0 0); transition: clip-path .5s var(--ease); }
.wb-extra { font-size: 12px; color: var(--text-2); }
.wb-hint { color: var(--text-2); min-height: 2.6em; }
.wb-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wb-buttons span { padding: 7px; border-radius: 9px; text-align: center; font-weight: 600; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .3s, color .3s; }
.wb-buttons .wb-cup { background: var(--btn); color: #fff; box-shadow: none; }
.wb-stage.is-over .wb-cup, .wb-stage.is-off .wb-cup { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.wb-buttons .is-pressed { transform: scale(.96); }
@media (max-width: 640px) { .wb-panel { width: 78%; padding: 10px; gap: 7px; } .wb-count b { font-size: 19px; } .wb-note { width: 76%; } }
