/* ───────────── themes ───────────── */
:root, [data-theme="matrix"] {
  --bg: #020602; --win: rgba(6, 16, 8, .92); --fg: #c4ffc4; --dim: #5b8a5b;
  --accent: #39ff14; --accent2: #00e5ff; --warn: #ffd23f; --err: #ff3864; --border: #1a3d1a;
}
[data-theme="amber"] {
  --bg: #0a0500; --win: rgba(24, 14, 0, .92); --fg: #ffd699; --dim: #9a7030;
  --accent: #ffb000; --accent2: #ff4d00; --warn: #fff080; --err: #ff4d2e; --border: #4d3300;
}
[data-theme="vampire"] {
  --bg: #0e0f14; --win: rgba(33, 34, 44, .92); --fg: #f8f8f2; --dim: #7282b4;
  --accent: #bd93f9; --accent2: #ff79c6; --warn: #f1fa8c; --err: #ff5555; --border: #44475a;
}
[data-theme="arctic"] {
  --bg: #161a22; --win: rgba(46, 52, 64, .92); --fg: #eceff4; --dim: #7b88a4;
  --accent: #88c0d0; --accent2: #b48ead; --warn: #ebcb8b; --err: #bf616a; --border: #3b4252;
}
[data-theme="retro"] {
  --bg: #121414; --win: rgba(40, 40, 40, .92); --fg: #ebdbb2; --dim: #a89984;
  --accent: #b8bb26; --accent2: #fe8019; --warn: #fabd2f; --err: #fb4934; --border: #504945;
}
[data-theme="cyberpunk"] {
  --bg: #05010f; --win: rgba(20, 5, 51, .92); --fg: #e8e0ff; --dim: #7b6baa;
  --accent: #ff2a6d; --accent2: #05d9e8; --warn: #f9f871; --err: #ff2a2a; --border: #3a1d6e;
}
:root {
  --glow: color-mix(in srgb, var(--accent) 40%, transparent);
  --fs: 13px;
  --ease: cubic-bezier(.05, .9, .1, 1.05);   /* hyprland's favourite bezier */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --radius: 12px;
  --gap: 12px;
  --blur: 16px; --win-op: 78%; --bw: 2px; --dur: 1; --scrim-a: 30%; --scrim-b: 72%; --wp-blur: 0px;
}
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* ───────────── base ───────────── */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font: 400 var(--fs)/1.5 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
}
html:not(.no-crt) body { text-shadow: 0 0 5px color-mix(in srgb, currentColor 30%, transparent); }
::selection { background: var(--accent); color: var(--bg); text-shadow: none; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
b { font-weight: 700; }
pre { margin: 0; font: inherit; }
button { font: inherit; color: inherit; }
.accent { color: var(--accent); } .accent2 { color: var(--accent2); }
.dim { color: var(--dim); } .ok { color: var(--accent); } .warn { color: var(--warn); } .err { color: var(--err); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ───────────── wallpaper ───────────── */
#wall { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
#wall i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: .32; animation: blob 24s ease-in-out infinite alternate;
}
#wall i:nth-of-type(1) { background: var(--accent); top: -25%; left: -15%; }
#wall i:nth-of-type(2) { background: var(--accent2); bottom: -30%; right: -20%; animation-duration: 30s; animation-delay: -8s; }
#wall i:nth-of-type(3) { background: color-mix(in srgb, var(--accent) 50%, var(--accent2)); top: 25%; left: 35%; width: 38vmax; height: 38vmax; opacity: .2; animation-duration: 19s; animation-delay: -4s; }
@keyframes blob {
  0% { transform: translate(0, 0) scale(1) }
  33% { transform: translate(14vw, 9vh) scale(1.18) }
  66% { transform: translate(-8vw, 16vh) scale(.88) }
  100% { transform: translate(9vw, -12vh) scale(1.06) }
}
#wall::before { /* dot grid */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 1.5px) 0 0 / 26px 26px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
/* wallhaven image layers: blurred thumb → sharp full-res, crossfade between picks, mouse parallax */
#wall .wp {
  position: absolute; inset: -40px;
  opacity: 0; filter: blur(24px) saturate(1.2);
  transform: scale(1.12) translate(calc(var(--px, 0) * -22px), calc(var(--py, 0) * -14px));
  transition: opacity 1.1s ease, filter 1.2s ease, transform 1.8s var(--ease-out);
}
#wall .wp.in { opacity: 1; transform: scale(1.04) translate(calc(var(--px, 0) * -22px), calc(var(--py, 0) * -14px)); }
#wall .wp.hi { filter: blur(var(--wp-blur)) saturate(1.05); }
#wall .wp img { width: 100%; height: 100%; object-fit: cover; display: block; }
#wall .wp::after { /* scrim keeps text readable on busy wallpapers */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--bg) var(--scrim-a), transparent), color-mix(in srgb, var(--bg) var(--scrim-b), transparent));
}
html.has-wall #wall i { opacity: .12; }
html.has-wall #wall .wm-name { display: none; }
#wall .wm-name {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 18vw; font-weight: 800; letter-spacing: -.05em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 22%, transparent);
  text-shadow: none; user-select: none;
}
#spot {
  position: absolute; width: 700px; height: 700px; border-radius: 50%; pointer-events: none;
  left: var(--mx, 50%); top: var(--my, 50%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%);
  transition: left .25s var(--ease-out), top .25s var(--ease-out);
}

