.app-booting { opacity: 0; }
.app-booting > * { visibility: hidden; }
.app-ready { opacity: 1; transition: opacity .12s ease; }
.config-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.config-actions button { margin: 0; }
#configStatus { min-width: 100%; color: rgba(255,255,255,.58); font-size: 12px; }
#configStatus[data-error="true"] { color: #ff9f9f; }

.dashboard {
  inset: 0;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  max-height: none;
  padding: clamp(300px, 46vh, 500px) 30px 40px;
  transform: none;
  overflow-y: auto;
  background: rgba(8, 8, 8, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, background .22s ease, backdrop-filter .22s ease, visibility .22s;
}

.dashboard.open {
  background: rgba(8, 8, 8, .28);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.glass-off .dashboard.open {
  background: rgba(8, 8, 8, .16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.bookmark-grid {
  width: min(920px, calc(100vw - 48px));
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, var(--bookmark-size));
  gap: 28px 42px;
  justify-content: center;
  align-items: start;
  align-content: start;
  grid-auto-rows: calc(var(--bookmark-size) + 34px);
}

.bookmark,
.add {
  align-self: start;
  margin: 0;
  vertical-align: top;
}

.add {
  min-height: calc(var(--bookmark-size) + 34px);
  height: calc(var(--bookmark-size) + 34px);
  display: block;
  padding: 0 !important;
  line-height: normal;
}

.add .bookmark-tile {
  height: var(--bookmark-size);
}

.move-grip {
  width: 30px;
  height: 30px;
  left: -42px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 10px;
  background: rgba(18,19,20,.82);
  color: transparent;
  font-size: 0;
  letter-spacing: 0;
  box-shadow: 0 5px 14px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.08);
  cursor: grab;
  transition: background .16s, border-color .16s, transform .16s;
}

.move-grip::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  box-shadow: 8px 0 rgba(255,255,255,.85), 0 7px rgba(255,255,255,.85), 8px 7px rgba(255,255,255,.85), 0 14px rgba(255,255,255,.85), 8px 14px rgba(255,255,255,.85);
}

.move-grip:hover { background: rgba(42,43,45,.95); border-color: rgba(255,255,255,.52); }
.move-grip:active { cursor: grabbing; transform: translateY(-50%) scale(.94); }

.history-clear {
  display: block;
  width: 100%;
  padding: 11px 20px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  background: transparent;
  color: rgba(255,255,255,.68);
  text-align: left;
  cursor: pointer;
}

.history-clear:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.suggestions .history-clear { display: flex; align-items: center; gap: 8px; padding-block: 9px; font-size: 13px; }
.history-clear svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.search-drag {
  z-index: 4;
}

.dashboard-open .search-drag {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.engine-mark {
  display: grid;
  place-items: center;
  align-self: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: background .16s, box-shadow .16s;
}

.search:focus-within .engine-mark,
.search.has-query .engine-mark {
  opacity: 1;
  pointer-events: auto;
}

.engine-mark:hover,
.engine-mark[aria-expanded="true"] {
  background: rgba(255, 255, 255, .11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 3px 8px rgba(0, 0, 0, .2);
}

.engine-mark img,
.engine-menu img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.engine-menu {
  position: absolute;
  z-index: 8;
  top: calc(var(--search-height) + 7px);
  left: 0;
  width: 210px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px;
  background: rgba(26, 27, 28, .94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .36);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: left;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #777b80 rgba(255, 255, 255, .06);
}

.engine-menu[hidden] {
  display: none;
}

.engine-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eee;
  text-align: left;
  cursor: pointer;
}

.engine-option:hover,
.engine-option.active {
  background: rgba(255, 255, 255, .1);
}

.suggestions {
  z-index: 7;
}

.search-submit {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity .16s, background .16s;
}

.search:focus-within .search-submit,
.search.has-query .search-submit {
  opacity: 1;
  pointer-events: auto;
}

.search-submit:hover {
  background: rgba(255, 255, 255, .1);
}

.search-submit span {
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
  transform: translateY(-1px);
}

.search-submit span::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.search input {
  padding-right: 0;
}

.settings-trigger {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dashboard-open .settings-trigger {
  opacity: .72;
  visibility: visible;
  pointer-events: auto;
}

.settings-trigger span {
  display: block;
  font-family: "Segoe UI Symbol", sans-serif;
  transition: transform .45s ease;
}

.settings-trigger:hover span {
  transform: rotate(110deg);
}

.bookmark.reordering {
  z-index: 20;
  cursor: grabbing;
}

.bookmark.reordering .bookmark-tile {
  opacity: .72;
  transform: scale(1.06);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .42);
}

.engine-hint {
  display: block;
  margin-top: 8px;
  color: #9da0a3;
}

@media (max-width: 700px) {
  .dashboard { padding: clamp(260px, 43vh, 390px) 14px 30px; }
  .bookmark-grid { width: 100%; gap: 22px 24px; }
}

/* Prevent the native button baseline from offsetting the add card. */
.bookmark-grid > .bookmark.add {
  display: block !important;
  align-self: start !important;
  height: calc(var(--bookmark-size) + 34px) !important;
  min-height: calc(var(--bookmark-size) + 34px) !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.bookmark-grid > .bookmark.add > .bookmark-tile {
  display: grid !important;
  width: var(--bookmark-size) !important;
  height: var(--bookmark-size) !important;
  margin: 0 !important;
  transform: none !important;
  position: relative !important;
  top: 0 !important;
}

.bookmark-grid > .bookmark.add > .bookmark-name { display: none !important; }

.bookmark { -webkit-user-drag: none; user-select: none; }

/* Focus and glass transitions */
.search-drag { filter: blur(0); transition: opacity .34s ease, visibility .34s ease, filter .34s ease; }
.dashboard-open .search-drag { filter: blur(6px); }
.clock-drag { filter: blur(0); transition: opacity .34s ease, visibility .34s ease, filter .34s ease; }
.dashboard-open .clock-drag { opacity: 0; visibility: hidden; pointer-events: none; filter: blur(6px); }
.dashboard-open.show-clock-in-blur .clock-drag { opacity: 1; visibility: visible; filter: blur(6px); }
.search, .suggestions { transition: opacity .3s ease, background .42s ease, border-color .42s ease, box-shadow .42s ease, backdrop-filter .42s ease; }
.search { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); backdrop-filter: blur(30px) saturate(1.18) brightness(1.08); -webkit-backdrop-filter: blur(30px) saturate(1.18) brightness(1.08); box-shadow: 0 10px 30px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.1); }
.search:focus-within { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.28); backdrop-filter: blur(34px) saturate(1.24) brightness(1.1); -webkit-backdrop-filter: blur(34px) saturate(1.24) brightness(1.1); }
.suggestions { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); backdrop-filter: blur(32px) saturate(1.18) brightness(1.06); -webkit-backdrop-filter: blur(32px) saturate(1.18) brightness(1.06); box-shadow: 0 16px 38px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.08); }

