/* Демо HypeDE в браузере: рабочий стол на всю страницу.
   Цвета, скругления и размеры — как у оболочки HypeDE (shell/theme). */
.hd {
  --accent: #0b57d0;
  --accent-fg: #ffffff;
  --accent-soft: #d3e3fd;
  --accent-soft-fg: #041e49;
  --fg: #1f1f1f;
  --dim: #5e6268;
  --surface: #ffffff;
  --bubble: rgba(255, 255, 255, 0.86);
  --bubble-border: rgba(0, 0, 0, 0.06);
  --tile: #e9eef6;
  --tile-hover: #dde3ec;
  --hover: rgba(0, 0, 0, 0.05);
  --line: rgba(0, 0, 0, 0.08);
  --shelf: rgba(230, 236, 245, 0.72);
  --header: #f1f4f9;
  --sidebar: #f7f9fc;
  --shadow: 0 10px 40px rgba(16, 24, 40, 0.22), 0 2px 6px rgba(16, 24, 40, 0.10);
  --radius: 20px;
  --font: "Figtree", "Roboto", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --shelf-h: 56px;
  position: fixed;
  inset: 0;
  overflow: hidden;
  font: 400 14px/1.45 var(--font);
  color: var(--fg);
  background: #9db4d8;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.hd[data-scheme="dark"] {
  --accent: #a8c7fa;
  --accent-fg: #062e6f;
  --accent-soft: #0b3a82;
  --accent-soft-fg: #d3e3fd;
  --fg: #e3e3e3;
  --dim: #b4b8be;
  --surface: #202124;
  --bubble: rgba(36, 38, 42, 0.86);
  --bubble-border: rgba(255, 255, 255, 0.07);
  --tile: #36383d;
  --tile-hover: #41444a;
  --hover: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --shelf: rgba(28, 30, 34, 0.72);
  --header: #2a2b2f;
  --sidebar: #1c1d20;
  --shadow: 0 12px 44px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
.hd *, .hd *::before, .hd *::after { box-sizing: border-box; }
.hd [hidden] { display: none !important; }
.hd button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.hd input { font: inherit; color: inherit; }
.hd :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.hd svg.i { width: 20px; height: 20px; fill: currentColor; flex: none; }
.hd .app-icon { width: 40px; height: 40px; flex: none; }
.hd .selectable { user-select: text; -webkit-user-select: text; }

/* ---------- обои, рабочий стол, ночной свет ---------- */
.hd .wallpaper {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: opacity 400ms ease;
}
.hd .night {
  position: absolute; inset: 0; pointer-events: none; z-index: 9000;
  background: rgba(255, 140, 40, 0.18); mix-blend-mode: multiply;
  opacity: 0; transition: opacity 600ms ease;
}
.hd.night-on .night { opacity: 1; }
.hd .dim-layer {
  position: absolute; inset: 0; pointer-events: none; z-index: 9001;
  background: #000; opacity: 0; transition: opacity 200ms linear;
}
.hd .desktop-icons {
  position: absolute; top: 16px; left: 16px;
  display: grid; gap: 8px; z-index: 1;
}
.hd .desktop-icon {
  width: 88px; padding: 8px 4px; border-radius: 12px;
  display: grid; justify-items: center; gap: 6px; text-align: center;
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.55);
}
.hd .desktop-icon:hover, .hd .desktop-icon.selected { background: rgba(255, 255, 255, 0.18); }
.hd .desktop-icon .tile { width: 52px; height: 52px; }
.hd .widgets { position: absolute; top: 16px; right: 16px; display: grid; gap: 10px; z-index: 1; width: 240px; }
.hd .widget {
  background: rgba(20, 22, 26, 0.55); color: #fff; border-radius: 22px; padding: 14px 18px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.hd .widget .big { font-size: 40px; font-weight: 300; letter-spacing: 1px; line-height: 1.1; }
.hd .widget .small { opacity: 0.85; font-size: 13px; }

/* ---------- полка ---------- */
.hd .shelf {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--shelf-h); z-index: 5000;
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: var(--shelf);
  backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  transition: transform 220ms ease;
}
.hd.autohide .shelf { transform: translateY(calc(var(--shelf-h) - 4px)); }
.hd.autohide .shelf:hover, .hd.autohide .shelf.keep { transform: none; }
.hd .ring {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
}
.hd .ring::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor;
}
.hd .ring:hover, .hd .ring[aria-expanded="true"] { background: var(--hover); }
.hd .island {
  height: 36px; min-width: 112px; padding: 0 14px; border-radius: 18px; flex: none;
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  background: #111214; color: #fff; font-weight: 600; font-size: 13px;
  transition: min-width 260ms cubic-bezier(.2,.9,.3,1.2);
}
.hd .island .bars { display: none; gap: 2px; align-items: end; height: 14px; }
.hd .island.playing .bars { display: flex; }
.hd .island .bars i { width: 3px; background: #8ab4f8; border-radius: 2px; height: 30%; }
.hd .island.playing .bars i { animation: hd-bars 900ms ease-in-out infinite alternate; }
.hd .island.playing .bars i:nth-child(2) { animation-delay: -300ms; }
.hd .island.playing .bars i:nth-child(3) { animation-delay: -600ms; }
@keyframes hd-bars { from { height: 25%; } to { height: 100%; } }
.hd .shelf-apps { flex: 1; display: flex; justify-content: center; gap: 4px; min-width: 0; }
.hd .shelf-app {
  position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  transition: transform 160ms ease;
}
.hd .shelf-app:hover { background: var(--hover); }
.hd .shelf-app .app-icon { width: 36px; height: 36px; transition: transform 200ms cubic-bezier(.2,.9,.3,1.4); }
.hd .shelf-app:hover .app-icon { transform: scale(1.12); }
.hd .shelf-app.bounce .app-icon { animation: hd-bounce 600ms ease; }
@keyframes hd-bounce { 30% { transform: translateY(-10px); } 60% { transform: translateY(0); } 80% { transform: translateY(-3px); } }
.hd .shelf-app .dot {
  position: absolute; bottom: 2px; left: 50%; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 3px; background: var(--fg); opacity: 0; transition: opacity 200ms, width 200ms, margin 200ms;
}
.hd .shelf-app.running .dot { opacity: 0.55; }
.hd .shelf-app.active .dot { opacity: 1; width: 14px; margin-left: -7px; background: var(--accent); }
.hd .tray { display: flex; gap: 6px; align-items: center; flex: none; }
.hd .pill {
  height: 36px; padding: 0 12px; border-radius: 18px; display: flex; align-items: center; gap: 8px;
  font-weight: 500;
}
.hd .pill:hover, .hd .pill[aria-expanded="true"] { background: var(--hover); }
.hd .pill .i { width: 17px; height: 17px; }
.hd .tooltip {
  position: absolute; z-index: 9500; pointer-events: none;
  background: rgba(32, 33, 36, 0.92); color: #fff; padding: 5px 10px; border-radius: 8px; font-size: 12.5px;
  white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity 120ms;
}
.hd .tooltip.on { opacity: 1; }

/* ---------- пузыри: лаунчер, быстрые настройки, календарь, остров ---------- */
.hd .bubble {
  position: absolute; z-index: 7100;
  background: var(--bubble); border: 1px solid var(--bubble-border); border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
  transform-origin: bottom left; opacity: 0; transform: translateY(12px) scale(0.97);
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.2,.9,.3,1.15);
  pointer-events: none;
}
.hd .bubble.open { opacity: 1; transform: none; pointer-events: auto; }
.hd .bubble.right { transform-origin: bottom right; }

