/*
Theme Name: AscenraOS
Theme URI: https://dodahs.com
Author: Ascenra
Author URI: https://ascenraglobal.com
Description: AscenraOS - a liquid-glass virtual desktop operating system for the Ascenra network. Boots into a desktop with 15 live apps, a full window manager, glass sidebar, start menu, taskbar and a persistent radio mini-player.
Version: 1.1.9
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ascenraos
Tags: dark, one-column, custom-logo
*/

/* =========================================================================
   1. TOKENS
   ========================================================================= */

:root {
	--os-black:    #0A0A0C;
	--os-charcoal: #17171B;
	--os-grey:     #8A8D93;
	--os-white:    #F5F5F7;
	--os-red:      #E8302F;
	--os-red-soft: #FF6459;
	--os-cursor: url("assets/cursor.png") 4 4, auto;
	--os-cursor-pointer: url("assets/cursor.png") 4 4, pointer;

	/* more transparent glass - blur carries the material, not the fill */
	--glass-bg:     rgba(255, 255, 255, 0.045);
	--glass-bg-hi:  rgba(255, 255, 255, 0.085);
	--glass-border: rgba(255, 255, 255, 0.11);
	--hairline:     rgba(255, 255, 255, 0.08);
	--glass-blur:   30px;

	--r-window: 8px;    /* windows: square, slightly rounded */
	--r-panel:  14px;
	--r-tile:   10px;   /* squarer tiles - app logos, not iOS pebbles */
	--r-ctl:    10px;

	/* AscenraOS signature: one chamfered corner, echoing the diamond mark */
	--chamfer-panel: var(--r-panel) var(--r-panel) var(--r-panel) 4px;
	--chamfer-tile:  var(--r-tile) var(--r-tile) var(--r-tile) 3px;

	--font-ui:   "Didact Gothic", "Segoe UI", system-ui, sans-serif;
	--font-mono: "JetBrains Mono", "Cascadia Mono", monospace;

	--topbar-h: 46px;
	--dock-h:   96px;

	--shadow-float: 0 24px 70px rgba(0, 0, 0, 0.55);
	--ease-glass: cubic-bezier(0.32, 0.72, 0.24, 1);
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	background: var(--os-black);
	color: var(--os-white);
	font-family: var(--font-ui);
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
}

button {
	font-family: var(--font-ui);
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

input {
	font-family: var(--font-ui);
	color: var(--os-white);
}

::selection { background: rgba(232, 48, 47, 0.4); }

/* Deliberately bright focus rings - glass + low contrast must never lose focus */
:focus { outline: none; }
:focus-visible {
	outline: 2px solid var(--os-red);
	outline-offset: 2px;
	border-radius: 6px;
}

/* =========================================================================
   2. LIQUID GLASS MATERIAL
   ========================================================================= */

.glass {
	position: relative;
	background: rgba(18, 18, 22, 0.42);
	-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
	backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
	border: 1px solid var(--hairline);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.06),
		0 12px 40px rgba(0, 0, 0, 0.45);
}

/* thin top-edge light - restrained, not an Apple specular sweep */
.glass::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%);
}

/* =========================================================================
   3. BOOT SEQUENCE
   ========================================================================= */

.boot {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 26px;
	background: radial-gradient(120% 100% at 50% 115%, #1c0b0b 0%, var(--os-black) 55%);
	cursor: pointer;
	transition: opacity 0.6s ease, visibility 0.6s;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-aperture {
	position: relative;
	width: 240px;
	height: 240px;
	display: grid;
	place-items: center;
}

.boot-mark {
	width: 230px;
	height: auto;
	mix-blend-mode: screen;
	opacity: 0;
	transform: scale(0.6);
	filter: blur(14px);
	animation: boot-mark 2.2s var(--ease-glass) 0.9s forwards;
}
@keyframes boot-mark {
	60% { opacity: 1; }
	100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* glass shards assembling into the mark */
.shard {
	position: absolute;
	width: 92px;
	height: 92px;
	border-radius: 22px;
	border: 1px solid var(--glass-border);
	background: linear-gradient(150deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	animation: shard-in 2.4s var(--ease-glass) forwards;
}
.shard.s1 { animation-delay: 0.05s; --tx: -150px; --ty: -110px; --rot: -40deg; }
.shard.s2 { animation-delay: 0.15s; --tx:  160px; --ty: -130px; --rot:  35deg; }
.shard.s3 { animation-delay: 0.25s; --tx: -170px; --ty:  120px; --rot:  25deg; }
.shard.s4 { animation-delay: 0.35s; --tx:  150px; --ty:  140px; --rot: -30deg; }
.shard.s5 { animation-delay: 0.45s; --tx:    0px; --ty: -180px; --rot:  15deg; }
.shard.s6 { animation-delay: 0.55s; --tx:    0px; --ty:  180px; --rot: -20deg; }
@keyframes shard-in {
	0%   { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.7); }
	45%  { opacity: 0.9; }
	80%  { opacity: 0.5; transform: translate(0, 0) rotate(0deg) scale(1); }
	100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1.06); }
}

.boot-name {
	font-size: 34px;
	letter-spacing: 0.14em;
	opacity: 0;
	animation: fade-up 0.9s ease 1.6s forwards;
}
.boot-name span { color: var(--os-red); }

/* tty-style kernel log, bottom-left like a real boot */
.boot-log {
	position: absolute;
	left: 30px;
	bottom: 58px;
	margin: 0;
	min-height: 7em;
	font-family: var(--font-mono);
	font-size: 11.5px;
	line-height: 1.65;
	color: var(--os-grey);
	text-align: left;
	white-space: pre-line;
}
.boot-log .ok { color: var(--os-red-soft); }
.boot-log .t { color: rgba(138, 141, 147, 0.55); }

.boot-skip {
	position: absolute;
	bottom: 28px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	color: rgba(138, 141, 147, 0.6);
	animation: pulse-soft 2.4s ease-in-out infinite;
}

@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse-soft { 50% { opacity: 0.35; } }

/* =========================================================================
   4. WALLPAPER
   ========================================================================= */

html, body.ascenraos {
	overflow: hidden !important;
	height: 100% !important;
	max-height: 100% !important;
	overscroll-behavior: none;
}
body.ascenraos .asc-support,
body.ascenraos .ascenra-network-footer,
body.ascenraos .ascenra-account-header,
body.ascenraos .ascenra-funnel-bar,
body.ascenraos .aos-seo-crawl,
body.ascenraos .aos-audit-seo,
body.ascenraos .ascenra-audit-seo {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	height: 0 !important;
	max-height: 0 !important;
	overflow: hidden !important;
	position: absolute !important;
	left: -9999px !important;
}

.os {
	position: fixed;
	inset: 0;
	opacity: 1;
	overflow: hidden;
}
.os[aria-hidden="true"] { pointer-events: none; }

.wallpaper {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background-color: var(--os-black);
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

/* 16:9 Ascenra covers — full-screen fill (no letterboxing) */
.wall-photo {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	opacity: 1;
	transition: opacity 0.45s var(--ease-glass);
	pointer-events: none;
	user-select: none;
}
.wallpaper.is-swapping .wall-photo { opacity: 0.55; }

/* legacy mesh/logo kept as unused fallbacks (no longer painted by shell) */
.mesh {
	display: none;
	position: absolute;
	inset: -20%;
	background:
		radial-gradient(42% 55% at 22% 78%, rgba(120, 22, 20, 0.5), transparent 70%),
		radial-gradient(50% 60% at 80% 20%, rgba(46, 46, 56, 0.55), transparent 72%),
		radial-gradient(38% 46% at 65% 85%, rgba(75, 14, 14, 0.42), transparent 70%),
		var(--os-black);
}

.logo-bloom {
	display: none;
	position: absolute;
	left: 50%;
	top: 62%;
	width: 66vmin;
	height: 66vmin;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, rgba(232, 48, 47, 0.16) 0%, rgba(60, 130, 150, 0.07) 45%, transparent 70%);
	filter: blur(30px);
}

.wall-logo {
	display: none;
	position: absolute;
	left: 50%;
	top: 62%;
	width: 52vmin;
	max-width: 560px;
	transform: translate(-50%, -50%);
	mix-blend-mode: screen;
	opacity: 0.9;
	pointer-events: none;
	user-select: none;
}

.wallpaper .sheen {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(200deg, rgba(255, 255, 255, 0.03), transparent 42%),
		linear-gradient(0deg, rgba(10, 10, 12, 0.22) 0%, transparent 28%, transparent 72%, rgba(10, 10, 12, 0.14) 100%);
	pointer-events: none;
}

/* faint scanline texture - terminal DNA, barely visible */
.wallpaper::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.008) 0 1px, transparent 1px 4px);
	pointer-events: none;
}

/* =========================================================================
   5. DESKTOP ICONS
   ========================================================================= */

.desktop {
	position: absolute;
	inset: var(--topbar-h) 0 var(--dock-h) 0;
	z-index: 3;
	padding: 26px 22px;
	overflow: auto;
	scrollbar-width: none;
	background: transparent;
}

/* keep desktop icons clear of the widgets column on wide screens */
@media (min-width: 1100px) {
	.desktop { padding-right: 296px; }
	.os:has(#widgets.hidden) .desktop { padding-right: 22px; }
}

/* icon being dragged to a new spot */
.desk-icon.drag {
	z-index: 60;
	opacity: 0.85;
	transform: scale(1.06);
	transition: none;
	cursor: grabbing;
}
.desktop::-webkit-scrollbar { display: none; }

.desk-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, 104px);
	grid-auto-rows: 122px;
	grid-auto-flow: column;
	grid-template-rows: repeat(auto-fill, 122px);
	max-height: 100%;
	gap: 10px 14px;
	justify-items: center;
}

