/* Albatross OS 9.1: новые возможности поверх os.css */
:root { --z-saver: 8500; --z-lock: 8800; --z-off: 9500; }

/* живые обои и параллакс */
.wall { inset: -28px; }
.wall__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.wall[data-w='0'] { background: #f3f7ff; }
.wall[data-w='0'] .wall__gl { display: block; }
.wall[data-w='0'] .wall__logo { opacity: 0.1; mix-blend-mode: multiply; }
.wall[data-w='1'] { background: radial-gradient(60% 70% at 78% 28%, rgba(0, 184, 255, 0.55), transparent 60%), radial-gradient(50% 60% at 18% 90%, rgba(109, 59, 255, 0.35), transparent 60%), radial-gradient(40% 50% at 60% 100%, rgba(0, 102, 255, 0.35), transparent 70%), linear-gradient(160deg, #f7fbff, #dce9ff); }
.wall[data-w='1'] .wall__logo { opacity: 0.16; filter: saturate(1.4); mix-blend-mode: normal; }
.wall[data-w='2'] { background: radial-gradient(70% 60% at 30% 20%, rgba(255, 255, 255, 0.9), transparent 60%), conic-gradient(from 200deg at 70% 60%, #00b8ff, #0066ff, #6d3bff, #00b8ff); }
.wall[data-w='2'] .wall__logo { opacity: 0.32; filter: brightness(2.2) saturate(0); mix-blend-mode: soft-light; display: block; }
.wall[data-w='3'] { background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 60%, #cfe0ff 100%); }
.wall[data-w='3'] .wall__logo { display: block; opacity: 0.16; filter: saturate(1.4); mix-blend-mode: normal; }
.wall[data-w='4'] { background: center / cover no-repeat var(--gen-wall, none), #e9f1ff; }
.wall[data-w='4'] .wall__logo { display: none; }
.dim { position: fixed; inset: 0; z-index: 4; pointer-events: none; background: #0d1117; opacity: 0; transition: opacity 0.4s; }

/* загрузка: тест оборудования */
.boot { display: block; }
.boot__post { position: absolute; inset: 0; margin: 0; padding: 28px 32px; font: 400 var(--fs-s)/1.7 var(--mono); color: var(--ink-3); white-space: pre-wrap; overflow: hidden; }
.boot__post b { color: var(--blue); font-weight: 500; }
.boot__post em { color: #12b76a; font-style: normal; }
.boot__logo { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 46px; opacity: 0; }

/* экран блокировки */
.lock-screen { position: fixed; inset: 0; z-index: var(--z-lock); display: flex; flex-direction: column; align-items: center; padding-top: 11vh; color: #fff; overflow: hidden;
  background: radial-gradient(80% 60% at 70% 20%, rgba(0, 184, 255, 0.85), transparent 60%), radial-gradient(70% 60% at 10% 90%, rgba(109, 59, 255, 0.75), transparent 60%), linear-gradient(160deg, #3d8bff, #1a2b6f); }
.lock-screen[hidden] { display: none; }
.lock-screen::before { content: ''; position: absolute; inset: -20%; background: url(../assets/logo-alpha.png) center / 52vmin no-repeat; opacity: 0.12; filter: brightness(3) saturate(0); }
.lock-screen > * { position: relative; }
.lk__date { font: 500 clamp(16px, 2vw, 22px)/1 var(--ui); opacity: 0.9; text-transform: capitalize; }
.lk__time { font: 200 clamp(96px, 16vw, 200px)/1 var(--brand); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 6px; text-shadow: 0 10px 50px rgba(13, 17, 23, 0.2); }
.lk__user { margin-top: auto; margin-bottom: 9vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lk__ava { width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); display: grid; place-items: center; box-shadow: 0 12px 40px -10px rgba(13, 17, 23, 0.5); }
.lk__ava img { width: 66px; }
.lk__user b { font: 700 18px/1 var(--ui); }
.lk__go { min-width: 200px; height: 40px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.45); color: #fff; font-weight: 600; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); cursor: pointer; transition: background 0.2s, scale 0.12s; }
.lk__go:hover { background: rgba(255, 255, 255, 0.34); }
.lk__go:active { scale: 0.97; }
.lk__user small { opacity: 0.7; font-size: var(--fs-s); }

/* строка меню: новые кнопки */
.mb__right { gap: 4px; }
.mb__right > button { display: flex; align-items: center; gap: 9px; }
.mb__vol .vx { display: none; }
.mb__vol[aria-pressed='false'] .vw { display: none; }
.mb__vol[aria-pressed='false'] .vx { display: block; }
.mb__now { display: flex; align-items: flex-end; gap: 2px; height: 14px; margin-right: 6px; }
.mb__now[hidden] { display: none; }
.mb__now i { width: 3px; background: var(--blue); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.mb__now i:nth-child(2) { animation-delay: -0.3s; }
.mb__now i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* окна: блик стекла и 3D при перетаскивании */
.win::before { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.6), transparent 60%); mix-blend-mode: soft-light; }
.win:hover::before { opacity: 1; }
.win--term::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(76, 201, 255, 0.16), transparent 60%); mix-blend-mode: screen; }
.win.is-drag { box-shadow: 0 50px 110px -30px rgba(26, 43, 111, 0.5), 0 10px 30px -10px rgba(26, 43, 111, 0.25); }
.snap { position: absolute; z-index: 9; border-radius: 16px; background: rgba(0, 102, 255, 0.14); border: 2px solid rgba(0, 102, 255, 0.45); pointer-events: none; transition: left 0.18s var(--ease), top 0.18s var(--ease), width 0.18s var(--ease), height 0.18s var(--ease); }

/* иконки рабочего стола свободно расставляются */
.icons { inset: 0; padding: 0; display: block; height: auto; width: 100%; pointer-events: none; }
.icons > li { position: absolute; pointer-events: auto; }
.icon.is-drag { opacity: 0.85; scale: 1.06; filter: drop-shadow(0 18px 20px rgba(26, 43, 111, 0.35)); }
.icons > li:has(.is-drag) { z-index: 3; }
.icon .lbl[contenteditable='true'] { background: #fff; color: var(--ink); outline: 2px solid var(--blue); user-select: text; text-shadow: none; }
.shake { animation: shake 0.45s; }
@keyframes shake { 20% { translate: -7px 0; rotate: -5deg; } 40% { translate: 6px 0; rotate: 4deg; } 60% { translate: -4px 0; rotate: -2deg; } 80% { translate: 2px 0; } }
.g-folder2 { background: linear-gradient(180deg, #9ad8ff, #4aa8ff); }
.g-radio { background: linear-gradient(140deg, #ff7ac3, #6d3bff 60%, #0066ff); }
.g-game { background: linear-gradient(160deg, #7fd8ff, #0066ff); }

/* виджет с объёмной птицей */
.bird-w { position: absolute; left: 22px; bottom: 112px; width: 230px; height: 250px; border-radius: 26px; overflow: hidden; z-index: 3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.35)); backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, 0.75); box-shadow: 0 24px 60px -30px rgba(26, 43, 111, 0.55); cursor: grab; touch-action: none; }
.bird-w:active { cursor: grabbing; }
.bird-w canvas { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 46px); }
.bird-w p { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px 16px; display: flex; justify-content: space-between; font-size: var(--fs-s); }
.bird-w p b { font: 700 13px/1.2 var(--brand); letter-spacing: 0.04em; }
.bird-w p span { color: var(--blue); font-weight: 600; }

/* Mission Control */
body.mc .win { cursor: pointer; }
body.mc .win > * { pointer-events: none; }
body.mc .win::after { content: attr(aria-label); position: absolute; left: 50%; top: 100%; margin-top: 14px; translate: -50% 0; white-space: nowrap; font: 600 28px/1 var(--ui); color: #fff; padding: 10px 20px; border-radius: 14px; background: rgba(13, 17, 23, 0.6); pointer-events: none; }
body.mc .win { overflow: visible; }
body.mc .win:hover { outline: 6px solid var(--blue); outline-offset: 6px; }
body.mc .dim { opacity: 0.22; }
body.mc .icons, body.mc .bird-w { opacity: 0; transition: opacity 0.3s; }

/* пункт управления и центр уведомлений */
.cc, .nc { position: fixed; z-index: var(--z-pop); top: 38px; right: 10px; border-radius: 20px; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(40px) saturate(1.9); -webkit-backdrop-filter: blur(40px) saturate(1.9); box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, 0.75); }
.cc[hidden], .nc[hidden], .ql[hidden], .saver[hidden], .off[hidden] { display: none; }
.cc { width: 330px; padding: 12px; display: grid; gap: 10px; }
.cc__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc__t { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; text-align: left; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.75); cursor: pointer; transition: background 0.2s, scale 0.12s; }
.cc__t:active { scale: 0.97; }
.cc__t .ci { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(26, 43, 111, 0.1); color: var(--ink-2); transition: background 0.2s, color 0.2s; }
.cc__t .ci svg { width: 18px; height: 18px; }
.cc__t.is-on .ci { background: var(--blue); color: #fff; }
.cc__t b { font-size: 13px; line-height: 1.15; }
.cc__t small { font-size: var(--fs-s); color: var(--ink-3); }
.cc__s { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.75); font-size: 13px; font-weight: 600; }
.cc__s input { width: 100%; accent-color: var(--blue); }
.cc__walls { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.75); }
.cc__walls button { aspect-ratio: 1; border-radius: 10px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(13, 17, 23, 0.08); transition: scale 0.15s; background-size: cover; }
.cc__walls button:hover { scale: 1.06; }
.cc__walls button.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.cc__np { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.75); }
.cc__np .app-ic { width: 40px; height: 40px; border-radius: 10px; }
.cc__np div { flex: 1; }
.cc__np b { display: block; font-size: 13px; }
.cc__np small { font-size: var(--fs-s); color: var(--ink-3); }
.nc { width: 360px; max-height: calc(100% - 140px); overflow: auto; padding: 16px; display: grid; gap: 12px; align-content: start; }
.nc__d { margin: 0; font: 700 22px/1.1 var(--brand); }
.nc__cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: var(--fs-s); padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); }
.nc__cal b { grid-column: 1 / -1; text-align: left; font-size: 13px; padding: 0 4px 8px; text-transform: capitalize; }
.nc__cal i { font-style: normal; color: var(--ink-3); font-size: var(--fs-xs); padding-bottom: 4px; }
.nc__cal span { padding: 5px 0; border-radius: 50%; }
.nc__cal span.is-today { background: var(--blue); color: #fff; font-weight: 700; }
.nc__card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); }
.nc__card img { width: 46px; }
.nc__card b { display: block; font-size: 13.5px; }
.nc__card small { font-size: var(--fs-s); color: var(--ink-3); }
.nc__h { margin: 4px 2px 0; font-size: var(--fs-s); font-weight: 600; color: var(--ink-3); }
.nc__list { display: grid; gap: 8px; }
.nc__list .toast { box-shadow: none; background: rgba(255, 255, 255, 0.75); }
.nc__empty { margin: 0; color: var(--ink-3); font-size: 13px; }

/* быстрый просмотр */
.ql { position: fixed; inset: 0; z-index: var(--z-pop); display: grid; place-items: center; background: rgba(233, 241, 255, 0.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); perspective: 1200px; }
.ql__card { width: min(720px, calc(100% - 40px)); border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow); transform-origin: 50% 80%; }
.ql__card .cover { aspect-ratio: 16 / 8; border-radius: 0; padding: 28px; }
.ql__in { padding: 18px 24px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.ql__card h4 { margin: 0; font: 800 28px/1 var(--brand); }
.ql__card p { margin: 6px 0 0; color: var(--ink-2); }
.ql__card small { color: var(--ink-3); white-space: nowrap; }

/* радио */
.radio { height: 100%; display: grid; grid-template-rows: 1fr auto; background: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(109, 59, 255, 0.08)); }
.radio canvas { width: 100%; height: 100%; display: block; min-height: 0; }
.radio__bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.radio__bar .app-ic { width: 48px; height: 48px; border-radius: 12px; }
.radio__bar div { flex: 1; }
.radio__bar b { display: block; font: 700 16px/1.2 var(--brand); }
.radio__bar small { color: var(--ink-3); }
.radio__play { width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; cursor: pointer; transition: scale 0.12s; }
.radio__play:active { scale: 0.94; }
.radio__play svg { width: 20px; height: 20px; }

/* игра */
.game { position: relative; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.game canvas { width: 100%; height: 100%; display: block; cursor: pointer; }

/* заставка */
.saver { position: fixed; inset: 0; z-index: var(--z-saver); background: radial-gradient(80% 70% at 50% 40%, #ffffff, #dce8ff 70%, #c4d6ff); }
.saver canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.saver time { position: absolute; left: 40px; bottom: 34px; font: 200 64px/1 var(--brand); color: var(--navy); font-variant-numeric: tabular-nums; }

/* выключение */
.off { position: fixed; inset: 0; z-index: var(--z-off); background: #eef2f8; display: grid; place-items: center; }
.off__line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #fff; box-shadow: 0 0 30px 6px rgba(0, 184, 255, 0.7); }
.off__btn { width: 84px; height: 84px; border-radius: 50%; background: #fff; color: var(--blue); display: grid; place-items: center; cursor: pointer; box-shadow: 0 20px 50px -20px rgba(26, 43, 111, 0.5); opacity: 0; }
.off__btn:hover { color: var(--navy); }

/* дождь из птиц (пасхалка) */
.rain-bird { position: fixed; top: -60px; width: 44px; z-index: var(--z-pop); pointer-events: none; }

@media (max-width: 760px) {
  .bird-w, .snap { display: none; }
  .mb__right > .mb__search, .mb__right > .mb__vol, .mb__now { display: none; }
  .mb__right { flex-direction: row; }
  .mb__right .mb__clock { margin-right: auto; order: -1; }
  .cc, .nc { left: 10px; right: 10px; width: auto; top: 46px; }
  .lk__time { font-size: 96px; }
  .saver time { font-size: 44px; left: 24px; }
  body.mc .win::after { font-size: 16px; }
  .icons { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mb__now i { animation: none; height: 10px; } }

/* мелочи: подсказки, подсветка поиска, спокойный режим, подписи Mission Control */
.tips { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0; align-items: baseline; }
.tips dt { white-space: nowrap; }
.tips dd { margin: 0; color: var(--ink-2); }
.spot__list mark { background: rgba(0, 102, 255, 0.16); color: inherit; border-radius: 3px; padding: 0 1px; }
.spot__list li[aria-selected="true"] mark { background: rgba(255, 255, 255, 0.3); }
html.calm *, html.calm *::before, html.calm *::after { transition: none !important; animation: none !important; }
body.mc .win::after { font-size: calc(15px * var(--inv, 1)); padding: calc(6px * var(--inv, 1)) calc(14px * var(--inv, 1)); margin-top: calc(12px * var(--inv, 1)); border-radius: calc(10px * var(--inv, 1)); }
body.mc .win:hover { outline-width: calc(4px * var(--inv, 1)); outline-offset: calc(4px * var(--inv, 1)); }

/* во время «джинна» стекло без размытия: анимация формы окна идёт легко */
.win.is-genie { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(246, 249, 255, 0.96); }
.win.is-genie::before { display: none; }

/* телефон: окна поверх домашнего экрана, в доке четыре главных приложения */
@media (max-width: 760px) {
  .desk { z-index: 8000; }
  .desk .win { pointer-events: auto; }
  .dock__it[data-key="radio"], .dock__it[data-key="game"], .dock__it[data-key="mail"] { display: none; }
}
@media (max-width: 760px) {
  .tl i:nth-child(1) { font-size: 0 !important; }
  .tl i:nth-child(1)::before { font: 600 14px/1 var(--ui); }
}