/* Compact, circular drag handle with a clear six-dot grip. */
.move-grip { width: 32px; height: 32px; left: -44px; border-radius: 50%; background: rgba(18,19,20,.72); box-shadow: 0 5px 14px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.1); }
.move-grip::before { left: 9px; top: 8px; width: 14px; height: 16px; border-radius: 0; background: radial-gradient(circle, rgba(255,255,255,.9) 0 1.6px, transparent 1.9px) 0 0 / 7px 7px; box-shadow: none; }

/* Match the reference gear and preserve the rotation feedback. */
.settings-trigger { width: 38px; height: 38px; color: rgba(190,193,198,.78); font-size: 27px; background: rgba(0,0,0,.34); border-radius: 10px; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 5px 14px rgba(0,0,0,.2); }
.settings-trigger span { transform-origin: center; transition: transform .5s cubic-bezier(.2,.75,.25,1), color .2s ease; }
.settings-trigger:hover span, .settings-trigger:focus-visible span, .settings-trigger:active span { color: #e1e3e6; transform: rotate(180deg); }

/* Firefox uses separate track/progress pseudo-elements. */
.range::-moz-range-track { height: 6px; border-radius: 6px; background: #5c5e61; }
.range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }

/* The full layer blurs the page; the grid itself is the centered scroll region. */
.dashboard { inset: 0; width: 100%; padding: 0; transform: none; overflow: hidden; scrollbar-width: none; }
.dashboard::-webkit-scrollbar, .bookmark-grid::-webkit-scrollbar { display: none; width: 0; height: 0; }
.bookmark-grid { position: absolute; top: clamp(150px, 24vh, 250px); bottom: clamp(42px, 6vh, 68px); left: 50%; width: min(1060px, calc(100vw - 64px)); margin: 0; padding: 18px 26px 34px; transform: translateX(-50%); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; grid-template-columns: repeat(auto-fit, var(--bookmark-size)); gap: 26px 42px; justify-content: center; align-content: start; }
.dashboard-end { position: absolute; z-index: 3; left: 50%; bottom: clamp(22px, 3vh, 34px); width: 42px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.88); opacity: 0; transform: translateX(-50%) scaleX(.75); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.dashboard-end.visible { opacity: .16; }
.dashboard-end.visible.at-end { opacity: .72; transform: translateX(-50%) scaleX(1); }

/* A real blur surface: no translucent white wash and no outline. */
.search { border: 0; background: rgba(38,20,22,.5); backdrop-filter: blur(42px) saturate(1.2) brightness(.94); -webkit-backdrop-filter: blur(42px) saturate(1.2) brightness(.94); box-shadow: 0 10px 30px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.035); }
.search:focus-within { border: 0; background: rgba(34,20,21,.56); backdrop-filter: blur(46px) saturate(1.24) brightness(.96); -webkit-backdrop-filter: blur(46px) saturate(1.24) brightness(.96); }
.suggestions { border: 0; background: rgba(36,21,22,.56); backdrop-filter: blur(42px) saturate(1.2) brightness(.94); -webkit-backdrop-filter: blur(42px) saturate(1.2) brightness(.94); }

