/* CozyBar simulator styles — copied from ../styles.css (virtual screen, windows, taskbar, picker, Start, Task Manager). */
:root{--blue:#4f8bff;--ease:cubic-bezier(0.22,1,0.36,1);--sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
/* ---------- Scaled virtual screens ---------- */
.viewport {
  position: relative; width: 100%; aspect-ratio: 960 / 560; overflow: hidden;
  border-radius: 14px; isolation: isolate;
}
.device {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 9px #14161d,
    0 0 0 10px rgba(255, 255, 255, 0.08),
    0 50px 120px -30px rgba(79, 139, 255, 0.35),
    0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.hero-stage .device { max-width: 1100px; margin: 0 auto; }
.screen {
  position: absolute; left: 0; top: 0; width: 960px; height: 560px;
  transform-origin: 0 0; transform: scale(var(--s, 1));
  overflow: hidden; font-size: 12px; color: #fff; cursor: default;
  user-select: none; -webkit-user-select: none; text-align: left;
  visibility: hidden; opacity: 0; transition: opacity 0.35s, visibility 0.35s;
  letter-spacing: -0.005em;
}
.screen.on { visibility: visible; opacity: 1; }
.wall { position: absolute; inset: 0; }
.wall-a { background: radial-gradient(60% 70% at 18% 25%, #3a55e8 0, transparent 60%), radial-gradient(50% 60% at 85% 15%, #b04bd6 0, transparent 60%), radial-gradient(60% 60% at 65% 95%, #f08a5d 0, transparent 60%), #1a1d4d; }
.wall-b { background: radial-gradient(60% 70% at 80% 30%, #1f8ea8 0, transparent 60%), radial-gradient(50% 60% at 10% 80%, #3b3fd4 0, transparent 60%), radial-gradient(50% 50% at 50% 0%, #6b3fb8 0, transparent 60%), #111436; }
.wall-c { background: radial-gradient(60% 70% at 25% 70%, #d9557a 0, transparent 60%), radial-gradient(60% 60% at 80% 20%, #5b47e0 0, transparent 60%), #1b1235; }
.wall-d { background: radial-gradient(60% 70% at 70% 70%, #2e9d7a 0, transparent 60%), radial-gradient(60% 60% at 20% 20%, #3161d8 0, transparent 60%), #0f1a33; }

.menubar {
  position: absolute; top: 0; left: 0; right: 0; height: 24px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  background: rgba(0, 0, 0, 0.22); backdrop-filter: blur(20px);
  font-size: 12px; font-weight: 500;
}
.menubar .l, .menubar .r { display: flex; gap: 16px; align-items: center; }
.menubar .l b { font-weight: 700; }
.menubar svg { width: 14px; height: 14px; }

/* Windows */
.win {
  position: absolute; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column;
  background: #1f2129;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.2), 0 24px 60px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.45s var(--ease), opacity 0.35s, filter 0.35s;
}
.win.dim { filter: brightness(0.82); }
.lights { display: flex; gap: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2); }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.win-bar { height: 30px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: #2a2c34; flex: none; font-weight: 600; font-size: 12px; color: rgba(255,255,255,.8); }
.win-bar .title { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
.win-body { position: relative; flex: 1; }

.cw-tabs { height: 34px; display: flex; align-items: flex-end; gap: 2px; padding: 0 10px; background: #1b1c22; flex: none; }
.cw-tabs .lights { align-self: center; margin-right: 14px; }
.cw-tab {
  height: 27px; width: 150px; border-radius: 8px 8px 0 0; padding: 0 10px;
  display: flex; align-items: center; gap: 7px; font-size: 11px; color: rgba(255, 255, 255, 0.6);
  white-space: nowrap; overflow: hidden;
}
.cw-tab.act { background: #34363f; color: #fff; }
.cw-tab i { width: 12px; height: 12px; border-radius: 3px; flex: none; background: var(--c, #888); }
.cw-tab span { overflow: hidden; text-overflow: ellipsis; }
.cw-tool { height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #34363f; flex: none; }
.cw-tool .nav-dots { display: flex; gap: 12px; color: rgba(255,255,255,.45); font-size: 13px; }
.cw-url { flex: 1; height: 24px; border-radius: 12px; background: #1f2027; display: flex; align-items: center; padding: 0 12px; font-size: 11px; color: rgba(255,255,255,.6); }

/* ---------- Fake pages (thumbnails) ---------- */
.pg { position: absolute; inset: 0; container-type: size; overflow: hidden; background: #fff; color: #222; }
.pg i, .pg b, .pg p { display: block; flex-shrink: 0; }
.pg-top { height: 9cqh; min-height: 6px; display: flex; align-items: center; gap: 3cqw; padding: 0 3cqw; background: #f1f3f6; border-bottom: 1px solid #e3e6eb; }
.pg-top .logo { width: 4cqh; height: 4cqh; border-radius: 50%; background: var(--c, #4f8bff); }
.pg-top .search { flex: 0 0 45%; height: 4.5cqh; border-radius: 99px; background: #e2e5ea; }
.pg-main { display: flex; height: 91cqh; }
.pg-side { width: 22%; padding: 3cqh 2cqw; display: flex; flex-direction: column; gap: 3cqh; background: #f7f8fa; }
.pg-side i { height: 3cqh; border-radius: 99px; background: #d5d9e0; }
.pg-side i:first-child { background: #c9dafc; }
.pg-list { flex: 1; display: flex; flex-direction: column; }
.pg-list p { display: flex; align-items: center; gap: 2.5cqw; padding: 0 3cqw; height: 11cqh; border-bottom: 1px solid #eef0f3; }
.pg-list p b { width: 4cqh; height: 4cqh; border-radius: 50%; background: #cfd5de; flex: none; }
.pg-list p i { height: 2.8cqh; border-radius: 99px; background: #dfe3e9; }
.pg-list p.unread i { background: #9aa3b2; }
.pg-list p.unread b { background: #4f8bff; }

.pg-code { background: #0d1117; }
.pg-code .pg-top { background: #161b22; border-color: #30363d; }
.pg-code .pg-top .search { background: #21262d; }
.pg-code .pg-h { margin: 4cqh 4cqw 2cqh; display: flex; gap: 2cqw; align-items: center; }
.pg-code .pg-h i { height: 5cqh; width: 55%; border-radius: 99px; background: #c9d1d9; }
.pg-code .pg-h b { height: 5cqh; width: 12%; border-radius: 99px; background: #238636; }
.diff { margin: 2cqh 4cqw; border: 1px solid #30363d; border-radius: 1.5cqw; overflow: hidden; }
.diff p { height: 6.5cqh; display: flex; align-items: center; gap: 2cqw; padding: 0 2cqw; }
.diff p.add { background: rgba(46, 160, 67, 0.18); }
.diff p.del { background: rgba(248, 81, 73, 0.18); }
.diff p b { width: 2.5cqw; height: 2.5cqh; border-radius: 2px; background: #484f58; }
.diff p i { height: 2.6cqh; border-radius: 99px; background: #6e7681; }
.diff p.add i { background: #56d364; }
.diff p.del i { background: #f85149; }

.pg-doc { background: #f1f3f4; }
.pg-doc .paper { position: absolute; left: 18%; right: 18%; top: 14cqh; bottom: 0; background: #fff; box-shadow: 0 0 0 1px #e1e3e6; padding: 7cqh 6cqw; display: flex; flex-direction: column; gap: 3cqh; }
.pg-doc .paper b { height: 6cqh; width: 60%; background: #202124; border-radius: 2px; margin-bottom: 2cqh; }
.pg-doc .paper i { height: 2.6cqh; background: #c4c7cc; border-radius: 99px; }
.pg-doc .paper i.gap { margin-top: 2cqh; }
.pg-doc .pg-top { background: #fff; }

.pg-video { background: #0f0f0f; }
.pg-video .pg-top { background: #0f0f0f; border-color: #272727; }
.pg-video .pg-top .logo { border-radius: 1cqh; background: #ff2d2d; width: 6cqh; }
.pg-video .pg-top .search { background: #222; }
.pg-video .player { position: absolute; left: 4cqw; top: 14cqh; width: 64cqw; height: 58cqh; border-radius: 1.5cqw; background: linear-gradient(135deg, #3b2a6b, #c24d6a 60%, #f0a35e); display: grid; place-items: center; }
.pg-video .player::after { content: ""; width: 0; height: 0; border-left: 5cqh solid rgba(255,255,255,.9); border-top: 3.2cqh solid transparent; border-bottom: 3.2cqh solid transparent; }
.pg-video .under { position: absolute; left: 4cqw; top: 76cqh; width: 64cqw; display: flex; flex-direction: column; gap: 3cqh; }
.pg-video .under i { height: 3cqh; border-radius: 99px; background: #3a3a3a; }
.pg-video .under i:first-child { background: #ddd; width: 70%; }
.pg-video .side { position: absolute; right: 3cqw; top: 14cqh; width: 25cqw; display: flex; flex-direction: column; gap: 3cqh; }
.pg-video .side i { height: 13cqh; border-radius: 1cqw; background: #272727; }

.pg-grid { background: #121218; padding: 7% 4% 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3%; align-content: start; }
.pg-grid > i { aspect-ratio: 1; border-radius: 1.5cqw; }

.pg-term { background: #16171d; padding: 4% 4%; display: flex; flex-direction: column; gap: 3%; }
.pg-term i { height: 3cqh; border-radius: 99px; background: #4b5163; }
.pg-term i.g { background: #3fb950; }
.pg-term i.y { background: #d6a64a; }

.pg-dash { background: #f6f7fb; padding: 8% 4% 0; }
.pg-dash .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; }
.pg-dash .kpis i { height: 18cqh; border-radius: 1.5cqw; background: #fff; box-shadow: 0 0 0 1px #e6e8ee; }
.pg-dash svg { margin-top: 4cqh; width: 100%; height: 50cqh; background: #fff; border-radius: 1.5cqw; box-shadow: 0 0 0 1px #e6e8ee; }

.pg-notes { background: #fffdf5; padding: 5% 6%; display: flex; flex-direction: column; gap: 3%; }
.pg-notes b { height: 6cqh; width: 50%; border-radius: 2px; background: #3a3320; margin-bottom: 2cqh; }
.pg-notes i { height: 2.8cqh; border-radius: 99px; background: #d9d2b8; }

/* ---------- App icons ---------- */
.ico {
  position: relative; display: inline-block; width: 26px; height: 26px; border-radius: 23%;
  flex: none; box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.3);
  background-size: cover;
  container-type: size; /* glyph sizes below are in cqw/cqh, so every icon scales as a whole (drawn for 28px) */
}
.ico::before, .ico::after { content: ""; position: absolute; }
.i-chrome { border-radius: 50%; background: conic-gradient(from 60deg, #ea4335 0 120deg, #fbbc04 0 240deg, #34a853 0); box-shadow: none; }
.i-chrome::before { inset: 27%; border-radius: 50%; background: #1a73e8; box-shadow: 0 0 0 8.6cqw #fff; }
.i-finder { background: linear-gradient(90deg, #1e8cf0 50%, #e9f2fb 50%); }
.i-finder::before { left: 28%; top: 30%; width: 10%; height: 18%; border-radius: 7cqw; background: #10233d; box-shadow: 32cqw 0 0 #10233d; }
.i-finder::after { left: 24%; right: 24%; top: 62%; height: 12%; border-bottom: 7cqw solid #10233d; border-radius: 0 0 50% 50%; }
.i-mail { background: linear-gradient(#5fc2ff, #1a6ff0); }
.i-mail::before { left: 20%; right: 20%; top: 30%; bottom: 30%; border-radius: 7cqw; background: #fff; }
.i-mail::after { left: 22%; right: 22%; top: 30%; height: 30%; border-left: 5.4cqw solid #1a6ff0; border-bottom: 5.4cqw solid #1a6ff0; transform-origin: center; transform: translateY(-20%) scaleX(.9) rotate(-45deg) skew(10deg, 10deg); width: 30%; margin: 0 auto; }
.i-notes { background: linear-gradient(#ffd84a 0 30%, #fffdf5 30%); }
.i-notes::before { left: 18%; right: 18%; top: 48%; height: 5.4cqh; background: #ccc; box-shadow: 0 14cqh 0 #ccc, 0 28.6cqh 0 #ccc; }
.i-music { background: linear-gradient(#ff5f7e, #fa233b); }
.i-music::before { content: "♪"; inset: 0; display: grid; place-items: center; color: #fff; font-size: 61cqw; font-weight: 700; }
.i-term { background: #1d1f25; box-shadow: inset 0 0 0 1px #555; }
.i-term::before { content: ">_"; left: 18%; top: 16%; color: #e8e8e8; font: 700 36cqw var(--mono); }
.i-code { background: linear-gradient(#3aa6ff, #1463d4); }
.i-code::before { content: "</>"; inset: 0; display: grid; place-items: center; color: #fff; font: 700 32cqw var(--mono); }
.i-msg { background: linear-gradient(#66f083, #0bc243); }
.i-msg::before { left: 20%; right: 20%; top: 24%; bottom: 30%; border-radius: 50%; background: #fff; }
.i-cal { background: #fff; }
.i-cal::before { content: "TUE"; left: 0; right: 0; top: 8%; text-align: center; font: 700 18cqw var(--sans); color: #fa3b3b; }
.i-cal::after { content: "29"; left: 0; right: 0; top: 24%; text-align: center; font: 500 50cqw var(--sans); color: #222; }
.i-photos { background: #fff; }
.i-photos::before { inset: 18%; border-radius: 50%; background: conic-gradient(#ff9f0a, #ffd60a, #30d158, #64d2ff, #0a84ff, #bf5af2, #ff375f, #ff9f0a); }
.i-settings { background: linear-gradient(#9aa0aa, #5d636d); }
.i-settings::before { inset: 20%; border-radius: 50%; border: 10.7cqw dotted #e8e8e8; }
.i-settings::after { inset: 38%; border-radius: 50%; background: #e8e8e8; }
.i-maps { background: linear-gradient(135deg, #7ed27a 0 45%, #f2e7c9 45% 55%, #7fc3f7 55%); }
.i-folder { background: none; box-shadow: none; }
.i-folder::before { left: 6%; right: 6%; top: 20%; bottom: 14%; border-radius: 10.7cqw; background: linear-gradient(#6cc4ff, #3b9df0); }
.i-folder::after { left: 6%; top: 12%; width: 40%; height: 16%; border-radius: 10.7cqw 10.7cqw 0 0; background: #3b9df0; }
.i-start, .i-search, .i-tm { background: none; box-shadow: none; border-radius: 0; }
.i-start { background: radial-gradient(circle closest-side, #fff 82%, transparent 90%) 0 0 / 33.34% 33.34%; }
.i-search { background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6.6' fill='none' stroke='white' stroke-width='2.4'/%3E%3Cpath d='m15 15 6 6' stroke='white' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-tm { background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.5 12.5h4.2l2.4-5.5 3.6 11 3.3-8.5 1.8 3h5.7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-cozybar { background: linear-gradient(135deg, #3478f6, #5856d6); }
.i-cozybar::before { inset: 16%; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 10.5V3.5l6 5 6-5v7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Crect x='2' y='13' width='14' height='2' rx='1' fill='white'/%3E%3C/svg%3E"); }

/* ---------- Taskbar ---------- */
.tb {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px; z-index: 20;
  display: flex; align-items: center; padding: 0 6px;
  background: rgba(24, 26, 34, 0.74);
  backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}
.tb-apps { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; align-items: center; transition: left .5s var(--ease), transform .5s var(--ease); }
.tb.left .tb-apps { left: 10px; transform: none; }
.tb-btn {
  position: relative; width: 44px; height: 44px; border-radius: 5px; display: grid; place-items: center;
  transition: background 0.15s, transform 0.15s;
}
.tb-btn:hover, .tb-btn.hov { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.tb-btn.act { background: rgba(255, 255, 255, 0.16); }
.tb-btn.press { transform: scale(0.9); }
.tb-btn .ico { width: 29px; height: 29px; pointer-events: none; transition: transform .15s; }
.tb-btn .i-start { width: 22px; height: 22px; }
.tb-btn .i-search { width: 21px; height: 21px; opacity: .94; }
.tb-btn .i-tm { width: 20px; height: 20px; }
.tb-btn.act .ico { transform: scale(.91); }
.tb-btn .pip { position: absolute; bottom: 2px; left: 50%; width: 6px; height: 3px; margin-left: -3px; border-radius: 3px; background: rgba(255,255,255,.72); opacity: 0; transition: width .2s var(--ease), margin .2s var(--ease), background .2s, opacity .2s; }
.tb-btn.run .pip { opacity: 1; }
.tb-btn.act .pip { width: 16px; margin-left: -8px; background: var(--blue); }
.tb-btn.new { animation: popin .45s var(--ease); }
@keyframes popin { from { transform: scale(.4); opacity: 0; } }
.tb-tray { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11px; }

/* ---------- Window preview popover ---------- */
.pop {
  position: absolute; bottom: 56px; z-index: 30; padding: 10px;
  border-radius: 10px;
  background: rgba(34, 36, 45, 0.82);
  backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,.22), 0 20px 50px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(10px) scale(0.97); pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
}
.pop.show { opacity: 1; transform: none; pointer-events: auto; }
.pop-cards { display: flex; gap: 8px; position: relative; }
.card {
  --tw: 210px; --th: 122px;
  position: relative; padding: 7px; border-radius: 7px; width: calc(var(--tw) + 14px);
  background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: background .15s, box-shadow .15s, left .28s var(--ease), transform .2s var(--ease);
  cursor: pointer;
}
.card:hover, .card.hov { background: rgba(255,255,255,.11); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.card.vis { box-shadow: inset 0 0 0 1.5px rgba(79,139,255,.7); }
.card-thumb { position: relative; width: var(--tw); height: var(--th); border-radius: 5px; overflow: hidden; background: rgba(0,0,0,.36); }
.card-thumb .pg { pointer-events: none; }
.card-title { margin-top: 8px; height: 15px; padding-right: 22px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s; }
.card-title .ttl { display: inline; }
.card-x {
  position: absolute; top: 7px; right: 7px; width: 32px; height: 32px; border-radius: 7px;
  display: grid; place-items: center; background: rgba(0,0,0,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  opacity: 0; transition: opacity .15s, background .15s;
}
.card-x svg { width: 13px; height: 13px; }
.card:hover .card-x, .card.hov .card-x { opacity: 1; }
.card-x:hover { background: rgba(232, 17, 35, .9); }
.card-pen {
  position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 5px;
  display: grid; place-items: center; color: rgba(255,255,255,.6); transition: background .12s, color .12s;
}
.card-pen svg { width: 12px; height: 12px; }
.card-pen:hover, .card-pen.hov { background: rgba(255,255,255,.16); color: #fff; }
.card-edit { position: absolute; left: 7px; right: 7px; bottom: 4px; display: none; align-items: center; gap: 4px; }
.card.editing .card-edit { display: flex; }
.card.editing .card-title, .card.editing .card-pen { opacity: 0; }
.field {
  flex: 1; height: 22px; border-radius: 4px; padding: 0 5px; background: rgba(0,0,0,.35);
  box-shadow: 0 0 0 2px rgba(79,139,255,.8); display: flex; align-items: center; font-size: 12px; white-space: nowrap; overflow: hidden;
}
.field .txt.sel { background: rgba(79,139,255,.55); }
.caret { width: 1px; height: 13px; background: #fff; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mini { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; color: rgba(255,255,255,.8); }
.mini svg { width: 11px; height: 11px; }
.mini.hov { background: rgba(255,255,255,.16); color: #fff; }
.card.drag .card-x { opacity: 0 !important; }
.card.drag { z-index: 5; transform: scale(1.04) rotate(-1deg); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 18px 40px rgba(0,0,0,.5); background: rgba(60,64,80,.95); }
.card .card-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; }

.tip {
  position: absolute; z-index: 40; padding: 4px 8px; border-radius: 5px; font-size: 11px;
  background: rgba(40,42,52,.95); box-shadow: 0 0 0 .5px rgba(255,255,255,.2), 0 6px 16px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .2s var(--ease); white-space: nowrap; pointer-events: none;
}
.tip.show { opacity: 1; transform: none; }


/* Cursor */
.cursor {
  position: absolute; left: 0; top: 0; z-index: 100; width: 22px; height: 22px; pointer-events: none;
  transform: translate(700px, 300px); filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.cursor svg { width: 100%; height: 100%; transition: transform .12s; transform-origin: 3px 2px; }
.cursor.down svg { transform: scale(.82); }
.cursor::after {
  content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9); opacity: 0; transform: scale(.3);
}
.cursor.down::after { animation: ripple .45s ease-out; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.4); } }

/* Task Manager: see the end of this file */

.ctx {
  position: absolute; z-index: 60; width: 190px; padding: 5px; border-radius: 8px;
  background: rgba(40, 42, 52, .92); backdrop-filter: blur(30px);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.22), 0 16px 40px rgba(0,0,0,.5);
  font-size: 12px; opacity: 0; transform: scale(.96); transform-origin: 0 0; transition: opacity .12s, transform .15s var(--ease); pointer-events: none;
}
.ctx.show { opacity: 1; transform: none; }
.ctx div { height: 24px; padding: 0 10px; display: flex; align-items: center; border-radius: 4px; }
.ctx div.hov { background: #3d6ff0; }
.ctx hr { border: 0; height: 1px; background: rgba(255,255,255,.1); margin: 4px 6px; }

.sheet-dim { position: absolute; inset: 0; z-index: 55; background: rgba(0,0,0,.25); opacity: 0; transition: opacity .2s; pointer-events: none; }
.sheet-dim.show { opacity: 1; }
.alert {
  position: absolute; z-index: 56; left: 50%; top: 150px; width: 270px; margin-left: -135px; padding: 18px 16px 14px;
  border-radius: 12px; text-align: center; background: rgba(46, 48, 58, .96);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.2), 0 30px 60px rgba(0,0,0,.6);
  opacity: 0; transform: scale(1.06); transition: opacity .2s, transform .25s var(--ease); pointer-events: none;
}
.alert.show { opacity: 1; transform: none; }
.alert .ico { width: 44px; height: 44px; margin-bottom: 8px; }
.alert b { display: block; font-size: 13px; line-height: 1.35; }
.alert p { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 6px; line-height: 1.4; }
.alert .btns { display: flex; gap: 8px; margin-top: 14px; }
.alert .btns span { flex: 1; height: 26px; border-radius: 6px; display: grid; place-items: center; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 500; transition: filter .15s; }
.alert .btns span.primary { background: #3d6ff0; }
.alert .btns span.danger { color: #ff6961; } /* a destructive button: red text */
.alert .btns span.hov { filter: brightness(1.2); }

/* ---------- Start menu ---------- */
.start {
  position: absolute; z-index: 30; left: 50%; bottom: 56px; width: 560px; margin-left: -280px; min-height: 300px;
  border-radius: 10px; padding: 22px 26px 24px; display: flex; flex-direction: column;
  background: rgba(34, 36, 46, .86);
  backdrop-filter: blur(50px) saturate(160%); -webkit-backdrop-filter: blur(50px) saturate(160%);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.22), 0 30px 60px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(30px); transition: opacity .2s, transform .35s var(--ease); pointer-events: none; transform-origin: 0 100%;
}
.start.show { opacity: 1; transform: none; pointer-events: auto; }
.st-search { height: 34px; border-radius: 17px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: rgba(0,0,0,.28); box-shadow: inset 0 -2px 0 var(--blue); font-size: 12px; }
.st-search .ico { width: 16px; height: 16px; }
.st-search .txt:empty::before { content: "Search for apps"; color: rgba(255,255,255,.45); }
.st-search .caret { display: none; }
.st-search.focus .caret { display: block; }
.st-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 10px 10px; font-weight: 600; font-size: 13px; }
.st-head span { font-weight: 500; font-size: 11px; padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,.08); }
.st-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.st-app { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 0 8px; border-radius: 6px; font-size: 11px; color: rgba(255,255,255,.9); }
.st-app .ico { width: 32px; height: 32px; }
.st-app.hov { background: rgba(255,255,255,.08); }
.st-favs { display: flex; gap: 8px; margin: 0 6px; }
.st-fav { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; background: rgba(255,255,255,.05); font-size: 11.5px; }
.st-fav .ico { width: 18px; height: 18px; }
.st-home, .st-results { transition: opacity .2s; }
.st-results { display: none; margin-top: 18px; }
.start.searching .st-home { display: none; }
.start.searching .st-results { display: block; }
.st-results small { display: block; margin: 0 10px 8px; font-weight: 600; font-size: 12px; }
.st-res { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.st-res .ico { width: 28px; height: 28px; }
.st-res em { font-family: var(--sans); font-style: normal; font-size: 11px; color: rgba(255,255,255,.5); display: block; }
.st-res.best { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.st-res.hov { background: rgba(255,255,255,.14); }

.term { left: 200px; top: 80px; width: 560px; height: 320px; background: #16171d; transform-origin: 50% 100%; }
.term.closed { opacity: 0; transform: scale(.85) translateY(60px); }
.term .win-bar { background: #26272e; }
.term-body { padding: 12px 14px; font: 12px/1.7 var(--mono); color: #d9dbe2; }
.term-body .p { color: #7ee787; }
.term-body .caret { display: inline-block; vertical-align: -2px; width: 7px; height: 14px; }


/* ---------- Window picker header (matches CozyBar's WindowPickerView) ---------- */
.pop.picker { padding: 14px; background: rgba(20, 23, 31, 0.86); }
.pk-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 13px; }
.pk-head .ico { width: 22px; height: 22px; }
.pk-head b { font-weight: 600; }
.pk-new { margin-left: auto; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: rgba(255,255,255,.8); font-size: 16px; font-weight: 600; line-height: 1; cursor: pointer; transition: background .12s, color .12s; }
.pk-new:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Interactive hero simulator ---------- */
.desk { position: absolute; inset: 0; z-index: 1; }
.win.min { transform: translate(var(--tx, 0), var(--ty, 300px)) scale(0.06); opacity: 0; pointer-events: none; }
.win.hid, .win.closing { opacity: 0; transform: scale(0.96); pointer-events: none; }
.win.zooming { transition: left .3s var(--ease), top .3s var(--ease), width .3s var(--ease), height .3s var(--ease), transform .45s var(--ease), opacity .35s; }
.lights i { cursor: pointer; position: relative; }
.lights:hover i::after { position: absolute; inset: 0; display: grid; place-items: center; font: 700 8px/1 var(--sans); color: rgba(0,0,0,.55); }
.lights:hover i:nth-child(1)::after { content: "×"; font-size: 10px; }
.lights:hover i:nth-child(2)::after { content: "–"; }
.lights:hover i:nth-child(3)::after { content: "+"; }
.desk .cw-tab { flex: 0 1 150px; min-width: 40px; cursor: default; }
.desk .cw-tab b { margin-left: auto; width: 15px; height: 15px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 400; font-size: 12px; line-height: 1; color: rgba(255,255,255,.5); cursor: pointer; }
.desk .cw-tab b:hover { background: rgba(255,255,255,.15); color: #fff; }
.desk .cw-tab:not(.act):hover { background: rgba(255,255,255,.06); }
.cw-new { align-self: center; margin-left: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,.6); font-size: 16px; cursor: pointer; }
.cw-new:hover { background: rgba(255,255,255,.1); color: #fff; }

.pop.picker .card { flex: none; touch-action: pan-y; }
.pop-cards.scroll { overflow-x: auto; overflow-y: hidden; max-width: 712px; }
.pop-cards { scrollbar-width: none; }
.pop-cards::-webkit-scrollbar { display: none; }
/* The scroller strip under the cards: 5pt gap, a 7pt knob, 2pt below; reserved even when nothing scrolls */
.pk-track { position: relative; height: 14px; }
.pk-knob { position: absolute; top: 5px; height: 7px; border-radius: 3.5px; background: rgba(255,255,255,.3); }
.pk-knob[hidden] { display: none; }
.card.shift { transition: transform .2s var(--ease), background .15s, box-shadow .15s; }
.card.dragging { z-index: 5; transition: none; background: rgba(60,64,80,.95); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 18px 40px rgba(0,0,0,.5); }
/* Only the active window keeps the accent border, dragged or not */
.card.vis.drag, .card.vis.dragging { box-shadow: inset 0 0 0 1.5px rgba(79,139,255,.7), 0 18px 40px rgba(0,0,0,.5); }
.card.dragging .card-x, .card.dragging .card-pen { opacity: 0; }
.card .ph { flex-direction: column; gap: 9px; }
.card .ph .ico { width: 48px; height: 48px; }
.card .ph small { font-size: 10px; color: rgba(255,255,255,.55); }
.card-title.dim .ttl { color: rgba(255,255,255,.4); }
.card-title { display: flex; align-items: center; gap: 6px; }
.card-title .ttl { overflow: hidden; text-overflow: ellipsis; }
.minico { width: 12px; height: 12px; flex: none; margin: 0 6px 0 auto; color: rgba(255,255,255,.55); } /* right-aligned, beside the pencil */
.card-x, .card-pen, .mini { cursor: pointer; }
.mini:hover { background: rgba(255,255,255,.16); color: #fff; }
.field-in { flex: 1; min-width: 0; height: 22px; border: 0; outline: 0; border-radius: 4px; padding: 0 5px; background: rgba(0,0,0,.35); box-shadow: 0 0 0 2px rgba(79,139,255,.8); color: #fff; font: 12px var(--sans); }

.sim-menu { width: auto; min-width: 0; max-width: 290px; pointer-events: auto; } /* sized to its items, like NSMenu */
.sim-menu div { gap: 6px; white-space: nowrap; cursor: default; }
.sim-menu div:hover:not(.dis) { background: #3d6ff0; }
.sim-menu .lbl { overflow: hidden; text-overflow: ellipsis; }
.sim-menu .mk { width: 12px; height: 12px; flex: none; display: grid; place-items: center; }
.sim-menu .mk svg { width: 11px; height: 11px; }
.sim-menu em { margin-left: auto; padding-left: 16px; font-style: normal; opacity: .6; }
.sim-menu .dis { opacity: .4; }
.sim-menu .red { color: #ff8080; }
.sim-menu .red:hover { color: #fff; }

.alert.show, .sheet-dim.show { pointer-events: auto; }
.sheet-dim.clear { background: none; }
.alert .btns span { cursor: pointer; }
.alert .btns span:hover { filter: brightness(1.2); }

.tb { transition: transform .4s var(--ease); }
.tb-btn { touch-action: pan-y; }
.tb-btn.shift { transition: transform .2s var(--ease), background .15s; }
.tb-btn.dragging { z-index: 5; transition: none; background: rgba(255,255,255,.12); }

.start input, .spot input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: 12px var(--sans); }
.start input::placeholder, .spot input::placeholder { color: rgba(255,255,255,.45); }
.st-app, .st-fav, .st-res { cursor: default; transition: background .12s; }
.st-app:hover { background: rgba(255,255,255,.08); }
.st-fav:hover { background: rgba(255,255,255,.1); }
.st-res:hover { background: rgba(255,255,255,.14); }
.st-head span { cursor: pointer; }
.st-head span:hover { background: rgba(255,255,255,.14); }
.st-note { font-family: var(--sans); font-style: normal; font-weight: 500; font-size: 11px; color: rgba(255,255,255,.5); }
.st-results { overflow-y: auto; max-height: 300px; }
.st-results .st-head { margin-top: 0; }
.st-empty { margin: 30px 10px; text-align: center; font-weight: 600; }
.st-empty span { display: block; font-weight: 400; font-size: 11px; color: rgba(255,255,255,.5); margin-top: 4px; }

.spot { position: absolute; z-index: 70; left: 50%; top: 230px; width: 520px; margin-left: -260px; border-radius: 14px; overflow: hidden; background: rgba(36,38,48,.9); backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%); box-shadow: 0 0 0 .5px rgba(255,255,255,.22), 0 30px 60px rgba(0,0,0,.55); display: none; }
.spot.show { display: block; animation: popin .2s var(--ease); }
.spot-bar { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; }
.spot-bar .ico { width: 20px; height: 20px; }
.spot .spot-bar input { font-size: 20px; font-weight: 300; }
.spot-res { padding: 0 8px; }
.spot-res:not(:empty) { padding: 6px 8px 8px; border-top: 1px solid rgba(255,255,255,.08); }



.pg-newtab { background: #202124; display: flex; flex-direction: column; align-items: center; padding-top: 16%; gap: 6%; }
.pg-newtab b { width: 13cqw; height: 13cqw; border-radius: 50%; background: radial-gradient(circle, #1a73e8 0 27%, #fff 28% 37%, transparent 38%), conic-gradient(from 60deg, #ea4335 0 120deg, #fbbc04 0 240deg, #34a853 0); }
.pg-newtab > i { width: 52%; height: 8cqh; border-radius: 99px; background: #303134; }
.pg-newtab p { display: flex; gap: 4cqw; }
.pg-newtab p i { width: 8cqw; height: 8cqw; border-radius: 50%; background: #303134; }

/* Task Manager's taskbar item (SF Symbol waveform.path.ecg.rectangle.fill) */
.i-tmapp { background: linear-gradient(#ffffff, #e9ebf0); }
.i-tmapp::before { inset: 0; background: no-repeat center / 66% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 12.5h4l2.4-5.5 3.6 11 3.3-8.5 1.8 3H22' fill='none' stroke='%23181a22' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ctx div.hov { background: #3d6ff0; }



/* =====================================================
   Matching the current CozyBar app (October 2026)
   ===================================================== */

/* Taskbar: HUD material + 16% black, 1pt top hairline */
.tb { background: rgba(28, 30, 38, 0.72); }
.tb-btn { color: rgba(255,255,255,.94); }
/* App icons have a 34pt frame, but a macOS icon's artwork fills only about 82% of it, which leaves the gap above the running dot */
.tb-btn .ico { width: 28px; height: 28px; }
.tb-btn .house { width: 28px; height: 28px; transition: transform .2s var(--ease); }
.tb-btn .loupe { width: 23px; height: 23px; }
.tb-btn.act .house { transform: scale(.91); }
.tb-btn .i-tmapp { width: 28px; height: 28px; }

/* Popovers point at their button, like NSPopover */
.pop, .start { --ax: 50%; }
.pop::after, .start::after {
  content: ""; position: absolute; left: var(--ax); bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
  background: inherit; transform: rotate(45deg); border-radius: 0 0 3px 0;
  box-shadow: .5px .5px 0 rgba(255,255,255,.18);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.pop.picker { background: rgba(22, 24, 31, 0.9); }

/* Window picker cards (WindowPickerView): 36pt close button */
.card-x { width: 36px; height: 36px; top: 7px; right: 7px; border-radius: 7.5px; }
.card-x svg { width: 15px; height: 15px; }
.card-x:hover { background: rgba(229, 57, 53, .88); transform: scale(1.08); }
.card.dragging .card-x { opacity: 0; }

/* Tooltip (TaskbarTooltipController) */
.tip { padding: 7px 10px; font-size: 12px; font-weight: 500; background: rgba(26, 28, 36, .97); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 6px 16px rgba(0,0,0,.4); }

/* Start menu (StartMenuView): 680×700, all apps left, pinned / recent / favourites right */
.start {
  left: 0; margin-left: 0; width: 680px; height: 700px; min-height: 0; padding: 0;
  display: flex; flex-direction: row; overflow: visible;
  background: rgba(24, 26, 34, .9);
}
.st-list { width: 320px; flex: none; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid rgba(255,255,255,.08); }
.st-search {
  margin: 20px 20px 12px; height: 30px; border-radius: 15px; padding: 0 12px; gap: 8px;
  background: rgba(255,255,255,.08); box-shadow: none; font-size: 14px; color: rgba(255,255,255,.55); cursor: text;
}
.st-search.focus, .st-search:focus-within { box-shadow: 0 0 0 2.5px rgba(79,139,255,.55); }
.st-search .loupe { width: 15px; height: 15px; flex: none; }
.start .st-in { font-size: 14px; }
.st-clear { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.45); color: #1c1e25; font-size: 13px; line-height: 1; cursor: pointer; }
.st-clear[hidden] { display: none; }
.st-apps { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.st-letter { padding: 10px 12px 4px; font-size: 14px; font-weight: 600; }
.st-row { display: flex; align-items: center; gap: 14px; padding: 6px 10px; border-radius: 8px; font-size: 14.5px; font-weight: 500; cursor: default; transition: background .12s; }
.st-row .ico { width: 34px; height: 34px; }
.st-row.sm .ico { width: 30px; height: 30px; }
.st-row:hover, .st-row.hov { background: rgba(255,255,255,.09); }
.st-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 120px 20px 0; text-align: center; color: rgba(255,255,255,.55); font-size: 12px; }
.st-empty .loupe { width: 34px; height: 34px; margin-bottom: 6px; }
.st-empty b { color: #fff; font-size: 17px; font-weight: 700; }
.st-side { flex: 1; min-width: 0; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.st-side h6 { font-size: 19px; font-weight: 700; text-align: center; letter-spacing: -0.01em; }
.st-pins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.st-pin { aspect-ratio: 1; max-width: 72px; width: 100%; justify-self: center; padding: 4px; border-radius: 14px; display: grid; place-items: center; transition: background .12s; }
.st-pin .ico { width: 100%; height: 100%; }
.st-pin:hover, .st-pin.hov { background: rgba(255,255,255,.09); }
.st-recent-wrap { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.st-recent-wrap[hidden] { display: none; }
.st-recent { display: flex; flex-direction: column; gap: 2px; }
.st-fav-head { text-align: center; }
.st-fav-head small { display: block; margin-top: 2px; font-size: 11px; color: rgba(255,255,255,.55); }
.st-favs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 0; }
.st-fav { gap: 8px; padding: 6px; background: none; border-radius: 8px; font-size: 14px; font-weight: 500; }
.st-fav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fav .ico { width: 26px; height: 26px; }
.start.compact .st-list { width: 50%; }
.start.compact .st-search { margin: 16px 12px 10px; }
.start.compact .st-apps { padding: 0 10px 12px; }
.start.compact .st-side { padding: 16px 12px; }
.start.compact .st-favs { grid-template-columns: 1fr; }

/* CozyBar's own app icon: dusk purple-to-amber tile with a cream slab */
.i-cozybar { background: url("../assets/cozybar-icon.svg") center / cover no-repeat; box-shadow: none; }
.i-cozybar::before { content: none; }

/* Tour cursor sits above everything */
.cursor { z-index: 120; }
.cursor[hidden] { display: none; }
/* The visitor's real pointer hides while the tour plays, until they move the mouse */
.no-pointer, .no-pointer * { cursor: none !important; }

/* Narrow screens: the picker fits the screen and its cards scroll sideways */
.pop.picker { max-width: calc(100% - 16px); }
.screen.narrow .pop-cards { overflow-x: auto; overflow-y: hidden; }

/* Scrolling inside the demo's lists stays in the demo instead of carrying on into the page */
.st-apps, .st-side, .st-results, .tm-rows, .pop-cards { overscroll-behavior: contain; }

/* ---------- Task Manager (TaskManagerView: 1060×720pt on CozyPalette.window, #1E2026) ---------- */
.win.tm { background: #1e2026; }
.tm .win-bar { height: 28px; background: #1e2026; }
.tm .win-bar .title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); }
.tmv { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; container-type: inline-size; font-size: 12px; color: rgba(255,255,255,.9); }
.tmv [role="button"] { cursor: default; }

.tm-head { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 24px; }
.tm-head h4 { font-size: 23px; line-height: 28px; font-weight: 600; }
.tm-head p { font-size: 12px; color: rgba(255,255,255,.55); }

.tm-metrics { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0 24px 22px; }
.metric {
  min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--c) 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
  transition: background .12s ease-out;
}
.metric:hover, .metric.hov { background: color-mix(in srgb, var(--c) 12%, transparent); }
.m-lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 15px; font-weight: 500; color: var(--c); }
.m-lbl svg { width: 14px; height: 14px; flex: none; }
.metric b { font: 600 24px/29px ui-rounded, "SF Pro Rounded", var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric small { font-size: 10px; line-height: 12px; color: rgba(255,255,255,.55); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.metric .spark { display: block; width: 100%; height: 48px; overflow: visible; }

.tm-procs { flex: none; display: flex; align-items: center; gap: 12px; padding: 0 24px 12px; }
.tm-procs h5 { font-size: 16px; font-weight: 600; }
.tm-count { margin-right: auto; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.tm-search { width: 220px; display: flex; align-items: center; gap: 7px; padding: 8px; border-radius: 7px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.55); cursor: text; }
.tm-search > svg { width: 13px; height: 13px; flex: none; }
.tm-in { flex: 1; min-width: 0; padding: 0; background: none; border: 0; outline: 0; color: #fff; font: 13px/16px var(--sans); }
.tm-in::placeholder { color: rgba(255,255,255,.3); }
.tm-clear { width: 13px; height: 13px; flex: none; display: grid; color: rgba(255,255,255,.5); }
.tm-clear[hidden] { display: none; }

.tm-rows { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.tm-body { display: flex; flex-direction: column; gap: 2px; }
.tm-row { display: grid; grid-template-columns: minmax(0, 1fr) 65px 110px 95px 110px; gap: 12px; align-items: center; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tm-row.th { position: sticky; top: 0; z-index: 1; margin-bottom: 2px; padding: 10px 12px; border-radius: 0; font-size: 11px; font-weight: 600; background: linear-gradient(rgba(255,255,255,.035), rgba(255,255,255,.035)), #1e2026; }
.tm-row.th span { display: flex; align-items: center; gap: 5px; }
.tm-row.th i { display: flex; }
.tm-row.th svg { width: 8px; height: 8px; }
.tm-row .nm { min-width: 0; display: flex; align-items: center; gap: 9px; font-weight: 500; }
.tm-row .nm > span:last-child, .tm-row .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-row .nm .ico { width: 22px; height: 22px; margin: 2px 1px; }
.tm-row .dim { color: rgba(255,255,255,.55); }
.tm-body .tm-row:hover, .tm-body .tm-row.hov { background: rgba(255,255,255,.04); }
.tm-body .tm-row.sel { background: rgba(82,168,255,.16); }
.i-exec { background: #232428; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.28); border-radius: 3px; }
.i-exec::before { content: "exec"; inset: auto 0 22% 0; text-align: center; font: 600 6px/1 var(--mono); color: #4ade80; }
.i-gear { background: none; box-shadow: none; color: rgba(255,255,255,.55); }
.i-gear svg { display: block; width: 100%; height: 100%; }
.tm-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: rgba(255,255,255,.55); pointer-events: none; }
.tm-empty[hidden] { display: none; }
.tm-empty svg { width: 34px; height: 34px; margin-bottom: 6px; }
.tm-empty b { font-size: 18px; font-weight: 700; color: rgba(255,255,255,.9); }
.tm-empty span { font-size: 13px; }

.tm-foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid rgba(255,255,255,.1); }
.tm-foot[hidden] { display: none; }
.tf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tf-info b { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-info small { font-size: 10px; color: rgba(255,255,255,.55); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; user-select: text; -webkit-user-select: text; }
.mbtn { flex: none; height: 22px; padding: 0 10px; border-radius: 5px; font-size: 13px; line-height: 22px; white-space: nowrap; color: #fff; background: rgba(255,255,255,.17); box-shadow: inset 0 .5px 0 rgba(255,255,255,.15), 0 .5px 1px rgba(0,0,0,.3); }
.mbtn:active { filter: brightness(1.2); }
.mbtn.pri { background: #52a8ff; }
.mbtn.tint { color: #6aadff; background: rgba(82,168,255,.12); box-shadow: inset 0 .5px 0 rgba(255,255,255,.06), 0 .5px 1px rgba(0,0,0,.3); }
.mbtn.off { opacity: .4; pointer-events: none; }

/* Expanded graph (MetricDetailView), over a dimmed window */
.tm-dim { position: absolute; inset: 0; z-index: 5; background: rgba(0,0,0,.32); animation: tm-fade .18s ease-in-out; }
.tm-sheet {
  position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(830px, calc(100% - 32px)); max-height: calc(100% - 24px); display: flex; flex-direction: column; gap: 24px; padding: 28px; border-radius: 16px;
  background: rgba(40,42,50,.94); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.12), 0 8px 36px rgba(0,0,0,.2); animation: tm-sheet .18s ease-in-out;
}
.tm-dim[hidden], .tm-sheet[hidden] { display: none; }
@keyframes tm-fade { from { opacity: 0; } }
@keyframes tm-sheet { from { opacity: 0; transform: translate(-50%, -50%) scale(.98); } }
.ts-head { display: flex; align-items: center; }
.ts-title { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 600; color: var(--c); }
.ts-title svg { width: 22px; height: 22px; }
.ts-x { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; color: rgba(255,255,255,.75); }
.ts-x svg { width: 13px; height: 13px; }
.ts-val { display: flex; align-items: baseline; gap: 16px; }
.ts-val b { font: 600 34px/1 ui-rounded, "SF Pro Rounded", var(--sans); font-variant-numeric: tabular-nums; }
.ts-val time { font-size: 14px; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.ts-val span { margin-left: auto; font-size: 13px; color: rgba(255,255,255,.55); }
.ts-body { flex: 0 1 280px; min-height: 120px; display: flex; gap: 24px; }
.ts-chart { flex: 1; min-width: 0; height: 100%; }
.ts-chart svg { display: block; width: 100%; height: 100%; overflow: visible; font: 10px var(--sans); }
.ts-chart text { fill: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.ts-chart .gl { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.ts-chart .rule { stroke: rgba(255,255,255,.3); stroke-dasharray: 4 4; }
.ts-top { width: 260px; flex: none; height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.04); overflow: hidden; }
.tt-h { font-size: 13px; font-weight: 600; }
.tt-empty { font-size: 11px; line-height: 1.35; color: rgba(255,255,255,.55); }
.tt-row { min-height: 34px; display: flex; align-items: center; gap: 9px; }
.tt-row .ico { width: 26px; height: 26px; }
.tt-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tt-n span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-row.first .tt-n span { font-weight: 600; }
.tt-n small { font-size: 10px; color: rgba(255,255,255,.55); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-row em { margin-left: 6px; font-style: normal; font-size: 12px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.55); }
.tt-row.first em { color: var(--c); }
.ts-hint { font-size: 12px; color: rgba(255,255,255,.55); }

/* The real window stops at 860pt wide; the pretend one can be narrower on phones */
@container (max-width: 640px) {
  .tm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-row { grid-template-columns: minmax(0, 1fr) 64px 72px; }
  .tm-row > :nth-child(2), .tm-row > :nth-child(3) { display: none; }
  .tm-search { width: 150px; }
  .ts-top { display: none; }
}

/* Resize edges and corners (Task Manager's window is resizable) */
.rs { position: absolute; z-index: 8; }
.rs-n, .rs-s { left: 8px; right: 8px; height: 5px; cursor: ns-resize; }
.rs-e, .rs-w { top: 8px; bottom: 8px; width: 5px; cursor: ew-resize; }
.rs-n { top: 0; } .rs-s { bottom: 0; } .rs-e { right: 0; } .rs-w { left: 0; }
.rs-ne, .rs-nw, .rs-se, .rs-sw { width: 10px; height: 10px; }
.rs-ne { top: 0; right: 0; cursor: nesw-resize; } .rs-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.rs-nw { top: 0; left: 0; cursor: nwse-resize; } .rs-se { bottom: 0; right: 0; cursor: nwse-resize; }

/* Full screen: the window covers the screen, the menu bar and CozyBar slide away, other windows are on another Space */
.menubar { transition: transform .35s var(--ease); }
.screen.fs .menubar { transform: translateY(-100%); }
.screen.fs .tb { transform: translateY(110%); }
.screen.fs .win:not(.fsw) { opacity: 0; pointer-events: none; }
.win.fsw { border-radius: 0; }
.fs-note {
  position: absolute; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 20px; border-radius: 14px; text-align: center;
  background: rgba(30, 32, 42, .88); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.2), 0 16px 40px rgba(0,0,0,.45);
  transition: opacity .3s, transform .4s var(--ease);
}
.fs-note.show { opacity: 1; transform: translate(-50%, 0); }
.fs-note b { font-size: 13px; font-weight: 600; }
.fs-note span { font-size: 11px; color: rgba(255,255,255,.6); }

/* The Code app: an editor with real Swift, distinct from the pull request page in Chrome */
.pg-ed { display: grid; grid-template-columns: 5% 19% minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 5.5%; /* % here: cq units on the container itself measure its parent */ background: #1e1e1e; color: #d4d4d4; font-family: var(--mono); }
.ed-act { grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 4cqh; padding-top: 3cqh; background: #333; }
.ed-act i { width: 2.6cqw; height: 2.6cqw; border-radius: 0.5cqw; border: 1px solid #858585; }
.ed-act i.on { border-color: #fff; }
.ed-side { min-height: 0; display: flex; flex-direction: column; gap: 1.2cqh; padding: 3cqh 0; background: #252526; overflow: hidden; }
.ed-side b { width: 45%; height: 2cqh; margin: 0 0 1.5cqh 8%; border-radius: 99px; background: #6b6b6b; }
.ed-side p { height: 4cqh; display: flex; align-items: center; padding: 0 8%; }
.ed-side p i { height: 2.2cqh; border-radius: 99px; background: #5a5a5f; }
.ed-side p.on { background: #37373d; }
.ed-side p.on i { background: #c8c8c8; }
.ed-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ed-tabs { display: flex; height: 7.5cqh; flex: none; background: #252526; }
.ed-tabs span { display: flex; align-items: center; width: 17cqw; padding: 0 2.5cqw; border-right: 1px solid #1e1e1e; }
.ed-tabs i { width: 100%; height: 2.2cqh; border-radius: 99px; background: #5a5a5f; }
.ed-tabs span.on { background: #1e1e1e; box-shadow: inset 0 1px 0 #007acc; }
.ed-tabs span.on i { background: #c8c8c8; }
.ed-code { padding-top: 1.5cqh; overflow: hidden; }
.pg-ed .ed-code p { height: 4.1cqh; display: flex; align-items: center; }
.ed-code em { width: 5cqw; flex: none; display: flex; justify-content: flex-end; padding-right: 2.2cqw; }
.ed-code em::before { content: ""; width: 1.4cqw; height: 1.8cqh; border-radius: 99px; background: #4b4f56; }
.ed-code p > span { display: flex; gap: 1.1cqw; }
.ed-code p i { height: 2.2cqh; border-radius: 99px; }
.ed-code p:nth-child(12) { background: rgba(255,255,255,.05); }
.ed-code p:nth-child(12) em::before { background: #9a9a9a; }
.ed-code .k { background: #c586c0; } .ed-code .t { background: #4ec9b0; } .ed-code .f { background: #dcdcaa; } .ed-code .v { background: #9cdcfe; } .ed-code .p { background: #808080; }
.ed-status { grid-column: 1 / -1; display: flex; align-items: center; gap: 3cqw; padding: 0 2cqw; background: #007acc; }
.ed-status i { width: 7cqw; height: 1.8cqh; border-radius: 99px; background: rgba(255,255,255,.65); }
.ed-status i:last-child { margin-left: auto; width: 5cqw; }

/* Closed popups are hidden outright, not just transparent. Chrome still draws a transparent element's backdrop blur,
   and these sit over the taskbar's own blur when closed, which made it flicker black during the tour. The
   visibility switch waits for the fade-out to finish. */
.pop { visibility: hidden; } /* timing below */
.pop.show { visibility: visible; }
.start { visibility: hidden; } /* timing below */
.start.show { visibility: visible; }
.fs-note { visibility: hidden; transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s; }
.fs-note.show { visibility: visible; transition-delay: 0s; }

/* The window previews open and close like CozyBar's NSPopover, with curves measured frame by frame from a screen
   recording of the real thing. Opening: grows out of the arrow over the taskbar button, reaching full size in
   ~0.16s, overshooting about 1% and settling by 0.39s, while fading in over 0.14s. Closing: shrinks back into the
   arrow, speeding up, and fades out, all in ~0.15s. The Start menu is the same kind of popover, so it opens and
   closes the same way out of its button. */
.pop, .start {
  transform-origin: var(--ax, 50%) calc(100% + 7px); transform: scale(.1);
  transition:
    transform .153s linear(0, .019 9.8%, .084 18.3%, .236 32.7%, .349 41.2%, .52 55.6%, .626 64%, .756 77.1%, .833 86.9%, 1),
    opacity .153s linear(0, .01 9.8%, .06 18.3%, .18 32.7%, .27 41.2%, .53 55.6%, .72 64%, .88 77.1%, .96 86.9%, 1),
    visibility 0s .153s;
}
.pop.show, .start.show {
  transform: none;
  transition:
    transform .39s linear(0, .156 4.6%, .578 10.3%, .678 13.6%, .794 18.7%, .856 22.6%, .924 27.7%, .956 31.5%, .984 36.7%, 1.002 40.3%, 1.011 45.6%, 1.014 49.2%, 1.014 54.6%, 1.013 58.2%, 1.012 63.6%, 1.011 67.2%, 1.007 72.3%, 1.005 76.2%, 1.003 81.3%, 1.002 90.3%, 1),
    opacity .143s linear(0, .35 12.6%, .69 28%, .76 37%, .86 51%, .91 61.5%, .96 75.5%, .98 86%, 1),
    visibility 0s;
}

/* The taskbar sits above the previews and the Start menu, so their drop shadows don't darken it (they fall
   20–50px below the popup, onto the bar, and made it flicker darker each time one opened or closed) */
.tb { z-index: 35; }
