/* Ubuntu Web — desktop shell: top bar, dock, overview, desktop, session screens. */

/* =================== layout =================== */

#desktop {
  position: absolute;
  top: 32px; left: 0; right: 0; bottom: 0;
  overflow: hidden;
}
#wallpaper, #wallpaper-fade {
  position: absolute; inset: 0;
  background-image: var(--wallpaper-url);
  background-size: cover;
  background-position: center;
  transition: opacity 0.5s ease;
}
#wallpaper { z-index: 0; }
#wallpaper-fade { opacity: 0; z-index: 1; }
#desktop.has-dock-left #workspaces { left: 66px; }
#workspaces { position: absolute; inset: 0; z-index: 3; }

#night-light {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(255, 147, 41, 0.14);
  pointer-events: none;
  opacity: 0; transition: opacity 0.8s ease;
}
#night-light.on { opacity: 1; }
#brightness-veil {
  position: fixed; inset: 0; z-index: 9799;
  background: #000;
  pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease;
}

/* =================== top bar =================== */

#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 32px;
  background: #131313;
  color: #f2f2f2;
  display: flex;
  align-items: center;
  z-index: 7000;
  font-size: 13px;
  font-weight: 500;
}
#topbar .tb-side { flex: 1; display: flex; align-items: center; gap: 2px; }
#topbar .tb-side.right { justify-content: flex-end; }
.tb-item {
  height: 26px;
  margin: 0 3px;
  padding: 0 10px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.12s ease;
}
.tb-item:hover { background: rgba(255,255,255,0.12); }
.tb-item.open { background: rgba(255,255,255,0.18); }
.tb-item svg { display: block; }

/* Activities workspace pill indicator */
#tb-activities { gap: 5px; padding: 0 12px; }
#tb-activities .ws-dot {
  width: 7px; height: 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.45);
  transition: all 0.25s cubic-bezier(0.25,0.9,0.3,1);
}
#tb-activities .ws-dot.current { width: 22px; background: #fff; }

#tb-clock .clock-notif-dot {
  width: 4.5px; height: 4.5px; border-radius: 50%;
  background: var(--accent);
  margin-left: 2px;
  display: none;
}
#tb-clock.has-notifs .clock-notif-dot { display: block; }

#tb-status { padding: 0 12px; gap: 8px; }
#tb-status .pct { font-size: 12.5px; }

/* =================== shell popovers =================== */

.shell-popover {
  position: fixed;
  top: 38px;
  z-index: 7500;
  background: #fff;
  color: rgba(0,0,0,0.85);
  border-radius: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3), 0 14px 44px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.25,0.9,0.3,1.05);
  pointer-events: none;
}
:root[data-scheme="dark"] .shell-popover {
  background: #2d2d2d;
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.08);
}
.shell-popover.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ---- calendar / notifications popover ---- */
#calendar-pop {
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.98);
  display: flex;
  padding: 14px;
  gap: 14px;
}
#calendar-pop.open { transform: translateX(-50%) translateY(0) scale(1); }

.cal-notifs {
  width: 320px;
  display: flex; flex-direction: column;
  min-height: 340px; max-height: 420px;
}
.cal-notifs-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.cal-empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--fg-faint);
  font-size: 13.5px;
}
.cal-empty svg { opacity: 0.4; }
.notif-card {
  background: var(--hover);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex; gap: 10px;
  position: relative;
  cursor: default;
}
.notif-card .nc-icon { flex: none; width: 26px; height: 26px; color: var(--fg-dim); }
.notif-card .nc-icon svg { width: 26px; height: 26px; }
.notif-card .nc-body { flex: 1; min-width: 0; }
.notif-card .nc-title { font-weight: 600; font-size: 13px; }
.notif-card .nc-text { font-size: 12.5px; color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-card .nc-time { font-size: 11px; color: var(--fg-faint); margin-top: 2px; }
.notif-card .nc-close {
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: var(--btn-bg); color: var(--fg);
}
.notif-card:hover .nc-close { display: inline-flex; }
.cal-notifs-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; margin-top: 4px;
}
.cal-dnd { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-dim); }
.cal-clear-btn { font-size: 13px; font-weight: 600; padding: 5px 14px; }