/* ───────────── CRT ───────────── */
#crt {
  pointer-events: none; position: fixed; inset: 0; z-index: 90;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .16) 2px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .55) 100%);
  animation: flicker 5s infinite;
}
#crt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 120px; top: -120px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 5%, transparent), transparent);
  animation: scan 7s linear infinite;
}
html.no-crt #crt { display: none; }
@keyframes flicker { 0%, 100% { opacity: 1 } 47% { opacity: .93 } 48% { opacity: 1 } 73% { opacity: .97 } }
@keyframes scan { to { top: 100% } }

/* ───────────── boot ───────────── */
#boot {
  position: fixed; inset: 0; z-index: 80; overflow: auto; padding: 18px 22px;
  background: #000; color: #c8c8c8; transition: opacity .45s, filter .45s, transform .45s;
}
#boot pre { white-space: pre-wrap; word-break: break-word; }
#boot .ok { color: #39ff14; } #boot .warn { color: #ffd23f; } #boot .dim { color: #777; }
#boot .accent { color: #39ff14; font-weight: 800; }
#boot.out { opacity: 0; filter: brightness(3) blur(4px); transform: scale(1.04); }

/* ───────────── desktop ───────────── */
#desktop { position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; }

/* waybar */
#bar {
  position: relative; z-index: 10; flex: none; height: 46px; margin: 8px calc(var(--gap) + 2px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px;
  font-size: 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  animation: barIn .8s var(--ease) both .1s;
}
@keyframes barIn { from { transform: translateY(-70px); opacity: 0 } }
.bar-left, .bar-right { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 12.5px;
  background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--dim); border: 0;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.pill b { color: var(--fg); }
button.pill { cursor: pointer; }
button.pill:hover { transform: translateY(-1px) scale(1.05); color: var(--fg); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ib { width: 34px; padding: 0; justify-content: center; font-size: 16px; color: var(--fg) !important; }
.ib:hover { box-shadow: 0 0 14px var(--glow); }
.ib svg, .st-icon svg, #st-close svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .5s var(--ease);
}
#st-btn:hover svg { transform: rotate(90deg); }
#wp-next:hover svg { transform: scale(1.15) rotate(-6deg); }
#keys-btn:hover svg { transform: scale(1.15); }
.pw:hover svg { transform: scale(1.12); }
#st-close svg { width: 16px; height: 16px; transition: none; }
.logo { width: 42px; justify-content: center; font-size: 14px; color: var(--bg) !important; font-weight: 800; text-shadow: none; background: linear-gradient(135deg, var(--accent), var(--accent2)) !important; }
.pw:hover { background: var(--err) !important; color: var(--bg) !important; }
#workspaces { padding: 0 4px; gap: 3px; }
#workspaces button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0; height: 24px; min-width: 24px; padding: 0 8px; border: 0; border-radius: 99px;
  background: color-mix(in srgb, var(--fg) 12%, transparent); color: var(--fg); cursor: pointer; font-size: 12.5px; font-weight: 700;
  transition: all .45s var(--ease);
}
#workspaces button em { font-style: normal; margin-left: 6px; font-weight: 600; opacity: .85; text-transform: lowercase; }
#workspaces button:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--fg); }
#workspaces button.active { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: var(--bg); font-weight: 800; text-shadow: none; padding: 0 10px; }
#workspaces button.active em { opacity: 1; font-weight: 800; }
#workspaces button { height: 28px; padding: 0 11px; font-size: 13px; }
#fs-btn .fs-off, .page-fs #fs-btn .fs-on { display: none; }
.page-fs #fs-btn .fs-off { display: block; }
#bar-title { display: block; line-height: 32px; min-width: 0; flex: 0 1 auto; color: var(--fg); max-width: 22vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* block, not flex: ellipsis only works on block boxes */
@media (max-width: 1440px) { #bar-title { display: none; } }

/* screens / tiling */
#screens { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.screen { display: none; position: absolute; inset: var(--gap) calc(var(--gap) + 2px) calc(var(--gap) + 2px); gap: var(--gap); --dir: 1; }
.screen.active, .screen.leaving { display: grid; }
.screen.active { animation: wsIn calc(.6s * var(--dur)) var(--ease) both; }
.screen.leaving { animation: wsOut calc(.6s * var(--dur)) var(--ease) both; pointer-events: none; }
@keyframes wsIn { from { transform: translateX(calc(var(--dir) * 106%)); } }
@keyframes wsOut { to { transform: translateX(calc(var(--dir) * -106%)); } }
.screen.pop { animation: none; }
.screen.pop .tile { animation: popin calc(.7s * var(--dur)) var(--ease) both; animation-delay: calc((var(--i, 0) * 90ms + .25s) * var(--dur)); }
@keyframes popin { from { opacity: 0; transform: scale(.82) translateY(20px); filter: blur(6px); } }

/* slots: each tile sits in area s<n>; dragging one window onto another swaps their slots */
.screen[data-ws="1"] { grid-template-columns: 1.65fr 1fr; grid-template-rows: 1.2fr 1fr 96px; grid-template-areas: "s0 s1" "s0 s2" "s0 s3"; }
.screen[data-ws="2"] { grid-template: "s0" 1fr / 1fr; }
.screen[data-ws="3"] { grid-template: "s0 s1" 1fr / 1.15fr 1fr; }
.screen[data-ws="4"] { grid-template: "s0" 1fr / 1fr; }
.screen[data-ws="5"] { grid-template: "s0 s1" 1.35fr "s0 s2" 1fr / 1.2fr 1fr; }

.tile { min-height: 0; min-width: 0; display: flex; position: relative; grid-area: var(--slot); }
.ph {   /* drop target preview while dragging */
  grid-area: var(--slot); pointer-events: none; border-radius: var(--radius);
  border: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 7%, transparent) 0 12px, transparent 12px 24px);
  box-shadow: inset 0 0 50px var(--glow);
  animation: phIn .35s var(--ease) both;
}
@keyframes phIn { from { opacity: 0; transform: scale(.94); } }
.screen.has-fs .tile:not(.fs) { visibility: hidden; }
.tile.fs { position: absolute; inset: 0; grid-area: 1 / 1 / -1 / -1; left: 0 !important; top: 0 !important; width: auto !important; height: auto !important; z-index: 1000 !important; }