/* Lucide gear matching the supplied reference. */
.settings-trigger { display: grid; place-items: center; padding: 0; background: transparent; border-radius: 0; box-shadow: none; color: #777b80; }
.settings-trigger svg { width: 27px; height: 27px; transform-origin: center; transition: transform .5s cubic-bezier(.2,.75,.25,1), color .2s ease; }
.settings-trigger:hover svg, .settings-trigger:focus-visible svg, .settings-trigger:active svg { color: #a5a8ac; transform: rotate(180deg); }

.bookmark-menu { position: fixed; z-index: 30; width: 178px; padding: 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(30,31,33,.96); box-shadow: 0 14px 34px rgba(0,0,0,.42); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.bookmark-menu[hidden] { display: none; }
.bookmark-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 8px 11px; border: 0; border-radius: 6px; background: transparent; color: #eee; font: 14px "Microsoft YaHei", Arial, sans-serif; text-align: left; cursor: pointer; }
.bookmark-menu button:hover { background: rgba(255,255,255,.09); }
.bookmark-menu button > span:first-child { width: 22px; color: #a9adb2; font-size: 18px; text-align: center; }

.fallback-icon { border-radius: 10px; background: #59616a; color: #fff; font-size: calc(var(--bookmark-size)*.2); font-weight: 600; }
.bookmark-icon-placeholder { width: calc(var(--bookmark-size)*.36); height: calc(var(--bookmark-size)*.36); border-radius: 10px; background: rgba(255,255,255,.055); }

@media (max-width: 700px) {
  .dashboard { padding: 0; }
  .bookmark-grid { top: 150px; bottom: 52px; width: calc(100vw - 24px); padding-inline: 12px; gap: 22px 24px; }
}

/* Keep one full-screen blur layer instead of dozens of per-card blur layers. */
.dashboard { transition: opacity .2s ease, background .2s ease, visibility .2s; will-change: opacity; }
.bookmark-grid { contain: layout paint; }
.bookmark { content-visibility: visible; contain: none; overflow: visible; }
.bookmark-tile { background: rgba(38,28,29,.7); backdrop-filter: none; -webkit-backdrop-filter: none; }
.bookmark:hover .bookmark-tile { transform: none; }

/* Menus should read as softly blurred surfaces, not transparent overlays. */
.engine-menu, .suggestions, .bookmark-menu { background: rgba(29,30,32,.82); backdrop-filter: blur(30px) saturate(1.12); -webkit-backdrop-filter: blur(30px) saturate(1.12); border: 0; }

/* Settings filtering must override the rows' flex display and keep the dialog frame stable. */
.settings-card { height: min(82vh, 780px); display: flex; flex-direction: column; }
.settings-card .setting-row[hidden], .settings-card .setting-section[hidden], .settings-card .setting-label[hidden], .settings-card input[hidden], .settings-card #saveSettings[hidden] { display: none !important; }
#saveSettings { flex: 0 0 auto; margin-top: auto; }

/* Transparent glass with a real blurred backdrop. */
.search { isolation: isolate; background: rgba(18,18,18,.2); backdrop-filter: blur(56px) saturate(1.4) brightness(.86); -webkit-backdrop-filter: blur(56px) saturate(1.4) brightness(.86); box-shadow: 0 12px 32px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.06); will-change: backdrop-filter; }
.search:focus-within { background: rgba(18,18,18,.24); backdrop-filter: blur(60px) saturate(1.45) brightness(.88); -webkit-backdrop-filter: blur(60px) saturate(1.45) brightness(.88); }
.suggestions { isolation: isolate; background: rgba(22,22,22,.24); backdrop-filter: blur(54px) saturate(1.35) brightness(.86); -webkit-backdrop-filter: blur(54px) saturate(1.35) brightness(.86); box-shadow: 0 16px 40px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.05); will-change: backdrop-filter; }

@media (max-width: 700px) {
  .settings-card { height: min(86vh, 720px); }
}

/* Neutral low-alpha glass lets the wallpaper supply the visible color. */
.search { background: rgba(12,12,12,.13); backdrop-filter: blur(46px) saturate(1.22) brightness(.82); -webkit-backdrop-filter: blur(46px) saturate(1.22) brightness(.82); }
.search:focus-within { background: rgba(12,12,12,.16); backdrop-filter: blur(50px) saturate(1.26) brightness(.84); -webkit-backdrop-filter: blur(50px) saturate(1.26) brightness(.84); }
.suggestions { background: rgba(12,12,12,.16); backdrop-filter: blur(48px) saturate(1.2) brightness(.82); -webkit-backdrop-filter: blur(48px) saturate(1.2) brightness(.82); }

.audio-control { position: fixed; z-index: 5; top: 28px; right: 76px; width: 38px; height: 38px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.audio-control[hidden] { display: none; }
.dashboard-open .audio-control:not([hidden]) { opacity: .72; visibility: visible; pointer-events: auto; }
.audio-trigger { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; background: transparent; color: #777b80; cursor: pointer; }
.audio-trigger svg { width: 26px; height: 26px; transition: color .2s ease, transform .2s ease; }
.audio-trigger:hover svg, .audio-trigger:focus-visible svg { color: #a5a8ac; transform: scale(1.06); }
.audio-trigger .volume-off { display: none; }
.audio-trigger.muted .volume-on { display: none; }
.audio-trigger.muted .volume-off { display: block; }
.volume-popover { position: absolute; top: 33px; left: 50%; display: grid; place-items: center; width: 38px; height: 118px; padding: 15px 0 9px; border-radius: 8px; background: rgba(27,28,30,.82); box-shadow: 0 10px 26px rgba(0,0,0,.3); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%,-5px); transition: opacity .16s ease, transform .16s ease, visibility .16s ease; }
.audio-control:hover .volume-popover, .audio-control:focus-within .volume-popover { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%,0); }
.volume-slider { width: 5px; height: 88px; margin: 0; appearance: none; -webkit-appearance: none; writing-mode: vertical-lr; direction: rtl; border-radius: 5px; outline: 0; background: linear-gradient(to top, var(--accent) 0 var(--volume-progress,80%), rgba(255,255,255,.28) var(--volume-progress,80%) 100%); cursor: pointer; }
.audio-control.muted .volume-slider { filter: saturate(.15); opacity: .72; }

/* Use the image directly behind the controls as the color source. */
.search { background: rgba(0,0,0,.055); backdrop-filter: blur(32px) saturate(1.12) brightness(.86); -webkit-backdrop-filter: blur(32px) saturate(1.12) brightness(.86); }
.search:focus-within { background: rgba(0,0,0,.075); backdrop-filter: blur(36px) saturate(1.15) brightness(.88); -webkit-backdrop-filter: blur(36px) saturate(1.15) brightness(.88); }
.suggestions { background: rgba(0,0,0,.07); backdrop-filter: blur(34px) saturate(1.12) brightness(.86); -webkit-backdrop-filter: blur(34px) saturate(1.12) brightness(.86); }

/* Keep the wallpaper in the composited backdrop so blur can sample real pixels. */
.background { z-index: 0; pointer-events: none; }
.background::after { z-index: 1; pointer-events: none; }
.background video { position: relative; z-index: 0; }
body > .custom-text, body > .custom-brand { z-index: 2; }
.search, .suggestions { isolation: auto; will-change: auto; }
.search { background: rgba(0,0,0,.08); backdrop-filter: blur(58px) saturate(1.14) brightness(.86); -webkit-backdrop-filter: blur(58px) saturate(1.14) brightness(.86); }
.search:focus-within { background: rgba(0,0,0,.1); backdrop-filter: blur(64px) saturate(1.16) brightness(.88); -webkit-backdrop-filter: blur(64px) saturate(1.16) brightness(.88); }
.suggestions { background: rgba(0,0,0,.1); backdrop-filter: blur(60px) saturate(1.14) brightness(.86); -webkit-backdrop-filter: blur(60px) saturate(1.14) brightness(.86); }
.search { position: relative; overflow: hidden; }
.suggestions { position: absolute; overflow-x: hidden; }
.suggestions { -ms-overflow-style: none; scrollbar-width: none; }
.suggestions::-webkit-scrollbar { display: none; width: 0; height: 0; }
.bookmark-icon-upload { display: flex; align-items: center; gap: 10px; min-height: 34px; margin-top: -2px; }
.bookmark-icon-upload .secondary { min-height: 34px; padding: 6px 11px; }
#bookmarkIconFileStatus { min-width: 0; overflow: hidden; color: rgba(255,255,255,.7); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
#customText { margin-bottom: 18px; }
.search { background: rgba(18,14,16,.28); backdrop-filter: blur(24px) saturate(1.1) brightness(.9); -webkit-backdrop-filter: blur(24px) saturate(1.1) brightness(.9); }
.suggestions { min-height: 0; background: rgba(18,14,16,.42); backdrop-filter: blur(24px) saturate(1.08) brightness(.9); -webkit-backdrop-filter: blur(24px) saturate(1.08) brightness(.9); }
.search input, .suggestions button { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; text-shadow: 0 1px 1px rgba(0,0,0,.28); }
.suggestions > .wallpaper-glass-copy { display: block; inset: 0; filter: blur(28px); clip-path: inset(0 round 13px); }
.wallpaper-glass-copy { position: absolute; z-index: 0; inset: -72px; display: block; pointer-events: none; background-repeat: no-repeat; filter: blur(32px); opacity: .96; }
.wallpaper-glass-copy[hidden] { display: none; }
.search > :not(.wallpaper-glass-copy), .suggestions > :not(.wallpaper-glass-copy) { position: relative; z-index: 1; }
.volume-slider::-webkit-slider-runnable-track { width: 5px; height: 88px; border-radius: 5px; background: transparent; }
.volume-slider::-webkit-slider-thumb { width: 15px; height: 15px; margin-left: -5px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 50%; background: #e4e6e8; box-shadow: 0 1px 5px rgba(0,0,0,.35); }
.volume-slider::-moz-range-track { width: 5px; border-radius: 5px; background: rgba(255,255,255,.28); }
.volume-slider::-moz-range-progress { width: 5px; border-radius: 5px; background: var(--accent); }
.volume-slider::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: #e4e6e8; }

@media (max-width: 700px) {
  .audio-control { top: 18px; right: 64px; }
}

/* Home surface polish: quiet structure keeps the empty state intentional. */
.background {
  background-color: #10191d;
  background-image: linear-gradient(125deg, #152a30 0%, #101a1f 36%, #181521 68%, #291b19 100%);
}
.background::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .34;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 72%);
}
.background::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(4,7,9,.08), transparent 40%, rgba(4,7,9,.36));
}

.brand-lockup {
  position: fixed;
  z-index: 3;
  top: 30px;
  left: 34px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(238,244,246,.82);
  user-select: none;
  pointer-events: none;
}
.brand-mark { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .16em; }
.brand-mark img { width: 27px; height: 27px; border-radius: 8px; object-fit: cover; opacity: .9; box-shadow: 0 5px 16px rgba(0,0,0,.28); }
.brand-divider { width: 1px; height: 18px; background: rgba(255,255,255,.2); }
.brand-caption { color: rgba(216,224,226,.48); font-size: 10px; letter-spacing: .2em; }

.clock-drag { top: 19%; }
.clock-context { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 12px; color: rgba(209,220,222,.55); font-size: 10px; font-weight: 600; letter-spacing: .22em; }
.clock-context i, .search-meta i { display: block; flex: 0 0 auto; width: 22px; height: 1px; background: rgba(152, 209, 160, .62); }
.clock-drag time { color: rgba(248,250,250,.96); font-weight: 250; text-shadow: 0 5px 26px rgba(0,0,0,.42); }

.search-drag { top: 39%; }
.search-meta { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 11px; color: rgba(203,214,216,.42); font-size: 9px; font-weight: 600; letter-spacing: .22em; }
.search-meta i { width: 14px; background: rgba(152, 209, 160, .5); }
.search { border: 1px solid rgba(225,239,238,.12); background: rgba(8,14,16,.26); box-shadow: 0 15px 38px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.08); }
.search:focus-within { border-color: rgba(174,220,182,.3); background: rgba(8,14,16,.4); box-shadow: 0 17px 42px rgba(0,0,0,.3), 0 0 0 4px rgba(131,196,141,.06), inset 0 1px rgba(255,255,255,.1); }
.search input { font-size: 16px; letter-spacing: .02em; }
.search input::placeholder { color: rgba(240,246,245,.72); }
.search-submit span { border-color: rgba(156,220,164,.88); background: transparent; }
.search-submit span::after { background: rgba(156,220,164,.88); }

.settings-trigger { top: 29px; right: 31px; opacity: 0; visibility: hidden; pointer-events: none; }
.dashboard-open .settings-trigger { opacity: .72; visibility: visible; pointer-events: auto; }

.has-custom-wallpaper .brand-lockup,
.has-custom-wallpaper .clock-context,
.has-custom-wallpaper .search-meta { display: none; }
.has-custom-wallpaper .background::before { display: none; }
.has-custom-wallpaper:not(.vignette-on) .background::after { background: none; }
.has-custom-wallpaper .search { border: 0; background: rgba(18,14,16,.28); box-shadow: 0 12px 32px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.06); }
.has-custom-wallpaper .search:focus-within { border: 0; background: rgba(18,14,16,.34); box-shadow: 0 14px 36px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.07); }
.has-custom-wallpaper .search:focus-within input::placeholder,
.has-custom-wallpaper .search input:focus::placeholder { color: transparent !important; opacity: 0 !important; }