.desk-icon {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	width: 104px;
	padding: 8px 4px;
	border-radius: var(--r-tile);
	transition: transform 0.25s var(--ease-glass), background 0.25s;
}
.desk-icon:hover,
.desk-icon:focus-visible {
	transform: translateY(-3px);
	background: rgba(255, 255, 255, 0.05);
}
.desk-icon:hover .tile,
.desk-icon:focus-visible .tile {
	box-shadow:
		inset 0 1px 0 var(--glass-border),
		0 10px 30px rgba(0, 0, 0, 0.5),
		0 0 22px 2px color-mix(in srgb, var(--app-color, #888) 42%, transparent);
}

/* Glass tile icon - chamfered square, category-coloured gradient, glyph */
.tile {
	position: relative;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: var(--chamfer-tile);
	border: 1px solid var(--hairline);
	background:
		linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 60%),
		linear-gradient(155deg, color-mix(in srgb, var(--app-color, #555) 42%, #17171B), #121216);
	box-shadow: inset 0 1px 0 var(--glass-border), 0 6px 18px rgba(0, 0, 0, 0.45);
	transition: box-shadow 0.3s var(--ease-glass);
	color: var(--os-white);
}
.tile svg { width: 27px; height: 27px; }

/* real site logo sits inset on the glass tile (not a full-bleed iOS icon) */
.tile-logo {
	position: absolute;
	inset: 4px;
	width: calc(100% - 8px);
	height: calc(100% - 8px);
	object-fit: cover;
	border-radius: 6px;
	background: #0A0A0C;
	display: block;
	z-index: 1;
	pointer-events: none;
}
.tile-sm .tile-logo { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 5px; }
.desk-icon .tile-logo,
.dock-app .tile-logo,
.start-app .tile-logo { opacity: 1; filter: none; -webkit-text-fill-color: initial; }

.tile-sm { width: 42px; height: 42px; border-radius: 12px; }
.tile-sm svg { width: 21px; height: 21px; }

.tile-lg { width: 84px; height: 84px; border-radius: 20px; }
.tile-lg svg { width: 40px; height: 40px; }

.cat-dot {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--app-color, var(--os-grey));
	box-shadow: 0 0 6px color-mix(in srgb, var(--app-color, #888) 70%, transparent);
}

.app-flag {
	position: absolute;
	bottom: -4px;
	right: -6px;
	padding: 1px 5px 2px;
	border-radius: 7px;
	border: 1px solid var(--hairline);
	background: linear-gradient(160deg, #8f1d1c, #5c1211);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--os-white);
}

/* single title line only - no site name underneath */
.desk-icon-name {
	font-size: 12.5px;
	line-height: 1.25;
	text-align: center;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* Lab gets a glitch flicker to feel experimental */
.fx-glitch svg { animation: glitch 6s steps(1) infinite; }
@keyframes glitch {
	0%, 92%, 100% { transform: none; opacity: 1; filter: none; }
	93% { transform: translateX(1.5px); opacity: 0.75; filter: drop-shadow(-2px 0 rgba(232,48,47,0.9)); }
	94.5% { transform: translateX(-1px) skewX(-4deg); opacity: 0.9; filter: drop-shadow(2px 0 rgba(110,158,155,0.9)); }
	96% { transform: none; opacity: 1; filter: none; }
	97% { transform: translateY(1px); opacity: 0.8; }
}

/* =========================================================================
   6. DOCK - centered launcher strip
   ========================================================================= */

.dock {
	position: absolute;
	left: 50%;
	bottom: 12px;
	z-index: 5000;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 7px 12px;
	border-radius: 12px;
	border: 1px solid var(--hairline);
	border-bottom: 3px solid var(--os-red);
	background: rgba(12, 12, 16, 0.55);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 32px rgba(0, 0, 0, 0.5);
	transform: translateX(-50%);
	transition: transform 0.35s var(--ease-glass), opacity 0.35s;
}
.dock::after {
	content: "LAUNCHER";
	position: absolute;
	left: 50%;
	top: -14px;
	transform: translateX(-50%);
	font-family: var(--font-mono);
	font-size: 8.5px;
	letter-spacing: 0.22em;
	color: rgba(138, 141, 147, 0.7);
	pointer-events: none;
}

/* auto-hide while a maximized window is focused; peeks back on hover */
.dock.slide {
	transform: translateX(-50%) translateY(calc(100% - 12px));
	opacity: 0.35;
}
.dock.slide:hover,
.dock.slide:focus-within {
	transform: translateX(-50%);
	opacity: 1;
}

/* Kill SEO "My account" chrome on the OS shell */
body.ascenraos .ascenra-account-header,
body.home .ascenra-account-header,
body.ascenraos .ascenra-funnel-bar {
	display: none !important;
}

.dock-app {
	position: relative;
	display: grid;
	place-items: center;
	padding: 5px 6px 7px;
	border-radius: 8px 8px 8px 2px;
	transition: background 0.18s;
}
.dock-app:hover,
.dock-app:focus-visible { background: rgba(255, 255, 255, 0.07); } /* highlight, no lift, no magnify */
.dock-app .tile { width: 46px; height: 46px; }
.dock-app .tile svg { width: 23px; height: 23px; }

/* running indicator - red underline segment, panel-style */
.dock-app.open::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 50%;
	transform: translateX(-50%);
	width: 22px;
	height: 2.5px;
	border-radius: 2px;
	background: var(--os-red);
	box-shadow: 0 0 8px var(--os-red);
}

/* tooltip: mono system label, red-edged */
.dock-tip {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	padding: 5px 10px;
	border-radius: 3px 8px 8px 8px;
	border: 1px solid var(--hairline);
	border-left: 2px solid var(--os-red);
	background: rgba(16, 16, 20, 0.88);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: lowercase;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s, transform 0.18s var(--ease-glass);
}
.dock-app:hover .dock-tip,
.dock-app:focus-visible .dock-tip {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* =========================================================================
   7. WINDOWS
   ========================================================================= */

.windows { position: absolute; inset: 0; pointer-events: none; z-index: 600; }

.win {
	position: absolute;
	display: flex;
	flex-direction: column;
	min-width: 360px;
	min-height: 260px;
	border-radius: var(--r-window);
	overflow: hidden;
	pointer-events: auto;
	/* Never use filter/blur on .win — it can blank child iframes in Chromium. */
	transition: box-shadow 0.3s, opacity 0.3s;
	isolation: isolate;
}

/* condensing glass: opened from the icon's screen position via JS-set --ox/--oy/--os */
.win.opening {
	animation: win-in 0.42s var(--ease-glass);
}
@keyframes win-in {
	from {
		transform: translate(var(--ox, 0), var(--oy, 0)) scale(var(--os, 0.1));
		opacity: 0;
	}
	to { transform: none; opacity: 1; }
}
.win.closing {
	animation: win-out 0.34s var(--ease-glass) forwards;
	pointer-events: none;
}
@keyframes win-out {
	to {
		transform: translate(var(--ox, 0), var(--oy, 0)) scale(var(--os, 0.1));
		opacity: 0;
	}
}
.win.minimizing { animation: win-min 0.34s var(--ease-glass) forwards; pointer-events: none; }
@keyframes win-min {
	to { transform: translate(var(--mx, 0), var(--my, 40vh)) scale(0.05); opacity: 0; }
}
.win.minimized { display: none; }

/* active window: tiling-WM style red edge + thin ring */
.win.active {
	box-shadow:
		inset 0 1px 0 var(--glass-border),
		inset 2px 0 0 var(--os-red),
		0 0 0 1px rgba(232, 48, 47, 0.55),
		0 0 24px rgba(232, 48, 47, 0.18),
		var(--shadow-float);
}
.win:not(.active) { opacity: 0.92; }

.win.maxed {
	inset: calc(var(--topbar-h) + 8px) 10px 10px 10px !important;
	width: auto !important;
	height: auto !important;
}

.win-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 46px;
	padding: 0 14px;
	border-bottom: 1px solid var(--hairline);
	cursor: grab;
	user-select: none;
	flex: none;
}
.win-bar:active { cursor: grabbing; }

/* app identity, left side: rotated diamond + mono app name */
.win-app {
	display: flex;
	align-items: center;
	gap: 9px;
	flex: none;
	max-width: 190px;
	overflow: hidden;
}
.win-diamond {
	width: 9px;
	height: 9px;
	flex: none;
	transform: rotate(45deg);
	background: linear-gradient(135deg, var(--os-red-soft), var(--os-red));
	box-shadow: 0 0 8px rgba(232, 48, 47, 0.6);
	border-radius: 1.5px;
}
.win-app-name {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: lowercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--os-white);
}

/* window controls, right side: angular glyph buttons */
.win-ctls { display: flex; gap: 5px; flex: none; }
.win-ctl {
	display: grid;
	place-items: center;
	width: 26px;
	height: 24px;
	border-radius: 6px 6px 6px 2px;
	border: 1px solid var(--hairline);
	color: var(--os-grey);
	background: rgba(0, 0, 0, 0.18);
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.win-ctl svg { width: 12px; height: 12px; }
.win-ctl:hover { background: rgba(255, 255, 255, 0.1); color: var(--os-white); }
.win-ctl-close:hover {
	background: var(--os-red);
	border-color: var(--os-red-soft);
	color: var(--os-white);
	box-shadow: 0 0 10px rgba(232, 48, 47, 0.5);
}

/* about dialog close reuses the ctl look */
.about-close {
	display: grid;
	place-items: center;
	width: 26px;
	height: 24px;
	border-radius: 6px 6px 6px 2px;
	border: 1px solid var(--hairline);
	background: rgba(0, 0, 0, 0.18);
	color: var(--os-grey);
}
.about-close::before { content: "\2715"; font-size: 11px; }
.about-close:hover { background: var(--os-red); color: var(--os-white); }

.win-browser-nav {
	display: flex;
	align-items: center;
	gap: 3px;
	flex: none;
}
.win-nav-btn,
.win-nav-go {
	display: grid;
	place-items: center;
	width: 26px;
	height: 24px;
	border-radius: 6px 6px 6px 2px;
	border: 1px solid var(--hairline);
	color: var(--os-grey);
	background: rgba(0, 0, 0, 0.18);
	transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
.win-nav-btn svg { width: 13px; height: 13px; }
.win-nav-btn:hover:not(:disabled),
.win-nav-go:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--os-white);
}
.win-nav-btn:disabled { opacity: 0.35; cursor: default; }
.win-nav-go {
	width: auto;
	padding: 0 8px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	flex: none;
}

.win-address {
	display: flex;
	align-items: center;
	gap: 7px;
	flex: 1;
	min-width: 0;
	height: 30px;
	padding: 0 8px 0 13px;
	border: 1px solid var(--hairline);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.3);
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--os-grey);
}
.win-lock { width: 13px; height: 13px; color: var(--os-grey); flex: none; }
.win-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--os-white); }
.win-addr-input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--os-white);
	font: inherit;
	letter-spacing: 0.01em;
}
.win-addr-input::placeholder { color: var(--os-grey); }
.win-browser-status {
	flex: none;
	max-width: 88px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--os-grey);
}
.win.is-folder .win-browser-nav,
.win.is-folder .win-browser-status,
.win.is-folder .win-nav-go,
.win.is-folder .win-addr-input { display: none; }
.win.is-folder .win-domain { display: inline; }
.win.is-folder .win-address { padding-right: 13px; }

.win-open {
	flex: none;
	font-size: 12px;
	color: var(--os-grey);
	text-decoration: none;
	padding: 5px 10px;
	border-radius: 9px;
	border: 1px solid transparent;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
	white-space: nowrap;
}
.win-open:hover {
	color: var(--os-white);
	border-color: var(--hairline);
	background: rgba(255, 255, 255, 0.06);
}

.win-body { position: relative; flex: 1; background: var(--os-charcoal); }

/* folder windows: path bar + group rail + stacked groups (file manager) */
.win.is-folder .win-body { background: rgba(14, 14, 18, 0.45); }
.win-folder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
}
.fold-path {
	flex: none;
	display: flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 14px;
	border-bottom: 1px solid var(--hairline);
	background: rgba(0, 0, 0, 0.35);
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.04em;
	color: var(--os-grey);
}
.fold-path-root { color: var(--os-red-soft); }
.fold-path-count { margin-left: auto; font-size: 10px; opacity: 0.7; }
.fold-body {
	flex: 1;
	min-height: 0;
	display: flex;
}