.cal-right { width: 300px; display: flex; flex-direction: column; gap: 10px; }
.cal-datecard { padding: 6px 8px 0; }
.cal-datecard .cal-dow { font-size: 13px; color: var(--fg-dim); }
.cal-datecard .cal-date-big { font-size: 20px; font-weight: 700; }
.cal-grid { padding: 4px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; }
.cal-head .cal-month { font-weight: 700; font-size: 13.5px; }
.cal-nav-btn { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-dim); }
.cal-nav-btn:hover { background: var(--hover); color: var(--fg); }
.cal-week, .cal-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-week span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--fg-faint); padding: 4px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--fg);
  margin: 1px;
}
.cal-day:hover { background: var(--hover); }
.cal-day.other { color: var(--fg-faint); }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.selected:not(.today) { outline: 2px solid rgba(var(--accent-rgb), 0.6); }

/* ---- quick settings popover ---- */
#qs-pop {
  right: 6px;
  width: 400px;
  padding: 14px;
  transform-origin: top right;
}
.qs-toprow { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.qs-batt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 0 6px; color: var(--fg-dim); }
.qs-round {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--btn-bg);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg);
  transition: background 0.12s ease;
}
.qs-round:hover { background: var(--btn-hover); }
.qs-slider-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.qs-slider-row .icon { color: var(--fg-dim); flex: none; }
.qs-slider-row input.slider { flex: 1; }
.qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.qs-pill {
  height: 48px;
  border-radius: 99px;
  background: var(--btn-bg);
  display: flex; align-items: center;
  padding: 0 6px 0 14px;
  gap: 9px;
  text-align: left;
  transition: background 0.15s ease;
  overflow: hidden;
}
.qs-pill:hover { background: var(--btn-hover); }
.qs-pill.active { background: var(--accent); color: #fff; }
.qs-pill.active:hover { background: var(--accent-hover); }
.qs-pill .icon { flex: none; }
.qs-pill .qs-pill-text { flex: 1; min-width: 0; }
.qs-pill .qs-pill-label { font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-pill .qs-pill-sub { font-size: 11.5px; opacity: 0.75; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-pill .qs-pill-arrow {
  flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.qs-pill .qs-pill-arrow:hover { background: rgba(255,255,255,0.22); }
.qs-pill:not(.active) .qs-pill-arrow:hover { background: var(--btn-active); }

/* qs submenu (wifi networks, power modes) */
.qs-sub { margin-top: 10px; }
.qs-sub-head { display: flex; align-items: center; gap: 8px; padding: 2px 0 8px; font-weight: 700; font-size: 13.5px; }
.qs-back { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-dim); }
.qs-back:hover { background: var(--hover); }
.qs-sub-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.qs-sub-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--fg);
  text-align: left;
}
.qs-sub-item:hover { background: var(--hover); }
.qs-sub-item .qs-sub-label { flex: 1; font-size: 13.5px; }
.qs-sub-item .icon { color: var(--fg-dim); }
.qs-sub-item .check { color: var(--accent); }
.qs-sub-item .sub-desc { display: block; font-size: 11.5px; color: var(--fg-dim); }

/* =================== dock =================== */

#dock {
  position: fixed;
  left: 0; top: 32px; bottom: 0;
  width: 66px;
  background: rgba(26, 14, 22, 0.84);
  backdrop-filter: blur(8px);
  z-index: 6500;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  transition: transform 0.25s cubic-bezier(0.25,0.9,0.3,1);
}
#dock.hidden-auto { transform: translateX(-100%); }
#dock-reveal {
  position: fixed; left: 0; top: 32px; bottom: 0; width: 4px;
  z-index: 6499;
}
#dock .dock-scroll {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  overflow-y: auto; overflow-x: hidden;
  width: 100%;
  scrollbar-width: none;
}
#dock .dock-scroll::-webkit-scrollbar { display: none; }
.dock-item {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  transition: background 0.14s ease;
}
.dock-item:hover { background: rgba(255,255,255,0.12); }
.dock-item.focused-app { background: rgba(255,255,255,0.18); }
.dock-item .dock-icon { width: 44px; height: 44px; pointer-events: none; transition: transform 0.12s ease; }
.dock-item .dock-icon svg { width: 100%; height: 100%; display: block; }
.dock-item:active .dock-icon { transform: scale(0.9); }
.dock-item.launching .dock-icon { animation: dock-bounce 0.9s cubic-bezier(0.3,0,0.4,1) infinite; }
@keyframes dock-bounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-9px); }
  55% { transform: translateY(0); }
}
.dock-item.urgent { animation: dock-urgent 0.5s ease 4; }
@keyframes dock-urgent {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(4px); }
  70% { transform: translateX(-4px); }
}
.dock-dots {
  position: absolute; left: 1px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 3px;
}
.dock-dots .dd {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 3px rgba(var(--accent-rgb), 0.9);
}
#dock .dock-sep { width: 40px; height: 1px; background: rgba(255,255,255,0.2); margin: 6px 0; flex: none; }
#dock-showapps .dock-icon { padding: 6px; }