/* The bundled video keeps the complete default-home structure and uses its own cyan spectrum. */
.has-default-wallpaper .brand-lockup,
.has-default-wallpaper .clock-context,
.has-default-wallpaper .search-meta { display: flex; }
.has-default-wallpaper .background::before { display: block; opacity: .1; }
.has-default-wallpaper:not(.vignette-on) .background::after { background: linear-gradient(180deg, rgba(1,10,14,.08), transparent 42%, rgba(1,9,13,.3)); }

@keyframes spectrum-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* The default home search is flat until focused; focus is expressed only by the animated spectrum edge. */
:is(body:not(.has-custom-wallpaper), body.has-default-wallpaper) .search {
  overflow: hidden;
  border: 1px solid rgba(225,239,238,.12);
  box-shadow: none;
}
:is(body:not(.has-custom-wallpaper), body.has-default-wallpaper) .search:focus-within {
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  box-shadow: 0 0 7px rgba(76,234,255,.46), 0 0 15px rgba(136,92,255,.34), 0 0 27px rgba(255,76,176,.2);
}
:is(body:not(.has-custom-wallpaper), body.has-default-wallpaper) .search:focus-within::before,
:is(body:not(.has-custom-wallpaper), body.has-default-wallpaper) .search:focus-within::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
:is(body:not(.has-custom-wallpaper), body.has-default-wallpaper) .search:focus-within::before {
  z-index: 0;
  top: 50%;
  left: -50%;
  width: 200%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    #35f3ff 0deg,
    #4a8cff 58deg,
    #875cff 112deg,
    #d94fff 166deg,
    #ff4fa7 222deg,
    #ff7f73 270deg,
    #ffc45c 310deg,
    #43f5cf 342deg,
    #35f3ff 360deg
  );
  transform: translateY(-50%) rotate(0deg);
  animation: spectrum-spin 3.8s linear infinite;
  will-change: transform;
}
:is(body:not(.has-custom-wallpaper), body.has-default-wallpaper) .search:focus-within::after {
  z-index: 1;
  inset: 2px;
  border-radius: calc(var(--search-height) / 2 - 2px);
  background: rgba(8,14,16,.98);
}
:is(body:not(.has-custom-wallpaper), body.has-default-wallpaper) .search:focus-within > :not(.wallpaper-glass-copy) { z-index: 2; }

