/* System Experience 2026.07
   A focused Liquid Glass layer for system surfaces and the four native apps. */

:root {
  --xp-glass: rgba(28, 31, 38, .58);
  --xp-glass-strong: rgba(32, 35, 43, .78);
  --xp-hairline: rgba(255, 255, 255, .18);
  --xp-inner-line: rgba(255, 255, 255, .09);
  --xp-shadow: 0 28px 90px rgba(0, 0, 0, .48), 0 6px 24px rgba(0, 0, 0, .24);
  --xp-blue: #0a84ff;
  --xp-ease: cubic-bezier(.16, 1, .3, 1);
}

button.xp-pressed,
.xp-pressed {
  transform: scale(.965) !important;
  transition-duration: 80ms !important;
}

/* Wallpaper and light response */
#xp-dynamic-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity .9s ease;
  pointer-events: none;
}

.desktop.xp-dynamic-wallpaper-enabled {
  background: #142634 !important;
  animation: none !important;
}

.desktop.xp-dynamic-wallpaper-enabled #xp-dynamic-wallpaper {
  opacity: 1;
}

.desktop.xp-dynamic-wallpaper-enabled::after {
  z-index: 1;
  background:
    radial-gradient(circle at 18% 8%, rgba(115, 217, 255, .12), transparent 38%),
    linear-gradient(180deg, rgba(3, 11, 18, .14), rgba(4, 12, 17, .04) 45%, rgba(2, 7, 11, .26));
}

#experience-display-overlay {
  --display-dim: 0;
  --display-warm: .35;
  position: fixed;
  inset: 0;
  z-index: 999990;
  pointer-events: none;
  background:
    rgba(0, 0, 0, var(--display-dim)),
    rgba(255, 117, 26, calc(var(--display-warm) * .075));
  mix-blend-mode: multiply;
  transition: background .18s ease;
}

/* Refined material stack */
.menubar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 52%),
    rgba(17, 25, 32, .36) !important;
  border-bottom-color: rgba(255, 255, 255, .22) !important;
  backdrop-filter: blur(52px) saturate(190%) brightness(1.04) !important;
}

.dock {
  background:
    radial-gradient(circle at 35% -60%, rgba(255, 255, 255, .34), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .075) 55%, rgba(207, 238, 255, .14)) !important;
  border-color: rgba(255, 255, 255, .36) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .32) inset,
    0 -1px 0 rgba(0, 0, 0, .12) inset,
    0 22px 60px rgba(0, 0, 0, .38) !important;
  backdrop-filter: blur(54px) saturate(210%) brightness(1.08) !important;
}

.window {
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .28),
    0 4px 14px rgba(0, 0, 0, .18),
    0 0 0 .5px rgba(255, 255, 255, .14) inset !important;
  transition: box-shadow .26s var(--xp-ease), filter .26s ease, opacity .2s ease, transform .38s var(--xp-ease);
}

.window.active {
  box-shadow:
    0 40px 100px rgba(0, 0, 0, .52),
    0 12px 36px rgba(0, 0, 0, .28),
    0 0 0 .5px rgba(255, 255, 255, .28) inset !important;
}

.light-mode .window.active {
  box-shadow:
    0 36px 86px rgba(28, 42, 58, .3),
    0 10px 28px rgba(28, 42, 58, .16),
    0 0 0 .5px rgba(255, 255, 255, .75) inset !important;
}

/* Shared app chrome */
.xp-contacts,
.xp-dictionary,
.xp-memos,
.xp-freeform {
  width: 100%;
  min-width: 0;
}

.xp-app-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
}

.xp-toolbar-button {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  border: .5px solid rgba(255, 255, 255, .12);
  transition: background .15s ease, transform .15s var(--xp-ease);
}

.xp-toolbar-button:hover { background: rgba(255, 255, 255, .15); }

.xp-search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 30px;
  margin: 0 10px 8px;
  padding: 0 9px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .46);
  background: rgba(0, 0, 0, .18);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .08);
}