/* bottom-positioned dock variant */
#dock.pos-bottom {
  left: 50%; right: auto; top: auto; bottom: 0;
  transform: translateX(-50%);
  width: auto; height: 66px;
  flex-direction: row;
  padding: 0 6px;
  border-radius: 14px 14px 0 0;
}
#dock.pos-bottom .dock-scroll { flex-direction: row; }
#dock.pos-bottom .dock-sep { width: 1px; height: 40px; margin: 0 6px; }
#dock.pos-bottom .dock-dots { left: 50%; top: auto; bottom: 1px; transform: translateX(-50%); flex-direction: row; }
#dock.pos-bottom.hidden-auto { transform: translateX(-50%) translateY(100%); }

/* =================== overview =================== */

#overview {
  position: fixed;
  top: 32px; left: 0; right: 0; bottom: 0;
  z-index: 6000;
  background: #222;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.overview-open #overview { opacity: 1; pointer-events: auto; }
body.overview-open #desktop { visibility: hidden; }
body.overview-open.overview-windows #desktop { visibility: visible; }
body.overview-open.overview-windows #desktop #wallpaper,
body.overview-open.overview-windows #desktop #wallpaper-fade { opacity: 0; }
body.overview-open.overview-windows #desktop { background: transparent; }

/* while in windows overview the real workspace strip shows through; overview chrome sits above */
#overview.mode-windows { background: transparent; }
#ov-backdrop {
  position: fixed; top: 32px; left: 0; right: 0; bottom: 0;
  background: #222;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
body.overview-open #ov-backdrop { opacity: 1; }
body.overview-open #workspaces { z-index: 5; }
body.overview-open #desktop-icons { display: none; }

.ov-top {
  position: relative;
  z-index: 20;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding-top: 12px;
  width: 100%;
}
.ov-search {
  width: 360px;
  height: 36px;
  border-radius: 99px;
  background: rgba(255,255,255,0.12);
  border: none;
  outline: none;
  color: #fff;
  padding: 0 16px 0 40px;
  font-size: 14px;
  font-family: inherit;
  transition: background 0.15s ease, width 0.2s ease;
}
.ov-search::placeholder { color: rgba(255,255,255,0.55); }
.ov-search:focus { background: rgba(255,255,255,0.18); }
.ov-search-wrap { position: relative; }
.ov-search-wrap .icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.6);
  pointer-events: none;
}
.ov-ws-strip { display: flex; gap: 12px; align-items: center; }
.ov-ws-thumb {
  width: 130px; height: 74px;
  border-radius: 8px;
  background-image: var(--wallpaper-url);
  background-size: cover;
  background-position: center;
  position: relative;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}