/* floating windows (drag / resize) */
.tile.floating { position: absolute; grid-area: 1 / 1 / -1 / -1; z-index: 10; }
.tile.floating .win { box-shadow: 0 28px 70px rgba(0, 0, 0, .6); }
.tile.floating .win.focus { box-shadow: 0 0 40px var(--glow), 0 28px 70px rgba(0, 0, 0, .6); }
.tile.dragging .win { transform: rotate(var(--tilt, 0deg)) scale(1.025); transition: transform .12s linear; box-shadow: 0 0 50px var(--glow), 0 40px 90px rgba(0, 0, 0, .65); }
.tile.dragging .win::after, .tile.resizing .win::after { opacity: 0; }
.tile.resizing .win { transition: none; }
.win-bar { cursor: grab; touch-action: none; }
body.wm-move, body.wm-move * { cursor: grabbing !important; user-select: none !important; }
body.wm-resize, body.wm-resize * { cursor: nwse-resize !important; user-select: none !important; }
.rz {
  position: absolute; right: 2px; bottom: 2px; z-index: 4; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 55%, var(--dim) 55% 62%, transparent 62% 72%, var(--dim) 72% 79%, transparent 79%);
  opacity: 0; transition: opacity .25s;
}
.win:hover .rz, .tile.resizing .rz { opacity: 1; }
.win.focus .rz { background: linear-gradient(135deg, transparent 55%, var(--accent) 55% 62%, transparent 62% 72%, var(--accent) 72% 79%, transparent 79%); }

/* windows: animated gradient border, blur, dim inactive */
.win {
  position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  background: color-mix(in srgb, var(--win) var(--win-op), transparent); border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  transition: box-shadow .4s, transform .4s var(--ease), border-radius .3s;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  transition: box-shadow .4s, transform .4s var(--ease);
}
.win::before { /* border */
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: var(--bw); pointer-events: none;
  background: conic-gradient(from var(--ang), var(--border), color-mix(in srgb, var(--border) 60%, var(--dim)), var(--border));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.win::after { /* dim_inactive */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: rgba(0, 0, 0, .22); transition: opacity .35s;
}
.win.focus { box-shadow: 0 0 34px var(--glow), 0 18px 50px rgba(0, 0, 0, .55); }
.win.focus::before {
  background: conic-gradient(from var(--ang), var(--accent), var(--accent2), color-mix(in srgb, var(--accent) 30%, transparent), var(--accent2), var(--accent));
  animation: spin calc(4s * var(--dur)) linear infinite;
}
html.no-spin .win.focus::before { animation: none;
}
.win.focus::after { opacity: 0; }
@keyframes spin { to { --ang: 360deg; } }
.win-bar {
  flex: none; display: flex; align-items: center; gap: 10px; height: 28px; padding: 0 12px; font-size: 12px;
  color: var(--dim); cursor: default; user-select: none;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 8%, transparent);
}
.win.focus .win-bar { color: var(--fg); }
.win-tag {
  flex: none; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); color: var(--bg); text-shadow: none;
}
.win-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.win-bar .fs-hint { margin-left: auto; opacity: 0; transition: opacity .3s; font-size: 11px; }
.win-bar:hover .fs-hint { opacity: .6; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 15%, transparent); transition: background .3s, transform .3s var(--ease); }
.win.focus .dots i:nth-child(1) { background: var(--err); }
.win.focus .dots i:nth-child(2) { background: var(--warn); transition-delay: .05s; }
.win.focus .dots i:nth-child(3) { background: var(--accent); transition-delay: .1s; }
.win-bar:hover .dots i { transform: scale(1.25); }
.win-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 14px; }

/* view transitions (fullscreen + theme reveal) */
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ───────────── terminal ───────────── */
.win-term .win-body { cursor: text; }
#term-out .line { white-space: pre-wrap; word-break: break-word; min-height: 1.5em; animation: lineIn .25s var(--ease-out) both; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } }
#term-line { display: flex; align-items: baseline; }
#term-line.busy { display: none; }
#term-in {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0; margin-left: .6ch;
  color: var(--fg); font: inherit; caret-color: var(--accent); text-shadow: inherit;
}
.p-user { color: var(--accent); font-weight: 700; } .p-path { color: var(--accent2); font-weight: 700; }
a.cmd { color: var(--accent); cursor: pointer; border-bottom: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); transition: background .2s; }
a.cmd:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.big { display: block; max-width: 100%; height: auto; margin: 6px 0; filter: drop-shadow(0 0 10px var(--glow)); }
.trainwrap { overflow: hidden; }
.train { display: inline-block; white-space: pre; color: var(--accent); animation: choo 4.5s linear forwards; }
@keyframes choo { from { transform: translateX(110%) } to { transform: translateX(-110%) } }
.dir { color: var(--accent2); font-weight: 700; }
.lscols { display: flex; flex-wrap: wrap; column-gap: 3ch; }