body.has-default-wallpaper .search {
  background: rgba(2,17,22,.3);
  box-shadow: 0 13px 36px rgba(0,8,12,.22), inset 0 1px rgba(220,252,255,.07);
  transition: border-color .48s ease, background-color .48s ease, box-shadow .62s cubic-bezier(.22, .61, .36, 1);
}
body.has-default-wallpaper .search::before,
body.has-default-wallpaper .search::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity .62s cubic-bezier(.22, .61, .36, 1);
}
body.has-default-wallpaper .search::before {
  z-index: 0;
  top: 50%;
  left: -50%;
  width: 200%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    #8ff7ff 0deg,
    #20dff3 48deg,
    #159fe8 102deg,
    #216ff0 150deg,
    #12b9d2 205deg,
    #19e0c1 258deg,
    #73f5d7 310deg,
    #8ff7ff 360deg
  );
  transform: translateY(-50%) rotate(0deg);
  animation: spectrum-spin 4.4s linear infinite;
  will-change: transform, opacity;
}
body.has-default-wallpaper .search::after {
  z-index: 1;
  inset: 2px;
  border-radius: calc(var(--search-height) / 2 - 2px);
  background: rgba(2,18,24,.84);
}
body.has-default-wallpaper .search:focus-within::before,
body.has-default-wallpaper .search:focus-within::after {
  opacity: 1;
}
body.has-default-wallpaper .search:focus-within {
  box-shadow: 0 0 8px rgba(35,232,245,.62), 0 0 18px rgba(22,182,224,.42), 0 0 34px rgba(28,224,185,.26);
}
body.has-default-wallpaper .search:focus-within::before {
  background: conic-gradient(
    from 0deg,
    #8ff7ff 0deg,
    #20dff3 48deg,
    #159fe8 102deg,
    #216ff0 150deg,
    #12b9d2 205deg,
    #19e0c1 258deg,
    #73f5d7 310deg,
    #8ff7ff 360deg
  );
  animation-duration: 4.4s;
}
body.has-default-wallpaper .search:focus-within::after {
  background: rgba(2,18,24,.84);
}
.has-default-wallpaper .clock-context,
.has-default-wallpaper .search-meta { color: rgba(204,242,245,.55); }
.has-default-wallpaper .clock-context i,
.has-default-wallpaper .search-meta i { background: rgba(55,222,219,.66); }

@media (max-width: 700px) {
  .brand-lockup { top: 20px; left: 20px; gap: 9px; }
  .brand-caption { display: none; }
  .brand-divider { height: 15px; }
  .clock-drag { top: 19%; }
  .clock-context { margin-bottom: 9px; font-size: 9px; }
  .search-drag { top: 36%; width: calc(100vw - 30px) !important; }
  .search-meta { margin-top: 9px; }
  .settings-trigger { top: 18px; right: 18px; }
}