.fold-side {
	flex: none;
	width: 172px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 12px 9px;
	border-right: 1px solid var(--hairline);
	background: rgba(0, 0, 0, 0.24);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.fold-side-title {
	margin: 0 5px 7px;
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--os-grey);
}
.fold-nav {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 8px 10px;
	border-radius: 8px 8px 8px 2px;
	border-left: 2px solid transparent;
	font-size: 12.5px;
	text-align: left;
	color: var(--os-grey);
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.fold-nav svg { width: 15px; height: 15px; flex: none; }
.fold-nav:hover { background: rgba(255, 255, 255, 0.06); color: var(--os-white); }
.fold-nav.active {
	background: rgba(232, 48, 47, 0.14);
	border-left-color: var(--os-red);
	color: var(--os-white);
}
.fold-nav .n {
	margin-left: auto;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--os-grey);
}

.fold-main {
	flex: 1;
	min-width: 0;
	overflow-y: auto;
	padding: 14px 16px 20px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.fold-group-title {
	margin: 2px 2px 10px;
	font-family: var(--font-mono);
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--os-red-soft);
}
.fold-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 6px;
}
.fold-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	padding: 11px 6px 9px;
	border-radius: var(--chamfer-tile);
	transition: background 0.15s, transform 0.2s var(--ease-glass);
}
.fold-item:hover, .fold-item:focus-visible {
	background: rgba(255, 255, 255, 0.06);
}
.fold-item.selected {
	background: rgba(232, 48, 47, 0.16);
	box-shadow: inset 0 0 0 1px rgba(232, 48, 47, 0.45);
}
.fold-item .tile-sm { position: relative; }
.fold-name {
	font-size: 11px;
	line-height: 1.25;
	text-align: center;
	color: var(--os-white);
}
.fold-section + .fold-section { margin-top: 18px; }
.fold-empty {
	display: grid;
	place-items: center;
	height: 100%;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--os-grey);
}
.win.is-folder {
	min-width: 520px;
	min-height: 380px;
}
.win.is-folder .win-open { display: none; }
.win.is-player {
	min-width: 340px;
	min-height: 440px;
}
.win.is-player .win-body {
	background: rgba(3, 5, 8, 0.72);
	overflow: hidden;
}
.win.is-player .win-domain { display: inline; }
.win.is-player .win-address { padding-right: 8px; }
.win-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.win.dragging .win-frame,
.win.resizing .win-frame { pointer-events: none; }

.win-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: var(--os-charcoal);
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--os-grey);
	transition: opacity 0.4s, visibility 0.4s;
	z-index: 2;
}
.win-loading.off { opacity: 0; visibility: hidden; }
.spinner {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 2px solid var(--hairline);
	border-top-color: var(--os-red);
	animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.win-fallback {
	position: absolute;
	inset: 0;
	display: none; /* must not use bare flex — it overrides HTML [hidden] and covers the iframe */
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 30px;
	background:
		radial-gradient(70% 60% at 50% 35%, color-mix(in srgb, var(--app-color, #333) 16%, transparent), transparent 75%),
		var(--os-charcoal);
	text-align: center;
	z-index: 3;
}
.win-fallback.is-visible { display: flex; }
.win-fallback[hidden] { display: none !important; }
.win-fallback-name { margin: 8px 0 0; font-size: 19px; }
.win-fallback-desc { margin: 0; max-width: 380px; font-size: 13px; color: var(--os-grey); line-height: 1.5; }

.btn-red {
	margin-top: 12px;
	padding: 10px 22px;
	border-radius: 12px;
	background: linear-gradient(160deg, var(--os-red-soft), var(--os-red));
	color: var(--os-white);
	font-size: 14px;
	text-decoration: none;
	box-shadow: 0 6px 22px rgba(232, 48, 47, 0.35);
	transition: transform 0.2s var(--ease-glass), box-shadow 0.2s;
}
.btn-red:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(232, 48, 47, 0.5); }

.win-resize {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 22px;
	height: 22px;
	cursor: nwse-resize;
	background: linear-gradient(315deg, var(--hairline) 0 2px, transparent 2px 5px, var(--hairline) 5px 7px, transparent 7px 10px, var(--hairline) 10px 12px, transparent 12px);
	border-bottom-right-radius: var(--r-window);
}

/* =========================================================================
   8. START MENU
   ========================================================================= */

/* side panel menu - Linux whisker/XFCE style, not a mac Launchpad card */
.start-menu {
	position: absolute;
	left: 0;
	top: var(--topbar-h);
	z-index: 6000;
	display: flex;
	flex-direction: column;
	width: min(340px, calc(100vw - 12px));
	height: calc(100vh - var(--topbar-h));
	max-height: none;
	padding: 12px;
	border-radius: 0;
	border: 0;
	border-right: 1px solid rgba(232, 48, 47, 0.4);
	background: rgba(10, 10, 14, 0.82);
	transform-origin: top left;
	animation: start-in 0.28s var(--ease-glass);
}
@keyframes start-in {
	from { transform: translateX(-18px); opacity: 0; }
}
.start-menu[hidden] { display: none; }
.start-menu.glass::before { display: none; }

.start-search { position: relative; margin-bottom: 12px; flex: none; }
.start-search svg {
	position: absolute;
	left: 13px;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	color: var(--os-grey);
	pointer-events: none;
}
.start-search input {
	width: 100%;
	height: 42px;
	padding: 0 14px 0 38px;
	border: 1px solid var(--hairline);
	border-radius: 13px;
	background: rgba(0, 0, 0, 0.3);
	font-size: 14px;
}
.start-search input::placeholder { color: var(--os-grey); }

.start-results { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }

.start-cat {
	margin: 10px 4px 4px;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--app-color, var(--os-grey));
}
.start-section:first-child .start-cat { margin-top: 2px; }

.start-app {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 7px 8px;
	border-radius: 13px;
	text-align: left;
	transition: background 0.18s;
}
.start-app:hover, .start-app:focus-visible { background: rgba(255, 255, 255, 0.07); }
.start-app.hidden { display: none; }
.start-section.hidden { display: none; }
.start-app .tile-sm { flex: none; position: relative; }

.start-app-text { display: flex; flex-direction: column; min-width: 0; }
.start-app-name { font-size: 14px; }
.start-app-desc {
	font-size: 11.5px;
	color: var(--os-grey);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.start-empty { padding: 18px 8px; color: var(--os-grey); font-size: 13px; text-align: center; }

.start-footer {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-top: 12px;
	padding: 10px 6px 0;
	border-top: 1px solid var(--hairline);
	flex: none;
}
.start-os { font-size: 13px; letter-spacing: 0.05em; }
.start-tag { font-family: var(--font-mono); font-size: 10.5px; color: var(--os-grey); }

/* =========================================================================
   9. TASKBAR
   ========================================================================= */

/* Top panel - XFCE/Plasma style hard bar, not a floating mac menubar */
.taskbar {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 5000;
	display: flex;
	align-items: center;
	gap: 10px;
	height: var(--topbar-h);
	padding: 0 12px;
	border-radius: 0;
	border: 0;
	border-bottom: 1px solid rgba(232, 48, 47, 0.45);
	background: rgba(10, 10, 14, 0.72);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 28px rgba(0, 0, 0, 0.4);
}
.taskbar.glass::before { display: none; }

/* Custom Ascenra diamond cursor across the OS shell */
body.ascenraos,
body.ascenraos * { cursor: var(--os-cursor); }
body.ascenraos a,
body.ascenraos button,
body.ascenraos .desk-icon,
body.ascenraos .dock-app,
body.ascenraos .menubar-btn,
body.ascenraos .menubar-drop button,
body.ascenraos .start-app,
body.ascenraos .win-ctl,
body.ascenraos .task-tab { cursor: var(--os-cursor-pointer); }
body.ascenraos input,
body.ascenraos textarea { cursor: text; }

.start-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	height: 34px;
	width: 40px;
	padding: 0;
	border-radius: 8px 8px 8px 2px;
	border: 1px solid transparent;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: background 0.2s, border-color 0.2s;
	flex: none;
}

/* Classic File | Home | Share | Help */
.menubar {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: none;
	height: 100%;
}
.menubar-item { position: relative; height: 100%; display: flex; align-items: center; }
.menubar-btn {
	height: 28px;
	padding: 0 10px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--os-white);
	font-family: var(--font-ui, "Didact Gothic", sans-serif);
	font-size: 13px;
	letter-spacing: 0.02em;
}
.menubar-btn:hover,
.menubar-btn[aria-expanded="true"] {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}
.menubar-drop {
	position: absolute;
	top: calc(100% - 2px);
	left: 0;
	min-width: 220px;
	padding: 6px;
	z-index: 6000;
	display: flex;
	flex-direction: column;
	gap: 2px;
	border-radius: 0 0 10px 10px;
	border: 1px solid rgba(255,255,255,0.12);
	border-top: 1px solid rgba(232,48,47,0.45);
	background: rgba(14, 14, 18, 0.92);
	box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.menubar-drop[hidden] { display: none !important; }
.menubar-drop button {
	text-align: left;
	padding: 8px 12px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #E8E9EC;
	font: inherit;
	font-size: 13px;
}
.menubar-drop button:hover { background: rgba(232, 48, 47, 0.22); color: #fff; }
.menubar-drop hr {
	border: 0;
	border-top: 1px solid rgba(255,255,255,0.08);
	margin: 4px 6px;
}

/* Help panel - only paints when .is-open (never as page chrome) */
.help-panel {
	position: absolute;
	top: calc(var(--topbar-h) + 6px);
	left: 52px;
	width: min(440px, calc(100vw - 24px));
	max-height: min(72vh, 640px);
	z-index: 5200;
	display: none !important;
	flex-direction: column;
	border-radius: 0 0 14px 14px;
	border: 1px solid rgba(255,255,255,0.12);
	border-top: 1px solid rgba(232,48,47,0.5);
	background: rgba(12, 12, 16, 0.94);
	overflow: hidden;
	box-shadow: 0 22px 50px rgba(0,0,0,0.55);
}
.help-panel[hidden],
.help-panel:not(.is-open) { display: none !important; }
.help-panel.is-open { display: flex !important; }
.help-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px 8px;
}
.help-panel-title {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--os-grey);
}
.help-panel-close {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--os-white);
	font-size: 1.35rem;
	line-height: 1;
}
.help-panel-close:hover { background: rgba(255,255,255,0.08); }
.help-tabs {
	display: flex;
	gap: 4px;
	padding: 0 10px 10px;
	overflow-x: auto;
	scrollbar-width: none;
}
.help-tabs::-webkit-scrollbar { display: none; }
.help-tab {
	flex: none;
	padding: 7px 12px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--os-grey);
	font: inherit;
	font-size: 0.85rem;
}
.help-tab.is-active,
.help-tab:hover {
	color: var(--os-white);
	background: rgba(255,255,255,0.07);
	border-color: var(--hairline);
}
.help-tab.is-active { box-shadow: inset 0 -2px 0 -1px var(--os-red); }
.help-panel-body {
	padding: 4px 16px 18px;
	overflow: auto;
	color: #C8CAD0;
	font-size: 0.92rem;
	line-height: 1.55;
}
.help-panel-body h2 {
	margin: 0 0 10px;
	color: var(--os-white);
	font-size: 1.15rem;
}
.help-pane { display: none !important; }
.help-pane.is-active { display: block !important; }
.help-pane[hidden] { display: none !important; }
.help-app-list { list-style: none; margin: 0; padding: 0; }
.help-app-list li { margin: 0 0 6px; }
.help-open-app {
	width: 100%;
	text-align: left;
	border: 1px solid transparent;
	border-radius: 10px;
	background: rgba(255,255,255,0.03);
	color: inherit;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	font: inherit;
}
.help-open-app strong { color: var(--os-white); }
.help-open-app span { color: var(--os-grey); font-size: 0.82rem; }
.help-open-app:hover { border-color: rgba(232,48,47,0.35); background: rgba(232,48,47,0.1); }
.help-faq { border-bottom: 1px solid var(--hairline); padding: 8px 0; }
.help-faq summary { cursor: pointer; color: var(--os-white); font-weight: 600; }
.help-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.help-links a, .help-support-link { color: var(--os-red-soft); }