.xp-search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
}

.xp-search-field.large {
  width: min(430px, 65%);
  height: 34px;
  margin: 0;
  background: rgba(0, 0, 0, .24);
}

.xp-empty-state {
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 24px;
  color: rgba(255, 255, 255, .52);
  text-align: center;
}

.xp-empty-state > span { font-size: 36px; opacity: .7; }
.xp-empty-state b { color: rgba(255, 255, 255, .8); font-size: 14px; }
.xp-empty-state small { max-width: 260px; line-height: 1.5; }

/* Contacts */
.xp-contacts {
  height: 100%;
  display: grid;
  grid-template-columns: 184px 250px minmax(0, 1fr);
  overflow: hidden;
  background: #202128;
}

.xp-contacts-groups {
  padding: 12px 8px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .09), transparent 42%),
    rgba(30, 34, 42, .72);
  border-right: .5px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(34px) saturate(160%);
}

.xp-sidebar-heading {
  margin: 11px 10px 5px;
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .025em;
}

.xp-sidebar-row {
  width: 100%;
  height: 30px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  padding: 0 8px;
  border-radius: 7px;
  text-align: left;
  font-size: 12px;
  transition: background .15s ease;
}

.xp-sidebar-row span { color: #5ac8fa; font-size: 14px; }
.xp-sidebar-row em { color: rgba(255, 255, 255, .4); font-style: normal; }
.xp-sidebar-row:hover { background: rgba(255, 255, 255, .07); }
.xp-sidebar-row.active { background: rgba(255, 255, 255, .13); }

.xp-contact-list-column {
  min-width: 0;
  background: #26272d;
  border-right: .5px solid rgba(255, 255, 255, .09);
}

.xp-contact-list {
  height: calc(100% - 52px);
  padding: 0 8px 12px;
  overflow: auto;
}

.xp-contact-row {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 9px;
  text-align: left;
  transition: background .14s ease;
}

.xp-contact-row:hover { background: rgba(255, 255, 255, .055); }
.xp-contact-row.selected { background: #0a84ff; }
.xp-contact-row > span:nth-child(2) { min-width: 0; }
.xp-contact-row b,
.xp-contact-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-contact-row b { font-size: 13px; }
.xp-contact-row small { margin-top: 3px; color: rgba(255, 255, 255, .5); font-size: 11px; }
.xp-contact-row.selected small { color: rgba(255, 255, 255, .75); }
.xp-contact-row i { color: #ffd60a; font-style: normal; font-size: 10px; }

.xp-contact-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, color-mix(in srgb, var(--avatar), white 26%), var(--avatar));
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 3px 9px rgba(0, 0, 0, .22);
  font-size: 12px;
  font-weight: 650;
}

.xp-contact-avatar.large {
  width: 88px;
  height: 88px;
  font-size: 27px;
}

.xp-contact-detail {
  padding: 34px clamp(24px, 5vw, 58px);
  overflow: auto;
  background: linear-gradient(180deg, #2a2b31, #222329);
}

.xp-contact-hero { text-align: center; }
.xp-contact-hero .xp-contact-avatar { margin: 0 auto; }
.xp-contact-hero h1 { margin: 13px 0 3px; font-size: 25px; letter-spacing: -.025em; }
.xp-contact-hero p { margin: 0; color: rgba(255, 255, 255, .5); font-size: 12px; }

.xp-contact-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 19px 0 24px;
}

.xp-contact-actions button {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #59aaff;
  font-size: 10px;
}

.xp-contact-actions span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #0a84ff;
  box-shadow: 0 5px 14px rgba(10, 132, 255, .3);
}

.xp-contact-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .07);
}

.xp-contact-card > * {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: .5px solid rgba(255, 255, 255, .07);
  font-size: 12px;
  text-align: left;
}

