/* Web OS UI upgrade: shared glass tokens, the top-centre Dynamic Island, the
 * Ctrl+K Spotlight launcher and the notification quick controls.
 *
 * This file only adds surfaces and polish. It never moves the workspace label,
 * the left rail, the bell, the hint pill, the clock or the wallpaper layer;
 * the rules that reposition the rail live in os/os-desktop.css and are left
 * alone. New selectors are prefixed `abyss-`/`os-` so nothing collides.
 *
 * Stacking, measured against the surfaces that already exist:
 *   wallpaper 0 · windows 200+ (os-windows.mjs) · rail 312 · island 313 ·
 *   notifications 314 · Spotlight backdrop/dialog 1200 (the updates panel is
 *   1100, so anything lower would let the bell float over the modal).
 */

:root {
  --abyss-glass-bg: rgba(13, 16, 23, 0.62);
  --abyss-glass-bg-hover: rgba(20, 25, 36, 0.78);
  --abyss-glass-border: rgba(255, 255, 255, 0.14);
  --abyss-glass-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
  --abyss-blur: blur(20px) saturate(140%);
  --abyss-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --abyss-accent: #60a5fa;
  --abyss-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --abyss-z-dock: 312;
  --abyss-z-island: 313;
  --abyss-z-notify: 314;
  --abyss-z-spotlight: 1200;
}

/* Performance mode is shared by the island switch and the notification panel,
 * and it is also readable from CSS: one attribute on <html> flattens every
 * glass surface, drops the shadows that cost the most and stops the ambient
 * motion. Text, icons and controls keep their contrast. */
[data-performance-mode="true"] {
  --abyss-blur: none;
  --abyss-glass-bg: rgba(13, 16, 23, 0.92);
  --abyss-glass-bg-hover: rgba(24, 29, 40, 0.96);
  --abyss-shadow: none;
}

[data-performance-mode="true"] body[data-layout="os"] .os-taskbar,
[data-performance-mode="true"] .abyss-island,
[data-performance-mode="true"] .abyss-island__panel,
[data-performance-mode="true"] .os-spotlight__dialog,
[data-performance-mode="true"] .whats-new-panel,
[data-performance-mode="true"] .whats-new-toggle,
[data-performance-mode="true"] .os-popout,
[data-performance-mode="true"] .os-launcher-scrim,
[data-performance-mode="true"] body[data-layout="os"] .os-hint {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

[data-performance-mode="true"] .abyss-island__dot,
[data-performance-mode="true"] .abyss-island__bars i,
[data-performance-mode="true"] .abyss-island__art img,
[data-performance-mode="true"] .app-bg-motion,
[data-performance-mode="true"] .cs-pointer-light,
[data-performance-mode="true"] .os-visualiser {
  animation: none !important;
}

[data-performance-mode="true"] *,
[data-performance-mode="true"] *::before,
[data-performance-mode="true"] *::after {
  /* Keep control feedback (hover/focus) instant instead of animating glass. */
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
}

/* Hide Desktop Widgets: the clock and the hint pill only. Nothing else moves. */
html[data-hide-widgets="true"] body[data-layout="os"] .os-clock,
html[data-hide-widgets="true"] body[data-layout="os"] .os-hint {
  display: none !important;
}

/* ==========================================================================
 * Dock polish
 *
 * The rail keeps its position, width and behaviour; icons gain the spring
 * hover, a tooltip on every entry (the Start button was the only one without
 * one) and a glowing running-app indicator instead of a 4px dot.
 * ========================================================================== */

/* The rail and the hint are part of the same glass system as the island: one
 * background, border, highlight, shadow and blur token set. */
body[data-layout="os"] .os-taskbar {
  border-color: var(--abyss-glass-border);
  background: var(--abyss-glass-bg);
  box-shadow: var(--abyss-shadow), var(--abyss-glass-highlight);
  backdrop-filter: var(--abyss-blur);
  -webkit-backdrop-filter: var(--abyss-blur);
}

body[data-layout="os"] .os-hint {
  border-color: var(--abyss-glass-border);
  background: var(--abyss-glass-bg);
  box-shadow: var(--abyss-shadow), var(--abyss-glass-highlight);
  /* A lighter blur than the dock: the pill is small and sits on the wallpaper. */
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

body[data-layout="os"] .os-start-button::before {
  content: attr(aria-label);
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  padding: 5px 9px;
  border-radius: 8px;
  color: #f2f6ff;
  background: rgba(8, 10, 16, 0.94);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-4px, -50%) scale(0.97);
  transform-origin: left center;
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none;
  z-index: 3;
}

body[data-layout="os"] .os-start-button:hover::before,
body[data-layout="os"] .os-start-button:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
  transition-delay: 0.2s;
}