/* SEO crawl kept for bots - never paint over the desktop UI */
.aos-seo-crawl--sr,
body.home .aos-seo-crawl,
body.ascenraos .aos-seo-crawl,
body.ascenraos .aos-seo-crawl * {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	max-width: 1px !important;
	max-height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
	background: transparent !important;
	z-index: -1 !important;
	pointer-events: none !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	opacity: 0 !important;
	visibility: hidden !important;
}
.menu-diamond {
	width: 11px;
	height: 11px;
	transform: rotate(45deg);
	background: linear-gradient(135deg, var(--os-red-soft), var(--os-red) 55%, #7e1413);
	box-shadow: 0 0 10px rgba(232, 48, 47, 0.7);
	border-radius: 2px;
	transition: transform 0.4s var(--ease-glass);
}
.start-btn:hover .menu-diamond,
.start-btn[aria-expanded="true"] .menu-diamond { transform: rotate(225deg); }
.start-btn:hover, .start-btn[aria-expanded="true"] {
	background: rgba(255, 255, 255, 0.07);
	border-color: var(--hairline);
}
.start-btn[aria-expanded="true"] { box-shadow: inset 0 -2px 0 -1px var(--os-red); }

.task-tabs {
	display: flex;
	align-items: center;
	justify-content: center; /* tabs sit centred in the bar */
	gap: 6px;
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
	height: 100%;
	padding: 6px 2px;
}
.task-tabs::-webkit-scrollbar { display: none; }

.task-tab {
	display: flex;
	align-items: center;
	gap: 7px;
	height: 32px;
	padding: 0 12px;
	border-radius: 8px 8px 8px 2px;
	border: 1px solid transparent;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: lowercase;
	color: var(--os-grey);
	white-space: nowrap;
	transition: background 0.2s, color 0.2s;
	flex: none;
	max-width: 190px;
}
.task-tab .tile-sm { width: 20px; height: 20px; border-radius: 6px; }
.task-tab .tile-sm svg { width: 12px; height: 12px; }
.task-tab span.tt-name { overflow: hidden; text-overflow: ellipsis; }
.task-tab:hover { background: rgba(255, 255, 255, 0.07); color: var(--os-white); }
.task-tab.active {
	background: rgba(255, 255, 255, 0.09);
	border-color: var(--hairline);
	color: var(--os-white);
	box-shadow: inset 0 -2px 0 -1px var(--os-red);
}
.task-tab.min { opacity: 0.6; }

/* Radio mini-player - keeps playing no matter which window is focused */
.radio-widget {
	display: flex;
	align-items: center;
	gap: 9px;
	height: 36px;
	padding: 0 12px 0 14px;
	border: 1px solid var(--hairline);
	border-radius: 11px;
	background: rgba(0, 0, 0, 0.25);
	flex: none;
	max-width: 250px;
}
.onair {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4A4C52;
	flex: none;
	transition: background 0.3s;
}
.onair.live {
	background: var(--os-red);
	animation: onair-pulse 1.6s ease-in-out infinite;
}
@keyframes onair-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(232, 48, 47, 0.6); }
	55% { box-shadow: 0 0 0 6px rgba(232, 48, 47, 0); }
}

.radio-toggle {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.09);
	transition: background 0.2s, transform 0.2s;
	flex: none;
}
.radio-toggle:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.08); }
.radio-toggle svg { width: 13px; height: 13px; }
.radio-toggle .i-pause { display: none; }
.radio-toggle[aria-pressed="true"] .i-play { display: none; }
.radio-toggle[aria-pressed="true"] .i-pause { display: block; }

.radio-title {
	min-width: 0;
	overflow: hidden;
	font-size: 12px;
	color: var(--os-grey);
	text-align: left;
}
.radio-title:hover { color: var(--os-white); }
#radio-track {
	display: inline-block;
	white-space: nowrap;
}
#radio-track.scrolling { animation: marquee 9s linear infinite; }
@keyframes marquee {
	0%, 12% { transform: translateX(0); }
	88%, 100% { transform: translateX(calc(-100% + 120px)); }
}

.clock {
	font-family: var(--font-mono);
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--os-white);
	flex: none;
	padding: 0 6px;
	cursor: default;
}
.clock small { display: block; font-size: 9.5px; color: var(--os-grey); text-align: right; letter-spacing: 0.08em; }

/* =========================================================================
   9b. TASKBAR EXTRAS - widgets toggle, battery, show desktop
   ========================================================================= */

.bar-btn {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	border: 1px solid transparent;
	color: var(--os-grey);
	transition: background 0.2s, color 0.2s;
	flex: none;
}
.bar-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--os-white); }
.bar-btn[aria-pressed="true"] { color: var(--os-white); box-shadow: inset 0 -2px 0 -1px var(--os-red); }
.bar-btn svg { width: 17px; height: 17px; }

.sys-tag {
	font-family: var(--font-mono);
	font-size: 9.5px;
	letter-spacing: 0.12em;
	color: rgba(138, 141, 147, 0.65);
	flex: none;
	padding-right: 4px;
	border-right: 1px solid var(--hairline);
}

/* thin macOS-style "show desktop" sliver at the far right */
.show-desktop {
	width: 7px;
	height: 26px;
	margin-left: 2px;
	border-left: 1px solid var(--hairline);
	border-radius: 3px;
	flex: none;
	transition: background 0.2s;
}
.show-desktop:hover { background: rgba(255, 255, 255, 0.12); }

/* =========================================================================
   9c. WIDGETS - glass cards, top-right column
   ========================================================================= */

.widgets {
	position: absolute;
	top: calc(var(--topbar-h) + 14px);
	right: 14px;
	z-index: 400;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 252px;
	transition: opacity 0.35s var(--ease-glass), transform 0.35s var(--ease-glass);
}
.widgets.hidden {
	opacity: 0;
	transform: translateX(24px);
	pointer-events: none;
}
.widgets.freeform {
	inset: calc(var(--topbar-h) + 6px) 6px calc(var(--dock-h) + 6px) 6px;
	width: auto;
	right: 6px;
	left: 6px;
	top: calc(var(--topbar-h) + 6px);
	pointer-events: none;
}
.widgets.freeform .widget {
	position: absolute;
	width: min(252px, 80vw);
	pointer-events: auto;
}
.widget {
	border-radius: var(--chamfer-panel);
	padding: 16px 18px;
	position: relative;
}
.widget-chrome {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	gap: 2px;
	opacity: 0;
	transition: opacity 0.2s;
	z-index: 3;
}
.widget:hover .widget-chrome,
body.aos-widget-edit .widget-chrome {
	opacity: 1;
}
.widget-grip,
.widget-hide {
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.35);
	color: rgba(255, 255, 255, 0.7);
	cursor: grab;
	font-size: 12px;
	line-height: 1;
}
.widget-hide { cursor: pointer; }
.widget-grip:active { cursor: grabbing; }
.widget.dragging {
	opacity: 0.92;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
	z-index: 20;
}
body.aos-widget-edit .widget {
	outline: 1px dashed rgba(232, 48, 47, 0.45);
}

/* clock widget */
.widget-clock { position: relative; overflow: hidden; }
.w-clock-time {
	font-family: var(--font-mono);
	font-size: 38px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.05;
}
.w-clock-time #w-clock-sec { font-size: 19px; font-weight: 400; color: var(--os-red-soft); }
.w-clock-date { margin-top: 4px; font-size: 13px; color: var(--os-grey); }
.w-clock-mark {
	position: absolute;
	right: -18px;
	top: -18px;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(232, 48, 47, 0.22), transparent 65%);
	filter: blur(6px);
}
.w-clock-mark span {
	position: absolute;
	inset: 26px;
	border-radius: 50%;
	border: 1px solid rgba(232, 48, 47, 0.35);
}

/* calendar widget */
.w-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.w-cal-title { font-size: 13.5px; letter-spacing: 0.04em; }
.w-cal-nav {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 8px;
	color: var(--os-grey);
	font-size: 16px;
	transition: background 0.2s, color 0.2s;
}
.w-cal-nav:hover { background: rgba(255, 255, 255, 0.08); color: var(--os-white); }

.w-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	text-align: center;
}
.w-cal-grid .dow {
	font-size: 9.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--os-grey);
	padding: 3px 0 5px;
}
.w-cal-grid .day {
	font-family: var(--font-mono);
	font-size: 11.5px;
	line-height: 24px;
	height: 24px;
	border-radius: 8px;
	color: var(--os-white);
}
.w-cal-grid .day.dim { color: rgba(138, 141, 147, 0.45); }
.w-cal-grid .day.today {
	background: var(--os-red);
	color: var(--os-white);
	font-weight: 600;
	box-shadow: 0 0 12px rgba(232, 48, 47, 0.5);
}

/* now-playing widget */
.w-radio-row { display: flex; align-items: center; gap: 12px; }
.w-radio-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.w-radio-label {
	font-size: 9.5px;
	letter-spacing: 0.18em;
	color: var(--os-red-soft);
}
.w-radio-track {
	font-size: 12.5px;
	color: var(--os-white);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* tiny equalizer - animates only while playing */
.w-radio-eq {
	display: flex;
	align-items: flex-end;
	gap: 2.5px;
	height: 20px;
	flex: none;
}
.w-radio-eq i {
	width: 3px;
	height: 6px;
	border-radius: 2px;
	background: var(--os-grey);
	transition: background 0.3s;
}
.playing .w-radio-eq i { background: var(--os-red); animation: eq 0.9s ease-in-out infinite alternate; }
.playing .w-radio-eq i:nth-child(2) { animation-delay: 0.18s; }
.playing .w-radio-eq i:nth-child(3) { animation-delay: 0.36s; }
.playing .w-radio-eq i:nth-child(4) { animation-delay: 0.54s; }
@keyframes eq { from { height: 5px; } to { height: 18px; } }

/* system widget */
.widget-sys { display: flex; flex-direction: column; gap: 7px; }
.w-sys-row { display: flex; justify-content: space-between; gap: 10px; }
.w-sys-key {
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--os-grey);
}
.w-sys-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--os-white); }