.xp-contact-card label { color: rgba(255, 255, 255, .48); }
.xp-contact-card button { color: #58aaff; }

.xp-favorite-button {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  border-radius: 10px;
  color: #58aaff;
  background: rgba(255, 255, 255, .06);
}
.xp-favorite-button.active { color: #ffd60a; }

/* Dictionary */
.xp-dictionary {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f4f1ec;
  color: #24211e;
}

.xp-dictionary-toolbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 14px;
  background: rgba(238, 235, 229, .92);
  border-bottom: .5px solid rgba(0, 0, 0, .12);
}

.xp-dictionary .xp-search-field {
  color: rgba(0, 0, 0, .42);
  background: rgba(0, 0, 0, .07);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08);
}
.xp-dictionary .xp-search-field input { color: #24211e; }

.xp-dictionary-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 190px 1fr;
}

.xp-dictionary-body aside {
  padding: 20px 14px;
  border-right: .5px solid rgba(0, 0, 0, .1);
  background: #ebe8e3;
}

.xp-dictionary-body aside > b,
.xp-history-title {
  display: block;
  margin: 0 8px 8px;
  color: #77716b;
  font-size: 11px;
  font-weight: 650;
}

.xp-history-title { margin-top: 26px; }
.xp-dictionary-body aside button {
  width: 100%;
  display: block;
  padding: 7px 8px;
  border-radius: 7px;
  color: #48433e;
  text-align: left;
  font-size: 12px;
}
.xp-dictionary-body aside button.active { color: white; background: #b2382d; }

.xp-dictionary-body article {
  padding: 34px clamp(30px, 7vw, 72px);
  overflow: auto;
  font-family: Georgia, "Songti SC", "SimSun", serif;
}

.xp-dictionary-source {
  color: #9c342c;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
}

.xp-dictionary-body h1 {
  margin: 9px 0 2px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -.035em;
}

.xp-phonetic { color: #77716b; font-size: 15px; }
.xp-phonetic button { margin-left: 5px; color: #b2382d; font-size: 11px; }

.xp-definition {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid rgba(111, 93, 78, .22);
}

.xp-definition span {
  color: #9c342c;
  font-family: var(--font);
  font-size: 11px;
}

.xp-definition p { margin: 8px 0; font-size: 17px; line-height: 1.75; }
.xp-dictionary blockquote { margin: 24px 0; padding-left: 16px; border-left: 3px solid #c49a6c; color: #655f59; font-style: italic; line-height: 1.6; }
.xp-related { display: grid; gap: 6px; color: #77716b; font-family: var(--font); font-size: 12px; }
.xp-related b { color: #3e3934; }
.xp-empty-state.dictionary { height: 100%; color: #77716b; font-family: var(--font); }
.xp-empty-state.dictionary b { color: #3e3934; }

/* Voice Memos */
.xp-memos {
  height: 100%;
  display: grid;
  grid-template-columns: 300px 1fr;
  background: #1d1e23;
}

.xp-memos > aside {
  min-width: 0;
  background: #25262c;
  border-right: .5px solid rgba(255, 255, 255, .1);
}

.xp-memos > aside .xp-app-toolbar { justify-content: space-between; padding-bottom: 4px; }
.xp-memo-list { height: calc(100% - 90px); padding: 0 8px 10px; overflow: auto; }

.xp-memo-row {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
}

.xp-memo-row:hover { background: rgba(255, 255, 255, .055); }
.xp-memo-row.selected { background: rgba(255, 255, 255, .11); }
.xp-memo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--memo); box-shadow: 0 0 10px color-mix(in srgb, var(--memo), transparent 35%); }
.xp-memo-row b, .xp-memo-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-memo-row b { font-size: 13px; }
.xp-memo-row small, .xp-memo-row time { margin-top: 4px; color: rgba(255, 255, 255, .42); font-size: 10px; }

.xp-memos > main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 33%, rgba(255, 80, 70, .07), transparent 38%),
    #1d1e23;
}

.xp-memo-stage {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.xp-waveform {
  width: min(82%, 430px);
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.xp-waveform i {
  width: 3px;
  height: var(--h);
  min-height: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ff6961, #ff2d55);
  opacity: .72;
  transform-origin: center;
}

.xp-waveform.recording i { animation: xp-wave .72s ease-in-out infinite alternate; animation-delay: calc(var(--h) * -9ms); }
@keyframes xp-wave { to { transform: scaleY(.25); opacity: .95; } }

.xp-memo-time { margin-top: 20px; font-variant-numeric: tabular-nums; font-size: 31px; font-weight: 300; letter-spacing: .02em; }
.xp-memo-stage p { margin: 7px 0; color: rgba(255, 255, 255, .42); font-size: 11px; }

.xp-recorder-control {
  min-height: 112px;
  display: grid;
  place-items: center;
  border-top: .5px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .018);
}

.xp-record-button {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16), 0 10px 25px rgba(0, 0, 0, .25);
  transition: transform .25s var(--xp-ease);
}

.xp-record-button i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ff453a;
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 6px 14px rgba(255, 69, 58, .35);
  transition: border-radius .3s var(--xp-ease), transform .3s var(--xp-ease);
}

.xp-record-button.recording i { border-radius: 9px; transform: scale(.55); }

/* Freeform */
.xp-freeform {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f4f0e8;
  color: #202124;
}

.xp-freeform-toolbar {
  min-height: 50px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 12px;
  background: rgba(252, 250, 246, .94);
  border-bottom: .5px solid rgba(0, 0, 0, .12);
  backdrop-filter: blur(22px);
}

.xp-freeform-toolbar > div:last-child { text-align: right; }
.xp-freeform-toolbar button {
  width: 30px;
  height: 30px;
  margin: 0 2px;
  border-radius: 8px;
  color: #34363a;
  font-size: 15px;
}
.xp-freeform-toolbar button:hover { background: rgba(0, 0, 0, .07); }
.xp-freeform-toolbar button.active { color: white; background: #5856d6; }
.xp-freeform-toolbar b { font-size: 12px; }

.xp-freeform-board {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background-color: #f4f0e8;
  background-image: radial-gradient(rgba(95, 84, 71, .2) .7px, transparent .7px);
  background-size: 18px 18px;
}

.xp-freeform-board.drawing { cursor: crosshair; }
.xp-freeform-board > svg { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: auto; }
.xp-ink-path { fill: none; stroke: #5856d6; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .12)); }
.xp-board-caption { position: absolute; left: 50%; top: 28px; display: grid; justify-items: center; transform: translateX(-50%); color: rgba(58, 52, 45, .36); pointer-events: none; }
.xp-board-caption b { font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }
.xp-board-caption span { margin-top: 3px; font-size: 10px; }
#xp-freeform-items { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.xp-sticky-note {
  position: absolute;
  width: 180px;
  min-height: 150px;
  padding: 14px;
  border-radius: 3px 3px 12px 3px;
  color: #332f2a;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .44), transparent 28%),
    var(--note);
  box-shadow: 0 14px 28px rgba(64, 53, 41, .18), 0 3px 8px rgba(64, 53, 41, .12);
  transform: rotate(var(--rotate));
  pointer-events: auto;
  touch-action: none;
  transition: box-shadow .18s ease, transform .18s ease;
}

.xp-sticky-note::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  border-radius: 18px 0 10px 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, .06), rgba(255, 255, 255, .42));
}

.xp-sticky-note.dragging { z-index: 10; transform: rotate(0) scale(1.035); box-shadow: 0 22px 44px rgba(64, 53, 41, .27); }
.xp-sticky-note textarea {
  width: 100%;
  min-height: 116px;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font: 13px/1.6 "Kaiti SC", "STKaiti", var(--font);
}
.xp-sticky-note > button {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: rgba(0, 0, 0, .48);
  background: rgba(255, 255, 255, .35);
  opacity: 0;
  transition: opacity .15s ease;
}
.xp-sticky-note:hover > button { opacity: 1; }

/* Control Center */
.control-center {
  width: 356px !important;
  padding: 0 !important;
  border-radius: 22px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 32% -10%, rgba(255, 255, 255, .2), transparent 42%),
    rgba(30, 34, 42, .66) !important;
  border: .5px solid rgba(255, 255, 255, .27) !important;
  box-shadow: var(--xp-shadow), inset 0 1px rgba(255, 255, 255, .19) !important;
  backdrop-filter: blur(54px) saturate(195%) brightness(1.04) !important;
}