.hd .launcher { left: 10px; bottom: calc(var(--shelf-h) + 10px); width: min(560px, calc(100vw - 20px));
  max-height: calc(100% - var(--shelf-h) - 30px); display: flex; flex-direction: column; overflow: hidden; }
.hd .search {
  display: flex; align-items: center; gap: 12px; margin: 14px 14px 6px; padding: 0 16px; height: 48px;
  border-radius: 24px; background: var(--tile);
}
.hd .search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; min-width: 0; }
.hd .launcher-body { overflow: auto; padding: 4px 14px 16px; }
.hd .section-title { font-size: 12.5px; font-weight: 600; color: var(--dim); margin: 12px 6px 6px; }
.hd .app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; }
.hd .app-tile {
  display: grid; justify-items: center; gap: 8px; padding: 12px 4px 10px; border-radius: 16px;
  font-size: 12.5px; text-align: center;
}
.hd .app-tile:hover, .hd .app-tile:focus-visible { background: var(--hover); }
.hd .app-tile .app-icon { width: 48px; height: 48px; }
.hd .app-tile.ghost { opacity: 0.6; }
.hd .result {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 14px;
}
.hd .result:hover, .hd .result.selected { background: var(--hover); }
.hd .result .app-icon, .hd .result .round {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
}
.hd .result .round { background: var(--tile); }
.hd .result .t { font-weight: 500; }
.hd .result .s { color: var(--dim); font-size: 12.5px; }
.hd .chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hd .chip {
  display: flex; gap: 8px; align-items: center; padding: 8px 14px 8px 10px; border-radius: 14px;
  background: var(--tile); font-size: 13px; max-width: 100%;
}
.hd .chip:hover { background: var(--tile-hover); }