.w-radio-open {
	margin-top: 10px;
	width: 100%;
	border: 0;
	border-radius: 10px;
	padding: 8px 10px;
	background: rgba(232, 48, 47, 0.16);
	color: var(--os-white);
	font-size: 11px;
	letter-spacing: 0.04em;
	cursor: pointer;
}
.w-radio-open:hover { background: rgba(232, 48, 47, 0.28); }

.w-notes-head,
.w-quick-head {
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--os-grey);
	margin-bottom: 8px;
	padding-right: 48px;
}
.w-notes {
	width: 100%;
	min-height: 88px;
	resize: vertical;
	border: 1px solid var(--hairline);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.28);
	color: var(--os-white);
	padding: 8px 10px;
	font: inherit;
	font-size: 13px;
	line-height: 1.35;
}
.w-quick {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}
.w-quick-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 0;
	border-radius: 10px;
	padding: 7px 8px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--os-white);
	cursor: pointer;
	text-align: left;
	min-width: 0;
}
.w-quick-btn:hover { background: rgba(255, 255, 255, 0.1); }
.w-quick-face {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08) center/cover no-repeat;
	flex: none;
	display: grid;
	place-items: center;
	font-size: 11px;
}
.w-quick-name {
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cc-wcfg {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--hairline);
}
.cc-wcfg h3,
.cc-notifs h3 {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--os-grey);
	margin-bottom: 8px;
}
.cc-wcfg-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	padding: 4px 0;
	cursor: pointer;
}
.cc-wcfg-acts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}
.cc-linkbtn {
	border: 0;
	background: transparent;
	color: var(--os-red-soft);
	font-size: 12px;
	cursor: pointer;
	padding: 4px 0;
}
.cc-linkbtn:hover { color: var(--os-white); }

.mobile-tray {
	display: none;
}

/* =========================================================================
   9d. CONTEXT MENU
   ========================================================================= */

.ctx {
	position: fixed;
	z-index: 9000;
	min-width: 210px;
	padding: 6px;
	border-radius: 14px 14px 14px 3px;
	border-left: 2px solid rgba(232, 48, 47, 0.5);
	animation: ctx-in 0.16s var(--ease-glass);
}
@keyframes ctx-in { from { opacity: 0; transform: scale(0.95); } }

.ctx-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 11px;
	border-radius: 9px;
	font-size: 13px;
	text-align: left;
	color: var(--os-white);
	transition: background 0.12s;
}
.ctx-item:hover, .ctx-item:focus-visible { background: rgba(255, 255, 255, 0.09); }
.ctx-item.danger:hover { background: rgba(232, 48, 47, 0.22); }
.ctx-item svg { width: 15px; height: 15px; color: var(--os-grey); flex: none; }
.ctx-item:hover svg { color: var(--os-white); }
.ctx-item .k {
	margin-left: auto;
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--os-grey);
}
.ctx-head {
	padding: 7px 11px 5px;
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--os-grey);
}
.ctx-sep { height: 1px; margin: 5px 8px; background: var(--hairline); }

/* =========================================================================
   9e. SNAP GHOST - window edge-snapping preview
   ========================================================================= */

.ctx[hidden],
.about[hidden],
.lock[hidden],
.cc[hidden],
.overview[hidden],
.ambient[hidden],
.snap-ghost[hidden] { display: none !important; }

/* =========================================================================
   9e0. CONTROL CENTER - popover under the top bar, right side
   ========================================================================= */

.cc {
	position: fixed;
	top: calc(var(--topbar-h) + 10px);
	right: 10px;
	z-index: 6500;
	width: 316px;
	padding: 14px;
	border-radius: var(--chamfer-panel);
	transform-origin: top right;
	animation: cc-in 0.28s var(--ease-glass);
}
@keyframes cc-in { from { opacity: 0; transform: translateY(-12px) scale(0.95); filter: blur(5px); } }

.cc-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.cc-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	padding: 12px 6px 10px;
	border-radius: 14px;
	border: 1px solid var(--hairline);
	background: rgba(0, 0, 0, 0.22);
	color: var(--os-grey);
	transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.cc-tile:hover { background: rgba(255, 255, 255, 0.07); color: var(--os-white); }
.cc-tile[aria-pressed="true"] {
	background: linear-gradient(160deg, rgba(232, 48, 47, 0.35), rgba(232, 48, 47, 0.18));
	color: var(--os-white);
	box-shadow: inset 0 0 0 1px rgba(232, 48, 47, 0.45);
}
.cc-tile svg { width: 19px; height: 19px; }
.cc-tile span { font-size: 10px; letter-spacing: 0.03em; text-align: center; line-height: 1.2; }

.cc-vol {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	padding: 11px 13px;
	border-radius: 14px;
	border: 1px solid var(--hairline);
	background: rgba(0, 0, 0, 0.22);
}
.cc-vol svg { width: 17px; height: 17px; color: var(--os-grey); flex: none; }
.cc-vol-pct { font-family: var(--font-mono); font-size: 10.5px; color: var(--os-grey); width: 26px; text-align: right; }

#cc-vol {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--os-red) var(--vol, 100%), rgba(255, 255, 255, 0.14) var(--vol, 100%));
	outline-offset: 6px;
}
#cc-vol::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--os-white);
	border: 1px solid var(--hairline);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	cursor: pointer;
}
#cc-vol::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--os-white);
	border: 1px solid var(--hairline);
	cursor: pointer;
}

.cc-notifs { margin-top: 12px; }
.cc-notifs h3 {
	margin: 0 2px 7px;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--os-grey);
}
.cc-notifs ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
	max-height: 170px;
	overflow-y: auto;
	scrollbar-width: thin;
}
.cc-notifs li {
	padding: 8px 11px;
	border-radius: 11px;
	border: 1px solid var(--hairline);
	background: rgba(0, 0, 0, 0.2);
	font-size: 11.5px;
}
.cc-notifs li b { display: block; font-weight: 400; color: var(--os-white); font-size: 12px; }
.cc-notifs li span { color: var(--os-grey); }
.cc-notifs li time {
	float: right;
	font-family: var(--font-mono);
	font-size: 9.5px;
	color: var(--os-grey);
}
#cc-notif-empty { margin: 2px; font-size: 11.5px; color: var(--os-grey); }

/* =========================================================================
   9e1. OVERVIEW - Mission-Control window picker
   ========================================================================= */

.overview {
	position: fixed;
	inset: 0;
	z-index: 8800;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 22px;
	background: rgba(10, 10, 12, 0.5);
	-webkit-backdrop-filter: blur(26px) saturate(1.3);
	backdrop-filter: blur(26px) saturate(1.3);
	animation: lock-in 0.3s var(--ease-glass);
}
.ov-title { margin: 0; font-size: 17px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--os-grey); }

.ov-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	max-width: min(920px, 92vw);
}
.ov-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 168px;
	padding: 20px 14px 16px;
	border-radius: 18px;
	border: 1px solid var(--hairline);
	background: linear-gradient(160deg, var(--glass-bg-hi), var(--glass-bg) 45%);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	transition: transform 0.22s var(--ease-glass), box-shadow 0.22s;
}
.ov-card:hover, .ov-card:focus-visible {
	transform: translateY(-4px) scale(1.04);
	box-shadow: 0 0 0 1.5px rgba(232, 48, 47, 0.55), 0 18px 44px rgba(0, 0, 0, 0.5);
}
.ov-card .tile { width: 52px; height: 52px; }
.ov-name { font-size: 13px; text-align: center; }
.ov-domain { font-family: var(--font-mono); font-size: 10px; color: var(--os-grey); }
.ov-card.minimized { opacity: 0.55; }
.ov-empty { color: var(--os-grey); font-size: 13px; }

.ov-hint {
	position: absolute;
	bottom: 30px;
	margin: 0;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	color: rgba(138, 141, 147, 0.65);
}

/* =========================================================================
   9e2. AMBIENT IDLE CLOCK - screensaver dim after inactivity
   ========================================================================= */

.ambient {
	position: fixed;
	inset: 0;
	z-index: 9700;
	display: block;
	background: #050508;
	cursor: pointer;
	animation: ambient-in 1.4s ease;
	overflow: hidden;
}
@keyframes ambient-in { from { opacity: 0; } }
.ambient .dvd-logo {
	position: absolute;
	width: 148px;
	height: auto;
	left: 0;
	top: 0;
	pointer-events: none;
	filter: drop-shadow(0 0 18px rgba(232, 48, 47, 0.35));
	will-change: transform, filter;
	user-select: none;
}
.ambient .ss-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: max(28px, env(safe-area-inset-bottom));
	text-align: center;
	pointer-events: none;
}
.ambient .lock-clock {
	font-size: clamp(28px, 6vw, 42px);
	opacity: 0.55;
	font-family: var(--font-mono);
	letter-spacing: 0.08em;
}
.ambient .lock-date { font-size: 12px; opacity: 0.4; color: var(--os-grey); }
.ambient .ss-hint {
	margin: 10px 0 0;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(245,245,247,0.35);
	font-family: var(--font-mono);
}

.snap-ghost {
	position: fixed;
	z-index: 4000;
	border-radius: var(--r-window);
	border: 1.5px solid rgba(232, 48, 47, 0.55);
	background: rgba(232, 48, 47, 0.07);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	pointer-events: none;
	transition: inset 0.16s var(--ease-glass), opacity 0.16s;
}

/* =========================================================================
   9f. TOASTS
   ========================================================================= */

.toasts {
	position: fixed;
	top: calc(var(--topbar-h) + 12px);
	right: 14px;
	z-index: 9500;
	display: flex;
	flex-direction: column;
	gap: 9px;
	pointer-events: none;
}