/* Tooltips stay muted on every rail entry, including the AV/battery/power
 * buttons whose ::before sibling rules only covered the dock links. */
body[data-layout="os"] .os-rail-app::before,
body[data-layout="os"] .os-taskbar-app::before,
body[data-layout="os"] .os-taskbar-tray::before {
  background: rgba(8, 10, 16, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body[data-layout="os"] .os-start-button .msr,
body[data-layout="os"] .os-taskbar-app .msr,
body[data-layout="os"] .os-taskbar-tray .msr,
body[data-layout="os"] .os-rail-app .msr,
body[data-layout="os"] .os-start-button > svg,
body[data-layout="os"] .os-taskbar-app > svg,
body[data-layout="os"] .os-taskbar-tray > svg,
body[data-layout="os"] .os-taskbar-app > img {
  display: block;
  transition: transform 0.24s var(--abyss-spring);
  transform-origin: center;
}

body[data-layout="os"] .os-start-button:hover .msr,
body[data-layout="os"] .os-taskbar-app:hover .msr,
body[data-layout="os"] .os-taskbar-tray:hover .msr,
body[data-layout="os"] .os-rail-app:hover .msr,
body[data-layout="os"] .os-start-button:focus-visible .msr,
body[data-layout="os"] .os-taskbar-app:focus-visible .msr,
body[data-layout="os"] .os-taskbar-tray:focus-visible .msr,
body[data-layout="os"] .os-rail-app:focus-visible .msr,
body[data-layout="os"] .os-taskbar-app:hover > svg,
body[data-layout="os"] .os-taskbar-app:hover > img {
  transform: scale(1.16);
}

/* One glowing bar on the rail's edge while that app has an open window. */
body[data-layout="os"] .os-taskbar-app[data-running="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  bottom: auto;
  left: -9px;
  width: 4px;
  height: 14px;
  border-radius: 999px;
  background: var(--abyss-accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--abyss-accent) 70%, transparent);
  transform: translateY(-50%);
}

body[data-layout="os"] .os-taskbar-app::after {
  transition: height 0.22s var(--abyss-spring), background 0.22s ease;
}

/* Corner legibility over bright wallpapers. The clock keeps its size and
 * alignment; only the shadow and the label tracking change. */
body[data-layout="os"] .os-desktop-brand {
  letter-spacing: 0.18em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65), 0 1px 2px rgba(0, 0, 0, 0.5);
}