/* ───────────── neofetch ───────────── */
.qnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.qnav button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; cursor: pointer; font: inherit; color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: calc(var(--radius) * .7);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
  animation: lineIn .45s var(--ease-out) both; animation-delay: calc(.4s + var(--n) * 90ms);
}
.qnav button:hover, .qnav button:focus-visible {
  transform: translateY(-2px); background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent);
  box-shadow: 0 6px 20px -8px var(--accent); outline: none;
}
.q-ic { font-size: 20px; line-height: 1; }
.q-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.q-t b { color: var(--accent); }
.q-t small { color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qnav kbd { opacity: .7; }
.fetch { display: flex; gap: 2.5ch; align-items: flex-start; flex-wrap: wrap; }
.fetch .tux { color: var(--accent); font-weight: 700; animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
.fetch .info { white-space: pre-wrap; }
.blocks { display: inline-flex; gap: 3px; }
.blocks i { width: 2ch; height: 1.1em; display: inline-block; border-radius: 3px; animation: blockIn .5s var(--ease) both; }
.blocks i:nth-child(n) { animation-delay: calc(var(--n) * 60ms + .6s); }
@keyframes blockIn { from { transform: scale(0) rotate(-90deg); } }

/* ───────────── htop ───────────── */
.hbar { display: flex; gap: 1ch; white-space: nowrap; }
.hn { color: var(--dim); }
.hl { color: var(--accent2); width: 12ch; overflow: hidden; flex: none; }
.htrack { flex: 1; display: flex; min-width: 0; }
.htrack::before { content: "["; } .htrack::after { content: attr(data-p) "]"; color: var(--dim); }
.hf-wrap { flex: 1; min-width: 0; overflow: hidden; }
.hf { display: block; overflow: hidden; white-space: nowrap; transition: width .9s var(--ease); color: var(--accent); width: 0; }
.hf.mid { color: var(--warn); } .hf.hot { color: var(--err); }
.hstat { margin-top: 10px; color: var(--dim); } .hstat b { color: var(--fg); }

/* ───────────── cava ───────────── */
.t-cava .win-body { padding: 8px 12px 0; display: flex; }
#cava { flex: 1; display: flex; align-items: flex-end; gap: 3px; min-height: 40px; }
#cava i {
  flex: 1; height: 100%; transform-origin: bottom; transform: scaleY(.1); border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  transition: transform .1s linear; box-shadow: 0 0 8px var(--glow);
}

/* ───────────── ranger ───────────── */
#ranger { display: grid; grid-template-columns: minmax(180px, 1fr) 2.5fr; height: 100%; }
#r-list { list-style: none; margin: 0; padding: 0 10px 0 0; border-right: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
#r-list li { padding: 3px 10px; cursor: pointer; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .25s, padding .35s var(--ease), color .25s; }
#r-list li:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); padding-left: 14px; }
#r-list li.sel { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: var(--bg); text-shadow: none; font-weight: 700; padding-left: 16px; }
#r-prev { padding: 0 6px 0 24px; animation: prevIn .5s var(--ease) both; }
@keyframes prevIn { from { opacity: 0; transform: translateX(24px); } }
.pv-title { font-size: 2.4em; font-weight: 800; color: var(--accent); line-height: 1.1; margin-bottom: 6px; filter: drop-shadow(0 0 14px var(--glow)); }
#r-prev p { max-width: 70ch; font-size: 1.1em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tags span { border: 1px solid var(--accent2); color: var(--accent2); padding: 1px 10px; border-radius: 99px; font-size: 12px; animation: popin .5s var(--ease) both; animation-delay: calc(var(--n) * 70ms + .15s); }
.pv-links { display: flex; gap: 16px; margin: 18px 0; font-weight: 700; }
.pv-links a { padding: 4px 12px; border-radius: 8px; border: 1px solid var(--accent2); transition: all .3s var(--ease); }
.pv-links a:hover { background: var(--accent2); color: var(--bg); text-decoration: none; transform: translateY(-2px); text-shadow: none; }
.hint { margin-top: 30px; }

/* ───────────── vim ───────────── */
#vim { display: flex; flex-direction: column; min-height: 100%; }
.vbody { flex: 1; }
.vl { display: flex; white-space: pre-wrap; animation: lineIn .35s var(--ease-out) both; animation-delay: var(--d); }
.ln { width: 4ch; text-align: right; margin-right: 2ch; color: var(--dim); flex: none; user-select: none; }
.tilde { color: var(--accent2); }
.vh { color: var(--accent); font-weight: 800; }
.vli::first-letter { color: var(--accent2); }
.vstatus { display: flex; gap: 2ch; margin-top: 10px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.vmode { background: var(--accent); color: var(--bg); font-weight: 800; padding: 0 1ch; text-shadow: none; }
.vr { margin-left: auto; padding-right: 1ch; color: var(--dim); }
.vcmd { color: var(--dim); }

/* ───────────── git log ───────────── */
#reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; padding: 6px; }
#reviews .rv { padding: 18px 20px; font-size: 14.5px; }
#reviews .rv-av { width: 42px; height: 42px; font-size: 14px; }
#reviews .rv { margin: 0; }
#reviews .rv-src { grid-column: 1; }
.rv {
  margin: 0 0 14px; padding: 12px 14px; border-radius: calc(var(--radius) * .7);
  background: color-mix(in srgb, var(--fg) 5%, transparent); border-left: 3px solid var(--accent2);
  animation: lineIn .45s var(--ease-out) both; animation-delay: calc(var(--n) * 120ms);
}
.rv blockquote { margin: 0 0 10px; line-height: 1.55; }
.rv blockquote::before { content: "“"; color: var(--accent); font-size: 1.6em; line-height: 0; vertical-align: -.35em; margin-right: 2px; }
.rv figcaption { display: flex; align-items: center; gap: 10px; font-size: .92em; line-height: 1.35; }
.rv-av {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-weight: 800; font-size: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--bg); text-shadow: none;
}
.rv-rel { color: var(--warn); font-size: .9em; }
.rv-src { font-size: 11px; }
.xp { list-style: none; margin: 0; padding: 4px 4px 4px 26px; position: relative; }
.xp::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent2), transparent); opacity: .55; }
.xp-item {
  position: relative; margin: 0 0 14px; padding: 14px 16px 12px; border-radius: calc(var(--radius) * .7);
  background: color-mix(in srgb, var(--fg) 5%, transparent); border: 1px solid color-mix(in srgb, var(--fg) 8%, transparent);
  animation: lineIn .45s var(--ease-out) both; animation-delay: calc(var(--n) * 110ms);
  transition: border-color .25s, background .25s;
}
.xp-item:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.xp-dot { position: absolute; left: -22px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent2); }
.xp-item.now .xp-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: xpPulse 2s infinite; }
@keyframes xpPulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.xp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px 16px; flex-wrap: wrap; }
.xp-what h3 { margin: 0; font-size: 1.12em; line-height: 1.3; color: var(--fg); }
.xp-org { margin-top: 2px; color: var(--accent2); font-weight: 700; }
.xp-org a { color: inherit; text-decoration: none; }
.xp-org a:hover { text-decoration: underline; }
.xp-when { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.xp-date { font-weight: 700; color: var(--fg); white-space: nowrap; }
.xp-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-size: .85em; color: var(--dim); }
.xp-live { color: var(--accent); font-weight: 800; }
.xp-kind { padding: 0 7px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 9%, transparent); color: var(--fg); }
.xp-pts { margin: 10px 0 0; padding: 0 0 0 18px; line-height: 1.6; }
.xp-pts li { margin: 2px 0; }
.xp-pts li::marker { color: var(--accent); }
.xp-sha { position: absolute; right: 12px; bottom: 6px; font-size: 10.5px; color: var(--warn); opacity: .35; }
.xp-item:hover .xp-sha { opacity: .8; }
@media (max-width: 900px) { .xp-when { align-items: flex-start; text-align: left; } .xp-meta { justify-content: flex-start; } }
.commit { margin-bottom: 12px; animation: lineIn .4s var(--ease-out) both; animation-delay: calc(var(--n) * 110ms); }
.graph, .sha { color: var(--warn); }
.ref { color: var(--accent2); font-weight: 700; }
.ref .head { color: var(--accent); }
.cmeta, .cmsg { color: var(--dim); white-space: pre-wrap; }
.cmsg { color: var(--fg); }