.toast {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 240px;
	max-width: 330px;
	padding: 11px 14px;
	border-radius: 14px 14px 14px 3px;
	border: 1px solid var(--hairline);
	border-left: 2px solid rgba(232, 48, 47, 0.55);
	background: rgba(23, 23, 27, 0.88);
	-webkit-backdrop-filter: blur(20px) saturate(1.4);
	backdrop-filter: blur(20px) saturate(1.4);
	box-shadow: inset 0 1px 0 var(--glass-border), 0 14px 40px rgba(0, 0, 0, 0.5);
	pointer-events: auto;
	animation: toast-in 0.3s var(--ease-glass);
}
.toast.out { animation: toast-out 0.3s var(--ease-glass) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

.toast .tile-sm { flex: none; width: 34px; height: 34px; }
.toast .tile-sm svg { width: 17px; height: 17px; }
.toast-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.toast-title { font-size: 12.5px; }
.toast-body {
	font-size: 11.5px;
	color: var(--os-grey);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* =========================================================================
   9g. ABOUT DIALOG
   ========================================================================= */

.about {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 9200;
	width: min(400px, calc(100vw - 32px));
	padding: 30px 28px 22px;
	border-radius: var(--chamfer-panel);
	text-align: center;
	animation: start-in 0.3s var(--ease-glass);
}
.about-close { position: absolute; top: 14px; left: 14px; }
.about-mark { width: 130px; mix-blend-mode: screen; }
.about-title { margin: 6px 0 2px; font-size: 24px; font-weight: 400; letter-spacing: 0.1em; }
.about-title span { color: var(--os-red); }
.about-title small { font-family: var(--font-mono); font-size: 11px; color: var(--os-grey); }
.about-tag { margin: 0 0 14px; font-family: var(--font-mono); font-size: 11px; color: var(--os-grey); }

.about-chips { display: flex; justify-content: center; gap: 7px; margin-bottom: 16px; }
.about-chips span {
	width: 20px;
	height: 20px;
	border-radius: 7px;
	background: var(--c);
	border: 1px solid var(--hairline);
}

.about-keys { margin: 0 0 14px; text-align: left; }
.about-keys div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 5px 2px;
	border-bottom: 1px solid var(--hairline);
}
.about-keys div:last-child { border-bottom: 0; }
.about-keys dt { font-family: var(--font-mono); font-size: 11px; color: var(--os-red-soft); }
.about-keys dd { margin: 0; font-size: 12px; color: var(--os-grey); }

.about-foot { margin: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--os-grey); }

/* =========================================================================
   9h. LOCK SCREEN
   ========================================================================= */

.lock {
	position: fixed;
	inset: 0;
	z-index: 9800;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: rgba(10, 10, 12, 0.55);
	-webkit-backdrop-filter: blur(34px) saturate(1.3);
	backdrop-filter: blur(34px) saturate(1.3);
	cursor: pointer;
	animation: lock-in 0.4s var(--ease-glass);
}
@keyframes lock-in { from { opacity: 0; } }
.lock.out { animation: lock-out 0.35s var(--ease-glass) forwards; }
@keyframes lock-out { to { opacity: 0; filter: blur(6px); } }

.lock-mark { width: 190px; mix-blend-mode: screen; margin-bottom: 6px; }
.lock-clock {
	font-family: var(--font-mono);
	font-size: 74px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1;
	text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}
.lock-date { font-size: 16px; color: var(--os-grey); }
.lock-hint {
	position: absolute;
	bottom: 34px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	color: rgba(138, 141, 147, 0.65);
	animation: pulse-soft 2.4s ease-in-out infinite;
}

/* =========================================================================
   10. NOSCRIPT
   ========================================================================= */

.os-noscript {
	position: fixed;
	inset: 0;
	z-index: 2000;
	overflow: auto;
	padding: 60px 24px;
	background: var(--os-black);
}
.os-noscript h1 { letter-spacing: 0.1em; }
.os-noscript a { color: var(--os-red-soft); }

/* =========================================================================
   11. REDUCED MOTION - fall back to simple fades
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.12s !important;
	}
	.mesh, .logo-bloom, .wall-logo { animation: none !important; transition: none !important; }
	.win.opening, .win.closing, .win.minimizing { animation-duration: 0.12s !important; }
	.shard { display: none; }
	#radio-track.scrolling { animation: none; }
}

/* =========================================================================
   12. MOBILE - degraded desktop metaphor
   Windows become full-screen sheets; rail hides; icons become a list grid.
   ========================================================================= */