body[data-layout="os"] .os-clock,
body[data-layout="os"] .os-clock-time,
body[data-layout="os"] .os-clock-meta,
body[data-layout="os"] .os-hint {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
 * Dynamic Island
 * ========================================================================== */

/* The pill borrows the shell's own language rather than an iOS-style island:
 * the hint pill's glass and border, a 10px corner, a micro-label in the same
 * 10px/700 letterspaced uppercase as the DESKTOP corner label, and the accent
 * dot that already marks the clock divider. Media only appears when a track
 * is loaded, so an idle desktop shows a single quiet status chip. */
.abyss-island {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: var(--abyss-z-island);
  display: none;
  width: var(--abyss-island-compact-w, max-content);
  height: 32px;
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(12, 15, 21, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(-50%);
  transition: width 0.34s var(--abyss-spring), height 0.34s var(--abyss-spring),
    border-radius 0.34s var(--abyss-spring), background 0.16s ease,
    border-color 0.16s ease;
  font-family: inherit;
  isolation: isolate;
}

body[data-layout="os"] .abyss-island {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body[data-layout="os"] .abyss-island:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(26, 30, 40, 0.7);
}

body[data-layout="os"].os-immersive .abyss-island {
  display: none;
}

.abyss-island[data-expanded="true"] {
  width: min(380px, calc(100vw - 32px));
  height: auto;
  border-radius: 16px;
  background: rgba(18, 22, 30, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.abyss-island__compact {
  display: flex;
  flex: 0 0 30px;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 0 11px;
  border: 0;
  border-radius: inherit;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.abyss-island__compact:focus-visible {
  outline: 2px solid var(--abyss-accent);
  outline-offset: 2px;
}

.abyss-island__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--abyss-accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--abyss-accent) 55%, transparent);
}

/* Only a playing track animates; a paused/loaded one keeps a still dot. */
.abyss-island[data-playing="true"] .abyss-island__dot {
  animation: abyss-pulse 2.4s ease-out infinite;
}

@keyframes abyss-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--abyss-accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 5px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.abyss-island__status {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.abyss-island__sep {
  flex: 0 0 1px;
  width: 1px;
  height: 12px;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.12);
}

.abyss-island__bars {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.abyss-island__bars i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: var(--abyss-accent);
  transform-origin: bottom;
  opacity: 0.5;
}

/* Nothing is playing: the pill is just the status chip, like the hint pill. */
.abyss-island[data-media="false"] .abyss-island__sep,
.abyss-island[data-media="false"] .abyss-island__bars,
.abyss-island[data-media="false"] .abyss-island__track {
  display: none;
}

.abyss-island[data-playing="true"] .abyss-island__bars i {
  opacity: 1;
  animation: abyss-eq 0.9s ease-in-out infinite alternate;
}

.abyss-island[data-playing="true"] .abyss-island__bars i:nth-child(2) { animation-delay: 0.18s; }
.abyss-island[data-playing="true"] .abyss-island__bars i:nth-child(3) { animation-delay: 0.36s; }

@keyframes abyss-eq {
  from { height: 3px; }
  to { height: 13px; }
}

.abyss-island__track {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.abyss-island__chevron {
  display: inline-flex;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.34);
  transition: transform 0.3s var(--abyss-spring), color 0.16s ease;
}

.abyss-island__chevron svg {
  width: 12px;
  height: 12px;
}

.abyss-island:hover .abyss-island__chevron {
  color: rgba(255, 255, 255, 0.6);
}

.abyss-island[data-expanded="true"] .abyss-island__chevron {
  transform: rotate(180deg);
}

/* The panel grows from 0 to its own height: `grid-template-rows: 0fr -> 1fr`
 * animates auto-sized content without measuring it in JS. */
.abyss-island__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s var(--abyss-spring);
}

/* While collapsed the panel must not contribute its own content width to the
 * pill: without this the compact state measured as wide as the expanded form.
 * It is clipped by the island's overflow while it sits below the compact row. */
.abyss-island[data-expanded="false"] .abyss-island__panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: min(380px, calc(100vw - 32px));
}

.abyss-island[data-expanded="true"] .abyss-island__panel {
  grid-template-rows: 1fr;
}

.abyss-island__panel > .abyss-island__inner {
  overflow: hidden;
  min-height: 0;
}

.abyss-island__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2px;
  padding-top: 14px;
}

.abyss-island__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.abyss-island__art {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: rgba(234, 241, 251, 0.7);
  font-size: 18px;
}

.abyss-island__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.abyss-island__meta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.abyss-island__meta b,
.abyss-island__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.abyss-island__meta b {
  font-size: 12.5px;
  font-weight: 650;
}

.abyss-island__meta span {
  color: rgba(234, 241, 251, 0.55);
  font-size: 11px;
}

.abyss-island__media-btn {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #eaf1fb;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.2s var(--abyss-spring), opacity 0.16s ease;
}

.abyss-island__media-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

.abyss-island__media-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.abyss-island__media-btn:focus-visible,
.abyss-island__field input:focus-visible,
.abyss-swatch:focus-visible,
.abyss-island__perf:focus-visible,
.abyss-quick-toggle:focus-visible,
.os-spotlight__cat:focus-visible,
.os-spotlight__card:focus-visible {
  outline: 2px solid var(--abyss-accent);
  outline-offset: 2px;
}

.abyss-island__media-btn svg {
  width: 14px;
  height: 14px;
}

.abyss-island__field {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 241, 251, 0.45);
}

.abyss-island__field input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 4px;
  border-radius: 999px;
  accent-color: var(--abyss-accent);
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.abyss-island__wallpapers {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.abyss-island__wallpapers legend {
  float: left;
  margin-right: 2px;
  padding: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 241, 251, 0.45);
}

.abyss-swatch {
  position: relative;
  width: 34px;
  height: 34px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06) center / cover no-repeat;
  cursor: pointer;
  transition: transform 0.22s var(--abyss-spring), border-color 0.18s ease;
}