.ov-ws-thumb:hover { transform: scale(1.04); }
.ov-ws-thumb.current { outline-color: rgba(255,255,255,0.9); }
.ov-ws-thumb .mini-win {
  position: absolute;
  background: rgba(250,250,250,0.92);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
:root[data-scheme="dark"] .ov-ws-thumb .mini-win { background: rgba(64,64,64,0.95); }

/* window spread hover chrome */
.ov-hit {
  position: absolute; inset: 0;
  z-index: 50;
  cursor: pointer;
  border-radius: 12px;
  transition: box-shadow 0.15s ease;
}
.ov-hit:hover { box-shadow: inset 0 0 0 3px rgba(255,255,255,0.65); }
.ov-close {
  position: absolute;
  top: -12px; right: -12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #3b3b3b;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 60;
}
.ov-close:hover { background: var(--accent); }
.window.ov-managed:hover .ov-close { opacity: 1; transform: scale(1); }
.ov-caption {
  position: absolute;
  left: 50%; bottom: -34px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12.5px;
  padding: 4px 12px;
  border-radius: 99px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 60;
}
.window.ov-managed:hover .ov-caption { opacity: 1; }
.window.ov-managed { transition: transform 0.28s cubic-bezier(0.25,0.9,0.3,1), opacity 0.2s ease; }
.window.ov-managed .ov-appicon {
  position: absolute;
  left: 50%; bottom: -22px;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  z-index: 55;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.window.ov-managed .ov-appicon svg { width: 100%; height: 100%; }

.ov-empty-hint {
  position: absolute; top: 45%; left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 15px;
  z-index: 8;
  pointer-events: none;
}

/* ---- app grid ---- */
#ov-appgrid {
  position: absolute;
  top: 120px; left: 80px; right: 80px; bottom: 40px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.25,0.9,0.3,1);
  pointer-events: none;
}
#overview.mode-grid #ov-appgrid { opacity: 1; transform: none; pointer-events: auto; }
#overview.mode-grid .ov-ws-strip { display: flex; }
.ov-pages {
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.ov-pages-strip {
  display: flex;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.25,0.9,0.3,1);
}
.ov-page {
  flex: none;
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, 120px);
  grid-auto-rows: 120px;
  justify-content: center;
  align-content: center;
  gap: 28px 34px;
  padding: 10px;
}
.app-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border-radius: 14px;
  padding: 8px 4px;
  color: #fff;
  transition: background 0.14s ease;
}
.app-tile:hover { background: rgba(255,255,255,0.1); }
.app-tile .app-tile-icon { width: 64px; height: 64px; }
.app-tile .app-tile-icon svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.35)); }
.app-tile .app-tile-label {
  font-size: 12.5px;
  text-align: center;
  max-width: 116px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-height: 1.25;
}
.app-tile.folder-tile .app-tile-icon {
  background: rgba(255,255,255,0.12);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  gap: 4px;
}
.app-tile.folder-tile .app-tile-icon svg { width: 100%; height: 100%; filter: none; }
.ov-dots { display: flex; gap: 10px; padding: 16px 0 0; }
.ov-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}
.ov-dot.current { background: #fff; transform: scale(1.2); }

/* folder popup */
.ov-folder-pop {
  position: absolute;
  z-index: 40;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(40,40,40,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  padding: 24px 30px 16px;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.25,0.9,0.3,1.06);
  box-shadow: 0 14px 50px rgba(0,0,0,0.5);
}
.ov-folder-pop.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ov-folder-title { text-align: center; color: #fff; font-weight: 600; margin-bottom: 14px; }
.ov-folder-grid { display: grid; grid-template-columns: repeat(3, 110px); gap: 20px; }

/* ---- search results ---- */
#ov-results {
  position: absolute;
  top: 120px; left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 160px));
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  z-index: 35;
  display: none;
  flex-direction: column;
  gap: 20px;
  color: #eee;
}
#overview.searching #ov-results { display: flex; }
#overview.searching .window.ov-managed { opacity: 0; pointer-events: none; }
#overview.searching #ov-appgrid { opacity: 0; pointer-events: none; }
#overview.searching #ov-backdrop { opacity: 1; }
.ov-res-section-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.55); margin-bottom: 8px; }
.ov-res-apps { display: flex; gap: 14px; flex-wrap: wrap; }
.ov-res-rows { display: flex; flex-direction: column; gap: 2px; }
.ov-res-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px;
  border-radius: 10px;
  color: #eee;
  text-align: left;
}
.ov-res-row:hover, .ov-res-row.selected { background: rgba(255,255,255,0.12); }
.ov-res-row .icon { color: rgba(255,255,255,0.6); flex: none; }
.ov-res-row .res-name { font-size: 14px; }
.ov-res-row .res-detail { font-size: 12px; color: rgba(255,255,255,0.45); }
.ov-no-results { text-align: center; color: rgba(255,255,255,0.5); padding: 40px 0; font-size: 15px; }

/* =================== desktop icons =================== */

#desktop-icons {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.desk-icon {
  width: 88px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.desk-icon:hover { background: rgba(255,255,255,0.1); }