@media (max-width: 820px), (pointer: coarse) and (max-width: 1024px) {
	:root {
		--dock-h: 72px;
		--topbar-h: 48px;
	}
	html, body {
		height: 100%;
		height: 100dvh;
		max-height: 100dvh;
		overflow: hidden;
		overscroll-behavior: none;
		-webkit-text-size-adjust: 100%;
	}
	.os {
		height: 100%;
		height: 100dvh;
		max-height: 100dvh;
		overflow: hidden;
	}
	.menubar { max-width: 42vw; overflow-x: auto; scrollbar-width: none; }
	.menubar::-webkit-scrollbar { display: none; }
	.menubar-btn { padding: 0 7px; font-size: 12px; }
	.ambient .dvd-logo { width: 96px; }

	.desktop {
		inset: var(--topbar-h) 0 var(--dock-h) 0;
		padding: 14px 10px calc(12px + env(safe-area-inset-bottom, 0px));
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		touch-action: pan-y;
	}
	.desk-grid {
		grid-auto-flow: row;
		grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
		grid-template-rows: none;
		max-height: none;
		gap: 10px 6px;
		justify-items: center;
	}
	.desk-icon {
		width: 100%;
		max-width: 92px;
		min-height: 88px;
		touch-action: manipulation;
	}
	.desk-icon-name {
		font-size: 0.7rem;
		line-height: 1.2;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	.desk-icon.running .tile {
		box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.45), 0 8px 20px rgba(0, 0, 0, 0.35);
	}

	/* App window = almost full screen sheet; chrome stays usable */
	.win, .win.maxed {
		inset: var(--topbar-h) 0 0 0 !important;
		width: auto !important;
		height: auto !important;
		min-width: 0 !important;
		min-height: 0 !important;
		border-radius: 0;
		z-index: 1200;
	}
	.win-resize { display: none; }

	.win-bar {
		flex-wrap: wrap;
		height: auto;
		min-height: 44px;
		gap: 6px 8px;
		padding: 6px 8px;
		padding-left: max(8px, env(safe-area-inset-left));
		padding-right: max(8px, env(safe-area-inset-right));
	}
	.win-app { max-width: 34vw; }
	.win-app-name { font-size: 10px; }
	.win-browser-status,
	.win-open { display: none; }
	.win-browser-nav { order: 2; }
	.win-address {
		order: 3;
		flex: 1 1 100%;
		height: 34px;
		padding: 0 8px;
	}
	.win-addr-input { font-size: 16px; } /* avoid iOS zoom */
	.win-nav-go { min-width: 40px; height: 28px; }
	.win-nav-btn {
		width: 36px;
		height: 36px;
	}
	.win-ctls { margin-left: auto; }
	.win-ctl {
		min-width: 40px;
		min-height: 40px;
		width: 40px;
		height: 40px;
	}
	.win-body {
		flex: 1 1 auto;
		min-height: 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.win-frame { inset: 0; }
	.win-fallback { padding: 20px 16px; }
	.win-fallback-desc { font-size: 12px; max-width: 92vw; }
	.btn-red {
		width: min(100%, 280px);
		padding: 12px 18px;
		font-size: 15px;
	}

	/* While an app window is open: focus the sheet, hide desktop clutter.
	   Ascenra Player stays available (not hidden). */
	body.aos-win-open .desktop,
	body.aos-win-open .dock,
	body.aos-win-open .widgets {
		visibility: hidden !important;
		pointer-events: none !important;
	}
	body.aos-win-open .taskbar {
		z-index: 1300;
	}
	body.aos-win-open .win {
		inset: var(--topbar-h) 0 0 0 !important;
		bottom: 0 !important;
	}

	.dock {
		left: 50%;
		right: auto;
		bottom: max(6px, env(safe-area-inset-bottom));
		width: auto;
		max-width: calc(100% - 12px);
		transform: translateX(-50%);
		justify-content: flex-start;
		gap: 2px;
		padding: 6px 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		z-index: 1400;
	}
	.dock::-webkit-scrollbar { display: none; }
	.dock-tip { display: none; }
	.dock-app .tile { width: 44px; height: 44px; }
	.dock-app {
		min-width: 48px;
		min-height: 48px;
		touch-action: manipulation;
	}
	.tile { width: 52px; height: 52px; }

	.start-menu {
		left: 0; right: 0; width: auto;
		height: auto; max-height: min(72dvh, 560px);
		border-right: 0;
		border-bottom: 1px solid rgba(232,48,47,0.4);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.start-search-input,
	#start-search-input { font-size: 16px; }
	.dock::after { display: none; }

	.fold-body { flex-direction: column; }
	.fold-side {
		width: auto;
		flex-direction: row;
		align-items: center;
		padding: 8px;
		border-right: 0;
		border-bottom: 1px solid var(--hairline);
		overflow-x: auto;
		overflow-y: hidden;
	}
	.fold-side-title { display: none; }
	.fold-nav { width: auto; white-space: nowrap; flex: none; }
	.win.is-folder { min-width: 0; min-height: 0; }

	.taskbar {
		gap: 6px;
		padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
		height: var(--topbar-h);
		padding-top: env(safe-area-inset-top, 0px);
		z-index: 1500;
	}
	.start-btn {
		min-width: 44px;
		min-height: 40px;
		touch-action: manipulation;
	}
	.start-btn span { display: none; }
	.radio-title { display: none; }
	.radio-widget { padding: 0 8px; max-width: none; }
	.radio-toggle {
		width: 40px;
		height: 40px;
		touch-action: manipulation;
	}
	.clock small { display: none; }
	.task-tabs { max-width: 48vw; }

	.show-desktop, .sys-tag { display: none; }
	#overview-btn, #widgets-btn { display: grid; }
	.lock-clock { font-size: 48px; }
	.ambient .lock-clock { font-size: 52px; }
	.toasts { left: 10px; right: 10px; top: calc(var(--topbar-h) + 8px); }
	.toast { max-width: none; }
	.cc {
		left: 8px;
		right: 8px;
		width: auto;
		max-height: min(70dvh, 520px);
		overflow: auto;
		z-index: 5800;
	}

	/* Mobile widgets drawer */
	.widgets {
		inset: var(--topbar-h) 0 0 0;
		width: auto;
		right: 0;
		left: 0;
		top: var(--topbar-h);
		padding: 12px 12px calc(90px + env(safe-area-inset-bottom, 0px));
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		background: rgba(6, 7, 10, 0.88);
		backdrop-filter: blur(18px);
		z-index: 5200;
		transform: translateY(110%);
		opacity: 1;
		pointer-events: none;
		visibility: hidden;
	}
	.widgets.hidden { transform: translateY(110%); }
	.widgets:not(.hidden),
	.widgets.mobile-open:not(.hidden) {
		transform: none;
		pointer-events: auto;
		visibility: visible;
	}
	.widgets.freeform {
		inset: var(--topbar-h) 0 0 0;
		padding: 12px;
	}
	.widgets .widget {
		width: min(100%, 420px);
		margin-inline: auto;
		position: relative;
		left: auto !important;
		top: auto !important;
	}
	.widget-chrome { opacity: 1; }

	.mobile-tray {
		display: flex;
		position: fixed;
		left: 8px;
		right: 8px;
		bottom: calc(var(--dock-h) + 8px + env(safe-area-inset-bottom, 0px));
		z-index: 1450;
		gap: 6px;
		padding: 6px;
		border-radius: 14px;
		background: rgba(12, 12, 16, 0.88);
		border: 1px solid rgba(255, 255, 255, 0.08);
		backdrop-filter: blur(14px);
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	body.aos-win-open .mobile-tray,
	body.aos-player-open .mobile-tray { display: none; }
	.mobile-tray button {
		flex: 1 0 auto;
		min-width: 64px;
		min-height: 40px;
		border: 0;
		border-radius: 10px;
		background: rgba(255, 255, 255, 0.06);
		color: var(--os-white);
		font-size: 12px;
		touch-action: manipulation;
	}

	/* Ascenra Player — inside the normal OS window on mobile */
	.win.is-player {
		min-width: 0;
		min-height: 0;
	}
	.aos-ar-player.in-os-window {
		position: absolute;
		inset: 0;
		max-height: none;
		border-radius: 0;
		box-shadow: none;
	}
	.aos-ar-body {
		max-height: none;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
	}
	.aos-ar-player.show-list .aos-ar-body {
		display: grid;
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(160px, 1fr);
	}
	.aos-ar-playlist {
		max-height: none;
		min-height: 160px;
		max-width: none;
		border-left: 0;
		border-top: 1px solid rgba(0, 245, 255, 0.12);
	}
	.aos-ar-art {
		max-height: min(36vw, 150px);
		aspect-ratio: 1;
		margin-inline: auto;
		width: min(100%, 190px);
	}
	.aos-ar-vinyl { width: 78px; height: 78px; }
	.aos-ar-track { font-size: 15px; white-space: normal; }
	.aos-ar-artist { font-size: 12px; margin-bottom: 14px; }
	.aos-ar-controls {
		gap: 12px;
		margin-bottom: 4px;
		justify-content: center;
	}
	.aos-ar-btn,
	.aos-ar-iconbtn {
		width: 44px;
		height: 44px;
		font-size: 18px;
		touch-action: manipulation;
	}
	.aos-ar-play {
		width: 56px;
		height: 56px;
		font-size: 18px;
		touch-action: manipulation;
	}
	.aos-ar-vol {
		max-width: 140px;
		height: 28px;
	}
	.aos-ar-pl-search { font-size: 16px; }
	.aos-ar-link { display: none; }
	.menubar { max-width: 36vw; }

	/* =====================================================================
	   PHONE OS / ANDROID LAUNCHER (body.aos-phone only — desktop untouched)
	   ===================================================================== */
	body.aos-phone {
		--phone-status-h: calc(28px + env(safe-area-inset-top, 0px));
		--phone-nav-h: calc(52px + env(safe-area-inset-bottom, 0px));
		--phone-dock-h: 76px;
		--topbar-h: var(--phone-status-h);
		--dock-h: calc(var(--phone-dock-h) + var(--phone-nav-h) + 8px);
	}
	body.aos-phone #phone-status,
	body.aos-phone #phone-nav,
	body.aos-phone #phone-home {
		display: flex;
	}

	/* Hide PC chrome on phone */
	body.aos-phone #taskbar .menubar,
	body.aos-phone #taskbar .radio-widget,
	body.aos-phone #taskbar .sys-tag,
	body.aos-phone #taskbar .show-desktop,
	body.aos-phone #taskbar .clock,
	body.aos-phone #taskbar .task-tabs,
	body.aos-phone #overview-btn,
	body.aos-phone #widgets-btn,
	body.aos-phone #mobile-tray,
	body.aos-phone #widgets,
	body.aos-phone #start-btn,
	body.aos-phone #cc-btn {
		display: none !important;
	}
	body.aos-phone #taskbar {
		height: 0 !important;
		min-height: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		overflow: hidden !important;
		opacity: 0;
		pointer-events: none;
	}

	/* Full-bleed wallpaper on phone */
	body.aos-phone .wallpaper {
		background-size: cover !important;
		background-position: center center !important;
	}
	body.aos-phone .wall-photo {
		object-fit: cover !important;
		object-position: center center !important;
	}
	body.aos-phone .wallpaper .sheen {
		background:
			linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 18%),
			linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 28%);
	}

	/* Home clock over wallpaper */
	body.aos-phone .phone-home {
		position: absolute;
		left: 0;
		right: 0;
		top: calc(var(--phone-status-h) + 18px);
		z-index: 2;
		flex-direction: column;
		align-items: center;
		gap: 6px;
		pointer-events: none;
		transition: opacity 0.25s ease;
	}
	body.aos-phone.aos-win-open #phone-home,
	body.aos-phone.aos-player-open #phone-home {
		opacity: 0;
		pointer-events: none;
	}
	body.aos-phone .phone-home-time {
		font-size: clamp(3.2rem, 14vw, 4.6rem);
		font-weight: 300;
		letter-spacing: -0.04em;
		line-height: 1;
		color: #fff;
		text-shadow: 0 8px 28px rgba(0,0,0,0.55);
	}
	body.aos-phone .phone-home-date {
		font-size: 0.95rem;
		color: rgba(255,255,255,0.88);
		text-shadow: 0 2px 10px rgba(0,0,0,0.5);
	}
	body.aos-phone .phone-home-hint {
		margin: 10px 0 0;
		font-size: 0.72rem;
		letter-spacing: 0.16em;
		text-transform: uppercase;
		color: rgba(255,255,255,0.45);
	}

	/* Status bar */
	body.aos-phone .phone-status {
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		z-index: 5600;
		height: var(--phone-status-h);
		padding: env(safe-area-inset-top, 0px) 14px 0;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		box-sizing: border-box;
		background: linear-gradient(180deg, rgba(0,0,0,0.45), transparent);
		color: #fff;
		font-size: 12px;
		font-weight: 600;
		pointer-events: none;
	}
	body.aos-phone .phone-clock { min-width: 42px; }
	body.aos-phone .phone-brand {
		font-size: 11px;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		opacity: 0.85;
		pointer-events: auto;
		cursor: pointer;
		padding: 4px 8px;
		border-radius: 8px;
	}
	body.aos-phone .phone-status-icons {
		display: flex;
		align-items: center;
		gap: 7px;
		min-width: 54px;
		justify-content: flex-end;
	}
	body.aos-phone .psi {
		display: inline-block;
		width: 14px;
		height: 10px;
		border: 1.5px solid rgba(255,255,255,0.9);
		border-radius: 2px;
		position: relative;
		opacity: 0.9;
	}
	body.aos-phone .psi-signal {
		border: 0;
		width: 14px;
		height: 10px;
		background:
			linear-gradient(to top, #fff 0 35%, transparent 35%) left / 3px 100% no-repeat,
			linear-gradient(to top, #fff 0 55%, transparent 55%) center / 3px 100% no-repeat,
			linear-gradient(to top, #fff 0 100%, transparent 100%) right / 3px 100% no-repeat;
	}
	body.aos-phone .psi-wifi {
		border: 0;
		width: 14px;
		height: 10px;
		border-top: 2px solid #fff;
		border-radius: 50% 50% 0 0;
		transform: scaleY(0.85);
	}
	body.aos-phone .psi-batt {
		width: 18px;
		height: 9px;
	}
	body.aos-phone .psi-batt::after {
		content: "";
		position: absolute;
		right: -3px;
		top: 2px;
		width: 2px;
		height: 4px;
		background: rgba(255,255,255,0.9);
		border-radius: 0 1px 1px 0;
	}
	body.aos-phone .psi-batt::before {
		content: "";
		position: absolute;
		inset: 1.5px 2px 1.5px 1.5px;
		background: #7CFF8A;
		border-radius: 1px;
	}

	/* App drawer grid — force flow layout (ignore desktop absolute icon coords) */
	body.aos-phone .desktop {
		inset: calc(var(--phone-status-h) + 118px) 12px var(--dock-h) 12px;
		padding: 0;
		z-index: 3;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}
	body.aos-phone .desk-grid {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-flow: row;
		gap: 18px 10px;
		justify-items: center;
		padding: 8px 0 20px;
	}
	body.aos-phone .desk-icon {
		position: relative !important;
		left: auto !important;
		top: auto !important;
		margin: 0 !important;
		width: 100%;
		max-width: 84px;
		min-height: 96px;
		gap: 8px;
	}
	body.aos-phone .desk-icon .tile {
		width: 60px;
		height: 60px;
		border-radius: 16px;
		box-shadow: 0 10px 24px rgba(0,0,0,0.35);
	}
	body.aos-phone .desk-icon .tile-logo {
		border-radius: 12px;
		inset: 0;
		width: 100%;
		height: 100%;
	}
	body.aos-phone .desk-icon-name {
		font-size: 0.68rem;
		font-weight: 500;
		color: #fff;
		text-shadow: 0 1px 6px rgba(0,0,0,0.75);
		-webkit-line-clamp: 2;
	}
	body.aos-phone .desk-icon .cat-dot { display: none; }

	/* Android-style favorites dock */
	body.aos-phone .dock {
		left: 12px;
		right: 12px;
		bottom: calc(var(--phone-nav-h) + 6px);
		width: auto;
		max-width: none;
		transform: none !important;
		justify-content: space-evenly;
		gap: 4px;
		padding: 10px 12px;
		border-radius: 22px;
		background: rgba(18, 18, 22, 0.55);
		border: 1px solid rgba(255,255,255,0.12);
		backdrop-filter: blur(18px) saturate(1.3);
		-webkit-backdrop-filter: blur(18px) saturate(1.3);
		z-index: 5400;
		overflow: visible;
	}
	body.aos-phone .dock.glass::before { display: none; }
	body.aos-phone .dock-app .tile {
		width: 52px;
		height: 52px;
		border-radius: 15px;
	}
	body.aos-phone .dock-app {
		min-width: 52px;
		min-height: 52px;
	}
	body.aos-phone .dock.slide {
		transform: none !important;
		opacity: 1;
	}

	/* 3-button nav */
	body.aos-phone .phone-nav {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 5500;
		height: var(--phone-nav-h);
		padding: 0 24px env(safe-area-inset-bottom, 0px);
		align-items: center;
		justify-content: space-around;
		background: rgba(8, 8, 10, 0.72);
		border-top: 1px solid rgba(255,255,255,0.08);
		backdrop-filter: blur(16px);
		-webkit-backdrop-filter: blur(16px);
	}
	body.aos-phone .phone-nav-btn {
		width: 56px;
		height: 44px;
		display: grid;
		place-items: center;
		color: rgba(255,255,255,0.88);
		border-radius: 12px;
		touch-action: manipulation;
		background: transparent;
		border: 0;
		padding: 0;
		cursor: pointer;
	}
	body.aos-phone .phone-nav-btn:active {
		background: rgba(255,255,255,0.08);
	}
	body.aos-phone .phone-nav-btn svg {
		width: 22px;
		height: 22px;
	}

	/* Apps = full-screen activities between status + nav */
	body.aos-phone .win,
	body.aos-phone .win.maxed,
	body.aos-phone.aos-win-open .win {
		inset: var(--phone-status-h) 0 var(--phone-nav-h) 0 !important;
		width: auto !important;
		height: auto !important;
		border-radius: 0 !important;
		z-index: 5300;
		box-shadow: none;
	}
	body.aos-phone.aos-win-open .desktop,
	body.aos-phone.aos-win-open .dock,
	body.aos-phone.aos-win-open .phone-home {
		visibility: hidden !important;
		pointer-events: none !important;
	}
	body.aos-phone.aos-win-open .phone-status {
		background: rgba(10,10,14,0.92);
	}
	body.aos-phone .win-bar {
		min-height: 48px;
		background: rgba(12,12,16,0.96);
	}
	body.aos-phone .win-ctl[data-act="min"],
	body.aos-phone .win-ctl[data-act="max"] {
		display: none;
	}
	body.aos-phone .start-menu {
		left: 0;
		right: 0;
		top: var(--phone-status-h);
		bottom: var(--phone-nav-h);
		width: auto;
		height: auto;
		max-height: none;
		border-radius: 0;
		z-index: 5450;
		animation: phone-drawer-in 0.28s var(--ease-glass);
		background: rgba(12, 12, 16, 0.94);
		padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
	}
	@keyframes phone-drawer-in {
		from { transform: translateY(24px); opacity: 0; }
		to { transform: none; opacity: 1; }
	}
	/* Control Center = notification shade from top */
	body.aos-phone #cc {
		top: var(--phone-status-h);
		right: 0;
		left: 0;
		width: auto;
		max-width: none;
		max-height: calc(100dvh - var(--phone-status-h) - var(--phone-nav-h) - 8px);
		border-radius: 0 0 22px 22px;
		z-index: 5550;
		animation: phone-shade-in 0.28s var(--ease-glass);
	}
	@keyframes phone-shade-in {
		from { transform: translateY(-16px); opacity: 0; }
		to { transform: none; opacity: 1; }
	}
	body.aos-phone #overview {
		inset: var(--phone-status-h) 0 var(--phone-nav-h) 0;
		z-index: 5480;
	}
	body.aos-phone #help-panel {
		inset: var(--phone-status-h) 0 var(--phone-nav-h) 0;
		width: auto;
		max-width: none;
		border-radius: 0;
	}

	/* App drawer button + dock cap */
	body.aos-phone .phone-drawer { display: flex !important; }
	body.aos-phone .phone-dock-hide { display: none !important; }
	body.aos-phone .phone-drawer-tile {
		background: rgba(255,255,255,0.12);
		color: #fff;
		display: grid;
		place-items: center;
		border-radius: 15px;
		width: 52px;
		height: 52px;
	}
	body.aos-phone .phone-drawer-tile svg { opacity: 0.92; }

	body.aos-phone .start-search input {
		height: 48px;
		border-radius: 14px;
		font-size: 16px;
	}

	/* Recents = vertical phone cards */
	body.aos-phone #overview {
		justify-content: flex-start;
		padding: 24px 14px calc(var(--phone-nav-h) + 12px);
		background: rgba(6, 6, 8, 0.72);
	}
	body.aos-phone .ov-title { margin-top: 8px; }
	body.aos-phone .ov-grid {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		width: 100%;
		max-width: none;
		gap: 12px;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		max-height: calc(100dvh - var(--phone-status-h) - var(--phone-nav-h) - 80px);
	}
	body.aos-phone .ov-card {
		width: auto;
		flex-direction: row;
		justify-content: flex-start;
		padding: 14px 16px;
		border-radius: 16px;
		gap: 14px;
	}
	body.aos-phone .ov-card:hover,
	body.aos-phone .ov-card:focus-visible {
		transform: scale(0.98);
	}
	body.aos-phone .ov-name,
	body.aos-phone .ov-domain { text-align: left; }
	body.aos-phone .ov-hint { bottom: calc(var(--phone-nav-h) + 10px); }
	body.aos-phone .ov-empty { padding: 40px 20px; text-align: center; }

	/* Lock screen phone chrome */
	body.aos-phone .lock {
		padding-top: max(72px, 12vh);
	}
	body.aos-phone .lock-clock {
		font-size: clamp(3rem, 14vw, 4.4rem);
		font-weight: 300;
		letter-spacing: -0.04em;
	}
	body.aos-phone .lock-hint {
		letter-spacing: 0.14em;
		text-transform: uppercase;
		font-size: 0.72rem;
		opacity: 0.55;
	}

	/* Toasts above nav */
	body.aos-phone .toasts {
		top: auto;
		bottom: calc(var(--phone-nav-h) + 12px);
		left: 12px;
		right: 12px;
	}

	/* Soft home indicator line above nav buttons */
	body.aos-phone .phone-nav::before {
		content: "";
		position: absolute;
		top: 6px;
		left: 50%;
		width: 36px;
		height: 3px;
		transform: translateX(-50%);
		border-radius: 2px;
		background: rgba(255,255,255,0.22);
		pointer-events: none;
	}
	body.aos-phone .phone-nav {
		position: absolute;
	}
}