.xp-control-center {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.xp-glass-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .055));
  border: .5px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 5px 12px rgba(0, 0, 0, .08);
}

.xp-connectivity-card { padding: 6px; border-radius: 16px; }
.xp-connectivity-card > button {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 32px 1fr 14px;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 10px;
  text-align: left;
}
.xp-connectivity-card > button:hover { background: rgba(255, 255, 255, .07); }
.xp-connectivity-card i,
.xp-control-tile > i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1f2228;
  background: rgba(255, 255, 255, .8);
  font-style: normal;
  font-weight: 700;
  transition: background .2s ease, color .2s ease, transform .2s var(--xp-ease);
}
.xp-connectivity-card button.active i,
.xp-control-tile.active > i { color: white; background: #0a84ff; box-shadow: 0 4px 13px rgba(10, 132, 255, .32); }
.xp-connectivity-card b,
.xp-connectivity-card small,
.xp-control-tile b,
.xp-control-tile small { display: block; }
.xp-connectivity-card b, .xp-control-tile b { font-size: 12px; }
.xp-connectivity-card small, .xp-control-tile small { margin-top: 2px; color: rgba(255, 255, 255, .48); font-size: 10px; }
.xp-connectivity-card em { color: rgba(255, 255, 255, .32); font-style: normal; }

.xp-control-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xp-control-tile {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 16px;
  text-align: left;
}

.xp-slider-card { padding: 11px 12px; border-radius: 16px; }
.xp-slider-card header { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; margin-bottom: 8px; }
.xp-slider-card header span { color: rgba(255, 255, 255, .7); font-size: 12px; }
.xp-slider-card header b { font-size: 11px; }
.xp-slider-card output { color: rgba(255, 255, 255, .42); font-size: 10px; font-variant-numeric: tabular-nums; }
.xp-slider-card > input[type="range"] { width: 100%; }
.xp-slider-secondary { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 4px; margin-top: 9px; color: rgba(255, 255, 255, .48); font-size: 9px; }

.xp-slider-card input[type="range"] {
  height: 18px;
  margin: 0;
  appearance: none;
  border-radius: 99px;
  outline: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .26));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .22), 0 .5px rgba(255, 255, 255, .2);
}
.xp-slider-card input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  appearance: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .32), inset 0 0 0 .5px rgba(0, 0, 0, .12);
  transition: transform .16s var(--xp-ease);
}
.xp-slider-card input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.14); }
.xp-slider-secondary input[type="range"] { height: 10px; background: linear-gradient(90deg, #ffc96b, #ff722d); }
.xp-slider-secondary input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; }

.xp-now-playing {
  display: grid;
  grid-template-columns: 42px 1fr 24px 29px 24px;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border-radius: 16px;
}
.xp-album-art {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 68% 30%, #f7d98b, transparent 18%),
    linear-gradient(145deg, #063e67, #16a6a5 52%, #e39b52);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .28);
}
.xp-album-art span { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .8); border-radius: 50%; }
.xp-now-playing > div:nth-child(2) { min-width: 0; }
.xp-now-playing b, .xp-now-playing small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-now-playing b { font-size: 11px; }
.xp-now-playing small { margin-top: 2px; color: rgba(255, 255, 255, .44); font-size: 9px; }
.xp-now-playing > button { height: 26px; border-radius: 50%; font-size: 16px; }
.xp-now-playing > button:hover { background: rgba(255, 255, 255, .09); }
.xp-now-playing > button.play { font-size: 11px; background: rgba(255, 255, 255, .14); }

.xp-control-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xp-control-footer button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 31px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .055);
  font-size: 9px;
}
.xp-control-footer button:hover { color: white; background: rgba(255, 255, 255, .1); }
.xp-control-footer span { font-size: 13px; }