.desk-icon.selected { background: rgba(var(--accent-rgb), 0.4); border-color: rgba(var(--accent-rgb), 0.7); }
.desk-icon .di-img { width: 48px; height: 48px; }
.desk-icon .di-img svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.desk-icon .di-label {
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  text-align: center;
  max-width: 86px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* =================== session layers =================== */

#session-layer {
  position: fixed; inset: 0;
  z-index: 10000;
  display: none;
}
#session-layer.active { display: block; }

.boot-screen {
  position: absolute; inset: 0;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 40px;
  color: #fff;
}
.boot-logo { display: flex; align-items: center; gap: 16px; }
.boot-logo .boot-word {
  font-size: 44px; font-weight: 500; letter-spacing: -1px;
  font-family: var(--font-ui);
}
.boot-spinner { display: flex; gap: 9px; }
.boot-spinner .bs-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  animation: boot-dot 1.1s ease-in-out infinite;
}
.boot-spinner .bs-dot:nth-child(2) { animation-delay: 0.18s; }
.boot-spinner .bs-dot:nth-child(3) { animation-delay: 0.36s; }
.boot-spinner .bs-dot:nth-child(4) { animation-delay: 0.54s; }
@keyframes boot-dot {
  0%, 100% { background: rgba(255,255,255,0.22); }
  40% { background: #fff; }
}
.boot-bios {
  position: absolute; inset: 0;
  background: #000;
  color: #bbb;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 24px 28px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* lock screen */
.lock-screen {
  position: absolute; inset: 0;
  background-image: var(--wallpaper-url);
  background-size: cover;
  background-position: center;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.lock-screen::before {
  content: '';
  position: absolute; inset: -30px;
  background-image: var(--wallpaper-url);
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.55);
}
.lock-content {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  color: #fff;
  transition: transform 0.3s cubic-bezier(0.25,0.9,0.3,1), opacity 0.3s ease;
}
.lock-clock { font-size: 84px; font-weight: 300; letter-spacing: -2px; text-shadow: 0 2px 20px rgba(0,0,0,0.4); }
.lock-date { font-size: 19px; font-weight: 500; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.lock-hint { margin-top: 48px; font-size: 13px; color: rgba(255,255,255,0.7); animation: lock-hint-pulse 2.5s ease infinite; }
@keyframes lock-hint-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.lock-screen.show-login .lock-content.clock-part { transform: translateY(-40px) scale(0.8); opacity: 0; pointer-events: none; position: absolute; inset: 0; }
.lock-login {
  position: relative;
  flex: 1;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  color: #fff;
}
.lock-screen.show-login .lock-login { display: flex; }
.lock-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 500; color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.lock-user { font-size: 19px; font-weight: 600; }
.lock-pass-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.lock-pass {
  width: 240px;
  height: 38px;
  border-radius: 99px;
  border: none; outline: none;
  background: rgba(255,255,255,0.16);
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  backdrop-filter: blur(4px);
}
.lock-pass::placeholder { color: rgba(255,255,255,0.55); }
.lock-pass:focus { background: rgba(255,255,255,0.24); }
.lock-arrow {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.16);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.lock-arrow:hover { background: rgba(255,255,255,0.28); }
.lock-demo-hint { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.lock-topbar {
  position: relative;
  width: 100%; height: 32px;
  background: rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 500;
  z-index: 2;
}

/* fade helper for session transitions */
.session-fade {
  position: absolute; inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.session-fade.show { opacity: 1; pointer-events: auto; }

.powered-off-hint {
  position: absolute; left: 0; right: 0; bottom: 60px;
  text-align: center;
  color: rgba(255,255,255,0.28);
  font-size: 13px;
  opacity: 0;
  transition: opacity 1s ease;
}
.powered-off-hint.show { opacity: 1; }

/* screenshot flash */
#shot-flash {
  position: fixed; inset: 0;
  background: #fff;
  z-index: 11000;
  opacity: 0;
  pointer-events: none;
}
#shot-flash.go { animation: shot-flash 0.4s ease; }
@keyframes shot-flash { 0% { opacity: 0; } 20% { opacity: 0.9; } 100% { opacity: 0; } }

/* toast for workspace switch (optional subtle) */
@media (max-width: 900px) {
  #calendar-pop { flex-direction: column; max-height: calc(100vh - 60px); overflow-y: auto; }
  .cal-notifs { width: 300px; min-height: 180px; }
  .cal-right { width: 300px; }
  #ov-appgrid { left: 20px; right: 20px; }
}