/* Phone chrome — never show on desktop */
.phone-status,
.phone-nav,
.phone-home,
.phone-drawer {
	display: none;
}

@media (max-width: 420px) {
	body.aos-phone .desk-grid { gap: 14px 6px; }
	body.aos-phone .desk-icon .tile { width: 56px; height: 56px; }
	body.aos-phone .dock-app .tile { width: 48px; height: 48px; }
	body.aos-phone .phone-home-time { font-size: clamp(2.8rem, 13vw, 4rem); }
	.start-btn { padding-inline: 10px; }
	.task-tabs { max-width: 40vw; }
	.boot-name { font-size: 1.35rem; }
	.win-app { max-width: 28vw; }
	.win-browser-nav { gap: 2px; }
	.win-nav-btn { width: 34px; height: 34px; }
	.aos-ar-art { max-height: 140px; width: min(100%, 180px); }
}

/* =========================================================================
   ASCENRA PLAYER - content panel (hosted inside a normal .win window)
   ========================================================================= */
.aos-ar-player {
	--ar-cyan: #00f5ff;
	--ar-magenta: #ff006e;
	position: relative;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: rgba(3, 5, 8, 0.55);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: #d0e8f0;
	overflow: hidden;
}
.aos-ar-player.in-os-window {
	position: absolute;
	inset: 0;
}
.aos-ar-player[hidden] { display: none !important; }
#ascenra-player-stash[hidden] { display: none !important; }
.aos-ar-bar[hidden],
.aos-ar-resize[hidden],
.aos-ar-close[hidden] { display: none !important; }
.aos-ar-body {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
}
.aos-ar-main {
	flex: 1 1 280px;
	padding: 18px 18px 20px;
	min-width: 0;
	overflow: auto;
}
.aos-ar-playlist {
	flex: 1 1 240px;
	min-width: 200px;
	max-width: 280px;
	border-left: 1px solid rgba(0, 245, 255, 0.12);
	display: flex;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.28);
}
.aos-ar-playlist[hidden] { display: none !important; }
.aos-ar-pl-head {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 10px 8px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ar-magenta);
	flex: none;
}
.aos-ar-pl-search {
	width: 100%;
	height: 32px;
	border: 1px solid rgba(0, 245, 255, 0.18);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	padding: 0 10px;
	font-size: 12px;
	letter-spacing: 0;
	text-transform: none;
}
.aos-ar-pl-list {
	list-style: none;
	margin: 0;
	padding: 0 6px 10px;
	overflow: auto;
	flex: 1 1 auto;
	min-height: 0;
}
.aos-ar-pl-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
}
.aos-ar-pl-item:hover { background: rgba(0, 245, 255, 0.08); }
.aos-ar-pl-item.is-active {
	background: rgba(255, 0, 110, 0.16);
	box-shadow: inset 0 0 0 1px rgba(255, 0, 110, 0.35);
}
.aos-ar-pl-title {
	font-size: 12px;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.aos-ar-pl-artist {
	font-size: 10px;
	color: rgba(208, 232, 240, 0.55);
}
.aos-ar-pl-empty {
	padding: 16px 10px;
	font-size: 12px;
	color: rgba(208, 232, 240, 0.5);
}
.aos-ar-resize {
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 16px;
	height: 16px;
	cursor: nwse-resize;
	background:
		linear-gradient(135deg, transparent 50%, rgba(0, 245, 255, 0.55) 50%) bottom right / 10px 10px no-repeat;
}
.aos-ar-now {
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 0.22em;
	color: var(--ar-magenta);
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 12px;
}
.aos-ar-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--ar-magenta);
	box-shadow: 0 0 8px var(--ar-magenta);
	animation: aos-ar-pulse 1s ease-in-out infinite;
}
@keyframes aos-ar-pulse { 50% { opacity: 0.35; } }
.aos-ar-art {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	max-height: 170px;
	margin-bottom: 12px;
	overflow: hidden;
	border: 1px solid rgba(0, 245, 255, 0.1);
	background: linear-gradient(135deg, #0a0f1e, #1a0a2e 50%, #0a1a2e);
	display: grid;
	place-items: center;
}
.aos-ar-art img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.35;
}
.aos-ar-vinyl {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: conic-gradient(from 0deg, #0a0f1e 0deg, #111 30deg, #0a0f1e 60deg, #111 90deg, #0a0f1e 120deg, #111 150deg, #0a0f1e 180deg, #111 210deg, #0a0f1e 240deg, #111 270deg, #0a0f1e 300deg, #111 330deg);
	box-shadow: 0 0 24px rgba(0, 245, 255, 0.12);
	position: relative;
	z-index: 1;
}
.aos-ar-player.is-playing .aos-ar-vinyl { animation: aos-ar-spin 8s linear infinite; }
.aos-ar-vinyl::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: 26px;
	height: 26px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(circle, var(--ar-magenta), #330020);
	box-shadow: 0 0 14px var(--ar-magenta);
}
@keyframes aos-ar-spin { to { transform: rotate(360deg); } }
.aos-ar-wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 34px;
	display: flex;
	align-items: flex-end;
	gap: 2px;
	padding: 0 8px 4px;
	z-index: 2;
}
.aos-ar-wave i {
	flex: 1;
	min-height: 3px;
	border-radius: 2px 2px 0 0;
	background: linear-gradient(180deg, var(--ar-cyan), rgba(0, 245, 255, 0.1));
	animation: aos-ar-bar 0.8s ease-in-out infinite alternate;
	animation-play-state: paused;
}
.aos-ar-player.is-playing .aos-ar-wave i { animation-play-state: running; }
@keyframes aos-ar-bar { from { height: var(--min-h, 3px); } to { height: var(--max-h, 18px); } }
.aos-ar-track {
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	margin-bottom: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.aos-ar-artist {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--ar-cyan);
	margin-bottom: 12px;
	letter-spacing: 0.04em;
}
.aos-ar-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}
.aos-ar-btn {
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	color: rgba(208, 232, 240, 0.55);
	cursor: pointer;
	font-size: 14px;
}
.aos-ar-btn:hover { color: var(--ar-cyan); }
.aos-ar-play {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--ar-magenta), #ff4500);
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	box-shadow: 0 0 16px rgba(255, 0, 110, 0.4);
}
.aos-ar-vol {
	flex: 1;
	accent-color: var(--ar-cyan);
	min-width: 0;
}
.aos-ar-link { display: none; }
.desk-icon.running .tile {
	outline: 2px solid rgba(0, 245, 255, 0.35);
	outline-offset: 2px;
}