.hd .qs { right: 10px; bottom: calc(var(--shelf-h) + 10px); width: 400px; padding: 16px; max-width: calc(100vw - 20px); }
.hd .qs-top { display: flex; gap: 8px; margin-bottom: 12px; }
.hd .qs-top .spacer { flex: 1; }
.hd .round-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tile); }
.hd .round-btn:hover { background: var(--tile-hover); }
.hd .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hd .qtile {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: 20px;
  background: var(--tile); text-align: left; min-width: 0;
}
.hd .qtile:hover { background: var(--tile-hover); }
.hd .qtile.on { background: var(--accent); color: var(--accent-fg); }
.hd .qtile .txt { min-width: 0; }
.hd .qtile .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd .qtile .s { font-size: 12px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd .slider { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.hd .slider input { flex: 1; accent-color: var(--accent); height: 28px; }
.hd .qs-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px;
  color: var(--dim); font-size: 12.5px; }

.hd .calendar { right: 120px; bottom: calc(var(--shelf-h) + 10px); width: 320px; padding: 16px; }
.hd .cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hd .cal-head b { font-size: 16px; text-transform: capitalize; }
.hd .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.hd .cal-grid .dow { color: var(--dim); font-size: 11.5px; padding: 4px 0; }
.hd .cal-grid .d { padding: 7px 0; border-radius: 50%; }
.hd .cal-grid .d.today { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.hd .cal-grid .d.other { opacity: 0.4; }

.hd .island-panel { left: 60px; bottom: calc(var(--shelf-h) + 10px); width: 380px; padding: 16px;
  max-width: calc(100vw - 20px); }
.hd .media { display: flex; gap: 14px; align-items: center; }
.hd .cover { width: 64px; height: 64px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, #8ab4f8, #c58af9 55%, #f28b82); }
.hd .media .t { font-weight: 600; }
.hd .media .s { color: var(--dim); font-size: 12.5px; }
.hd .progress { height: 4px; border-radius: 2px; background: var(--tile); margin: 12px 0 8px; overflow: hidden; }
.hd .progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.hd .controls { display: flex; justify-content: center; gap: 10px; }
.hd .tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.hd .tool { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px;
  background: var(--tile); font-size: 12px; text-align: center; }
.hd .tool:hover { background: var(--tile-hover); }
.hd .timer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px;
  padding: 10px 14px; border-radius: 16px; background: var(--tile); }
.hd .timer b { font: 600 22px/1 var(--mono); }
.hd .timer .chip { background: var(--surface); padding: 6px 12px; }
.hd .timer .chip:hover { background: var(--tile-hover); }
.hd textarea.notes {
  width: 100%; margin-top: 10px; min-height: 64px; resize: vertical; border: 0; border-radius: 14px;
  padding: 10px 12px; background: var(--tile); color: var(--fg); font: inherit; outline: 0;
}

/* ---------- окна ---------- */
.hd .window {
  position: absolute; display: flex; flex-direction: column; min-width: 320px; min-height: 220px;
  background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.2,.9,.3,1.1);
}
.hd .window.opening { opacity: 0; transform: scale(0.92) translateY(14px); }
.hd .window.closing { opacity: 0; transform: scale(0.95); }
.hd .window.minimized { opacity: 0; pointer-events: none; }
.hd .window.dragging, .hd .window.resizing { transition: none; }
.hd .window.maxed { border-radius: 0; }
.hd .window:not(.focused) .titlebar { color: var(--dim); }
.hd .titlebar {
  height: 46px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px;
  background: var(--header); cursor: default; touch-action: none;
}
.hd .titlebar .title { flex: 1; text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; pointer-events: none; }
.hd .titlebar .lead { display: flex; gap: 4px; }
.hd .wbtn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.hd .wbtn:hover { background: var(--hover); }
.hd .wbtn .i { width: 16px; height: 16px; }
.hd .wbtn.close:hover { background: #d93025; color: #fff; }
.hd .wbody { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.hd .resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
.hd .snap-preview {
  position: absolute; z-index: 4500; border-radius: 16px; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 22%, transparent); border: 2px solid var(--accent);
  opacity: 0; transition: all 160ms ease;
}
.hd .snap-preview.on { opacity: 1; }

/* ---------- программы ---------- */
.hd .sidebar { width: 224px; flex: none; background: var(--sidebar); padding: 8px; overflow: auto; }
.hd .side-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 20px;
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd .side-item .lbl { overflow: hidden; text-overflow: ellipsis; }
.hd .side-item:hover { background: var(--hover); }
.hd .side-item.on { background: var(--accent-soft); color: var(--accent-soft-fg); font-weight: 600; }
.hd .side-title { font-size: 12px; font-weight: 600; color: var(--dim); margin: 14px 12px 4px; }
.hd .main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.hd .toolbar { display: flex; align-items: center; gap: 4px; padding: 6px 10px; }
.hd .crumbs { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
.hd .crumbs button { padding: 4px 10px; border-radius: 14px; white-space: nowrap; font-weight: 500; }
.hd .crumbs button:hover { background: var(--hover); }
.hd .crumbs .sep { color: var(--dim); }
.hd .files { flex: 1; overflow: auto; padding: 8px 12px 16px; align-content: start;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.hd .files.list { grid-template-columns: 1fr; gap: 0; }
.hd .file {
  display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; text-align: center;
  font-size: 12.5px; word-break: break-word;
}
.hd .files.list .file { display: flex; justify-items: start; text-align: left; padding: 6px 10px; gap: 12px; }
.hd .files.list .file .meta { margin-left: auto; color: var(--dim); }
.hd .file:hover { background: var(--hover); }
.hd .file.selected { background: var(--accent-soft); color: var(--accent-soft-fg); }
.hd .ftile { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.hd .files.list .ftile { width: 32px; height: 32px; border-radius: 9px; }
.hd .ftile .i { width: 28px; height: 28px; }
.hd .files.list .ftile .i { width: 18px; height: 18px; }
.hd .ftile.folder { background: none; color: #4c8df6; }
.hd .ftile.folder .i { width: 56px; height: 56px; }
.hd .files.list .ftile.folder .i { width: 30px; height: 30px; }
.hd .status { padding: 6px 14px; color: var(--dim); font-size: 12.5px; border-top: 1px solid var(--line); }
.hd .empty { margin: auto; text-align: center; color: var(--dim); padding: 30px; }

.hd .term {
  flex: 1; overflow: auto; padding: 10px 14px; font: 13.5px/1.5 var(--mono);
  background: #1e1f22; color: #e8eaed; white-space: pre-wrap; word-break: break-word; cursor: text;
}
.hd .term .p { color: #81c995; }
.hd .term .d { color: #8ab4f8; }
.hd .term .w { color: #fdd663; }
.hd .term .e { color: #f28b82; }
.hd .term .line { display: flex; }
.hd .term input {
  flex: 1; border: 0; outline: 0; background: none; color: inherit; font: inherit; padding: 0; margin-left: 0.6ch;
  caret-color: #81c995; min-width: 0;
}

.hd .page { flex: 1; overflow: auto; padding: 20px 28px 28px; }
.hd .page h2 { font-size: 22px; margin: 0 0 14px; font-weight: 600; }
.hd .card { background: var(--sidebar); border-radius: 18px; padding: 4px 0; margin-bottom: 14px; }
.hd .row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; min-height: 56px; }
.hd .row + .row { border-top: 1px solid var(--line); }
.hd .row .txt { flex: 1; min-width: 0; }
.hd .row .s { color: var(--dim); font-size: 12.5px; }
.hd .switch { width: 44px; height: 26px; border-radius: 13px; background: var(--tile-hover); position: relative; flex: none;
  transition: background 160ms; }
.hd .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 160ms; }
.hd .switch[aria-checked="true"] { background: var(--accent); }
.hd .switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--accent-fg); }
.hd .swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.hd .swatch { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.hd .swatch.on { outline: 3px solid var(--fg); outline-offset: 2px; }
.hd .walls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 18px; }
.hd .wall { aspect-ratio: 16/10; border-radius: 12px; background-size: cover; background-position: center; }
.hd .wall.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.hd .seg { display: flex; background: var(--tile); border-radius: 18px; padding: 3px; }
.hd .seg button { padding: 6px 14px; border-radius: 15px; }
.hd .seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.15); font-weight: 600; }
.hd .full-card { text-align: center; padding: 34px 24px; }
.hd .full-card .big-i { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: grid;
  place-items: center; background: var(--accent-soft); color: var(--accent-soft-fg); }
.hd .full-card .big-i .i { width: 28px; height: 28px; }
.hd .full-card p { color: var(--dim); max-width: 420px; margin: 8px auto 18px; }
.hd .btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 20px;
  background: var(--accent); color: var(--accent-fg); font-weight: 600; text-decoration: none; white-space: nowrap; }
.hd .btn.quiet { background: var(--tile); color: var(--fg); }
.hd .btn:hover { filter: brightness(1.06); }
.hd .btn[disabled] { opacity: 0.45; pointer-events: none; }
.hd .weather-now { display: flex; align-items: center; gap: 18px; }
.hd .weather-now .temp { font-size: 56px; font-weight: 300; line-height: 1; }
.hd .hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 18px; text-align: center; }
.hd .hours div { background: var(--sidebar); border-radius: 14px; padding: 10px 0; }
.hd .table { width: 100%; border-collapse: collapse; }
.hd .table th { text-align: left; color: var(--dim); font-weight: 500; font-size: 12.5px; padding: 6px 12px; }
.hd .table td { padding: 8px 12px; border-top: 1px solid var(--line); }
.hd .table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.hd .table tr.sel td { background: var(--accent-soft); color: var(--accent-soft-fg); }
.hd .viewer { flex: 1; display: grid; place-items: center; background: #111; }
.hd .viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hd .text-view { flex: 1; padding: 16px 20px; overflow: auto; font: 13.5px/1.6 var(--mono); white-space: pre-wrap; }

/* ---------- уведомления, окно «полная версия», экран блокировки ---------- */
.hd .toasts { position: absolute; right: 12px; bottom: calc(var(--shelf-h) + 12px); z-index: 7000;
  display: grid; gap: 10px; width: 360px; max-width: calc(100vw - 24px); }
.hd .toast {
  background: var(--bubble); border: 1px solid var(--bubble-border); border-radius: 20px; padding: 14px 16px;
  box-shadow: var(--shadow); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; animation: hd-in 260ms cubic-bezier(.2,.9,.3,1.2);
}
@keyframes hd-in { from { opacity: 0; transform: translateX(30px); } }
.hd .toast .app-icon, .hd .toast .round { width: 34px; height: 34px; grid-row: span 3; }
.hd .toast .round { border-radius: 50%; background: var(--tile); display: grid; place-items: center; }
.hd .toast .t { font-weight: 600; }
.hd .toast .b { color: var(--dim); font-size: 13px; grid-column: 2 / 4; }
.hd .toast .acts { grid-column: 2 / 4; display: flex; gap: 8px; margin-top: 6px; }
.hd .toast .acts button { padding: 6px 14px; border-radius: 16px; background: var(--tile); font-weight: 500; font-size: 13px; }
.hd .toast .acts button:hover { background: var(--tile-hover); }

.hd .scrim { position: absolute; inset: 0; z-index: 8000; background: rgba(0, 0, 0, 0.35); display: grid;
  place-items: center; padding: 16px; animation: hd-fade 160ms ease; }
@keyframes hd-fade { from { opacity: 0; } }
.hd .dialog { width: 440px; max-width: 100%; background: var(--surface); border-radius: 28px; padding: 26px;
  box-shadow: var(--shadow); text-align: center; animation: hd-pop 220ms cubic-bezier(.2,.9,.3,1.2); }
@keyframes hd-pop { from { opacity: 0; transform: scale(0.94); } }
.hd .dialog h3 { margin: 6px 0 8px; font-size: 20px; }
.hd .dialog p { color: var(--dim); margin: 0 0 18px; }
.hd .dialog .acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hd .badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-soft-fg); font-size: 12.5px; font-weight: 600; }

.hd .lock { position: absolute; inset: 0; z-index: 9200; color: #fff; display: grid; place-items: center;
  background-size: cover; background-position: center; }
.hd .lock::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.hd .lock > * { position: relative; }
.hd .lock .clock { font-size: clamp(64px, 12vw, 128px); font-weight: 200; text-align: center; line-height: 1; }
.hd .lock .date { text-align: center; font-size: 20px; opacity: 0.9; margin-top: 8px; }
.hd .lock .hint { text-align: center; margin-top: 40px; opacity: 0.8; }
.hd .lock .avatar { width: 88px; height: 88px; border-radius: 50%; margin: 30px auto 10px; display: grid;
  place-items: center; background: rgba(255,255,255,.2); font-size: 36px; font-weight: 600; }

.hd .demo-bar {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5500;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 22px;
  background: var(--bubble); border: 1px solid var(--bubble-border); box-shadow: var(--shadow);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); font-size: 13px; max-width: calc(100vw - 20px);
}
.hd .demo-bar .btn { height: 32px; padding: 0 14px; font-size: 13px; }
.hd .demo-bar .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 520px) {
  .hd .island, .hd .pill .date-lbl, .hd .datepill { display: none; }
  .hd .shelf { gap: 4px; padding: 0 6px; }
  .hd .shelf-apps { gap: 0; }
}
@media (max-width: 760px) {
  .hd .widgets, .hd .desktop-icons { display: none; }
  .hd .island { min-width: 0; }
  .hd .island .lbl { display: none; }
  .hd .pill .date-lbl { display: none; }
  .hd .sidebar { width: 64px; }
  .hd .side-item .lbl, .hd .side-title { display: none; }
  .hd .shelf-app { width: 42px; }
  .hd .demo-bar .txt { display: none; }
  .hd .calendar { right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hd *, .hd *::before, .hd *::after { animation: none !important; transition: none !important; }
}