/* ───────────── contact ───────────── */
#contact { font-size: 1.05em; }
.ct-big { font-size: .85em; }
.ct-status {
  margin: 14px 0 16px; padding: 10px 14px; border-radius: calc(var(--radius) * .7);
  background: color-mix(in srgb, var(--fg) 5%, transparent); border-left: 3px solid var(--accent);
  animation: lineIn .5s var(--ease-out) both .1s;
}
.ct-status div { margin: 3px 0; }
.ct-k { display: inline-block; width: 11ch; color: var(--dim); }
.ct-live { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.6s infinite; }
.ct-link { position: relative; display: inline-block; transition: transform .3s var(--ease), color .2s; }
.ct-link:hover { transform: translateX(4px); color: var(--accent); text-decoration: none; }
.ct-link:hover::before, .ct-link:hover::after {   /* rgb-split glitch on hover */
  content: attr(data-text); position: absolute; left: 0; top: 0; pointer-events: none; text-shadow: none;
}
.ct-link:hover::before { color: var(--err); transform: translate(-2px, 0); clip-path: inset(0 0 55% 0); animation: glitch .4s steps(2) infinite; opacity: .8; }
.ct-link:hover::after { color: var(--accent2); transform: translate(2px, 0); clip-path: inset(50% 0 0 0); animation: glitch .3s steps(2) infinite reverse; opacity: .8; }
@keyframes glitch { 50% { transform: translate(3px, -1px); } }
.ct-copy {
  margin-left: 6px; padding: 0 6px; border: 0; border-radius: 6px; cursor: pointer; opacity: 0; color: var(--dim);
  background: color-mix(in srgb, var(--fg) 8%, transparent); transition: opacity .2s, color .2s, transform .2s var(--ease);
}
.cline:hover .ct-copy { opacity: 1; }
.ct-copy:hover { color: var(--accent); transform: scale(1.15); }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.ct-actions .pill { height: 30px; color: var(--fg); text-decoration: none; }
.ct-cta { background: linear-gradient(90deg, var(--accent), var(--accent2)) !important; color: var(--bg) !important; font-weight: 800; text-shadow: none; }
.ct-exit { margin-top: 8px; }
#m-form { display: flex; flex-direction: column; gap: 8px; height: 100%; }
#m-form label { display: flex; align-items: baseline; gap: 1ch; }
#m-form label > span { width: 9ch; flex: none; }
#m-form input, #m-form select, #m-form textarea {
  flex: 1; min-width: 0; font: inherit; color: var(--fg); padding: 4px 8px; border-radius: 6px; outline: none;
  background: color-mix(in srgb, var(--fg) 5%, transparent); border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  transition: border-color .2s, box-shadow .2s; caret-color: var(--accent);
}
#m-form select option { background: var(--bg); }
#m-form input:focus, #m-form select:focus, #m-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 14px var(--glow); }
#m-form .m-msg { flex: 1; align-items: stretch; }
#m-form textarea { resize: none; min-height: 70px; }
.m-foot { display: flex; align-items: center; justify-content: space-between; }
.m-prog { min-height: 1.5em; color: var(--accent); }
.m-prog:not(:empty)::after { content: "▋"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cline { margin: 8px 0; animation: lineIn .4s var(--ease-out) both; animation-delay: calc(var(--n) * 90ms); }
.cl-label { color: var(--warn); }
#cow { color: var(--fg); cursor: pointer; white-space: pre; transition: color .3s; }
#cow:hover { color: var(--accent); }

/* ───────────── launcher (rofi) ───────────── */
#launcher {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: start center; padding-top: 14vh;
  background: rgba(0, 0, 0, 0); backdrop-filter: blur(0); transition: background .3s, backdrop-filter .3s;
}
#launcher[hidden] { display: none; }
#launcher.open { background: rgba(0, 0, 0, .35); backdrop-filter: blur(4px); }
.l-box {
  position: relative; width: min(560px, 92vw); border-radius: 16px; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 0 0 2px var(--accent), 0 0 60px var(--glow), 0 30px 80px rgba(0, 0, 0, .6);
  transform: scale(.88) translateY(-20px); opacity: 0; transition: transform calc(.45s * var(--dur)) var(--ease), opacity .25s;
}
#launcher.open .l-box { transform: none; opacity: 1; }
.l-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-size: 16px; border-bottom: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
#l-q { flex: 1; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; caret-color: var(--accent); }
#l-list { list-style: none; margin: 0; padding: 8px; max-height: 46vh; overflow: auto; }
#l-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; cursor: pointer; animation: lineIn .3s var(--ease-out) both; animation-delay: calc(min(var(--i), 12) * 18ms); transition: background .2s, padding .3s var(--ease); }
#l-list li.sel { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent); padding-left: 18px; }
#l-list li.sel .l-ic { background: var(--accent); color: var(--bg); text-shadow: none; }
.l-ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--fg) 8%, transparent); transition: background .2s; }
.l-hint { margin-left: auto; font-size: 11px; }
.l-foot { padding: 8px 18px; font-size: 11px; border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }

/* ───────────── easter eggs ───────────── */
.fx, .bomb { position: fixed; inset: 0; z-index: 96; pointer-events: none; }
.bomb-win {
  position: absolute; padding: 6px 10px; border-radius: 8px; font-size: 11px; color: var(--err); text-shadow: none; white-space: nowrap;
  background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid var(--err);
  box-shadow: 0 0 18px color-mix(in srgb, var(--err) 40%, transparent); animation: popin .3s var(--ease) both;
}
.bomb.dead .bomb-win { animation: die .6s ease-in forwards; }
@keyframes die { to { transform: scale(0) rotate(30deg); opacity: 0; } }
.tux { cursor: pointer; user-select: none; }
#lock {
  position: fixed; inset: 0; z-index: 97; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  backdrop-filter: blur(0) brightness(1); -webkit-backdrop-filter: blur(0) brightness(1); background: rgba(0, 0, 0, 0);
  opacity: 0; transition: opacity .6s ease, backdrop-filter .8s ease, background .8s ease; cursor: pointer;
}
#lock[hidden] { display: none; }
#lock.on { opacity: 1; backdrop-filter: blur(30px) brightness(.55); -webkit-backdrop-filter: blur(30px) brightness(.55); background: color-mix(in srgb, var(--bg) 35%, transparent); }
.lk-time {
  font-size: clamp(5rem, 16vw, 11rem); font-weight: 800; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px var(--glow)); text-shadow: none; transform: translateY(-30px); transition: transform 1s var(--ease);
}
.lk-date { font-size: 1.2rem; color: var(--fg); opacity: .8; transform: translateY(-20px); transition: transform 1s var(--ease) .05s; }
#lock.on .lk-time, #lock.on .lk-date { transform: none; }
#lock.unlocking .lk-time { transform: scale(1.06); }
.lk-user { display: flex; align-items: center; gap: 10px; margin-top: 7vh; font-weight: 700; }
.lk-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--bg); text-shadow: none; }
.lk-pass {
  min-width: 260px; margin-top: 12px; padding: 10px 18px; border-radius: 99px; text-align: center; letter-spacing: .2em;
  background: color-mix(in srgb, var(--fg) 8%, transparent); border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 24px var(--glow); color: var(--accent);
}