.xp-control-detail {
  position: absolute;
  inset: 0;
  z-index: 5;
  padding: 12px;
  border-radius: 22px;
  background: rgba(30, 34, 42, .92);
  backdrop-filter: blur(52px) saturate(180%);
  animation: xp-detail-in .28s var(--xp-ease) both;
}
@keyframes xp-detail-in { from { opacity: 0; transform: translateX(18px); } }
.xp-control-detail header { height: 40px; display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; text-align: center; }
.xp-control-detail > button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  text-align: left;
}
.xp-control-detail > button:hover,
.xp-control-detail > button.selected { background: rgba(255, 255, 255, .1); }
.xp-control-detail span b, .xp-control-detail span small { display: block; }
.xp-control-detail span small { margin-top: 3px; color: rgba(255, 255, 255, .45); font-size: 10px; }
.xp-display-icon { width: 34px; height: 28px; display: grid; place-items: center; border-radius: 5px; color: #1f2228; background: linear-gradient(145deg, #f3f7fa, #9ba7b1); }

/* Notification Center */
.notification-center {
  width: 376px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.xp-notification-center {
  max-height: calc(100vh - 44px);
  padding: 14px;
  overflow: auto;
  border: .5px solid rgba(255, 255, 255, .23);
  border-radius: 22px;
  background:
    radial-gradient(circle at 25% -10%, rgba(255, 255, 255, .19), transparent 38%),
    rgba(28, 32, 39, .64);
  box-shadow: var(--xp-shadow), inset 0 1px rgba(255, 255, 255, .16);
  backdrop-filter: blur(56px) saturate(190%) brightness(1.02);
}

.xp-notification-center > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2px 4px 12px;
}
.xp-notification-center > header b { color: rgba(255, 255, 255, .56); font-size: 11px; }
.xp-notification-center > header h2 { margin: 1px 0 0; font-size: 22px; letter-spacing: -.03em; }
.xp-notification-center > header button { margin-top: 7px; color: #64b5ff; font-size: 10px; }

.xp-widget-row { display: grid; grid-template-columns: 1.45fr 1fr; gap: 10px; margin-bottom: 14px; }
.xp-widget-row > button {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: .5px solid rgba(255, 255, 255, .18);
  border-radius: 19px;
  color: white;
  box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 10px 24px rgba(0, 0, 0, .16);
  text-align: left;
}
.xp-weather-widget {
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(17, 100, 176, .78), rgba(73, 176, 220, .56)),
    url("../assets/wallpapers/Tahoe Day.jpg") center/cover;
}
.xp-weather-widget span, .xp-weather-widget small, .xp-weather-widget i { display: block; }
.xp-weather-widget span { font-size: 11px; }
.xp-weather-widget b { display: block; margin-top: 8px; font-size: 37px; font-weight: 400; letter-spacing: -.05em; }
.xp-weather-widget small { margin-top: 2px; font-size: 11px; }
.xp-weather-widget i { position: absolute; left: 16px; bottom: 13px; color: rgba(255, 255, 255, .7); font-size: 9px; font-style: normal; }
.xp-calendar-widget { padding: 12px; color: #22252a !important; background: rgba(249, 249, 249, .94); text-align: center !important; }
.xp-calendar-widget span { display: block; color: #ff3b30; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.xp-calendar-widget b { display: block; margin: 4px 0 8px; font-size: 40px; font-weight: 400; letter-spacing: -.06em; }
.xp-calendar-widget small { display: block; padding-top: 7px; border-top: 1px solid rgba(0, 0, 0, .08); color: #54565b; font-size: 9px; line-height: 1.4; }

.xp-notification-groups { display: grid; gap: 10px; }
.xp-notification-group {
  position: relative;
  overflow: hidden;
  border: .5px solid rgba(255, 255, 255, .16);
  border-radius: 17px;
  background: rgba(255, 255, 255, .095);
  box-shadow: inset 0 1px rgba(255, 255, 255, .09), 0 8px 18px rgba(0, 0, 0, .11);
}
.xp-notification-group-title {
  min-height: 42px;
  display: grid;
  grid-template-columns: 27px 1fr auto 20px;
  align-items: center;
  gap: 7px;
  padding: 7px 9px 5px;
}
.xp-notification-group-title > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: white;
  background: linear-gradient(145deg, #0a84ff, #5ac8fa);
  box-shadow: inset 0 1px rgba(255, 255, 255, .34);
  font-size: 11px;
  font-weight: 700;
}
.xp-notification-group-title b { font-size: 11px; }
.xp-notification-group-title small { color: rgba(255, 255, 255, .4); font-size: 9px; }
.xp-notification-group-title > button { color: rgba(255, 255, 255, .4); }
.xp-notification-card {
  width: 100%;
  padding: 9px 12px 10px 43px;
  border-top: .5px solid rgba(255, 255, 255, .07);
  text-align: left;
}
.xp-notification-card:hover { background: rgba(255, 255, 255, .06); }
.xp-notification-card > div { display: flex; justify-content: space-between; gap: 10px; }
.xp-notification-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.xp-notification-card time { color: rgba(255, 255, 255, .36); font-size: 9px; }
.xp-notification-card p { margin: 4px 0 0; color: rgba(255, 255, 255, .47); font-size: 10px; }

/* Split View picker */
.xp-split-picker {
  position: fixed;
  top: 25px;
  bottom: 0;
  z-index: 850;
  width: 50%;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  background: rgba(7, 13, 20, .36);
  backdrop-filter: blur(22px) saturate(130%);
  transition: opacity .24s ease;
}
.xp-split-picker.left { left: 0; }
.xp-split-picker.right { right: 0; }
.xp-split-picker.show { opacity: 1; }

.xp-split-picker-panel {
  width: min(360px, 90%);
  max-height: 76vh;
  padding: 14px;
  border: .5px solid rgba(255, 255, 255, .25);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06)),
    rgba(28, 31, 38, .72);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .17);
  backdrop-filter: blur(46px) saturate(180%);
  transform: scale(.94) translateY(8px);
  transition: transform .32s var(--xp-ease);
}
.xp-split-picker.show .xp-split-picker-panel { transform: none; }
.xp-split-picker-panel header { padding: 5px 6px 12px; }
.xp-split-picker-panel header b, .xp-split-picker-panel header small { display: block; }
.xp-split-picker-panel header b { font-size: 14px; }
.xp-split-picker-panel header small { margin-top: 3px; color: rgba(255, 255, 255, .47); font-size: 10px; }
.xp-split-picker-panel > div { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.xp-split-picker-panel > div > button {
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 10px;
  align-items: end;
  padding: 7px;
  border-radius: 11px;
  text-align: left;
}
.xp-split-picker-panel > div > button:hover { background: rgba(255, 255, 255, .1); }
.xp-split-app-icon { grid-row: 1 / 3; width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; }
.xp-split-app-icon img { width: 100%; height: 100%; object-fit: contain; }
.xp-split-picker-panel button b { align-self: end; font-size: 11px; }
.xp-split-picker-panel button small { align-self: start; color: rgba(255, 255, 255, .43); font-size: 9px; }
.xp-split-cancel { width: 100%; height: 31px; margin-top: 8px; border-radius: 9px; color: #64b5ff; background: rgba(255, 255, 255, .055); font-size: 10px; }

.window-tiling-popover {
  width: 220px !important;
  padding: 7px !important;
  border: .5px solid rgba(255, 255, 255, .26) !important;
  border-radius: 13px !important;
  background: rgba(31, 34, 41, .78) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .14) !important;
  backdrop-filter: blur(38px) saturate(180%) !important;
}
.window-tiling-popover .tiling-option {
  width: 100%;
  height: 35px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  padding: 0 7px;
  border-radius: 8px;
  text-align: left;
  font-size: 11px;
}
.window-tiling-popover .tiling-option:hover { background: #0a84ff !important; }
.window-tiling-popover .tiling-option i { color: rgba(255, 255, 255, .65); font-style: normal; font-size: 16px; }
.window-tiling-popover .tiling-option:hover i { color: white; }
.xp-split-window { border-radius: 0 !important; }

.window:has(.xp-contacts) {
  container-type: inline-size;
}

@container (max-width: 760px) {
  .xp-contacts {
    grid-template-columns: 0 minmax(240px, 44%) minmax(0, 56%);
  }
  .xp-contacts-groups {
    display: block;
    width: 0;
    padding: 0;
    border: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .xp-contact-detail { padding: 22px 18px; }
  .xp-contact-actions { gap: 10px; }
  .xp-contact-card { grid-template-columns: 70px minmax(0, 1fr); }
  .xp-contact-card > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* Light appearance */
.light-mode .xp-contacts { background: #e8e8eb; color: #1d1d1f; }
.light-mode .xp-contacts-groups { background: rgba(228, 232, 237, .82); border-right-color: rgba(0, 0, 0, .09); }
.light-mode .xp-contact-list-column { background: #f2f2f4; border-right-color: rgba(0, 0, 0, .1); }
.light-mode .xp-contact-detail { background: linear-gradient(180deg, #fafafa, #f0f0f2); }
.light-mode .xp-contact-card, .light-mode .xp-favorite-button { background: rgba(0, 0, 0, .045); }
.light-mode .xp-contact-row small, .light-mode .xp-contact-hero p, .light-mode .xp-sidebar-heading { color: rgba(0, 0, 0, .48); }
.light-mode .xp-search-field { color: rgba(0, 0, 0, .42); background: rgba(0, 0, 0, .06); }
.light-mode .xp-search-field input { color: #1d1d1f; }
.light-mode .xp-contact-row.selected { color: white; }
.light-mode .xp-contact-row.selected small { color: rgba(255, 255, 255, .75); }
.light-mode .xp-memos { background: #eeeef1; color: #1d1d1f; }
.light-mode .xp-memos > aside { background: #f7f7f9; border-right-color: rgba(0, 0, 0, .1); }
.light-mode .xp-memos > main { background: radial-gradient(circle at 50% 33%, rgba(255, 80, 70, .07), transparent 38%), #eeeef1; }
.light-mode .xp-memo-row small, .light-mode .xp-memo-row time, .light-mode .xp-memo-stage p { color: rgba(0, 0, 0, .45); }
.light-mode .xp-memo-row.selected { background: rgba(0, 0, 0, .07); }

@media (max-width: 720px) {
  .xp-contacts { grid-template-columns: 0 42% 58%; }
  .xp-contacts-groups {
    display: block;
    width: 0;
    padding: 0;
    border: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .xp-contact-detail { padding: 22px 14px; }
  .xp-contact-actions { gap: 11px; }
  .xp-contact-card { grid-template-columns: 70px 1fr; }
  .xp-dictionary-body { grid-template-columns: 0 1fr; }
  .xp-dictionary-body aside { display: none; }
  .xp-dictionary-body article { padding: 26px 22px; }
  .xp-memos { grid-template-columns: 42% 58%; }
  .xp-waveform { width: 90%; }
  .xp-freeform-toolbar b { display: none; }
  .xp-freeform-toolbar { grid-template-columns: 1fr 1fr; }
  .xp-control-center { gap: 8px; padding: 10px; }
  .control-center { width: min(356px, calc(100vw - 16px)) !important; }
  .notification-center { width: min(376px, calc(100vw - 16px)) !important; }
  .xp-notification-center {
    background:
      radial-gradient(circle at 25% -10%, rgba(255, 255, 255, .16), transparent 38%),
      rgba(24, 28, 35, .84);
  }
  .xp-split-picker { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #xp-dynamic-wallpaper { display: none; }
  .xp-waveform.recording i { animation: none; }
}