.abyss-swatch:hover {
  transform: translateY(-1px) scale(1.06);
}

.abyss-swatch[aria-pressed="true"] {
  border-color: var(--abyss-accent);
  box-shadow: 0 0 0 1px var(--abyss-accent), 0 0 12px color-mix(in srgb, var(--abyss-accent) 45%, transparent);
}

.abyss-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The moving wallpapers have no image file; shared/app.css draws them with
 * gradients. They are restated here, with the swatch class, because this
 * stylesheet's flat swatch background loads later and would cover them. */
.abyss-swatch.wallpaper-motion-naruto {
  background-image: radial-gradient(circle at 74% 18%, #ff8a1f7a, transparent 55%),
    conic-gradient(from 20deg at 74% 18%, #2a0d03, #ff7a1833 25%, #120603 60%, #ffb34722 85%, #2a0d03);
}

.abyss-swatch.wallpaper-motion-gojo {
  background-image: repeating-radial-gradient(circle at 26% 24%, #7fc4ff33 0 1px, transparent 1px 9px),
    radial-gradient(circle at 26% 24%, #8f6bff88, transparent 58%),
    linear-gradient(150deg, #0d2247, #03040a);
}

.abyss-swatch.wallpaper-motion-jarona {
  background-image: radial-gradient(circle at 68% 30%, #ff9ad07a, transparent 55%),
    conic-gradient(from 90deg at 68% 30%, #04140e, #5ee6a333 30%, #06131a 65%, #ff8fc433 90%, #04140e);
}

.abyss-swatch.wallpaper-alpine {
  background-image: url("../img/wallpapers/alpine.jpg");
}

.abyss-island__perf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #eaf1fb;
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.abyss-island__perf:hover {
  background: rgba(255, 255, 255, 0.1);
}

.abyss-island__switch {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.18s ease;
}

.abyss-island__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #cfd8e6;
  transition: transform 0.24s var(--abyss-spring), background 0.18s ease;
}

.abyss-island__perf[aria-checked="true"] .abyss-island__switch {
  background: color-mix(in srgb, var(--abyss-accent) 70%, transparent);
}

.abyss-island__perf[aria-checked="true"] .abyss-island__switch::after {
  background: #fff;
  transform: translateX(13px);
}

@media (max-width: 620px) {
  .abyss-island {
    top: 10px;
  }

  /* Expanded it is nearly viewport-wide, which would cover the bell and the
   * workspace label, and its left edge would sit over the rail. It drops below
   * the bell and starts to the right of the dock instead. */
  .abyss-island[data-expanded="true"] {
    top: 72px;
    left: 62px;
    right: 10px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .abyss-island__status {
    font-size: 10.5px;
  }

  .abyss-island__compact {
    gap: 6px;
    padding: 0 11px;
  }
}

/* Below this width the track title would push the pill into the bell in the
 * top-right corner, so the compact state keeps the status only. */
@media (max-width: 520px) {
  .abyss-island__sep,
  .abyss-island__track {
    display: none;
  }
}

/* ==========================================================================
 * Spotlight (Ctrl+K)
 * ========================================================================== */

.os-spotlight {
  position: fixed;
  inset: 0;
  z-index: var(--abyss-z-spotlight);
  display: grid;
  place-items: start center;
  padding: clamp(56px, 12vh, 130px) 16px 24px;
}

.os-spotlight[hidden] {
  display: none;
}

.os-spotlight__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 11, 0.62);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  animation: abyss-fade-in 0.18s ease both;
}

@keyframes abyss-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.os-spotlight__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(680px, calc(100vw - 32px));
  max-height: min(72vh, 660px);
  overflow: hidden;
  border: 1px solid var(--abyss-glass-border);
  border-radius: 20px;
  color: #eaf1fb;
  background: var(--abyss-glass-bg-hover);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), var(--abyss-glass-highlight);
  backdrop-filter: var(--abyss-blur);
  -webkit-backdrop-filter: var(--abyss-blur);
  animation: abyss-spotlight-in 0.24s var(--abyss-spring) both;
}

@keyframes abyss-spotlight-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.os-spotlight__search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.os-spotlight__search svg {
  flex: 0 0 auto;
  color: rgba(234, 241, 251, 0.5);
}

.os-spotlight__search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  color: #f4f8ff;
  background: transparent;
  font: inherit;
  font-size: 15px;
  outline: none;
}

.os-spotlight__search input::placeholder {
  color: rgba(234, 241, 251, 0.4);
}

.os-spotlight__search kbd {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  color: rgba(234, 241, 251, 0.6);
  background: rgba(255, 255, 255, 0.1);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
}

.os-spotlight__cats {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px;
  scrollbar-width: none;
}

.os-spotlight__cats::-webkit-scrollbar {
  height: 0;
}

.os-spotlight__cat {
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(234, 241, 251, 0.7);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.os-spotlight__cat:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.os-spotlight__cat[aria-selected="true"] {
  color: #08111f;
  border-color: transparent;
  background: var(--abyss-accent);
}

.os-spotlight__results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 14px 14px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.os-spotlight__group {
  margin: 8px 4px 6px;
  color: rgba(234, 241, 251, 0.42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.os-spotlight__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.os-spotlight__card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.16s var(--abyss-spring);
}

.os-spotlight__card:hover,
.os-spotlight__card[data-selected="true"] {
  border-color: color-mix(in srgb, var(--abyss-accent) 60%, transparent);
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

.os-spotlight__card[data-selected="true"] {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--abyss-accent) 55%, transparent) inset;
}

.os-spotlight__icon {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 9px;
  color: #eaf1fb;
  background: rgba(255, 255, 255, 0.09);
  font-size: 15px;
}

.os-spotlight__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.os-spotlight__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.os-spotlight__copy b,
.os-spotlight__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.os-spotlight__copy b {
  font-size: 12.5px;
  font-weight: 650;
}

.os-spotlight__copy small {
  color: rgba(234, 241, 251, 0.5);
  font-size: 10.5px;
}

.os-spotlight__badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 6px;
  color: rgba(234, 241, 251, 0.72);
  background: rgba(255, 255, 255, 0.1);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.os-spotlight__badge[data-tone="accent"] {
  color: #08111f;
  background: var(--abyss-accent);
}

.os-spotlight__empty {
  padding: 26px 10px;
  color: rgba(234, 241, 251, 0.55);
  font-size: 12.5px;
  text-align: center;
}

.os-spotlight__foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(234, 241, 251, 0.4);
  font-size: 10.5px;
}

.os-spotlight__foot kbd {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .os-spotlight__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 560px) {
  .os-spotlight {
    padding: 24px 10px;
  }

  .os-spotlight__grid {
    grid-template-columns: 1fr;
  }

  .os-spotlight__foot {
    display: none;
  }
}

/* ==========================================================================
 * Notification panel quick controls
 * ========================================================================== */

.abyss-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--edge, rgba(255, 255, 255, 0.1));
}