/* ───────────── tooltips + keybinds ───────────── */
#tip {
  position: fixed; left: 0; top: 0; z-index: 99; max-width: 300px; padding: 6px 10px; border-radius: 8px; pointer-events: none;
  font-size: 11.5px; line-height: 1.45; color: var(--fg); text-shadow: none;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 20px var(--glow), 0 8px 24px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(5px) scale(.95); transition: opacity .15s, transform .3s var(--ease);
}
#tip.below { transform: translateY(-5px) scale(.95); }
#tip.on { opacity: 1; transform: none; }
kbd {
  font: inherit; font-size: .92em; padding: 0 5px; border-radius: 4px; color: var(--accent); white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); border-bottom-width: 2px; background: color-mix(in srgb, var(--fg) 8%, transparent);
}
#keys {
  position: fixed; inset: 0; z-index: 71; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0); transition: background .3s;
}
#keys[hidden] { display: none; }
#keys.open { background: rgba(0, 0, 0, .45); }
.k-box {
  width: min(620px, 94vw); max-height: 86vh; overflow: auto; border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 0 0 2px var(--accent), 0 0 60px var(--glow), 0 30px 80px rgba(0, 0, 0, .6);
  transform: scale(.9) translateY(14px); opacity: 0; transition: transform calc(.45s * var(--dur)) var(--ease), opacity .25s;
}
#keys.open .k-box { transform: none; opacity: 1; }
#k-list { padding: 8px 18px; }
.k-row { display: grid; grid-template-columns: minmax(200px, 1fr) 1.3fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed color-mix(in srgb, var(--fg) 8%, transparent); animation: lineIn .35s var(--ease-out) both; animation-delay: calc(var(--i) * 25ms); }

/* ───────────── settings panel ───────────── */
#settings {
  position: fixed; top: 62px; right: calc(var(--gap) + 2px); bottom: calc(var(--gap) + 2px); z-index: 72;
  width: min(340px, calc(100vw - 28px)); display: flex; flex-direction: column;
  border-radius: calc(var(--radius) + 4px); overflow: hidden;
  background: color-mix(in srgb, var(--bg) 74%, transparent); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 0 50px var(--glow), 0 30px 80px rgba(0, 0, 0, .6);
  transform: translateX(calc(100% + 40px)) rotate(2deg); transition: transform calc(.6s * var(--dur)) var(--ease);
}
#settings[hidden] { display: none; }
#settings.open { transform: none; }
.st-head {
  flex: none; position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: box-shadow .25s;
}
.st-head.scrolled { box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7); }
.st-icon {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; font-size: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--bg); text-shadow: none;
}
.st-title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.st-title b { font-size: 14px; color: var(--fg); }
.st-title span { font-size: 11px; color: var(--dim); }
#st-close {
  margin-left: auto; flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%;
  font-size: 15px; color: var(--fg); background: color-mix(in srgb, var(--fg) 10%, transparent);
  transition: background .2s, color .2s, transform .35s var(--ease);
}
#st-close:hover { background: var(--err); color: var(--bg); transform: rotate(90deg); }
.st-body {
  flex: 1; min-height: 0; overflow: auto; padding: 2px 16px 14px; overscroll-behavior: contain;
  mask-image: linear-gradient(transparent, #000 10px, #000 calc(100% - 16px), transparent);
}
.st-sec { margin: 12px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.st-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sw {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; cursor: pointer; font-size: 11px; color: var(--dim);
  border-radius: 10px; border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); background: color-mix(in srgb, var(--fg) 4%, transparent);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s, color .3s;
}
.sw i { width: 100%; height: 16px; border-radius: 6px; background: linear-gradient(135deg, var(--a), var(--b)); }
.sw:hover { transform: translateY(-2px); color: var(--fg); }
.sw.active { border-color: var(--accent); color: var(--fg); box-shadow: 0 0 16px var(--glow); }
.st-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin: 7px 0; align-items: center; }
.st-row input { grid-column: 1 / -1; }
.st-val { color: var(--accent); font-size: 12px; font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 4px 0; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent2)) 0 0 / var(--p, 50%) 100% no-repeat, color-mix(in srgb, var(--fg) 12%, transparent);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--fg);
  box-shadow: 0 0 0 3px var(--accent), 0 0 12px var(--glow); transition: transform .25s var(--ease);
}
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.3); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--fg); border: 3px solid var(--accent); }
.st-tog { display: flex; align-items: center; justify-content: space-between; margin: 7px 0; cursor: pointer; }
.st-tog input { position: absolute; opacity: 0; pointer-events: none; }
.st-tog i { width: 34px; height: 18px; flex: none; border-radius: 99px; position: relative; background: color-mix(in srgb, var(--fg) 15%, transparent); transition: background .3s; }
.st-tog i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--fg); transition: transform .35s var(--ease); }
.st-tog input:checked + i { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.st-tog input:checked + i::after { transform: translateX(16px); }
.st-tog input:focus-visible + i { outline: 2px solid var(--accent2); outline-offset: 2px; }
.st-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.st-btns .pill { height: 30px; color: var(--fg); }
.st-foot { margin-top: 10px; font-size: 11px; }

/* ───────────── notifications (mako) ───────────── */
#notify { position: fixed; top: 64px; right: 16px; z-index: 75; display: flex; flex-direction: column; gap: 10px; width: min(340px, 90vw); pointer-events: none; }
.toast {
  pointer-events: auto; cursor: pointer; position: relative; overflow: hidden; padding: 12px 14px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 30px var(--glow), 0 16px 40px rgba(0, 0, 0, .5);
  animation: toastIn calc(.6s * var(--dur)) var(--ease) both;
}
.toast.out { animation: toastOut .4s ease-in both; }
@keyframes toastIn { from { transform: translateX(120%) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }
.t-head { display: flex; align-items: center; gap: 8px; }
.t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }
.t-time { margin-left: auto; font-size: 11px; }
.t-body { margin-top: 4px; color: var(--dim); font-size: 12px; }
.t-body b { color: var(--fg); }
.t-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left; background: linear-gradient(90deg, var(--accent), var(--accent2)); animation: drain linear both; }
@keyframes drain { to { transform: scaleX(0); } }