.abyss-quick-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: var(--text, #eaf1fb);
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.abyss-quick-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.abyss-quick-toggle[aria-checked="true"] {
  border-color: color-mix(in srgb, var(--abyss-accent) 65%, transparent);
  background: color-mix(in srgb, var(--abyss-accent) 16%, transparent);
}

.abyss-quick-toggle__ico {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--abyss-accent);
  font-size: 14px;
}

.abyss-quick-toggle__copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.abyss-quick-toggle__copy b {
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.abyss-quick-toggle__copy small {
  overflow: hidden;
  color: var(--muted, rgba(234, 241, 251, 0.55));
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.abyss-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px 6px;
}

.abyss-feed-head b {
  color: var(--muted, rgba(234, 241, 251, 0.6));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.abyss-feed-clear {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--text, #eaf1fb);
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.abyss-feed-clear:hover {
  border-color: var(--abyss-accent);
}

.whats-new-empty {
  margin: 0;
  padding: 22px 18px 26px;
  color: var(--muted, rgba(234, 241, 251, 0.55));
  font-size: 12px;
  text-align: center;
}

body[data-layout="os"] .whats-new-panel {
  width: min(320px, calc(100vw - 32px));
}

@media (max-width: 420px) {
  .abyss-quick {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .abyss-island,
  .abyss-island__panel,
  .abyss-island__dot,
  .abyss-island__bars i,
  .os-spotlight__dialog,
  .os-spotlight__backdrop,
  .os-spotlight__card,
  .abyss-quick-toggle,
  .abyss-swatch {
    animation: none !important;
    transition: none !important;
  }
}