/* ───────────── matrix + effects ───────────── */
#holly {
  position: fixed; inset: 0; z-index: 86; display: flex; flex-direction: column; background: #050608; color: var(--fg);
  font-size: 11.5px; opacity: 0; transition: opacity .35s; text-shadow: none;
}
#holly.on { opacity: 1; }
.hy-grid { flex: 1; min-height: 0; display: grid; gap: 1px; background: color-mix(in srgb, var(--accent) 45%, transparent); grid-auto-rows: 1fr; }
.hy-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #050608; }
.hy-pane header { flex: none; padding: 2px 8px; color: var(--bg); background: color-mix(in srgb, var(--accent) 80%, #000); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hy-pane pre { flex: 1; min-height: 0; margin: 0; padding: 4px 8px; overflow: hidden; white-space: pre; line-height: 1.35; }
.hy-bar { flex: none; display: flex; gap: 10px; align-items: center; padding: 3px 8px; background: color-mix(in srgb, var(--accent) 85%, #000); color: var(--bg); font-weight: 700; white-space: nowrap; overflow: hidden; }
.hy-tabs { flex: 1; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.hy-tabs .on { font-weight: 800; }
.hy-r { opacity: .85; }
@media (max-width: 700px) { .hy-r { display: none; } }
#xeyes { position: fixed; right: 24px; bottom: 24px; z-index: 84; display: flex; gap: 8px; cursor: pointer; filter: drop-shadow(0 6px 16px rgba(0,0,0,.5)); animation: popin .5s var(--ease) both; }
#xeyes i { position: relative; display: grid; place-items: center; width: 64px; height: 84px; border-radius: 50%; background: #fff; border: 5px solid #111; }
#xeyes b { width: 22px; height: 22px; border-radius: 50%; background: #111; transition: transform .06s linear; }
#matrix { position: fixed; inset: 0; z-index: 85; pointer-events: none; opacity: 0; transition: opacity .5s; }
#matrix.on { opacity: 1; }
html.party body { animation: hue 2.5s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg) } }
body.shake #screens { animation: shake .12s infinite; }
@keyframes shake { 0% { transform: translate(0) } 25% { transform: translate(-4px, 2px) } 50% { transform: translate(3px, -3px) } 75% { transform: translate(-2px, -1px) } }
body.glitch #screens { filter: contrast(1.6) saturate(2) hue-rotate(-40deg); }
#panic { position: fixed; inset: 0; z-index: 95; background: #000; color: #fff; padding: 24px; font-size: 14px; text-shadow: none; }
#panic pre { white-space: pre-wrap; }
#panic .err { color: #ff3355; }

/* ───────────── responsive ───────────── */
/* the bar sheds its least useful pills as the window narrows so the icons never spill out */
@media (max-width: 1360px) { #net, #mem { display: none; } }
@media (max-width: 1200px) { #cpu, .ck-date { display: none; } }
@media (max-width: 1060px) {
  #workspaces button em { display: none; }
  #workspaces button.active em { display: inline; }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  #bar { margin: 6px 8px 0; }
  #screens { overflow: auto; }
  .screen { position: static; padding: 10px 8px; }
  .screen.active { display: flex; flex-direction: column; animation-name: fadeUp; }
  .screen.leaving { display: none; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } }
  .tile { min-height: 260px; flex: none; }
  .screen.active { min-height: 100%; box-sizing: border-box; }
  .screen > .tile:last-child { flex: 1 0 auto; }   /* last window fills leftover height, no empty gap below */
  .t-term { min-height: 72vh; }
  .t-cava { min-height: 100px; }
  .t-fetch { order: -1; }
  #workspaces button em { display: none; }
  #workspaces button.active em { display: inline; }
  .qnav kbd { display: none; }
  #keys-btn, #wp-next { display: none; }
  #bar { gap: 6px; }
  .bar-left, .bar-right { gap: 4px; }
  #ranger { grid-template-columns: 1fr; align-content: start; }
  #r-list { border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 12px; }
  #r-prev { padding: 0; }
  .hide-sm, #mem, #bar-title { display: none !important; }
  #term-in { font-size: 16px; }
  .rz { display: none; }
  .win-bar { cursor: default; }
  #wall .wm-name { font-size: 30vw; }
}
@media (max-width: 560px) {
  #workspaces button.active em, #clock { display: none !important; }
  #workspaces button { padding: 0 9px; }
}
/* Phones/tablets: iOS Safari flickers when frosted-glass (backdrop-filter) layers
   sit in a scrolling area over content that repaints every frame. Use solid glass
   and stop the endless decorative animations there. */
@media (max-width: 900px), (pointer: coarse) {
  #bar, .win, .toast, #tip, #settings, #keys .k-box, #launcher .l-box {
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  .win { background: color-mix(in srgb, var(--win) max(var(--win-op), 94%), var(--bg)); }
  #bar { background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .win.focus::before, #wall i, .fetch .tux, #crt { animation: none !important; }
  #wall i { filter: blur(60px); }
  .big { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
